/* The darkroom (home). Same tokens as site.css: the safelight accent is the ink here. */
:root {
  --black: #050202;
  --black-2: #0d0605;
  --light: #f3efe8;
  --light-2: rgba(243, 239, 232, .7);
  --light-line: rgba(243, 239, 232, .16);
  --safe: #ff4a2e;
  --red: #d2311c;
  --bg: var(--black);
  --ink: var(--light);                     /* text and links are white; the safelight stays in the picture */
  --safe-dim: rgba(243, 239, 232, .4);      /* thin lines and frames */

  --serif: "Google Sans", system-ui, sans-serif;
  --mono: var(--serif);       /* no monospace: small labels are set in the same typeface */
  --fs-display: clamp(40px, 8.4vw, 150px);
  --fs-title: clamp(30px, 5vw, 92px);
  --fs-lead: clamp(24px, 3.2vw, 52px);
  --fs-body: 17px;
  --fs-label: 13px;
  --ls-tight: -.035em;
  --ls-text: -.01em;
  --gut: clamp(16px, 3vw, 40px);
  --pill: 10px 16px;
  --ease: cubic-bezier(.19, 1, .22, 1); /* expo-out: one curve for every transition */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body { background: var(--bg); color: var(--ink); font-family: var(--serif); -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: color .8s var(--ease); }
body.lit { color: var(--light); }
.mono { font-family: var(--serif); font-size: var(--fs-label); letter-spacing: 0; text-transform: none; } /* small label: the main typeface, sentence case */
.dim { opacity: .8; } /* ≥4.5:1 on the dark tray for small text */
kbd { font-family: inherit; font-size: 9px; border: 1px solid currentColor; border-radius: 3px; padding: 1px 4px; opacity: .6; }

#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; display: block; z-index: 0; touch-action: pan-y; }
#scroll { position: relative; z-index: -1; }

/* ---- hud ---------------------------------------------------------------- */
.hud { position: fixed; left: 0; right: 0; z-index: 2; padding: var(--gut); pointer-events: none; }
.hud a, .hud button { pointer-events: auto; }
.hud-top { top: 0; display: flex; justify-content: space-between; align-items: center; }
.hud-bottom { bottom: 0; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px 32px; padding-bottom: max(var(--gut), env(safe-area-inset-bottom)); transition: opacity .5s; }
.brand { font-family: var(--serif); font-weight: 500; font-size: 22px; letter-spacing: -.02em; color: inherit; text-decoration: none; line-height: 1; padding: 4px 0; }

.site-nav { display: flex; gap: 30px; pointer-events: auto; font-family: var(--serif); font-size: 16px; font-weight: 600; letter-spacing: var(--ls-text); text-transform: none; }
.site-nav a, .site-nav button { color: inherit; text-decoration: none; background: none; border: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; padding: 6px 0; position: relative; }
.site-nav a::after, .site-nav button::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: currentColor; transition: right .5s var(--ease); }
.site-nav a:hover::after, .site-nav button:hover::after, .site-nav a:focus-visible::after, .site-nav button:focus-visible::after { right: 0; }
.site-nav :focus-visible { outline: none; }
.site-nav sup { font-size: 10px; opacity: .6; margin-left: 2px; }
.hud-actions { display: flex; gap: 10px; align-items: center; pointer-events: auto; }

/* pills: the same everywhere */
.light-btn, .menu-btn, .sheet-close { display: inline-flex; align-items: center; gap: 10px; padding: var(--pill); background: transparent; color: inherit;
  border: 1px solid currentColor; border-radius: 999px; cursor: pointer; text-decoration: none; transition: background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease); }
.light-btn:focus-visible, .menu-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.li-btn:hover, .li-btn:focus-visible, .sheet-close:hover, .sheet-close:focus-visible { background: var(--ink); color: var(--bg); border-color: var(--ink); outline: none; }
body.lit .li-btn:hover, body.lit .li-btn:focus-visible { background: var(--light); border-color: var(--light); }
.sheet-menu .sheet-close:hover, .sheet-menu .sheet-close:focus-visible { background: var(--light); border-color: var(--light); }
.li-arrow { display: inline-block; transition: transform .6s var(--ease); }
.li-btn:hover .li-arrow, .li-btn:focus-visible .li-arrow { transform: translate(2px, -2px); }
.menu-btn { display: none; }
/* the lights toggle stays for keyboards, visible only when focused */
.sr-focus:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lamp { width: 8px; height: 8px; border-radius: 50%; background: var(--safe); box-shadow: 0 0 10px var(--safe); }

