/* ===========================================================================
   chunlang.xyz — site stylesheet
   ---------------------------------------------------------------------------
   No framework, no build step, no external requests. Sections:
     1.  Tokens & colour schemes
     2.  Reset & base
     3.  Layout
     4.  Buttons, chips, forms
     5.  Header & navigation
     6.  Home: hero, strip, mosaic, collections, stories
     7.  Gallery & pager
     8.  Photo detail
     9.  Stories
     10. About, Contact, Search, 404
     11. Lightbox
     12. Footer
     13. Utilities, motion, print
   =========================================================================== */

/* ---------------------------------------------------------------------------
   1. Tokens & colour schemes
   --------------------------------------------------------------------------- */
:root {
  --ink:          #17140f;
  --ink-soft:     #4a443b;
  --ink-faint:    #857d70;
  --paper:        #fbf9f5;
  --paper-2:      #f4f0e8;
  --paper-3:      #ebe5d9;
  --line:         #ded6c7;
  --line-strong:  #c8bfae;
  --accent:       #b4541f;
  --accent-ink:   #ffffff;
  --accent-soft:  #f6e7dc;
  --gold:         #a8802c;
  --shadow-sm:    0 1px 2px rgba(23, 20, 15, .06), 0 2px 8px rgba(23, 20, 15, .05);
  --shadow-md:    0 6px 18px rgba(23, 20, 15, .09), 0 2px 6px rgba(23, 20, 15, .06);
  --shadow-lg:    0 22px 60px rgba(23, 20, 15, .22);
  --radius:       14px;
  --radius-sm:    9px;
  --radius-lg:    22px;
  --wrap:         1240px;
  --wrap-narrow:  760px;
  --space:        clamp(1.25rem, 4vw, 2.75rem);
  --section-y:    clamp(3rem, 7vw, 6rem);
  --header-h:     68px;

  --font-body: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-ui:   ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

html[data-theme="dark"] {
  --ink:          #f2ede4;
  --ink-soft:     #c2bbae;
  --ink-faint:    #8d8578;
  --paper:        #12100e;
  --paper-2:      #1a1714;
  --paper-3:      #242019;
  --line:         #322c25;
  --line-strong:  #464035;
  --accent:       #e07a3e;
  --accent-ink:   #1a1208;
  --accent-soft:  #2b1f14;
  --gold:         #d6a94e;
  --shadow-sm:    0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md:    0 6px 20px rgba(0, 0, 0, .5);
  --shadow-lg:    0 24px 70px rgba(0, 0, 0, .7);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --ink:          #f2ede4;
    --ink-soft:     #c2bbae;
    --ink-faint:    #8d8578;
    --paper:        #12100e;
    --paper-2:      #1a1714;
    --paper-3:      #242019;
    --line:         #322c25;
    --line-strong:  #464035;
    --accent:       #e07a3e;
    --accent-ink:   #1a1208;
    --accent-soft:  #2b1f14;
    --gold:         #d6a94e;
    --shadow-sm:    0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md:    0 6px 20px rgba(0, 0, 0, .5);
    --shadow-lg:    0 24px 70px rgba(0, 0, 0, .7);
  }
}

