/* ═══════════════════════════════════════════════════════════════════
   Torque Toolbox — landing page
   Industrial workshop utility platform
═══════════════════════════════════════════════════════════════════ */

:root {
  --bg:         #09101f;
  --surface:    #111827;
  --elevated:   #1c2537;
  --accent:     #4f8ef7;
  --text:       #f1f5f9;
  --text-muted: #94a3b8;
  --border:     rgba(255, 255, 255, 0.07);
  --font:       "IBM Plex Sans", system-ui, -apple-system, Segoe UI, sans-serif;
  --radius:     12px;
  --radius-lg:  16px;
  --header-h:   64px;
  --max-w:      1120px;
  --max-w-wide: 1280px;
  --grid-line:  rgba(255, 255, 255, 0.025);
  --grid-major: rgba(255, 255, 255, 0.042);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  position: relative;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Backdrop ────────────────────────────────────────────────────── */

.page-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  isolation: isolate;
}

.page-backdrop__photo {
  position: absolute;
  inset: -8%;
  background-image: url("assets/atmosphere/workshop-reference.png");
  background-position: center 36%;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(52px) brightness(0.24) saturate(0.62);
  opacity: 0.28;
  transform: scale(1.06);
}

@media (prefers-reduced-data: reduce) {
  .page-backdrop__photo { background-image: none; opacity: 0; }
}

.page-backdrop__haze {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 92% 58% at 76% 5%,  rgba(79,142,247,0.055) 0%, transparent 58%),
    radial-gradient(ellipse 68% 48% at 8%  90%,  rgba(0,0,0,0.48)      0%, transparent 56%),
    radial-gradient(ellipse 58% 42% at 94% 68%,  rgba(0,0,0,0.32)      0%, transparent 52%),
    linear-gradient(178deg, rgba(9,16,31,0.96) 0%, rgba(9,16,31,0.4) 40%, rgba(9,16,31,0.98) 100%);
}

.page-backdrop__grid {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(var(--grid-line)  1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line)  1px, transparent 1px),
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% -4%,
    rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.1) 46%, transparent 72%);
}

/* Film grain — barely-perceptible texture, felt not seen */
.page-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.014;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: overlay;
}

body > *:not(.page-backdrop) { position: relative; z-index: 1; }

/* ─── Accessibility ────────────────────────────────────────────────── */

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 12px 16px;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  z-index: 1000;
  color: var(--text);
}

/* ─── Layout ────────────────────────────────────────────────────────── */

.container {
  width: min(100% - 40px, var(--max-w));
  margin-inline: auto;
}

.container--wide {
  width: min(100% - 40px, var(--max-w-wide));
  margin-inline: auto;
}

/* ─── Header ────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.logo:hover { text-decoration: none; color: var(--text); }

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  flex-shrink: 0;
  display: block;
}

.logo-mark.small { width: 22px; height: 22px; border-radius: 5px; }

.nav { display: none; align-items: center; gap: 28px; }

.nav a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.nav a:hover { color: var(--text); text-decoration: none; }

.nav-cta {
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text) !important;
  font-weight: 600;
  font-size: 0.9375rem;
}

.nav-cta:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  background: var(--elevated);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin-inline: auto;
  background: var(--text);
  border-radius: 1px;
}

.nav-mobile {
  display: flex;
  flex-direction: column;
  padding: 8px 20px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.nav-mobile a {
  display: block;
  padding: 14px 12px;
  color: var(--text);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

.nav-mobile a:last-child { border-bottom: 0; }
.nav-mobile[hidden] { display: none !important; }

@media (min-width: 768px) {
  .nav { display: flex; }
  .nav-toggle { display: none; }
  .nav-mobile { display: none !important; }
}

/* ─── Buttons ────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 11px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.btn:hover { text-decoration: none; }

/* Google Play button */
.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  background: var(--elevated);
  border: 1px solid rgba(79,142,247,0.16);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 0 0 1px rgba(79,142,247,0.08),
    0 8px 28px rgba(0,0,0,0.36);
}

