/* Player One / cinematic edition
   The world is the image. The interface is a quiet, readable frame around it. */
@font-face {
  font-family: 'Barlow Condensed';
  src: url('fonts/BarlowCondensed-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --ink: #070b10;
  --white: #f3f1e9;
  --soft: #ced3d8;
  --muted: #9faeb9;
  --cyan: #a7e4ed;
  --silver: #ece9df;
  --line: rgb(224 229 228 / 22%);
  --display: 'Barlow Condensed', 'Arial Narrow', 'Bahnschrift Condensed', sans-serif;
  --body: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --page-edge: clamp(24px, 4.5vw, 88px);
  --ease: cubic-bezier(.2, .75, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; overflow-x: clip; color: var(--white); background: var(--ink); font: 14px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 5px; }
button:disabled { cursor: default; }
::selection { color: var(--ink); background: var(--silver); }
.skip-link { position: fixed; z-index: 100; top: 16px; left: var(--page-edge); padding: 14px 18px; color: var(--ink); background: var(--white); transform: translateY(-240%); }
.skip-link:focus { transform: none; }

#worldCanvas, .world-fallback, .cinema-shade { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#worldCanvas { z-index: 1; display: block; }
.world-fallback { z-index: 0; background: radial-gradient(ellipse at 68% 40%, #253846 0, #0d1b28 44%, #070b10 100%); }
.cinema-shade { z-index: 2; background: linear-gradient(180deg, rgb(5 10 17 / 68%) 0, transparent 145px), linear-gradient(0deg, rgb(5 10 17 / 77%) 0, transparent 190px); }
body[data-chapter='0'] .cinema-shade { background: linear-gradient(90deg, rgb(5 10 17 / 44%), transparent 48%), linear-gradient(180deg, rgb(5 10 17 / 58%) 0, transparent 145px), linear-gradient(0deg, rgb(5 10 17 / 75%) 0, transparent 170px); }

/* Brand, settings, and token access. No simulated telemetry. */
.header { position: fixed; z-index: 40; top: max(16px, env(safe-area-inset-top)); left: var(--page-edge); right: var(--page-edge); height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { display: inline-flex; align-items: center; gap: 13px; flex-shrink: 0; }
.wordmark__symbol { width: 44px; height: 30px; color: var(--white); }
.wordmark__name { display: flex; flex-direction: column; font: 600 15px/1.2 var(--display); letter-spacing: .12em; gap: 6px; }
.wordmark__name > span { font: 10px/1.3 var(--body); letter-spacing: .13em; color: var(--muted); }
.header__caption { color: var(--soft); font-size: 11px; letter-spacing: .16em; }
.header__actions { display: flex; align-items: center; gap: 24px; }
.icon-control { min-height: 44px; display: flex; align-items: center; gap: 9px; border: 0; padding: 9px 0; color: var(--soft); background: transparent; }
.icon-control svg { width: 19px; height: 19px; }
.icon-control > span { font-size: 10px; letter-spacing: .1em; }
.icon-control .sound-on { display: none; }
.icon-control[aria-pressed='true'] .sound-on { display: block; }
.icon-control[aria-pressed='true'] .sound-off { display: none; }
.icon-control:hover { color: var(--white); }
.header__access { min-height: 44px; display: flex; align-items: center; gap: 24px; border: 1px solid var(--line); border-radius: 3px; padding: 0 18px; background: rgb(11 19 29 / 30%); font-size: 13px; font-weight: 500; transition: background .25s, border-color .25s; }
.header__access > span { font-size: 20px; font-weight: 300; color: var(--silver); }
.header__access:hover { background: rgb(220 235 236 / 12%); border-color: rgb(235 244 240 / 70%); }

/* A numbered chapter index stays available without competing with the scene. */
.chapter-rail { position: fixed; z-index: 35; right: max(20px, calc(var(--page-edge) - 16px)); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.chapter-rail button { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 12px; background: transparent; border: 0; min-width: 58px; height: 44px; padding: 0 8px; color: #b3bec6; font: 11px/1 var(--mono); }
.chapter-rail__number { opacity: .65; font-variant-numeric: tabular-nums; transition: opacity .2s; }
.chapter-rail i { display: block; width: 9px; height: 2px; background: rgb(228 237 239 / 28%); transition: width .3s var(--ease), background .3s; }
.chapter-rail__label { position: absolute; right: 77px; text-align: right; white-space: nowrap; opacity: 0; transform: translateX(7px); transition: opacity .25s, transform .3s; color: var(--white); font: 10px/1.3 var(--body); letter-spacing: .12em; text-shadow: 0 2px 12px #02060a; }
.chapter-rail button[aria-current='step'] i, .chapter-rail button.is-active i { width: 23px; background: var(--silver); }
.chapter-rail button[aria-current='step'] .chapter-rail__number, .chapter-rail button:hover .chapter-rail__number { opacity: 1; color: var(--white); }
.chapter-rail button[aria-current='step'] .chapter-rail__label, .chapter-rail button:hover .chapter-rail__label, .chapter-rail button:focus-visible .chapter-rail__label { opacity: 1; transform: none; }

#journey { position: relative; z-index: 5; }
.chapter { position: relative; height: 150vh; height: 150svh; scroll-margin-top: 0; }
.chapter__frame { position: sticky; top: 0; width: 100%; height: 100vh; height: 100svh; display: flex; align-items: flex-end; padding: 120px var(--page-edge) 140px; pointer-events: none; }
.chapter__copy { position: relative; width: min(35vw, 480px); max-width: calc(100vw - var(--page-edge) * 2 - 65px); opacity: var(--copy-opacity, 1); transform: translate3d(0, var(--copy-y, 0px), 0); will-change: opacity, transform; pointer-events: auto; text-shadow: 0 2px 20px rgb(3 8 13 / 70%); }
.eyebrow { margin: 0 0 17px; display: flex; align-items: center; gap: 10px; color: var(--soft); font-size: 11px; line-height: 1.4; font-weight: 500; letter-spacing: .14em; }
.eyebrow > span { display: none; }
h1, .chapter h2 { font-family: var(--display); font-weight: 600; font-style: normal; margin: 0; }
h1 { font-size: clamp(98px, 10.7vw, 168px); line-height: .8; letter-spacing: -.015em; }
h1 > span { color: var(--white); }
.chapter h2 { font-size: clamp(44px, 4.2vw, 66px); line-height: .96; letter-spacing: -.015em; }
.chapter h2 em { font-style: normal; color: var(--white); }
.chapter--entry .chapter__frame { align-items: center; padding-bottom: 80px; }
.hero-copy { width: min(39vw, 560px); }
.hero-copy .eyebrow { margin-bottom: 26px; }
.hero-copy__tagline { margin: 27px 0 27px; color: #d9dee0; font-size: 16px; font-weight: 400; letter-spacing: .005em; }
.chapter__description { margin: 17px 0 0; max-width: 320px; color: #d7dde0; font-size: 15px; line-height: 1.6; font-weight: 400; }
.chapter__aside { margin: 18px 0 0; color: #d7d7cc; font-size: 11px; line-height: 1.5; letter-spacing: .09em; }
.chapter--arena .chapter__copy, .chapter--ascension .chapter__copy { width: min(29vw, 370px); }
.chapter--arena h2, .chapter--ascension h2 { font-size: clamp(40px, 3.6vw, 56px); }

/* Solid, tactile actions; the neon belongs to the world. */
.action { position: relative; border: 0; border-radius: 3px; display: inline-flex; justify-content: space-between; align-items: center; gap: 38px; min-height: 52px; min-width: 218px; padding: 0 21px; font: 500 14px/1.4 var(--body); letter-spacing: .01em; text-shadow: none; transition: background .25s, transform .25s var(--ease); }
.action--primary { color: #14222a; background: var(--silver); box-shadow: 0 4px 24px rgb(2 5 9 / 12%); }
.action--primary:hover { background: #fff; transform: translateY(-2px); }
.action__arrow { font: 300 24px/1 var(--body); color: inherit; }
.action--text { padding-inline: 0; min-width: 0; gap: 9px; background: transparent; color: #d9e0e4; font-size: 13px; }
.action--text > span:first-child { font-size: 20px; }
.action--text:hover { color: var(--white); }
.scroll-cue { display: flex; align-items: center; gap: 12px; margin-top: 28px; color: var(--soft); font-size: 11px; line-height: 1.5; letter-spacing: .02em; }
.scroll-cue__line { font-size: 20px; font-weight: 300; color: var(--silver); }
.finale-copy { width: min(43vw, 560px); }
.finale-actions { display: flex; align-items: center; gap: 25px; margin-top: 25px; }
.finale-links { display: flex; align-items: center; gap: 22px; padding-top: 16px; margin-top: 21px; border-top: 1px solid var(--line); width: max-content; max-width: 100%; color: var(--soft); font-size: 12px; line-height: 1.5; }
.finale-links button { min-height: 32px; border: 0; background: transparent; padding: 5px 0; font: inherit; color: inherit; }
.finale-links button > span { margin-left: 3px; }
.finale-links a { display: inline-flex; align-items: center; min-height: 32px; }
.finale-links button:hover, .finale-links a:hover { color: var(--white); }

/* A small scene caption and progress marker. */
.experience-hud { position: fixed; z-index: 32; left: var(--page-edge); right: var(--page-edge); bottom: max(24px, env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 24px; pointer-events: none; }
.sequence { display: flex; align-items: center; gap: 14px; }
.sequence__number { font: 600 36px/.9 var(--display); color: var(--white); letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.sequence > div { display: flex; flex-direction: column; gap: 4px; }
.sequence__caption { color: #a4b1bb; font-size: 10px; line-height: 1.3; letter-spacing: .12em; }
.sequence__title { color: #e0e5e6; font-size: 13px; line-height: 1.3; }
.experience-hud__edition { position: absolute; left: 50%; transform: translateX(-50%); color: #a5b0b8; font-size: 10px; line-height: 1.5; letter-spacing: .12em; white-space: nowrap; }
.experience-progress { display: flex; align-items: center; gap: 7px; color: #d9e1e4; font: 11px/1.3 var(--mono); font-variant-numeric: tabular-nums; }
.experience-progress__unit { color: #a8b4be; font-size: 10px; }
.experience-progress__track { height: 2px; width: 86px; margin: 0 10px; background: rgb(224 236 238 / 22%); }
.experience-progress__track > span { display: block; width: 100%; height: 100%; background: var(--silver); transform-origin: left; transform: scaleX(var(--progress, 0)); }
.experience-progress__end { font: 18px var(--body); color: #c6d3d9; }
.utility-controls { position: fixed; z-index: 33; right: var(--page-edge); bottom: 74px; display: flex; align-items: center; gap: 13px; color: #b6c2ca; font-size: 10px; line-height: 1.5; letter-spacing: .07em; }
.utility-controls button { min-height: 32px; border: 0; background: transparent; padding: 7px 0; color: inherit; font: inherit; letter-spacing: inherit; }
.utility-controls button:hover { color: var(--white); }
.utility-controls button > span { font-size: 15px; margin-left: 4px; }
.progress-strip { position: fixed; z-index: 45; top: 0; left: 0; right: 0; height: 2px; pointer-events: none; }
.progress-strip > span { display: block; height: 100%; width: 100%; background: var(--silver); transform-origin: left; transform: scaleX(var(--progress, 0)); }

/* Native dialog retains keyboard focus and Escape behavior. */
.access-dialog { border: 1px solid var(--line); border-radius: 5px; background: #101a23; padding: 30px 34px 34px; color: var(--white); width: min(540px, calc(100vw - 36px)); max-height: calc(100svh - 40px); box-shadow: 0 25px 100px rgb(0 0 0 / 70%); }
.access-dialog::backdrop { background: rgb(3 8 15 / 78%); backdrop-filter: blur(10px); }
.access-dialog__top { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 15px; color: var(--soft); font-size: 11px; line-height: 1.5; letter-spacing: .08em; }
.access-dialog__top button { min-width: 44px; min-height: 44px; border: 0; background: transparent; font-size: 18px; color: var(--white); }
.access-dialog__mark { margin-top: 24px; font: 600 68px/.9 var(--display); letter-spacing: -.02em; }
.access-dialog__mark > span { font: 30px var(--body); color: var(--cyan); margin-left: 15px; vertical-align: top; }
.access-dialog h2 { margin: 23px 0 18px; font: 600 46px/.98 var(--display); letter-spacing: -.01em; }
.access-dialog > p { font-size: 14px; line-height: 1.7; color: #c1cbd2; margin: 0; }
.access-dialog__details { display: grid; grid-template-columns: 1fr minmax(0, 1.3fr); row-gap: 18px; column-gap: 20px; padding: 22px 0; margin: 24px 0; border-block: 1px solid var(--line); font: 11px/1.6 var(--mono); }
.access-dialog__details dt { color: #a1b1bd; }
.access-dialog__details dd { margin: 0; color: #d4dfe4; text-align: right; overflow-wrap: anywhere; }
.access-dialog > .action { width: 100%; }
.toast { position: fixed; z-index: 120; bottom: 124px; left: 50%; transform: translate(-50%, 12px); width: max-content; max-width: calc(100vw - 36px); background: #15212c; border: 1px solid var(--line); border-radius: 4px; padding: 15px 20px; color: var(--white); text-align: center; font: 13px/1.6 var(--body); opacity: 0; pointer-events: none; transition: opacity .25s, transform .3s var(--ease); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.world-status { position: fixed; z-index: 60; top: 105px; left: var(--page-edge); max-width: min(460px, calc(100vw - var(--page-edge) * 2)); margin: 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: 3px; background: rgb(10 19 29 / 94%); color: #d6e1e6; font-size: 14px; line-height: 1.6; }
.world-status[hidden] { display: none; }
.boot { position: fixed; z-index: 90; inset: 0; display: grid; place-items: center; background: #070d15; transition: opacity .6s, visibility .6s; }
.boot.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot__center { display: flex; flex-direction: column; align-items: center; width: min(310px, 70vw); }
.boot__eyebrow, .boot__label, .boot__count { font-size: 11px; line-height: 1.7; letter-spacing: .13em; color: #aabfc9; }
.boot strong { margin: 20px 0 25px; font: 600 104px/.9 var(--display); letter-spacing: -.035em; }
.boot__progress { height: 2px; width: 100%; margin-top: 23px; background: #263842; }
.boot__progress > span { display: block; width: 0; height: 100%; background: var(--silver); }
.boot__count { align-self: flex-end; margin-top: 10px; }

@media (max-width: 1150px) {
  .header__caption { display: none; }
  .chapter-rail__label { display: none; }
  .chapter__copy { width: 38vw; }
  .hero-copy { width: 43vw; }
  .finale-copy { width: 48vw; }
  .finale-actions { flex-wrap: wrap; gap: 9px 24px; }
  .experience-hud__edition { display: none; }
}
@media (max-width: 800px) {
  :root { --page-edge: 26px; }
  .header { top: max(12px, env(safe-area-inset-top)); height: 56px; }
  .wordmark__symbol { width: 38px; height: 26px; }
  .wordmark__name { font-size: 14px; }
  .wordmark__name > span { display: none; }
  .header__actions { gap: 16px; }
  .icon-control > span { display: none; }
  .icon-control { width: 30px; justify-content: center; }
  .header__access { padding: 0 13px; gap: 14px; font-size: 12px; }
  .chapter__frame { padding-bottom: 146px; }
  .chapter__copy, .hero-copy { width: 47vw; max-width: 47vw; }
  .chapter--entry .chapter__frame { align-items: flex-end; padding-bottom: 144px; }
  h1 { font-size: clamp(70px, 12.8vw, 112px); }
  .chapter h2 { font-size: clamp(42px, 6.5vw, 54px); }
  .hero-copy__tagline { font-size: 15px; }
  .chapter--arena .chapter__copy, .chapter--ascension .chapter__copy { width: 43vw; max-width: 43vw; }
  .chapter--arena h2, .chapter--ascension h2 { font-size: 42px; }
  .finale-copy { width: 51vw; max-width: 51vw; }
  .utility-controls { bottom: 73px; }
}
@media (max-width: 540px) {
  :root { --page-edge: 21px; }
  .header { gap: 12px; height: 52px; }
  .wordmark { gap: 9px; }
  .wordmark__symbol { width: 33px; height: 22px; }
  .wordmark__name { font-size: 13px; letter-spacing: .08em; }
  .header__actions { gap: 9px; }
  .icon-control { width: 26px; }
  .header__access { min-height: 40px; gap: 10px; padding: 0 12px; font-size: 12px; }
  .header__access > span { font-size: 19px; }
  .chapter-rail { left: 50%; right: auto; top: auto; bottom: 93px; transform: translateX(-50%); flex-direction: row; align-items: center; gap: 2px; }
  .chapter-rail button { min-width: 37px; width: 37px; height: 42px; padding: 0; justify-content: center; font-size: 10px; }
  .chapter-rail__number { opacity: .6; }
  .chapter-rail__label { display: none; }
  .chapter-rail i { position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); height: 2px; width: 0; }
  .chapter-rail button[aria-current='step'] i, .chapter-rail button.is-active i { width: 15px; }
  .chapter__frame { padding: 90px var(--page-edge) 160px; }
  .chapter--entry .chapter__frame { padding-bottom: 165px; }
  .chapter__copy, .hero-copy { width: 48vw; max-width: 48vw; }
  .eyebrow { font-size: 10px; letter-spacing: .08em; margin-bottom: 12px; }
  .hero-copy .eyebrow { margin-bottom: 20px; }
  h1 { font-size: clamp(55px, 18vw, 87px); line-height: .82; }
  .hero-copy__tagline { margin: 21px 0 21px; font-size: 14px; line-height: 1.5; }
  .action { min-height: 48px; min-width: 0; width: 100%; padding: 0 15px; gap: 10px; font-size: 13px; }
  .action__arrow { font-size: 22px; }
  .scroll-cue { margin-top: 18px; font-size: 10px; gap: 9px; }
  .scroll-cue__line { font-size: 18px; }
  .chapter h2 { font-size: clamp(37px, 10.5vw, 46px); }
  .chapter__description { margin-top: 14px; font-size: 14px; line-height: 1.5; }
  .chapter__aside { margin-top: 14px; font-size: 11px; letter-spacing: .02em; }
  .chapter--arena .chapter__copy, .chapter--ascension .chapter__copy { width: 46vw; max-width: 46vw; }
  .chapter--arena h2, .chapter--ascension h2 { font-size: 38px; }
  .chapter--finale .chapter__frame { padding-bottom: 157px; }
  .finale-copy { width: 52vw; max-width: 52vw; }
  .finale-actions { margin-top: 20px; flex-direction: column; align-items: flex-start; gap: 1px; }
  .action--text { min-height: 43px; font-size: 12px; padding: 0; }
  .finale-links { flex-wrap: wrap; row-gap: 0; column-gap: 14px; font-size: 12px; margin-top: 8px; padding-top: 10px; width: 100%; }
  .experience-hud { bottom: max(18px, env(safe-area-inset-bottom)); gap: 16px; }
  .sequence { gap: 10px; }
  .sequence__number { font-size: 31px; }
  .sequence__caption { font-size: 9px; letter-spacing: .09em; }
  .sequence__title { font-size: 12px; }
  .experience-progress { font-size: 10px; gap: 4px; }
  .experience-progress__track { width: 37px; margin: 0 4px; }
  .experience-progress__end { display: none; }
  .utility-controls { bottom: 57px; right: var(--page-edge); font-size: 10px; gap: 10px; }
  .utility-controls button { min-height: 34px; }
  .access-dialog { padding: 20px 24px 28px; }
  .access-dialog h2 { font-size: 41px; }
  .access-dialog__top { font-size: 10px; }
  .access-dialog__details { font-size: 10px; }
  .world-status { top: 89px; }
  .cinema-shade { background: linear-gradient(180deg, rgb(5 10 17 / 64%) 0, transparent 110px), linear-gradient(0deg, rgb(5 10 17 / 83%) 0, transparent 230px); }
  body[data-chapter='0'] .cinema-shade { background: linear-gradient(90deg, rgb(5 10 17 / 26%), transparent 65%), linear-gradient(180deg, rgb(5 10 17 / 64%) 0, transparent 110px), linear-gradient(0deg, rgb(5 10 17 / 80%) 0, transparent 230px); }
}
@media (max-height: 700px) and (min-width: 700px) {
  .header { top: 9px; height: 52px; }
  h1 { font-size: clamp(86px, 10vw, 128px); }
  .chapter h2 { font-size: 46px; }
  .chapter__frame { padding-bottom: 109px; }
  .chapter--entry .chapter__frame { padding-bottom: 54px; }
  .hero-copy .eyebrow { margin-bottom: 20px; }
  .hero-copy__tagline { margin: 23px 0; }
  .scroll-cue { margin-top: 21px; }
  .chapter__description { margin-top: 13px; }
  .experience-hud { bottom: 18px; }
  .utility-controls { bottom: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .chapter__copy { will-change: auto; }
}
body.is-reduced-motion .chapter__copy { will-change: auto; }
