/* ==========================================================================
   whatif.com.ai — coming soon
   Page styles. All colors/type/motion values come from the Trade Optix
   design system (design-system/colors_and_type.css). The three values below
   are the only page-local additions: a darker navy step of --to-navy-900 used
   as the page ground, and the accent alias.
   ========================================================================== */

:root {
  --wi-bg: #020E26;                      /* navy-950: --to-navy-900 darkened for a near-black ground */
  --wi-panel: rgba(3, 16, 44, 0.52);     /* premise section wash */
  --wi-accent: var(--to-signal-info);    /* #38BDF8 — the one electric accent */
  --wi-fg: #FFFFFF;
  --wi-fg-2: rgba(255, 255, 255, 0.66);
  --wi-fg-3: rgba(255, 255, 255, 0.52);
  --wi-hair: rgba(255, 255, 255, 0.08);
  --wi-line: rgba(255, 255, 255, 0.14);
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--wi-bg);
  color: var(--wi-fg-2);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--wi-accent); text-decoration: none; }
a:hover { color: color-mix(in oklch, var(--wi-accent) 72%, white); }
::selection { background: rgba(56, 189, 248, 0.28); color: #fff; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.page { position: relative; min-height: 100dvh; isolation: isolate; }
.container { max-width: 1200px; margin: 0 auto; padding-inline: clamp(20px, 4vw, 32px); }

/* --- signature background: white wireframe grid, radially masked ---------- */
.bg-grid,
.bg-glow { position: absolute; inset: 0; pointer-events: none; }

.bg-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(120% 78% at 40% 34%, #000 0%, rgba(0, 0, 0, 0.5) 46%, transparent 80%);
  mask-image: radial-gradient(120% 78% at 40% 34%, #000 0%, rgba(0, 0, 0, 0.5) 46%, transparent 80%);
}

.bg-glow {
  background:
    radial-gradient(64% 56% at 34% 40%, rgba(19, 48, 107, 0.5) 0%, transparent 72%),
    radial-gradient(46% 44% at 86% 12%, rgba(56, 189, 248, 0.07) 0%, transparent 72%);
}

/* --- header --------------------------------------------------------------- */
.site-header {
  position: relative; z-index: 3;
  max-width: 1200px; margin: 0 auto;
  padding: 22px clamp(20px, 4vw, 32px);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}

.wordmark {
  font-family: var(--font-display);
  font-size: clamp(17px, 2vw, 19px);
  letter-spacing: -0.012em;
  display: inline-flex; align-items: baseline;
  margin: 0;
}
.wordmark:hover { color: inherit; }
.wordmark-a { color: #fff; font-weight: 800; }
.wordmark-b { color: rgba(255, 255, 255, 0.36); font-weight: 500; }
.wordmark-c { color: var(--wi-accent); font-weight: 700; }
.wordmark.small { font-size: 15px; letter-spacing: -0.01em; }
.wordmark.small .wordmark-a { color: rgba(255, 255, 255, 0.82); }
.wordmark.small .wordmark-b { color: rgba(255, 255, 255, 0.3); }
.wordmark.small .wordmark-c { color: rgba(255, 255, 255, 0.6); }

.status-pill {
  margin: 0;
  display: flex; align-items: center; gap: 9px;
  padding: 7px 14px 7px 12px;
  border: 1px solid var(--wi-line);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.status-dot {
  width: 6px; height: 6px; border-radius: var(--radius-pill);
  background: var(--wi-accent);
  box-shadow: 0 0 10px var(--wi-accent);
  animation: wi-breathe 3.2s var(--ease-standard) infinite;
}

/* --- hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex; align-items: center;
  /* svh, not dvh: dvh tracks the mobile URL bar, so it changes on every scroll
     gesture and resizes the hero (and the canvas with it) mid-scroll. svh is
     the same number with the bar showing and it holds still. */
  min-height: max(600px, calc(100svh - 84px));
  overflow: hidden;
}

.hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block; pointer-events: none;
}

.hero-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(78% 70% at 10% 44%, var(--wi-bg) 0%, rgba(2, 14, 38, 0.86) 34%, rgba(2, 14, 38, 0.1) 68%, transparent 82%);
}

.hero-inner {
  position: relative; z-index: 2;
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding: clamp(32px, 6vh, 72px) clamp(20px, 4vw, 32px) clamp(72px, 10vh, 96px);
  display: flex; flex-wrap: wrap; align-items: center;
  gap: clamp(24px, 4vw, 48px);
}

.hero-copy {
  flex: 1 1 430px;
  max-width: max(340px, min(566px, 47vw));
  min-width: 0;
  animation: wi-rise 900ms var(--ease-emphasized) both;
}

.hero-viz-space { flex: 1 1 330px; min-height: min(46vh, 330px); }

.overline {
  margin: 0 0 clamp(16px, 2.4vh, 24px);
  font-family: var(--font-display);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}
.overline.accent { color: var(--wi-accent); }
.accent { color: var(--wi-accent); }

.display {
  margin: 0;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(62px, 11.5vw, 132px);
  line-height: 0.94; letter-spacing: -0.042em;
  color: var(--wi-fg);
}

.lede {
  margin: clamp(18px, 2.6vh, 26px) 0 0;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(19px, 2.3vw, 27px);
  line-height: 1.3; letter-spacing: -0.018em;
  color: rgba(255, 255, 255, 0.94);
  text-wrap: balance;
}

/* The bottom margin carries the space the notify form used to occupy: enough
   that the status line reads as a deliberate sign-off to the copy block, not
   so much that it leaves a hole where the form was. */
.hero-copy .body {
  margin: 14px 0 clamp(30px, 4.4vh, 44px);
  max-width: 46ch;
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.62;
  color: var(--wi-fg-2);
  text-wrap: pretty;
}

.meta {
  margin: 0;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--wi-fg-3);
}