/* the print's title: a title, in capitals like every title */
.meta { max-width: 60vw; }
.idx { margin-bottom: 10px; }
.title { font-family: var(--serif); font-weight: 400; font-size: var(--fs-title); line-height: .92; letter-spacing: var(--ls-tight); text-transform: uppercase; color: inherit; }
/* the site's one text reveal: each rendered line is a mask, its text rises inside (loader.js) */
.rl { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.rl > span { display: inline-block; white-space: pre; }
.lw { white-space: nowrap; } /* a word is measured whole: never let it break at its hyphen (Real-time) while the lines are counted */
.sub { margin-top: 12px; }

.dev { display: flex; align-items: center; gap: 10px; justify-self: end; }
.bar { width: 160px; height: 1px; background: var(--safe-dim); position: relative; }
body.lit .bar { background: var(--light-2); }
.bar i { position: absolute; left: 0; top: -1px; height: 3px; width: 0; background: currentColor; }

.strip { position: fixed; right: var(--gut); top: 50%; transform: translateY(-50%); z-index: 2; display: flex; flex-direction: column; gap: 6px; }
.strip button { width: 34px; height: 24px; border: 1px solid var(--safe-dim); background: transparent; color: inherit;
  font: 9px/1 var(--mono); cursor: pointer; opacity: .55; transition: opacity .3s, background .3s, border-color .3s; }
body.lit .strip button { border-color: var(--light-2); }
.strip button[aria-current="true"] { opacity: 1; border-color: currentColor; }
.strip button:hover, .strip button:focus-visible { opacity: 1; outline: none; background: rgba(243, 239, 232, .12); }

.hint { position: fixed; left: 50%; top: calc(var(--gut) + 64px); transform: translateX(-50%); z-index: 2; /* under the nav, above the print */
  display: flex; align-items: center; gap: 8px; pointer-events: none; transition: opacity .6s; white-space: nowrap; }
.hint i { width: 1px; height: 18px; background: currentColor; animation: drip 1.6s infinite var(--ease); transform-origin: top; }
.hint.gone { opacity: 0; }
@keyframes drip { 0% { transform: scaleY(0) } 60% { transform: scaleY(1) } 100% { transform: scaleY(1); opacity: 0 } }

/* welcome line, top left beside the print: exactly two lines */
.intro-note { position: fixed; z-index: 2; left: var(--gut); top: calc(var(--gut) + 92px); margin: 0; white-space: nowrap;
  font-family: var(--serif); font-size: clamp(16px, 1.3vw, 21px); line-height: 1.25; letter-spacing: var(--ls-text); color: var(--ink);
  pointer-events: none; transition: opacity .6s var(--ease), color .8s var(--ease); }
body.lit .intro-note, body.sheet-open .intro-note { opacity: 0; } /* the print slides left when the lights are on */
@media (max-width: 1099px) { .intro-note { display: none; } }

/* ---- lights-on card ------------------------------------------------------ */
.card { position: fixed; z-index: 3; right: calc(var(--gut) + 56px); top: 50%; width: min(400px, 30vw);
  transform: translate(24px, -50%); opacity: 0; pointer-events: none; color: var(--light);
  transition: opacity .7s var(--ease), transform .9s var(--ease); }
.card.on { opacity: 1; transform: translate(0, -50%); pointer-events: auto; }
.card h2 { font-family: var(--serif); font-weight: 400; font-size: var(--fs-lead); line-height: .95; letter-spacing: var(--ls-tight); text-transform: uppercase; margin: 14px 0 20px; }
.card p#c-text { font-family: var(--serif); font-size: var(--fs-body); line-height: 1.55; letter-spacing: var(--ls-text); color: var(--light-2); }
.c-meta { display: grid; grid-template-columns: auto 1fr; gap: 8px 22px; margin: 26px 0 30px; padding-top: 18px; border-top: 1px solid var(--light-line); font-family: var(--serif); font-size: 15px; letter-spacing: var(--ls-text); }
.c-meta dt { color: rgba(243, 239, 232, .5); }
.c-meta dd { color: var(--light); }
.c-link { display: inline-flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; font-family: var(--serif); font-size: var(--fs-body); letter-spacing: var(--ls-text); }
.c-link i { width: 46px; height: 46px; border-radius: 50%; border: 1px solid currentColor; display: grid; place-items: center; transition: background .6s var(--ease), color .6s var(--ease), transform 1s var(--ease); }
.c-link svg { width: 40%; height: 40%; }
.c-link:hover i, .c-link:focus-visible i { background: var(--light); color: var(--black); transform: rotate(-45deg); }
.c-link:focus-visible { outline: none; }

/* ---- cursor: a round ball (same on every page); it inverts what is under it */
#cursor { position: fixed; left: 0; top: 0; z-index: 4; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fff;
  border: 1px solid transparent; mix-blend-mode: difference; pointer-events: none; display: none; align-items: center; justify-content: center; opacity: 0;
  transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .3s, border-color .3s, opacity .4s; }
