/* ════════════════════════════════════════════════════════════════════
   AnySignal homepage — composition, type and motion.
   Tokens, footer and glass refraction come from webui/common.css; this
   file owns the homepage layout. Everything is scoped under body.home.
   ════════════════════════════════════════════════════════════════════ */

.home {
  --wrap: 1360px;
  --gutter: clamp(20px, 4.2vw, 64px);
  --sec-space: clamp(104px, 11vw, 176px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --ink: #F2F5F3;
  --ink-2: #CFD6D2;
  --ink-3: #A3ADA8;
  --ink-4: #75807B;
  --line: rgba(220, 235, 228, 0.11);
  --line-2: rgba(220, 235, 228, 0.2);
  --void: #060809;
  --ground: #0B0E11; /* page ground: one step up from the void */
  --panel: #12171B;

  --emerald: #0F7A51;
  --emerald-hover: #11875A;
  --emerald-edge: rgba(43, 217, 143, 0.5);
  --on-emerald: #F2FFF8;

  background: var(--ground);
  color: var(--ink);
  font-kerning: normal;
  font-optical-sizing: auto;
  font-variant-ligatures: common-ligatures;
  font-synthesis: none;
  overflow-x: clip;
}

/* Film grain: a static, fixed noise layer. It is composited once, so it
   costs nothing while scrolling, and it gives the dark ground texture. */
.home::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 -0.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.home ::selection { background: var(--accent); color: #03130B; }

/* common.css scaffolding we don't want on this page. :where() keeps these
   resets at zero specificity so every component rule below wins. */
html body.home section { padding: 0; overflow: visible; max-width: none; }
html body.home section::after { display: none; }
.home :where(h1, h2, h3) { font-weight: 400; color: var(--ink); margin: 0; }
.home :where(p, figure, blockquote) { margin: 0; }
.home :where(ul) { list-style: none; margin: 0; padding: 0; }

html.lenis, html.lenis body { height: auto; }
html.lenis.lenis-smooth { scroll-behavior: auto !important; }
html.lenis.lenis-stopped { overflow: clip; }

.wrap {
  width: min(var(--wrap), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  padding: 10px 14px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--void);
  font: 500 14px/1 var(--font-sans);
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease);
}
.skip-link:focus-visible { transform: none; }

.home :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }


/* ── Buttons ─────────────────────────────────────────────────────────
   One geometry: 4px corners, sans 15/500 labels, 48px (36px small).
   Primary = dark emerald, ghost = hairline outline. */
.home .button {
  --h: 48px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--h);
  padding: 0 20px;
  border-radius: 4px;
  border: 1px solid transparent;
  font: 500 15px/1 var(--font-sans);
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    color 0.25s var(--ease),
    transform 0.2s var(--ease);
}

.home .button:active { transform: translateY(1px); }

.home .button--primary {
  background: var(--emerald);
  border-color: var(--emerald-edge);
  color: var(--on-emerald);
}
.home .button--primary:hover {
  background: var(--emerald-hover);
  border-color: var(--accent);
  color: #fff;
}

.home .button--ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(242, 245, 243, 0.26);
  color: var(--ink);
}
.home .button--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(242, 245, 243, 0.5);
}

.home .button--sm {
  --h: 36px;
  padding: 0 14px;
  font-size: 14px;
}

.home .button-icon {
  width: 14px;
  height: 14px;
  margin-right: -2px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.35s var(--ease);
}
.home .button:hover .button-icon { transform: translateX(3px); }


/* ── Navigation ──────────────────────────────────────────────────────
   Floating glass bar. Hides on scroll down, returns on scroll up, and
   darkens once it sits over content instead of film. */
.home .site-nav {
  position: fixed;
  top: 12px;
  left: 0;
  right: 0;
  z-index: 120;
  width: min(calc(var(--wrap) + 32px), calc(100% - 24px));
  height: 60px;
  margin-inline: auto;
  padding: 0 12px 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-radius: 12px;
  transition:
    transform 0.7s var(--ease),
    background-color 0.5s var(--ease),
    border-color 0.5s var(--ease);
}

