/* Model portfolio — art direction: editorial sand.
   Paper and ink, no accent: black, sand and grey only. The giant name in Anton, headings and figures in
   Instrument Serif, labels and nav in Inter. The book stays in colour; the cover frame is black and white. */

:root {
  /* colour — light (paper) is the default */
  --paper: #ebe5da;
  --paper-2: #e2dbce;
  --bg: var(--paper);
  --surface: var(--paper-2);
  --text: #1b1a18;
  --muted: #625d55;            /* #7d776d failed AA on paper (3.5:1); this is 5.3:1 on paper, 4.7:1 on paper-2 */
  --line: rgb(27 26 24 / .16);
  --line-strong: rgb(27 26 24 / .4);
  --accent: var(--text);
  --accent-text: var(--bg);
  --thumb: rgb(27 26 24 / .22);
  --shadow: 0 1px 2px rgb(0 0 0 / .05), 0 14px 32px -16px rgb(0 0 0 / .22);
  color-scheme: light;

  /* type */
  --font-display: "Anton", "Anton Fallback", Impact, "Arial Narrow", sans-serif;
  --font-heading: "Instrument Serif", "Instrument Fallback", Georgia, serif;
  --font-body: "Inter", "Inter Fallback", Arial, sans-serif;
  --giant: clamp(110px, 27.5vw, 460px);
  --step-1: clamp(44px, 5vw, 78px);
  --tracking-tight: -0.01em;

  /* shape + space */
  --radius: 0px;
  --radius-lg: 0px;
  --container: 1760px;
  --gutter: clamp(16px, 2.6vw, 40px);
  --section: clamp(64px, 8vw, 128px);
}
/* light for every first visit; dark only when the visitor picks it with the toggle (remembered) */
:root[data-theme="dark"] {
  --bg: #1a1714; --surface: #23201b; --paper-2: #23201b; --text: #efe8dc; --muted: #b0a796;
  --line: rgb(239 232 220 / .18); --line-strong: rgb(239 232 220 / .42); --thumb: rgb(239 232 220 / .24);
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 18px 40px -18px rgb(0 0 0 / .6);
  color-scheme: dark;
}

/* Fonts: pinned Fontsource files (OFL) on jsDelivr. Anton swaps (one nowrap line, fixed line height: no shift);
   the serif and Inter are optional with metric-matched fallbacks, so nothing moves after first paint. */
@font-face { font-family: "Anton"; font-style: normal; font-weight: 400; font-display: swap; src: url("https://cdn.jsdelivr.net/npm/@fontsource/anton@5.1.0/files/anton-latin-400-normal.woff2") format("woff2"); 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: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: optional; src: url("https://cdn.jsdelivr.net/npm/@fontsource/instrument-serif@5.1.0/files/instrument-serif-latin-400-normal.woff2") format("woff2"); 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: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: optional; src: url("https://cdn.jsdelivr.net/npm/@fontsource/instrument-serif@5.1.0/files/instrument-serif-latin-400-italic.woff2") format("woff2"); 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: "Inter"; font-style: normal; font-weight: 400; font-display: optional; src: url("https://cdn.jsdelivr.net/npm/@fontsource/inter@5.1.0/files/inter-latin-400-normal.woff2") format("woff2"); 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: "Inter"; font-style: normal; font-weight: 600; font-display: optional; src: url("https://cdn.jsdelivr.net/npm/@fontsource/inter@5.1.0/files/inter-latin-600-normal.woff2") format("woff2"); 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: "Anton Fallback"; src: local("Impact"), local("Arial Narrow Bold"); size-adjust: 96%; }
@font-face { font-family: "Instrument Fallback"; src: local("Georgia"), local("Times New Roman"); size-adjust: 88%; ascent-override: 102%; descent-override: 28%; line-gap-override: 0%; }
@font-face { font-family: "Inter Fallback"; src: local("Arial"), local("ArialMT"), local("Helvetica"); size-adjust: 107%; ascent-override: 90.5%; descent-override: 22.5%; line-gap-override: 0%; }

