/* ===========================================================
   TGPS — design tokens + components
   Art direction: engineered dark. Brand blue #0049A8.
   Geometry: 45° chamfers echoing the wordmark.
   =========================================================== */

:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.9375rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1.1rem + 4vw, 4.75rem);
  --text-hero: clamp(2.75rem, 0.8rem + 6.4vw, 7rem);

  /* Spacing */
  --space-1: 0.25rem;  --space-2: 0.5rem;  --space-3: 0.75rem;
  --space-4: 1rem;     --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem;     --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem;    --space-20: 5rem;   --space-24: 6rem;
  --space-32: 8rem;

  /* Radii — deliberately tight. Chamfers do the shaping. */
  --radius-sm: 2px; --radius-md: 3px; --radius-lg: 4px; --radius-full: 9999px;

  --chamfer: 14px;
  --chamfer-lg: 26px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  --content-narrow: 680px;
  --content-default: 1000px;
  --content-wide: 1340px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --head-h: 74px;

  --font-display: 'Supreme', 'Segoe UI', sans-serif;
  --font-body: 'Satoshi', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* ---------- DARK (default) ---------- */
:root,
[data-theme='dark'] {
  --color-bg: #071429;
  --color-bg-deep: #040e1f;
  --color-surface: #0c1d38;
  --color-surface-2: #112544;
  --color-surface-3: #172f52;
  --color-border: rgb(158 194 255 / 0.14);
  --color-border-strong: rgb(158 194 255 / 0.26);
  --color-divider: rgb(158 194 255 / 0.09);
  --color-text: #e8eefb;
  --color-text-muted: #94a6c4;
  --color-text-faint: #64769a;
  --color-text-on-primary: #ffffff;
  --color-primary: #2e6fe8;
  --color-primary-hover: #4a86f7;
  --color-primary-deep: #0049a8;
  --color-link: #7ba9ff;
  --color-focus: #7ba9ff;
  --color-grid: rgb(123 169 255 / 0.13);
  --shadow-md: 0 8px 30px rgb(2 8 20 / 0.55);
  --shadow-lg: 0 24px 70px rgb(2 8 20 / 0.66);
  --logo-src: url('./assets/logo-white.webp');
  --img-tone: 1;
  --color-error: #e0708f;
  --hero-scrim: linear-gradient(180deg, rgb(7 20 41 / 0.34) 0%, rgb(7 20 41 / 0.60) 48%, rgb(7 20 41 / 0.97) 100%);
}

/* ---------- LIGHT ---------- */
[data-theme='light'] {
  --color-bg: #ffffff;
  --color-bg-deep: #eef2f9;
  --color-surface: #f4f6f9;
  --color-surface-2: #eaeef3;
  --color-surface-3: #e0e5ec;
  --color-border: rgb(6 20 40 / 0.12);
  --color-border-strong: rgb(6 20 40 / 0.24);
  --color-divider: rgb(6 20 40 / 0.08);
  --color-text: #0a0d12;
  --color-text-muted: #545d6b;
  --color-text-faint: #8a93a1;
  --color-text-on-primary: #ffffff;
  --color-primary: #0049a8;
  --color-primary-hover: #003a87;
  --color-primary-deep: #0049a8;
  --color-link: #0049a8;
  --color-focus: #0049a8;
  --color-grid: rgb(0 73 168 / 0.10);
  --shadow-md: 0 8px 26px rgb(10 20 40 / 0.09);
  --shadow-lg: 0 24px 60px rgb(10 20 40 / 0.13);
  --logo-src: url('./assets/logo-blue.webp');
  --color-error: #b0203f;
  --hero-scrim: linear-gradient(180deg, rgb(255 255 255 / 0.70) 0%, rgb(255 255 255 / 0.84) 48%, rgb(255 255 255 / 0.99) 100%);
}

/* ===================== PRIMITIVES ===================== */

.shell { width: 100%; max-width: var(--content-wide); margin-inline: auto; padding-inline: var(--gutter); }
.shell--default { max-width: var(--content-default); }
.shell--narrow { max-width: var(--content-narrow); }

section { position: relative; }
.band { padding-block: clamp(var(--space-16), 9vw, var(--space-32)); }
.band--tight { padding-block: clamp(var(--space-12), 6vw, var(--space-20)); }
.band--deep { background: var(--color-bg-deep); }
.band--rule { border-top: 1px solid var(--color-divider); }

