/* ==========================================================================
   AI RolePlay — Layout: scene background · navbar · mobile nav · footer ·
   intro · audio dock · page transition · reveal · keyframes
   ========================================================================== */

/* ── Scene: 6-layer cinematic background ───────────────────────────────── */
.scene { position: fixed; inset: 0; z-index: var(--z-bg); pointer-events: none; overflow: hidden; }
.scene > * { position: absolute; inset: 0; }
/* L1 — dark gradient */
.scene-gradient {
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(var(--accent-tertiary-rgb), 0.16), transparent 60%),
    radial-gradient(900px 600px at 0% 20%, rgba(var(--accent-secondary-rgb), 0.1), transparent 60%),
    radial-gradient(800px 500px at 50% 110%, rgba(var(--accent-primary-rgb), 0.08), transparent 60%),
    linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 55%, var(--bg-primary) 100%);
}
/* L2 — cinematic city image (blurred atmosphere) */
.scene-image {
  inset: -6% -4%;
  background: url("../img/brand/city-blur.0a633f970c5b.webp") center 30% / cover no-repeat;
  opacity: 0.22;
  transform: translate3d(0, var(--scene-y, 0px), 0) scale(1.06);
  will-change: transform;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.7) 45%, transparent 90%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.7) 45%, transparent 90%);
}
.scene.is-quiet .scene-image { opacity: 0.1; }
/* L3 — animated blurred lights */
.scene-lights span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  will-change: transform;
}
.scene-lights span:nth-child(1) { width: 46vw; height: 46vw; top: -12vw; right: -10vw; background: rgba(var(--accent-tertiary-rgb), 0.55); animation: drift-a 26s var(--ease-in-out) infinite alternate; }
.scene-lights span:nth-child(2) { width: 38vw; height: 38vw; bottom: -14vw; left: -8vw; background: rgba(var(--accent-secondary-rgb), 0.45); animation: drift-b 32s var(--ease-in-out) infinite alternate; }
.scene-lights span:nth-child(3) { width: 24vw; height: 24vw; top: 40%; left: 38%; background: rgba(var(--accent-primary-rgb), 0.28); animation: drift-c 38s var(--ease-in-out) infinite alternate; }
/* L4 — particles (canvas, drawn by fx.js) */
.scene-particles { width: 100%; height: 100%; opacity: 0.8; }
/* L5 — film noise */
.scene-noise {
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
/* L6 — vignette / glass overlay */
.scene-vignette { background: radial-gradient(ellipse at 50% 40%, transparent 40%, rgba(0, 0, 0, 0.55) 100%); }

/* Cursor glow (desktop only) */
.cursor-glow {
  position: fixed; z-index: var(--z-bg); top: 0; left: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(var(--accent-primary-rgb), 0.07), transparent 60%);
  transform: translate3d(var(--cx, -999px), var(--cy, -999px), 0);
  transition: opacity var(--dur-slow);
}
@media (hover: none), (pointer: coarse) { .cursor-glow { display: none; } }