.scroll-cue {
  position: absolute; z-index: 2; left: 50%; bottom: 20px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52);
}
.scroll-cue:hover { color: rgba(255, 255, 255, 0.82); }
.scroll-cue span { animation: wi-nudge 2.6s var(--ease-standard) infinite; }

/* --- premise -------------------------------------------------------------- */
.premise {
  position: relative; z-index: 2;
  border-top: 1px solid var(--wi-hair);
  background: var(--wi-panel);
}
.premise .container { padding-block: clamp(64px, 11vh, 112px); }

.premise h2 {
  margin: 0; max-width: 22ch;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.06; letter-spacing: -0.026em;
  color: var(--wi-fg);
}

.premise .body.wide {
  margin: 24px 0 0; max-width: 62ch;
  font-size: clamp(15px, 1.15vw, 18px); line-height: 1.6;
  color: var(--wi-fg-2); text-wrap: pretty;
}
.premise em { color: rgba(255, 255, 255, 0.86); font-style: normal; }

.terms {
  display: flex; flex-wrap: wrap;
  gap: clamp(20px, 3vw, 40px);
  margin-top: clamp(44px, 7vh, 72px);
}
.term { flex: 1 1 240px; min-width: 0; border-top: 1px solid var(--wi-line); padding-top: 18px; }
.term p { margin: 0; font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, 0.62); }
.term-label {
  margin: 0 0 8px !important;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--wi-accent) !important;
}

/* --- explainer ------------------------------------------------------------ */
/* Continues the premise panel rather than opening a new band: below the hero
   the page is one continuous wash, and the hairline is the only divider. */
.explainer {
  position: relative; z-index: 2;
  border-top: 1px solid var(--wi-hair);
  background: var(--wi-panel);
}
.explainer .container { padding-block: clamp(64px, 11vh, 112px); }

.explainer h2 {
  margin: 0; max-width: 20ch;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.06; letter-spacing: -0.026em;
  color: var(--wi-fg);
}

.explainer .body.wide {
  margin: 24px 0 0; max-width: 62ch;
  font-size: clamp(15px, 1.15vw, 18px); line-height: 1.6;
  color: var(--wi-fg-2); text-wrap: pretty;
}

