/* ============================================================
   QRM WORKSPACES — SHIFT CHANGE
   One site, two shifts. Day = "Aurora Console" (near-white,
   prompt-first, grainy no-purple aurora). Night = "Counsel
   Noir" (warm-black cinema, serif dignity, floating bubbles).
   The whole system is keyed on :root[data-shift="day|night"].
   Shared components read ONLY the token layer, so they flip
   automatically. Signature pieces that genuinely differ use
   .only-day / .only-night.
   ============================================================ */

/* ============================================================
   TOKEN LAYER — the single source both worlds read
   ============================================================ */
:root[data-shift="day"] {
  --bg: #fbfbf9;
  --bg-deep: #f2f2ee;
  --panel: #ffffff;
  --card: #ffffff;
  --card-2: #fdfdfc;
  --ink: #17181a;
  --ink-2: #70737a;
  --ink-3: #9a9da3;
  --line: #e3e3de;
  --line-soft: #eeeeea;

  --font-display: 'Onest', sans-serif;
  --font-body: 'Onest', sans-serif;
  --font-mono: 'Martian Mono', monospace;
  --display-weight: 300;

  --radius: 16px;
  --radius-lg: 22px;

  --pill-bg: #111111;
  --pill-fg: #ffffff;
  --pill2-bg: #ffffff;
  --pill2-line: #e3e3de;
  --sel-bg: #c8e86a;

  /* accents */
  --accent: #0e5f56;      /* teal */
  --accent-2: #1a8272;    /* teal soft */
  --accent-hi: #c8e86a;   /* chartreuse */

  /* aurora hues */
  --teal: #0e5f56;
  --teal-soft: #1a8272;
  --chart: #c8e86a;
  --coral: #ff7a59;
  --sky: #8fd3e8;

  --shadow-card: 0 1px 2px rgba(23,24,26,.05), 0 12px 40px rgba(23,24,26,.09);
  --shadow-float: 0 2px 6px rgba(23,24,26,.06), 0 24px 70px rgba(14,95,86,.16);

  --nav-link: var(--ink-2);
  --hairline: var(--line);
  --hairline-soft: var(--line-soft);
}

:root[data-shift="night"] {
  --bg: #0f0e0d;
  --bg-deep: #0a0908;
  --panel: #161311;
  --card: #1a1613;
  --card-2: #141110;
  --ink: #f4f1ea;
  --ink-2: #a39d92;
  --ink-3: #6e685e;
  --line: rgba(244,241,234,.12);
  --line-soft: rgba(244,241,234,.07);

  --font-display: 'Source Serif 4', Georgia, serif;
  --font-body: 'Public Sans', 'Helvetica Neue', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
  --display-weight: 400;

  --radius: 10px;
  --radius-lg: 16px;

  --pill-bg: #f4f1ea;
  --pill-fg: #12100e;
  --pill2-bg: transparent;
  --pill2-line: rgba(244,241,234,.3);
  --sel-bg: rgba(201,138,61,.35);

  /* accents */
  --accent: #c98a3d;      /* amber */
  --accent-2: #e0a658;    /* amber hi */
  --accent-hi: #e0a658;

  --amber: #c98a3d;
  --amber-hi: #e0a658;

  --shadow-card: 0 24px 60px rgba(0,0,0,.5), 0 0 46px rgba(201,138,61,.07);
  --shadow-float: 0 30px 80px rgba(0,0,0,.55), 0 0 60px rgba(201,138,61,.06);

  --nav-link: var(--ink-2);
  --hairline: var(--line);
  --hairline-soft: var(--line-soft);
}

/* film grain (day) — inline SVG feTurbulence, tiled */
:root {
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* ============================================================
   RESET + BASE
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color .7s ease, color .7s ease;
}

:root[data-shift="night"] body { font-weight: 300; }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }

::selection { background: var(--sel-bg); color: var(--ink); }

h1, h2, .display {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-optical-sizing: auto;
  letter-spacing: -.015em;
}
em { font-style: italic; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }

/* ============================================================
   MODE VISIBILITY — the active shift keeps its display,
   the other is removed. Root attribute is set pre-paint.
   ============================================================ */
:root[data-shift="day"] .only-night { display: none !important; }
:root[data-shift="night"] .only-day { display: none !important; }

