:root {
  --paper: #f4f1ec;
  --ink: #1b1a18;
  --muted: #8a857d;
  --night: #0f0f0e;
  --night-ink: #e9e5de;
  --gap: clamp(10px, 1.4vw, 22px);
  --space: clamp(64px, 12vh, 160px);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 14px/1.6 var(--sans);
  letter-spacing: .01em;
  transition: background-color 1.2s ease, color 1.2s ease;
  overflow-x: hidden;
}
body[data-tone="dark"] { background: var(--night); color: var(--night-ink); }
body[data-tone="dark"] .muted, body[data-tone="dark"] .ch-head p { color: #8f8a82; }
a { color: inherit; text-decoration: none; }

/* ---------- night mode (off by default; the visitor's choice) ---------- */
/* Swapping the page tokens turns every light section dark, so the whole site sits on one black. */
html.night { --paper: #0f0f0e; --ink: #e9e5de; --muted: #8f8a82; color-scheme: dark; }
html.night .show { background: #1c1b19; }
html.night .about { border-top-color: rgba(255, 255, 255, .08); }
.mode {
  position: fixed; top: 14px; right: 14px; z-index: 5; width: 40px; height: 40px;
  display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(27, 26, 24, .14); color: var(--ink);
  background: rgba(244, 241, 236, .72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background-color .4s, color .4s, border-color .4s, transform .2s;
}
.mode:hover { transform: scale(1.06); }
.mode:focus-visible { outline: 2px solid var(--flag-red); outline-offset: 2px; }
body[data-tone="dark"] .mode, html.night .mode {
  color: var(--night-ink); background: rgba(15, 15, 14, .6); border-color: rgba(233, 229, 222, .18);
}
.mode .sun, html.night .mode .moon { display: none; }
html.night .mode .sun { display: block; }

/* ---------- intro ---------- */
.intro {
  /* --pw: width of the photo on the right; the text keeps clear of it. */
  --pw: min(38vw, calc(78svh * .8));
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 8vh calc(11vw + var(--pw)) 8vh 7vw;
  position: relative;
}
/* Slideshow: slow crossfades with a gentle zoom; purely decorative, nothing to click. */
.show {
  position: absolute; right: 7vw; top: 50%; width: var(--pw); aspect-ratio: 4 / 5;
  transform: translateY(-50%); overflow: hidden; background: #d9d4cc;
  pointer-events: none; user-select: none; -webkit-user-select: none;
}
.show img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.8s ease;
}
.show img.on { opacity: 1; animation: drift 7s linear both; }
.show img.off { transform: scale(1.06); }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.06); } }
.kicker, .by, .ch-head .num, .toc span, .hint, .end p:last-of-type {
  font-size: 11px; text-transform: uppercase; letter-spacing: .28em; color: var(--muted);
}
.intro h1 {
  color: var(--flag-red);
  font: 300 clamp(64px, calc((82vw - var(--pw)) / 3.4), 240px)/.85 var(--serif);
  letter-spacing: -.02em;
  margin: 2vh 0 3vh -.05em;
}
/* The flag's colours: red letters, the dot of the "i" replaced by the yellow star. */
:root { --flag-red: #da251d; --flag-star: #ffcd00; }
.star-i { position: relative; display: inline-block; line-height: .85; }  /* the star is placed against this line box */
.star-i .star {
  position: absolute; left: 50%; top: .155em; width: .2em; height: .2em; overflow: visible;
  transform: translateX(-50%) rotate(0deg); fill: var(--flag-star);
  /* A thin red outline, in the letters' red, so the yellow holds up on the pale page. */
  stroke: var(--flag-red); stroke-width: .22; stroke-linejoin: round; paint-order: stroke fill;
  animation: star-in 1.6s .4s ease both;
}
@keyframes star-in { from { opacity: 0; transform: translateX(-50%) scale(.3) rotate(-72deg); } }
.by { color: var(--ink); }
.ig { margin-top: 10px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); transition: color .2s; }
.ig:hover { color: var(--ink); }
.intro .ig { align-self: flex-start; }
body[data-tone="dark"] .ig:hover { color: var(--night-ink); }
.toc { list-style: none; margin-top: 12vh; display: flex; flex-wrap: wrap; gap: 14px 48px; }
.toc a { font: 400 22px var(--serif); display: inline-flex; gap: 12px; align-items: baseline; }
.toc span { font-family: var(--sans); min-width: 2.6em; }
.toc em { color: var(--muted); font-style: italic; }
.toc a:hover em { color: var(--ink); }
.down { position: absolute; bottom: 5vh; right: 7vw; font-size: 22px; color: var(--muted); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

/* ---------- chapters ---------- */
.chapter { padding-bottom: var(--space); }
.ch-head { padding: var(--space) 7vw calc(var(--space) * .6); display: grid; grid-template-columns: auto 1fr; column-gap: 28px; align-items: baseline; }
.ch-head .num { grid-row: span 2; align-self: start; padding-top: 1.4em; }
.ch-head h2 { font: 300 clamp(48px, 8vw, 120px)/1 var(--serif); }
.ch-head p { font: italic 300 clamp(20px, 2.4vw, 30px) var(--serif); color: var(--muted); }

.r { margin: 0 auto var(--space); }
.ph { position: relative; overflow: hidden; }
.chapter .ph { cursor: zoom-in; }
.fs {
  position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px;
  display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(15, 15, 14, .55); color: #f4f1ec; opacity: 0; transition: opacity .25s;
}
.ph:hover .fs, .fs:focus-visible { opacity: .85; }
.fs:hover { opacity: 1; }
@media (hover: none) { .fs { opacity: .7; } }
.ph img { display: block; width: 100%; height: auto; }

.full { width: 100%; }
.full img { max-height: 110svh; object-fit: cover; }

.solo .ph { width: min(var(--w), calc(84svh * var(--ar))); }
.solo.center .ph { --w: 74vw; margin: 0 auto; }
.solo.left .ph { --w: 58vw; margin-left: 7vw; }
.solo.right .ph { --w: 50vw; margin-left: auto; margin-right: 7vw; }

.row { display: flex; gap: var(--gap); padding: 0 7vw; align-items: flex-start; }
.row .ph { flex: var(--ar) 1 0; }

.stagger { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); padding: 0 7vw; align-items: start; }
.stagger .a { grid-column: 1 / 6; }
.stagger .b { grid-column: 7 / 13; margin-top: 22vh; }