.btn-play:hover {
  background: color-mix(in srgb, var(--elevated) 80%, var(--accent));
  border-color: rgba(79,142,247,0.36);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.07) inset,
    0 0 0 1px rgba(79,142,247,0.22),
    0 0 20px rgba(79,142,247,0.12),
    0 14px 40px rgba(0,0,0,0.44);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--text);
}

.btn-play:active { transform: translateY(0); }

.play-icon { color: var(--accent); flex-shrink: 0; }

.play-label {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: left;
}

.play-sub {
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.play-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.btn-play-lg { padding: 14px 26px; }
.btn-play-lg .play-name { font-size: 1.0625rem; }

.btn-secondary {
  background: rgba(17,24,39,0.42);
  color: var(--text);
  border-color: rgba(255,255,255,0.08);
}

.btn-secondary:hover {
  background: var(--surface);
  border-color: rgba(79,142,247,0.28);
  color: var(--text);
  transform: translateY(-1px);
}

.btn-secondary:active { transform: translateY(0); }

/* ─── Hero ──────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 10vw, 120px) 0 clamp(88px, 13vw, 144px);
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(90deg, rgba(3,7,18,0.50) 0%, rgba(3,7,18,0.18) 35%, transparent 52%),
    radial-gradient(ellipse 36% 72% at 80% 46%, rgba(79,142,247,0.09) 0%, transparent 52%),
    radial-gradient(ellipse 60% 80% at -2% 50%, rgba(0,0,0,0.60)      0%, transparent 50%),
    radial-gradient(ellipse 100% 70% at 80% 10%, rgba(17,26,44,0.58) 0%, transparent 52%),
    radial-gradient(ellipse 80% 60% at 5%  88%, rgba(0,0,0,0.42)     0%, transparent 48%),
    linear-gradient(196deg, #040b1a 0%, var(--bg) 40%, #020810 100%);
}

@media (min-width: 768px) {
  .hero {
    min-height: clamp(660px, 90vh, 940px);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* Directional lighting: ambient source from upper-right */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 40% 32% at 80% -4%, rgba(79,142,247,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 36% 38% at 80% 22%, rgba(79,142,247,0.06) 0%, transparent 56%),
    linear-gradient(168deg, rgba(9,16,31,0.18) 0%, transparent 50%, rgba(0,0,0,0.25) 100%);
}

/* Floor fade */
.hero::after {
  content: "";
  position: absolute;
  left: -18%; right: -18%; bottom: -8%;
  height: min(48vh, 440px);
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(to top,
    rgba(2,5,14,0.96) 0%,
    rgba(9,16,31,0.3)  50%,
    transparent 100%);
}

.hero > .container { position: relative; z-index: 1; flex: 0 0 auto; }

.hero-grid {
  display: grid;
  gap: clamp(52px, 7vw, 88px);
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
    gap: clamp(40px, 4.5vw, 64px);
    align-items: start;
  }
}

@media (min-width: 1100px) {
  .hero-grid { grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); }
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 62%, var(--text-muted));
}

.hero-title {
  margin: 0 0 26px;
  font-size: clamp(2.9rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.04;
  color: var(--text);
  max-width: 14ch;
}

.hero-accent {
  color: var(--accent);
  text-shadow:
    0 0 40px rgba(79,142,247,0.28),
    0 0 120px rgba(79,142,247,0.1);
}

.hero-sub {
  margin: 0 0 40px;
  font-size: clamp(1.0625rem, 2vw, 1.1875rem);
  color: var(--text-muted);
  max-width: 38ch;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.spec-strip {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.spec-strip li {
  padding: 4px 11px;
  border-radius: 6px;
  background: rgba(17,24,39,0.5);
  border: 1px solid rgba(255,255,255,0.07);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* Launch availability badge */
.launch-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 18px;
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(79,142,247,0.07);
  border: 1px solid rgba(79,142,247,0.18);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 60%, var(--text-muted));
}

.launch-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.65;
  flex-shrink: 0;
}

/* ─── Hero visual & device cluster ──────────────────────────────────── */

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: visible;
}

@media (min-width: 900px) {
  .hero-visual {
    justify-content: flex-end;
  }
}

