/* RAISE landing — single-screen hero, four times of day.
   Self-contained: the chat pages keep home.css; this file owns the
   landing only. The vineyard photographs ARE the design, so the
   palette is just ink + one gold accent over the image. */

:root {
  --ink: #FAFAF9;
  --ink-soft: rgba(250, 250, 249, 0.84);
  --ink-faint: rgba(250, 250, 249, 0.62);
  --gold: #f9af0e;                 /* Egg Yellow */
  --dark-grey: #31444D;            /* Dark Grey */
  --line: rgba(250, 250, 249, 0.16);
  --glass: rgba(12, 11, 9, 0.42);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: #0a0a0a;
  color: var(--ink);
}

body {
  font-family: 'Jost', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;            /* one screen, no scroll */
}

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

/* ================= SKY — four crossfading photographs ================= */
.sky { position: fixed; inset: 0; z-index: 0; overflow: hidden; }

.sky__layer {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1);
}
/* One sky video, src swapped on tod change. No filter/mask anywhere
   up the ancestor chain — Firefox drops <video> off GPU compositing
   if either is set (CLAUDE.md, hero-video memory). */
.sky__layer {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
  opacity: 1;                /* single element, always visible */
}

/* Scrim — keeps white type legible across all four skies, including the
   bright midday blue. Dark at top (topbar) and bottom (stats), with a
   soft centre wash behind the wordmark. */
/* Twinkling stars — only visible when night is the active tod. JS
   populates ~100 .star elements on load. */
.stars {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 30%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1200ms cubic-bezier(0.22, 1, 0.36, 1);
}
html[data-tod="night"] .stars {
  opacity: 1;
  /* A darker wash behind just the stars area — strongest at the very
     top of the sky, fading to transparent at the bottom of the 20 %
     band so it merges into the regular night scrim with no visible
     seam. Makes the stars pop and gives the topbar a deeper sky. */
  background: linear-gradient(to bottom,
    rgba(0,0,0,0.78) 0%,
    rgba(0,0,0,0.48) 60%,
    rgba(0,0,0,0)    100%);
}

.star {
  position: absolute;
  background: var(--ink);
  border-radius: 50%;
  animation: twinkle 2.4s ease-in-out infinite;
  will-change: opacity, transform;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.2); }
}

.sky__scrim {
  position: absolute; inset: 0;
  transition: background 800ms cubic-bezier(0.22, 1, 0.36, 1);
  /* Soft top (topbar) and bottom (stats) darkening only; per-element
     text-shadows carry legibility for the smaller type. */
  background: linear-gradient(to bottom,
    rgba(0,0,0,0.45) 0%,
    rgba(0,0,0,0.06) 18%,
    rgba(0,0,0,0.06) 60%,
    rgba(0,0,0,0.66) 100%);
}
/* Night gets a denser scrim — we can't filter: brightness() on a <video>
   ancestor without breaking Firefox playback, so the darkness lives in
   the scrim instead. */
html[data-tod="night"] .sky__scrim {
  background: linear-gradient(to bottom,
    rgba(0,0,0,0.62) 0%,
    rgba(0,0,0,0.35) 28%,
    rgba(0,0,0,0.40) 65%,
    rgba(0,0,0,0.82) 100%);
}

/* ================= SHELL ================= */
.shell {
  position: relative;
  z-index: 1;
  height: 100svh;
  display: flex;
  flex-direction: column;
}

/* ================= TOPBAR ================= */
.topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px clamp(20px, 4vw, 48px) 0;
}

.mark {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.2em;
  color: var(--ink);
  text-shadow: 0 1px 14px rgba(0,0,0,0.5);
}
.mark__dot { display: none; }
.mark__logo { height: 30px; width: auto; display: block; filter: drop-shadow(0 1px 14px rgba(0,0,0,0.5)); }
@keyframes mark-pulse {
  0%, 100% { box-shadow: 0 0 8px  rgba(226, 168, 46, 0.35); transform: translateY(-2px) scale(1); }
  50%      { box-shadow: 0 0 18px rgba(226, 168, 46, 0.6);  transform: translateY(-2px) scale(1.15); }
}

/* time-of-day control — frosted-glass pill, same Liquid Glass as the
   agent launcher */
/* Hidden for now — the single 24h clip replaces the time-of-day switcher. */
.tod[hidden] { display: none; }
.tod {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}
.tod__btn {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 7px 11px;
  border-radius: 999px;
  transition: color 200ms ease, background 200ms ease;
}
.tod__btn:hover { color: var(--ink); }
.tod__btn[aria-pressed="true"] {
  color: var(--gold);
  background: rgba(226, 168, 46, 0.10);
}