#cursor.live { opacity: 1; }
#cursor span { font: 12px/1 var(--serif); letter-spacing: 0; color: #fff; opacity: 0; transition: opacity .2s; }
#cursor.over { width: 72px; height: 72px; margin: -36px 0 0 -36px; background: transparent; border-color: #fff; }
#cursor.over span { opacity: 1; }
#cursor.link { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
@media (pointer: fine) { #cursor { display: flex; } #gl { cursor: none; } html.ball, html.ball * { cursor: none !important; } }

/* ---- loader: the photos in the gate, safelight, doors -------------------- */
#loader { position: fixed; inset: 0; z-index: 10; color: var(--ink); overflow: hidden; }
.ld-panel { position: absolute; left: 0; right: 0; height: 50.5%; background: var(--bg); }
.ld-top { top: 0; } .ld-bot { bottom: 0; }
.ld-glow { position: absolute; inset: 0; opacity: 0; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(60% 55% at 50% 0%, rgba(255, 60, 30, .55), rgba(255, 40, 20, .12) 55%, transparent 80%); }
.ld-strip { position: absolute; left: 0; right: 0; top: 50%; height: 132px; margin-top: -66px; overflow: hidden; transform-origin: 50% 50%; }
.ld-track { display: flex; gap: 10px; width: max-content; height: 100%; padding: 22px 5px; }
.ld-frame { --neg: 1; position: relative; width: 120px; height: 90px; flex: none; background: #2a1510; }
.ld-frame::before { /* the image, inverted while it is a negative */
  content: ""; position: absolute; inset: 0; background: var(--img, none) center / cover no-repeat; filter: grayscale(var(--neg)) invert(var(--neg)) contrast(calc(1 + var(--neg) * .25)); } /* grey first: the inverted colours made it yellowish */
.ld-frame::after { /* the safelight accent over the negative */
  content: ""; position: absolute; inset: 0; background: var(--safe); mix-blend-mode: multiply; opacity: var(--neg); }
.ld-meta { position: absolute; left: var(--gut); right: var(--gut); top: calc(50% + 96px); display: flex; justify-content: space-between; align-items: center; }
.ld-meta > span { display: inline-flex; align-items: center; gap: 10px; }
.lamp-ld { opacity: .25; }

/* ---- sheets: Index and Menu ---------------------------------------------- */
.sheet { position: fixed; inset: 0; z-index: 8; background: var(--black); color: var(--ink); overflow-y: auto; overscroll-behavior: contain; padding: var(--gut); padding-top: 0; }
.sheet[hidden] { display: none; }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: var(--gut) 0 18px; background: linear-gradient(var(--black) 70%, transparent); }
.sheet-head h2 { font-weight: 400; }
body.sheet-open .hud, body.sheet-open .strip, body.sheet-open .hint, body.sheet-open .card { visibility: hidden; }

.index-list { list-style: none; border-top: 1px solid var(--safe-dim); }
.index-list li { border-bottom: 1px solid var(--safe-dim); overflow: hidden; }
.index-row { width: 100%; display: grid; grid-template-columns: 64px 1fr minmax(180px, 26%) 64px; gap: 20px; align-items: baseline;
  padding: 22px 0; background: none; border: 0; color: inherit; text-align: left; cursor: pointer; transition: color .3s, padding .5s var(--ease); }
.ir-title { font-family: var(--serif); font-size: var(--fs-title); line-height: .92; letter-spacing: var(--ls-tight); text-transform: uppercase; }
.ir-year { text-align: right; }
.index-row:hover, .index-row:focus-visible { color: var(--safe); padding-left: 14px; outline: none; }
.index-row:focus-visible .ir-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 8px; }
.index-thumb { position: fixed; left: 0; top: 0; z-index: 9; width: 300px; aspect-ratio: 4 / 3; margin: -110px 0 0 30px; pointer-events: none;
  opacity: 0; transform: scale(.85); transition: opacity .35s, scale .5s var(--ease); }
.index-thumb::before { content: ""; position: absolute; inset: 0; background: var(--img, none) center / cover no-repeat; filter: grayscale(1) contrast(1.15); }
.index-thumb::after { content: ""; position: absolute; inset: 0; background: var(--safe); mix-blend-mode: multiply; }
.index-thumb.on { opacity: 1; scale: 1.18; }
@media (pointer: coarse) { .index-thumb { display: none; } }