/* Blueprint grid overlay — localized behind phone area */
.hero-blueprint {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.030;
  background-image:
    linear-gradient(rgba(79,142,247,0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,142,247,0.5) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 44% 68% at 82% 44%,
    rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.25) 44%, transparent 66%);
  -webkit-mask-image: radial-gradient(ellipse 44% 68% at 82% 44%,
    rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.25) 44%, transparent 66%);
}

/* Phone glow — soft, broad, atmospheric */
.hero-glow {
  position: absolute;
  width: 130%;
  height: 140%;
  left: -6%;
  top: -20%;
  background:
    radial-gradient(
      ellipse 58% 52% at 50% 46%,
      rgba(79,142,247,0.12) 0%,
      rgba(79,142,247,0.04) 42%,
      transparent 65%
    ),
    radial-gradient(
      ellipse 88% 74% at 50% 46%,
      rgba(59,130,246,0.05) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 115% 98% at 50% 46%,
      rgba(30,80,200,0.02) 0%,
      transparent 80%
    );
  pointer-events: none;
  z-index: 0;
}

@keyframes glow-breathe {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.78; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-glow { animation: glow-breathe 9s ease-in-out infinite; }
}

/* Ambient atmospheric depth — contained to right column */
@media (min-width: 900px) {
  .hero-visual::before {
    content: "";
    position: absolute;
    inset: -28% -20% -28% -4%;
    background: radial-gradient(
      ellipse 58% 62% at 44% 46%,
      transparent 28%,
      rgba(2, 5, 16, 0.14) 56%,
      rgba(1, 3, 12, 0.28) 100%
    );
    pointer-events: none;
    z-index: 0;
  }

  /* Torque arc — restrained rotational motif */
  .hero-visual::after {
    content: "";
    position: absolute;
    width: 440px;
    height: 440px;
    border-radius: 50%;
    border: 1.5px solid rgba(79,142,247,0.07);
    border-bottom-color: transparent;
    border-right-color: transparent;
    top: 8%;
    left: 4%;
    transform: rotate(32deg);
    pointer-events: none;
    z-index: 0;
  }
}

/* ─── Hero device cluster ──────────────────────────────────────────── */

/* Mobile: single phone, normal flow */
.hero-device-cluster {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: min(284px, 76vw);
}

.app-frame--hero-primary {
  position: relative;
  width: 100%;
  z-index: 3;
}

/* Tablet: single primary phone */
@media (min-width: 600px) {
  .hero-device-cluster {
    width: 320px;
    height: 560px;
    position: relative;
    flex-shrink: 0;
  }

  .app-frame--hero-primary {
    position: absolute;
    width: 304px;
    left: 0;
    top: 0;
    z-index: 3;
  }
}

/* Desktop: primary dominant, single focal point */
@media (min-width: 900px) {
  .hero-device-cluster {
    width: 600px;
    height: 790px;
    margin-top: -28px;
  }

  .app-frame--hero-primary {
    width: 441px;
    left: 4px;
    top: 0;
  }
}

@media (min-width: 1100px) {
  .hero-device-cluster {
    width: 650px;
    height: 820px;
  }

  .app-frame--hero-primary { width: 463px; left: 8px; }
}

/* ─── App frame (clean screenshot — no phone chrome) ─────────────────── */

.app-frame {
  position: relative;
  margin: 0;
  border-radius: 32px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.07),
    0 40px 72px -8px rgba(0, 0, 0, 0.72),
    0 20px 40px rgba(0, 0, 0, 0.48),
    0 6px 16px rgba(0, 0, 0, 0.32);
}

/* Floating shadow beneath the frame — on the pseudo-element, not the image */
.app-frame::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 80%;
  height: 48px;
  transform: translateX(-50%) scaleY(0.42);
  background: radial-gradient(ellipse at center,
    rgba(1, 4, 18, 0.84) 0%,
    rgba(0, 0, 0, 0.32) 44%,
    transparent 72%);
  filter: blur(18px);
  opacity: 0.88;
  z-index: -1;
  pointer-events: none;
}

.app-frame .app-shot {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 32px;
  object-fit: contain;
  object-position: top center;
}