/* ============================================================
   SCENES — two fixed full-viewport layers, both in the DOM.
   Opacity crossfade keyed on [data-shift] IS the lights-change.
   ============================================================ */
.scene {
  /* Scoped to the top of the page — an atmospheric ENTRANCE that scrolls
     away, not a backdrop pinned behind the whole page. The soft bottom mask
     dissolves the scene into the flat shell (--bg) so the rest of the page
     reads calm. (Fixes the "background permanently on screen" heaviness,
     restoring the original hero-scoped Counsel Noir / Aurora feel.) */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 58%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 58%, transparent 100%);
  transition: opacity .7s ease;
}
:root[data-shift="day"]   .scene--day   { opacity: 1; }
:root[data-shift="night"] .scene--day   { opacity: 0; }
:root[data-shift="day"]   .scene--night { opacity: 0; }
:root[data-shift="night"] .scene--night { opacity: 1; }

/* content rides above the scenes */
.page { position: relative; z-index: 1; }

/* ---------- DAY SCENE: the aurora (teal → chartreuse → coral → sky) ---------- */
.aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 88%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 88%, transparent 100%);
}
.aurora .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  will-change: transform;
}
.aurora .b1 {
  width: 68vw; height: 60vh; min-width: 620px; min-height: 420px;
  left: -12%; bottom: -22%;
  background: radial-gradient(closest-side, var(--teal) 0%, rgba(14,95,86,.55) 52%, transparent 74%);
  animation: drift1 96s ease-in-out infinite alternate;
}
.aurora .b2 {
  width: 52vw; height: 52vh; min-width: 520px; min-height: 380px;
  right: -10%; bottom: -18%;
  background: radial-gradient(closest-side, var(--coral) 0%, rgba(255,122,89,.5) 50%, transparent 72%);
  animation: drift2 82s ease-in-out infinite alternate;
}
.aurora .b3 {
  width: 44vw; height: 44vh; min-width: 460px; min-height: 340px;
  left: 26%; bottom: -26%;
  background: radial-gradient(closest-side, var(--chart) 0%, rgba(200,232,106,.55) 48%, transparent 70%);
  animation: drift3 108s ease-in-out infinite alternate;
}
.aurora .b4 {
  width: 46vw; height: 40vh; min-width: 440px; min-height: 300px;
  right: 16%; top: 24%;
  background: radial-gradient(closest-side, var(--sky) 0%, rgba(143,211,232,.45) 50%, transparent 72%);
  animation: drift4 70s ease-in-out infinite alternate;
  opacity: .85;
}
.aurora .grain {
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  background-size: 240px 240px;
  mix-blend-mode: overlay;
  opacity: .5;
}
@keyframes drift1 { to { transform: translate(9vw, -7vh) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-11vw, -5vh) scale(1.08); } }
@keyframes drift3 { to { transform: translate(6vw, -10vh) scale(1.18); } }
@keyframes drift4 { to { transform: translate(-8vw, 6vh) scale(.94); } }

