:root {
  --bg: #020406;
  --bg-soft: #050a0d;
  --ink: #e9fbfe;
  --ink-dim: #7fb6bd;
  --muted: #4f737a;
  --cyan: #53e6ff;
  --cyan-soft: #8ff0ff;
  --cyan-deep: #0e6f7d;
  --line: rgba(83, 230, 255, 0.14);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

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

html { scroll-behavior: auto; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Fixed chrome ---------- */
.chrome {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 56px);
  pointer-events: none;
}
.wordmark {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.22em;
  color: var(--ink);
  text-decoration: none;
  pointer-events: auto;
}
.wordmark__sub {
  margin-left: 0.6em;
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(83, 230, 255, 0.55);
}
.chrome__right {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.chrome__live {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan-soft);
}
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ---------- Progress bar ---------- */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0; height: 2px;
  z-index: 50;
  background: transparent;
}
.progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan-deep), var(--cyan));
  box-shadow: 0 0 12px rgba(83, 230, 255, 0.7);
}

/* ---------- Scroll stage ---------- */
#scroller { height: 950vh; }

.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

/* ---------- Video ---------- */
.logo {
  position: absolute;
  inset: clamp(32px, 5.5vw, 90px);
  width: auto;
  height: auto;
  object-fit: cover;
  opacity: 1;
  will-change: transform;
  border-radius: 18px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.65), 0 0 0 1px rgba(83,230,255,0.08);
  overflow: hidden;
}

/* ---------- Overlay layers ---------- */
.layer { position: absolute; inset: 0; pointer-events: none; }
.layer--grid {
  background-image: radial-gradient(circle, rgba(83, 230, 255, 0.05) 1px, transparent 1.2px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 78%);
}
.layer--vignette {
  background: radial-gradient(ellipse at center, transparent 45%, rgba(2,4,6,0.85) 100%);
  opacity: 0.7;
  transition: opacity 0.3s linear;
}
/* ---------- Text depth panels ---------- */
/* .panel kept for optional use */
.panel {
  background: rgba(2, 4, 6, 0.45);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid rgba(83, 230, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.55);
  padding: clamp(18px, 3vw, 32px) clamp(20px, 4vw, 48px);
}


/* ---------- Hero ---------- */
.hero {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(28px, 5vw, 80px);
  z-index: 10;
}
.hero__eyebrow, .hero__title, .hero__sub {
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 24px rgba(0,0,0,0.85), 0 0 30px rgba(0,0,0,0.6);
}
.hero__title { filter: drop-shadow(0 8px 32px rgba(0,0,0,0.7)); }
.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.4vw, 13px);
  letter-spacing: 0.42em;
  color: var(--cyan);
  text-shadow: 0 0 16px rgba(83, 230, 255, 0.45);
  margin-bottom: clamp(18px, 3vh, 30px);
}
.hero__title {
  font-size: clamp(64px, 16vw, 200px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-shadow: 0 0 40px rgba(83, 230, 255, 0.25), 0 2px 20px rgba(0,0,0,0.8);
}
.hero__sub {
  margin-top: clamp(18px, 3vh, 30px);
  font-size: clamp(16px, 2.2vw, 22px);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}
.hero__scrollhint {
  position: absolute;
  bottom: clamp(28px, 6vh, 60px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.34em;
  color: var(--muted);
}
.hint__line {
  display: block;
  width: 1px; height: 42px;
  background: linear-gradient(180deg, var(--cyan), transparent);
  box-shadow: 0 0 10px rgba(83, 230, 255, 0.5);
  animation: drop 1.8s ease-in-out infinite;
}
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Chapters ---------- */
.chapter {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(28px, 5vw, 80px);
  z-index: 11;
  opacity: 0;
  will-change: opacity, transform;
}
.chapter__title, .chapter__body, .chapter__index {
  text-shadow: 0 2px 20px rgba(0,0,0,0.8), 0 0 12px rgba(0,0,0,0.5);
}
.chapter__body {
  background: rgba(2,4,6,0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid rgba(83,230,255,0.06);
}
.chapter__index {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--cyan);
  margin-bottom: 20px;
  text-shadow: 0 0 14px rgba(83, 230, 255, 0.5);
}
.chapter__title {
  font-size: clamp(40px, 8vw, 110px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 18px rgba(0,0,0,0.7), 0 0 10px rgba(83,230,255,0.12);
}
.chapter__body {
  margin-top: 24px;
  max-width: 560px;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.6;
  color: var(--ink-dim);
}

/* ---------- CTA ---------- */
.cta {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(28px, 5vw, 80px);
  z-index: 12;
  opacity: 0;
  will-change: opacity;
}
.cta__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.42em;
  color: var(--cyan);
  margin-bottom: 18px;
  text-shadow: 0 0 14px rgba(83, 230, 255, 0.5);
}
.cta__title {
  font-size: clamp(34px, 6vw, 72px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 34px;
  text-shadow: 0 2px 18px rgba(0,0,0,0.7), 0 0 10px rgba(83,230,255,0.12);
}
.cta__form {
  display: flex;
  gap: 12px;
  width: min(460px, 100%);
  flex-wrap: wrap;
  justify-content: center;
}
.cta__form input {
  flex: 1 1 220px;
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ink);
  background: rgba(83, 230, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cta__form input::placeholder { color: var(--muted); }
.cta__form input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(83, 230, 255, 0.15), 0 0 22px rgba(83, 230, 255, 0.15);
}
.cta__form button {
  padding: 16px 26px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: #02141a;
  background: linear-gradient(135deg, var(--cyan-soft), var(--cyan));
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 0 24px rgba(83, 230, 255, 0.35);
}
.cta__form button:hover { transform: translateY(-1px); box-shadow: 0 0 34px rgba(83, 230, 255, 0.55); }
.cta__form button:active { transform: translateY(0); }
.cta__note, .cta__ok {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.cta__ok { color: var(--cyan-soft); text-shadow: 0 0 12px rgba(83,230,255,0.4); }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 34px clamp(20px, 4vw, 56px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
  border-top: 1px solid rgba(83, 230, 255, 0.08);
}
.footer__sep { color: var(--cyan-deep); }
.footer__right { margin-left: auto; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hint__line, .dot { animation: none; }
}

@media (max-width: 640px) {
  .chrome__est { display: none; }
  .footer__right { display: none; }
}