/* Primary hero: blue rim + atmospheric bloom */
.app-frame--hero-primary {
  box-shadow:
    0 0 0 1px rgba(79, 142, 247, 0.32),
    0 0 0 2px rgba(79, 142, 247, 0.12),
    0 0 56px 14px rgba(79, 142, 247, 0.11),
    0 0 110px 24px rgba(79, 142, 247, 0.05),
    0 0 180px 40px rgba(79, 142, 247, 0.02),
    0 64px 96px -8px rgba(0, 0, 0, 0.98),
    0 36px 64px rgba(0, 0, 0, 0.76),
    0 14px 32px rgba(0, 0, 0, 0.56);
}

@media (prefers-reduced-motion: no-preference) {
  .app-frame--sc-center:hover {
    transform: translateY(-80px) scale(1.018);
  }
}

/* ─── Hero float (primary only, vertical translation — no rotation) ─── */

@keyframes float-primary {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-14px); }
}

@media (prefers-reduced-motion: no-preference) {
  .app-frame--hero-primary { animation: float-primary 7s ease-in-out infinite; }
}

/* ─── Metrics strip ──────────────────────────────────────────────────── */

.metrics-strip {
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 70% 200% at 50% -40%,
      rgba(79,142,247,0.045) 0%, transparent 68%),
    var(--bg);
  padding: 28px 0;
}

.metrics-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 14px 0;
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 0 20px;
}

.metric-val {
  font-size: clamp(1.0625rem, 2.1vw, 1.3125rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}

.metric-plus { color: var(--accent); font-size: 0.85em; }

.metric-lbl {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-align: center;
}

.metric-div {
  width: 1px;
  height: 28px;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(255,255,255,0.07) 18%,
    rgba(255,255,255,0.07) 82%,
    transparent 100%
  );
  flex-shrink: 0;
}

@media (max-width: 599px) {
  .metric-div { display: none; }
  .metric-item { width: 50%; padding: 10px 16px; }
  .metrics-list { gap: 0; }
}

/* ─── Sections ───────────────────────────────────────────────────────── */

.section {
  position: relative;
  padding: clamp(64px, 9vw, 96px) 0;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.section.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .section { opacity: 1; transform: none; transition: none; }
}

.section-head {
  margin-bottom: clamp(36px, 4.5vw, 48px);
  max-width: 640px;
}

.section-head--ruled {
  position: relative;
  margin-bottom: clamp(24px, 3.5vw, 40px);
  max-width: min(680px, 100%);
  padding-left: 20px;
  border-left: 2px solid color-mix(in srgb, var(--accent) 58%, var(--border));
}

/* L-bracket annotation mark at top of ruled border */
.section-head--ruled::before {
  content: "";
  position: absolute;
  top: 0;
  left: -1px;
  width: 8px;
  height: 2px;
  background: color-mix(in srgb, var(--accent) 58%, var(--border));
}

.section-head-center {
  text-align: center;
  margin-inline: auto;
}

.section-kicker {
  margin: 0 0 10px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 68%, var(--text-muted));
}

.section-kicker::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 2px;
  background: currentColor;
  opacity: 0.65;
  vertical-align: middle;
  margin-right: 10px;
  margin-bottom: 2px;
}

.section-head h2,
.section-head--ruled h2 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3.1vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.section-lead {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.section-head--ruled .section-lead { max-width: 52ch; }

/* ─── Cards ──────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.035) inset,
    0 8px 24px rgba(0,0,0,0.14);
}

.card-elevated {
  background: var(--elevated);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 12px 32px rgba(0,0,0,0.2);
}

/* ─── Features ───────────────────────────────────────────────────────── */

/* Single accent divider at top; no ambient radial fills */
.features {
  background:
    linear-gradient(90deg,
      transparent,
      color-mix(in srgb, var(--accent) 18%, transparent),
      transparent) center top / min(92%,960px) 1px no-repeat,
    var(--bg);
  padding: clamp(80px, 11vw, 120px) 0;
}

.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

@media (min-width: 600px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }


.feature-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, border-left-color 0.2s ease;
  border-left: 2px solid transparent;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(79,142,247,0.18);
  border-left-color: rgba(79,142,247,0.38);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 0 0 1px rgba(79,142,247,0.08),
    0 20px 44px rgba(0,0,0,0.28);
}