/* ---------- NIGHT SCENE: built amber cinematography ---------- */
.scene-base {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(140% 100% at 78% -10%, rgba(64, 44, 24, 0.55) 0%, rgba(28, 21, 14, 0.25) 45%, transparent 70%),
    linear-gradient(200deg, #131110 0%, #0f0e0d 55%, #0b0a09 100%);
}
.scene-beam {
  position: absolute;
  inset: -25%;
  background: linear-gradient(
    113deg,
    transparent 38%,
    rgba(201, 138, 61, 0.05) 50%,
    rgba(201, 138, 61, 0.13) 60%,
    rgba(224, 166, 88, 0.09) 68%,
    rgba(201, 138, 61, 0.03) 76%,
    transparent 85%
  );
}
.scene-shaft {
  position: absolute;
  top: -35%;
  right: 4%;
  width: 38%;
  height: 175%;
  transform: rotate(21deg);
  transform-origin: top center;
  background:
    repeating-linear-gradient(
      to right,
      transparent 0px,
      transparent 88px,
      rgba(10, 9, 8, 0.5) 88px,
      rgba(10, 9, 8, 0.5) 96px
    ),
    linear-gradient(
      to bottom,
      rgba(224, 166, 88, 0.22) 0%,
      rgba(212, 150, 70, 0.13) 34%,
      rgba(201, 138, 61, 0.06) 58%,
      transparent 82%
    );
  filter: blur(22px);
}
.scene-glow {
  position: absolute;
  top: -28%;
  right: -12%;
  width: 62%;
  height: 85%;
  background: radial-gradient(
    closest-side,
    rgba(232, 178, 102, 0.30) 0%,
    rgba(212, 150, 70, 0.13) 42%,
    rgba(201, 138, 61, 0.04) 62%,
    transparent 75%
  );
  filter: blur(14px);
}
.scene-pool {
  position: absolute;
  bottom: -14%;
  left: 2%;
  width: 58%;
  height: 42%;
  transform: skewX(-20deg);
  background: radial-gradient(
    closest-side,
    rgba(201, 138, 61, 0.11) 0%,
    rgba(201, 138, 61, 0.04) 48%,
    transparent 72%
  );
  filter: blur(26px);
}
.scene-smoke,
.scene-grain-n {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.scene-smoke {
  mix-blend-mode: screen;
  opacity: 0.34;
  -webkit-mask-image: linear-gradient(113deg, transparent 30%, #000 58%, rgba(0,0,0,0.4) 74%, transparent 90%);
          mask-image: linear-gradient(113deg, transparent 30%, #000 58%, rgba(0,0,0,0.4) 74%, transparent 90%);
}
.scene-grain-n { mix-blend-mode: overlay; opacity: 0.55; }
.scene-skyline {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  height: clamp(120px, 16vw, 230px);
}
.scene-skyline svg { width: 100%; height: 100%; }
.scene-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(130% 95% at 62% 38%, transparent 46%, rgba(7, 6, 5, 0.6) 100%),
    linear-gradient(to bottom, rgba(10, 9, 8, 0.35) 0%, transparent 18%);
}
.scene-breathe { animation: sceneBreathe 30s ease-in-out infinite alternate; }
@keyframes sceneBreathe {
  0%   { opacity: 0.82; }
  100% { opacity: 1; }
}

/* ============================================================
   FIXED CHROME — back link + prototype tag (shared, reskins)
   ============================================================ */
.back-all {
  position: fixed;
  top: 18px; left: 20px;
  z-index: 95;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  transition: color .25s ease;
}
.back-all:hover { color: var(--ink); }
.proto-tag {
  position: fixed;
  left: 20px; bottom: 16px;
  z-index: 90;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .16em;
  color: var(--ink-3);
  pointer-events: none;
}

/* ============================================================
   MICROLABELS + PILLS (shared)
   ============================================================ */
.micro {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.micro strong { color: var(--ink); font-weight: 400; }

.pill, .pill-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background-color .3s ease, color .3s ease, border-color .3s ease;
}
.pill {
  background: var(--pill-bg);
  color: var(--pill-fg);
  border: 1px solid var(--pill-bg);
}
.pill:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,.22); }
.pill-ghost {
  background: var(--pill2-bg);
  color: var(--ink);
  border: 1px solid var(--pill2-line);
}
.pill-ghost:hover { transform: translateY(-1px); border-color: var(--ink-2); }
.pill-sm { padding: 9px 18px; font-size: 13.5px; }
.pill-wide { width: 100%; }

/* ============================================================
   NAV (shared)
   ============================================================ */
.nav {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 26px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 32px;
}
.nav .brand {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 20px;
  letter-spacing: -.01em;
  color: var(--ink);
}
:root[data-shift="day"] .nav .brand { font-weight: 600; }
.nav .links { display: flex; gap: 24px; margin-left: 20px; }
.nav .links a { font-size: 14.5px; color: var(--nav-link); transition: color .2s; }
.nav .links a:hover { color: var(--ink); }
.nav .spacer { flex: 1; }
.nav .signin { font-size: 14.5px; color: var(--ink); }
.nav .signin:hover { color: var(--accent); }

@media (max-width: 860px) { .nav .links { display: none; } }
@media (max-width: 640px) {
  .nav { flex-wrap: wrap; gap: 12px 14px; padding: 46px 24px 16px; }
  .nav .spacer { flex-basis: 100%; height: 0; }
}

/* ============================================================
   THE SHIFT TOGGLE — the signature control
   ============================================================ */
.shift-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--pill2-line);
  background: var(--pill2-bg);
  transition: border-color .3s ease, background-color .3s ease;
}
:root[data-shift="day"] .shift-toggle { background: #fff; }
.shift-toggle:hover { border-color: var(--ink-2); }
.st-glyphs {
  position: relative;
  width: 52px; height: 26px;
  border-radius: 999px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  font-size: 12px;
  line-height: 1;
}
.st-glyphs .g-sun { color: var(--accent); }
.st-glyphs .g-moon { color: var(--ink-3); }
:root[data-shift="night"] .st-glyphs .g-sun { color: var(--ink-3); }
:root[data-shift="night"] .st-glyphs .g-moon { color: var(--amber-hi); }
.st-knob {
  position: absolute;
  top: 50%;
  left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(0, -50%);
  transition: transform .4s cubic-bezier(.2,.7,.2,1), background-color .3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
:root[data-shift="night"] .st-knob {
  transform: translate(26px, -50%);
  background: var(--amber);
}
.st-meta { display: flex; flex-direction: column; gap: 1px; line-height: 1; }
.st-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  color: var(--ink);
}
.st-sub {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: .1em;
  color: var(--ink-3);
}
@media (max-width: 500px) { .shift-toggle .st-meta { display: none; } }

/* ============================================================
   DAY HERO — the prompt box
   ============================================================ */
.hero-day {
  position: relative;
  min-height: 84vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 32px 84px;
}
.hero-day h1 {
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.12;
  letter-spacing: -.02em;
  max-width: 19ch;
  margin: 0 auto 16px;
}
.hero-day h1 .aur {
  background: linear-gradient(100deg, var(--teal) 0%, var(--teal-soft) 34%, var(--coral) 72%, var(--chart) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  font-weight: 400;
}
.hero-sub {
  font-weight: 300;
  font-size: 17px;
  color: var(--ink-2);
  max-width: 56ch;
  margin: 0 auto 38px;
}
.prompt-box {
  width: min(680px, 100%);
  margin: 0 auto;
  background: var(--card);
  border: 1px solid rgba(23,24,26,.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 18px;
  text-align: left;
  transition: box-shadow .2s ease, transform .2s ease;
}
.prompt-box:focus-within {
  box-shadow: 0 2px 6px rgba(23,24,26,.08), 0 30px 90px rgba(14,95,86,.22);
  transform: translateY(-1px);
}
.prompt-plus {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 300;
  line-height: 1;
}
.prompt-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16.5px;
  font-weight: 300;
  padding: 14px 0;
  color: var(--ink);
}
.prompt-box input::placeholder { color: var(--ink-3); font-weight: 300; }
.prompt-go {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 0;
  background: var(--ink);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: transform .15s ease, background .15s ease;
}
.prompt-go:hover { transform: scale(1.06); background: var(--teal); }
.prompt-note { margin-top: 18px; }
.hero-ctas-day {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}
.finder {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 4px 4px 16px;
  gap: 2px;
}
.finder input {
  border: 0; outline: 0; background: transparent;
  width: 110px;
  font-size: 14px; font-weight: 300;
  text-align: right;
  color: var(--ink);
}
.finder input::placeholder { color: var(--ink-3); }
.finder .suffix { font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); letter-spacing: .04em; }
.finder button {
  margin-left: 10px;
  border: 0;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  border-radius: 999px;
  padding: 9px 14px;
  transition: background .15s;
}
.finder button:hover { background: var(--teal); }

/* staggered rise (day) */
.rise { opacity: 0; transform: translateY(14px); animation: rise .8s cubic-bezier(.2,.7,.2,1) forwards; }
.rise.d1 { animation-delay: .06s; }
.rise.d2 { animation-delay: .18s; }
.rise.d3 { animation-delay: .32s; }
.rise.d4 { animation-delay: .46s; }
.rise.d5 { animation-delay: .60s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ============================================================
   NIGHT HERO — serif over cinema + floating bubbles
   ============================================================ */
.hero-night {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
}
.hero-night-inner {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 110px 32px clamp(120px, 16vh, 190px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 56px;
}
.hero-night-copy { max-width: 640px; }
.hero-night h1 {
  font-size: clamp(40px, 4.6vw, 62px);
  line-height: 1.05;
  letter-spacing: -.015em;
  color: var(--ink);
}
.hero-night h1 .h1-line { display: block; }
.hero-night h1 em { font-style: italic; }
.hero-ctas-night {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
}
.hero-ctas-night .hero-sub { display: none; }
.hero-night .hero-sub { margin: 26px 0 0; max-width: 480px; font-size: 16.5px; color: var(--ink-2); }

/* floating cinematic bubbles */
.bubbles {
  position: relative;
  z-index: 10;
  width: 380px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 20px;
}
.bubble {
  background: linear-gradient(168deg, #1b1713 0%, #141110 60%);
  border: 1px solid rgba(224, 166, 88, 0.16);
  border-top-color: rgba(224, 166, 88, 0.30);
  border-radius: 14px;
  padding: 16px 18px 15px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 46px rgba(201, 138, 61, 0.07);
}
.bubble--human { border-color: rgba(244, 241, 234, 0.10); border-top-color: rgba(244, 241, 234, 0.16); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); margin-right: 34px; }
.bubble--agent { margin-left: 20px; }
.bubble-who {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bubble--agent .bubble-who { color: rgba(224, 166, 88, 0.78); }
.bubble-who .who-dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.bubble-text { font-size: 14px; font-weight: 400; line-height: 1.55; color: var(--ink); }
.bubble--human .bubble-text { color: #dcd7cc; }
.tool-lines { margin-top: 12px; border-top: 1px solid var(--hairline-soft); padding-top: 11px; display: flex; flex-direction: column; gap: 8px; }
.tool-line {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  line-height: 1.5;
  color: var(--ink-2);
}
.tool-line .fn { color: var(--ink); }
.tool-line svg { flex: none; margin-top: 3px; }
.bubble .thinking { display: inline-flex; align-items: center; gap: 9px; color: var(--ink-2); }
.bubble .pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); animation: pulse 1.6s ease-in-out infinite; }

/* soft entrances (both heroes) */
.soft { opacity: 0; animation: softIn 1.1s ease forwards; }
.soft.s1 { animation-delay: .2s; }
.soft.s2 { animation-delay: .5s; }
.soft.s3 { animation-delay: .8s; }
.soft.s4 { animation-delay: 1.1s; }
.soft.s5 { animation-delay: 1.5s; }
@keyframes softIn { to { opacity: 1; } }

/* ============================================================
   TICKER (shared)
   ============================================================ */
.ticker-strip { padding: 6px 32px 60px; display: flex; justify-content: center; }
.ticker {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 12px 26px;
}
.tick { display: inline-flex; align-items: baseline; gap: 9px; }
.tick .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; color: var(--ink-2); text-transform: uppercase; }
.tick .v {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  min-width: 3ch;
}
.tick-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line); }
@media (max-width: 680px) { .ticker { border-radius: 22px; } .tick-dot { display: none; } }