.video { margin: clamp(36px, 6vh, 56px) 0 0; }

/* aspect-ratio rather than a padding hack, so the frame reserves its height
   before the poster arrives and nothing below it shifts. */
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--wi-line);
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: 0 24px 64px rgba(2, 14, 38, 0.55);
}

.video-el {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  background: #000;
}

.video-fallback {
  margin: 0; padding: clamp(20px, 4vw, 32px);
  font-size: 15px; line-height: 1.6; color: var(--wi-fg-2);
}

/* --- overlay play control ------------------------------------------------- */
/* Hidden until app.js marks the frame enhanced — without JS the browser's own
   control is the only one on screen, and it still works. */
.video-play { display: none; }

.video-frame.is-enhanced .video-play {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px;
  width: 100%;
  margin: 0; padding: 0;
  border: 0; cursor: pointer;
  background: radial-gradient(58% 58% at 50% 50%, rgba(2, 14, 38, 0.34) 0%, rgba(2, 14, 38, 0.68) 100%);
  color: var(--wi-fg);
  transition: opacity var(--dur-base) var(--ease-standard),
              background var(--dur-base) var(--ease-standard);
}

.video-frame.is-enhanced.is-playing .video-play {
  opacity: 0;
  pointer-events: none;
}

.video-play:hover { background: radial-gradient(58% 58% at 50% 50%, rgba(2, 14, 38, 0.22) 0%, rgba(2, 14, 38, 0.6) 100%); }
.video-play:focus-visible { outline: 2px solid var(--wi-accent); outline-offset: -4px; }

/* A CSS triangle, nudged right so it sits optically centred in the disc. */
.video-play-icon {
  width: clamp(56px, 7vw, 76px); height: clamp(56px, 7vw, 76px);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.4);
  transition: background var(--dur-base) var(--ease-standard),
              border-color var(--dur-base) var(--ease-standard),
              box-shadow var(--dur-base) var(--ease-standard);
}
.video-play-icon::before {
  content: '';
  margin-left: 4px;
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent var(--wi-fg);
}
.video-play:hover .video-play-icon {
  background: rgba(56, 189, 248, 0.16);
  border-color: var(--wi-accent);
  box-shadow: 0 0 28px rgba(56, 189, 248, 0.32);
}

.video-play-label {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.video figcaption { margin-top: 14px; }

/* --- closer --------------------------------------------------------------- */
.closer-band {
  position: relative; z-index: 2;
  background: var(--wi-panel);
}
.closer-band .container { padding-bottom: clamp(56px, 9vh, 96px); }

/* The sign-off is its own section now that the explainer sits above it — the
   hairline is what separates them, so no top margin of its own. */
.closer {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 16px;
  padding-top: 26px; border-top: 1px solid var(--wi-hair);
}
.closer-line {
  margin: 0; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.02em; color: var(--wi-fg);
}
.closer .meta { font-size: 11.5px; letter-spacing: 0.14em; }

/* --- footer --------------------------------------------------------------- */
.site-footer { position: relative; z-index: 2; border-top: 1px solid var(--wi-hair); }
.footer-inner {
  padding-block: 26px 34px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.site-footer .meta { font-size: 11px; letter-spacing: 0.12em; color: rgba(255, 255, 255, 0.46); }

/* The Trade Optix link stays part of the line rather than taking the accent:
   the footer deliberately dims even the wordmark's accent, so a cyan link here
   would be the loudest thing on the page. Hairline underline, hover lifts it. */
.site-footer .meta a {
  color: inherit;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: color var(--dur-base) var(--ease-standard),
              border-color var(--dur-base) var(--ease-standard);
}
.site-footer .meta a:hover {
  color: rgba(255, 255, 255, 0.82);
  border-bottom-color: rgba(255, 255, 255, 0.45);
}

/* --- motion --------------------------------------------------------------- */
@keyframes wi-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes wi-breathe { 0%, 100% { opacity: 0.35; transform: scale(0.82); } 50% { opacity: 1; transform: scale(1); } }
@keyframes wi-nudge { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(5px); opacity: 0.9; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