.feature-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--elevated);
  border: 1px solid var(--border);
  color: var(--accent);
  margin-bottom: 16px;
  flex-shrink: 0;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
}

.feature-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Featured first card — Torque Calculator as the anchor card */
.feature-card:first-child {
  background: var(--elevated);
  border-color: rgba(79,142,247,0.14);
  padding: 28px 24px;
}

.feature-card:first-child h3 {
  font-size: 1.125rem;
  font-weight: 700;
}

.feature-card:first-child .feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}

/* ─── Showcase ───────────────────────────────────────────────────────── */

.showcase {
  position: relative;
  border-block: 1px solid var(--border);
  padding: clamp(72px, 9.5vw, 108px) 0 clamp(64px, 8.5vw, 96px);
  background:
    radial-gradient(ellipse 70% 55% at 50% 72%,
      rgba(1,4,14,0.65) 0%, transparent 68%),
    radial-gradient(ellipse 50% 40% at 50% 20%,
      rgba(79,142,247,0.04) 0%, transparent 60%),
    color-mix(in srgb, var(--surface) 20%, var(--bg));
  overflow: hidden;
}

/* Torque arc — large rotational mark, upper-right environmental element */
.showcase::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  border: 1px solid rgba(79,142,247,0.06);
  border-top-color: transparent;
  border-left-color: transparent;
  top: -15%;
  right: -8%;
  transform: rotate(20deg);
  pointer-events: none;
  z-index: 0;
}

/* Open atmospheric dark stage — phones emerge from darkness */
.showcase-stage {
  position: relative;
  margin-top: clamp(24px, 3vw, 36px);
  padding: clamp(32px, 4vw, 52px) clamp(12px, 2.5vw, 24px) clamp(44px, 6vw, 72px);
}

/* Radial glow — phones emerge from light source */
.showcase-stage::before {
  content: "";
  position: absolute;
  inset: -20% -10%;
  pointer-events: none;
  background:
    radial-gradient(ellipse 44% 56% at 50% 52%,
      rgba(79,142,247,0.13) 0%,
      rgba(79,142,247,0.04) 40%,
      transparent 64%
    );
  z-index: 0;
}

/* Bracket mark: top-left corner of stage */
.showcase-stage::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  border-top: 2px solid rgba(79,142,247,0.22);
  border-left: 2px solid rgba(79,142,247,0.22);
  pointer-events: none;
  z-index: 1;
}

/* Three-phone podium: side phones flank a dominant elevated center */
.showcase-trio {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(10px, 2vw, 20px);
}

.app-frame--sc {
  flex: 0 0 auto;
  width: min(272px, 25vw);
  max-width: 308px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 0 0 2px rgba(255,255,255,0.03),
    0 0 28px 6px rgba(79,142,247,0.07),
    0 48px 72px -8px rgba(0,0,0,0.78),
    0 24px 40px rgba(0,0,0,0.52);
}

/* Center: elevated, ~15% wider, blue rim light — cinematic focal point */
.app-frame--sc-center {
  transform: translateY(-72px);
  width: min(314px, 29vw);
  max-width: 356px;
  z-index: 2;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease;
  box-shadow:
    0 0 0 1px rgba(79, 142, 247, 0.28),
    0 0 0 2px rgba(79, 142, 247, 0.09),
    0 0 52px 12px rgba(79, 142, 247, 0.13),
    0 0 100px 20px rgba(79, 142, 247, 0.05),
    0 56px 96px -8px rgba(0, 0, 0, 0.94),
    0 32px 56px rgba(0, 0, 0, 0.66),
    0 12px 28px rgba(0, 0, 0, 0.44);
}

.app-frame--sc .app-shot      { max-height: min(72vh, 760px); }
.app-frame--sc-center .app-shot { max-height: min(80vh, 860px); }
.app-frame--sc-side { display: none; }