/* Chamfered corners — top-right + bottom-left, mirroring the wordmark cuts */
.chamfer {
  clip-path: polygon(
    0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer),
    100% 100%, var(--chamfer) 100%, 0 calc(100% - var(--chamfer))
  );
}
.chamfer--lg { --chamfer: var(--chamfer-lg); }

/* ---- Typography helpers ---- */
.display { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.025em; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-link);
  display: flex; align-items: center; gap: var(--space-3);
}
.eyebrow::before {
  content: ''; width: 26px; height: 1px; background: var(--color-primary); flex: none;
}
.eyebrow--plain::before { display: none; }
.idx {
  font-family: var(--font-mono); font-size: var(--text-xs);
  color: var(--color-text-faint); letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
}
.lead { font-size: var(--text-lg); color: var(--color-text-muted); line-height: 1.5; max-width: 58ch; }
.muted { color: var(--color-text-muted); }
.h-sec { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 500; letter-spacing: -0.03em; }
.h-sub { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 500; letter-spacing: -0.02em; }
.h-card { font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.01em; font-family: var(--font-body); }

/* ---- Buttons ---- */
.btn {
  --chamfer: 10px;
  display: inline-flex; align-items: center; gap: var(--space-3);
  padding: 0.9rem 1.5rem; min-height: 48px;
  font-size: var(--text-sm); font-weight: 700; letter-spacing: 0.01em;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: background var(--transition-interactive), color var(--transition-interactive),
    transform var(--transition-interactive), box-shadow var(--transition-interactive);
}
.btn__arrow { font-family: var(--font-mono); transition: transform var(--transition-interactive); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--primary { background: var(--color-primary); color: var(--color-text-on-primary); }
.btn--primary:hover { background: var(--color-primary-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--primary:active { transform: translateY(0); }
.btn--ghost { background: transparent; color: var(--color-text); box-shadow: inset 0 0 0 1px var(--color-border-strong); }
.btn--ghost:hover { background: var(--color-surface-2); box-shadow: inset 0 0 0 1px var(--color-primary); transform: translateY(-2px); }
.btn--ghost:active { transform: translateY(0); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Text link with animated rule */
.tlink {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-link);
  padding-block: 2px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px; background-position: 0 100%; background-repeat: no-repeat;
  transition: background-size 300ms var(--ease-out), color var(--transition-interactive);
}
.tlink:hover { background-size: 100% 1px; }

/* ---- Panels ---- */
.panel {
  position: relative;
  background: var(--color-surface);
  padding: clamp(var(--space-5), 2.2vw, var(--space-8));
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  transition: background var(--transition-interactive);
}
.panel--flat { background: var(--color-surface); }
.panel--bare { background: transparent; box-shadow: inset 0 0 0 1px var(--color-border); }
.panel > * + * { margin-top: var(--space-3); }

/* Corner brackets */
.brk::before, .brk::after {
  content: ''; position: absolute; width: 11px; height: 11px; pointer-events: none;
  transition: border-color var(--transition-interactive);
}
.brk::before { top: 10px; left: 10px; border-top: 1px solid var(--color-border-strong); border-left: 1px solid var(--color-border-strong); }
.brk::after { bottom: 10px; right: 10px; border-bottom: 1px solid var(--color-border-strong); border-right: 1px solid var(--color-border-strong); }
a.panel:hover.brk::before, a.panel:hover.brk::after { border-color: var(--color-primary); }
a.panel { display: block; }
a.panel:hover { background: var(--color-surface-2); }

/* ===================== HEADER ===================== */

.skip {
  position: absolute; top: var(--space-3); left: var(--space-3); z-index: 200;
  background: var(--color-primary); color: #fff; padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm); font-weight: 700; transform: translateY(-200%);
}
.skip:focus { transform: translateY(0); }

.site-head {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  background: color-mix(in oklab, var(--color-bg) 78%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  transition: background 300ms var(--ease-out), border-color 300ms var(--ease-out);
}
.site-head.is-scrolled { background: color-mix(in oklab, var(--color-bg) 92%, transparent); border-bottom-color: var(--color-divider); }
.head-in {
  display: flex; align-items: center; gap: var(--space-6);
  min-height: 74px; padding-inline: var(--gutter);
  max-width: var(--content-wide); margin-inline: auto;
}
.brand { display: flex; align-items: center; flex: none; }
.brand__mark {
  width: clamp(104px, 11vw, 138px); height: 26px;
  background-image: var(--logo-src);
  background-repeat: no-repeat; background-position: left center; background-size: contain;
  transition: opacity var(--transition-interactive);
}
.brand:hover .brand__mark { opacity: 0.78; }

.nav { margin-left: auto; display: flex; align-items: center; gap: clamp(0.5rem, 1.6vw, 1.5rem); }
.nav a {
  position: relative; font-size: var(--text-sm); font-weight: 500;
  color: var(--color-text-muted); padding: var(--space-2) 0;
}
.nav a::after {
  content: ''; position: absolute; left: 0; bottom: -2px; height: 1px; width: 0;
  background: var(--color-primary); transition: width 260ms var(--ease-out);
}
.nav a:hover { color: var(--color-text); }
.nav a:hover::after, .nav a[aria-current='page']::after { width: 100%; }
.nav a[aria-current='page'] { color: var(--color-text); }

.head-tools { display: flex; align-items: center; gap: var(--space-2); flex: none; }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  color: var(--color-text-muted); box-shadow: inset 0 0 0 1px var(--color-border);
}
.icon-btn:hover { color: var(--color-text); background: var(--color-surface-2); box-shadow: inset 0 0 0 1px var(--color-border-strong); }
.head-phone {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.06em;
  padding: 0.7rem 1rem; min-height: 44px;
  color: var(--color-text); box-shadow: inset 0 0 0 1px var(--color-border-strong);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.head-phone:hover { background: var(--color-primary); color: #fff; box-shadow: none; }
.nav-toggle { display: none; }
:root { --phone-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 1.9.7 2.8a2 2 0 0 1-.5 2.1L8.1 9.9a16 16 0 0 0 6 6l1.3-1.2a2 2 0 0 1 2.1-.5c.9.3 1.8.6 2.8.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E"); }

@media (max-width: 940px) {
  .nav {
    position: fixed; inset: 74px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--color-bg); border-bottom: 1px solid var(--color-border);
    padding: var(--space-4) var(--gutter) var(--space-8);
    clip-path: inset(0 0 100% 0); transition: clip-path 340ms var(--ease-out);
  }
  body.nav-open .nav { clip-path: inset(0 0 0 0); }
  .nav a { padding: var(--space-4) 0; border-bottom: 1px solid var(--color-divider); font-size: var(--text-lg); }
  .nav a::after { display: none; }
  .nav-toggle { display: grid; }
  .head-phone span:last-child { display: none; }
  .head-phone { width: 44px; padding: 0; justify-content: center; }
  .head-phone::before {
    content: ''; width: 18px; height: 18px; background: currentColor;
    -webkit-mask: var(--phone-icon) center / contain no-repeat;
    mask: var(--phone-icon) center / contain no-repeat;
  }
  .head-in { gap: var(--space-3); }
  .head-tools { margin-left: auto; }
}

/* ===================== HERO ===================== */

.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.hero__scrim { position: absolute; inset: 0; z-index: -1; background: var(--hero-scrim); }
.hero__grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--color-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--color-grid) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 20%, transparent 78%);
  animation: grid-drift 26s linear infinite;
}
@keyframes grid-drift { to { background-position: 96px 96px; } }

.hero__in {
  max-width: var(--content-wide); margin-inline: auto; padding-inline: var(--gutter);
  padding-top: clamp(var(--space-16), 12vh, var(--space-32));
  padding-bottom: var(--space-10);
  min-height: min(92vh, 900px);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.hero h1 {
  font-family: var(--font-display); font-size: var(--text-hero); font-weight: 500;
  letter-spacing: -0.045em; line-height: 0.94; margin-top: var(--space-6);
  max-width: 19ch;
}
.hero h1 .ln { display: block; overflow: hidden; }
.hero h1 .ln > span {
  display: block;
  animation: line-rise 1s var(--ease-out) both;
  animation-delay: calc(var(--i) * 110ms + 120ms);
}
@keyframes line-rise { from { transform: translateY(105%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.hero h1 em { font-style: normal; color: var(--color-link); }
.hero__lead { margin-top: var(--space-6); font-size: var(--text-lg); color: var(--color-text-muted); max-width: 54ch; animation: fade-up 900ms var(--ease-out) 520ms both; }
.hero .btn-row { margin-top: var(--space-8); animation: fade-up 900ms var(--ease-out) 660ms both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.hero__eyebrow { animation: fade-up 800ms var(--ease-out) 60ms both; flex-wrap: wrap; }
.hero__eyebrow > span { white-space: nowrap; }

/* Hero stat strip */
.strip {
  border-top: 1px solid var(--color-border);
  display: grid; grid-template-columns: repeat(4, 1fr);
  animation: fade-up 900ms var(--ease-out) 800ms both;
  margin-top: clamp(var(--space-10), 7vh, var(--space-20));
}
.strip__cell { padding: var(--space-5) var(--space-4) var(--space-2) 0; border-left: 1px solid var(--color-border); padding-left: var(--space-4); }
.strip__cell:first-child { border-left: 0; padding-left: 0; }
.strip__k { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.strip__v { font-family: var(--font-mono); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.12em; color: var(--color-text-faint); margin-top: var(--space-1); }
@media (max-width: 780px) {
  .strip { grid-template-columns: 1fr 1fr; }
  .strip__cell:nth-child(3) { border-left: 0; padding-left: 0; }
  .strip__cell:nth-child(3), .strip__cell:nth-child(4) { border-top: 1px solid var(--color-border); }
}

/* Page hero (interior) */
.phero { position: relative; padding-top: clamp(var(--space-16), 10vw, var(--space-24)); padding-bottom: clamp(var(--space-10), 5vw, var(--space-16)); overflow: hidden; }
.phero::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--color-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--color-grid) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
  opacity: 0.7;
}
.phero h1 { font-family: var(--font-display); font-size: var(--text-3xl); letter-spacing: -0.04em; margin-top: var(--space-5); max-width: 24ch; }
.phero .lead { margin-top: var(--space-6); }

/* ===================== MARQUEE ===================== */

.marquee {
  border-block: 1px solid var(--color-divider);
  overflow: hidden; padding-block: var(--space-4);
  background: var(--color-bg-deep);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: slide 52s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
.marquee__item {
  display: inline-flex; align-items: center; gap: var(--space-6);
  padding-inline: var(--space-6);
  font-family: var(--font-mono); font-size: var(--text-xs);
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--color-text-faint);
  white-space: nowrap;
}
.marquee__item::after { content: ''; width: 5px; height: 5px; background: var(--color-primary); rotate: 45deg; flex: none; }

/* ===================== SCROLL REVEALS ===================== */

.rv { opacity: 1; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .rv {
      opacity: 0;
      animation: rv-fade linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 62%;
    }
    .rv--wipe {
      opacity: 1;
      clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
      animation: rv-wipe linear both;
      animation-timeline: view();
      animation-range: entry 4% entry 55%;
    }
  }
}
@keyframes rv-fade { to { opacity: 1; } }
@keyframes rv-wipe { to { clip-path: polygon(0 0, 130% 0, 100% 100%, 0 100%); } }

/* ===================== SPINE (scroll rail) ===================== */

.spine {
  position: fixed; left: 26px; top: 50%; translate: 0 -50%; z-index: 60;
  display: none; flex-direction: column; gap: 14px; align-items: flex-start;
}
@media (min-width: 1240px) { .spine { display: flex; } }
.spine__tick {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  color: var(--color-text-faint); text-transform: uppercase;
}
.spine__tick i {
  display: block; width: 14px; height: 1px; background: var(--color-border-strong);
  transition: width 300ms var(--ease-out), background 300ms var(--ease-out);
}
.spine__tick span { opacity: 0; transform: translateX(-6px); transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out); }
.spine__tick:hover span, .spine__tick.is-active span { opacity: 1; transform: translateX(0); }
.spine__tick.is-active i { width: 30px; background: var(--color-primary); }
.spine__tick.is-active { color: var(--color-text); }

/* ===================== LAYOUT BLOCKS ===================== */

/* Sticky-heading + list */
.split {
  display: grid; gap: clamp(var(--space-8), 5vw, var(--space-20));
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: start;
}
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.split__stick { position: sticky; top: 110px; }
@media (max-width: 900px) { .split__stick { position: static; } }

/* Numbered problem/step rows */
.rows { border-top: 1px solid var(--color-divider); }
.rows__row {
  display: grid; grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: var(--space-5); padding-block: clamp(var(--space-6), 3vw, var(--space-8));
  border-bottom: 1px solid var(--color-divider);
  transition: background var(--transition-interactive);
}
.rows__row:hover { background: color-mix(in oklab, var(--color-surface) 60%, transparent); }
.rows__n { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-primary); letter-spacing: 0.12em; padding-top: 0.35em; }
.rows__row h3 { font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.01em; }
.rows__row p { margin-top: var(--space-3); color: var(--color-text-muted); font-size: var(--text-base); }
@media (max-width: 560px) { .rows__row { grid-template-columns: 1fr; gap: var(--space-2); } }

/* Asymmetric card mosaic */
.mosaic { display: grid; gap: var(--space-3); grid-template-columns: repeat(6, 1fr); }
.mosaic > * { grid-column: span 2; }
.mosaic > .is-wide { grid-column: span 3; }
.mosaic > .is-full { grid-column: span 6; }
@media (max-width: 900px) { .mosaic > *, .mosaic > .is-wide { grid-column: span 3; } }
@media (max-width: 620px) { .mosaic { grid-template-columns: 1fr; } .mosaic > *, .mosaic > .is-wide, .mosaic > .is-full { grid-column: span 1; } }

/* Feature split with image */
.feature { display: grid; gap: clamp(var(--space-8), 5vw, var(--space-16)); align-items: center; grid-template-columns: 1fr 1fr; }
.feature--flip .feature__media { order: 2; }
@media (max-width: 900px) { .feature { grid-template-columns: 1fr; } .feature--flip .feature__media { order: 0; } }
.feature__media { position: relative; }
.feature__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.feature__tag {
  position: absolute; bottom: 0; left: 0;
  background: var(--color-primary); color: #fff;
  font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: var(--space-2) var(--space-4);
}
.ticklist { list-style: none; margin-top: var(--space-6); display: grid; gap: var(--space-3); }
.ticklist li { display: grid; grid-template-columns: 1rem 1fr; gap: var(--space-3); color: var(--color-text-muted); font-size: var(--text-base); }
.ticklist li::before { content: ''; width: 7px; height: 7px; background: var(--color-primary); rotate: 45deg; margin-top: 0.55em; }

/* Full-bleed band with image */
.bleed { position: relative; isolation: isolate; overflow: hidden; }
.bleed__media { position: absolute; inset: 0; z-index: -2; }
.bleed__media img { width: 100%; height: 100%; object-fit: cover; }
.bleed__scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, color-mix(in oklab, var(--color-bg) 92%, transparent) 0%, color-mix(in oklab, var(--color-bg) 72%, transparent) 55%, color-mix(in oklab, var(--color-bg) 30%, transparent) 100%); }

/* Pull quote */
.quote { border-left: 2px solid var(--color-primary); padding-left: clamp(var(--space-5), 3vw, var(--space-10)); }
.quote blockquote { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 500; letter-spacing: -0.02em; line-height: 1.24; max-width: 30ch; }
.quote figcaption { margin-top: var(--space-5); font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-text-faint); }