/* ---------------------------------------------------------------------------
   2. Reset & base
   --------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, .34vw + .95rem, 1.125rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
img { background: var(--paper-3); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.015em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 5.4vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 2.9vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 1.7vw, 1.4rem); }
p  { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration-thickness: .06em; text-underline-offset: .18em; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

blockquote {
  margin: 2rem 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--accent);
  font-size: 1.15em;
  font-style: italic;
  color: var(--ink-soft);
}

code, kbd, samp { font-family: var(--font-mono); font-size: .88em; }

.h-small {
  font-family: var(--font-ui);
  font-size: .74rem;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 .9rem;
}

.eyebrow {
  font-family: var(--font-ui);
  font-size: .73rem;
  font-weight: 650;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .7rem;
}

.meta, .page-count, .byline {
  font-family: var(--font-ui);
  font-size: .82rem;
  color: var(--ink-faint);
  letter-spacing: .01em;
}
.meta .sep, .photo-meta .sep { margin: 0 .45em; color: var(--line-strong); }
.muted { color: var(--ink-faint); }
.small { font-size: .9rem; }

/* ---------------------------------------------------------------------------
   3. Layout
   --------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--space);
}

.section { padding-block: var(--section-y); }
.section-alt { background: var(--paper-2); }
.section-strip { padding-block: 0; margin-top: -1px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--accent);
  color: var(--accent-ink);
  padding: .7rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-family: var(--font-ui);
}
.skip-link:focus { left: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.section-head h2 { margin: 0; }
.section-cta { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: clamp(1.75rem, 3vw, 2.75rem); }

.page-head {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { margin-bottom: .35em; }
.page-lede {
  max-width: 62ch;
  font-size: clamp(1.05rem, 1.4vw, 1.28rem);
  color: var(--ink-soft);
}
.page-count { margin-bottom: 0; }

.link-more {
  font-family: var(--font-ui);
  font-size: .86rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: .1em;
}
.link-more:hover { color: var(--ink); }

.empty {
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  background: var(--paper-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-soft);
}

.crumbs {
  font-family: var(--font-ui);
  font-size: .82rem;
  color: var(--ink-faint);
  margin-bottom: 1.25rem;
}
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { margin: 0 .4em; }

.prose { max-width: 68ch; }
.prose > p { font-size: 1.06em; }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }
.prose a { text-decoration: underline; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }

/* ---------------------------------------------------------------------------
   4. Buttons, chips, forms
   --------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .72em 1.4em;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: .88rem;
  font-weight: 620;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--ink); color: var(--paper); }

.btn-outline { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-outline:hover { border-color: var(--ink); background: var(--paper-2); color: var(--ink); }

.btn-ghost { background: transparent; color: var(--accent); border-color: transparent; }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent); }

/* Ghost buttons sitting on a dark image need their own colours. */
.hero .btn-ghost, .btn-dark-text {
  color: var(--ink);
  border-color: var(--line-strong);
  background: transparent;
}
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.55); backdrop-filter: blur(2px); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.16); color: #fff; border-color: #fff; }
.btn-dark-text:hover { background: var(--paper-2); }