@media (min-width: 640px) {
  .app-frame--sc-side { display: block; }
  .app-frame--sc       { width: min(220px, 23vw); }
  .app-frame--sc-center { width: min(253px, 26.5vw); }

  /* Side phones lean slightly away from center — breaks symmetry, adds depth */
  .showcase-trio > .app-frame--sc-side:first-child {
    transform: rotate(-3deg);
    transform-origin: 50% 100%;
  }
  .showcase-trio > .app-frame--sc-side:last-child {
    transform: rotate(3deg);
    transform-origin: 50% 100%;
  }
}

@media (min-width: 860px) {
  .app-frame--sc       { width: min(268px, 24vw); }
  .app-frame--sc-center { width: min(308px, 27.5vw); }
}

/* ─── Trades (why tradespeople) ──────────────────────────────────────── */

.trades {
  padding: clamp(96px, 13vw, 144px) 0;
  transition: opacity 1.0s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1.0s cubic-bezier(0.16, 1, 0.3, 1);
  background:
    radial-gradient(ellipse 40% 60% at 92% 50%, rgba(79,142,247,0.05) 0%, transparent 62%),
    linear-gradient(90deg,
      transparent,
      color-mix(in srgb, var(--accent) 16%, transparent),
      transparent) center top / min(92%,960px) 1px no-repeat,
    linear-gradient(180deg, var(--bg) 0%, #020913 100%);
}

.trades-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(44px, 6.5vw, 68px);
  align-items: center;
}

@media (min-width: 860px) {
  .trades-grid { grid-template-columns: 1fr 380px; gap: clamp(48px, 5.5vw, 72px); }
}

@media (min-width: 1100px) {
  .trades-grid { grid-template-columns: 1fr 420px; }
}

.trades-copy h2 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3.1vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.trades-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.trades-list li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 0 12px;
  align-items: flex-start;
}

.trades-check {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(79,142,247,0.1);
  border: 1px solid rgba(79,142,247,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}

.trades-list strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.trades-list p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.63;
}

.trades-visual { display: flex; justify-content: center; }

.app-frame--trades {
  width: min(262px, 60vw);
  box-shadow:
    0 0 0 1px rgba(79,142,247,0.18),
    0 0 0 2px rgba(79,142,247,0.06),
    0 0 36px 8px rgba(79,142,247,0.07),
    0 48px 72px -8px rgba(0,0,0,0.90),
    0 28px 48px rgba(0,0,0,0.62),
    0 12px 24px rgba(0,0,0,0.44);
}

@media (min-width: 860px) {
  .app-frame--trades { width: 100%; max-width: 340px; }
}

/* ─── Workflow ───────────────────────────────────────────────────────── */

.workflow {
  background:
    linear-gradient(90deg,
      transparent,
      color-mix(in srgb, var(--accent) 16%, transparent),
      transparent) center top / min(92%,960px) 1px no-repeat,
    #020913;
  padding: clamp(64px, 8.5vw, 96px) 0;
}

.workflow-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

@media (min-width: 720px) {
  .workflow-steps { grid-template-columns: repeat(3, 1fr); }
}

.workflow-step {
  position: relative;
  padding: 26px 22px 22px;
}

.workflow-num {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}

.workflow-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--elevated);
  border: 1px solid var(--border);
  color: color-mix(in srgb, var(--accent) 68%, var(--text-muted));
  margin-bottom: 14px;
}

.workflow-step h3 {
  margin: 0 0 7px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
}

.workflow-step p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── Final CTA ──────────────────────────────────────────────────────── */

.final-cta {
  background:
    radial-gradient(ellipse 50% 80% at 88% 50%, rgba(79,142,247,0.09) 0%, transparent 56%),
    radial-gradient(ellipse 42% 60% at 8%  50%, rgba(0,0,0,0.45)      0%, transparent 55%),
    linear-gradient(90deg,
      transparent,
      color-mix(in srgb, var(--accent) 16%, transparent),
      transparent) center top / min(92%,960px) 1px no-repeat,
    #020913;
  padding: clamp(80px, 10vw, 112px) 0 clamp(112px, 14vw, 152px);
}

