/* ──────────────────────────────────────────────────────────────────────────
   Atlı House · YerAna — design tokens (D-29). Every colour is sampled from
   the approved photographs; see docs/decisions.md.
   ────────────────────────────────────────────────────────────────────────── */
:root {
  --ground:    #f4f0ea;  /* pale klinker, PH-090 · terrazzo, PH-064 */
  --ink:       #26221f;  /* dark klinker plinth in shadow, PH-090 */
  --accent:    #5a3a1c;  /* weathered-steel entrance doors, PH-090 */
  --secondary: #6e645b;  /* stone reveal, PH-090 · stone floor, PH-076 */
  --pale:      #cdbdb0;  /* pale brick upper volume, PH-101 */
  --olive:     #5c5f33;  /* reserved: bedroom wall PH-060, pond PH-096 */
  --rule:      rgba(38, 34, 31, 0.14);

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans:  "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --fs-body: 1.1875rem;          /* 19 px */
  --lh-body: 1.55;
  --measure: 66ch;
  --gutter: clamp(20px, 5vw, 56px);
  --col-gap: clamp(16px, 2vw, 32px);
  --section: clamp(40px, 6vh, 72px);
}
@media (min-width: 960px) { :root { --fs-body: 1.25rem; } }   /* 20 px */

@font-face {
  font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("/fonts/SourceSerif4Variable-Roman.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url("/fonts/SourceSerif4Variable-Italic.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("/fonts/SourceSans3VF-Upright.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3"; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url("/fonts/SourceSans3VF-Italic.woff2") format("woff2");
}

/* ── Base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); color: var(--ink); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-optical-sizing: auto;
  font-variant-numeric: proportional-nums;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, picture { display: block; max-width: 100%; }
img { height: auto; }
figure { margin: 0; }
p { margin: 0 0 1em; max-width: var(--measure); }
strong { font-weight: 600; font-variant-numeric: tabular-nums; }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.14em; }
a:hover { text-decoration-thickness: 1.5px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--pale); color: var(--ink); }

.skip {
  position: absolute; left: var(--gutter); top: -100px;
  padding: 12px 16px; background: var(--ink); color: var(--ground);
  font: 500 1rem var(--sans); text-decoration: none; z-index: 10;
}
.skip:focus { top: 12px; }

/* ── Grid: 12 columns from 960 px; text sits in columns 3–9 ───────────── */
/* A centred reading column: the container is capped and centred, so the side margins
   stay balanced at every window width; the text column sits in the middle eight of
   twelve columns and figures step out from it symmetrically. */
.grid { padding-inline: var(--gutter); max-width: 1280px; margin-inline: auto; }
.text { max-width: var(--measure); margin-inline: auto; }
@media (min-width: 960px) {
  .grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .grid > * { grid-column: 3 / 11; }
  /* the measure itself is centred inside its cell, so both margins are equal and grow with the window */
  .grid > .text, .grid > .measured, .grid > .clip { justify-self: center; width: 100%; }
  .grid > .text, .grid > .measured { max-width: var(--measure); }
  .grid > .clip { max-width: 420px; }
}

/* ── Header ───────────────────────────────────────────────────────────── */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px var(--gutter);
}
.wordmark { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.wordmark img { display: block; height: 14px; width: auto; }
@media (min-width: 960px) { .wordmark img { height: 16px; } }
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  font: 400 1rem/1 var(--sans); color: var(--secondary); text-decoration: none;
  padding: 14px 10px; display: inline-block; min-height: 44px;
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--ink); text-decoration: underline; text-underline-offset: 0.3em; }