/* ---------- base ---------- */
html { background: var(--bg); }
body { font-family: var(--font-body); font-size: 16px; line-height: 1.6; transition: background-color var(--med) ease, color var(--med) ease; }
::selection { background: var(--text); color: var(--bg); }
a { color: inherit; text-underline-offset: .25em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.ico { inline-size: 1.15em; block-size: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.wm-slot { display: contents; }
em { font-style: italic; }

/* labels: Inter 600, uppercase, tracked (12px: the floor for small text on this site) */
.label { font-family: var(--font-body); font-weight: 600; font-size: 12px; line-height: 1.4; letter-spacing: .16em; text-transform: uppercase; }
.muted { color: var(--muted); }
a.label { display: inline-flex; align-items: center; min-block-size: 44px; text-decoration: none; background: linear-gradient(currentColor, currentColor) no-repeat 0 calc(50% + .8em) / 0 1px; transition: background-size var(--med) var(--ease-out); }
a.label:hover { background-size: 100% 1px; }
/* underlined label links */
.ulink { display: inline-flex; align-items: center; min-block-size: 44px; font-family: var(--font-body); font-weight: 600; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .55em; transition: text-decoration-color var(--fast) ease, opacity var(--fast) ease; }
.ulink:hover { text-decoration-color: transparent; }

/* the giant: Anton, set to fill the width */
.giant { font-family: var(--font-display); font-weight: 400; font-size: var(--giant); line-height: .8; text-transform: uppercase; text-align: center; white-space: nowrap; letter-spacing: 0; margin: 0; }
@media (max-width: 400px) { :root { --giant: 27.5vw; } }

/* section headings: serif, one italic part, muted label on the right, hairline under */
.sec-title { font-family: var(--font-heading); font-weight: 400; font-size: var(--step-1); line-height: 1; letter-spacing: var(--tracking-tight); margin: 0; text-wrap: balance; }
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; padding-block-end: 14px; border-block-end: 1px solid var(--line); margin-block-end: 28px; }
.sec-head .label { color: var(--muted); padding-block-end: .5em; }
.sec-head a.label { padding-block-end: 0; }

/* buttons: solid ink, paper text, square */
.btn-ink, .btn-line { display: inline-flex; align-items: center; justify-content: center; gap: .6em; min-block-size: 50px; padding: 0 28px; border: 1px solid var(--text); border-radius: 0; font-family: var(--font-body); font-weight: 600; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background-color var(--med) var(--ease-out), color var(--med) var(--ease-out); }
.btn-ink { background: var(--text); color: var(--bg); }
.btn-ink:hover { background: transparent; color: var(--text); }
.btn-line { background: transparent; color: var(--text); }
.btn-line:hover { background: var(--text); color: var(--bg); }

.icon-btn { display: inline-grid; place-items: center; inline-size: 44px; block-size: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; text-decoration: none; cursor: pointer; transition: background-color var(--fast) ease; }
.icon-btn:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.icon-btn .ico { inline-size: 20px; block-size: 20px; }
.theme-btn .ico-sun { display: none; }
:root[data-theme="dark"] .theme-btn .ico-sun { display: block; }
:root[data-theme="dark"] .theme-btn .ico-moon { display: none; }
/* ---------- nav: one row, five items spread edge to edge ---------- */
.site-head { position: relative; z-index: 50; padding-inline: var(--gutter); }
.nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; block-size: 68px; max-inline-size: var(--container); margin-inline: auto; }
.nav > a { justify-self: center; display: inline-flex; align-items: center; gap: 10px; min-block-size: 44px; font-family: var(--font-body); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; white-space: nowrap; background: linear-gradient(currentColor, currentColor) no-repeat 100% calc(50% + .85em) / 0 1px; transition: background-size var(--med) var(--ease-out); }
.nav > a:hover { background-size: 100% 1px; background-position-x: 0; }
.nav > a:first-child { justify-self: start; }
.nav > a:nth-child(5 of a) { justify-self: end; }
.nav > a[aria-current="page"]::before { content: ""; inline-size: 8px; block-size: 8px; border-radius: 50%; background: currentColor; flex: none; }
.nav__menu { display: none; justify-self: end; min-block-size: 44px; min-inline-size: 44px; padding: 0 2px; border: 0; background: none; color: inherit; font-family: var(--font-body); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
@media (max-width: 760px) {
  .nav { grid-template-columns: 1fr auto; block-size: 60px; }
  .nav > a:not(:first-child) { display: none; }
  .nav__menu { display: inline-flex; align-items: center; }
}

.menu-panel { position: fixed; inset: 0; z-index: 60; background: var(--bg); color: var(--text); display: grid; align-content: center; padding: 6rem var(--gutter) 3rem; opacity: 0; visibility: hidden; transition: opacity var(--med) ease, visibility 0s linear var(--med); }
.menu-panel.is-open { opacity: 1; visibility: visible; transition: opacity var(--med) ease; }
.menu-panel ol { display: grid; gap: .25rem; margin: 0; padding: 0; list-style: none; border-block-start: 1px solid var(--line); }
.menu-panel li { border-block-end: 1px solid var(--line); }
.menu-panel a { display: flex; align-items: center; min-block-size: 64px; font-family: var(--font-heading); font-size: clamp(2.4rem, 10vw, 3.2rem); line-height: 1.05; text-decoration: none; }
.menu-panel a[aria-current="page"] { font-style: italic; }
.menu-panel .menu-close { position: absolute; inset-block-start: 8px; inset-inline-end: calc(var(--gutter) - 10px); }
.menu-panel .credit { margin-block-start: 2rem; color: var(--muted); }
.menu-panel .credit a { display: inline-block; padding-block: .7rem; margin-block: -.7rem; }
.menu-panel li { opacity: 0; transform: translateY(1rem); transition: opacity .5s var(--ease-out), transform .6s var(--ease-out); }
.menu-panel.is-open li { opacity: 1; transform: none; }
.menu-panel.is-open li:nth-child(2) { transition-delay: 60ms; } .menu-panel.is-open li:nth-child(3) { transition-delay: 120ms; }
.menu-panel.is-open li:nth-child(4) { transition-delay: 180ms; } .menu-panel.is-open li:nth-child(5) { transition-delay: 240ms; }

/* ---------- home hero: the name across the width, a black-and-white frame in front of it ---------- */
.hero { padding-inline: var(--gutter); padding-block-start: clamp(4px, 1vw, 16px); }
.hero__name { position: relative; z-index: 0; }
.hero__frame { position: relative; z-index: 1; inline-size: min(36vw, 560px); aspect-ratio: 4 / 5; margin: -7.5vw auto 0; overflow: hidden; background: var(--paper-2); }
.hero__frame img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; object-position: 50% 12%; filter: grayscale(1) contrast(1.06); transition: filter var(--med) ease; }
:root[data-theme="dark"] .hero__frame img { filter: none; }
.hero__meta { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: baseline; gap: 12px 24px; max-inline-size: var(--container); margin: clamp(20px, 2.4vw, 36px) auto 0; padding-block-end: 16px; border-block-end: 1px solid var(--line); }
.hero__meta > :last-child { text-align: end; }
.hero__based { font-family: var(--font-heading); font-style: italic; font-size: clamp(22px, 2.2vw, 32px); line-height: 1.1; text-align: center; margin: 0; }
.hero__meta .label { margin: 0; }
@media (max-width: 760px) {
  .hero__frame { inline-size: 74vw; margin-block-start: -5vw; }
  .hero__meta { grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; }
  .hero__based { grid-column: 1 / -1; grid-row: 1; }
}

