/* 100 days, 100 portraits — reading pages: the homepage sections below the wall, Project, About and 404.
   Sage colourway (G3 Sage) on base.css tokens. Drawings always sit on the wall colour, with torn edges and one soft
   shadow (G4-2). The wall itself is in home.css. Never stretch a drawing: width + aspect-ratio 9/16 + height auto. */

:root {
  --space: clamp(72px, 9vw, 128px);   /* between sections */
  --measure: 40em;                    /* reading line length */
  --card: #F6F6F4;                    /* comment cards, form fields */
  --card-rule: #E3E3E0;
  --label: #F6F6F4;                   /* museum label */
  --label-ink: #595959;
  --field-edge: #7A7F76;              /* 3.4:1 on paper: form fields stay visible */
}

html { scroll-padding-top: calc(var(--header-h, 64px) + 16px); }
svg[hidden] { display: none; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: 12px; top: -200px; z-index: 100;
  padding: 10px 14px; background: var(--on-wall); color: var(--ink);
  font: 600 14px/1.2 var(--sans); text-decoration: none;
}
.skip-link:focus { top: 12px; }
.skip-link:hover { color: var(--ink); }

/* ---------- Type ---------- */
.h1 { margin: 0; font: 400 clamp(48px, 7vw, 96px)/.98 var(--serif); letter-spacing: -.02em; }
.h2 { margin: 0; font: 400 clamp(36px, 3.6vw, 50px)/1.04 var(--serif); letter-spacing: -.01em; }
.lead { margin: 0; font: 400 clamp(21px, 1.9vw, 26px)/1.42 var(--serif); }
.kicker {
  margin: 0 0 14px; color: var(--muted);
  font: 600 12px/16px var(--sans); letter-spacing: .16em; text-transform: uppercase;
}
.small { font-size: 15px; }
.muted { color: var(--muted); }
.signature { font: italic 400 20px/1.3 var(--serif); }

.prose { max-width: var(--measure); }
.prose > * { margin: 0; }
.prose > * + * { margin-top: 18px; }
.prose > .lead + * { margin-top: 22px; }
.prose > .signature { margin-top: 22px; }
.prose > .links { margin-top: 26px; }
.prose > .link-list { margin-top: 28px; }

/* ---------- Sections ---------- */
.section { max-width: 1180px; margin: 0 auto; padding: var(--space) var(--gutter) 0; }
.section--end { padding-bottom: var(--space); }
.ruled { border-top: 1px solid var(--rule); padding-top: 28px; }

/* Two columns: heading left (4), text right (8). */
.cols { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 20px clamp(28px, 6vw, 96px); align-items: start; }

/* Spread: heading and a drawing (or the facts) on the left, the text on the right. On phones: heading, text, drawing. */
.spread {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); grid-template-rows: auto 1fr;
  grid-template-areas: "head text" "side text"; gap: 28px clamp(28px, 6vw, 96px); align-items: start;
}
.spread__head { grid-area: head; }
.spread__side { grid-area: side; }
.spread__text { grid-area: text; }
@media (min-width: 861px) {
  .spread__side--sticky { position: sticky; top: calc(var(--header-h, 64px) + 28px); }
}
@media (max-width: 860px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .spread { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "head" "text" "side"; gap: 22px; }
}

/* Page heading on Project / About */
.page-head { max-width: 1180px; margin: 0 auto; padding: clamp(56px, 8vw, 112px) var(--gutter) 0; }
.page-head .kicker { margin-bottom: 18px; }

/* ---------- Facts (a catalogue label for the series) ---------- */
.facts { margin: 30px 0 0; padding: 0; border-top: 1px solid var(--rule); font-size: 15px; line-height: 1.45; }
.facts > div { display: grid; grid-template-columns: minmax(0, 6.5em) minmax(0, 1fr); gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.spread__side > .facts { margin-top: 0; }

/* ---------- Lists of links ---------- */
.link-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); font-size: 15px; }
.link-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.link-list li > span:first-child { color: var(--muted); }

.links { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0; padding: 0; list-style: none; font-size: 15px; font-weight: 500; }
.links a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; }
.ico { flex: none; }

/* ---------- The wall colour, used for every place a drawing hangs ---------- */
.tone-wall { background: var(--wall); color: var(--on-wall); }
.tone-wall a:not(.btn) { color: var(--on-wall); }
.tone-wall a:not(.btn):hover { color: var(--brass); }
.tone-wall .kicker { color: var(--brass); }
.tone-wall .muted, .tone-wall .small { color: var(--on-wall-2); }

