/* =========================================================
   Project CHIMERA — Neo-Noir Glitchwave Landing
   ========================================================= */

:root {
  --bg: #0A0A0A;
  --bg-2: #001F3F;
  --bg-3: #2A0A2A;
  --bg-elevated: #0f1218;
  --neon-cyan: #00FFFF;
  --neon-pink: #FF00FF;
  --neon-green: #39FF14;
  --neon-yellow: #FFFF00;
  --silver: #808080;
  --white: #FFFFFF;
  --text: #e8eef7;
  --text-dim: #8a93a3;
  --glass: rgba(0, 255, 255, 0.04);
  --glass-border: rgba(0, 255, 255, 0.18);
  --pink-border: rgba(255, 0, 255, 0.28);
  --font-display: "Orbitron", system-ui, sans-serif;
  --font-body: "Rajdhani", system-ui, sans-serif;
  --font-mono: "Share Tech Mono", ui-monospace, monospace;
  --header-h: 72px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --glow-cyan: 0 0 20px rgba(0, 255, 255, 0.45), 0 0 40px rgba(0, 255, 255, 0.15);
  --glow-pink: 0 0 20px rgba(255, 0, 255, 0.45), 0 0 40px rgba(255, 0, 255, 0.15);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--neon-cyan) var(--bg);
}

body {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(0, 31, 63, 0.55), transparent 55%),
    radial-gradient(ellipse 60% 40% at 85% 20%, rgba(42, 10, 42, 0.5), transparent 50%),
    radial-gradient(ellipse 50% 50% at 50% 100%, rgba(0, 255, 255, 0.05), transparent 60%),
    var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  cursor: none;
}

body.is-booting {
  overflow: hidden;
}

body.nav-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
}

ul,
ol {
  list-style: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10000;
  padding: 12px 18px;
  background: var(--neon-cyan);
  color: #000;
  font-family: var(--font-mono);
  font-size: 14px;
  cursor: pointer;
}

.skip-link:focus {
  top: 16px;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.hl {
  color: var(--neon-cyan);
  text-shadow: 0 0 12px rgba(0, 255, 255, 0.4);
}

.hl-pink {
  color: var(--neon-pink);
  text-shadow: 0 0 12px rgba(255, 0, 255, 0.4);
}

.blink {
  animation: blink 1.2s step-end infinite;
  color: var(--neon-pink);
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ----- FX layers ----- */
.fx-canvas,
.grid-floor,
.noise,
.vignette,
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.fx-canvas {
  z-index: 0;
  opacity: 0.55;
}

.grid-floor {
  z-index: 0;
  background-image:
    linear-gradient(rgba(0, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  opacity: 0.7;
  transform: perspective(600px) rotateX(55deg) translateY(-10%) scale(1.4);
  transform-origin: center top;
}

.noise {
  z-index: 9000;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.vignette {
  z-index: 8999;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.75) 100%);
}

.scanlines {
  z-index: 8998;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.12) 2px,
    rgba(0, 0, 0, 0.12) 4px
  );
  opacity: 0.35;
}

/* Custom cursor */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10001;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity 0.3s;
}

body.has-cursor .cursor-dot,
body.has-cursor .cursor-ring {
  opacity: 1;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(0, 255, 255, 0.7);
  transition: width 0.2s, height 0.2s, border-color 0.2s, opacity 0.3s;
}

body.cursor-hover .cursor-ring {
  width: 54px;
  height: 54px;
  border-color: var(--neon-pink);
}

@media (hover: none), (pointer: coarse) {
  body { cursor: auto; }
  .cursor-dot,
  .cursor-ring { display: none; }
}

/* ----- Boot ----- */
.boot {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  background: #050505;
  transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}

.boot.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot__panel {
  width: min(560px, calc(100% - 32px));
  text-align: center;
}

.boot__ascii {
  font-family: var(--font-mono);
  font-size: clamp(5px, 1.4vw, 10px);
  line-height: 1.15;
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
  margin-bottom: 20px;
  overflow: hidden;
}