html body.home.past-hero nav.site-nav {
  background-color: rgba(16, 21, 25, 0.62);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 10px 32px rgba(0, 0, 0, 0.28);
}
.home.nav-hidden .site-nav { transform: translate3d(0, calc(-100% - 16px), 0); }

.home .nav-logo img { height: 18px; width: auto; display: block; }

.home .nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.home .nav-links a {
  position: relative;
  padding: 8px 12px;
  border-radius: 6px;
  font: 400 14px/1 var(--font-sans);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-2);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.home .nav-links a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.home .nav-links a[aria-current="true"] { color: var(--ink); }
.home .nav-links a[aria-current="true"]::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 3px;
  height: 3px;
  margin-left: -1.5px;
  border-radius: 50%;
  background: var(--accent);
}

.home .nav-end { display: flex; align-items: center; gap: 8px; }

.home .menu-toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.home .menu-toggle span {
  position: absolute;
  left: 11px;
  width: 18px;
  height: 1.5px;
  border-radius: 1px;
  background: var(--ink);
  transition: transform 0.45s var(--ease), top 0.45s var(--ease);
}
.home .menu-toggle span:first-child { top: 15px; }
.home .menu-toggle span:last-child { top: 23px; }
.home.menu-open .menu-toggle span:first-child { top: 19px; transform: rotate(45deg); }
.home.menu-open .menu-toggle span:last-child { top: 19px; transform: rotate(-45deg); }

.menu-sheet {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  padding: 96px var(--gutter) calc(40px + env(safe-area-inset-bottom));
  background: rgba(4, 5, 7, 0.94);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.menu-sheet[hidden] { display: none; }
.menu-open .menu-sheet { opacity: 1; }
.menu-sheet > a:not(.button) {
  font: 400 clamp(32px, 9vw, 44px)/1.15 var(--font-sans);
  letter-spacing: -0.03em;
  color: var(--ink);
  padding: 6px 0;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--i, 0) * 50ms + 60ms);
}
.menu-sheet > .button { margin-top: 32px; width: 100%; opacity: 0; transition: opacity 0.6s var(--ease) 0.35s; }
.menu-open .menu-sheet > a { opacity: 1; transform: none; }


/* ── Hero ───────────────────────────────────────────────────────────── */
.hero-x {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100vh;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  background: var(--ground);
}

.hero-x-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  transform-origin: 50% 35%;
  will-change: transform;
}

.hero-x-film {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--void) url('./assets/posters/hero.webp') center / cover no-repeat;
}

.hero-x-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(6, 8, 9, 0.42) 0%, rgba(6, 8, 9, 0) 16%),
    linear-gradient(180deg, rgba(11, 14, 17, 0) 52%, rgba(11, 14, 17, 0.42) 80%, var(--ground) 100%),
    radial-gradient(72% 55% at 28% 70%, rgba(6, 8, 9, 0.62), rgba(6, 8, 9, 0) 72%),
    linear-gradient(90deg, rgba(6, 8, 9, 0.48) 0%, rgba(6, 8, 9, 0) 45%);
}

.hero-x-inner { padding-bottom: clamp(40px, 6.5vh, 80px); will-change: transform, opacity; }

.hero-x-title {
  font-size: clamp(2.875rem, 7.3vw, 7.5rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
  max-width: 20ch;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.3);
  text-wrap: balance;
}

.hero-x-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px 48px;
  margin-top: clamp(32px, 5vh, 56px);
}

.hero-x-lede {
  max-width: 40ch;
  font-size: clamp(1.0625rem, 1.25vw, 1.25rem);
  line-height: 1.5;
  color: rgba(242, 245, 243, 0.86);
}

