:root {
  color-scheme: dark;
  --ink: #050712;
  --paper: #eef7ff;
  --cyan: #68e8ff;
  --pink: #ff4fa3;
  --mx: 0;
  --my: 0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); }
body { margin: 0; background: var(--ink); color: var(--paper); font-family: Inter, "Helvetica Neue", Arial, sans-serif; overflow-x: hidden; }
button, a { font: inherit; }
button { color: inherit; }

.scene { min-height: 100svh; position: relative; isolation: isolate; overflow: hidden; perspective: 1000px; background: #050712; }
.art { position: absolute; inset: -5%; z-index: -4; background: url("assets/battle-4k.jpg") 50% 50% / cover no-repeat; transform: translate3d(calc(var(--mx) * -16px), calc(var(--my) * -10px), -18px) scale(1.08); filter: saturate(1.08) contrast(1.05); transition: transform .22s ease-out; }
.veil { position: absolute; inset: 0; z-index: -3; background: linear-gradient(90deg, rgba(3,6,17,.9) 0%, rgba(3,6,17,.58) 28%, rgba(3,6,17,.06) 62%, rgba(3,6,17,.22) 100%), linear-gradient(0deg, rgba(3,5,13,.78) 0%, transparent 40%); }
.lightning { position: absolute; inset: 0; z-index: -2; pointer-events: none; background: white; opacity: 0; mix-blend-mode: overlay; }
.scene.immersive .lightning { animation: flash 8s infinite; }
#particles { position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: .7; }

.topbar { position: absolute; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 28px clamp(22px, 4vw, 72px); z-index: 5; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: white; text-decoration: none; font-size: .78rem; letter-spacing: .28em; font-weight: 700; }
.brand-mark { width: 18px; height: 24px; display: inline-block; background: var(--cyan); clip-path: polygon(48% 0, 100% 0, 60% 43%, 100% 43%, 26% 100%, 40% 57%, 0 57%); filter: drop-shadow(0 0 8px var(--cyan)); }
.controls { display: flex; gap: 10px; }
.control { min-height: 42px; padding: 0 16px; border: 1px solid rgba(255,255,255,.24); background: rgba(5,7,18,.25); backdrop-filter: blur(12px); border-radius: 99px; cursor: pointer; display: flex; align-items: center; gap: 9px; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; transition: border-color .2s, background .2s; }
.control:hover, .control:focus-visible { border-color: var(--cyan); background: rgba(9,21,32,.68); outline: none; }
.control-dot { width: 7px; height: 7px; border-radius: 50%; background: #9aa5b5; }
.control[aria-pressed="true"] .control-dot { background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.sound-icon { color: var(--pink); font-size: 1rem; }

.hero { min-height: 100svh; width: min(680px, 88vw); padding: clamp(150px, 20vh, 230px) 0 100px clamp(22px, 8vw, 140px); display: flex; flex-direction: column; justify-content: center; }
.eyebrow { display: flex; align-items: center; gap: 12px; font-size: .72rem; letter-spacing: .28em; color: #b9c8db; }
.eyebrow span { width: 44px; height: 1px; background: var(--cyan); box-shadow: 0 0 9px var(--cyan); }
h1 { margin: 16px 0 22px; font-size: clamp(4.5rem, 10vw, 9.5rem); line-height: .78; letter-spacing: -.075em; font-weight: 900; text-shadow: 0 10px 50px rgba(0,0,0,.4); }
h1 em { font-style: normal; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.74); position: relative; left: .24em; }
.intro { max-width: 430px; margin: 0; color: #c7d2df; font-size: clamp(1rem, 1.35vw, 1.18rem); line-height: 1.65; text-wrap: balance; }
.enter { width: max-content; margin-top: 34px; padding: 7px 7px 7px 22px; border: 1px solid rgba(104,232,255,.45); border-radius: 99px; background: rgba(5,7,18,.42); display: flex; align-items: center; gap: 18px; cursor: pointer; text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; backdrop-filter: blur(12px); }
.enter-ring { display: grid; place-items: center; width: 42px; aspect-ratio: 1; border-radius: 50%; background: var(--cyan); color: #07121b; font-size: 1.2rem; box-shadow: 0 0 24px rgba(104,232,255,.45); transition: transform .25s; }
.enter:hover .enter-ring, .enter:focus-visible .enter-ring { transform: rotate(45deg) scale(1.06); }

.chapter { position: absolute; right: clamp(20px, 4vw, 70px); bottom: 40px; display: flex; align-items: center; gap: 15px; }
.chapter-number { color: var(--pink); font-size: 2rem; font-weight: 200; }
.chapter-line { width: 54px; height: 1px; background: rgba(255,255,255,.45); }
.chapter div { display: grid; gap: 4px; }
.chapter strong { letter-spacing: .15em; font-size: .72rem; }
.chapter small { color: #9caabd; letter-spacing: .11em; font-size: .6rem; }
.scroll-cue { position: absolute; left: 26px; bottom: 37px; writing-mode: vertical-rl; transform: rotate(180deg); text-transform: uppercase; font-size: .58rem; letter-spacing: .2em; color: #8e9bac; display: flex; align-items: center; gap: 10px; }
.scroll-cue span { width: 1px; height: 32px; background: var(--cyan); }

.about { min-height: 75vh; padding: 110px clamp(24px, 8vw, 140px); background: radial-gradient(circle at 75% 40%, rgba(43,40,111,.26), transparent 35%), #070914; border-top: 1px solid rgba(255,255,255,.08); }
.section-kicker { color: var(--cyan); font-size: .7rem; letter-spacing: .26em; }
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(50px, 10vw, 160px); align-items: end; margin-top: 60px; }
.about h2 { margin: 0; font-size: clamp(3rem, 6vw, 6.5rem); line-height: .95; letter-spacing: -.055em; }
.about h2 i { color: transparent; -webkit-text-stroke: 1px rgba(255,79,163,.8); font-style: normal; }
.about-copy { max-width: 520px; color: #bdc8d7; font-size: 1.05rem; line-height: 1.75; }
.note { margin-top: 36px; font-size: .82rem; color: #77859a; text-transform: uppercase; letter-spacing: .1em; }
footer { display: flex; justify-content: space-between; padding: 28px clamp(24px, 8vw, 140px); background: #050712; color: #647084; font-size: .65rem; letter-spacing: .16em; border-top: 1px solid rgba(255,255,255,.06); }

@keyframes flash { 0%, 9%, 11%, 43%, 45%, 100% { opacity: 0; } 10% { opacity: .22; } 44% { opacity: .12; } }
@media (max-width: 760px) {
  .topbar { padding: 20px; }
  .control span:last-child { display: none; }
  .control { width: 42px; justify-content: center; padding: 0; }
  .hero { padding-left: 24px; justify-content: flex-end; padding-bottom: 130px; }
  h1 { font-size: clamp(4rem, 22vw, 7rem); }
  .intro { max-width: 84vw; }
  .chapter { right: 20px; bottom: 24px; }
  .scroll-cue { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .about { padding-top: 80px; }
  footer { gap: 20px; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .art, .enter-ring { transition: none; }
  .lightning { animation: none !important; }
}