.boot__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--neon-pink);
  margin-bottom: 16px;
}

.boot__log {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  min-height: 4.5em;
  text-align: left;
  margin-bottom: 18px;
}

.boot__log div {
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}

.boot__log .ok { color: var(--neon-green); }
.boot__log .warn { color: var(--neon-yellow); }

@keyframes fadeIn {
  to { opacity: 1; }
}

.boot__track {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 10px;
}

.boot__track span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
  box-shadow: var(--glow-cyan);
  transition: width 0.15s linear;
}

.boot__pct {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.25em;
  color: var(--neon-cyan);
}

.boot__scan {
  z-index: 1;
  opacity: 0.5;
}

/* ----- HUD frame ----- */
.hud-frame {
  position: fixed;
  inset: 12px;
  z-index: 50;
  pointer-events: none;
  border: 1px solid rgba(0, 255, 255, 0.08);
}

.hud-frame__c {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--neon-cyan);
  border-style: solid;
  border-width: 0;
  opacity: 0.7;
}

.hud-frame__c--tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.hud-frame__c--tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.hud-frame__c--bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.hud-frame__c--br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }

.hud-frame__readout {
  position: absolute;
  display: flex;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(0, 255, 255, 0.55);
  top: 8px;
}

.hud-frame__readout--l { left: 28px; }
.hud-frame__readout--r { right: 28px; }

.pulse {
  animation: pulseOpacity 1.8s ease-in-out infinite;
}

@keyframes pulseOpacity {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ----- Header ----- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(16px, 3vw, 40px);
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.92), rgba(10, 10, 10, 0.55) 70%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

.header.is-scrolled {
  border-bottom-color: rgba(0, 255, 255, 0.12);
  background: rgba(10, 10, 10, 0.88);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
  cursor: none;
}

.brand__mark {
  color: var(--neon-cyan);
  filter: drop-shadow(0 0 8px rgba(0, 255, 255, 0.5));
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__text strong {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.18em;
}

.brand__text small {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.12em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  border: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s, background 0.2s;
  cursor: none;
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--neon-cyan);
  border-color: var(--glass-border);
  background: var(--glass);
  box-shadow: inset 0 0 12px rgba(0, 255, 255, 0.08);
  outline: none;
}

.nav__link--cta {
  color: var(--neon-pink);
  border-color: var(--pink-border);
}

.nav__link--cta:hover,
.nav__link--cta:focus-visible {
  color: #fff;
  border-color: var(--neon-pink);
  box-shadow: var(--glow-pink);
}

.nav__idx {
  color: rgba(0, 255, 255, 0.4);
  font-size: 9px;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
}

.sound-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  cursor: none;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.sound-btn:hover,
.sound-btn[aria-pressed="true"] {
  color: var(--neon-green);
  border-color: rgba(57, 255, 20, 0.4);
  box-shadow: 0 0 14px rgba(57, 255, 20, 0.2);
}

.sound-btn__bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.sound-btn__bars i {
  display: block;
  width: 2px;
  background: currentColor;
  height: 40%;
  animation: none;
}

.sound-btn[aria-pressed="true"] .sound-btn__bars i {
  animation: barPulse 0.8s ease-in-out infinite alternate;
}

.sound-btn[aria-pressed="true"] .sound-btn__bars i:nth-child(1) { animation-delay: 0s; height: 50%; }
.sound-btn[aria-pressed="true"] .sound-btn__bars i:nth-child(2) { animation-delay: 0.1s; height: 90%; }
.sound-btn[aria-pressed="true"] .sound-btn__bars i:nth-child(3) { animation-delay: 0.2s; height: 60%; }
.sound-btn[aria-pressed="true"] .sound-btn__bars i:nth-child(4) { animation-delay: 0.3s; height: 80%; }

@keyframes barPulse {
  to { transform: scaleY(0.4); }
}

.burger {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--glass-border);
  cursor: none;
}

.burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--neon-cyan);
  transition: transform 0.3s, opacity 0.3s;
}

.burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ----- Buttons ----- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid transparent;
  overflow: hidden;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s, border-color 0.25s, background 0.25s;
  cursor: none;
}

.btn__label {
  position: relative;
  z-index: 1;
}

.btn__corners::before,
.btn__corners::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  transition: width 0.25s, height 0.25s;
}

.btn__corners::before {
  top: -1px;
  left: -1px;
  border-right: 0;
  border-bottom: 0;
}

.btn__corners::after {
  right: -1px;
  bottom: -1px;
  border-left: 0;
  border-top: 0;
}

.btn--primary {
  color: #001018;
  background: linear-gradient(135deg, var(--neon-cyan), #00c8c8 40%, var(--neon-pink));
  background-size: 200% 200%;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--glow-cyan);
  animation: btnShift 6s ease infinite;
}

.btn--primary .btn__corners {
  color: #001018;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--glow-cyan), var(--glow-pink);
  outline: none;
}

.btn--ghost {
  color: var(--neon-cyan);
  background: rgba(0, 255, 255, 0.04);
  border-color: var(--glass-border);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: rgba(0, 255, 255, 0.1);
  box-shadow: inset 0 0 20px rgba(0, 255, 255, 0.1), 0 0 18px rgba(0, 255, 255, 0.2);
  outline: none;
}

@keyframes btnShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ----- Glitch text ----- */
.glitch {
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.glitch:hover::before,
.glitch.is-glitching::before {
  opacity: 0.8;
  color: var(--neon-cyan);
  animation: glitchTop 0.35s linear;
  clip-path: inset(0 0 55% 0);
}

.glitch:hover::after,
.glitch.is-glitching::after {
  opacity: 0.8;
  color: var(--neon-pink);
  animation: glitchBottom 0.35s linear;
  clip-path: inset(45% 0 0 0);
}

@keyframes glitchTop {
  0% { transform: translate(0); }
  20% { transform: translate(-3px, -1px); }
  40% { transform: translate(3px, 1px); }
  60% { transform: translate(-2px, 0); }
  80% { transform: translate(2px, -1px); }
  100% { transform: translate(0); }
}

@keyframes glitchBottom {
  0% { transform: translate(0); }
  20% { transform: translate(3px, 1px); }
  40% { transform: translate(-3px, -1px); }
  60% { transform: translate(2px, 0); }
  80% { transform: translate(-2px, 1px); }
  100% { transform: translate(0); }
}

/* ----- Sections common ----- */
main {
  position: relative;
  z-index: 1;
}

.section {
  position: relative;
  padding: clamp(80px, 12vw, 140px) 0;
}

.section--alt {
  background: linear-gradient(180deg, transparent, rgba(0, 31, 63, 0.25) 40%, rgba(42, 10, 42, 0.2) 70%, transparent);
}

.section__idx {
  position: absolute;
  top: 40px;
  right: clamp(16px, 4vw, 48px);
  font-family: var(--font-display);
  font-size: clamp(64px, 12vw, 140px);
  font-weight: 900;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 255, 255, 0.08);
  pointer-events: none;
  user-select: none;
}

.section__head {
  margin-bottom: clamp(36px, 6vw, 64px);
  max-width: 720px;
}

.section__label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--neon-pink);
  margin-bottom: 14px;
  text-shadow: 0 0 10px rgba(255, 0, 255, 0.35);
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  text-shadow: 0 0 30px rgba(0, 255, 255, 0.15);
}

.section__lead {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 560px;
}

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
  padding:
    calc(var(--header-h) + 40px)
    clamp(16px, 4vw, 64px)
    80px;
}

.hero__bg-word {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(80px, 18vw, 220px);
  letter-spacing: 0.08em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 255, 255, 0.06);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.hero__orb {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 255, 255, 0.18), transparent 65%);
  filter: blur(20px);
  top: 15%;
  right: 8%;
  animation: orbFloat 10s ease-in-out infinite;
  pointer-events: none;
}