/* ================= HERO ================= */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
}

.hero__word {
  /* Match the power-on splash wordmark (.pw__word) exactly so the RAISE
     mark doesn't jump in size between the two screens. */
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(3.2rem, 12vw, 7.5rem);
  line-height: 1;
  letter-spacing: 0.06em;
  margin: 0;
  color: var(--ink);
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.hero__tag {
  margin-top: clamp(14px, 2vh, 24px);
  font-size: clamp(13px, 1.6vw, 20px);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow: 0 1px 2px rgba(0,0,0,0.65), 0 2px 18px rgba(0,0,0,0.45);
}
/* Typed-in like an AI chat: JS streams the sentence into .hero__tag-type
   character by character, with a blinking caret after it. */
.hero__tag-type { white-space: pre; }
/* The final word "Now" lands much larger, in a clean bold sans and the
   brand turquoise. */
.hero__now {
  display: inline-block;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 2.4em;
  line-height: 0.85;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #4FB2BD;
  transform: rotate(-7deg);
  transform-origin: 0% 100%;
  vertical-align: -0.32em;
  margin-left: 0.2em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6), 0 4px 18px rgba(0, 0, 0, 0.45);
}
.hero__caret {
  display: inline-block;
  width: 0.08em;
  min-width: 2px;
  height: 1.05em;
  margin-left: 0.12em;
  vertical-align: -0.12em;
  background: var(--gold);
  border-radius: 1px;
  box-shadow: 0 0 8px rgba(226, 168, 46, 0.5);
  animation: caret-blink 1s steps(1) infinite;
}
/* Solid (no blink) while actively typing; blinks once typing finishes. */
.hero__tag.is-typing .hero__caret { animation: none; opacity: 1; }
@keyframes caret-blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* ================= STATS ================= */
.stats {
  display: flex;
  align-items: flex-start;
  gap: clamp(38px, 7vw, 100px);
  margin-top: clamp(40px, 7vh, 80px);
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.stat__n {
  font-family: 'Jost', system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.stat__plus {
  color: var(--gold);
  font-weight: 500;
  margin-left: 4px;
  font-size: 0.7em;
  vertical-align: 0.25em;   /* optical lift so it sits with the cap line */
}
.stat__l {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-shadow: 0 1px 2px rgba(0,0,0,0.65), 0 1px 12px rgba(0,0,0,0.5);
}

/* ================= AGENT CTA ================= */
/* The closing focal point of the hero composition — sits in the
   flex column below the stats, sized up to read as a real CTA over
   the vineyard photograph. Gold-anchored on the demo's centrepiece. */
.agent {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(36px, 6vh, 64px);
  padding: 14px 26px 14px 14px;
  border-radius: 999px;
  background: rgba(12, 11, 9, 0.62);
  border: 1px solid rgba(226, 168, 46, 0.55);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
  box-shadow:
    0 18px 48px -16px rgba(0, 0, 0, 0.7),
    0 4px 14px rgba(226, 168, 46, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
  transition:
    transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 240ms ease,
    box-shadow 240ms ease,
    background 240ms ease;
}
.agent:hover {
  transform: translateY(-2px);
  background: rgba(12, 11, 9, 0.74);
  border-color: rgba(226, 168, 46, 0.85);
  box-shadow:
    0 22px 56px -16px rgba(0, 0, 0, 0.78),
    0 6px 18px rgba(226, 168, 46, 0.36),
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
}
.agent:hover .agent__arrow { transform: translateX(3px); }
.agent__label { white-space: nowrap; }
.agent__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}
.agent__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--gold);
  color: #1a1206;
  font-family: 'Alice', Georgia, serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0;
  box-shadow: 0 0 18px rgba(226, 168, 46, 0.35);
}

/* ================= HERO FORM (chat/enter) =================
   Sign-in form rendered into the hero's vertical rhythm — same slot the
   agent CTA occupies on the landing. The input + submit live on one
   line as a single glass pill; consent + footer link sit below. */