/* ── Opening ──────────────────────────────────────────────────────────── */
.opening-image img {
  width: 100%;
  /* Cap the height so the opening sentence arrives on the first screen. The crop
     is taken from the top only (object-position bottom) and the floor of 44.9vw
     guarantees the top of the building is never clipped: the 16:9 master has
     302 rows of sky above the building, so at most 280 rows may go. */
  max-height: max(72vh, 44.9vw);
  object-fit: cover;
  object-position: center bottom;   /* the bottom edge is never lost */
}
.opening-text { padding-block: clamp(28px, 4vh, 44px) clamp(32px, 5vh, 56px); }
.eyebrow {
  margin: 0 0 1em;
  font: 500 0.875rem/1.4 var(--sans); letter-spacing: 0.12em; color: var(--secondary);
}
.eyebrow.caps { text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.8125rem; }
.opening-title {
  margin: 0 0 0.5em;
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.25rem, 1.2rem + 3.6vw, 4.25rem);
  line-height: 1.05; letter-spacing: -0.012em; max-width: 16ch;
}
.opening-title + .lede { font-size: clamp(1.25rem, 1rem + 0.9vw, 1.625rem); line-height: 1.35; font-weight: 400; max-width: 44ch; color: var(--ink); }
.eyebrow-loc::before { content: "·"; margin: 0 0.7em; }
.lede {
  margin: 0 0 1.1em;
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.75rem, 1.05rem + 2.5vw, 3.125rem);
  line-height: 1.2; letter-spacing: -0.006em;
  max-width: 34ch;
}
.facts {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; row-gap: 0.4em;
  font: 400 1.0625rem/1.4 var(--sans); font-variant-numeric: tabular-nums; color: var(--ink);
}
.facts li + li::before { content: "·"; margin: 0 0.6em; color: var(--secondary); }

figcaption.grid { padding-top: 12px; }
.caption { display: block; font: 400 0.9375rem/1.45 var(--sans); color: var(--secondary); max-width: 60ch; }
.credit { display: block; font: 400 0.8125rem/1.4 var(--sans); color: var(--secondary); margin-top: 0.4em; }
@media (min-width: 960px) {
  figcaption.grid > .caption { grid-column: 3 / 9; }
  figcaption.grid > .credit { grid-column: 9 / 11; text-align: right; margin-top: 0; }
}

/* ── Sections ─────────────────────────────────────────────────────────── */
section { padding-block: var(--section); }
section + section:not(.opening) { border-top: 1px solid var(--rule); }
section.opening { padding-block: 0; }
h2 {
  margin: 0 0 0.7em; font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.75rem, 1.2rem + 1.5vw, 2.375rem); line-height: 1.15; letter-spacing: -0.005em;
}
h3 {
  margin: 1.6em 0 0.6em; font-family: var(--serif); font-weight: 500;
  font-size: 1.375rem; line-height: 1.3;
}
h3 .num { display: inline-block; min-width: 1.6em; font: 500 0.875em/1 var(--sans); color: var(--secondary); letter-spacing: 0.05em; }
.intro p { font-size: 1.15em; line-height: 1.45; color: var(--ink); }
.label { font: 500 0.8125rem/1.4 var(--sans); letter-spacing: 0.1em; color: var(--secondary); margin: 0 0 0.9em; }
.note { font: 400 0.9375rem/1.5 var(--sans); color: var(--secondary); }

/* Measured block */
.measured {
  margin: 1.8em 0; padding: 1.2em 0 0;
  border-top: 1px solid var(--rule);
}
.measured-text p { font-size: 1.05em; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 2vw, 28px); margin-top: 1.4em; }
.pair figcaption { margin-top: 10px; }
@media (min-width: 960px) { .pair { grid-template-columns: 1fr 1fr 1fr; } .pair figure:first-child { grid-column: 1; } .pair figure:last-child { grid-column: 2; } }