.hero__orb--2 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(255, 0, 255, 0.16), transparent 65%);
  top: auto;
  bottom: 10%;
  right: 30%;
  animation-delay: -4s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-20px, 24px) scale(1.08); }
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__warning {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--neon-yellow);
  border: 1px solid rgba(255, 255, 0, 0.25);
  background: rgba(255, 255, 0, 0.04);
  padding: 8px 14px;
  margin-bottom: 24px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(40px, 8vw, 80px);
  line-height: 1.1;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}

.hero__title .glitch {
  display: block;
}

.glitch--accent {
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
}

.hero__lead {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-dim);
  max-width: 520px;
  margin-bottom: 32px;
}

.hero__lead strong {
  color: var(--white);
  font-weight: 700;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 40px;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.stat__val {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  color: var(--neon-cyan);
  text-shadow: 0 0 16px rgba(0, 255, 255, 0.4);
  line-height: 1.2;
}

.stat__lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--text-dim);
}

.hero__hud {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.hero__hud-box {
  width: min(100%, 320px);
  background: rgba(5, 8, 14, 0.72);
  border: 1px solid var(--glass-border);
  box-shadow: 0 0 40px rgba(0, 255, 255, 0.08), inset 0 0 30px rgba(0, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  padding: 16px;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

.hero__hud-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--neon-cyan);
  margin-bottom: 10px;
}

.hero__hud-svg {
  width: 100%;
  height: auto;
  margin-bottom: 10px;
}

.pulse-ring {
  transform-origin: 140px 40px;
  animation: ringPulse 2s ease-out infinite;
}

@keyframes ringPulse {
  0% { opacity: 0.6; transform: scale(0.6); }
  100% { opacity: 0; transform: scale(1.8); }
}

.hero__hud-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}

.hero__scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--text-dim);
  z-index: 2;
  cursor: none;
  transition: color 0.2s;
}

.hero__scroll:hover {
  color: var(--neon-cyan);
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--neon-cyan), transparent);
  animation: scrollLine 1.6s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  60% { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ----- Prologue ----- */
.prologue {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}

.prologue__text p {
  margin-bottom: 16px;
  color: var(--text-dim);
}

.prologue__text p:last-of-type {
  margin-bottom: 24px;
}

.prologue__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prologue__tags li {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 6px 10px;
  border: 1px solid rgba(255, 0, 255, 0.3);
  color: var(--neon-pink);
  background: rgba(255, 0, 255, 0.05);
}

.terminal {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--glass-border);
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.06);
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.terminal__bar,
.terminal__foot {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  background: rgba(0, 255, 255, 0.04);
  border-bottom: 1px solid rgba(0, 255, 255, 0.1);
}

.terminal__foot {
  border-bottom: 0;
  border-top: 1px solid rgba(0, 255, 255, 0.1);
  margin-top: auto;
}

.terminal__body {
  flex: 1;
  padding: 18px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--neon-green);
  white-space: pre-wrap;
  min-height: 180px;
}

.terminal__body .cursor-blink {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--neon-green);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

/* ----- Modules ----- */
.modules {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.module {
  position: relative;
  padding: 28px 24px;
  background: linear-gradient(145deg, rgba(0, 255, 255, 0.04), rgba(255, 0, 255, 0.03));
  border: 1px solid var(--glass-border);
  transition: transform 0.35s var(--ease-out), border-color 0.35s, box-shadow 0.35s;
  overflow: hidden;
}

.module::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), var(--neon-pink), transparent);
  opacity: 0;
  transition: opacity 0.35s;
}

.module:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 255, 255, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 255, 255, 0.1);
}

.module:hover::before {
  opacity: 1;
}

.module__icon {
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  color: var(--neon-cyan);
  filter: drop-shadow(0 0 8px rgba(0, 255, 255, 0.35));
}

.module__icon svg {
  width: 100%;
  height: 100%;
}

.module__title {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.module__code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--neon-pink);
  margin-bottom: 12px;
}