/* Fog & light streaks (hero / intro) */
.fog { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.fog::before, .fog::after {
  content: ""; position: absolute; inset: -20% -40%;
  background:
    radial-gradient(40% 30% at 30% 70%, rgba(180, 200, 255, 0.08), transparent 70%),
    radial-gradient(35% 25% at 70% 80%, rgba(155, 123, 255, 0.07), transparent 70%),
    radial-gradient(30% 20% at 50% 60%, rgba(0, 215, 255, 0.05), transparent 70%);
  filter: blur(30px);
  animation: fog-drift 40s linear infinite;
}
.fog::after { animation-duration: 64s; animation-direction: reverse; opacity: 0.7; }
.streaks { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.streaks span {
  position: absolute; height: 1px; width: 32vw; right: -40vw;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-primary-rgb), 0.9), rgba(255, 255, 255, 0.9));
  filter: drop-shadow(0 0 6px rgba(var(--accent-primary-rgb), 0.9));
  opacity: 0;
  animation: streak 7s linear infinite;
}
.streaks span:nth-child(1) { top: 62%; animation-delay: 0.4s; }
.streaks span:nth-child(2) { top: 71%; animation-delay: 2.8s; width: 20vw; background: linear-gradient(90deg, transparent, rgba(var(--accent-crimson-rgb), 0.9), rgba(255, 200, 220, 0.9)); filter: drop-shadow(0 0 6px rgba(var(--accent-crimson-rgb), 0.9)); }
.streaks span:nth-child(3) { top: 78%; animation-delay: 4.6s; width: 26vw; }
.streaks span:nth-child(4) { top: 66%; animation-delay: 6.1s; width: 16vw; background: linear-gradient(90deg, transparent, rgba(var(--accent-secondary-rgb), 0.9), #fff); }

/* ── Announcement bar ──────────────────────────────────────────────────── */
.announce {
  position: relative; z-index: calc(var(--z-nav) + 1);
  display: flex; justify-content: center; align-items: center; gap: 10px;
  padding: 8px 16px; font-size: 0.86rem; font-weight: 600; color: var(--text-primary);
  background: linear-gradient(90deg, rgba(var(--accent-secondary-rgb), 0.22), rgba(var(--accent-primary-rgb), 0.22));
  border-bottom: 1px solid var(--glass-border);
}
.announce a { color: var(--accent-primary); text-decoration: underline; text-underline-offset: 4px; }

/* ── Navbar ────────────────────────────────────────────────────────────── */
.nav {
  position: fixed; z-index: var(--z-nav); top: 12px; inset-inline: 0;
  transition: transform var(--dur-slow) var(--ease-out), top var(--dur) var(--ease-out);
}
.has-announce .nav { top: 48px; }
.has-announce.is-scrolled .nav { top: 12px; }
.nav.is-hidden { transform: translateY(calc(-100% - 70px)); }
.nav-inner {
  display: flex; align-items: center; gap: 14px;
  height: var(--nav-h); padding: 0 14px 0 12px; padding-inline-start: 18px;
  border-radius: 20px;
  background: rgba(9, 13, 20, 0.52);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: background var(--dur) var(--ease-out), border-color var(--dur);
}
.is-scrolled .nav-inner { background: rgba(9, 13, 20, 0.78); border-color: var(--glass-border-strong); }
.nav-brand { display: flex; align-items: center; gap: 10px; flex: none; }
.nav-brand img { height: 40px; width: auto; filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.12)); transition: filter var(--dur); }
.nav-brand:hover img { filter: drop-shadow(0 0 16px rgba(var(--accent-primary-rgb), 0.45)); }
.nav-links { display: flex; align-items: center; gap: 2px; margin-inline: auto; }
.nav-link {
  position: relative; padding: 8px 10px; border-radius: 10px;
  font-size: 0.87rem; font-weight: 600; color: var(--text-secondary); white-space: nowrap;
  transition: color var(--dur) var(--ease-out), background var(--dur);
}
.nav-link::after {
  content: ""; position: absolute; right: 10px; left: 10px; bottom: 2px; height: 2px; border-radius: 2px;
  background: var(--gradient-brand); transform: scaleX(0); transform-origin: center;
  transition: transform var(--dur-slow) var(--ease-out);
}
.nav-link:hover { color: var(--text-primary); }
.nav-link:hover::after { transform: scaleX(0.6); }
.nav-link.is-active { color: var(--text-primary); }
.nav-link.is-active::after { transform: scaleX(1); box-shadow: 0 0 10px rgba(var(--accent-primary-rgb), 0.8); }
.nav-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.nav-icon-btn {
  position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px;
  color: var(--text-secondary); border: 1px solid transparent;
  transition: all var(--dur) var(--ease-out);
}
.nav-icon-btn:hover { color: var(--text-primary); background: var(--glass-bg); border-color: var(--glass-border); }
.nav-icon-btn.discord:hover { color: #aab3ff; }
.nav-account { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; padding-inline-start: 4px; border-radius: 13px; border: 1px solid var(--glass-border); background: var(--glass-bg); transition: all var(--dur); }
.nav-account:hover { border-color: var(--glass-border-strong); background: var(--glass-bg-hover); }
.nav-account .name { font-size: 0.85rem; font-weight: 700; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-menu-btn { display: none; }
.nav-dropdown { position: relative; }

@media (max-width: 1320px) {
  .nav-link { padding: 8px 8px; font-size: 0.84rem; }
  .nav-account .name { display: none; }
  .nav-account { padding: 4px; }
}
@media (max-width: 1180px) {
  .nav-links { display: none; }
  .nav-menu-btn { display: grid; }
  .nav-actions { margin-inline-start: auto; }
}
@media (max-width: 767px) {
  .nav { top: 8px; }
  .nav-inner { height: 58px; border-radius: 16px; padding-inline-start: 12px; }
  .nav-brand img { height: 34px; }
  .nav-actions .hide-sm { display: none; }
  :root { --nav-h: 58px; }
}

/* Mobile full-screen menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  display: flex; flex-direction: column; padding: 90px 24px 110px;
  background: rgba(5, 7, 11, 0.9);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  opacity: 0; visibility: hidden; transition: opacity var(--dur) var(--ease-out), visibility var(--dur);
  overflow-y: auto;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu-links { display: grid; gap: 4px; }
.mobile-menu-links a {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px;
  font-size: 1.1rem; font-weight: 700; color: var(--text-secondary);
  opacity: 0; transform: translateY(12px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out), background var(--dur), color var(--dur);
  transition-delay: calc(var(--i, 0) * 35ms);
}
.mobile-menu.is-open .mobile-menu-links a { opacity: 1; transform: none; }
.mobile-menu-links a:hover, .mobile-menu-links a.is-active { color: var(--text-primary); background: var(--glass-bg); }
.mobile-menu-links a.is-active .icon { color: var(--accent-primary); }
.mobile-menu-foot { margin-top: 28px; display: grid; gap: 10px; }

/* Bottom navigation (phones) */
.bottom-nav { display: none; }
@media (max-width: 767px) {
  .bottom-nav {
    position: fixed; z-index: var(--z-nav); bottom: 10px; inset-inline: 10px;
    display: grid; grid-template-columns: repeat(5, 1fr);
    height: 64px; padding: 6px; border-radius: 20px;
    background: rgba(9, 13, 20, 0.86); border: 1px solid var(--glass-border-strong);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 -10px 40px -20px rgba(0, 0, 0, 0.9);
    padding-bottom: calc(6px + env(safe-area-inset-bottom) * 0.4);
  }
  .bottom-nav a {
    display: grid; justify-items: center; align-content: center; gap: 3px; border-radius: 14px;
    font-size: 0.68rem; font-weight: 700; color: var(--text-muted);
    transition: color var(--dur), background var(--dur);
  }
  .bottom-nav a.is-active { color: var(--text-primary); background: var(--glass-bg-strong); }
  .bottom-nav a.is-active .icon { color: var(--accent-primary); filter: drop-shadow(0 0 8px rgba(var(--accent-primary-rgb), 0.8)); }
  .bottom-nav a.cta .icon { color: var(--text-on-accent); background: var(--gradient-brand); border-radius: 12px; padding: 6px; width: 34px; height: 34px; box-shadow: 0 6px 18px -6px rgba(var(--accent-primary-rgb), 0.8); }
  body { padding-bottom: 86px; }
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.footer { position: relative; z-index: var(--z-content); margin-top: var(--section-y); border-top: 1px solid var(--glass-border); background: linear-gradient(180deg, rgba(9, 13, 20, 0.4), rgba(5, 7, 11, 0.95)); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-block: 64px 40px; }
.footer-brand img { height: 56px; width: auto; margin-bottom: 18px; }
.footer-brand p { font-size: 0.92rem; max-width: 34ch; }
.footer h4 { font-size: 0.8rem; font-family: var(--font-display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 16px; direction: ltr; text-align: right; }
.footer-links { display: grid; gap: 10px; list-style: none; padding: 0; }
.footer-links a { font-size: 0.92rem; color: var(--text-secondary); transition: color var(--dur); display: inline-flex; align-items: center; gap: 8px; }
.footer-links a:hover { color: var(--accent-primary); }
.socials { display: flex; gap: 8px; margin-top: 20px; }
.socials a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--glass-border); background: var(--glass-bg); color: var(--text-secondary); transition: all var(--dur) var(--ease-out); }
.socials a:hover { color: var(--text-primary); border-color: var(--glass-border-strong); transform: translateY(-2px); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-block: 22px 28px; border-top: 1px solid rgba(255, 255, 255, 0.05); font-size: 0.82rem; color: var(--text-muted); }
.footer-bottom p { color: var(--text-muted); font-size: 0.82rem; }
.footer-status { display: grid; gap: 12px; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ── Audio dock ────────────────────────────────────────────────────────── */
.audio-dock { position: fixed; z-index: var(--z-overlay); inset-inline-start: 20px; bottom: 20px; }
.audio-toggle {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px 0 12px;
  border-radius: 14px; border: 1px solid var(--glass-border-strong);
  background: rgba(9, 13, 20, 0.75); color: var(--text-secondary);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  transition: all var(--dur) var(--ease-out);
}
.audio-toggle:hover { color: var(--text-primary); border-color: rgba(var(--accent-primary-rgb), 0.4); }
.audio-toggle .label { font-size: 0.78rem; font-weight: 700; }
.eq { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq i { width: 3px; height: 30%; border-radius: 2px; background: var(--text-muted); transition: background var(--dur); }
.is-playing .eq i { background: var(--accent-primary); animation: eq 900ms ease-in-out infinite alternate; }
.is-playing .eq i:nth-child(2) { animation-delay: -300ms; }
.is-playing .eq i:nth-child(3) { animation-delay: -600ms; }
.is-playing .eq i:nth-child(4) { animation-delay: -150ms; }
.audio-panel {
  position: absolute; bottom: calc(100% + 10px); inset-inline-start: 0; width: 280px; padding: 16px;
  border-radius: 16px; background: rgba(14, 18, 27, 0.95);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: all var(--dur) var(--ease-out);
}
.audio-dock.is-open .audio-panel { opacity: 1; visibility: visible; transform: none; }
.audio-track { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.audio-track .art { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--gradient-brand); color: var(--text-on-accent); flex: none; }
.audio-track .title { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); direction: ltr; text-align: right; }
.audio-track .sub { font-size: 0.74rem; color: var(--text-muted); }
.audio-row { display: flex; align-items: center; gap: 12px; }
.audio-note { font-size: 0.72rem; color: var(--text-faint); margin-top: 10px; }
.toast-stack { bottom: 76px; }
@media (max-width: 767px) {
  /* Phones: compact dock under the navbar so it never covers forms or the bottom nav. */
  .audio-dock { bottom: auto; top: calc(var(--nav-h) + 16px); inset-inline-start: auto; inset-inline-end: 12px; }
  .audio-panel { bottom: auto; top: calc(100% + 10px); inset-inline-start: auto; inset-inline-end: 0; }
  .audio-toggle { height: 36px; padding: 0 9px; border-radius: 11px; }
  .audio-toggle .label, .audio-toggle .eq { display: none; }
  .is-playing .audio-toggle[data-audio-toggle] { color: var(--accent-primary); border-color: rgba(var(--accent-primary-rgb), 0.45); }
  .toast-stack { bottom: 90px; inset-inline-start: 12px; width: calc(100vw - 24px); }
}

/* ── Page transition ───────────────────────────────────────────────────── */
.page-curtain {
  position: fixed; inset: 0; z-index: calc(var(--z-intro) - 1); pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(9, 13, 20, 0.7), rgba(5, 7, 11, 0.98));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 260ms var(--ease-in-out);
}
html.is-leaving .page-curtain { opacity: 1; }
html.js .page-main { animation: page-in 520ms var(--ease-out) both; }

/* ── Reveal on scroll ──────────────────────────────────────────────────── */
html.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  filter: blur(6px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out), filter 700ms var(--ease-out);
  transition-delay: var(--d, 0ms);
}
html.js [data-reveal="fade"] { transform: none; }
html.js [data-reveal="scale"] { transform: scale(0.96); }
html.js [data-reveal].is-revealed { opacity: 1; transform: none; filter: none; }

/* ── Intro (cinematic entry) ───────────────────────────────────────────── */
.intro {
  position: fixed; inset: 0; z-index: var(--z-intro);
  display: grid; place-items: center; overflow: hidden;
  background: #020305;
  transition: opacity 900ms var(--ease-in-out), visibility 900ms, filter 900ms var(--ease-in-out);
}
/* Film layer: the video is the hero (logo is in the footage), the UI sits low */
.intro-film { position: absolute; inset: 0; overflow: hidden; background: #020305; }
.intro-film-backdrop { position: absolute; inset: -8%; width: 116%; height: 116%; object-fit: cover; filter: blur(28px) brightness(0.45) saturate(1.2); opacity: 0; animation: fade-in 2.4s var(--ease-out) 0.2s forwards; }
.intro-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  animation: intro-film-in 3.4s var(--ease-out) 0.25s both;
}
.intro-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 3, 5, 0.55) 0%, transparent 18%, transparent 52%, rgba(2, 3, 5, 0.78) 80%, rgba(2, 3, 5, 0.94) 100%),
    radial-gradient(ellipse at 50% 42%, transparent 45%, rgba(2, 3, 5, 0.55) 100%);
}
.intro-bars::before, .intro-bars::after { content: ""; position: absolute; left: 0; right: 0; z-index: 2; height: 0; background: #000; animation: intro-bars 1.6s var(--ease-in-out) 0.1s forwards; }
.intro-bars::before { top: 0; }
.intro-bars::after { bottom: 0; }
/* Portrait phones: keep the whole logo in frame instead of cropping the 16:9 shot */
@media (max-aspect-ratio: 4 / 5) {
  .intro-video {
    inset: auto; top: 9vh; left: 50%; height: 58vh; width: calc(58vh * 16 / 9); margin-left: calc(58vh * -8 / 9);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 80%, transparent);
    mask-image: linear-gradient(180deg, transparent, #000 14%, #000 80%, transparent);
  }
}
.intro .fog, .intro .streaks { z-index: 1; }
.intro .fog { opacity: 0.45; }
.intro-particles { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; }
.intro-content { position: relative; z-index: 3; align-self: end; display: grid; justify-items: center; gap: 14px; padding: 24px 24px max(9vh, 64px); text-align: center; }
.intro-tagline { font-family: var(--font-display); font-weight: 600; font-size: clamp(0.9rem, 0.8rem + 0.6vw, 1.2rem); letter-spacing: 0.42em; text-transform: uppercase; color: var(--text-primary); text-shadow: 0 2px 18px rgba(0, 0, 0, 0.8); direction: ltr; opacity: 0; transform: translateY(10px); animation: fade-up 1.2s var(--ease-out) 1.6s forwards; }
.intro-tagline-fa { font-size: 0.95rem; color: var(--text-secondary); text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8); opacity: 0; animation: fade-up 1.2s var(--ease-out) 1.9s forwards; }
.intro-enter { margin-top: 10px; opacity: 0; animation: fade-up 1s var(--ease-out) 2.3s forwards; }
.intro-enter .btn { --btn-h: 60px; --btn-px: 36px; font-size: 1.05rem; border-radius: 16px; background: rgba(8, 12, 18, 0.45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-color: rgba(255, 255, 255, 0.2); box-shadow: 0 0 0 1px rgba(var(--accent-primary-rgb), 0.15), 0 20px 60px -20px rgba(var(--accent-primary-rgb), 0.6); }
.intro-enter .btn:hover { background: rgba(var(--accent-primary-rgb), 0.12); border-color: rgba(var(--accent-primary-rgb), 0.55); box-shadow: 0 0 0 1px rgba(var(--accent-primary-rgb), 0.4), 0 24px 70px -18px rgba(var(--accent-primary-rgb), 0.85); }
.intro-enter .btn::before { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(var(--accent-primary-rgb), 0.5); animation: ring 2.4s var(--ease-out) 3s infinite; }
.intro-hint { font-size: 0.78rem; color: var(--text-faint); opacity: 0; animation: fade-in 1s ease 3s forwards; display: flex; align-items: center; gap: 8px; }
.intro-skip { position: absolute; z-index: 3; bottom: 24px; left: 24px; font-size: 0.82rem; color: var(--text-muted); padding: 8px 12px; border-radius: 10px; opacity: 0; animation: fade-in 1s ease 1.5s forwards; }
.intro-skip:hover { color: var(--text-primary); background: var(--glass-bg); }
.intro-lines { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px); mix-blend-mode: overlay; }
.intro.is-exiting { opacity: 0; visibility: hidden; filter: blur(18px); }
.intro.is-exiting .intro-video { animation: intro-film-out 900ms var(--ease-in-out) forwards; }
html.intro-active { overflow: hidden; }
html.intro-active .nav, html.intro-active .audio-dock, html.intro-active .bottom-nav { opacity: 0; }
.nav, .audio-dock, .bottom-nav { transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out), top var(--dur); }