.band { margin-top: var(--space); }
.band__inner { max-width: 1180px; margin: 0 auto; padding: clamp(56px, 7vw, 96px) var(--gutter); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; margin: 0; padding: 9px 14px;
  border: 1px solid rgba(37, 37, 37, .4); border-radius: 0; background: transparent; color: var(--on-wall);
  font: 500 13px/1 var(--sans); letter-spacing: .02em; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { background: var(--on-wall); border-color: var(--on-wall); color: var(--ink); }
.btn--ink { border-color: var(--ink); color: var(--ink); }
.btn--ink:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn svg { flex: none; }

/* ---------- Torn sheets (G4-2): clip-path on the paper (torn.js), one soft shadow on the wrapper ---------- */
.torn { display: block; filter: drop-shadow(0 4px 6px rgba(16, 18, 15, .2)); }
.torn__paper { display: block; background: var(--ground); }
.torn__paper > video { width: 100%; height: auto; aspect-ratio: 9 / 16; background: var(--ground); }

.tag {
  display: inline-flex; align-items: center; gap: 7px; color: var(--brass);
  font: 500 11px/13px var(--sans); letter-spacing: .14em; white-space: nowrap;
  font-variant-numeric: tabular-nums lining-nums;
}

/* A niche: one drawing on a reading page, straight on the page with its torn edge and shadow (no sage backing: Neli, 21 Oct 2026) */
.niche { margin: 0; padding: 0; }
.niche .tag, .film-room .tag, .after-wall .tag { color: var(--muted); }
.niche__sheet { width: min(100%, 250px); margin: 0 auto; }
.niche__cap {
  width: min(100%, 250px); margin: 10px auto 0; font-size: 14px; line-height: 1.4;
}
.niche__cap a { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; text-decoration: none; padding: 4px 0; }
.niche__cap a:hover .niche__name { text-decoration: underline; }

/* ---------- Films ---------- */
.film { margin: 0; }
.film__sheet { width: min(100%, 240px); }
.film__video { cursor: pointer; }
.film__cap { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; font-size: 14px; line-height: 1.4; }

/* The film room on the Project page: one screen, three films to choose from, straight on the page (no sage box) */
.film-room { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px clamp(24px, 4vw, 44px); align-items: center; }
.film-room .film__sheet { width: clamp(180px, 20vw, 230px); }
.film-room__side { display: grid; gap: 16px; justify-items: start; }
.film-room__side .kicker { margin: 0; }
.film-room__side .small { margin: 0; }
.film-room__pick { display: grid; gap: 0; width: 100%; max-width: 300px; border-top: 1px solid rgba(37, 37, 37, .12); }
.pick {
  display: flex; align-items: baseline; gap: 12px; width: 100%; margin: 0; padding: 10px 2px; min-height: 44px;
  border: 0; border-bottom: 1px solid rgba(37, 37, 37, .12); background: transparent; color: var(--on-wall);
  font: 400 15px/1.35 var(--sans); text-align: left; cursor: pointer;
}
.pick__no { flex: none; color: var(--brass); font-weight: 600; font-size: 13px; letter-spacing: .06em; font-variant-numeric: tabular-nums lining-nums; }
.pick__name { min-width: 0; overflow-wrap: anywhere; }
.pick:hover .pick__name { text-decoration: underline; text-underline-offset: .2em; }
.pick[aria-pressed="true"] { box-shadow: inset 3px 0 0 var(--brass); padding-left: 14px; }
.pick[aria-pressed="true"] .pick__name { color: var(--on-wall); }
/* On the light Project page */
.film-room .film-room__pick, .film-room .pick { border-color: var(--rule); }
.film-room .pick, .film-room .pick[aria-pressed="true"] .pick__name { color: var(--ink); }
.film-room .pick__no { color: var(--muted); }
.film-room .pick[aria-pressed="true"] { box-shadow: inset 3px 0 0 var(--ink); }
.film-room .kicker { color: var(--muted); }
@media (max-width: 560px) {
  .film-room { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .film-room .film__sheet { width: min(70vw, 240px); }
  .film-room__side { justify-items: stretch; width: 100%; }
  .film-room__pick { max-width: none; }
}

/* ---------- Drawings made after the challenge (window.AFTER) ---------- */
.after-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 30px clamp(16px, 2vw, 26px); }
.after-grid__item { display: flex; justify-content: center; }
.after-grid__sheet { width: 100%; max-width: 190px; }
.after-grid__sheet .tag { margin-top: 8px; }
@media (max-width: 1080px) { .after-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .after-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; } }

.after-wall { margin-top: 40px; }
.after-wall .after-grid { column-gap: clamp(16px, 1.6vw, 20px); }   /* keeps each sheet about 150px wide on desktop */

/* Closing words, in the text column */
.closing { margin-top: 40px; }
.closing > .prose { grid-column: 2; }
@media (max-width: 860px) { .closing > .prose { grid-column: 1; } }
.prose > .film-room { margin-top: 30px; }
.prose > .film-room + * { margin-top: 30px; }