/* menu: white capitals, the accent on hover (the same as the inner pages' phone menu) */
.sheet-menu { color: var(--light); }
.menu-links { display: flex; flex-direction: column; gap: 14px; margin-top: 8vh; }
.menu-links > * { font-family: var(--serif); font-size: clamp(44px, 13.5vw, 64px); letter-spacing: var(--ls-tight); line-height: 1; text-transform: uppercase;
  color: inherit; text-decoration: none; background: none; border: 0; text-align: left; padding: 0; cursor: pointer; transition: color .3s; }
.menu-links > *:hover, .menu-links > *:focus-visible { color: var(--safe); outline: none; }
.menu-foot { margin-top: 6vh; color: var(--light-2); }
.menu-foot a { color: inherit; }
/* letter reveal in the Index and the menu */
.mw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.mc { display: inline-block; will-change: transform; }

/* ---- page-change curtain: black, its rising edge glows warm ------------- */
.curtain { position: fixed; inset: 0; z-index: 40; pointer-events: none; background: var(--black); } /* plain black as it closes over the page; the warm edge only shows as it lifts on the next page */

/* lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
/* no visible scrollbar anywhere: it vanished whenever a menu locked the scroll and the page jumped sideways */
html, .sheet { scrollbar-width: none; }
html::-webkit-scrollbar, .sheet::-webkit-scrollbar { display: none; }

/* crawlable work list: off-screen for sighted visitors with WebGL, the page itself without it */
.works-list { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.works-list:focus-within { position: fixed; left: var(--gut); top: var(--gut); z-index: 20; width: auto; height: auto; clip: auto; white-space: normal; background: var(--black); padding: 20px; border: 1px solid var(--ink); }
.works-list a { color: inherit; }
body.no-gl .works-list { position: relative; width: auto; height: auto; clip: auto; white-space: normal; padding: 110px var(--gut) 0; font-size: 18px; line-height: 1.6; }
.fallback { display: none; }
body.no-gl .fallback { display: block; position: relative; z-index: 1; padding: 120px var(--gut); list-style: none; }
body.no-gl .fallback li { margin-bottom: 48px; }
body.no-gl .fallback img { width: 100%; max-width: 900px; display: block; }
body.no-gl #gl, body.no-gl .strip, body.no-gl .hint, body.no-gl .hud-bottom, body.no-gl #light { display: none; }

/* ---- phones -------------------------------------------------------------- */
@media (max-width: 760px) {
  .site-nav, .li-btn { display: none; }
  .menu-btn, .sheet-close { display: inline-flex; border-color: transparent; padding: 10px 0 10px 16px; font-family: var(--serif); font-size: 16px; font-weight: 600; text-transform: none; letter-spacing: var(--ls-text); } /* just the word, Menu and Close alike */
  .sheet-close:hover, .sheet-close:focus-visible, .sheet-menu .sheet-close:hover, .sheet-menu .sheet-close:focus-visible { background: none; color: inherit; border-color: transparent; text-decoration: underline; text-underline-offset: 4px; }
  .sheet-close kbd { display: none; }
  .light-btn kbd { display: none; }
  .hud-bottom { grid-template-columns: 1fr; }
  .meta { max-width: none; }
  .dev { justify-self: start; }
  .strip { top: 96px; transform: none; flex-direction: row; right: var(--gut); }
  .strip button { width: 30px; height: 26px; } /* ≥ 24px to tap */
  .hint { top: auto; bottom: 42%; }
  /* the lights-on card is a full-width sheet under the print */
  .card { width: auto; left: var(--gut); right: var(--gut); top: auto; bottom: max(var(--gut), env(safe-area-inset-bottom)); transform: translateY(24px); }
  .card.on { transform: none; }
  .card h2 { margin: 8px 0 12px; }
  .card p#c-text { font-size: 15px; line-height: 1.5; }
  .c-meta { margin: 16px 0 18px; padding-top: 14px; font-size: 14px; }
  .c-link { font-size: 15px; }
  .c-link i { width: 40px; height: 40px; }
  body.lit .hud-bottom { opacity: 0; }
  .index-row { grid-template-columns: 34px 1fr; gap: 6px 12px; padding: 18px 0; }
  .ir-field, .ir-year { grid-column: 2; text-align: left; }
  .ir-year { display: none; }
}
@media (prefers-reduced-motion: reduce) { .hint i { animation: none; } }