.final-cta-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
  border: 1px solid rgba(79,142,247,0.10);
  background: color-mix(in srgb, var(--elevated) 90%, rgba(79,142,247,0.06));
  padding: clamp(32px, 5vw, 52px);
  overflow: hidden;
}

/* Bottom-right corner bracket — completes the bracket visual language */
.final-cta-inner::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 20px;
  height: 20px;
  border-bottom: 2px solid rgba(79,142,247,0.20);
  border-right: 2px solid rgba(79,142,247,0.20);
  pointer-events: none;
}

@media (min-width: 840px) {
  .final-cta-inner {
    grid-template-columns: 1fr auto;
    gap: 44px;
  }
}

.cta-copy {
  position: relative;
}

.cta-copy::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  width: 16px;
  height: 16px;
  border-top: 2px solid rgba(79,142,247,0.22);
  border-left: 2px solid rgba(79,142,247,0.22);
  pointer-events: none;
}

.cta-copy .section-kicker { margin-bottom: 10px; }

.cta-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3.1vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.cta-copy p {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 1.0625rem;
  max-width: 48ch;
  line-height: 1.6;
}

.cta-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.cta-visual::before {
  content: "";
  position: absolute;
  inset: -60% -40%;
  background: radial-gradient(ellipse 65% 72% at 50% 50%,
    rgba(79,142,247,0.10) 0%,
    rgba(79,142,247,0.04) 42%,
    transparent 66%
  );
  pointer-events: none;
  z-index: 0;
}

.app-frame--cta {
  position: relative;
  z-index: 1;
  width: min(272px, 44vw);
  flex-shrink: 0;
  box-shadow:
    0 0 0 1px rgba(79,142,247,0.22),
    0 0 0 2px rgba(79,142,247,0.08),
    0 0 44px 10px rgba(79,142,247,0.09),
    0 48px 72px -8px rgba(0,0,0,0.92),
    0 28px 48px rgba(0,0,0,0.64),
    0 12px 28px rgba(0,0,0,0.44);
}

/* ─── Footer ─────────────────────────────────────────────────────────── */

.site-footer {
  position: relative;
  padding: 44px 0 56px;
  border-top: 1px solid var(--border);
  background:
    radial-gradient(ellipse 80% 120% at 50% -10%,
      rgba(79,142,247,0.04) 0%, transparent 62%),
    linear-gradient(to bottom, #050d1d 0%, #020810 100%);
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  width: min(94%, 980px);
  height: 1px;
  pointer-events: none;
  opacity: 0.60;
  background: linear-gradient(90deg,
    transparent,
    color-mix(in srgb, var(--accent) 28%, transparent),
    transparent);
}

.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  background-image:
    linear-gradient(rgba(79,142,247,0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,142,247,0.6) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 100% 100% at 50% 100%,
    rgba(0,0,0,0.6) 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at 50% 100%,
    rgba(0,0,0,0.6) 0%, transparent 70%);
}

.site-footer .container { position: relative; z-index: 1; }

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.footer-nav { display: flex; gap: 24px; }

.footer-nav a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.footer-nav a:hover { color: var(--text); text-decoration: none; }

.footer-copy {
  margin: 0;
  width: 100%;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .footer-copy {
    width: auto;
    flex-basis: 100%;
    text-align: center;
    order: 3;
  }
}

/* ─── Conditions (Built for Real Workshop Conditions) ────────────────── */

.conditions {
  background:
    linear-gradient(90deg,
      transparent,
      color-mix(in srgb, var(--accent) 16%, transparent),
      transparent) center top / min(92%,960px) 1px no-repeat,
    #020913;
  padding: clamp(52px, 7vw, 80px) 0;
}

.conditions-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .conditions-grid { grid-template-columns: repeat(2, 1fr); }

  /* First condition card spans full width + featured treatment */
  .condition-item:first-child {
    grid-column: 1 / -1;
    grid-template-columns: 46px 1fr;
    gap: 0 20px;
    padding: 24px;
    background: var(--elevated);
    border-color: rgba(79,142,247,0.14);
  }
}