/* ===================== CALCULATOR ===================== */

.calc { display: grid; gap: clamp(var(--space-8), 4vw, var(--space-12)); grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; }
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; } }
.calc__controls { display: grid; gap: var(--space-8); }
.ctrl label { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); font-family: var(--font-mono); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.13em; color: var(--color-text-faint); }
.ctrl output { font-family: var(--font-display); font-size: var(--text-lg); color: var(--color-text); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ctrl input[type='range'] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 34px;
  margin-top: var(--space-2); background: transparent; cursor: grab;
}
.ctrl input[type='range']:active { cursor: grabbing; }
.ctrl input[type='range']::-webkit-slider-runnable-track { height: 2px; background: var(--color-border-strong); }
.ctrl input[type='range']::-moz-range-track { height: 2px; background: var(--color-border-strong); }
.ctrl input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; margin-top: -7px;
  background: var(--color-primary); rotate: 45deg;
  transition: box-shadow var(--transition-interactive);
}
.ctrl input[type='range']::-moz-range-thumb { width: 16px; height: 16px; border: 0; background: var(--color-primary); rotate: 45deg; }
.ctrl input[type='range']:hover::-webkit-slider-thumb { box-shadow: 0 0 0 6px color-mix(in oklab, var(--color-primary) 26%, transparent); }
.ctrl input[type='range']:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 6px color-mix(in oklab, var(--color-primary) 40%, transparent); }
.ctrl__hint { font-size: var(--text-xs); color: var(--color-text-faint); margin-top: var(--space-1); }

