@font-face { font-family: "PP Neue Montreal"; src: url("assets/fonts/PPNeueMontreal-Book.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "PP Neue Montreal"; src: url("assets/fonts/PPNeueMontreal-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "PP NeueBit"; src: url("assets/fonts/PPNeueBit-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #f7f7f7;
  --ink: #1d1d20;
  --muted: #8b8b93;
  /* the drawing's four strokes: silhouette, detail, dim, and the one highlight */
  --sil: #9a9aa3;
  --mid: #b9b9c1;
  --lo: #d6d6dc;
  --hi: #232327;
  --sw: 0.9px;
  --ease: cubic-bezier(0.5, 0, 0.1, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* the room: as wide as the column allows, never taller than the screen */
  --hero: min(100vw - 32px, 936px, (100svh - 220px) * 1.125);
  --glide: cubic-bezier(0.65, 0, 0.2, 1);
}
body[data-stage="site"] { --hero: min(47vw, 684px, (100svh - 64px) * 1.125); }

.layout { min-height: 100svh; display: flex; align-items: center; justify-content: center; }
.hero { flex: none; width: var(--hero); display: grid; gap: 10px; padding: 24px 0; transition: width 1.2s var(--glide); }
.fig { position: relative; }
#stage {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 4;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y;
}
#stage svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }

/* ---------- under the room: the story, then what the camera sees ---------- */

.below { min-height: 132px; display: grid; justify-items: center; align-content: start; }
.intro, .watch { display: grid; justify-items: center; gap: 12px; text-align: center; animation: rise 0.6s var(--glide) both; }
body[data-stage="intro"] .watch, body[data-stage="boot"] .intro, body[data-stage="site"] .below { display: none; }

.hint { margin: 0; max-width: 46ch; color: var(--muted); font-size: 13.5px; text-wrap: balance; }
.fine { margin: 0; color: #a6a6ad; font-size: 11.5px; }
.actions { display: flex; align-items: center; gap: 6px; }
.btn {
  font: 500 13px/1 "Geist", sans-serif; color: #fff; background: var(--ink);
  border: 0; border-radius: 999px; padding: 11px 18px; cursor: pointer;
  transition: background 200ms var(--ease), transform 200ms var(--ease);
}
.btn:hover { background: #000; }
.btn:active { transform: scale(0.97); }
.link {
  font: 13px/1 "Geist", sans-serif; color: var(--muted); background: none; border: 0; padding: 10px; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #d0d0d6;
}
.link:hover { color: var(--ink); }
.btn:focus-visible, .link:focus-visible, .links a:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 3px; }

/* the camera's eye: a small round mirror, ringed in ink while it sees a face */
.cam {
  width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: #ebebee;
  box-shadow: 0 0 0 1px #dcdce1; opacity: 0; transform: scale(0.8);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease), box-shadow 300ms var(--ease);
}
.cam-on .cam { opacity: 1; transform: none; }
.face .cam { box-shadow: 0 0 0 1.5px var(--ink); }
.cam video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); filter: grayscale(1) contrast(1.05); }
#status { margin: 0; min-height: 1.5em; color: var(--muted); font-size: 13.5px; }

/* ---------- the site, which opens beside the room ---------- */

.site { width: 0; opacity: 0; overflow: hidden; pointer-events: none; transition: width 1.2s var(--glide), opacity 500ms var(--ease); }
body[data-stage="site"] .site { width: min(40vw, 520px); opacity: 1; pointer-events: auto; transition-delay: 0s, 450ms; }
/* the room holds still while the page scrolls beside it */
/* the room and the page both sit in the middle of the screen's height */
body[data-stage="site"] .layout { align-items: center; }
.site-inner { width: min(40vw, 520px); padding: 32px 8px 32px 24px; }
/* everything comes in from the top down, one line after another: main.js numbers them in --i */
body[data-stage="site"] [style*="--i"] { animation: reveal 0.9s var(--glide) both; animation-delay: calc(500ms + var(--i) * 55ms); }
@keyframes reveal { from { opacity: 0; transform: translateY(10px); filter: blur(6px); } }

.eyebrow, .label { margin: 0 0 6px; font: 700 18px/1 "PP NeueBit", "Geist Mono", ui-monospace, monospace; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.lede { margin: 0 0 14px; font: 500 clamp(22px, 2.1vw, 30px)/1.22 "Geist", sans-serif; letter-spacing: -0.02em; text-wrap: balance; }
.bio { margin: 0 0 32px; max-width: 46ch; color: #5a5a61; font-size: 15px; }
.timeline { list-style: none; margin: 0 0 32px; padding: 0; }
.timeline li { display: grid; grid-template-columns: 112px 1fr auto; gap: 16px; padding: 8px 0; border-bottom: 1px solid #e4e4e8; }
.timeline time { padding-top: 2px; font: 12px/1.5 "Geist Mono", ui-monospace, monospace; color: var(--muted); }
.timeline .org, .recognition time { color: var(--muted); text-align: right; }
.timeline a.org { text-decoration: none; transition: color 200ms var(--ease); }
.timeline a.org::after { content: " ↗"; font-size: 0.85em; }
.timeline a.org:hover { color: var(--ink); }
.recognition { list-style: none; margin: 0 0 32px; padding: 0; }
.recognition li { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 8px 0; border-bottom: 1px solid #e4e4e8; }
.recognition time { font: 12px/1.5 "Geist Mono", ui-monospace, monospace; padding-top: 2px; }
.bio a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #c9c9cf; }
.bio a:hover { color: var(--ink); }
.timeline li:last-child, .recognition li:last-child { border-bottom: 0; }
.recognition a { color: var(--ink); text-decoration: none; }
.recognition a::after { content: " ↗"; font-size: 0.85em; color: var(--muted); }
.recognition a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ink); }
.cta { margin: 0 0 20px; font: 500 18px/1.3 "Geist", sans-serif; letter-spacing: -0.01em; }
.cta a, .links a {
  color: var(--ink); text-decoration: none; padding-bottom: 2px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 350ms var(--glide);
}
.cta a:hover, .links a:hover, .cta a:focus-visible, .links a:focus-visible { background-size: 100% 1px; }
/* the last line: the invitation on the left, the networks on the right */
.outro { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.outro .cta, .outro .links { margin: 0; }
.links { list-style: none; display: flex; gap: 20px; margin: 0 0 24px; padding: 0; }


/* the footer: one line, its two ends lined up with the page's column, the rule only as long as they are */
.foot { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; padding: 0 var(--foot-pad, 24px) 24px; background: var(--bg); font-size: 13.5px; color: var(--muted); }
.foot-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 12px; border-top: 1px solid #e4e4e8; white-space: nowrap; }
body[data-stage="site"] .foot { display: block; animation: rise 0.8s var(--glide) 1.2s both; }
.foot a { color: var(--muted); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; padding-bottom: 1px; transition: color 200ms var(--ease), background-size 350ms var(--glide); }
.foot a:hover { color: var(--ink); background-size: 100% 1px; }
.foot-right { display: inline-flex; align-items: center; gap: 5px; }
.foot-music { display: inline-flex; align-items: center; gap: 5px; }
.foot-music[hidden] { display: none; }
.foot-music img { width: 18px; height: 18px; border-radius: 3px; object-fit: cover; }
.foot .sep { margin: 0 4px; color: #c4c4ca; }
.foot time { font-variant-numeric: tabular-nums; }
body[data-stage="site"] .layout { padding-bottom: 72px; }
/* on a phone: the footer sits at the end of the page, in two lines, without the song */
@media (max-width: 760px) {
  .foot { --foot-pad: 20px; position: static; padding-bottom: 28px; }
  .foot-inner { flex-direction: column; gap: 4px; white-space: normal; text-align: center; }
  .foot-music, .foot .sep { display: none !important; }
  body[data-stage="site"] .layout { padding-bottom: 8px; }
}

@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  .hero, .site { transition: none; }
  .intro, .watch, body[data-stage="site"] [style*="--i"] { animation: none; }
}

/* ---------- the drawing ---------- */

#fig :where(path, rect, circle, ellipse, line, polygon) {
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  stroke-linecap: round;
}
#fig .under { stroke: var(--sil); stroke-width: calc(var(--sw) * 2 + 0.6px); transition: stroke 260ms var(--ease); }
#fig .under.hi { stroke: var(--sil); }
#fig .under.soft { stroke: var(--lo); stroke-width: calc(var(--sw) * 2); }
/* each face is stroked in its own tone, so neighbouring faces close over the seam between them */
#fig .face { stroke-width: 0.6px; }
#fig .edge { fill: none; stroke: var(--mid); stroke-width: var(--sw); }
#fig .edge.lo { stroke: var(--lo); }
#fig .sil-line { fill: none; stroke: var(--sil); stroke-width: var(--sw); transition: stroke 260ms var(--ease); }

#fig .ln { stroke-width: var(--sw); }
#fig .ln.sil { stroke: var(--sil); }
#fig .ln.mid { stroke: var(--mid); }
#fig .ln.lo { stroke: var(--lo); }
#fig .ln:not([fill]) { fill: none; }
#fig .raw { vector-effect: none; stroke-width: 1.5; }

/* cords: a dark line with a light one inside it reads as a round cable */
#fig .cord-o { fill: none; stroke: var(--sil); stroke-width: 3.4px; }
#fig .cord-i { fill: none; stroke: #f9f9fa; stroke-width: 1.7px; }
#fig .cord-o.thin { stroke-width: 2.8px; }
#fig .cord-i.thin { stroke-width: 1.2px; }
#fig .cord-o.bead { stroke-width: 7px; }
#fig .cord-i.bead { stroke-width: 5.2px; stroke: #ededf0; }

/* the shag's pile, the pad's coloured symbols, the console's port numbers, the VCR that never got set */
#fig .rug { stroke: none; }
#fig .tuft { fill: none; stroke: #d6d6da; stroke-width: 0.9px; }
#fig .tuft.hi-pile { stroke: #ffffff; stroke-width: 1px; }
#fig .shadow { fill: #3a3a40; stroke: #3a3a40; stroke-width: 12px; }
#fig .stick-ring { fill: none; stroke: #7e7e87; }
#fig .mark { fill: none; stroke-width: 1.3px; }
#fig .sym { fill: none; stroke-width: 0.9px; }
/* the covers' type */
#fig .cv-tag { font: 500 0.72px "Geist Mono", monospace; letter-spacing: 0.12px; fill: #8f9aa6; }
#fig .cv-title { font: 800 1.9px "Archivo", sans-serif; font-stretch: 100%; letter-spacing: 0.15px; fill: #eef0f3; }
#fig .cv-sub { font: 500 0.62px "Geist Mono", monospace; letter-spacing: 0.08px; fill: #8b95a0; }
#fig .stk-heavy { font: italic 800 3.1px "Archivo", sans-serif; fill: #fff; }
#fig .stk-small { font: 800 2.2px "Archivo", sans-serif; fill: #fff; }
#fig .ipod-bar { font: 500 0.62px "Geist", sans-serif; fill: #3b3f46; }
#fig .ipod-title { font: 500 0.95px "Geist", sans-serif; fill: #16181c; }
#fig .ipod-meta { font: 400 0.78px "Geist", sans-serif; fill: #6b707a; }
#fig .ipod-wheel { font: 500 0.62px "Geist", sans-serif; fill: #a9adb5; letter-spacing: 0.05px; }
#fig .ps-num { font: 500 1.5px "Geist", sans-serif; fill: #8d8d96; }
#fig .vcr-clock { font: 500 1.8px "Geist Mono", monospace; fill: #5fd38d; animation: blink 1s steps(1, end) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #fig .vcr-clock { animation: none; } }

#fig .led { stroke: none; transition: fill 400ms var(--ease); }
#fig .led.off { fill: #d2d2d8; }
#fig .led.standby { fill: #e5484d; }
#fig .led.on { fill: #30a46c; }
#fig .led.red { fill: #e5484d; }

/* the picture's type */
#fig .crt-word { font: 800 25px "Archivo", sans-serif; font-stretch: 125%; letter-spacing: 1px; fill: #1f2f8f; }
#fig .crt-sub { font: 700 15px "Archivo", sans-serif; letter-spacing: 0.5px; fill: #1f2f8f; }
#fig .crt-sub2 { font: 700 10.5px "Archivo", sans-serif; letter-spacing: 0.5px; fill: #1f2f8f; }
#fig .crt-name { font: 400 19px "Geist", sans-serif; letter-spacing: -0.2px; fill: #d4d4d4; }
#fig .crt-small { font: 400 8.5px "Geist", sans-serif; fill: #bdbdbd; }

/* ---------- narrow screens: the room is bigger, the site follows below it ---------- */
@media (max-width: 760px), (max-aspect-ratio: 4/5) {
  body, body[data-stage="site"] { --hero: min(100vw - 32px, 560px); }
  .layout { flex-direction: column; }
  body[data-stage="site"] .layout { justify-content: flex-start; }
  body[data-stage="site"] .layout { align-items: center; }
  body[data-stage="site"] .hero { position: static; min-height: 0; }
  .fig { width: 100vw; margin-left: calc(50% - 50vw); overflow: hidden; }
  #stage { width: 136%; margin-left: -18%; }
  .site { width: 100%; max-height: 0; transition: opacity 500ms var(--ease); }
  body[data-stage="site"] .site { width: 100%; max-height: none; }
  .site-inner { width: min(100%, 560px); margin: 0 auto; padding: 8px 20px 64px; }
  .timeline li { grid-template-columns: 1fr auto; row-gap: 2px; }
  .timeline time { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .hero { gap: 6px; padding: 16px 0; }
  #fig .cord-o { stroke-width: 2.6px; }
  #fig .cord-i { stroke-width: 1.2px; }
}