.hero-x-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-x-actions .button--ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.3);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.hero-x-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0 22px;
  border-top: 1px solid rgba(242, 245, 243, 0.14);
}

.hero-x-hud .telemetry {
  gap: 8px 32px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(242, 245, 243, 0.6);
}
.hero-x-hud .telemetry-item b { color: rgba(242, 245, 243, 0.9); font-variant-numeric: tabular-nums; }
.hero-x-hud .status-dot { margin-right: 4px; }

/* Load-in for hero satellites (title uses the line splitter) */
.js .rise { animation: rise 1.3s var(--ease) var(--d, 0ms) both; }
@keyframes rise {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to { opacity: 1; transform: none; }
}


/* ── Logos ──────────────────────────────────────────────────────────── */
html body.home .logos-x { padding-top: clamp(56px, 7vw, 96px); }

.logos-x-label {
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-3);
  text-align: center;
  margin-bottom: 36px;
}

.logos-x-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px clamp(24px, 4vw, 64px);
  padding-inline: clamp(0px, 4vw, 64px);
}
.logos-x-row img {
  display: block;
  height: 44px;
  width: auto;
  opacity: 0.7;
  transition: opacity 0.4s var(--ease);
}
.logos-x-row li:hover img { opacity: 1; }


/* ── Section scaffolding ────────────────────────────────────────────── */
html body.home .sec { padding-top: var(--sec-space); }
/* Breathing room before the domains dot field fades in */
html body.home #capabilities { padding-bottom: clamp(72px, 9vw, 144px); }

.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: end;
  gap: 34px 64px;
  margin-bottom: clamp(56px, 6.5vw, 100px);
}
.sec-head > .eyebrow { grid-column: 1 / -1; }
.sec-head > .sec-title { grid-column: 1 / -1; }
.sec-head:has(> .sec-lede) > .sec-title { grid-column: 1; }
.sec-head > .sec-lede { grid-column: 2; justify-self: end; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  line-height: 1;
  color: var(--ink-3);
}
.eyebrow-idx {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font: 400 12px/1 var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--accent);
}
.eyebrow-idx::after {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--line-2);
}

.sec-title {
  font-size: clamp(2.5rem, 5.2vw, 4.875rem);
  line-height: 1.05;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

.sec-lede {
  max-width: 38ch;
  font-size: clamp(1.0625rem, 1.25vw, 1.25rem);
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}


/* ── 01 Capabilities — expanding film rail ──────────────────────────── */
.cap-rail {
  display: flex;
  gap: 12px;
  height: clamp(480px, 68vh, 680px);
}

.cap {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  border-radius: 4px;
  background: var(--panel);
}
.cap, .plat, .proof-media {
  outline: 1px solid rgba(255, 255, 255, 0.09);
  outline-offset: -1px;
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 48px -24px rgba(0, 0, 0, 0.6);
}
.cap:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.cap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
  transform: scale(1.04);
  transition: opacity 0.8s var(--ease), transform 1.6s var(--ease), filter 0.8s var(--ease);
}
.cap:hover video, .cap:focus-visible video { opacity: 1; transform: scale(1); }

.cap::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 5, 7, 0.25) 0%, rgba(4, 5, 7, 0) 22%, rgba(4, 5, 7, 0) 52%, rgba(4, 5, 7, 0.82) 100%);
}