.strip { padding-left: 7vw; }
.track {
  display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 7vw 18px 0; scrollbar-width: thin; scrollbar-color: var(--muted) transparent;
}
.track .ph { flex: 0 0 auto; height: min(62svh, 560px); scroll-snap-align: start; }
.track .ph img { height: 100%; width: auto; }
.hint { margin-top: 10px; }

/* ---------- explore more / show less ---------- */
.js .chapter:not(.open) .r.extra { display: none; }
html:not(.js) .more { display: none; }
.more { display: flex; justify-content: center; padding: 0 7vw; margin-top: calc(var(--space) * -.35); }
.more-btn {
  display: inline-flex; align-items: center; gap: 22px;
  padding: 12px 36px 12px 14px; border: 0; border-radius: 999px;
  background: var(--ink); color: var(--paper); cursor: pointer;
  font: 500 13px var(--sans); letter-spacing: .22em; text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
  transition: background-color 1.2s, color 1.2s, transform .3s, box-shadow .3s;
}
.more-btn:hover, .more-btn:focus-visible { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(0, 0, 0, .22); outline: none; }
body[data-tone="dark"] .more-btn { background: var(--night-ink); color: var(--night); box-shadow: 0 8px 30px rgba(233, 229, 222, .08); }
.more-thumbs { display: inline-flex; padding-left: 18px; }
.more-thumbs img {
  width: 58px; height: 58px; object-fit: cover; border-radius: 50%; margin-left: -18px;
  border: 2px solid var(--ink); transition: margin .35s, transform .35s, border-color 1.2s;
}
body[data-tone="dark"] .more-thumbs img { border-color: var(--night-ink); }
.more-thumbs img:nth-child(1) { transform: rotate(-6deg); }
.more-thumbs img:nth-child(3) { transform: rotate(6deg); }
.more-btn:hover .more-thumbs img { margin-left: -8px; }
.more-arrow { font-size: 16px; letter-spacing: 0; animation: bob 2.4s ease-in-out infinite; }
.more-close { display: none; }
.chapter.open .more-thumbs, .chapter.open .more-open { display: none; }
.chapter.open .more-close { display: inline; }
.chapter.open .more-btn { padding: 16px 36px; }
.chapter.open .more-arrow { transform: rotate(180deg); animation: none; }

/* ---------- reveal ---------- */
.js .ph { opacity: 0; transform: translateY(24px); transition: opacity 1s ease, transform 1s ease; }
.js .ph.in { opacity: 1; transform: none; }
.js .track .ph { transform: none; }