.compare { display: grid; gap: var(--space-3); grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .compare { grid-template-columns: 1fr; } }
.compare__col { padding: clamp(var(--space-5), 2.4vw, var(--space-6)); background: var(--color-surface); clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px)); }
.compare__col--tgps { background: color-mix(in oklab, var(--color-primary) 15%, var(--color-surface)); }
.compare__hd { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-text-faint); padding-bottom: var(--space-4); border-bottom: 1px solid var(--color-divider); }
.compare__col--tgps .compare__hd { color: var(--color-link); }
.metric { padding-block: var(--space-4); border-bottom: 1px solid var(--color-divider); }
.metric:last-child { border-bottom: 0; padding-bottom: 0; }
.metric__v { font-family: var(--font-display); font-size: var(--text-xl); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.metric__l { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: var(--space-2); font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.compare__col--tgps .metric__v { color: var(--color-link); }

/* ===================== AREAS ===================== */

.areas { display: grid; gap: 1px; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--color-divider); border: 1px solid var(--color-divider); }
@media (max-width: 720px) { .areas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .areas { grid-template-columns: 1fr; } }
.areas__cell { background: var(--color-bg); padding: var(--space-6); transition: background var(--transition-interactive); display: flex; flex-direction: column; }
@media (min-width: 721px) { .areas__cell h3 { min-height: 2.6em; } }
.areas__cell:hover { background: var(--color-surface); }
.areas__cell h3 { font-size: var(--text-base); font-weight: 700; }
.areas__cell p { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-2); }
.areas__cell .idx { display: block; margin-bottom: var(--space-4); }