.cap-body {
  position: absolute;
  inset: 24px 24px 26px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.cap-idx {
  position: absolute;
  top: 0;
  left: 0;
  font: 400 12px/1 var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--accent);
}
.cap h3 {
  font-size: clamp(1.375rem, 1.7vw, 1.625rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.cap p {
  width: min(250px, 100%);
  height: 6em; /* four lines reserved, so every title sits on the same baseline */
  font-size: 16px;
  line-height: 1.5;
  color: rgba(242, 245, 243, 0.8);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}
@media (hover: hover) {
  /* Cards never resize; hover brings one clip to life and quiets the rest. */
  .cap-rail:hover .cap:not(:hover) video { opacity: 0.5; }
  .cap-rail:hover .cap:not(:hover) :is(h3, p) { color: rgba(242, 245, 243, 0.62); }
  .cap h3, .cap p { transition: color 0.5s var(--ease); }
}


/* ── 002 Domains — film accordion (common.css .accordion) ───────────── */
html body.home .domains { position: relative; overflow: hidden; padding-bottom: clamp(96px, 11vw, 168px); }
.domains .dither-bg.dither-ready { opacity: 0.15; }
.domains .dither-bg {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
}
.domains > .wrap { position: relative; z-index: 2; }
.home .domains-accordion {
  height: clamp(480px, 62vh, 600px);
  margin-top: 0;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--panel);
}
.home .accordion-tab {
  flex-basis: 72px;
  background: var(--void);
  border-right-color: var(--line-2);
  transition: flex-grow 0.9s var(--ease), flex-basis 0.9s var(--ease), background-color 0.4s var(--ease);
}
.home .accordion-tab:not(.active):hover { background: #0c1013; }
.home .accordion-tab > video { transition: opacity 0.9s var(--ease); }
.home .accordion-tab.active > video { opacity: 1; }
.home .accordion-num { font-size: 12px; color: var(--accent); letter-spacing: 0.04em; padding: 24px 0; }
.home .accordion-label { font-size: 20px; color: var(--ink-2); letter-spacing: -0.01em; }
.home .accordion-content { padding: clamp(24px, 3vw, 40px); }
.home .accordion-content h3 { font-size: clamp(1.75rem, 2.6vw, 2.5rem); letter-spacing: -0.03em; margin-bottom: 12px; }
.home .accordion-content p { font-size: 17px; line-height: 1.5; color: var(--ink-2); max-width: 44ch; }

/* Nothing reflows while a panel opens (ported from codex/webui-refinement
   29a4025, plus label pinning): only flex-grow animates; copy and film are
   laid out at their final width and the opening panel's overflow reveals
   them; the vertical label lives in a fixed 72px rail and only fades. */
@media (min-width: 901px) {
  .home .domains-accordion { container-type: inline-size; }
  .home .domain-tab { flex: 0 0 72px; transition: flex-grow 0.9s var(--ease), background-color 0.4s var(--ease); }
  .home .domain-tab.active { flex: 1 0 72px; }
  .home .domain-tab .accordion-num { position: absolute; top: 0; left: 0; width: 72px; margin: 0; text-align: center; }
  .home .domain-tab .accordion-label,
  .home .domain-tab.active .accordion-label {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 72px;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.35s var(--ease);
  }
  .home .domain-tab.active .accordion-label { opacity: 0; transition-duration: 0.2s; }
  .home .domain-tab.active .accordion-num { opacity: 0; transition: opacity 0.2s; }
  .home .domain-tab .accordion-content { right: auto; width: calc(100cqw - 216px - 1px); }
  .home .domain-tab:last-child .accordion-content { width: calc(100cqw - 216px); }
  .home .domain-tab > video { left: 0; right: auto; width: calc(100cqw - 216px); max-width: none; }
  .home .domain-tab .accordion-content { transform: translate3d(0, 10px, 0); transition: opacity 0.18s linear, transform 0.3s var(--ease); }
  .home .domain-tab.active .accordion-content { transform: none; transition: opacity 0.6s var(--ease) 0.25s, transform 0.9s var(--ease) 0.2s; }
  .home .domain-tab > video { transition: opacity 0.5s var(--ease); }
}

/* ── 003 Platform — image tiles (composition from Rey's MR !17) ────────
   Square tiles; the image fills the tile and the copy sits over a fade to
   black, so the renders' black grounds merge and all three read as equal. */
.plat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.plat {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 4px;
  background: #000;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(22px, 2.2vw, 32px);
}
.plat-media { position: absolute; inset: 0; z-index: -2; margin: 0; }
.plat-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
  transition: opacity 0.8s var(--ease), scale 1.4s var(--ease);
}
.plat:hover .plat-media img { scale: 1.03; }
.plat::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 46%, rgba(0, 0, 0, 0.72) 70%, rgba(0, 0, 0, 0.94) 100%);
}