/* ---------- about ---------- */
.about {
  display: grid; grid-template-columns: 5fr 7fr; gap: 6vw; align-items: center;
  padding: var(--space) 7vw; border-top: 1px solid rgba(0, 0, 0, .08);
}
.about > * { min-width: 0; }
.about + .end { padding-top: calc(var(--space) * .4); }
.about h2 { font: 300 clamp(36px, 4.4vw, 64px)/1.05 var(--serif); margin: 14px 0 28px; }
.about-text p:not(.kicker) { font: 300 clamp(20px, 1.9vw, 26px)/1.5 var(--serif); max-width: 30ch; }
.about-text p + p { margin-top: 14px; }
/* Portrait spans both rows; column ratio keeps the two landscapes flush with it. */
.about-photos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.125fr); grid-template-rows: 1fr 1fr; gap: var(--gap); }
.about-photos .tall { grid-row: 1 / 3; }
.about-photos .ph { height: 100%; }
.about-photos .ph img { height: 100%; object-fit: cover; }

/* ---------- footer ---------- */
.end { text-align: center; padding: var(--space) 7vw calc(var(--space) * 1.2); }
.fin { font: 300 clamp(44px, 6.4vw, 88px)/1 var(--serif); color: var(--flag-red); margin-bottom: 18px; }
.end .ig { display: block; margin-top: 12px; }
.gear { margin: 4px auto 30px; }
.gear-k { font-size: 10px; text-transform: uppercase; letter-spacing: .3em; color: var(--muted); }
.gear ul { list-style: none; margin-top: 8px; font: italic 300 clamp(17px, 1.6vw, 21px)/1.5 var(--serif); color: var(--ink); }
.gear li { display: inline-block; white-space: nowrap; }
.gear li + li::before { content: "\00b7"; margin: 0 .6em; color: var(--muted); font-style: normal; }
.end a { display: inline-block; margin-top: 28px; color: var(--muted); font-size: 12px; letter-spacing: .12em; }
.end a:hover { color: var(--ink); }