/* Featured first card: larger icon + heading */
.condition-item:first-child .condition-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}

.condition-item:first-child h3 {
  font-size: 1.125rem;
  font-weight: 700;
}

/* Horizontal card: icon beside text — denser than feature cards */
.condition-item {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 0 16px;
  align-items: start;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.condition-item:hover {
  transform: translateY(-2px);
  border-color: rgba(79,142,247,0.18);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 14px 32px rgba(0,0,0,0.22);
}

.condition-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--elevated);
  border: 1px solid var(--border);
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.condition-item h3 {
  margin: 0 0 7px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.condition-item p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.63;
}

/* ─── About / SEO content section ───────────────────────────────────── */

.about-section {
  background:
    linear-gradient(90deg,
      transparent,
      color-mix(in srgb, var(--accent) 16%, transparent),
      transparent) center top / min(92%,960px) 1px no-repeat,
    #020913;
  padding: clamp(64px, 8.5vw, 96px) 0;
}

.about-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 4vw, 48px);
  padding: clamp(32px, 4.5vw, 52px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid color-mix(in srgb, var(--accent) 46%, var(--border));
  box-shadow:
    0 1px 0 rgba(255,255,255,0.035) inset,
    0 12px 32px rgba(0,0,0,0.18);
  position: relative;
}

/* Bottom-right corner bracket mark */
.about-panel::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 18px;
  height: 18px;
  border-bottom: 2px solid rgba(79,142,247,0.20);
  border-right: 2px solid rgba(79,142,247,0.20);
  pointer-events: none;
}

@media (min-width: 800px) {
  .about-panel {
    grid-template-columns: 280px 1fr;
    gap: clamp(32px, 4vw, 52px);
    align-items: start;
  }
}

.about-head .section-kicker { margin-bottom: 10px; }

.about-head h2 {
  margin: 0 0 14px;
  font-size: clamp(1.375rem, 2.8vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text);
}

.about-lead {
  margin: 18px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.07);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.about-utilities {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 640px) {
  .about-utilities { grid-template-columns: 1fr 1fr; }
}

.about-utility {
  padding: 22px 0;
  border-top: 1px solid var(--border);
}

/* First item: no top rule on any screen size */
.about-utility:first-child {
  border-top: none;
  padding-top: 0;
}

@media (min-width: 640px) {
  /* Second item is in the top row — no top rule */
  .about-utility:nth-child(2) { border-top: none; padding-top: 0; }
  /* Odd column: padding-right for gutter */
  .about-utility:nth-child(odd) { padding-right: 22px; }
  /* Even column: left divider + padding */
  .about-utility:nth-child(even) { padding-left: 22px; border-left: 1px solid var(--border); }
  /* Bottom row: no bottom padding */
  .about-utility:nth-child(3),
  .about-utility:nth-child(4) { padding-bottom: 0; }
}

.about-util-label {
  margin: 0 0 7px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 60%, var(--text-muted));
}

.about-util-label::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 1.5px;
  background: currentColor;
  opacity: 0.6;
  vertical-align: middle;
  margin-right: 8px;
  margin-bottom: 1px;
}

.about-utility p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.68;
}

/* ─── Footer features (keyword navigation) ──────────────────────────── */

.footer-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.footer-features a {
  font-size: 0.8125rem;
  color: rgba(148, 163, 184, 0.55);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.footer-features a:hover {
  color: var(--text-muted);
  text-decoration: none;
}

/* ─── Legal / contact pages ──────────────────────────────────────────── */

.page-main {
  padding: clamp(48px, 8vw, 80px) 0;
  min-height: 50vh;
}

.page-main h1 {
  margin: 0 0 16px;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.page-main .lead { color: var(--text-muted); margin-bottom: 32px; }

.prose { color: var(--text-muted); max-width: 65ch; }

.prose h2 {
  color: var(--text);
  font-size: 1.125rem;
  margin: 28px 0 12px;
}

.prose p { margin: 0 0 12px; }

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.contact-actions a {
  display: inline-flex;
  width: fit-content;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.contact-actions a:hover { background: var(--elevated); text-decoration: none; }