.plat-cat { font: 400 11px/1 var(--font-mono); letter-spacing: 0.14em; color: var(--accent); margin-bottom: 14px; }
.plat h3 {
  font-size: clamp(1.25rem, 1.7vw, 1.625rem);
  line-height: 1.15;
  letter-spacing: -0.022em;
  margin-bottom: 10px;
  text-wrap: balance;
}
.plat p:not(.plat-cat) {
  max-width: 36ch;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(242, 245, 243, 0.8);
}


/* ── 004 Hardware — pinned stage, products crossfade with scroll ────── */
html body.home .hw { padding-top: var(--sec-space); }
.hw .sec-head { margin-bottom: 0; }

.hw-track { --n: 4; position: relative; height: calc(100vh + var(--n) * 80vh); }

.hw-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hw-frame {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(24px, 4vh, 48px);
  height: min(760px, calc(100vh - 160px));
  margin-top: 40px;
}

.hw-items { position: relative; display: grid; min-height: 0; }

.hw-item {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.6fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  min-height: 0;
}
/* motion.js crossfades .hw-copy / .hw-media continuously with scroll */
.hw-copy, .hw-media { will-change: transform, opacity; }
.js .hw-item:not(:first-child) :is(.hw-copy, .hw-media) { opacity: 0; }
.hw-toggle { display: none; }

.hw-cat { font-size: 14px; color: var(--accent); margin-bottom: 16px; }
.hw-name {
  font-size: clamp(2.5rem, 4.4vw, 4.25rem);
  line-height: 1;
  letter-spacing: -0.035em;
  margin-bottom: clamp(28px, 4vh, 44px);
}
.hw-specs { border-top: 1px solid var(--line-2); max-width: 400px; }
.hw-specs li {
  display: flex;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink-2);
}
.hw-specs li:last-child { border-bottom: 0; }
.hw-specs li::before {
  content: '';
  flex: none;
  width: 5px;
  height: 5px;
  margin-top: 0.55em;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.8;
}

.hw-media {
  position: relative;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* A faint studio pool of light under each product */
.hw-media::before {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  top: 18%;
  bottom: 8%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(170, 200, 188, 0.13), rgba(170, 200, 188, 0));
}

.hw-media img {
  display: block;
  max-width: calc(100% * var(--fit, 1));
  max-height: calc(100% * var(--fit, 1));
  object-fit: contain;
}


.hw-index {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 clamp(12px, 2vw, 32px);
}
.hw-index button {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 16px 0 0;
  border: 0;
  background: none;
  text-align: left;
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.3s var(--ease);
}
.hw-index button:hover, .hw-index button[aria-selected="true"] { color: var(--ink); }
.hw-index-n { font: 400 12px/1 var(--font-mono); letter-spacing: 0.04em; }
.hw-index button[aria-selected="true"] .hw-index-n { color: var(--accent); }
.hw-index-l { font: 400 14px/1.2 var(--font-sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hw-index i {
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--line-2);
  overflow: hidden;
}
.hw-index i::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform-origin: 0 50%;
  transform: scaleX(var(--fill, 0));
}


/* ── 04 Proven ──────────────────────────────────────────────────────── */
.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2.4vw, 40px);
  align-items: start;
}

.proof-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 4px;
  background: var(--panel);
  margin-bottom: 26px;
}
.proof-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  scale: 1.18;
  transition: opacity 0.8s var(--ease), scale 1.6s var(--ease);
}
.proof:hover .proof-media video { opacity: 1; scale: 1.12; }