/* ---------- lightbox ---------- */
.lb {
  position: fixed; inset: 0; z-index: 10; background: rgba(12, 12, 11, .97);
  display: grid; place-items: center; animation: fade .25s ease;
}
.lb[hidden] { display: none; }
.lb img { max-width: 92vw; max-height: 84svh; object-fit: contain; }
.lb > button {
  position: absolute; background: none; border: 0; color: #cfcac2; font: 300 30px var(--sans);
  cursor: pointer; padding: 18px; opacity: .6; transition: opacity .2s;
}
.lb > button:hover { opacity: 1; }
.lb-x { top: 8px; right: 12px; }
.lb-fs { top: 14px; right: 64px; line-height: 0; }
.lb-fs .fs-out, .lb.full .lb-fs .fs-in { display: none; }
.lb.full .lb-fs .fs-out { display: inline; }
.lb.full { background: #000; }
.lb.full img { max-width: 100vw; max-height: calc(100vh - 64px); }
.lb-p { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-n { right: 8px; top: 50%; transform: translateY(-50%); }
.lb-foot {
  position: absolute; left: 0; right: 0; bottom: 14px;
  display: flex; justify-content: center; align-items: center; gap: 28px;
}
.lb-c { color: #7d786f; font-size: 11px; letter-spacing: .28em; }
.lb-social { display: inline-flex; gap: 20px; }
.lb-social[hidden] { display: none; }
.lb-like, .lb-talk {
  display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; padding: 6px 2px;
  color: #cfcac2; opacity: .75; font: 500 12px var(--sans); cursor: pointer; transition: opacity .2s, color .2s;
}
.lb-like:hover, .lb-talk:hover { opacity: 1; }
.lb-like.on { color: #e0675c; opacity: 1; }
.lb-like.on svg { fill: currentColor; }
.lb-like.on svg { animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.25); } }

/* Comments: a panel on the right (a sheet from the bottom on phones). */
.lb.talking { padding-right: 380px; }
.lb.talking img { max-width: calc(92vw - 380px); }
.lb.talking .lb-foot { right: 380px; }
.lb.talking .lb-n { right: 388px; }
.lb.talking .lb-x { right: 392px; }
.lb.talking .lb-fs { right: 444px; }
.lb-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 380px;
  display: flex; flex-direction: column; padding: 22px 24px 24px;
  background: #171716; color: #e9e5de; border-left: 1px solid #2a2927; overflow-y: auto;
}
.lb-panel[hidden] { display: none; }
.lb-panel-head { display: flex; justify-content: space-between; align-items: center; }
.lb-panel-head p { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: #8f8a82; }
.lb-panel-x { background: none; border: 0; color: #cfcac2; font: 300 26px var(--sans); cursor: pointer; opacity: .6; padding: 0 4px; }
.lb-panel-x:hover { opacity: 1; }
.lb-comments { list-style: none; margin: 18px 0 8px; }
.lb-comments li { padding: 14px 0; border-bottom: 1px solid #262523; }
.lb-comments .who { font-size: 13px; font-weight: 500; }
.lb-comments time { font-size: 11px; font-weight: 400; color: #7d786f; margin-left: 6px; }
.lb-comments .who + p {
  font: 300 18px/1.45 var(--serif); color: #d8d3cb; margin-top: 4px;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.lb-empty { font: italic 300 18px var(--serif); color: #7d786f; margin: 20px 0; }
.lb-panel form { margin-top: auto; padding-top: 18px; display: grid; gap: 10px; }
.lb-panel input, .lb-panel textarea {
  width: 100%; background: #0f0f0e; border: 1px solid #33312e; border-radius: 2px;
  color: #e9e5de; font: 400 14px/1.5 var(--sans); padding: 10px 12px; resize: vertical;
}
.lb-panel input:focus, .lb-panel textarea:focus { outline: none; border-color: #7d786f; }
.lb-panel form button {
  justify-self: start; background: #e9e5de; color: #111; border: 0; border-radius: 2px; cursor: pointer;
  padding: 10px 20px; font: 500 11px var(--sans); letter-spacing: .2em; text-transform: uppercase;
}
.lb-panel form button:disabled { opacity: .5; cursor: default; }
.lb-panel .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.lb-note { font-size: 12px; color: #8f8a82; min-height: 1.2em; }
@keyframes fade { from { opacity: 0; } }

/* ---------- small screens ---------- */
@media (max-width: 700px) {
  :root { --space: 56px; }
  .intro, .ch-head { padding-left: 16px; padding-right: 16px; }
  .intro { --pw: 0px; padding-top: 16px; }
  .show { position: relative; right: auto; top: auto; width: auto; aspect-ratio: auto; height: 46svh; transform: none; margin: 0 -16px 6vh; }
  .down { right: 16px; }
  .toc { flex-direction: column; margin-top: 8vh; }
  .row { flex-direction: column; padding: 0 16px; }
  .row .ph { flex: none; width: 100%; }
  .stagger { display: flex; flex-direction: column; padding: 0 16px; }
  .stagger .a { width: 72%; }
  .stagger .b { margin-top: 0; width: 86%; align-self: flex-end; }
  .solo .ph { --w: calc(100vw - 32px) !important; margin-left: 16px !important; margin-right: 16px !important; }
  .solo.right .ph { margin-left: auto !important; }
  .strip { padding-left: 16px; }
  .track .ph { height: 46svh; }
  .lb-p, .lb-n { top: auto; bottom: 4px; transform: none; }
  .lb-foot { bottom: 18px; gap: 18px; }
  .more { padding: 0 16px; }
  .gear li { display: block; }
  .gear li + li::before { content: none; }
  .more-btn { gap: 14px; padding-right: 24px; letter-spacing: .14em; font-size: 12px; }
  .more-thumbs img { width: 44px; height: 44px; margin-left: -14px; }
  .lb.talking { padding: 64px 0 0; place-items: start center; }
  .lb.talking img { max-width: 92vw; max-height: calc(28svh - 76px); }
  .lb.talking .lb-foot { right: 0; }
  .lb.talking .lb-n { right: 8px; }
  .lb.talking .lb-x { right: 12px; }
  .lb.talking .lb-fs { right: 64px; }
  .lb-panel {
    top: auto; width: 100%; height: 72svh; border-left: 0; border-top: 1px solid #2a2927;
    border-radius: 14px 14px 0 0; padding: 18px 16px 20px;
  }
  .about { grid-template-columns: 1fr; gap: 40px; padding-left: 16px; padding-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .ph { opacity: 1; transform: none; transition: none; }
  .down { animation: none; }
  .star-i .star { animation: none; }
  .show img.on { animation: none; }
  .show img.off { transform: none; }
}

/* ---------- editorial arrangements ---------- */
body { --bgc: var(--paper); }
body[data-tone="dark"] { --bgc: var(--night); }

/* Chapter cover: a full-screen photo with the chapter title set on it. */
.cover { position: relative; height: 100svh; margin-bottom: var(--space); overflow: hidden; }
.cover .ph { position: absolute; inset: 0; cursor: zoom-in; }
.cover .ph img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus); }
.js .cover .ph { transform: none; }
.ch-head.on-photo {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 30vh 7vw 9vh;
  color: #f4f1ec; pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .55));
}
.ch-head.on-photo p, .ch-head.on-photo .num { color: rgba(244, 241, 236, .82); }
.ch-head.on-photo h2 { font-size: clamp(64px, 11vw, 170px); }

/* A word or two marking a turn in the chapter. */
.beat { text-align: center; padding: 0 7vw; }
.beat p { font: italic 300 clamp(34px, 5vw, 72px)/1.1 var(--serif); color: var(--muted); }
body[data-tone="dark"] .beat p { color: #8f8a82; }

/* A photo running off one edge of the screen. */
.bleed { display: flex; }
.bleed .ph { width: 76vw; }
.bleed-r .ph { margin-left: auto; }

/* A small photo alone in a lot of space. */
.whisper { padding: calc(var(--space) * .5) 7vw; }
.whisper .ph { width: min(28vw, calc(46svh * var(--ar))); margin: 0 auto; }

/* A big photo with a smaller one beside it, bottoms aligned: no overlap, no frame. */
.overlap { display: flex; align-items: flex-end; gap: calc(var(--gap) * 2); padding: 0 7vw; }
.overlap-r { flex-direction: row-reverse; }
.overlap .big { flex: 0 0 62%; }
.overlap .small { flex: 0 0 calc(38% - var(--gap) * 2); max-width: calc(52svh * var(--ar)); }

/* One photo stays pinned while the others scroll past it. */
.sticky { display: grid; grid-template-columns: 1fr 1fr; gap: 6vw; padding: 0 7vw; align-items: start; }
.sticky .pin { position: sticky; top: 8svh; }
.sticky .pin .ph { width: min(100%, calc(84svh * var(--ar))); }
.sticky-l .pin .ph { margin-left: auto; }
.sticky-r .pin { order: 2; }
.sticky .col { display: flex; flex-direction: column; gap: 16vh; padding: 16vh 0 6vh; }
.sticky .col .ph:nth-child(even) { width: 78%; align-self: flex-end; }

/* Three photos side by side at different heights. */
.wave { display: flex; gap: var(--gap); padding: 0 7vw; align-items: flex-start; }
.wave .ph { flex: var(--ar) 1 0; }
.wave .ph:nth-child(2) { margin-top: 16vh; }
.wave .ph:nth-child(3) { margin-top: 7vh; }

/* One large photo with two smaller ones stacked beside it. */
.mosaic { padding: 0 7vw; }
.mosaic .m { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: var(--gap); aspect-ratio: 3 / 2; }
.mosaic .m .ph { height: 100%; }
.mosaic .m .ph img { height: 100%; object-fit: cover; }
.mosaic .m .big { grid-row: 1 / 3; }
.mosaic-r .m { grid-template-columns: 1fr 2fr; }
.mosaic-r .m .big { grid-column: 2; }

/* Film contact sheet on a black band. */
.sheet {
  background: #0c0c0b; padding: 7vh 7vw;
  --holes: repeating-linear-gradient(90deg, transparent 0 18px, #2a2926 18px 30px);
  position: relative;
}
.sheet::before, .sheet::after { content: ""; position: absolute; left: 0; right: 0; height: 10px; background: var(--holes); }
.sheet::before { top: 16px; }
.sheet::after { bottom: 16px; }
.film { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3vh 2vw; }
.frame .ph { aspect-ratio: 3 / 2; background: #000; }
.frame .ph img { width: 100%; height: 100%; object-fit: contain; }

@media (max-width: 700px) {
  .cover { height: 78svh; }
  .ch-head.on-photo { padding: 20vh 16px 6vh; }
  .bleed .ph { width: 100%; }
  .whisper .ph { width: 62vw; }
  .overlap, .overlap-r { flex-direction: column; align-items: stretch; gap: var(--gap); padding: 0 16px; }
  .overlap .big, .overlap .small { flex: none; width: 100%; max-width: none; }
  .sticky { grid-template-columns: 1fr; gap: 40px; padding: 0 16px; }
  .sticky .pin { position: static; }
  .sticky-r .pin { order: 0; }
  .sticky .pin .ph { width: 100%; }
  .sticky .col { gap: 40px; padding: 0; }
  .wave { flex-direction: column; padding: 0 16px; }
  .wave .ph { flex: none; width: 100%; margin-top: 0 !important; }
  .mosaic { padding: 0 16px; }
  .sheet { padding: 6vh 16px; }
  .film { grid-template-columns: repeat(2, 1fr); }
}