/* ===================== FAQ ===================== */

.faq { border-top: 1px solid var(--color-divider); }
.faq details { border-bottom: 1px solid var(--color-divider); }
.faq summary {
  list-style: none; cursor: pointer; padding-block: var(--space-6);
  display: grid; grid-template-columns: 1fr 1.5rem; gap: var(--space-4); align-items: center;
  font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.01em;
  transition: color var(--transition-interactive);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--color-link); }
.faq summary::after {
  content: ''; justify-self: end; width: 12px; height: 12px;
  border-right: 1px solid currentColor; border-bottom: 1px solid currentColor;
  rotate: 45deg; transition: rotate 280ms var(--ease-out);
}
.faq details[open] summary::after { rotate: 225deg; }
.faq details p { padding-bottom: var(--space-6); color: var(--color-text-muted); max-width: 68ch; }
.faq details[open] p { animation: fade-up 340ms var(--ease-out) both; }

/* ===================== FORM ===================== */

.form { display: grid; gap: var(--space-5); }
.form__grid { display: grid; gap: var(--space-5); grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form__grid { grid-template-columns: 1fr; } }
.field { display: grid; gap: var(--space-2); }
.field > span { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.13em; text-transform: uppercase; color: var(--color-text-faint); }
.field input, .field select, .field textarea {
  background: var(--color-surface); border: 1px solid var(--color-border);
  padding: 0.85rem 1rem; min-height: 48px; font-size: var(--text-base); color: var(--color-text);
  border-radius: 0;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--color-primary); outline: none; box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-primary) 22%, transparent); }