.hero-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: clamp(36px, 6vh, 64px);
  width: min(560px, 92vw);
}
.hero-form__row {
  display: flex;
  align-items: stretch;
  width: 100%;
  padding: 6px 6px 6px 22px;
  border-radius: 999px;
  background: rgba(12, 11, 9, 0.62);
  border: 1px solid rgba(226, 168, 46, 0.55);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow:
    0 18px 48px -16px rgba(0, 0, 0, 0.7),
    0 4px 14px rgba(226, 168, 46, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.hero-form__row:focus-within {
  border-color: rgba(226, 168, 46, 0.85);
  box-shadow:
    0 22px 56px -16px rgba(0, 0, 0, 0.78),
    0 6px 18px rgba(226, 168, 46, 0.32),
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
}
/* Field-only variant (no inline submit) — used on /chat/signin where
   the submit is a standalone block button below the inputs. Pads
   evenly on both sides since nothing sits on the right. */
.hero-form__row--field {
  padding: 14px 22px;
}
.hero-form__input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}
.hero-form__input::placeholder {
  color: var(--ink-faint);
  font-weight: 400;
}
.hero-form__submit {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px 10px 18px;
  border: none;
  border-radius: 999px;
  background: var(--gold);
  color: #1a1206;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(226, 168, 46, 0.35);
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 200ms ease, background 200ms ease;
}
.hero-form__submit:hover {
  transform: translateY(-1px);
  background: #efbb4a;
  box-shadow: 0 0 24px rgba(226, 168, 46, 0.55);
}
.hero-form__submit:hover .hero-form__submit-arrow { transform: translateX(3px); }
/* Block variant — full-width gold pill. Used when the submit is its
   own row (signin has two inputs above it, so it can't sit inline). */
.hero-form__submit--block {
  width: 100%;
  justify-content: center;
  /* Slim pill — same visual height as the field rows above it. */
  padding: 10px 24px;
  font-size: 14px;
  letter-spacing: 0.08em;
}
.hero-form__submit-arrow {
  display: inline-flex;
  align-items: center;
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-form__error {
  width: 100%;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #ffb4b4;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.hero-form__consent {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
  text-align: left;
  max-width: 520px;
  line-height: 1.5;
  cursor: pointer;
}
.hero-form__consent input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 2px;
  width: 16px;
  height: 16px;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(12, 11, 9, 0.5);
  border: 1px solid rgba(250, 250, 249, 0.32);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: background 160ms ease, border-color 160ms ease;
}
.hero-form__consent input[type="checkbox"]:checked {
  background: var(--gold);
  border-color: var(--gold);
}
.hero-form__consent input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 2px; left: 5px;
  width: 4px; height: 8px;
  border-right: 2px solid #1a1206;
  border-bottom: 2px solid #1a1206;
  transform: rotate(45deg);
}
.hero-form__consent a { color: var(--gold); text-decoration: underline; text-decoration-color: rgba(226, 168, 46, 0.4); text-underline-offset: 3px; }
.hero-form__foot {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}
.hero-form__foot a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(250, 250, 249, 0.35);
  text-underline-offset: 4px;
  transition: color 160ms ease;
}
.hero-form__foot a:hover { color: var(--gold); }
/* Split variant — two footer links separated by a thin dot. */
.hero-form__foot--split {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-form__foot-sep {
  color: var(--ink-faint);
  opacity: 0.7;
}

/* ================= SIGN-IN MODAL =================
   Glass card over a dimmed backdrop. Opens from "I have a password"
   on /chat/enter, auto-opens on /chat/signin (deep links). Reuses the
   hero-form pills inside so the modal feels like an in-place expansion
   of the canvas, not a new surface. */
.signin-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vh, 32px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 280ms cubic-bezier(0.22, 1, 0.36, 1), visibility 280ms;
}

/* Inline variant — lives in the landing hero (no overlay). Sits in the
   flow as a glass panel; no backdrop, no entrance transform. */
