/* Editorial refinement: photographic cover, paper pages, three clear type roles. */
@font-face {
  font-family: 'Book Serif';
  src: url('/assets/fonts/noto-serif-sc-regular.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #faf9f6;
  --ink: #242522;
  --muted: #696a63;
  --line: #dcdcd3;
  --night: #08080a;
  --night-ink: #f5f3ed;
  --font-display: WenKai, 'Kaiti SC', serif;
  --font-reading: 'Book Serif', 'Songti SC', 'STSong', 'SimSun', serif;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-english: Georgia, 'Times New Roman', serif;
  --gutter: 24px;
}

body { font-family: var(--font-ui); font-weight: 400; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 300; }
.page-main { padding-top: 44px; padding-bottom: 64px; }
.site-header { padding-inline: 18px; }
.header-label { color: var(--muted); font-size: 12px; letter-spacing: .06em; }
.home-link { font-weight: 300; font-size: 24px; letter-spacing: .06em; }
.desktop-nav { gap: 26px; }
.desktop-nav a { font: 400 13px/1.5 var(--font-ui); letter-spacing: .1em; }
.site-menu { margin-left: 12px; }
.menu-title { font-weight: 300; font-size: 32px; }
.menu-panel { padding: 24px 28px 28px; }
.menu-panel>a { min-height: 66px; }
.menu-panel>a>span:first-child { font-weight: 300; font-size: 28px; }
.menu-panel>a>span[lang] { font-size: 11px; letter-spacing: .1em; }
.menu-more a { font: 400 14px/1.6 var(--font-ui); }
.menu-credit { margin-top: 24px; }
.site-footer { font-size: 12px; padding-block: 24px; }
.site-footer p { padding-top: 0; }
.dark-header { border-color: #242427; }
.dark-header .header-label { color: #bdbcc4; }

/* A cover spread: the existing uncut photograph remains the first thing seen. */
.home-page .page-main { max-width: 1440px; }
.cover { min-height: 560px; max-height: 1050px; }
.cover-type { left: var(--gutter); top: 16%; }
.cover-type h1 { font-size: clamp(78px, 20vw, 112px); letter-spacing: .09em; max-height: none; }
.cover-type>p[lang] { font: 400 12px/1.7 var(--font-english); letter-spacing: .11em; margin-top: 26px; }
.cover-author { margin-top: 24px; font: 300 17px/1.6 var(--font-display); color: #c4c0cb; }
.cover-window { right: 0; top: 7%; width: 66%; max-width: none; height: 67%; max-height: none; justify-content: center; }
.cover-window img { max-width: 100%; max-height: 100%; }
.cover-bottom { inset-inline: var(--gutter); bottom: max(24px, env(safe-area-inset-bottom)); gap: 14px; }
.cover-bottom>p { font: 400 12px/1.7 var(--font-english); letter-spacing: .045em; color: #bdb9c4; }
.begin { min-height: 58px; font: 400 15px/1.5 var(--font-ui); letter-spacing: .1em; border-top: 0; border-bottom-color: #6b6672; }
.begin svg { width: 26px; height: 26px; flex-basis: 26px; }
.resume-reading, .resume-reading button { font-size: 12px; }

/* Directory: a quiet contents column and five photographic chapter entries. */
.catalog { max-width: none; }
.catalog .page-heading { display: block; margin-bottom: 32px; }
.eyebrow,
.page-heading>p.eyebrow,
.creation-page .page-heading>p.eyebrow {
  font: 400 11px/1.6 var(--font-ui);
  letter-spacing: .18em;
  color: var(--muted);
  margin: 0 0 16px;
}
.catalog h1 { font-size: clamp(64px, 13vw, 94px); line-height: 1.15; letter-spacing: .04em; }
.catalog .catalog-count { font: 400 12px/1.7 var(--font-ui); margin-top: 20px; letter-spacing: .06em; }
.frontmatter-list { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; border-top: 0; margin-bottom: 32px; }
.frontmatter-list>a { border-top: 1px solid var(--line); min-height: 60px; font: 400 15px/1.6 var(--font-ui); }
.frontmatter-list svg { width: 18px; flex-basis: 18px; }
.catalog .chapter-list { border-top: 1px solid var(--line); }
.chapter-entry { grid-template-columns: minmax(0,1fr) 35% 18px; gap: 14px; padding-block: 24px; min-height: 180px; }
.chapter-entry-title { grid-template-columns: 22px minmax(0,1fr); column-gap: 10px; }
.chapter-number { font-size: 11px; }
.chapter-name { font: 300 44px/1.3 var(--font-display); letter-spacing: .04em; }
.chapter-entry-title>[lang] { font: 400 11px/1.8 var(--font-english); letter-spacing: .08em; margin-top: 4px; }
.chapter-total { font: 400 12px/1.6 var(--font-ui); margin-top: 12px; }
.chapter-entry-image { height: 124px; }
.chapter-entry>svg { width: 18px; flex-basis: 18px; }
.catalog-tail { margin-top: 32px; }
.catalog-tail a { font: 400 13px/1.6 var(--font-ui); }

/* Chapter spreads and contact sheets keep their original image proportions. */
.chapter-page { max-width: 1080px; }
.chapter-heading { padding-bottom: 28px; margin-bottom: 16px; border-bottom: 1px solid var(--line); align-items: center; }
.chapter-heading h1 { font-size: 68px; letter-spacing: .04em; }
.chapter-heading>div>p { font: 400 11px/1.7 var(--font-english); letter-spacing: .13em; }
.chapter-intro { font: 300 16px/1.9 var(--font-display); max-width: 10em; margin: 0; }
.gallery-status { margin-bottom: 24px; }
.chapter-grid { gap: 36px 20px; }
.gallery-photo>img { height: 190px; }
.gallery-photo-meta { font-size: 12px; margin-top: 16px; }
.gallery-photo-meta svg { width: 14px; height: 14px; flex-basis: 14px; }
.pagination { margin-top: 44px; }
.pagination a[aria-current] { background: transparent; color: var(--ink); box-shadow: inset 0 -2px var(--ink); }
.pagination a { font-size: 13px; }
.chapter-continue { font: 400 16px/1.7 var(--font-ui); min-height: 68px; letter-spacing: .03em; }
.index-directory { max-width: 900px; margin-inline: auto; }
.index-chapter-list>a { min-height: 108px; }
.index-chapter-list>a>span:first-child, .index-tabs a { font-weight: 300; }
.index-grid { gap: 32px 20px; }
.index-grid span { font-size: 12px; margin-top: 12px; }
.index-tabs a { font-size: 19px; }

/* The reader is deliberately quieter than the cover and contents. */
.reader-heading h1 { font-weight: 300; }
.reader-heading h1 span, .book-position, .photo-instruction { font-size: 12px; }
.reader-heading h1 span { letter-spacing: .04em; }
.reader-dock>a, .reader-dock>span, .story-dock>a { font: 400 14px/1.6 var(--font-ui); }
.story-link { font-size: 14px; gap: 10px; }
.reader-context { min-height: 54px; }
.reader-index svg { width: 20px; height: 20px; flex-basis: 20px; }

/* Prose uses one licensed, self-hosted face on every platform. */
.story-document .page-main,
.preface-document .page-main,
.creation-document .page-main { max-width: 760px; padding: 46px var(--gutter) 100px; }
.story-heading,
.preface-page .page-heading,
.creation-page .page-heading { display: block; border-bottom: 1px solid var(--line); padding-bottom: 30px; margin-bottom: 36px; }
.story-heading h1 { font: 400 clamp(28px, 6.3vw, 38px)/1.5 var(--font-reading); letter-spacing: .01em; text-wrap: pretty; }
.preface-page .page-heading h1,
.creation-page .page-heading h1 { font: 400 clamp(38px, 9vw, 58px)/1.4 var(--font-reading); letter-spacing: .045em; }
.preface-page .page-heading>p:not(.eyebrow),
.creation-page .page-heading>p:not(.eyebrow) { font: 400 12px/1.7 var(--font-ui); margin-top: 16px; color: var(--muted); }
.story-prose, .preface-prose, .creation-prose { font: 400 17px/2 var(--font-reading); letter-spacing: .015em; overflow-wrap: break-word; }
.story-prose p+p, .preface-prose p+p, .creation-prose p+p { margin-top: 24px; }
.creation-prose>section+section { margin-top: 48px; }
.creation-prose h2 { font: 400 25px/1.6 var(--font-reading); margin-bottom: 20px; }
.creation-theme { margin-top: 32px; }
.creation-theme h3 { font: 400 21px/1.6 var(--font-reading); margin-bottom: 12px; }
.signature { font-weight: 300; margin-top: 36px; }
.memory { margin-top: 44px; }
.memory figcaption { font-size: 12px; }
.story-date { margin-top: 20px; }
.story-work-link { margin-top: 44px; }
.closing-line { font: 300 20px/2 var(--font-display); }

@media (min-width: 700px) {
  :root { --gutter: 40px; }
  .page-main { padding-top: 64px; }
  .site-header { padding-inline: 32px; }
  .cover-type { left: 10%; top: 14%; }
  .cover-type h1 { font-size: 124px; }
  .cover-type>p[lang] { font-size: 20px; line-height: 1.55; letter-spacing: .09em; margin-top: 30px; }
  .cover-author { font-size: 19px; margin-top: 28px; }
  .cover-window { right: 6%; top: 4%; width: 54%; height: 78%; }
  .cover-bottom { inset-inline: 10%; grid-template-columns: 1fr 280px; column-gap: 36px; bottom: 36px; }
  .cover-bottom>p { font-size: 13px; }
  .begin { font-size: 16px; }
  .chapter-entry { min-height: 218px; grid-template-columns: minmax(0,1fr) 40% 20px; padding-block: 28px; }
  .chapter-entry-title { grid-template-columns: 28px minmax(0,1fr); gap: 0 16px; }
  .chapter-name { font-size: 58px; }
  .chapter-entry-image { height: 160px; }
  .chapter-entry-title>[lang] { font-size: 12px; }
  .chapter-grid { gap: 48px 40px; }
  .gallery-photo>img { height: 320px; }
  .chapter-heading { padding-bottom: 36px; }
  .chapter-heading h1 { font-size: 90px; }
  .chapter-intro { font-size: 20px; max-width: 13em; }
  .story-document .page-main,
  .preface-document .page-main,
  .creation-document .page-main { padding-top: 64px; }
  .story-prose, .preface-prose, .creation-prose { font-size: 18px; line-height: 2; }
  .story-heading, .preface-page .page-heading, .creation-page .page-heading { padding-bottom: 36px; margin-bottom: 42px; }
  .creation-prose>section+section { margin-top: 56px; }
  .creation-prose h2 { font-size: 28px; }
  .creation-theme h3 { font-size: 23px; }
  .index-grid img { height: 145px; }
}

@media (min-width: 1000px) {
  .catalog { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 88px; align-items: start; }
  .catalog-intro { position: sticky; top: 112px; }
  .catalog .page-heading { margin-bottom: 72px; }
  .frontmatter-list { grid-template-columns: 1fr; gap: 0; }
  .frontmatter-list>a+a { border-top: 0; }
  .catalog h1 { font-size: 90px; }
  .chapter-entry:first-child { padding-top: 12px; }
  .chapter-entry-image { height: 180px; }
  .chapter-entry { min-height: 240px; }
  .catalog .chapter-list { border-top: 0; }
  .story-document .page-main, .preface-document .page-main, .creation-document .page-main { padding-top: 80px; }
}

@media (max-width: 350px) {
  :root { --gutter: 20px; }
  .cover { min-height: 500px; }
  .cover-type h1 { font-size: 66px; }
  .cover-type>p[lang] { font-size: 11px; }
  .cover-author { font-size: 16px; margin-top: 18px; }
  .chapter-name { font-size: 36px; }
  .chapter-entry-title { grid-template-columns: 18px minmax(0,1fr); gap: 0 8px; }
  .chapter-entry { gap: 10px; min-height: 160px; }
  .chapter-entry-image { height: 106px; }
  .chapter-total { font-size: 11px; }
  .chapter-intro { font-size: 15px; max-width: 9em; }
  .chapter-heading h1 { font-size: 58px; }
  .gallery-photo>img { height: 158px; }
  .gallery-photo-meta { font-size: 11px; }
  .story-prose, .preface-prose, .creation-prose { font-size: 16px; }
  .reader-dock>a, .reader-dock>span { font-size: 12px; }
}

@media (max-height: 700px) and (orientation: portrait) {
  .cover-type { top: 10%; }
  .cover-type h1 { font-size: 68px; }
  .cover-type>p[lang] { margin-top: 18px; }
  .cover-author { margin-top: 16px; }
  .cover-window { top: 3%; height: 64%; }
}

@media (max-height: 740px) and (orientation: landscape) {
  .cover { min-height: 520px; }
  .cover-type { top: 7%; }
  .cover-type h1 { font-size: 92px; }
  .cover-type>p[lang] { font-size: 14px; margin-top: 18px; }
  .cover-window { height: 68%; }
}

@media (hover: hover) {
  .chapter-entry .chapter-entry-image img { transition: transform .4s var(--ease); }
  .chapter-entry:hover .chapter-entry-image img { transform: translateX(-5px); }
  .gallery-photo:hover .gallery-photo-meta { color: var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  .chapter-entry .chapter-entry-image img,
  .chapter-entry:hover .chapter-entry-image img { transition: none; transform: none; }
}