.btn-sm { padding: .45em 1em; font-size: .8rem; }
.btn-danger { background: #a3241c; color: #fff; }
.btn-danger:hover { background: #7d1a14; color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: 0; padding: 0; }
.chip {
  display: inline-block;
  padding: .4em 1em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--font-ui);
  font-size: .82rem;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: all .16s var(--ease);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 600; }

.filters { padding-block: 1.6rem; border-bottom: 1px solid var(--line); margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.filter-row + .filter-row { margin-top: 1rem; }
.filter-label {
  font-family: var(--font-ui);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  min-width: 5.5rem;
}
.filter-label-end { margin-left: auto; min-width: 0; }

.form { max-width: 660px; }
.field { display: block; margin-bottom: 1.25rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label {
  display: block;
  font-family: var(--font-ui);
  font-size: .8rem;
  font-weight: 620;
  letter-spacing: .02em;
  margin-bottom: .4rem;
  color: var(--ink-soft);
}
.field .req { color: var(--accent); }
.field input[type="text"], .field input[type="email"], .field input[type="password"],
.field input[type="search"], .field input[type="number"], .field input[type="url"],
.field input[type="file"], .field textarea, .field select,
.search-form input {
  width: 100%;
  padding: .7em .9em;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: .95rem;
  line-height: 1.5;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.field textarea { resize: vertical; min-height: 8rem; font-family: var(--font-body); font-size: 1rem; }
.field input:focus, .field textarea:focus, .field select:focus, .search-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.field .hint { display: block; margin-top: .35rem; font-family: var(--font-ui); font-size: .78rem; color: var(--ink-faint); }
.field-hp { position: absolute; left: -9999px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.6rem; }

.search-form { display: flex; gap: .6rem; max-width: 520px; margin-top: 1.5rem; }
.search-form input { flex: 1; }

.notice {
  padding: 1.4rem 1.6rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  background: var(--paper-2);
  margin-bottom: 2rem;
}
.notice h2 { font-size: 1.25rem; margin-bottom: .4em; }
.notice-ok  { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.notice-bad { background: color-mix(in srgb, #a3241c 8%, var(--paper)); border-color: #a3241c; }
.notice ul { margin: .5em 0 0; padding-left: 1.2em; }

.flash-stack { padding-top: 1rem; }
.flash {
  padding: .8rem 1.1rem;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--accent);
  background: var(--paper-2);
  font-family: var(--font-ui);
  font-size: .9rem;
}
.flash-bad { border-left-color: #a3241c; }

.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 1rem 0 0; padding: 0; }
.tag-list a {
  font-family: var(--font-ui);
  font-size: .78rem;
  color: var(--ink-faint);
  text-decoration: none;
  padding: .22em .7em;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.tag-list a:hover { color: var(--accent); border-color: var(--accent); }
.tag-list-lg a { font-size: .86rem; padding: .32em .9em; }

.kv { margin: 0; font-family: var(--font-ui); font-size: .85rem; }
.kv > div { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px dashed var(--line); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--ink-faint); }
.kv dd { margin: 0; text-align: right; color: var(--ink); }

.side-list { list-style: none; margin: 0; padding: 0; font-family: var(--font-ui); font-size: .88rem; }
.side-list li { padding: .6rem 0; border-bottom: 1px dashed var(--line); }
.side-list li:last-child { border-bottom: 0; }
.side-list a { display: block; font-weight: 600; text-decoration: none; }
.side-list span { display: block; color: var(--ink-faint); font-size: .82rem; margin-top: .15rem; }
.side-list .plain { font-weight: 600; }
.side-list-wide { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .5rem 2rem; }

.side-block { margin-bottom: 2.25rem; }

/* ---------------------------------------------------------------------------
   5. Header & navigation
   --------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.site-header.is-stuck { box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -.01em;
}
.brand-mark { color: var(--accent); display: block; line-height: 0; }
.brand-text { font-size: 1.32rem; line-height: 1; }
.brand-dot { color: var(--accent); font-size: .72em; letter-spacing: .01em; }
.brand:hover { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 1.35rem; }
.nav > ul { display: flex; align-items: center; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav > ul a {
  font-family: var(--font-ui);
  font-size: .92rem;
  font-weight: 550;
  color: var(--ink-soft);
  text-decoration: none;
  padding: .35rem 0;
  border-bottom: 2px solid transparent;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}
.nav > ul a:hover { color: var(--ink); }
.nav > ul a.is-active { color: var(--ink); border-bottom-color: var(--accent); }

/* Touch screens fire :hover on tap. Without this guard, tapping a link in the
   collapsed menu could leave hover styling stuck on. */
@media (hover: hover) {
  .nav > ul a:hover { color: var(--ink); }
}

.nav-search { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; padding: .18rem .3rem .18rem .85rem; background: var(--paper); }
.nav-search input {
  border: 0; background: transparent; color: var(--ink);
  font-family: var(--font-ui); font-size: .85rem; width: 8.5rem; padding: .35rem 0;
}
.nav-search input:focus { outline: none; }
.nav-search button {
  border: 0; background: transparent; color: var(--ink-faint);
  cursor: pointer; padding: .3rem .45rem; line-height: 0; border-radius: 999px;
}
.nav-search button:hover { color: var(--accent); background: var(--paper-2); }

/* Desktop: the theme button and the admin link sit inline with everything else.
   On phones they move into .nav-foot inside the dropdown — see the 900px query. */
.nav-foot { display: flex; align-items: center; gap: .5rem; }
.theme-toggle-label { display: none; }

.nav-admin {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .38em .9em; border: 1.5px solid var(--line); border-radius: 999px;
  font-family: var(--font-ui); font-size: .82rem; font-weight: 600;
  color: var(--ink-soft); text-decoration: none;
  transition: all .16s var(--ease);
}
.nav-admin:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--paper); color: var(--ink-soft); cursor: pointer; padding: 0;
  transition: all .16s var(--ease);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle .i-moon { display: none; }
html[data-theme="dark"] .theme-toggle .i-sun { display: none; }
html[data-theme="dark"] .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .theme-toggle .i-sun { display: none; }
  html[data-theme="auto"] .theme-toggle .i-moon { display: block; }
}

.nav-toggle {
  display: none;
  width: 40px; height: 40px; padding: 0;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.nav-toggle span { display: block; width: 17px; height: 1.8px; background: var(--ink); border-radius: 2px; transition: transform .2s var(--ease), opacity .2s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1.4rem var(--space) 2rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    transition: transform .26s var(--ease);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }
  .nav.is-open { transform: translateY(0); }
  .nav .nav-main { flex-direction: column; align-items: stretch; gap: 0; }
  .nav .nav-main li { border-bottom: 1px solid var(--line); }
  .nav .nav-main a { display: block; padding: .95rem 0; font-size: 1.05rem; border-bottom: 0; }
  /* The search box is desktop-only; phones get the search page via the nav. */
  .nav-search { display: none; }
  .nav-foot { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
  .theme-toggle { align-self: auto; width: auto; padding: 0 1rem; height: 42px; gap: .5rem; }
  .theme-toggle-label { font-family: var(--font-ui); font-size: .86rem; }
  .nav-admin { align-self: auto; height: 42px; width: auto; padding: 0 1.1rem; }
}

/* ---------------------------------------------------------------------------
   6. Home
   --------------------------------------------------------------------------- */
.hero {
  position: relative;
  display: grid;
  min-height: min(86vh, 780px);
  align-items: flex-end;
  overflow: hidden;
  background: var(--ink);
  isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(12,10,8,.88) 0%, rgba(12,10,8,.55) 38%, rgba(12,10,8,.12) 72%, rgba(12,10,8,.35) 100%);
}
.hero-body { padding-block: clamp(2.5rem, 7vw, 5.5rem); color: #fff; }
.hero-body h1 {
  font-size: clamp(2.8rem, 9vw, 6rem);
  letter-spacing: -.03em;
  margin: 0 0 .1em;
  line-height: .95;
}
.hero-body h1 .dot { color: #f0a978; font-size: .46em; letter-spacing: 0; }
.hero .eyebrow { color: #f0a978; }
.hero-tagline {
  font-size: clamp(1.1rem, 2.1vw, 1.55rem);
  max-width: 34ch;
  color: rgba(255,255,255,.9);
  margin-bottom: 1.6rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.5rem; }
.hero-actions .btn-outline { border-color: rgba(255,255,255,.5); color: #fff; }
.hero-actions .btn-outline:hover { background: rgba(255,255,255,.15); border-color: #fff; color: #fff; }
.hero-credit {
  font-family: var(--font-ui); font-size: .82rem; color: rgba(255,255,255,.72);
  margin: 0; border-top: 1px solid rgba(255,255,255,.2); padding-top: 1rem; max-width: 46ch;
}
.hero-credit a { color: #fff; }
.hero-empty { background: linear-gradient(150deg, var(--ink) 0%, #3a2b1e 100%); }

.strip {
  display: flex;
  gap: .75rem;
  list-style: none;
  margin: 0;
  padding: 1.25rem 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.strip > li { flex: 0 0 auto; width: clamp(180px, 26vw, 300px); scroll-snap-align: start; }
.strip-item { display: block; position: relative; border-radius: var(--radius); overflow: hidden; text-decoration: none; background: var(--paper-3); }
.strip-item img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform .5s var(--ease); }
.strip-item:hover img { transform: scale(1.05); }
.strip-cap {
  position: absolute; inset: auto 0 0 0;
  padding: 1.6rem .8rem .6rem;
  font-family: var(--font-ui); font-size: .78rem; font-weight: 600; color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.75), transparent);
}

.mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: clamp(.75rem, 1.4vw, 1.1rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.mosaic-item { position: relative; }
.mosaic-item a { display: block; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--paper-3); height: 100%; }
.mosaic-item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; transition: transform .55s var(--ease); }
.mosaic-item.portrait img { aspect-ratio: 3 / 4; }
.mosaic-item.square img { aspect-ratio: 1 / 1; }
.mosaic-item a:hover img { transform: scale(1.045); }

.mosaic-cap {
  position: absolute; inset: auto 0 0 0;
  display: flex; flex-direction: column; gap: .1rem;
  padding: 2.4rem .85rem .7rem;
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.8) 0%, rgba(0,0,0,.32) 55%, transparent 100%);
  opacity: 0; transform: translateY(6px);
  transition: opacity .28s var(--ease), transform .28s var(--ease);
}
.mosaic-item a:hover .mosaic-cap, .mosaic-item a:focus-visible .mosaic-cap { opacity: 1; transform: translateY(0); }
.mosaic-cap strong { font-family: var(--font-ui); font-size: .86rem; font-weight: 620; line-height: 1.3; }
.mosaic-cap em { font-family: var(--font-ui); font-size: .74rem; font-style: normal; color: rgba(255,255,255,.75); }
@media (hover: none) {
  .mosaic-cap { opacity: 1; transform: none; }
}

/* Make the first tile of the gallery grid span two columns on wide screens. */
@media (min-width: 1000px) {
  .mosaic-gallery .mosaic-item.landscape:first-child { grid-column: span 2; }
  .mosaic-gallery .mosaic-item.landscape:first-child img { aspect-ratio: 16 / 9; }
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
  list-style: none; margin: 0; padding: 0;
}
.collection-card a { display: block; position: relative; border-radius: var(--radius); overflow: hidden; text-decoration: none; background: var(--ink); }
.collection-card img { aspect-ratio: 5 / 6; object-fit: cover; width: 100%; opacity: .82; transition: transform .5s var(--ease), opacity .3s var(--ease); }
.collection-card a:hover img { transform: scale(1.05); opacity: 1; }
.collection-body {
  position: absolute; inset: auto 0 0 0; padding: 3rem 1rem 1rem;
  display: flex; flex-direction: column; gap: .1rem; color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.85), transparent);
}
.collection-body strong { font-size: 1.12rem; }
.collection-body em { font-family: var(--font-ui); font-size: .76rem; font-style: normal; color: rgba(255,255,255,.75); }
.ph-fill {
  display: grid; place-items: center; width: 100%; aspect-ratio: 5 / 6;
  background: var(--paper-3); color: var(--ink-faint);
  font-size: 2.5rem; font-weight: 600;
}

.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: clamp(1.25rem, 2.5vw, 2.25rem); }
.story-grid-wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.story-card { display: flex; flex-direction: column; }
.story-card-media { display: block; border-radius: var(--radius); overflow: hidden; background: var(--paper-3); margin-bottom: 1rem; }
.story-card-media img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; transition: transform .5s var(--ease); }
.story-card:hover .story-card-media img { transform: scale(1.04); }
.story-card-body .meta { margin-bottom: .5rem; }
.story-card-body h3 { margin-bottom: .4rem; }
.story-card-body h3 a { color: var(--ink); text-decoration: none; }
.story-card-body h3 a:hover { color: var(--accent); }
.story-card-body p { color: var(--ink-soft); font-size: .96rem; }

.about-strip { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.about-strip-text h2 { margin-bottom: .5rem; }
.about-strip-text p { color: var(--ink-soft); }

.stat-list { display: flex; flex-wrap: wrap; gap: 2.5rem; margin: 0; }
.stat-list > div { display: flex; flex-direction: column-reverse; }
.stat-list dt { font-family: var(--font-ui); font-size: .72rem; font-weight: 650; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-faint); }
.stat-list dd { margin: 0; font-size: clamp(2.1rem, 4.5vw, 3.1rem); line-height: 1; letter-spacing: -.02em; }
.stat-list-wide { margin-block: 2.5rem; padding-block: 1.5rem; border-block: 1px solid var(--line); }

@media (max-width: 820px) {
  .about-strip { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------------
   7. Gallery & pager
   --------------------------------------------------------------------------- */
.pager {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: clamp(2rem, 4vw, 3rem); padding-top: 1.5rem; border-top: 1px solid var(--line);
}
.pager-btn {
  font-family: var(--font-ui); font-size: .88rem; font-weight: 600;
  padding: .6em 1.2em; border: 1.5px solid var(--line-strong); border-radius: 999px;
  text-decoration: none; color: var(--ink);
}
.pager-btn:hover { border-color: var(--ink); background: var(--paper-2); }
.pager-btn.is-off { opacity: .35; pointer-events: none; }
.pager-status { font-family: var(--font-ui); font-size: .82rem; color: var(--ink-faint); }

/* ---------------------------------------------------------------------------
   8. Photo detail
   --------------------------------------------------------------------------- */
.photo-wrap { padding-top: clamp(1.25rem, 3vw, 2rem); }
.photo-figure {
  margin: 0 0 clamp(1.75rem, 4vw, 3rem);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper-3);
  box-shadow: var(--shadow-md);
}
.photo-figure img { width: 100%; max-height: 82vh; object-fit: contain; }
.photo-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 290px); gap: clamp(1.75rem, 4vw, 3.5rem); }
.photo-main h1 { margin-bottom: .3em; }
.photo-meta { font-family: var(--font-ui); font-size: .84rem; color: var(--ink-faint); margin-bottom: 1.4rem; }
.photo-caption { font-size: 1.12em; color: var(--ink-soft); }
.photo-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.related { margin-top: clamp(3rem, 6vw, 5rem); padding-top: 2rem; border-top: 1px solid var(--line); }
@media (max-width: 880px) { .photo-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------------
   9. Stories
   --------------------------------------------------------------------------- */
.story-lead {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3.5vw, 3rem); align-items: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.story-lead-media { display: block; border-radius: var(--radius-lg); overflow: hidden; background: var(--paper-3); box-shadow: var(--shadow-md); }
.story-lead-media img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.story-lead-body h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin-bottom: .5rem; }
.story-lead-body h2 a { color: var(--ink); text-decoration: none; }
.story-lead-body h2 a:hover { color: var(--accent); }
.story-lead-excerpt { font-size: 1.08em; color: var(--ink-soft); margin-bottom: 1.5rem; }
@media (max-width: 820px) { .story-lead { grid-template-columns: 1fr; } }

.story-wrap { max-width: var(--wrap-narrow); }
.story-head { padding-block: clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem); }
.story-head h1 { font-size: clamp(2rem, 5vw, 3.3rem); }
.story-standfirst { font-size: clamp(1.12rem, 1.9vw, 1.42rem); color: var(--ink-soft); font-style: italic; line-height: 1.55; }
.story-cover { margin: 0 auto clamp(2rem, 4vw, 3rem); max-width: 1100px; padding-inline: var(--space); }
.story-cover img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.story-cover figcaption { max-width: var(--wrap-narrow); margin: 1rem auto 0; font-family: var(--font-ui); font-size: .82rem; color: var(--ink-faint); }
.story-body { margin-inline: auto; }
.story-body > p:first-of-type::first-letter {
  float: left;
  font-size: 3.4em;
  line-height: .82;
  padding: .06em .12em 0 0;
  color: var(--accent);
  font-weight: 600;
}

/* ---------------------------------------------------------------------------
   10. About, Contact, Search, 404
   --------------------------------------------------------------------------- */
.about-layout { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(1.75rem, 4vw, 3.5rem); padding-block: clamp(2rem, 5vw, 3.5rem); }
.about-portrait { margin: 0; position: sticky; top: calc(var(--header-h) + 1.5rem); }
.about-portrait img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.about-portrait figcaption { margin-top: .75rem; font-family: var(--font-ui); font-size: .78rem; color: var(--ink-faint); }
.about-block { margin-top: 2.75rem; }
.about-collections { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem; }
.about-collections a {
  display: block; padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); transition: all .18s var(--ease);
}
.about-collections a:hover { border-color: var(--accent); background: var(--paper-2); transform: translateY(-2px); }
.about-collections strong { display: block; }
.about-collections span { display: block; font-family: var(--font-ui); font-size: .82rem; color: var(--ink-faint); margin-top: .2rem; }

