/* Late Light · Free palette and type, written as the theme's roles · Designed using Design Lounge (https://www.designlounge.live) */
:root {
  --bg: #050811;
  --surface: #0b1019;
  --surface-2: #121a27;
  --surface-3: #1b2535;
  --line: #1b2433;
  --line-strong: #3a4659;
  --ink: #eef0f4;
  --ink-2: #b8bfcc;
  --ink-3: #7f8899;
  --primary: #9fd8ff;
  --primary-ink: #06101a;
  --primary-soft: #15283a;
  --secondary: #ffb45c;
  --secondary-ink: #1a1205;
  --secondary-soft: #3a2a14;
  --tertiary: #ff7a9e;
  --tertiary-ink: #1a0810;
  --tertiary-soft: #3a1a26;
  --success: #6fd3a0; --success-ink: #0b1a12; --success-soft: #16302a; --success-on-soft: #6fd3a0;
  --warning: #ffb45c; --warning-ink: #1a1205; --warning-soft: #3a2a14; --warning-on-soft: #ffb45c;
  --danger: #ff6b6b; --danger-ink: #1a0808; --danger-soft: #3a1818; --danger-on-soft: #ff6b6b;
  --info: #9fd8ff; --info-ink: #06101a; --info-soft: #15283a; --info-on-soft: #9fd8ff;
  --focus: #9fd8ff;
  --link: #9fd8ff;
  --overlay: #02040a;
  --inverse: #eef0f4;
  --inverse-ink: #050811;
  --scene-moon: #dfe9ff;
  --scene-sodium: #ffb45c;
  --scene-sun: #fff1c4;
  --scene-ha: #ff7a9e;

  --font-display: "Jost", "Futura", "Avenir Next", "Helvetica Neue", sans-serif;
  --font-text: "Newsreader", "Iowan Old Style", "Times New Roman", serif;

  /* family lit */
  --radius: 999px;
  --radius-card: 999px;
  --control: 44px;
  --gap: 24px;
  --pad: 20px;
  --edge: 36px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .6);

  /* motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --expo: cubic-bezier(0.16, 1, 0.3, 1);
  --t-ui: 200ms;
  --t-layout: 320ms;
  --t-sheet: 400ms;
  --t-hero: 640ms;
  --t-cinematic: 900ms;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 18px/1.6 var(--font-text);
  font-optical-sizing: auto;
  overflow-x: clip;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 300; line-height: 1; margin: 0; }
p { margin: 0; }
a { color: var(--link); }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 20; padding: 10px 16px; background: var(--primary); color: var(--primary-ink); border-radius: var(--radius); font: 500 14px/1 var(--font-display); transform: translateY(-200%); }
.skip:focus-visible { transform: none; outline: 2px solid var(--ink); outline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* layers: 1 canvas and fx, 2 copy, 3 hud and rail, 4 sections, 5 header */
#space { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; display: block; opacity: 0; transition: opacity var(--t-cinematic) var(--ease); }
body.ready #space { opacity: 1; }
.fx { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.vignette { background: radial-gradient(ellipse at center, transparent 48%, rgba(2, 4, 10, .62) 100%); }
.grain { inset: -50%; opacity: .05; mix-blend-mode: overlay; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>"); animation: grain 1s steps(5) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-1%, -1%); } 80% { transform: translate(3%, 1%); } 100% { transform: translate(0, 0); } }

/* header */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 22px var(--edge); pointer-events: none; }
.top > * { pointer-events: auto; }
.mark, .mark2 { font-family: var(--font-display); font-weight: 400; letter-spacing: .01em; color: var(--ink); text-decoration: none; }
.mark { font-size: 20px; line-height: 1; text-shadow: 0 2px 24px rgba(0, 0, 0, .7); }
.mark i, .mark2 i, h1 .lit { font-style: italic; color: var(--primary); }
.top nav { display: flex; gap: 6px; }
.top nav a { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: var(--radius); border: 1px solid rgba(238, 240, 244, .16); color: var(--ink); text-decoration: none; font: 400 14px/1 var(--font-display); letter-spacing: .02em; background: rgba(5, 8, 17, .35); transition: border-color var(--t-ui) var(--ease), background var(--t-ui) var(--ease); }
.top nav a:hover { border-color: var(--ink); }

/* the voyage */
.voyage { position: relative; }
.track { height: 1600vh; }
.stage { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.ch { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 var(--edge); opacity: 0; visibility: hidden; }
.ch .in { position: relative; max-width: min(560px, 46vw); pointer-events: auto; }
.ch .in::before { content: ""; position: absolute; inset: -22% -34%; background: radial-gradient(55% 60% at 40% 50%, rgba(5, 8, 17, .72), transparent 72%); z-index: -1; pointer-events: none; }
.ch.right { justify-content: flex-end; }
.ch.right .in { text-align: right; }
.ch.right .in::before { background: radial-gradient(55% 60% at 60% 50%, rgba(5, 8, 17, .72), transparent 72%); }
.ch.hero { justify-content: center; text-align: center; }
.ch.hero .in { max-width: 820px; }
.ch.hero .in::before { background: radial-gradient(50% 55% at 50% 50%, rgba(5, 8, 17, .55), transparent 72%); }
.ch h2 { font-size: clamp(38px, 5.4vw, 80px); letter-spacing: -.015em; line-height: .98; text-wrap: balance; text-shadow: 0 2px 30px rgba(0, 0, 0, .7); }
.ch h2 em { font-style: italic; color: var(--primary); }
.ch p { margin-top: 18px; font-size: 18px; color: var(--ink-2); text-shadow: 0 2px 24px rgba(0, 0, 0, .8); max-width: 470px; }
.ch.right p { margin-left: auto; }
.facts { display: flex; gap: 32px; margin: 26px 0 0; }
.ch.right .facts { justify-content: flex-end; }
.facts div { display: flex; flex-direction: column; gap: 6px; }
.facts dt { font-style: italic; font-size: 14px; color: var(--ink-3); }
.facts dd { margin: 0; font-size: 26px; line-height: 1; color: var(--ink); font-weight: 300; }
.ch .btn { margin-top: 30px; }

h1 { font-size: clamp(76px, 14vw, 196px); letter-spacing: -.03em; line-height: .86; display: flex; justify-content: center; gap: .18em; flex-wrap: wrap; }
h1 span { display: inline-block; opacity: 0; transform: translateY(.25em); filter: blur(12px); }
body.ready h1 span { animation: rise 1400ms var(--expo) forwards; }
body.ready h1 .lit { animation-delay: 180ms; }
@keyframes rise { to { opacity: 1; transform: none; filter: blur(0); } }
.lede { margin: 28px auto 0; max-width: 540px; font-size: 18px; color: var(--ink-2); text-shadow: 0 2px 24px rgba(0, 0, 0, .8); opacity: 0; }
body.ready .lede { animation: fade 900ms var(--ease) 500ms forwards; }
@keyframes fade { to { opacity: 1; } }

/* buttons, family lit: pills, outline, one filled primary */
.btn { height: var(--control); padding: 0 18px; border-radius: var(--radius); border: 1px solid rgba(238, 240, 244, .2); background: transparent; color: var(--ink); font: 500 14px/1 var(--font-display); letter-spacing: .02em; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; transition: border-color var(--t-ui) var(--ease), background var(--t-ui) var(--ease), color var(--t-ui) var(--ease), transform var(--t-ui) var(--ease); }
.btn:hover { border-color: var(--ink); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
.btn-primary:hover { border-color: transparent; }

/* hud */
.hud { position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; gap: 40px; padding: 22px var(--edge); pointer-events: none; }
.ro { display: flex; flex-direction: column; gap: 7px; }
.ro span { font: 400 12px/1 var(--font-display); letter-spacing: .02em; color: var(--ink-3); text-shadow: 0 1px 14px rgba(0, 0, 0, .9); }
.ro b { font: 400 15px/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: .02em; min-width: 14ch; color: var(--ink); text-shadow: 0 1px 14px rgba(0, 0, 0, .9); }

/* stop index: a row of ticks at the bottom right, the current one lit, its name above the row */
.rail { position: fixed; right: var(--edge); bottom: 18px; z-index: 3; }
.rail ol { position: relative; list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: flex-end; }
.rail button { position: static; display: flex; align-items: flex-end; justify-content: center; width: 28px; height: 44px; padding: 0 0 4px; border: 0; background: none; color: var(--ink-2); cursor: pointer; font: 400 12px/1 var(--font-display); letter-spacing: .02em; }
.rail button span { position: absolute; right: 0; bottom: 52px; opacity: 0; transform: translateY(6px); transition: opacity var(--t-sheet) var(--ease), transform var(--t-sheet) var(--ease); white-space: nowrap; text-shadow: 0 1px 12px rgba(0, 0, 0, .9); pointer-events: none; }
.rail button i { display: block; width: 1px; height: 14px; background: rgba(238, 240, 244, .35); transition: height 500ms var(--expo), background var(--t-ui) var(--ease), box-shadow var(--t-ui) var(--ease); }
.rail button:hover span, .rail button:focus-visible span { opacity: 1; transform: none; z-index: 1; }
.rail ol:not(:hover):not(:focus-within) button[aria-current="true"] span { opacity: 1; transform: none; }
.rail button:hover i { background: rgba(238, 240, 244, .7); }
.rail button[aria-current="true"] { color: var(--ink); }
.rail button[aria-current="true"] i { height: 36px; background: var(--primary); box-shadow: 0 0 8px var(--primary); }
.rail button:focus-visible { outline-offset: -2px; }

/* sections after the voyage sit over the fixed layers */
.frames, .visit, .colophon { position: relative; z-index: 4; background: var(--bg); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--edge); }
.frames { padding: 120px 0 96px; border-top: 1px solid var(--line); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.sec-head h2, .visit h2 { font-size: clamp(40px, 5vw, 64px); letter-spacing: -.015em; }
.sec-head p { max-width: 380px; color: var(--ink-2); }

.stage2 { display: flex; gap: 40px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 40px; }
.lightbox { padding: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.view { position: relative; width: min(540px, 100vw - 92px); height: min(540px, 100vw - 92px); border: 6px solid #020409; background: var(--bg); cursor: none; overflow: hidden; outline-offset: 6px; }
.view canvas { display: block; width: 100%; height: 100%; }
.view.flip { transform-origin: 0 0; }
.loupe { position: absolute; left: 0; top: 0; width: 176px; height: 176px; border-radius: 50%; border: 5px solid #1c2230; overflow: hidden; opacity: 0; pointer-events: none; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .9); transform: translate(-999px, -999px); }
.loupe canvas { display: block; width: 100%; height: 100%; }
.loupe.on { opacity: 1; }
.meta { flex: 1 1 220px; min-width: 220px; max-width: 320px; padding-top: 8px; }
.meta-n { font: 400 13px/1 var(--font-display); color: var(--ink-3); letter-spacing: .02em; }
.meta-t { font-size: 44px; margin-top: 10px; letter-spacing: -.01em; }
.meta-p { margin-top: 16px; color: var(--ink-2); font-size: 17px; }
.meta dl { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.meta dl div { display: flex; flex-direction: column; gap: 5px; }
.meta dt { font-style: italic; font-size: 14px; color: var(--ink-3); }
.meta dd { margin: 0; font-size: 24px; font-weight: 300; line-height: 1; }

.reel { margin-top: 8px; }
.scroller { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; cursor: grab; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.scroller::-webkit-scrollbar { display: none; }
.scroller.dragging { cursor: grabbing; }
.strip { display: inline-flex; flex-direction: column; background: #07090e; padding: 0 40px; min-width: 100%; }
.holes { height: 22px; background-image: radial-gradient(circle at 10px 11px, #0e1420 0 4px, transparent 4.5px); background-size: 28px 22px; background-position: 6px 0; }
.row { list-style: none; margin: 0; padding: 8px 0 10px; display: flex; gap: 14px; }
.row li { display: flex; flex-direction: column; gap: 6px; }
.edge { font: 400 11px/1 var(--font-display); color: var(--ink-3); letter-spacing: .04em; padding-left: 2px; }
.frame { position: relative; width: 150px; height: 150px; padding: 0; border: 0; background: #0a0d14; cursor: pointer; display: block; transition: opacity var(--t-ui) var(--ease); }
.frame canvas { display: block; width: 100%; height: 100%; }
.frame:hover canvas { opacity: .86; }
.frame::after { content: ""; position: absolute; inset: -9px -8px; border: 3px solid var(--secondary); border-radius: 14px 10px 16px 9px; transform: rotate(-1.2deg) scale(.92); opacity: 0; transition: opacity 180ms var(--ease), transform 240ms var(--expo); pointer-events: none; }
.frame[aria-current="true"]::after { opacity: 1; transform: rotate(-1.2deg) scale(1); }
.frame:focus-visible { outline-offset: 12px; }
.hint { display: flex; justify-content: space-between; gap: 16px; margin-top: 16px; font-size: 15px; color: var(--ink-2); }

/* visit */
.visit { padding: 96px 0 112px; border-top: 1px solid var(--line); }
.visit .grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: start; }
.visit h2 em { font-style: italic; color: var(--primary); }
.visit .left p { margin-top: 22px; max-width: 540px; color: var(--ink-2); }
.visit .left p:first-of-type { margin-top: 30px; color: var(--ink); }
.visit h3 { font-size: 26px; font-weight: 400; margin-bottom: 14px; }
.visit table { width: 100%; border-collapse: collapse; font-size: 17px; }
.visit th, .visit td { text-align: left; padding: 14px 0; border-bottom: 1px solid var(--line); }
.visit thead th { font: 400 13px/1 var(--font-display); letter-spacing: .02em; color: var(--ink-3); padding-top: 0; }
.visit tbody th { font-weight: 400; color: var(--ink); }
.visit td { text-align: right; }
.visit td i { color: var(--ink-3); }
.visit tbody tr:last-child th, .visit tbody tr:last-child td { border-bottom: 0; }

/* footer, colophon */
.colophon { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 56px 32px 48px; border-top: 1px solid var(--line); }
.rule { width: 48px; height: 1px; background: var(--line-strong); margin-bottom: 26px; }
.mark2 { font-size: 52px; font-weight: 300; line-height: 1; }
.issue { margin-top: 12px; font: 400 13px/1 var(--font-display); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.links { list-style: none; margin: 26px 0 0; padding: 0; display: flex; gap: 28px; }
.links a { color: var(--ink-2); text-decoration: none; font: 400 15px/1 var(--font-display); border-bottom: 1px solid transparent; transition: color 160ms var(--ease), border-color 160ms var(--ease); padding-bottom: 2px; }
.links a:hover { color: var(--ink); border-color: var(--ink); }
.credit { margin-top: 22px; font-size: 14px; color: var(--ink-3); }
.credit a { color: var(--ink-2); }
.colophon .top { position: static; margin-top: 28px; padding: 0 18px; color: var(--ink-2); }
.colophon .top:hover { color: var(--ink); }

/* responsive */
@media (max-width: 1100px) { .ch .in { max-width: min(560px, 52vw); } }
@media (max-width: 900px) {
  .rail { display: none; }
  .visit .grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 760px) {
  :root { --edge: 20px; --control: 48px; }
  .top { padding: 16px var(--edge); }
  .top nav a { height: 34px; padding: 0 12px; font-size: 13px; }
  .ch { align-items: flex-end; padding: 0 var(--edge) 23vh; }
  .ch .in, .ch.right .in { max-width: 100%; text-align: left; }
  .ch.right { justify-content: flex-start; }
  .ch.right p { margin-left: 0; }
  .ch.right .facts { justify-content: flex-start; }
  .ch .in::before, .ch.right .in::before { background: radial-gradient(60% 70% at 40% 60%, rgba(5, 8, 17, .78), transparent 74%); }
  .ch.hero { align-items: center; padding-bottom: 12vh; }
  .ch.hero .in { text-align: center; }
  h1 { font-size: clamp(64px, 23vw, 120px); }
  .ch h2 { font-size: clamp(34px, 9.6vw, 48px); }
  .ch p, .lede { font-size: 17px; }
  .facts { gap: 22px; }
  .facts dd { font-size: 21px; }
  .hud { padding: 18px var(--edge); gap: 20px; }
  .hud .since { display: none; }
  .ro b { font-size: 13px; min-width: 12ch; }
  .frames { padding: 88px 0 72px; }
  .sec-head { flex-direction: column; align-items: flex-start; margin-bottom: 28px; }
  .stage2 { gap: 28px; }
  .lightbox { padding: 14px; }
  .view { width: calc(100vw - 2 * var(--edge) - 28px - 12px); height: calc(100vw - 2 * var(--edge) - 28px - 12px); cursor: crosshair; }
  .meta { max-width: 100%; }
  .meta-t { font-size: 36px; }
  .frame { width: 112px; height: 112px; }
  .strip { padding: 0 20px; }
  .hint { flex-direction: column; gap: 6px; font-size: 14px; }
  .visit { padding: 72px 0 80px; }
  .mark2 { font-size: 36px; }
  .links { flex-direction: column; gap: 12px; }
  .colophon { padding: 40px 20px 32px; }
}
@media (max-height: 640px) { .lede { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #space { transition: none; opacity: 1; }
  .grain { animation: none; }
  h1 span, .lede { opacity: 1; transform: none; filter: none; animation: none !important; }
  .rail button i, .rail button span, .btn, .frame::after, .links a, .top nav a { transition: none; }
  .view.flip { transition: none !important; }
}