.signin-modal--inline {
  position: static;
  inset: auto;
  z-index: auto;
  display: block;
  padding: 0;
  margin-top: clamp(28px, 5vh, 52px);
  opacity: 1;
  visibility: visible;
  transition: none;
  width: min(440px, 100%);
}
.signin-modal--inline .signin-modal__card {
  width: 100%;
  max-height: none;
  transform: none;
  transition: none;
  /* No box — bare form over the vineyard. */
  background: none;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  overflow: visible;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
/* Drop the heading block above the field — just the form shows. */
.signin-modal--inline .signin-modal__eyebrow,
.signin-modal--inline .signin-modal__title,
.signin-modal--inline .signin-modal__lede { display: none; }
.signin-modal.is-open {
  opacity: 1;
  visibility: visible;
}
.signin-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 7, 6, 0.62);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
}
.signin-modal__card {
  position: relative;
  width: min(440px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: clamp(28px, 4vh, 40px) clamp(24px, 4vw, 36px);
  border-radius: 24px;
  background: rgba(12, 11, 9, 0.72);
  border: 1px solid rgba(226, 168, 46, 0.5);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow:
    0 40px 120px -20px rgba(0, 0, 0, 0.8),
    0 6px 20px rgba(226, 168, 46, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
  transform: translateY(12px) scale(0.98);
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
.signin-modal.is-open .signin-modal__card {
  transform: translateY(0) scale(1);
}
.signin-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(250, 250, 249, 0.06);
  border: 1px solid rgba(250, 250, 249, 0.14);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.signin-modal__close:hover {
  background: rgba(250, 250, 249, 0.12);
  border-color: rgba(250, 250, 249, 0.28);
  color: var(--ink);
}
.signin-modal__eyebrow {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.signin-modal__title {
  font-family: 'Alice', Georgia, serif;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.05;
}
.signin-modal__lede {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 22px;
}
/* Modal-scoped form: drop the page-rise animation and the top margin
   that makes sense in the hero column but not inside a card. */
.signin-modal .hero-form {
  width: 100%;
  margin-top: 0;
  opacity: 1;
  animation: none;
}
/* Inline link — used for footer "Use a one-time code instead" and the
   trigger on /chat/enter. Styled as a button but reads as a link. */
.signin-modal__inline-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(250, 250, 249, 0.35);
  text-underline-offset: 4px;
  font: inherit;
  cursor: pointer;
  transition: color 160ms ease;
}
.signin-modal__inline-link:hover { color: var(--gold); }
/* Lock body scroll while the modal is open. */
body.signin-modal-open { overflow: hidden; }

/* Screen swapping — every screen renders in markup; only the active
   one (matched by data-screen on the modal root vs. data-screen-id
   on the section) is shown. The eyebrow + title + lede slot in to
   the same position for every screen, so the modal feels in-place. */
.signin-modal__screen { display: none; }
.signin-modal[data-screen="otp"]    .signin-modal__screen[data-screen-id="otp"],
.signin-modal[data-screen="verify"] .signin-modal__screen[data-screen-id="verify"],
.signin-modal[data-screen="signin"] .signin-modal__screen[data-screen-id="signin"],
.signin-modal[data-screen="forgot"] .signin-modal__screen[data-screen-id="forgot"] {
  display: block;
}

/* Notice — used for the mocked OTP code + the forgot-password success
   acknowledgement. Sits between the lede and the form. */
.signin-modal__notice {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--gold);
  background: rgba(226, 168, 46, 0.08);
  border: 1px solid rgba(226, 168, 46, 0.28);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 18px;
  word-break: break-all;
  text-align: left;
}
.signin-modal__notice--success {
  color: var(--ink);
  background: rgba(108, 178, 119, 0.10);
  border-color: rgba(108, 178, 119, 0.35);
}
.signin-modal__notice a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

/* Verify code field — monospaced, big tracking, centered. Reads as a
   one-time-code field, not a normal text input. */
.hero-form__input--code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.4em;
  text-align: center;
  text-transform: uppercase;
}

/* Hero-form rides the same entrance timing as the agent CTA. */
.hero-form {
  opacity: 0;
  animation: rise-soft 640ms cubic-bezier(0.22, 1, 0.36, 1) 3900ms forwards;
}

/* ================= ENTRANCE — orchestrated page-load symphony =================
   Timeline (ms):
     0    300    600    900   1200   1500   1800   2100   2400   2700   3000+
     |     |      |      |      |      |      |      |      |      |      |
     [topbar]
              [R][A][I][S][E]                                        wordmark stagger
                                  [tagline rises ]
                                            [stats fade  ][numbers count up — JS]
                                                                  [agent]
                                                                              [strike → NOW]
*/

@keyframes rise-soft {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes rise-tag {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes letter-rise {
  from { opacity: 0; transform: translateY(28px); filter: blur(8px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* Topbar settles first. */
.mark, .tod, .sound {
  opacity: 0;
  animation: rise-soft 540ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.mark  { animation-delay:  80ms; }
.tod   { animation-delay: 240ms; }
.sound { animation-delay: 200ms; }

/* Ambient-sound toggle — same Liquid Glass as the time-of-day pill. */
.sound {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  color: var(--ink);
  cursor: pointer;
  transition: transform .2s cubic-bezier(0.22,1,0.36,1), background .2s;
}
.sound:hover { transform: translateY(-1px); background: rgba(255,255,255,0.16); }
.sound:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Hover the toggle → a quick-links menu drops below it, same glass look. */
.sound-wrap { position: relative; display: inline-flex; }
.sound-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  transform: translateY(-6px);
  min-width: 172px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, transform .24s cubic-bezier(0.22, 1, 0.36, 1), visibility .22s;
  z-index: 40;
}
/* Transparent bridge across the 12px gap so hover doesn't drop. */
.sound-menu::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.sound-wrap:hover .sound-menu,
.sound-wrap:focus-within .sound-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.sound-menu__item {
  display: block;
  padding: 9px 15px;
  border-radius: 999px;
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.sound-menu__item:hover { background: var(--gold); color: #1a1608; }
.sound__bars {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  height: 16px;
}
.sound__bars i {
  width: 3px;
  height: 4px;
  border-radius: 2px;
  background: currentColor;
  transition: height .2s;
}
/* Playing: bars bounce like an equaliser. */
.sound.is-playing .sound__bars i { animation: eq 900ms ease-in-out infinite; }
.sound.is-playing .sound__bars i:nth-child(1) { animation-delay: -200ms; }
.sound.is-playing .sound__bars i:nth-child(2) { animation-delay: -520ms; }
.sound.is-playing .sound__bars i:nth-child(3) { animation-delay: -80ms;  }
.sound.is-playing .sound__bars i:nth-child(4) { animation-delay: -360ms; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }

/* Wordmark composes itself letter-by-letter (blur → focus). */
.hero__char {
  display: inline-block;
  opacity: 0;
  transform: translateY(32px);
  filter: blur(8px);
  animation: letter-rise 820ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: opacity, transform, filter;
}
.hero__char:nth-child(1) { animation-delay:  700ms; }
.hero__char:nth-child(2) { animation-delay:  860ms; }
.hero__char:nth-child(3) { animation-delay: 1020ms; }
.hero__char:nth-child(4) { animation-delay: 1180ms; }
.hero__char:nth-child(5) { animation-delay: 1340ms; }

/* Tagline rises as one block once the wordmark is composed. */
.hero__tag {
  opacity: 0;
  animation: rise-tag 720ms cubic-bezier(0.22, 1, 0.36, 1) 2300ms forwards;
}

/* Stats parent fades; numerals count up via JS at 3300ms. */
.stats {
  opacity: 0;
  animation: rise-soft 640ms cubic-bezier(0.22, 1, 0.36, 1) 3100ms forwards;
}

/* CTA rises last. */
.agent {
  opacity: 0;
  animation: rise-soft 640ms cubic-bezier(0.22, 1, 0.36, 1) 3900ms forwards;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 560px) {
  .topbar { padding-top: 18px; }
  .mark { font-size: 14px; letter-spacing: 0.34em; }
  .tod__btn { padding: 6px 7px; letter-spacing: 0.12em; }
  .stats { gap: 26px; }
  /* CTA shrinks in step with the rest of the hero, but still reads
     as a deliberate button — not a corner chip. */
  .agent {
    margin-top: clamp(24px, 5vh, 36px);
    padding: 12px 20px 12px 12px;
    font-size: 12px;
    gap: 10px;
  }
  .agent__icon { width: 30px; height: 30px; font-size: 15px; }
  .agent__arrow svg { width: 12px; height: 12px; }
  /* Hero form: stack the input over the submit on small screens so the
     field has room to breathe (the inline pill cramps the placeholder). */
  .hero-form { margin-top: clamp(24px, 5vh, 36px); gap: 14px; }
  .hero-form__row {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 22px;
  }
  .hero-form__input { padding: 4px 10px 10px; }
  .hero-form__submit { justify-content: center; padding: 12px 20px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-force-motion]) .sky__layer { transition: none; transform: none; }
  html:not([data-force-motion]) .mark, html:not([data-force-motion]) .tod,
  html:not([data-force-motion]) .sound,
  html:not([data-force-motion]) .hero__word, html:not([data-force-motion]) .hero__tag,
  html:not([data-force-motion]) .stats, html:not([data-force-motion]) .agent, html:not([data-force-motion]) .hero-form {
    opacity: 1;
    animation: none;
  }
  html:not([data-force-motion]) .hero__char {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none;
  }
  html:not([data-force-motion]) .star { animation: none; opacity: 0.7; }
  html:not([data-force-motion]) .mark__dot { animation: none; }
  /* No typing animation; the full tagline is set by JS, caret static. */
  html:not([data-force-motion]) .hero__caret { animation: none; opacity: 1; }
}