.field input::placeholder, .field textarea::placeholder { color: var(--color-text-faint); }

/* ===================== FOOTER ===================== */

.site-foot { border-top: 1px solid var(--color-border); background: var(--color-bg-deep); padding-block: clamp(var(--space-12), 6vw, var(--space-20)) var(--space-8); }
.foot-grid { display: grid; gap: clamp(var(--space-8), 4vw, var(--space-12)); grid-template-columns: 1.6fr 1fr 1fr 1.2fr; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-h { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-text-faint); margin-bottom: var(--space-4); }
.foot-list { list-style: none; display: grid; gap: var(--space-3); }
.foot-list a, .foot-list span { font-size: var(--text-sm); color: var(--color-text-muted); }
.foot-list a:hover { color: var(--color-link); }
.foot__mark { width: 132px; height: 26px; background-image: var(--logo-src); background-repeat: no-repeat; background-position: left center; background-size: contain; }
.foot-base { margin-top: clamp(var(--space-10), 5vw, var(--space-16)); padding-top: var(--space-6); border-top: 1px solid var(--color-divider); display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-8); justify-content: space-between; align-items: center; }
.foot-base p, .foot-base a { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.08em; color: var(--color-text-faint); }
.foot-base a:hover { color: var(--color-link); }

/* ===================== CTA ===================== */