.module__desc {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ----- Architecture ----- */
.arch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.arch__diagram {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.arch-layer {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--neon-cyan);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.arch-layer:hover {
  transform: translateX(6px);
  border-color: rgba(0, 255, 255, 0.4);
  box-shadow: -4px 0 20px rgba(0, 255, 255, 0.12);
}

.arch-layer[data-layer="1"] { border-left-color: var(--neon-pink); }
.arch-layer[data-layer="2"] { border-left-color: var(--neon-green); }
.arch-layer[data-layer="3"] { border-left-color: var(--neon-yellow); }

.arch-layer__code {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--neon-cyan);
}

.arch-layer strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.arch-layer p {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0;
}

.arch-layer__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--neon-green);
  padding: 4px 8px;
  border: 1px solid rgba(57, 255, 20, 0.3);
}

.arch__panels {
  display: grid;
  grid-template-columns: repeat(3, auto) 1fr;
  gap: 8px;
  align-content: start;
}

.arch-tab {
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  border: 1px solid var(--glass-border);
  cursor: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.arch-tab.is-active,
.arch-tab:hover {
  color: var(--neon-cyan);
  border-color: rgba(0, 255, 255, 0.45);
  background: rgba(0, 255, 255, 0.06);
}

.arch-panel {
  grid-column: 1 / -1;
  padding: 24px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
  margin-top: 4px;
}

.arch-panel[hidden] {
  display: none;
}

.arch-panel h3 {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  color: var(--neon-cyan);
}

.arch-panel p {
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 18px;
}

.arch-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.arch-bar span {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.arch-bar i {
  display: block;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.arch-bar i::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 0;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
  box-shadow: var(--glow-cyan);
  transition: width 1.2s var(--ease-out);
}

.arch-bar.is-on i::after {
  width: var(--w);
}

.arch-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.arch-list li {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--neon-green);
  padding-left: 16px;
  position: relative;
}

.arch-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--neon-pink);
}

.latency-meter {
  position: relative;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  overflow: hidden;
}

.latency-meter__fill {
  height: 100%;
  width: 42%;
  background: linear-gradient(90deg, var(--neon-green), var(--neon-cyan));
  box-shadow: var(--glow-cyan);
  transition: width 0.6s var(--ease-out);
}

.latency-meter__val {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.1em;
  mix-blend-mode: difference;
  color: #fff;
}

/* ----- Timeline ----- */
.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), var(--neon-pink), transparent);
  opacity: 0.4;
}

.timeline__item {
  position: relative;
  padding: 28px 22px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--glass-border);
  transition: transform 0.35s, border-color 0.35s, box-shadow 0.35s;
}

.timeline__item:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 0, 255, 0.4);
  box-shadow: 0 0 30px rgba(255, 0, 255, 0.1);
}

.timeline__node {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.timeline__phase {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--neon-cyan);
}

.timeline__status {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border: 1px solid rgba(128, 128, 128, 0.4);
  color: var(--silver);
}

.timeline__status.is-live {
  color: var(--neon-green);
  border-color: rgba(57, 255, 20, 0.45);
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.2);
  animation: pulseOpacity 1.8s ease-in-out infinite;
}

.timeline__title {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.timeline__desc {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.timeline__date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--neon-pink);
  letter-spacing: 0.1em;
}

/* ----- CTA ----- */
.cta-section {
  padding-bottom: clamp(100px, 14vw, 160px);
}

.cta-card {
  position: relative;
  text-align: center;
  padding: clamp(40px, 7vw, 72px) clamp(20px, 4vw, 48px);
  background:
    linear-gradient(145deg, rgba(0, 31, 63, 0.5), rgba(42, 10, 42, 0.45)),
    rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 255, 255, 0.25);
  box-shadow: 0 0 60px rgba(0, 255, 255, 0.08), inset 0 0 80px rgba(255, 0, 255, 0.04);
  overflow: hidden;
}

.cta-card__glitch {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 255, 0.02) 2px,
    rgba(0, 255, 255, 0.02) 4px
  );
  pointer-events: none;
  opacity: 0.5;
}