.proof-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.proof-step span { font: 400 12px/1 var(--font-mono); letter-spacing: 0.04em; color: var(--accent); }
.proof h3 {
  max-width: 24ch;
  font-size: clamp(1.25rem, 1.6vw, 1.5rem);
  line-height: 1.22;
  letter-spacing: -0.018em;
  text-wrap: balance;
}


/* ── 05 Partners ────────────────────────────────────────────────────── */
.quotes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px clamp(32px, 4.5vw, 80px);
}
.quote { display: flex; flex-direction: column; }
.quote-logo {
  height: 22px;
  width: auto;
  align-self: flex-start;
  margin-bottom: 32px;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}
.quote blockquote {
  margin: 0 0 36px;
  font-size: clamp(1.0625rem, 1.2vw, 1.1875rem);
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: rgba(242, 245, 243, 0.86);
  text-wrap: pretty;
  text-indent: -0.42em; /* hang the opening quote into the margin */
}
.quote blockquote::before { content: '“'; }
.quote blockquote::after { content: '”'; }
.quote figcaption {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.quote figcaption strong { font-size: 15px; font-weight: 500; color: var(--ink); }
.quote figcaption span { font-size: 14px; color: var(--ink-3); }


/* ── 06 Contact ─────────────────────────────────────────────────────── */
html body.home .contact { padding-bottom: var(--sec-space); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px clamp(48px, 7vw, 120px);
  align-items: start;
}
.contact-head .eyebrow { margin-bottom: 28px; }
.contact-head .sec-lede { margin-top: 28px; }
.contact-mail { margin-top: 20px; font-size: 15px; color: var(--ink-3); }
.contact-mail a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.3s var(--ease);
}
.contact-mail a:hover { text-decoration-color: var(--accent); }