/* ============================================================
   SECTIONS (shared scaffold)
   ============================================================ */
.section { padding: 84px 0; }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .micro { display: block; margin-bottom: 16px; }
.section-head h2 {
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.18;
}
.section-head p { margin-top: 14px; color: var(--ink-2); font-weight: 300; }

/* ============================================================
   DAY — QaiS console panel
   ============================================================ */
.qais-panel {
  max-width: 760px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 36px 40px;
  transition: box-shadow .5s ease;
}
.qais-panel.lit { box-shadow: 0 2px 8px rgba(23,24,26,.06), 0 28px 90px rgba(14,95,86,.24); }
.msg { margin-bottom: 26px; }
.msg:last-child { margin-bottom: 0; }
.msg .who {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--ink-2);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.msg .who .id-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.msg.foreman .who .id-dot { background: var(--coral); }
.msg.qais .who .id-dot { background: var(--teal); }
.msg p { font-weight: 300; font-size: 16.5px; max-width: 56ch; }
.msg.foreman p { color: var(--ink); }
.toolcalls { margin-top: 16px; display: grid; gap: 8px; }
.toolcall {
  display: flex;
  align-items: baseline;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 18px;
  background: var(--card-2);
}
.toolcall .fn { font-family: var(--font-mono); font-size: 11.5px; color: var(--teal); white-space: nowrap; }
.toolcall .desc { flex: 1; font-size: 14px; font-weight: 300; color: var(--ink-2); }
.toolcall .ok { font-family: var(--font-mono); font-size: 12px; color: var(--teal); }
.thinking { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); font-weight: 300; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .25; transform: scale(.82); } 50% { opacity: 1; transform: scale(1.12); } }
@media (max-width: 640px) { .toolcall { flex-direction: column; gap: 4px; } .qais-panel { padding: 26px 22px; } }