/* ---------- Contact form (not connected yet) ---------- */
.form { display: grid; gap: 18px; max-width: 34em; }
.form[hidden] { display: none; }
.prose > .form { margin-top: 30px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; }
.field .req { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  width: 100%; margin: 0; padding: 12px 14px; border: 1px solid var(--field-edge); border-radius: 0;
  background: var(--card); color: var(--ink); font: 400 17px/1.4 var(--sans);
}
.field textarea { min-height: 168px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-color: var(--link); }
.form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.form__note { margin: 0; font-size: 14px; color: var(--muted); }
.form__status { margin: 0; font-size: 15px; }
.form__status:empty { display: none; }
/* Thank-you panel that takes the form's place after sending */
.form-sent { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; max-width: 34em; padding: 40px 24px; background: var(--card); text-align: center; }
.form-sent[hidden] { display: none; }
.form-sent:focus { outline: none; }
.form-sent__title { margin: 0; font: 400 clamp(30px, 3vw, 40px)/1.1 var(--serif); }
.form-sent__text { margin: 0; color: var(--muted); }
.form-sent .btn { margin-top: 10px; }
.story__part > .form-sent + .link-list { margin-top: 40px; }

/* ---------- 404: a blank sheet on the wall ---------- */
.nf-page { border-bottom: 1px solid rgba(37, 37, 37, .08); }
.nf {
  max-width: 1180px; margin: 0 auto; min-height: 62vh; padding: clamp(56px, 9vw, 120px) var(--gutter);
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 40px clamp(32px, 6vw, 96px); align-items: center;
}
.nf__sheet { width: clamp(150px, 20vw, 240px); }
.nf__blank { display: block; width: 100%; aspect-ratio: 9 / 16; }
.nf__sheet .tag { margin-top: 8px; }
.nf .lead { margin-top: 24px; max-width: 26em; color: var(--on-wall-2); }
.nf .links { margin-top: 26px; }
@media (max-width: 700px) {
  .nf { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .nf__sheet { width: 140px; }
}

/* ---------- The Project page: one centred column that reads top to bottom, like the original site (Neli, 23 Oct 2026) ---------- */
.story { --col: 680px; padding: clamp(56px, 8vw, 104px) var(--gutter) clamp(80px, 9vw, 128px); }
.story > * { max-width: var(--col); margin-inline: auto; }
.story__head .h1 { margin: 0; }
.story__part { margin-top: clamp(72px, 8vw, 112px); }
.story__part > .h2 { margin: 0 0 22px; }
.story__part > p { margin: 0; }
.story__part > p + p { margin-top: 18px; }
.story__part > * + p { margin-top: 32px; }
.story__part > p + * { margin-top: 40px; }
.story__part--first { margin-top: clamp(32px, 4vw, 48px); }   /* About: the name right under the page title */
.story__part > .form + .link-list { margin-top: 40px; }

.story__fig { margin: 0; text-align: center; }
.story__fig figcaption { margin-top: 14px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.story__fig .shot { width: 100%; height: auto; }
.story__fig--wide { width: 100%; }   /* pictures never wider than the text (Neli, 23 Oct 2026) */
.story__fig--one .sheet-link { display: block; width: min(100%, 220px); margin-inline: auto; }   /* smaller, less scrolling (Neli) */
.sheet-link .torn { transition: transform .3s var(--ease); }
.sheet-link:hover .torn { transform: translateY(-3px); }


/* A screenshot shown as a sheet the same shape as the drawing beside it: white paper, torn edge, one soft shadow */
.shot-sheet .torn__paper { aspect-ratio: 3 / 4; background: #FFFFFF; display: flex; align-items: center; }
.shot-sheet img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* A single drawing on the left with its paragraph beside it (Neli, 23 Oct 2026: less empty space, less scrolling) */
.story__side { display: grid; grid-template-columns: minmax(110px, 220px) minmax(0, 1fr); gap: clamp(20px, 4vw, 40px); align-items: start; }   /* text top-aligned with the drawing (Neli) */
.story__side > p { margin: -0.35em 0 0; }   /* first line of letters level with the top of the drawing */
.story__side .story__fig--one .sheet-link { width: 100%; }
.story__part > * + .story__side, .story__part > .story__side + * { margin-top: 40px; }
@media (max-width: 520px) { .story__side { grid-template-columns: 120px minmax(0, 1fr); } }
.story__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 4vw, 44px); align-items: end; }
.quotes { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.story__part > p + .quotes { margin-top: 36px; }
.quote figure { margin: 0; }
.quote blockquote { margin: 0; }
.quote blockquote p { margin: 0; font: 600 clamp(18px, 1.5vw, 21px)/1.4 var(--serif); letter-spacing: 0; text-indent: -.42em; }   /* smaller and bold, to stand apart from the text and headings (Neli) */
.quote figcaption { margin-top: 12px; font-size: 15px; color: var(--muted); }

.story__videos { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2.5vw, 28px);
  width: 100%; }
.story__videos video { width: 100%; height: auto; aspect-ratio: 9 / 16; background: var(--ground); }

/* Newer portraits: three across, each cropped to 3:4 as on the original site, so the rows stay even */
.story .after-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 28px); width: 100%; max-width: none; }
.story .after-grid__sheet { max-width: none; }
.story .after-grid .drawing { aspect-ratio: 3 / 4; object-fit: cover; }
@media (max-width: 520px) {
  .story .after-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story__videos { gap: 10px; }
}