.cta { position: relative; overflow: hidden; background: var(--color-bg-deep); }
.cta::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--color-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--color-grid) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 90% at 85% 50%, #000, transparent 70%);
}
.cta__in { position: relative; display: grid; gap: var(--space-8); grid-template-columns: 1.4fr auto; align-items: center; }
@media (max-width: 820px) { .cta__in { grid-template-columns: 1fr; } }
.cta h2 { font-family: var(--font-display); font-size: var(--text-2xl); letter-spacing: -0.035em; max-width: 22ch; }

/* ===================== PAGE TRANSITIONS ===================== */

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 180ms cubic-bezier(0.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vt-in 320ms cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; clip-path: inset(0 0 6% 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }

/* Utility */
.stack > * + * { margin-top: var(--space-5); }
.stack-sm > * + * { margin-top: var(--space-3); }
.mt-8 { margin-top: var(--space-8); }
.mt-6 { margin-top: var(--space-6); }
.mt-10 { margin-top: var(--space-10); }
.mt-16 { margin-top: clamp(var(--space-10), 5vw, var(--space-16)); }
.center-narrow { max-width: 46ch; }
.tnum { font-variant-numeric: tabular-nums; }

/* ===================== CROSSHAIR READOUT ===================== */


/* ===================== VEHICLE MORPH HERO ===================== */

.vhero { position: relative; }
.vhero__track { height: 300vh; }

.vhero__stage {
  position: sticky; top: var(--head-h);
  height: calc(100svh - var(--head-h)); min-height: 560px;
  overflow: hidden; isolation: isolate;
  display: grid; grid-template-rows: auto 1fr auto;
  padding-top: clamp(var(--space-6), 5vh, var(--space-12));
}
.vhero__bg {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 130% 62% at 50% 104%, color-mix(in oklab, var(--color-primary) 20%, transparent) 0%, transparent 66%),
    var(--color-bg-deep);
}
.vhero__grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--color-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--color-grid) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(ellipse 78% 62% at 50% 34%, #000 18%, transparent 76%);
  animation: grid-drift 26s linear infinite;
}

.vhero__copy {
  width: 100%; max-width: var(--content-wide);
  margin-inline: auto; padding-inline: var(--gutter);
}
.vhero__copy h1 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2.25rem, 0.9rem + 4.2vw, 4.5rem);
  letter-spacing: -0.045em; line-height: 0.96;
  margin-top: var(--space-5); max-width: 21ch;
}
.vhero__copy h1 em { font-style: normal; color: var(--color-link); }
.vhero__copy .hero__lead { max-width: 52ch; }
.vhero__eyebrow { flex-wrap: wrap; }
.vhero__eyebrow > span { white-space: nowrap; }

/* --- road + vehicles --- */
.vhero__road {
  position: relative; align-self: end;
  width: 100%; max-width: var(--content-wide); margin-inline: auto;
  padding-inline: var(--gutter);
}
.vhero__frames { position: relative; height: min(250px, 28vh); }
.vhero__veh {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; object-position: 50% 100%;
  opacity: 0; will-change: opacity, transform;
}
.vhero__veh:first-child { opacity: 1; }
.vhero__line { position: relative; height: 1px; background: var(--color-border-strong); }
.vhero__line::after {
  content: ''; position: absolute; left: 0; right: 0; top: 9px; height: 2px;
  background: repeating-linear-gradient(to right, var(--color-link) 0 40px, transparent 40px 100px);
  opacity: 0.45;
  mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
  animation: road-run 780ms linear infinite;
}
@keyframes road-run { to { background-position: -100px 0; } }

/* --- labels + progress --- */
.vhero__meta {
  width: 100%; max-width: var(--content-wide);
  margin-inline: auto; padding: var(--space-6) var(--gutter) var(--space-4);
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-8);
}
.vlabels { display: grid; }
.vlabel {
  grid-area: 1 / 1; display: grid; gap: var(--space-2);
  opacity: 0; transform: translateY(12px);
  transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out);
}
.vlabel.is-on { opacity: 1; transform: none; }
.vlabel__k {
  font-family: var(--font-mono); font-size: var(--text-xs);
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--color-link);
}
.vlabel__t { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 500; letter-spacing: -0.03em; line-height: 1; }
.vlabel__d { font-size: var(--text-sm); color: var(--color-text-muted); max-width: 42ch; }