.cta-card__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 900;
  margin: 12px 0 18px;
  color: var(--white);
  text-shadow: var(--glow-cyan);
}

.cta-card__lead {
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 36px;
  font-size: 1.05rem;
}

.countdown {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 36px;
  padding: 16px 20px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.4);
}

.countdown__unit {
  min-width: 64px;
}

.countdown__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: var(--neon-cyan);
  text-shadow: 0 0 16px rgba(0, 255, 255, 0.45);
  line-height: 1.1;
}

.countdown__lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--text-dim);
}

.countdown__sep {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--neon-pink);
  opacity: 0.7;
  margin-bottom: 14px;
}

.reg-form {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.reg-form__row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.reg-form__input {
  flex: 1 1 240px;
  min-height: 52px;
  padding: 0 18px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--glass-border);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: none;
}

.reg-form__input::placeholder {
  color: rgba(138, 147, 163, 0.7);
}

.reg-form__input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 1px rgba(0, 255, 255, 0.3), var(--glow-cyan);
}

.reg-form__input.is-invalid {
  border-color: var(--neon-pink);
  box-shadow: 0 0 12px rgba(255, 0, 255, 0.25);
}

.reg-form__hint {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.reg-form__msg {
  margin-top: 14px;
  min-height: 1.4em;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--neon-green);
}

.reg-form__msg.is-error {
  color: var(--neon-pink);
}

/* ----- Footer ----- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(0, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.55);
  padding-top: 48px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 28px;
  align-items: center;
  padding-bottom: 32px;
}

.footer__brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.footer__brand .brand__mark {
  color: var(--neon-cyan);
  font-size: 22px;
  line-height: 1;
}

.footer__brand strong {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.14em;
  display: block;
  margin-bottom: 4px;
}

.footer__brand p {
  font-size: 13px;
  color: var(--text-dim);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer__links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  cursor: none;
}

.footer__links a:hover,
.footer__links a:focus-visible {
  color: var(--neon-cyan);
  border-bottom-color: var(--neon-cyan);
  outline: none;
}

.footer__social {
  display: flex;
  gap: 10px;
}

.social {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  cursor: none;
}

.social:hover,
.social:focus-visible {
  color: var(--neon-pink);
  border-color: var(--neon-pink);
  box-shadow: var(--glow-pink);
  transform: translateY(-2px);
  outline: none;
}

.footer__copy {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 18px 20px;
  text-align: center;
}

.footer__copy p {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--silver);
}

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ----- Responsive ----- */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-bottom: 100px;
  }

  .hero__hud {
    justify-content: flex-start;
  }

  .hero__hud-box {
    width: min(100%, 360px);
  }

  .timeline::before {
    display: none;
  }
}

@media (max-width: 860px) {
  body {
    cursor: auto;
    font-size: 16px;
  }

  .burger {
    display: grid;
  }

  .nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    background: rgba(5, 5, 8, 0.96);
    backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1;
  }

  body.nav-open .nav {
    opacity: 1;
    visibility: visible;
  }

  .nav__link {
    font-size: 16px;
    padding: 14px 24px;
  }

  .prologue,
  .arch,
  .modules,
  .timeline,
  .footer__grid {
    grid-template-columns: 1fr;
  }

  .hud-frame__readout {
    display: none;
  }

  .section__idx {
    font-size: 72px;
    opacity: 0.5;
  }

  .reg-form__row {
    flex-direction: column;
  }

  .reg-form__input,
  .reg-form .btn {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .hero__cta {
    flex-direction: column;
  }

  .hero__cta .btn {
    width: 100%;
  }

  .countdown {
    gap: 4px;
    padding: 12px;
  }

  .countdown__unit {
    min-width: 48px;
  }

  .countdown__num {
    font-size: 22px;
  }

  .boot__ascii {
    font-size: 4px;
  }

  .sound-btn__label strong {
    display: inline;
  }
}

/* Focus visible for keyboard */
:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 3px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}