/* These rules double as the style source HubSpot's iframe copies from. */
html body.home .cta-form { max-width: none; margin: 0; }
html body.home .cta-form input,
html body.home .cta-form textarea {
  background-color: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(220, 235, 228, 0.15);
  border-radius: 4px;
  padding: 14px 16px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
}
html body.home .cta-form .cta-submit {
  background-color: var(--emerald);
  color: var(--on-emerald);
  border: 1px solid var(--emerald-edge);
  border-radius: 4px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  text-transform: none;
  text-shadow: none;
}
.hs-cta-form { display: block; min-height: 300px; }
.recaptcha-note { margin-top: 18px; font-size: 12px; line-height: 1.5; color: var(--ink-4); max-width: 52ch; }
.recaptcha-note a { color: var(--ink-3); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.recaptcha-note a:hover { color: var(--ink); }
.hs-cta-form iframe { width: 100% !important; }
.cta-form-message { color: var(--accent); font-size: 1.1rem; padding: 2rem 0; }
.cta-form-message a { color: inherit; }


/* ── Footer — sits on the same void ─────────────────────────────────── */
.home footer { border-top: 1px solid var(--line); background: var(--void); }


/* ── Reveal system ──────────────────────────────────────────────────────
   Gated on html.js so nothing is hidden without JavaScript. motion.js
   adds .is-in once an element enters the viewport. */
/* Scroll-scrubbed by motion.js: no transitions, so nothing lags the scroll. */
.js [data-reveal]:not([data-stagger]),
.js [data-stagger] > * { opacity: 0; will-change: transform, opacity; }
.js.motion-off [data-reveal],
.js.motion-off [data-stagger] > *,
.js.motion-off .hw-item :is(.hw-copy, .hw-media) { opacity: 1; transform: none; }

/* Line-masked headlines. Text stays invisible only until motion.js splits
   it; .motion-off (set on failure or reduced motion) always shows it. */
.js [data-split]:not(.is-split) { opacity: 0; }
.js.motion-off [data-split] { opacity: 1; }
.ln {
  display: block;
  overflow: clip;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}
.ln-i { display: block; transform: translate3d(0, 105%, 0); }
.js.motion-off .ln-i { transform: none; }
/* Only the hero headline plays on load; the rest are scrubbed by scroll. */
[data-split-now] .ln-i { transition: transform 1.3s var(--ease) calc(var(--li, 0) * 90ms + 80ms); }
[data-split-now].is-in .ln-i { transform: none; }

/* Doppler fringe — offsets/alpha set from scroll velocity by motion.js:
   blue on the leading edge, red trailing, clean type at rest. */
.dop {
  text-shadow:
    0 calc(var(--dop, 0) * -1px) rgb(64 140 255 / var(--dopa, 0)),
    0 calc(var(--dop, 0) * 1px) rgb(255 52 72 / var(--dopa, 0));
}


/* ── Tablet ─────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .sec-head { grid-template-columns: 1fr; }
  .sec-head > .sec-lede { grid-column: 1; justify-self: start; }
  .quotes { grid-template-columns: 1fr 1fr; }
  .quotes > :last-child { grid-column: 1 / -1; max-width: 620px; }
  .hw-item { grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.4fr); }
  .logos-x-row { flex-wrap: wrap; justify-content: center; }
}

/* ── Mobile ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  html body.home nav.site-nav {
    top: 10px;
    width: calc(100% - 20px);
    height: 56px;
    padding: 0 8px 0 18px;
    border-radius: 12px;
    border: 1px solid rgba(221, 233, 226, 0.2);
  }
  .home .nav-links { display: none; }
  .home .nav-action { display: none; }
  .home .menu-toggle { display: block; }
  .home .nav-toggle { display: none; }

  .br-lg { display: none; }
  .hero-x-foot { grid-template-columns: 1fr; }
  .hero-x-actions .button { flex: 1 1 auto; }

  /* Capabilities: a stacked accordion, matching Mission Domains */
  .cap-rail {
    flex-direction: column;
    gap: 0;
    height: auto;
    margin-inline: calc(var(--gutter) * -1);
    border-top: 1px solid var(--line-2);
  }
  .cap {
    flex: none;
    height: 64px;
    border-radius: 0;
    outline: none;
    box-shadow: none;
    border-bottom: 1px solid var(--line-2);
    background: var(--void);
    cursor: pointer;
    transition: height 0.6s var(--ease);
  }
  .cap.is-open { height: min(440px, 112vw); }
  .cap video { opacity: 0; filter: none; transform: none; transition: opacity 0.6s var(--ease); }
  .cap.is-open video { opacity: 0.85; }
  .cap::after {
    opacity: 0;
    transition: opacity 0.6s var(--ease);
    background: linear-gradient(180deg, rgba(4, 5, 7, 0.7) 0%, rgba(4, 5, 7, 0) 26%, rgba(4, 5, 7, 0) 50%, rgba(4, 5, 7, 0.9) 100%);
  }
  .cap.is-open::after { opacity: 1; }
  .cap-body { inset: 0 var(--gutter); display: block; }
  .cap-idx { top: 26px; }
  .cap h3 {
    position: absolute;
    top: 20px;
    left: 36px;
    right: 32px;
    margin: 0;
    font-size: 22px;
    color: var(--ink-2);
    transition: color 0.4s var(--ease);
  }
  .cap.is-open h3 { color: var(--ink); }
  .cap-body::after {
    content: '';
    position: absolute;
    top: 25px;
    right: 0;
    width: 14px;
    height: 14px;
    background:
      linear-gradient(currentColor, currentColor) center / 14px 1px no-repeat,
      linear-gradient(currentColor, currentColor) center / 1px 14px no-repeat;
    color: var(--ink-2);
    transition: transform 0.5s var(--ease);
  }
  .cap.is-open .cap-body::after { transform: rotate(45deg); }
  .cap p {
    position: absolute;
    left: 0;
    bottom: 24px;
    width: auto;
    max-width: 34ch;
    height: auto;
    opacity: 0;
    transform: translate3d(0, 8px, 0);
    transition: opacity 0.4s var(--ease), transform 0.6s var(--ease);
  }
  .cap.is-open p { opacity: 1; transform: none; transition-delay: 0.15s; }

  .proof-grid { grid-template-columns: 1fr; gap: 64px; }
  .plat-grid { grid-template-columns: 1fr; }
  .proof-media { aspect-ratio: 5 / 4; }

  /* Hardware: no pinning — an accordion */
  .hw-track { height: auto; }
  .hw-pin { position: static; height: auto; overflow: visible; display: block; }
  .hw-frame { display: block; height: auto; margin-top: 40px; }
  .hw-items { display: block; border-bottom: 1px solid var(--line-2); }
  .hw-item { display: flex; flex-direction: column; align-items: stretch; gap: 0; border-top: 1px solid var(--line-2); }
  .js .hw-item:nth-child(n) :is(.hw-copy, .hw-media) { opacity: 1; transform: none; visibility: visible; }
  .hw-toggle {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 22px 0;
    border: 0;
    background: none;
    color: var(--ink-2);
    text-align: left;
    cursor: pointer;
    font: 400 22px/1.2 var(--font-sans);
    letter-spacing: -0.02em;
  }
  .hw-toggle-n { font: 400 12px/1 var(--font-mono); color: var(--accent); letter-spacing: 0.04em; }
  .hw-toggle i { position: relative; width: 14px; height: 14px; margin-left: auto; }
  .hw-toggle i::before, .hw-toggle i::after {
    content: '';
    position: absolute;
    left: 0;
    top: 6.5px;
    width: 14px;
    height: 1px;
    background: currentColor;
    transition: transform 0.5s var(--ease);
  }
  .hw-toggle i::after { transform: rotate(90deg); }
  .hw-item.is-open .hw-toggle { color: var(--ink); }
  .hw-item.is-open .hw-toggle i::after { transform: rotate(0deg); }
  .hw-name { display: none; }
  .hw-item:not(.is-open) :is(.hw-copy, .hw-media) { display: none; }
  .hw-item.is-open :is(.hw-copy, .hw-media) { animation: hw-open 0.7s var(--ease) both; }
  .hw-item.is-open .hw-copy { padding-bottom: 28px; animation-delay: 0.06s; }
  .hw-media { order: 1; height: auto; padding: 8px 0 24px; }
  .hw-copy { order: 2; }
  .hw-media img { max-height: 300px; margin-inline: auto; }
  .hw-index { display: none; }
  .hw-specs { max-width: none; }
  .home .domains-accordion { height: auto; border: 0; border-radius: 0; background: none; margin-inline: calc(var(--gutter) * -1); }
  .home .accordion-tab { background: var(--void); align-items: stretch; }
  .home .accordion-label { font-size: 22px; padding: 0 var(--gutter); color: var(--ink-2); }


  .quotes { grid-template-columns: 1fr; }
  .quotes > :last-child { max-width: none; }
  .contact-grid { grid-template-columns: 1fr; }
}

@keyframes hw-open { from { opacity: 0; transform: translate3d(0, 10px, 0); } }

@media (max-width: 560px) {
  .hero-x-hud .telemetry-item:nth-child(2) { display: none; }
  .logos-x-row { display: grid; grid-template-columns: repeat(3, 1fr); justify-items: center; gap: 32px 16px; padding: 0; }
  .logos-x-row img { height: 30px; }
  .hero-x-title { letter-spacing: -0.035em; }
}


/* ── Reduced motion: everything arrives, nothing travels ────────────── */
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .js [data-stagger] > *, .ln-i, .js .rise,
  .hw-copy > *, .hw-media img, .hw-media canvas {
    opacity: 1 !important;
    transform: none !important;
    translate: none !important;
    scale: 1 !important;
    transition: none !important;
    animation: none !important;
  }
  .js [data-split]:not(.is-split) { opacity: 1; }
  .cap, .cap video, .plat-media img { transition: none; }
}