.vprog { display: flex; gap: 6px; flex-shrink: 0; padding-bottom: var(--space-2); }
.vprog i { display: block; width: 32px; height: 2px; background: var(--color-border-strong); transition: background 300ms var(--ease-out); }
.vprog i.is-on { background: var(--color-primary-hover); }

@media (max-width: 900px) {
  .vhero__track { height: 260vh; }
  .vhero__road { max-width: none; padding-inline: var(--space-4); }
  .vhero__meta { flex-direction: column; align-items: flex-start; gap: var(--space-4); padding-bottom: var(--space-6); }
  .vprog { padding-bottom: 0; }
}
@media (max-width: 700px) {
  .vhero__stage { padding-top: var(--space-6); }
  .vhero__frames { height: min(190px, 23vh); }
  .vhero__meta { padding-top: var(--space-5); }
}
@media (max-width: 560px) {
  .vhero__stage { min-height: 520px; }
  .vhero__copy h1 { font-size: clamp(2rem, 8.4vw, 2.75rem); }
  .vlabel__d { display: none; }
}

/* No-scrub fallback: reduced motion or no JS */
.vhero.is-static .vhero__track { height: auto; }
.vhero.is-static .vhero__stage { position: static; height: auto; min-height: 0; padding-bottom: 0; }
.vhero.is-static .vhero__veh { position: static; opacity: 1; }
.vhero.is-static .vhero__frames { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); aspect-ratio: auto; }
.vhero.is-static .vlabel { opacity: 1; transform: none; }
.vhero.is-static .vlabels { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-8); }
.vhero.is-static .vlabel { grid-area: auto; }
.vhero.is-static .vprog { display: none; }
.vhero.is-static .vhero__meta { flex-direction: column; align-items: stretch; }
@media (max-width: 700px) {
  .vhero.is-static .vhero__frames,
  .vhero.is-static .vlabels { grid-template-columns: 1fr; }
}

/* ---------- Form validation states ---------- */
.field.is-invalid input,
.field.is-invalid textarea,
.field.is-invalid select { border-color: var(--color-error, #d163a7); box-shadow: inset 0 -2px 0 var(--color-error, #d163a7); }
.field.is-invalid > span { color: var(--color-error, #d163a7); }
.ctrl__hint.is-error { color: var(--color-error, #d163a7); }
.ctrl__hint.is-ok {
  color: var(--color-text);
  font-weight: 600;
  border-left: 2px solid var(--color-primary);
  padding-left: 0.85rem;
}
@media (max-width: 560px) { .hero__metros { display: none; } }

.band .strip { margin-top: 0; animation: none; }

/* ===========================================================
   CITIES — Texas skyline grid
   =========================================================== */
.cities {
  display: grid; gap: var(--space-8);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.city { margin: 0; position: relative; }
.city img {
  display: block; width: 100%; aspect-ratio: 16 / 9;
  object-fit: cover;
  clip-path: polygon(var(--chamfer-lg) 0, 100% 0, 100% calc(100% - var(--chamfer-lg)), calc(100% - var(--chamfer-lg)) 100%, 0 100%, 0 var(--chamfer-lg));
  filter: saturate(1.02);
}
.city figcaption {
  display: grid; gap: var(--space-1);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-5);
}
.city__n {
  font-family: var(--font-display); font-weight: 500;
  font-size: var(--text-lg); letter-spacing: -0.025em; line-height: 1.1;
}
.city__d { font-size: var(--text-sm); color: var(--color-text-muted); }

@media (max-width: 720px) {
  .cities { grid-template-columns: 1fr; gap: var(--space-10); }
}

/* ===========================================================
   ASKBOX — "anything property related"
   =========================================================== */
.askbox {
  display: grid; gap: var(--space-12);
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  align-items: start;
}
.askbox__act {
  display: grid; gap: var(--space-4);
  padding: var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  clip-path: polygon(var(--chamfer-lg) 0, 100% 0, 100% calc(100% - var(--chamfer-lg)), calc(100% - var(--chamfer-lg)) 100%, 0 100%, 0 var(--chamfer-lg));
}
.askbox__k {
  font-family: var(--font-mono); font-size: var(--text-xs);
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--color-link); margin-bottom: var(--space-2);
}
.askbox__act .btn { width: 100%; justify-content: space-between; }
.askbox__note { font-size: var(--text-sm); margin-top: var(--space-2); }

@media (max-width: 900px) {
  .askbox { grid-template-columns: 1fr; gap: var(--space-10); }
}