/* ============================================================
   PILLARS — day orbs / night serif list (same copy)
   ============================================================ */
.orbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 46px 34px; }
@media (max-width: 980px) { .orbs { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .orbs { grid-template-columns: 1fr; } }
.orb-cell { text-align: center; }
.orb {
  width: 164px; height: 164px;
  border-radius: 50%;
  margin: 0 auto 26px;
  position: relative;
  transition: transform .45s cubic-bezier(.2,.7,.2,1);
  box-shadow: 0 18px 44px rgba(23,24,26,.14);
}
.orb-cell:hover .orb { transform: scale(1.07); }
.orb::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 31% 26%, rgba(255,255,255,.85) 0%, rgba(255,255,255,.28) 18%, transparent 42%); }
.orb::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background-image: var(--grain); background-size: 240px 240px; mix-blend-mode: overlay; opacity: .6; }
.orb-1 { background: radial-gradient(circle at 36% 32%, var(--sky) 0%, var(--teal-soft) 42%, var(--teal) 78%, #093f39 100%); }
.orb-2 { background: radial-gradient(circle at 36% 32%, var(--chart) 0%, var(--coral) 58%, #d14f30 100%); }
.orb-3 { background: radial-gradient(circle at 36% 32%, #dff2f8 0%, var(--sky) 40%, var(--teal-soft) 88%, var(--teal) 100%); }
.orb-4 { background: radial-gradient(circle at 36% 32%, #edf7c8 0%, var(--chart) 44%, var(--coral) 96%); }
.orb-cell h3 { font-size: 17.5px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 8px; font-family: var(--font-body); }
.orb-cell p { font-size: 14.5px; font-weight: 300; color: var(--ink-2); max-width: 30ch; margin: 0 auto; }

.practice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 72px;
  border-top: 1px solid var(--hairline);
}
.practice-item { padding: 40px 0 46px; border-bottom: 1px solid var(--hairline-soft); }
.practice-item h3 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 26px; line-height: 1.25; margin-bottom: 14px; letter-spacing: -.01em; }
.practice-item p { font-size: 15.5px; font-weight: 300; color: var(--ink-2); line-height: 1.68; max-width: 440px; }
@media (max-width: 720px) { .practice-grid { grid-template-columns: 1fr; gap: 0; } }

/* ============================================================
   DAY — annotated tenant object
   ============================================================ */
.tenant-object { display: flex; justify-content: center; }
.tenant-object svg { width: min(920px, 100%); height: auto; display: block; }

/* ============================================================
   NIGHT — logo wall + statement
   ============================================================ */
.logo-wall {
  border-top: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
  padding: 44px 0 48px;
  position: relative;
}
.logo-wall .wall-label { text-align: center; color: var(--ink-3); margin-bottom: 32px; }
.wall-track {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.wall-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 60px;
  white-space: nowrap;
  width: max-content;
  margin: 0 auto;
  color: rgba(244, 241, 234, 0.4);
}
.wall-row + .wall-row { display: none; }
.wm { flex: none; }
.wm--mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.26em; }
.wm--serif { font-family: 'Source Serif 4', Georgia, serif; font-size: 19px; letter-spacing: 0.02em; }
.wm--caps { font-family: 'Public Sans', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: 0.3em; text-transform: uppercase; }
.wm--wide { font-family: 'Public Sans', sans-serif; font-weight: 300; font-size: 14px; letter-spacing: 0.42em; text-transform: uppercase; }
.wm--smallcaps { font-family: 'Source Serif 4', Georgia, serif; font-size: 17px; font-variant: small-caps; letter-spacing: 0.14em; }
@media (max-width: 1180px) {
  .wall-track { display: flex; gap: 60px; }
  .wall-row { justify-content: flex-start; animation: wallScroll 55s linear infinite; }
  .wall-row + .wall-row { display: flex; animation: wallScroll 55s linear infinite; }
  @keyframes wallScroll { from { transform: translateX(0); } to { transform: translateX(calc(-100% - 60px)); } }
}
.statement { padding: clamp(96px, 13vw, 170px) 32px; text-align: center; position: relative; }
.statement h2 { max-width: 820px; margin: 0 auto; font-size: clamp(32px, 3.6vw, 46px); line-height: 1.18; letter-spacing: -.012em; }
.statement p { max-width: 620px; margin: 28px auto 0; font-size: 16px; font-weight: 300; color: var(--ink-2); line-height: 1.7; }

/* ============================================================
   TRUST ROW (shared)
   ============================================================ */
.trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 44px 0; text-align: center; }
.trust-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; margin-bottom: 18px; }
.trust-items .micro { color: var(--ink); }
.trust-items .sep { color: var(--line); font-family: var(--font-mono); font-size: 11px; }
.trust .since { font-weight: 300; font-size: 15px; color: var(--ink-2); }

/* ============================================================
   PRICING (shared markup, reskins via tokens)
   ============================================================ */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 980px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } }
.plan {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.plan:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.plan .name { font-weight: 600; font-size: 15.5px; font-family: var(--font-body); }
:root[data-shift="night"] .plan .name { font-family: var(--font-display); font-weight: 400; font-size: 22px; }
.plan .price { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 36px; letter-spacing: -.02em; margin: 10px 0 0; line-height: 1; }
.plan .per { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; color: var(--ink-2); text-transform: uppercase; min-height: 14px; margin-top: 8px; }
.plan .blurb { font-size: 14px; font-weight: 300; color: var(--ink-2); margin: 14px 0 22px; flex: 1; }
:root[data-shift="night"] .plan .blurb { padding-top: 16px; border-top: 1px solid var(--hairline-soft); }
.plan .pill, .plan .pill-ghost { justify-content: center; }

/* ============================================================
   FOOTER (shared)
   ============================================================ */
.footer { border-top: 1px solid var(--hairline-soft); padding: 48px 0 72px; }
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-mark { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 19px; color: var(--ink); }
:root[data-shift="day"] .footer-mark { font-weight: 600; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 13.5px; font-weight: 300; color: var(--ink-2); }
.footer-links a:hover { color: var(--ink); }
.footer-legal { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }

/* ============================================================
   TRANSITION VEIL — the lights-change cover
   ============================================================ */
.shift-veil {
  position: fixed;
  inset: 0;
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .hero-night { min-height: 0; }
  .hero-night-inner { flex-direction: column; align-items: flex-start; padding-top: 80px; padding-bottom: 96px; gap: 60px; }
  .bubbles { width: 100%; max-width: 420px; }
}
@media (max-width: 640px) {
  .wrap, .nav { padding-left: 24px; padding-right: 24px; }
  .hero-day { padding-left: 24px; padding-right: 24px; }
  .hero-night-inner { padding-left: 24px; padding-right: 24px; }
  .ticker-strip { padding-left: 24px; padding-right: 24px; }
  .footer-inner { flex-direction: column; gap: 22px; padding-left: 24px; padding-right: 24px; }
  .hero-ctas-day, .hero-ctas-night { flex-wrap: wrap; }
  .bubble--human { margin-right: 16px; }
}

/* ============================================================
   REDUCED MOTION — instant, no drift
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .rise, .soft { opacity: 1 !important; transform: none !important; }
  .scene { transition: none !important; }
}

/* ============================================================
   SHARED SUB-PAGE CHROME
   Added for Features / Pricing / Teardown / Trust / Changelog.
   Pure-additive; tokens only, so both shifts flip automatically.
   ============================================================ */

/* active nav link (aria-current or .active) */
.nav .links a.active,
.nav .links a[aria-current="page"] { color: var(--ink); }

/* standard focused page header (sits over the top of the scene) */
.page-head {
  position: relative;
  z-index: 3;
  max-width: 1120px;
  margin: 0 auto;
  padding: 54px 32px 34px;
  text-align: center;
}
.page-head .eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 20px;
}
.page-head h1 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(40px, 6.2vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.page-head h1 em { font-style: italic; }
.page-head .ph-sub {
  margin: 22px auto 0;
  max-width: 60ch;
  color: var(--ink-2);
  font-size: 17px;
  font-weight: 300;
}

/* standard content section rhythm */
.sect {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  margin: 0 auto;
  padding: 30px 32px 74px;
}
.sect > .eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 18px;
}
.sect-title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 12px;
}
.sect-title em { font-style: italic; }

@media (max-width: 640px) {
  .page-head { padding-top: 40px; }
  .sect { padding-bottom: 56px; }
}