.kit-list { list-style: none; margin: 0; padding: 0; }
.kit-list li { display: flex; gap: 1rem; padding: .8rem 0; border-bottom: 1px dashed var(--line); }
.kit-list span { flex: 0 0 6.5rem; font-family: var(--font-ui); font-size: .74rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); padding-top: .2rem; }
.kit-list li { color: var(--ink-soft); }

.elsewhere { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; margin: 0; padding: 0; }
.elsewhere a {
  font-family: var(--font-ui); font-size: .85rem; padding: .5em 1.1em;
  border: 1.5px solid var(--line-strong); border-radius: 999px; text-decoration: none; color: var(--ink);
}
.elsewhere a:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 860px) { .about-layout { grid-template-columns: 1fr; } .about-portrait { position: static; max-width: 340px; } }

.contact-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 320px); gap: clamp(2rem, 5vw, 4rem); padding-block: clamp(2rem, 5vw, 3.5rem); }
@media (max-width: 860px) { .contact-layout { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.search-block { margin-top: clamp(2rem, 4vw, 3rem); }

/* ---------------------------------------------------------------------------
   11. Lightbox
   --------------------------------------------------------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8, 7, 6, .95);
  backdrop-filter: blur(4px);
  animation: lb-in .22s var(--ease);
}
.lightbox[hidden] { display: none; }
@keyframes lb-in { from { opacity: 0 } to { opacity: 1 } }

.lb-figure { margin: 0; max-width: min(96vw, 1500px); max-height: 92dvh; display: flex; flex-direction: column; }
.lb-img { max-width: 100%; max-height: 78dvh; object-fit: contain; margin-inline: auto; border-radius: 6px; background: transparent; }
.lb-caption { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1rem; padding: 1rem .25rem 0; color: rgba(255,255,255,.82); font-family: var(--font-ui); font-size: .86rem; }
.lb-count { color: rgba(255,255,255,.5); font-variant-numeric: tabular-nums; }
.lb-title { color: #fff; font-weight: 620; }
.lb-text { flex: 1 1 100%; color: rgba(255,255,255,.7); font-size: .84rem; }
.lb-link { color: #f0a978; text-decoration: none; white-space: nowrap; }
.lb-link:hover { color: #fff; text-decoration: underline; }

.lb-close, .lb-nav {
  position: absolute; z-index: 2;
  display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px; cursor: pointer;
  transition: background-color .16s var(--ease), transform .16s var(--ease);
}
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.24); }
.lb-close { top: 1rem; right: 1rem; width: 44px; height: 44px; font-size: 1.7rem; line-height: 1; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 2rem; line-height: 1; }
.lb-nav:hover { transform: translateY(-50%) scale(1.06); }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
@media (max-width: 620px) {
  .lb-nav { width: 42px; height: 42px; font-size: 1.6rem; }
  .lb-prev { left: .4rem; } .lb-next { right: .4rem; }
  .lb-close { top: .5rem; right: .5rem; width: 38px; height: 38px; }
}
body.lb-open { overflow: hidden; }

/* ---------------------------------------------------------------------------
   12. Footer
   --------------------------------------------------------------------------- */
.site-footer {
  margin-top: clamp(3rem, 7vw, 6rem);
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  padding-block: clamp(2.5rem, 5vw, 4rem) 1.5rem;
  font-size: .94rem;
}
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 3rem); }
.footer-about p { color: var(--ink-soft); max-width: 42ch; }
.brand-footer { margin-bottom: .75rem; }
.footer-meta { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; font-family: var(--font-ui); font-size: .78rem; color: var(--ink-faint); }
.footer-col h2 {
  font-family: var(--font-ui); font-size: .72rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: var(--ink-faint);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: .55rem; }
.footer-col a { color: var(--ink-soft); text-decoration: none; font-family: var(--font-ui); font-size: .88rem; }
.footer-col a:hover { color: var(--accent); }
.footer-col .count { color: var(--ink-faint); font-size: .78rem; }
.footer-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem;
  margin-top: clamp(2rem, 4vw, 3rem); padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-ui); font-size: .78rem; color: var(--ink-faint);
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------------
   13. Utilities, motion, print
   --------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

::selection { background: var(--accent); color: var(--accent-ink); }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; border: 3px solid var(--paper-2); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .lightbox, .filters, .pager, .photo-actions, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .photo-figure { box-shadow: none; border-radius: 0; }
  a { color: #000; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
