/* ============================================================
   HYPERION — PREMIUM MOTION LAYER
   Additive only. Loads after styles.css. Cinematic intro,
   smooth scroll, custom cursor, magnetic + spotlight interactions,
   scroll-driven reveals & parallax. Honors reduced-motion (the JS
   simply doesn't activate, and the base site keeps working).
   ============================================================ */

/* ---------- Custom cursor ---------- */
.cursor,
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10001;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  transition: opacity .4s ease;
  mix-blend-mode: difference;
}
html.cursor-on .cursor,
html.cursor-on .cursor-dot { opacity: 1; }
html.cursor-on,
html.cursor-on a,
html.cursor-on button { cursor: none !important; }

.cursor {
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 1px solid #fff;
  transition: width .28s var(--ease), height .28s var(--ease),
    margin .28s var(--ease), background .28s var(--ease), opacity .4s ease;
}
.cursor.is-hover {
  width: 66px;
  height: 66px;
  margin: -33px 0 0 -33px;
  background: #fff;
}
.cursor.is-down { width: 30px; height: 30px; margin: -15px 0 0 -15px; }
.cursor-dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: #fff;
}
@media (hover: none), (pointer: coarse) {
  .cursor, .cursor-dot { display: none; }
}

/* ---------- Language switcher ---------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-right: 4px;
}
.lang-btn {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--faint);
  transition: color .2s, background .2s;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active { background: var(--text); color: #0b0b0d; }
@media (max-width: 420px) { .lang-btn { padding: 5px 7px; font-size: 11px; } }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 130;
  background: oklch(1 0 0 / 0.05);
  pointer-events: none;
}
.scroll-progress > i {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--accent-ink), var(--accent));
  box-shadow: 0 0 14px var(--accent-glow);
}

/* ============================================================
   CINEMATIC INTRO (rebuilt) — curtains provide the cover so
   they can wipe up and reveal the hero behind them.
   ============================================================ */
#intro { background: var(--bg); overflow: hidden; }
html.intro-lock,
html.intro-lock body { overflow: hidden !important; height: 100%; }

/* full-screen generated voice video behind the title */
.intro-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  z-index: 0;
}
#intro::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(70% 60% at 50% 50%, transparent 0%, var(--bg) 88%),
    linear-gradient(180deg, oklch(0.145 0.006 70 / 0.4), transparent 30%, transparent 70%, oklch(0.145 0.006 70 / 0.6));
}
.intro-stage, .intro-count { z-index: 2; }

/* bespoke WebGL voice-field behind the hero */
#gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
}

/* subtle voice video woven into the hero background */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.14;
  z-index: 0;
  pointer-events: none;
  -webkit-mask: radial-gradient(80% 70% at 82% 80%, #000 8%, transparent 60%);
  mask: radial-gradient(80% 70% at 82% 80%, #000 8%, transparent 60%);
}
.hero > .wrap { position: relative; z-index: 1; }

.intro-stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.intro-stage::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  max-width: 90vw;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-12), transparent 62%);
  filter: blur(50px);
  z-index: -1;
}

/* override the old CSS-driven intro animations — GSAP drives these now */
.intro-word {
  display: flex;
  overflow: hidden;
  padding-bottom: .08em;
  animation: none;
  opacity: 1;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(44px, 8vw, 92px);
  letter-spacing: -0.05em;
  color: var(--text);
}
.intro-word span { display: inline-block; will-change: transform; }
.intro-sub { animation: none; opacity: 0; }
.intro-line { animation: none; width: 0; }

.intro-count {
  position: absolute;
  left: 34px;
  bottom: 30px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}
.intro-count span { color: var(--accent-ink); }
@media (max-width: 600px) { .intro-count { left: 50%; transform: translateX(-50%); white-space: nowrap; } }

/* ============================================================
   SPOTLIGHT — cursor-following light on key surfaces
   ============================================================ */
.feat, .plan, .badge-card, .uc-visual, .console, .player, .api-card {
  --mx: 50%;
  --my: 50%;
}
.badge-card, .uc-visual, .console, .player, .api-card { position: relative; }
.feat::after,
.plan::after,
.badge-card::after,
.uc-visual::after,
.console::after,
.player::after,
.api-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s var(--ease);
  background: radial-gradient(440px circle at var(--mx) var(--my),
    oklch(0.68 0.215 28 / 0.11), transparent 60%);
  z-index: 0;
}
.feat:hover::after,
.plan:hover::after,
.badge-card:hover::after,
.uc-visual:hover::after,
.console:hover::after,
.player:hover::after,
.api-card:hover::after { opacity: 1; }
/* keep card content above the glow */
.feat > *, .plan > *, .badge-card > *, .uc-visual > *, .console > *, .player > *, .api-card > * { position: relative; z-index: 1; }

