/* Blink. Maison Nocturne tokens: black everywhere, champagne accents, no light theme. */
@font-face { font-family: "GT Walsheim Pro"; src: url("/fonts/GTWalsheimPro-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "GT Walsheim Pro"; src: url("/fonts/GTWalsheimPro-Medium.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "GT Walsheim Pro"; src: url("/fonts/GTWalsheimPro-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
:root {
  --void: #000; --obsidian: #171612; --champagne: #BFA77A; --identity: #D6C5A6; --ivory: #E7DFD0; --muted: #A99D88; --rule: #4A4030;
  --font: "GT Walsheim Pro", "Avenir Next", "Century Gothic", system-ui, sans-serif;
  --pad: clamp(20px, 4.4vw, 84px);
  --scroll-len: 13200px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: #000; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #000; color: var(--ivory); font-family: var(--font); font-weight: 400; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
a { color: inherit; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: #000; color: var(--ivory); padding: 12px 16px; border: 1px solid var(--champagne); }
.skip:focus { left: 8px; }
:focus-visible { outline: 1px solid var(--identity); outline-offset: 4px; }

#track { height: calc(100vh + var(--scroll-len)); height: calc(100svh + var(--scroll-len)); position: relative; }
#stage { position: sticky; top: 0; height: 100vh; height: 100svh; width: 100%; overflow: hidden; background: #000; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transition: opacity .35s ease; }
.scrim { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0,0,0,.82) 0%, rgba(0,0,0,.6) 28%, rgba(0,0,0,0) 58%), linear-gradient(0deg, rgba(0,0,0,.6) 0, rgba(0,0,0,0) 20%), linear-gradient(180deg, rgba(0,0,0,.5) 0, rgba(0,0,0,0) 16%); }

/* logo */
.logo { display: block; color: var(--identity); line-height: 0; }
.logo svg { display: block; width: 100%; height: auto; overflow: visible; }
.top { position: absolute; z-index: 6; left: var(--pad); right: var(--pad); top: clamp(18px, 3.4vh, 44px); display: flex; justify-content: space-between; align-items: center; }
.top .mark { display: block; width: clamp(84px, 8.4vw, 132px); padding: 10px 0; opacity: 0; transition: opacity .5s ease; }
.top .commission { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--champagne); text-decoration: none; padding: 14px 0; font-weight: 500; }
.top .commission:hover { color: var(--ivory); }
.scrolled .top .mark { opacity: 1; }

/* hero and closing */
.hero, .closing { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 var(--pad); will-change: opacity; }
.hero .logo.big, .closing .logo.big { width: min(70vw, 760px); }
.hero h1 { margin: clamp(26px, 5vh, 54px) 0 0; font-weight: 500; font-size: clamp(22px, 2.5vw, 38px); line-height: 1.22; letter-spacing: .005em; color: var(--ivory); }
.hint { position: absolute; bottom: clamp(26px, 6vh, 64px); left: 0; right: 0; margin: 0; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hint i { width: 1px; height: 44px; background: linear-gradient(var(--champagne), transparent); animation: hint 2.6s ease-in-out infinite; transform-origin: top; }
@keyframes hint { 0% { transform: scaleY(0); opacity: 0 } 35% { transform: scaleY(1); opacity: 1 } 100% { transform: scaleY(1); opacity: 0 } }
.closing { visibility: hidden; opacity: 0; justify-content: flex-start; }
.closing .logo.big { position: absolute; left: 50%; top: 50%; width: min(64vw, 700px); transform: translate(-50%, -67.5%); }
.closing .line { position: absolute; top: calc(50% + min(64vw, 700px) * .105 + 26px); left: 0; right: 0; margin: 0; font-weight: 500; font-size: clamp(20px, 2.2vw, 32px); color: var(--ivory); }
.closing .cta { position: absolute; top: calc(50% + min(64vw, 700px) * .105 + clamp(84px, 13vh, 132px)); left: 50%; transform: translateX(-50%); white-space: nowrap; }
.cta { display: inline-block; min-height: 48px; padding: 15px 30px; border: 1px solid var(--champagne); color: var(--identity); text-decoration: none; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; transition: background .3s ease, color .3s ease; }
.cta:hover, .cta:focus-visible { background: var(--identity); color: #000; }

/* chapters */
.chapter { position: absolute; z-index: 4; left: var(--pad); top: 45%; transform: translateY(-54%); width: min(40vw, 560px); opacity: 0; visibility: hidden; }
.chapter > * { will-change: opacity, transform; }
.eyebrow { margin: 0 0 clamp(14px, 2.4vh, 26px); font-size: 12.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--champagne); font-weight: 500; }
.eyebrow b { font-weight: 500; }
.chapter h2 { margin: 0; font-weight: 500; font-size: clamp(38px, 4.7vw, 78px); line-height: 1.06; letter-spacing: -.008em; color: var(--identity); }
.chapter .body { margin: clamp(18px, 3vh, 30px) 0 0; font-size: clamp(18px, 1.42vw, 23px); line-height: 1.45; color: var(--ivory); max-width: 24em; }
.chapter .when { margin: clamp(16px, 2.6vh, 28px) 0 0; padding-top: 14px; border-top: 1px solid var(--rule); display: inline-block; font-size: 12.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

/* annotations */
#labels { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.lbl { position: absolute; left: 0; top: 0; font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--identity); white-space: nowrap; opacity: 0; will-change: transform, opacity; font-weight: 500; display: flex; align-items: center; gap: 12px; margin-top: -8px; }
.lbl::before { content: ""; width: 44px; height: 1px; background: var(--champagne); opacity: .8; }
.lbl.left { flex-direction: row-reverse; }
.lbl.body, .lbl.plain { display: block; margin: 0; color: var(--muted); letter-spacing: .22em; font-size: 10.5px; }
.lbl.body::before, .lbl.plain::before { display: none; }
#dot { position: absolute; left: -9px; top: -9px; z-index: 5; width: 18px; height: 18px; border-radius: 50%; opacity: 0; pointer-events: none; will-change: transform, opacity;
  background: radial-gradient(circle, #f1e3c4 0, #d6c5a6 22%, rgba(191,167,122,.55) 34%, rgba(191,167,122,0) 70%); }

/* position map */
#map { position: absolute; z-index: 5; left: var(--pad); bottom: clamp(70px, 10.5vh, 104px); margin: 0; width: 168px; opacity: 0; will-change: opacity; }
#map canvas { display: block; width: 168px; height: 98px; border: 1px solid rgba(74,64,48,.75); background: rgba(0,0,0,.55); }
#map figcaption { margin-top: 9px; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--champagne); display: flex; justify-content: space-between; gap: 10px; }
#map figcaption span { color: var(--muted); letter-spacing: .08em; text-transform: none; font-size: 10.5px; }

@media (max-height: 700px) and (min-aspect-ratio: 9/10) { #map { display: none; } }
/* chapter navigation */
nav.chapters { position: absolute; z-index: 6; left: var(--pad); right: var(--pad); bottom: clamp(10px, 2.4vh, 26px); display: flex; align-items: center; gap: clamp(16px, 3vw, 54px); padding-top: 8px; opacity: 0; transition: opacity .5s ease; }
.scrolled nav.chapters { opacity: 1; }
nav .bar { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: rgba(74,64,48,.8); }
nav .bar i { position: absolute; left: 0; top: 0; height: 1px; width: 100%; background: var(--champagne); transform-origin: left; transform: scaleX(0); }
nav .count { font-size: 12px; letter-spacing: .16em; color: var(--muted); min-width: 62px; }
nav .count b { color: var(--identity); font-weight: 500; }
nav ol { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(2px, 1.2vw, 22px); }
nav button { font: inherit; font-size: 12.5px; letter-spacing: .1em; color: var(--muted); background: none; border: 0; min-height: 44px; min-width: 44px; padding: 0 10px; cursor: pointer; transition: color .3s ease; }
nav button:hover { color: var(--ivory); }
nav button[aria-current="true"] { color: var(--identity); font-weight: 500; }

/* footer */
footer { position: relative; z-index: 2; background: #000; border-top: 1px solid var(--rule); padding: clamp(64px, 12vh, 140px) var(--pad) clamp(40px, 8vh, 80px); text-align: center; }
footer .logo { width: min(46vw, 260px); margin: 0 auto; }
footer .line { font-size: clamp(20px, 2vw, 28px); font-weight: 500; margin: 34px 0 34px; }
footer .small { max-width: 56em; margin: 44px auto 0; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
footer .small + .small { margin-top: 14px; }

/* phones and portrait */
@media (max-aspect-ratio: 9/10), (max-width: 760px) {
  .scrim { background: linear-gradient(180deg, rgba(0,0,0,.78) 0, rgba(0,0,0,.46) 30%, rgba(0,0,0,0) 52%), linear-gradient(0deg, rgba(0,0,0,.7) 0, rgba(0,0,0,0) 18%); }
  .chapter { top: clamp(84px, 13svh, 128px); transform: none; width: auto; right: var(--pad); }
  .chapter h2 { font-size: clamp(36px, 10.4vw, 56px); }
  .chapter .body { font-size: 18px; max-width: 19em; }
  .chapter .when { margin-top: 14px; padding-top: 12px; }
  .eyebrow { margin-bottom: 12px; }
  #map { bottom: 62px; width: 104px; }
  #map canvas { width: 104px; height: 61px; }
  #map figcaption { display: none; }
  nav.chapters { gap: 10px; }
  nav ol { flex: 1; justify-content: space-between; gap: 0; }
  nav button { font-size: 0; padding: 0; position: relative; }
  nav button::after { content: ""; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: var(--rule); transition: background .3s, transform .3s; }
  nav button[aria-current="true"]::after { background: var(--identity); transform: scale(1.7); }
  nav .count { min-width: 0; white-space: nowrap; }
  .hero .logo.big { width: 80vw; }
  .closing .logo.big { width: 78vw; }
  .closing .line { top: calc(50% + 78vw * .105 + 22px); padding: 0 var(--pad); }
  .closing .cta { top: calc(50% + 78vw * .105 + 92px); font-size: 12px; padding: 15px 20px; letter-spacing: .16em; }
  .lbl { font-size: 10px; gap: 8px; }
  .lbl::before { width: 22px; }
  .lbl.left { letter-spacing: .14em; }
  .lbl.left::before { display: none; }
}
.no-gl #gl, .no-gl #map, .no-gl #dot { display: none; }
@media (prefers-reduced-motion: reduce) { .hint i { animation: none; } }
