@font-face {
  font-family: Archivo;
  src: url(/assets/archivo-latin.woff2) format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Archivo;
  src: url(/assets/archivo-latin-ext.woff2) format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* the accent is a real <color> so it can transition */
@property --accent {
  syntax: "<color>";
  inherits: true;
  initial-value: #d9d6d0;
}

:root {
  color-scheme: dark;
  --fg: #f3f2ef;
  --dim: #a3a19c;
  --gut: clamp(16px, 2.4vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; margin: 0; }
html { background: #000; color: var(--fg); font: 400 1rem/1.45 Archivo, system-ui, sans-serif; -webkit-text-size-adjust: 100%; }
body { background: #000; transition: --accent .7s ease; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 20; background: #000; padding: .6em 1em; }
.skip:focus { left: var(--gut); top: var(--gut); }

/* ---------------------------------------------------------------- header */
.top {
  position: absolute; inset: 0 0 auto; z-index: 5;
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: var(--gut);
}
.top h1 { font: inherit; }
.tagline { display: block; margin-top: .45em; font-size: .95rem; font-weight: 600; font-stretch: 100%; color: var(--fg); opacity: .8; }
.name {
  display: inline-block;
  font-size: clamp(1.3rem, 2.1vw, 1.9rem); font-weight: 800; font-stretch: 125%; line-height: 1;
  color: var(--accent); letter-spacing: -.01em;
}
.links { display: flex; gap: 1.4em; font-weight: 600; white-space: nowrap; }
.name, .index .m { white-space: nowrap; }
.links a { transition: color .2s; }
.links a:hover { color: var(--accent); }

/* ---------------------------------------------------------------- home */
.home { height: 100svh; overflow: hidden; }
.scene { position: fixed; inset: 0; }
.stage { position: absolute; inset: 0; margin: 0; background: #000; overflow: hidden; }
.frame {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; opacity: 0; transition: opacity 1.6s ease;
}
.frame.is-on { opacity: 1; }
.frame.no-fade { transition: none; }
/* veil behind the text */
.stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgb(0 0 0 / .55), transparent 20%),
    linear-gradient(to top, rgb(0 0 0 / .82), rgb(0 0 0 / .45) 38%, transparent 66%),
    linear-gradient(to right, rgb(0 0 0 / .5), transparent 55%);
}
.shutter { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; pointer-events: none; }
/* closed until home.js has a random photo decoded, then opens (.open) */
.shutter i { flex: 1; margin-bottom: -1px; background: #000; transform-origin: 50% 100%; }
.open .shutter i {
  animation: shutter-open .52s cubic-bezier(.65, 0, .35, 1) both;
  animation-delay: calc(.08s + var(--k) * 34ms);
}
@keyframes shutter-open { from { transform: scaleY(1); } to { transform: scaleY(0); } }
.home .name { font-stretch: 62%; }
.home.open .name { animation: widen 1.2s var(--ease) .08s both; }
@keyframes widen { from { font-stretch: 62%; } to { font-stretch: 125%; } }

.caption {
  position: absolute; right: var(--gut); bottom: var(--gut); z-index: 2;
  font-weight: 600; font-size: .95rem; text-align: right; text-shadow: 0 0 12px #000;
}
.cap-n { color: var(--accent); font-variant-numeric: tabular-nums; }

.index {
  position: absolute; left: var(--gut); bottom: var(--gut); z-index: 3;
  display: flex; align-items: flex-end; gap: clamp(28px, 4.5vw, 80px);
  max-width: calc(100% - 2 * var(--gut) - 15rem);
}
.index h2 { font-size: 1rem; font-weight: 700; font-stretch: 100%; color: var(--accent); margin-bottom: .35em; }
.index ol { list-style: none; padding: 0; }
.index a {
  display: flex; align-items: baseline; gap: .55em; width: max-content;
  font-size: clamp(1.3rem, min(2.6vw, 4.6vh), 2.9rem); line-height: 1; font-weight: 800; font-stretch: 62%;
  white-space: nowrap; letter-spacing: -.005em;
  transition: font-stretch .45s var(--ease), opacity .3s ease, color .3s ease;
}
.index .m { font-size: .8rem; font-weight: 500; font-stretch: 100%; color: var(--dim); font-variant-numeric: tabular-nums; }
.index a:hover, .index a:focus-visible { font-stretch: 92%; color: var(--accent); }
.index:hover a:not(:hover), .index:has(a:focus-visible) a:not(:focus-visible) { opacity: .32; }

@media (max-width: 760px) {
  .home { height: auto; overflow: visible; }
  .scene { position: static; }
  .stage { position: relative; height: 72svh; }
  .stage::after { background: linear-gradient(to bottom, rgb(0 0 0 / .55), transparent 25%), linear-gradient(to top, rgb(0 0 0 / .7), transparent 30%); }
  .index { position: static; display: grid; gap: 2.2rem; max-width: none; padding: 1.6rem var(--gut) 3rem; }
  .index a { font-size: 2.2rem; white-space: normal; width: auto; padding: .08em 0; }
  .index a:hover, .index a:focus-visible { font-stretch: 75%; }
  .name { font-size: 1.15rem; }
  .links { gap: 1em; font-size: .95rem; }
}

/* ---------------------------------------------------------------- pages */
.page { padding: calc(var(--gut) * 2 + 3.2rem) var(--gut) 0; }
.intro { margin-bottom: clamp(28px, 5vw, 72px); }
.intro h1 {
  font-size: clamp(3.2rem, 12vw, 11rem); line-height: .84; font-weight: 850; font-stretch: 62%;
  color: var(--accent); letter-spacing: -.015em; overflow-wrap: anywhere;
}
.meta { font-weight: 700; font-size: 1.15rem; margin-top: .9em; font-variant-numeric: tabular-nums; }
.desc { max-width: 38em; margin-top: .35em; font-size: 1.15rem; color: #cdcbc6; }

/* justified rows, no cropping: each tile grows in proportion to its aspect ratio */
.grid { --rh: clamp(180px, 19vw, 380px); display: flex; flex-wrap: wrap; gap: 6px; }
/* grow is scaled x100: a sum of flex-grow below 1 would only hand out part of the free space */
.grid::after { content: ""; flex-grow: 1e6; }
.ph { flex: calc(var(--r) * 100) 1 calc(var(--r) * var(--rh)); background: #111; }
.ph img { width: 100%; transition: opacity .25s ease; }
.ph:hover img { opacity: .82; }
.ph:focus-visible { outline-offset: 2px; }
@media (max-width: 760px) { .grid { --rh: 190px; gap: 4px; } }

.next { position: relative; display: block; margin: clamp(56px, 9vw, 140px) calc(-1 * var(--gut)) 0; overflow: hidden; }
.next img { width: 100%; height: min(78vh, 60vw); object-fit: cover; transition: transform 1.2s var(--ease); }
.next:hover img { transform: scale(1.025); }
.next::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / .8), transparent 60%); }
.next-l, .next-t { position: absolute; left: var(--gut); z-index: 1; }
.next-l { bottom: calc(var(--gut) + clamp(3rem, 9vw, 8.4rem)); font-weight: 700; font-size: 1.05rem; }
.next-t {
  bottom: var(--gut); right: var(--gut);
  font-size: clamp(3rem, 9vw, 8rem); line-height: .86; font-weight: 850; font-stretch: 62%; color: var(--accent);
  transition: font-stretch .5s var(--ease);
}
.next:hover .next-t, .next:focus-visible .next-t { font-stretch: 80%; }

.about { max-width: 34em; font-size: clamp(1.15rem, 1.8vw, 1.5rem); line-height: 1.4; }
.about p + p { margin-top: 1em; }
.ig { color: var(--accent); font-weight: 700; border-bottom: 2px solid; }
.about-links { display: flex; flex-wrap: wrap; gap: .4em 1.4em; }

.foot {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: calc(var(--gut) * 1.5) var(--gut); color: var(--dim); font-size: .9rem;
}
.foot a:hover { color: var(--accent); }
.simple .foot { position: absolute; bottom: 0; inset-inline: 0; }
.simple { min-height: 100svh; position: relative; }

/* ---------------------------------------------------------------- lightbox */
.lightbox {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: #000; color: var(--fg); overflow: hidden;
  transition: --accent .4s ease;
}
.lightbox::backdrop { background: #000; }
.lightbox img { position: absolute; inset: 56px 80px; width: calc(100% - 160px); height: calc(100% - 112px); max-width: none; object-fit: contain; }
.lb-count { position: absolute; left: var(--gut); top: 18px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.lb-close { position: absolute; right: calc(var(--gut) - .5em); top: 10px; padding: .5em; font-weight: 600; }
.lb-close:hover { color: var(--accent); }
.lb-prev, .lb-next { position: absolute; top: 56px; bottom: 56px; width: 80px; display: grid; place-items: center; }
.lb-prev { left: 0; }
.lb-next { right: 0; }
.lb-prev svg, .lb-next svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: stroke .2s; }
.lb-prev:hover svg, .lb-next:hover svg { stroke: var(--accent); }
@media (max-width: 760px) {
  .lightbox img { inset: 52px 0 64px; width: 100%; height: calc(100% - 116px); }
  .lb-prev, .lb-next { top: auto; bottom: 8px; height: 48px; width: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .shutter { display: none; }
  .home .name { font-stretch: 125%; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