/* ---------- Magnetic buttons ---------- */
.btn-accent, .btn-lg, .play-btn { will-change: transform; }

/* ============================================================
   STEPS — scroll-scrubbed progress rail (new element)
   ============================================================ */
.steps { position: relative; }
.steps-rail {
  position: absolute;
  left: -1px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line);
  overflow: hidden;
}
.steps-rail i {
  position: absolute;
  inset: 0;
  display: block;
  transform: scaleY(0);
  transform-origin: top;
  background: linear-gradient(180deg, var(--accent), var(--accent-ink) 60%, transparent);
  box-shadow: 0 0 12px var(--accent-glow);
}
@media (max-width: 1000px) { .steps-rail { left: -1px; } }

/* ============================================================
   Perf hints
   ============================================================ */
.aurora { will-change: transform; }

/* let the custom cursor not block text fields */
html.cursor-on input,
html.cursor-on textarea { cursor: text !important; }

/* ============================================================
   BOOKING SLIDE-OVER
   ============================================================ */
.sheet-scrim {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: oklch(0.05 0.01 60 / 0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .42s var(--ease);
}
.sheet-scrim.is-open { opacity: 1; }

.sheet {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 210;
  height: 100dvh;
  width: min(460px, 100vw);
  background: linear-gradient(180deg, var(--panel), var(--bg-1));
  border-left: 1px solid var(--line-2);
  box-shadow: -40px 0 120px -40px #000;
  transform: translateX(100%);
  transition: transform .5s var(--ease);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sheet.is-open { transform: none; }
body.sheet-open { overflow: hidden; }

.sheet-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  display: grid;
  place-items: center;
  transition: .2s;
}
.sheet-close:hover { color: var(--text); border-color: var(--line-2); background: oklch(1 0 0 / 0.04); }
.sheet-close svg { width: 18px; height: 18px; }

.sheet-body { padding: 64px 36px 40px; }
.sheet-body h2 { font-size: clamp(26px, 3vw, 34px); margin: 18px 0 12px; }
.sheet-lead { color: var(--muted); font-size: 15.5px; margin-bottom: 28px; }

.sheet-form { display: flex; flex-direction: column; gap: 16px; }
.sheet-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sheet-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
}
.sheet-form input,
.sheet-form textarea {
  font-family: var(--sans);
  font-size: 15px;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
  background: oklch(1 0 0 / 0.03);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color .2s, background .2s;
}
.sheet-form input::placeholder,
.sheet-form textarea::placeholder { color: var(--faint); }
.sheet-form input:focus,
.sheet-form textarea:focus { outline: none; border-color: var(--accent); background: oklch(1 0 0 / 0.05); }
.sheet-form input.invalid,
.sheet-form textarea.invalid { border-color: oklch(0.62 0.2 28); }
.sheet-form .err { color: oklch(0.72 0.17 33); font-family: var(--mono); font-size: 11px; text-transform: none; letter-spacing: 0; }
.sheet-submit { margin-top: 8px; justify-content: center; }
.sheet-note { font-family: var(--mono); font-size: 11.5px; color: var(--faint); text-align: center; }

.sheet-success { text-align: center; padding: 30px 0; }
.sheet-success .ok-ic {
  width: 60px; height: 60px; margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--accent-12);
  border: 1px solid var(--accent);
  display: grid; place-items: center;
  color: var(--accent-ink);
}
.sheet-success .ok-ic svg { width: 26px; height: 26px; }
.sheet-success h3 { font-size: 22px; margin-bottom: 10px; }
.sheet-success p { color: var(--muted); font-size: 15px; margin-bottom: 24px; }

/* ============================================================
   KINETIC HERO HEADLINE (word mask reveal)
   ============================================================ */
.kx-w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}
.kx-i { display: inline-block; will-change: transform; }
/* when premium drives the words, disable the block CSS entrance on the title */
body.kx .hero-title { animation: none !important; opacity: 1 !important; }

/* ============================================================
   MANIFESTO — pinned, scroll-illuminated statement
   ============================================================ */
.manifesto {
  min-height: 100vh;
  display: grid;
  align-content: center;
  padding: 80px 0;
}
.manifesto .kicker { margin-bottom: 34px; }
.manifesto-line {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(30px, 5.4vw, 78px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 20ch;
  text-wrap: balance;
}
.manifesto .mw { color: var(--text); display: inline-block; }
.manifesto .mw.accent { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .cursor, .cursor-dot { display: none !important; }
  .sheet, .sheet-scrim { transition: none; }
  .manifesto .mw { opacity: 1 !important; }
  .kx-i { transform: none !important; }
}