/* ---------- hero links: one centred row under the meta hairline ---------- */
.hero__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 32px; margin: 40px auto 96px; max-inline-size: var(--container); }
@media (max-width: 760px) { .hero__links { gap: 0 24px; margin: 28px auto 72px; } }

/* ---------- the book on home: a wrapping row, colour, every photo whole ----------
   Justified rows: each frame's width grows with its photo's ratio (--r, set from width/height in site.js),
   so a row shares one height and nothing is cropped or scrolls sideways. */
.book-prev { padding-block-end: var(--section); }
.book-grid { --row-h: 340px; display: flex; flex-wrap: wrap; gap: 32px clamp(12px, 1.6vw, 24px); counter-reset: shot; align-items: flex-start; }
.shot { --r: .75; margin: 0; display: grid; counter-increment: shot; flex: calc(var(--r) * 100) 1 calc(var(--r) * var(--row-h)); min-inline-size: 0; }
.shot a { display: block; overflow: hidden; }
.shot img { display: block; inline-size: 100%; block-size: auto; transition: transform 1.2s var(--ease-out); }
@media (max-width: 760px) { .book-grid { --row-h: 140px; gap: 24px 12px; } }
.shot a:hover img { transform: scale(1.02); }
.shot figcaption, .plate figcaption { inline-size: 0; min-inline-size: 100%; display: flex; justify-content: space-between; gap: 16px; margin-block-start: 12px; font-size: 15px; line-height: 1.4; }
.shot figcaption::after { content: counter(shot, decimal-leading-zero); color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- measurements ---------- */
.stats { background: var(--paper-2); padding-block: var(--section); }
.stats__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px clamp(24px, 4vw, 64px); align-items: start; }
.stats__side .btn-ink { margin-block-start: 32px; }
.stat-list { margin: 0; }
.stat-list:first-child { border-block-start: 1px solid var(--line); }
.stat { display: grid; grid-template-columns: minmax(7rem, 1fr) minmax(0, 2fr) minmax(0, 1fr); align-items: baseline; gap: 16px; padding-block: 14px; border-block-end: 1px solid var(--line); }
.stat dt { color: var(--muted); }
.stat dd { margin: 0; }
.stat__v { font-family: var(--font-heading); font-size: clamp(30px, 3vw, 44px); line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.stat__i { font-family: var(--font-heading); font-style: italic; font-size: 22px; line-height: 1.2; color: var(--muted); text-align: end; white-space: nowrap; }
@media (max-width: 760px) {
  .stats__grid { grid-template-columns: 1fr; }
  .stat { grid-template-columns: 6.5rem minmax(0, 1fr) auto; gap: 12px; }
  .stat__v { font-size: 30px; white-space: normal; }
  .stat__i { font-size: 20px; }
}

/* ---------- digitals ---------- */
.digitals { padding-block: var(--section); }
/* one row, one shared height: each card's width follows its photo's ratio (--r from site.js), so every frame,
   the full length too, is shown whole with nothing around it */
.dig-set { display: flex; gap: 28px clamp(12px, 1.6vw, 24px); align-items: flex-start; }
.dig { --r: .75; margin: 0; min-inline-size: 0; flex: calc(var(--r) * 100) 1 0; }
.dig__photo { overflow: hidden; }
.dig__photo img { display: block; inline-size: 100%; block-size: auto; transition: transform 1.2s var(--ease-out); }
.dig:hover .dig__photo img { transform: scale(1.02); }
.dig figcaption { margin-block-start: 10px; font-size: 14px; color: var(--muted); }
.dig-note { flex: 1; color: var(--muted); }
/* digitals 5–8: a second row with the same layout, behind the toggle */
.dig-more { margin-block-start: 28px; }
.dig-more[hidden], .dig-toggle-row[hidden] { display: none; }
.dig-more:not([hidden]) .dig { animation: dig-in .5s var(--ease-out) both; }
@keyframes dig-in { from { opacity: 0; transform: translateY(12px); } }
.dig-toggle-row { display: flex; justify-content: center; margin: 32px 0 0; }
.dig-toggle { padding: 0; border: 0; background: none; color: var(--text); cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .dig-more:not([hidden]) .dig { animation: none; } }
@media (max-width: 760px) {
  .dig-set { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .dig__photo img { max-block-size: 72vw; inline-size: auto; max-inline-size: 100%; }
}

/* ---------- contact ---------- */
.contact { padding-block: var(--section); }
.contact > .container { border-block-start: 1px solid var(--line); padding-block-start: var(--section); }
.contact__head { text-align: center; }
.contact__head > .label { color: var(--muted); margin: 0 0 clamp(12px, 2vw, 28px); }
.contact__head .giant { margin-inline: calc(var(--gutter) * -1); }
.contact__email { margin: clamp(16px, 2.4vw, 36px) 0 0; font-family: var(--font-heading); font-style: italic; font-size: clamp(26px, 3.2vw, 48px); line-height: 1.2; overflow-wrap: anywhere; }
.contact__email a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; transition: text-decoration-color var(--fast) ease; }
.contact__email a:hover { text-decoration-color: transparent; }
.contact__agency { margin: 12px 0 0; color: var(--muted); }
.contact__agency:empty { display: none; }

.form { display: grid; gap: 28px; max-inline-size: 880px; margin: clamp(48px, 6vw, 88px) auto 0; }
.form .row { display: grid; gap: 28px; }
@media (min-width: 640px) { .form .row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; }
.field label { font-family: var(--font-body); font-weight: 600; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.field :is(input, textarea) { inline-size: 100%; min-block-size: 48px; padding: 10px 0; background: transparent; color: var(--text); border: 0; border-block-end: 1px solid var(--line-strong); border-radius: 0; font: 400 17px/1.5 var(--font-body); transition: border-color var(--fast) ease, box-shadow var(--fast) ease; }
.field :is(input, textarea)::placeholder { color: var(--muted); opacity: 1; }
.field :is(input, textarea):hover { border-block-end-color: var(--text); }
.field :is(input, textarea):focus-visible { outline: none; border-block-end-color: var(--text); box-shadow: 0 1px 0 var(--text); }
.field :is(input, textarea):user-invalid { border-block-end-color: #a3341f; box-shadow: 0 1px 0 #a3341f; }
.field textarea { resize: vertical; min-block-size: 8rem; }
.form .opt { text-transform: none; letter-spacing: 0; font-weight: 400; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.form button:disabled { opacity: .55; cursor: progress; }
[data-form-status] { margin: 0; font-size: 15px; color: var(--muted); min-block-size: 1.4em; }
[data-form-status][data-state="ok"] { color: var(--text); }
[data-form-status][data-state="error"] { color: #a3341f; }
:root[data-theme="dark"] [data-form-status][data-state="error"], :root[data-theme="dark"] .field :is(input, textarea):user-invalid { color: #f0a08c; border-block-end-color: #f0a08c; }

/* ---------- footer ---------- */
.site-foot { padding-inline: var(--gutter); }
.foot-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px 24px; max-inline-size: var(--container); margin-inline: auto; min-block-size: 88px; padding-block: 12px; border-block-start: 1px solid var(--line); color: var(--muted); }
.foot-row p { margin: 0; }
.foot-row > :last-child { justify-self: end; display: flex; align-items: center; gap: 12px; }
.foot-row a.label { color: var(--muted); }
.foot-row a.label:hover { color: var(--text); }
@media (max-width: 560px) {
  .foot-row { grid-template-columns: 1fr auto; padding-block: 16px; }
  .foot-row > :nth-child(2) { grid-column: 1; grid-row: 2; }
  .foot-row > :last-child { grid-column: 2; grid-row: 1 / span 2; }
}

/* ---------- book page ---------- */
.page-top { padding-block: clamp(24px, 4vw, 56px) clamp(32px, 4vw, 56px); }
.page-title { font-size: clamp(56px, 8vw, 128px); }
.page-top .sec-head { margin-block-end: 20px; }
.book-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px clamp(24px, 4vw, 64px); align-items: start; }
.book-intro p { margin: 0; font-family: var(--font-heading); font-size: clamp(24px, 2.2vw, 34px); line-height: 1.15; max-inline-size: 26ch; }
.stat-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; margin: 0; }
.stat-strip div { display: grid; gap: 2px; padding-block: 10px; border-block-end: 1px solid var(--line); }
.stat-strip dt { font-weight: 600; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.stat-strip dd { margin: 0; font-family: var(--font-heading); font-size: 22px; line-height: 1.2; white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
@media (max-width: 760px) { .book-intro { grid-template-columns: 1fr; } .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.book { padding-block: 0 var(--section); }
.book-seq { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(40px, 5vw, 72px) clamp(16px, 3vw, 48px); align-items: end; counter-reset: bk; }
.plate { margin: 0; counter-increment: bk; min-inline-size: 0; }
.plate button { display: block; inline-size: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; color: inherit; overflow: hidden; }
.plate .frame img { display: block; inline-size: 100%; block-size: auto; transition: transform 1.2s var(--ease-out); }
.plate button:hover img { transform: scale(1.02); }
.plate figcaption::after { content: counter(bk, decimal-leading-zero); color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 1000px) { .book-seq { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .book-seq { grid-template-columns: 1fr; } }

.book-end { background: var(--paper-2); padding-block: var(--section); }
.book-end__in { display: grid; grid-template-columns: minmax(0, 2fr) auto; gap: 32px; align-items: end; }
.book-end__in .label { color: var(--muted); margin: 0 0 16px; }
.book-end__actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 760px) { .book-end__in { grid-template-columns: 1fr; } }

/* lightbox: always a dark room */
.lightbox { inline-size: 100vw; block-size: 100dvh; max-inline-size: none; max-block-size: none; margin: 0; padding: 0; border: 0; background: rgb(22 21 18 / .98); color: #ebe5da; }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lightbox::backdrop { background: rgb(0 0 0 / .8); }
.lb-top, .lb-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem var(--gutter); }
.lb-fig { margin: 0; display: grid; place-items: center; min-block-size: 0; padding-inline: var(--gutter); }
.lb-fig img { max-inline-size: 100%; max-block-size: 100%; inline-size: auto; block-size: auto; object-fit: contain; }
.lb-cap { font-size: 15px; color: #ebe5da; }
.lb-num { font-weight: 600; font-size: 12px; letter-spacing: .16em; color: #a39d92; }
.lb-nav { display: flex; gap: .5rem; }
.lightbox .icon-btn { border: 1px solid rgb(235 229 218 / .25); }
.lightbox[open] .lb-fig img { animation: lb-in .6s var(--ease-out); }
@keyframes lb-in { from { opacity: 0; transform: scale(.985); } }

/* ---------- comp card page (the card itself is css/comp-card.css) ---------- */
main.card-page { padding-block-start: clamp(24px, 4vw, 56px); padding-inline: var(--gutter); }
.card-intro h1 { font-family: var(--font-heading); font-weight: 400; font-size: clamp(56px, 8vw, 128px); line-height: 1; letter-spacing: var(--tracking-tight); }
.card-intro .label { color: var(--muted); margin: 0; }
.card-intro p:not(.label) { font-size: 17px; }
.side .card-name h2, .side .card-stats dd, .side .card-foot strong { font-weight: 400; }
.side .card-name h2 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .01em; font-size: 13cqi; line-height: .9; }

/* ---------- 404 ---------- */
.lost { padding-block: clamp(24px, 6vw, 96px) var(--section); padding-inline: var(--gutter); text-align: center; }
.lost .giant { font-size: clamp(160px, 40vw, 520px); }
.lost__line { font-family: var(--font-heading); font-size: clamp(28px, 3.4vw, 52px); line-height: 1.1; margin: clamp(16px, 2vw, 32px) auto 0; max-inline-size: 22ch; }
.lost__line em { font-style: italic; }
.lost__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 32px; margin-block-start: 24px; }

/* ---------- motion ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .5s; animation-timing-function: var(--ease-out); }
@media (prefers-reduced-motion: reduce) {
  .menu-panel li { opacity: 1; transform: none; }
  .shot a:hover img, .plate button:hover img, .dig:hover .dig__photo img { transform: none; }
  @view-transition { navigation: none; }
}

/* ---------- wide monitors ---------- */
/* above ~1920 px nothing keeps growing with the window: the column, the giant name and the cover frame hold their
   1920 px size and stay centred, so a 2560 px or ultra-wide screen gets the same composition with calm margins */
@media (min-width: 1920px) {
  :root { --container: 1760px; --gutter: 40px; --giant: 460px; --step-1: 78px; --section: 128px; }
  .hero__frame { inline-size: 560px; margin-block-start: -144px; }
  .hero__name { max-inline-size: var(--container); margin-inline: auto; }
  .contact__head .giant { margin-inline: 0; }
}

/* ---------- scrollbars: thin and invisible; the thumb shows only while the pointer is over the page ---------- */
* { scrollbar-width: thin; scrollbar-color: transparent transparent; }
html:hover, html:hover * { scrollbar-color: var(--thumb) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: transparent; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
html:hover::-webkit-scrollbar-thumb, html:hover *::-webkit-scrollbar-thumb { background-color: var(--thumb); }