/* Disclosure + table */
.disclosure { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 1em 0 0; }
.disclosure summary {
  cursor: pointer; list-style: none; padding: 16px 0; min-height: 44px;
  font: 500 1.0625rem/1.4 var(--sans); color: var(--ink);
}
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::before { content: "+"; display: inline-block; width: 1.4em; color: var(--secondary); }
.disclosure[open] summary::before { content: "–"; }
.disclosure summary:focus-visible { outline-offset: -2px; }
.disclosure .note { margin-top: 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 20px; }
table { width: 100%; min-width: 420px; border-collapse: collapse; font: 400 1rem/1.4 var(--sans); font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 0.6em 1em 0.6em 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { font-weight: 500; color: var(--secondary); font-size: 0.875rem; letter-spacing: 0.04em; }
tbody th { font-weight: 400; }
th.num, td.num { text-align: right; padding-right: 1.4em; }
tr:last-child th, tr:last-child td { border-bottom: 0; }

/* Credits */
.credits { margin: 1.2em 0 1.8em; padding: 0; border-top: 1px solid var(--rule); }
.credits > div { display: grid; grid-template-columns: 1fr; padding: 0.7em 0; border-bottom: 1px solid var(--rule); }
.credits dt { font: 400 0.9375rem/1.4 var(--sans); color: var(--secondary); }
.credits dd { margin: 0; font-size: 1.05em; }
@media (min-width: 600px) { .credits > div { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 24px; } }
.person { margin-top: 1.4em; }
.person-line { }
.published { margin-top: 1.4em; font: 400 1rem/1.5 var(--sans); }
.published .label { display: block; margin-bottom: 0.3em; }

/* Enquiries */
.enquiries { border-top: 1px solid var(--rule); }
.contact { margin-top: 1.2em; }
.email { display: inline-block; padding: 6px 0; font-family: var(--serif); font-size: 1.5rem; line-height: 1.4; color: var(--accent); }  /* ≥ 44 px tap target */
.signature { font: 400 1rem/1.6 var(--sans); color: var(--secondary); }

/* Footer */
.site-footer { background: var(--ink); color: var(--pale); padding: 28px var(--gutter); }
.site-footer p { margin: 0; font: 400 0.9375rem/1.5 var(--sans); }

/* ── Motion: a fade on image load, and nothing else ───────────────────── */
.js img.fade { opacity: 0; transition: opacity 0.3s ease; }
.js img.fade.is-loaded { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .js img.fade { transition: none; opacity: 1; }
  html { scroll-behavior: auto; }
}

/* ══════════════════════════════════════════════════════════════════════════
   Stage 4 additions — the full page and the Photographs page
   ══════════════════════════════════════════════════════════════════════════ */

/* Figure widths on the 12-column grid */
.fig { margin: 0 0 clamp(20px, 3vh, 36px); }
.fig figcaption { padding-top: 12px; }
.fig .caption { max-width: 60ch; }
.fig-label { display: block; font: 500 0.75rem/1.4 var(--sans); letter-spacing: 0.1em; color: var(--secondary); margin-bottom: 0.3em; }
.grid > .fig.full { grid-column: 1 / -1; margin-inline: calc(-1 * var(--gutter)); }
.grid > .fig.full figcaption { padding-inline: var(--gutter); }
@media (min-width: 960px) {
  .grid > .fig.wide   { grid-column: 2 / 12; }
  .grid > .fig.medium { grid-column: 3 / 11; }
  .grid > .fig.narrow { grid-column: 4 / 10; }
  .grid > .fig.small  { grid-column: 5 / 9; }
  /* full-bleed: break out of the centred container to the window edges */
  .grid > .fig.full { margin-inline: calc(50% - 50vw); width: 100vw; }
  .grid > .fig.full figcaption { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: calc(var(--gutter) + (100% / 12) * 2); }
}

/* Pairs, triptychs and strips */
.pair-wide { display: grid; grid-template-columns: 1fr; gap: clamp(16px, 2vw, 32px); margin: 0.4em 0 clamp(20px, 3vh, 36px); }
.pair-wide .fig { margin: 0; }
.triptych { display: grid; grid-template-columns: 1fr; gap: clamp(16px, 2vw, 32px); margin-bottom: clamp(20px, 3vh, 36px); }
.triptych .fig { margin: 0; }
.strip { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 2vw, 24px); margin: 0.6em 0 clamp(24px, 3vh, 40px); }
.strip .fig { margin: 0; }
.strip .caption { font-size: 0.875rem; }
@media (min-width: 600px) {
  .pair-wide { grid-template-columns: 1fr 1fr; }
  .triptych { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .grid > .pair-wide { grid-column: 2 / 12; }
  .grid > .triptych { grid-column: 2 / 12; }
  .grid > .strip { grid-column: 1 / 13; grid-template-columns: repeat(5, 1fr); }
}

/* Movement markers */
.kicker { margin: 0 0 0.9em; font: 500 0.8125rem/1 var(--sans); letter-spacing: 0.14em; color: var(--secondary); font-variant-numeric: tabular-nums; }
.kicker::after { content: ""; display: block; width: 32px; height: 1px; background: var(--secondary); margin-top: 14px; opacity: 0.6; }
.standfirst { margin-top: 1.6em; }
.standfirst p { font-size: 1.05em; line-height: 1.5; }
.credit-line { font: 400 0.9375rem/1.5 var(--sans); color: var(--secondary); margin-top: 0.5em; }
.callout { border-left: 1px solid var(--secondary); padding-left: 1.2em; margin: 1.2em 0 1.4em; }
.callout p { font-size: 1.05em; }

/* Timeline */
.timeline { list-style: none; margin: 0.4em 0 1.6em; padding: 0; border-top: 1px solid var(--rule); }
.timeline li { display: grid; grid-template-columns: 1fr; padding: 0.7em 0; border-bottom: 1px solid var(--rule); }
.timeline .when { font: 500 0.9375rem/1.5 var(--sans); color: var(--secondary); font-variant-numeric: tabular-nums; }
.timeline .what { font-size: 1.05em; }
@media (min-width: 600px) { .timeline li { grid-template-columns: 11em 1fr; column-gap: 24px; } }

/* The correction — given the weight of a result */
.correction { border-top: 1px solid var(--ink); padding-top: 1.2em; margin: 1.8em 0 1.6em; }
.correction h3 { margin-top: 0.2em; }
.correction .label { margin-bottom: 0.4em; }
.correction p:not(.label) { font-size: 1.08em; }

/* Video clip — vertical, in the text column, never full width */
.clip { margin: 0.4em 0 clamp(20px, 3vh, 36px); }
.clip video { display: block; width: 100%; max-width: 420px; height: auto; background: var(--ink); margin-inline: auto; }
.clip-toggle {
  margin-top: 10px; min-height: 44px; padding: 10px 16px;
  font: 500 0.9375rem/1 var(--sans); color: var(--ink); background: transparent;
  border: 1px solid var(--secondary); border-radius: 2px; cursor: pointer;
}
.clip-toggle:hover { border-color: var(--ink); }
.clip figcaption { padding-top: 12px; }

/* Photographs page */
.page-head { padding-block: clamp(24px, 4vh, 40px) clamp(16px, 3vh, 28px); }
.page-head h1 { margin: 0 0 0.6em; font-family: var(--serif); font-weight: 300; font-size: clamp(2.25rem, 1.4rem + 3vw, 4rem); line-height: 1.05; letter-spacing: -0.01em; }
.page-head .eyebrow { margin-bottom: 1.6em; }
.sequence { padding-block: clamp(28px, 4vh, 48px); border-top: 1px solid var(--rule); }
.seq-title { font-size: clamp(1.375rem, 1rem + 1vw, 1.75rem); margin-bottom: 0.9em; }
.sequence .fig .credit { margin-top: 0.3em; }
.site-nav a[aria-current="page"] { color: var(--ink); }
/* Construction strip: one frame shape so the five read as a row (no constraints on these assets) */
.strip img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