/* ── Keyframes ─────────────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes status-pulse { 0% { transform: scale(0.6); opacity: 1; } 100% { transform: scale(2); opacity: 0; } }
@keyframes pulse-opacity { 50% { opacity: 0.3; } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.96); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(-24px); filter: blur(6px); } }
@keyframes drift-a { to { transform: translate3d(-8vw, 6vw, 0) scale(1.1); } }
@keyframes drift-b { to { transform: translate3d(10vw, -6vw, 0) scale(0.9); } }
@keyframes drift-c { to { transform: translate3d(-12vw, -8vw, 0) scale(1.2); } }
@keyframes fog-drift { from { transform: translate3d(-10%, 0, 0); } to { transform: translate3d(10%, 0, 0); } }
@keyframes streak { 0% { transform: translateX(0); opacity: 0; } 10% { opacity: 1; } 60% { opacity: 1; } 100% { transform: translateX(-190vw); opacity: 0; } }
@keyframes coin-sway { 0%, 100% { transform: rotateY(-22deg) rotateX(6deg); } 50% { transform: rotateY(22deg) rotateX(-4deg); } }
@keyframes coin-spin { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }
@keyframes coin-sheen { 0%, 60% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
@keyframes eq { from { height: 20%; } to { height: 100%; } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(var(--accent-primary-rgb), 0.45); } 100% { box-shadow: 0 0 0 18px rgba(var(--accent-primary-rgb), 0); } }
@keyframes intro-film-in { from { opacity: 0; filter: blur(18px) brightness(0.3); transform: scale(1.14); } to { opacity: 1; filter: none; transform: none; } }
@keyframes intro-film-out { to { transform: scale(1.3); filter: blur(6px) brightness(1.4); } }
@keyframes intro-bars { 0% { height: 0; } 100% { height: clamp(18px, 5.5vh, 64px); } }
@keyframes glow-pulse { 50% { opacity: 0.55; } }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes gradient-shift { to { background-position: 200% 50%; } }

/* ── Reduced motion ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
  .scene-lights, .scene-particles, .streaks, .fog, .cursor-glow, .intro-particles { display: none; }
  html.js [data-reveal] { opacity: 1; transform: none; filter: none; }
  .coin-body { animation: none !important; }
}
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
html.reduce-motion .scene-lights, html.reduce-motion .scene-particles, html.reduce-motion .streaks, html.reduce-motion .fog { display: none; }
html.reduce-motion [data-reveal] { opacity: 1 !important; transform: none !important; filter: none !important; }
@media (max-width: 767px) {
  .scene-lights span { filter: blur(60px); opacity: 0.25; }
  .scene-noise { display: none; }
}
