/* HELD — Jean-Pierre Yin. Homepage and contact pages (generated by tools/build-pages.mjs).
   Base rules are the desktop composition (>= 1100px); tablet (700–1099px) and mobile (< 700px)
   adjust each section's grid. Image widths here must stay in step with SIZES in build-pages.mjs. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-normal-latin-v2.woff2?v=4f8a9f0a1b") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
/* Newsreader ships as a wght-400 instance (opsz kept): the site uses no other weight, and with
   font-synthesis: none a bolder Newsreader would render at 400. See tools/build-fonts.py. */
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-400-latin.woff2?v=312e53dd41") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-400-italic-latin.woff2?v=dd54f129c3") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #f3f0e9;
  --paper-band: #eae6df;
  --warm: #e8e0d5;
  --print: #faf8f4;
  --ink: #171715;
  --muted: #625d56;
  --line: rgba(23, 23, 21, 0.22);
  --on-dark: #f3f0e9;
  --on-dark-muted: #bcb6ac;
  --error: #9b2a1c;
  --placeholder: #d6d1c9;

  --display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --ui: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 3vw, 52px);
  --header-h: 68px;
  --rot-scale: 1; /* resting rotations shrink on small screens */
  --motion-scale: 1; /* scroll drift and settle distance: smaller on tablet and phone */
  --touch: clamp(8px, 1vw, 16px); /* overlap of touching images */
  --display-stretch: 64%;
  --display-weight: 880;
  --ease-settle: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.45 var(--ui);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, p, figure { margin: 0; }
a { color: inherit; }
img { display: block; width: 100%; height: auto; }
picture { display: block; }
main { display: block; overflow-x: clip; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.arrow {
  display: inline-block;
  width: 0.72em;
  height: 0.72em;
  vertical-align: -0.02em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: square;
  overflow: visible;
}
.arrow--e { width: 0.85em; }

/* Skip link: first focusable element */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 8px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  background: var(--ink);
  color: var(--on-dark);
  font: 700 12px/1 var(--ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }
.skip-link:focus-visible { outline-color: var(--ink); outline-offset: 2px; }

/* Small labels: "01 / HELD" */
.section-id {
  font: 500 11px/1.3 var(--ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Photographs: every figure keeps its photo's aspect ratio unless a crop is set below. */
figure picture { background: var(--placeholder); }
figure img { object-fit: cover; object-position: var(--fx, 50%) var(--fy, 50%); }
figure,
.climax-photo { rotate: calc(var(--rot, 0deg) * var(--rot-scale)); }
.climax-figure { --rot: 0deg; }

/* Narrow print border: pair B and the small detail only. */
.print {
  padding: 5px;
  background: var(--print);
  box-shadow: 0 7px 24px rgba(20, 16, 11, 0.09), 0 1px 2px rgba(20, 16, 11, 0.06);
}
.print picture { background: var(--placeholder); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-wrap: wrap; /* only wraps when a reader enlarges text spacing; one row otherwise */
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  min-height: var(--header-h);
  padding: 0 var(--gutter);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  min-height: 44px;
  padding-block: 12px;
  text-decoration: none;
  white-space: nowrap;
}
.brand strong {
  font: 700 15px/1 var(--ui);
  letter-spacing: -0.01em;
  word-spacing: 0.14em;
  text-transform: uppercase;
}
.brand small {
  font: 400 10px/1 var(--ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.6vw, 26px);
}
.nav-link,
.language a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font: 700 11px/1 var(--ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}
.nav-link { padding-inline: 6px; }
.nav-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.language {
  display: flex;
  align-items: center;
  font: 700 11px/1 var(--ui);
  color: var(--muted);
}
.language a {
  min-width: 44px;
  padding-inline: 4px;
  letter-spacing: 0.09em;
  color: var(--muted);
}
.language a:hover { color: var(--ink); }
.language a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.write {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  background: var(--ink);
  color: var(--paper);
  font: 700 11px/1 var(--ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  line-height: 1.1;
  /* fits on one line at the designed spacing; wraps inside its box rather than pushing the
     header past the viewport when a reader enlarges text spacing (WCAG 1.4.12) */
  min-width: 0;
}
.write:hover { background: #46413a; }

/* ---------- 01 Hero: the photograph alone, off-axis; a small serif heading at its lower left ---------- */

.hero {
  display: grid;
  grid-template-columns: 28% 60% 1fr;
  grid-template-rows: auto 1fr auto;
  padding-top: clamp(24px, 2.4vw, 36px);
  padding-bottom: clamp(56px, 7vw, 110px);
}
.hero .section-id {
  grid-column: 1;
  grid-row: 1;
  padding: 2px var(--gutter) 0; /* level with the photograph's top edge */
}
.hero-photo {
  grid-column: 2;
  grid-row: 1 / -1;
  /* when the height cap below narrows it, the spare width goes to the left, so the photograph stays
     off-axis (12% right margin) instead of drifting to the centre */
  justify-self: end;
  /* 60vw, unless the viewport is too short for the photograph and the heading beside it;
     never wider than its 1448px source */
  width: max(66%, min(100%, (100vh - var(--header-h) - 120px) * 1.25));
  width: max(66%, min(100%, (100svh - var(--header-h) - 120px) * 1.25));
  max-width: 1448px;
  --rot: 0deg; /* the opening photograph sits straight; the tilts start with the pair */
  translate: 0 calc(var(--drift, 0px) * var(--motion-scale));
}
.hero-photo img { aspect-ratio: 1.25; }
/* Short laptop viewports: the full, uncropped 4:3 frame gives back width the height cap takes away.
   (Keep tools/build-pages.mjs HERO_SIZES in step with these widths and crops.) */
@media (min-width: 1100px) and (max-height: 820px) and (min-height: 520.02px) {
  .hero-photo img { aspect-ratio: 4 / 3; }
  .hero-photo {
    width: max(66%, min(100%, (100vh - var(--header-h) - 104px) * 1.333));
    width: max(66%, min(100%, (100svh - var(--header-h) - 104px) * 1.333));
  }
}
.hero-title {
  grid-column: 1;
  grid-row: 3;
  align-self: end;
  padding: 0 clamp(20px, 2.8vw, 48px) 0 var(--gutter);
  font: 400 clamp(18px, 1.4vw, 23px)/1.3 var(--serif);
}
.hero-name {
  display: block;
  margin-bottom: 0.3em;
  font-size: clamp(26px, 2.2vw, 36px);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.hero-line {
  display: block;
  max-width: 15em;
  text-wrap: balance;
}
.scroll-cue {
  grid-column: 3;
  grid-row: 3;
  justify-self: end;
  align-self: end;
  padding-right: var(--gutter);
  font: 500 11px/1 var(--ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}
.scroll-cue::after {
  content: "";
  display: block;
  width: 1px;
  height: 43px;
  margin: 12px auto 0;
  background: var(--ink);
}

/* ---------- 02 Touching pair ---------- */

.pair {
  display: grid;
  grid-template-columns: 5% 41% 28% 1fr;
  align-items: start;
  padding-bottom: clamp(24px, 4vw, 60px);
}
.pair .section-id {
  grid-column: 1 / -1;
  padding: 0 var(--gutter) clamp(20px, 2.6vw, 38px);
}
.pair-a {
  grid-column: 2;
  grid-row: 2;
  --rot: -0.35deg;
}
.pair-b {
  position: relative;
  z-index: 2;
  grid-column: 3;
  grid-row: 2;
  width: calc(100% + var(--touch));
  margin-left: calc(-1 * var(--touch));
  margin-top: 7.8vw;
  --rot: 0.7deg;
}

/* ---------- Silence ---------- */

.silence {
  display: grid;
  place-items: center;
  min-height: clamp(460px, 82vh, 860px);
  padding: 64px 8%;
  text-align: center;
}
.silence p {
  max-width: 22em;
  font: 400 clamp(25px, 3vw, 44px)/1.18 var(--serif);
  text-wrap: balance;
}
.silence p::before {
  content: "";
  display: block;
  width: 34px;
  margin: 0 auto 35px;
  border-top: 1px solid var(--ink);
}

/* ---------- 03 Small things: small print + note, larger offset image ---------- */

.details {
  display: grid;
  grid-template-columns: 10% 19% 25% 38% 1fr;
  align-items: start;
  padding-bottom: clamp(48px, 6vw, 96px);
}
.details .section-id {
  grid-column: 1 / -1;
  padding: 0 var(--gutter) clamp(20px, 2.4vw, 36px);
}
.detail-small {
  grid-column: 2;
  grid-row: 2;
  margin-top: 3.4vw;
  --rot: -1deg;
}
.note {
  display: block;
  width: max-content;
  margin: 0.25em 0 0 56%;
  font: italic 400 clamp(18px, 1.55vw, 24px)/1.2 var(--serif);
  rotate: -6deg;
  transform-origin: left center;
}
.detail-large {
  grid-column: 4;
  grid-row: 2;
  --rot: 0.35deg;
}

/* ---------- 04 Play: warm band, headline over the running frame ---------- */

.play {
  display: grid;
  grid-template-columns: 4% 54% 2% 33% 1fr;
  align-items: start;
  padding: clamp(24px, 2vw, 30px) 0 clamp(52px, 5vw, 76px);
  background: var(--warm);
}
.play .section-id {
  grid-column: 1 / -1;
  grid-row: 1;
  padding: 0 var(--gutter) clamp(28px, 3vw, 44px);
}
.play-word {
  position: relative;
  z-index: 3;
  grid-column: 2 / 4;
  grid-row: 2;
  margin: 0 0 -0.42em 1%;
  font: var(--display-weight) clamp(64px, 8.6vw, 156px)/0.84 var(--display);
  font-stretch: var(--display-stretch);
  letter-spacing: -0.03em;
  word-spacing: 0.1em; /* the condensed space alone reads as no gap */
  overflow-wrap: anywhere;
}
.play-black {
  position: relative;
  z-index: 2;
  grid-column: 4;
  grid-row: 2 / 4;
  margin-top: 3.2vw;
  --rot: 1.2deg;
}
.play-running {
  grid-column: 2;
  grid-row: 3;
  --rot: -1.2deg;
}

/* ---------- Release: near-full width, still ---------- */

.release {
  padding: clamp(56px, 7.2vw, 104px) 0 clamp(40px, 5.6vw, 80px);
}
.release-photo {
  width: 90%;
  margin-inline: auto;
}
.release-photo img { aspect-ratio: 3 / 2; }

/* ---------- 05 Observation ---------- */

.observation {
  display: grid;
  grid-template-columns: 13% 30% 14% 36% 1fr;
  align-items: start;
  padding: clamp(28px, 3vw, 44px) 0 clamp(64px, 7vw, 110px);
}
.observation .section-id {
  grid-column: 1 / -1;
  padding: 0 var(--gutter) clamp(14px, 1.4vw, 20px);
}
.observed {
  grid-column: 2;
  grid-row: 2;
  --rot: -0.45deg;
  translate: 0 calc(var(--drift, 0px) * var(--motion-scale));
}
.observation-line {
  grid-column: 4;
  grid-row: 2;
  margin-top: 9vw;
  font: 400 clamp(28px, 3.2vw, 50px)/1.14 var(--serif);
  text-wrap: balance;
}

/* ---------- 06 Climax: large embrace, small italic caption ---------- */

.climax {
  padding: 0 0 clamp(64px, 7vw, 110px);
}
.climax .section-id {
  padding: 0 var(--gutter) clamp(20px, 2.4vw, 34px);
}
.climax-figure {
  display: grid;
  grid-template-columns: 28% 45% 1.5% 18% 1fr;
  align-items: end;
}
.climax-photo {
  grid-column: 2;
  --rot: 0.35deg;
}
.climax-figure figcaption {
  grid-column: 4;
  margin-bottom: 22%;
  max-width: 11em;
  font: italic 400 clamp(18px, 1.55vw, 24px)/1.25 var(--serif);
}

/* ---------- 07 About: portrait beside short copy, tinted band ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, min(21vw, 340px)) minmax(0, 34rem);
  justify-content: center;
  align-items: center;
  gap: clamp(32px, 5.2vw, 84px);
  padding: clamp(64px, 6vw, 96px) 7%;
  background: var(--paper-band);
}
.portrait img { aspect-ratio: 2 / 3; object-position: 50% 30%; }
.about .section-id { margin-bottom: 18px; }
.about h2 {
  margin-bottom: 0.5em;
  font: 400 clamp(36px, 4vw, 60px)/1.02 var(--serif);
  letter-spacing: -0.01em;
}
.about-copy > p:not(.section-id) {
  font: 400 clamp(19px, 1.75vw, 27px)/1.3 var(--serif);
  text-wrap: pretty;
}
/* keeps a short sentence on one line, so a wrapping paragraph breaks between sentences */
.nobr { white-space: nowrap; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.15em;
  min-height: 44px;
  margin-top: 14px;
  font: 700 12px/1 var(--ui);
  letter-spacing: 0.06em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
}

/* ---------- 08 Contact: high-contrast close ---------- */

.contact {
  margin: clamp(56px, 6vw, 96px) var(--gutter) var(--gutter);
  padding: clamp(56px, 6.6vw, 100px) 7% clamp(56px, 6.6vw, 100px);
  background: var(--ink);
  color: var(--on-dark);
}
.contact :focus-visible { outline-color: var(--on-dark); }
.contact .section-id {
  margin-bottom: clamp(28px, 3vw, 45px);
  color: var(--on-dark-muted);
  font-size: 12px;
}
.contact-word {
  font: var(--display-weight) clamp(60px, 10.5vw, 170px)/0.86 var(--display);
  font-stretch: var(--display-stretch);
  letter-spacing: -0.03em;
  word-spacing: 0.1em;
  overflow-wrap: anywhere;
}
/* French "VOUS ?": word-spacing does not widen the narrow no-break space, so the mark gets a
   margin; an inline margin adds no line-break opportunity. */
.contact-word .punct { margin-left: 0.1em; }
.contact-intro {
  max-width: 30em;
  text-wrap: pretty;
  margin: clamp(26px, 2.6vw, 38px) 0;
  font: 400 clamp(19px, 1.7vw, 25px)/1.3 var(--serif);
}
.email {
  display: inline-block;
  padding: 10px 0 8px;
  border-bottom: 1px solid currentColor;
  color: var(--on-dark);
  font: 400 clamp(22px, 3.8vw, 56px)/1.15 var(--serif);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.email:hover { color: #ddcbbc; }
.email .arrow { stroke-width: 1; }
.contact-alt { margin-top: clamp(22px, 2.4vw, 34px); }
.contact-alt a {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  min-height: 44px;
  color: var(--on-dark-muted);
  font: 500 14px/1.2 var(--ui);
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}
.contact-alt a:hover { color: var(--on-dark); }

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  padding: 8px var(--gutter) 30px;
  font: 500 11px/1.3 var(--ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0 22px; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  min-height: 44px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

/* ---------- Contact page ---------- */

.contact--page { margin-top: clamp(20px, 3vw, 44px); }
.form-section {
  padding: clamp(48px, 6vw, 96px) var(--gutter) clamp(56px, 7vw, 110px);
}
.form-wrap {
  max-width: 820px;
  margin-left: clamp(0px, 7vw, 132px);
}
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px 32px;
}
.field { display: grid; gap: 8px; align-content: start; }
.field--remember,
.field--message { grid-column: 1 / -1; }
.field label {
  font: 600 15px/1.3 var(--ui);
  letter-spacing: 0.01em;
}
.field--remember label {
  font: 400 clamp(26px, 2.6vw, 38px)/1.15 var(--serif);
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: 4px;
  text-wrap: pretty;
}
.optional {
  font-weight: 400;
  color: var(--muted);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid rgba(23, 23, 21, 0.55); /* >= 3:1 on the field and the page (WCAG 1.4.11) */
  border-radius: 0;
  background: var(--print);
  color: var(--ink);
  font: 400 19px/1.4 var(--serif);
  appearance: none;
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.field--remember textarea { min-height: 150px; }
.contact-form input:hover,
.contact-form textarea:hover { border-color: var(--ink); }
.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
  border-color: var(--ink);
}
.contact-form [aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: inset 0 0 0 1px var(--error);
}
.field-error {
  color: var(--error);
  font: 500 14px/1.35 var(--ui);
}
.field-error:empty { display: none; }
.contact-form button {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 56px;
  margin-top: 6px;
  padding: 0 30px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font: 700 12px/1 var(--ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.contact-form button:hover { background: #46413a; }
.contact-form button[aria-busy="true"],
.contact-form.htmx-request button,
.contact-form button.htmx-request {
  background: #46413a;
  cursor: progress;
  opacity: 0.8;
}
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.contact-status { margin-top: 24px; }
.contact-status:empty { display: none; }
/* Focused by contact.js only for errors that name no field; the ring shows where focus went. */
.contact-status:focus { outline: 2px solid var(--ink); outline-offset: 4px; }
.form-error {
  max-width: 36em;
  padding: 14px 18px;
  border-left: 3px solid var(--error);
  background: var(--print);
  color: var(--ink);
  font: 400 18px/1.4 var(--serif);
}
.contact-success {
  padding: 28px 0 8px;
  border-top: 1px solid var(--ink);
  font: 400 clamp(26px, 2.8vw, 40px)/1.2 var(--serif);
  text-wrap: pretty;
}
.contact-success:focus { outline: none; }
.contact-success:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }

.form-privacy {
  grid-column: 1 / -1;
  max-width: 40em;
  color: var(--muted);
  font: 400 15px/1.45 var(--serif);
}
.form-privacy a { color: var(--ink); text-underline-offset: 3px; }

/* ---------- Legal notice ---------- */

.legal {
  max-width: 40rem;
  padding: clamp(40px, 6vw, 96px) var(--gutter) clamp(56px, 7vw, 110px);
  margin-left: clamp(0px, 9vw, 160px);
}
.legal h1 {
  margin-bottom: 0.6em;
  font: 400 clamp(36px, 4vw, 60px)/1.05 var(--serif);
  letter-spacing: -0.01em;
}
.legal section { margin-top: clamp(28px, 3vw, 40px); }
.legal h2 {
  margin: 0 0 10px;
  font: 600 12px/1.3 var(--ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.legal section p {
  font: 400 18px/1.5 var(--serif);
  text-wrap: pretty;
}
.legal section p + p { margin-top: 0.6em; }
.legal a { overflow-wrap: anywhere; text-underline-offset: 3px; }

/* ---------- Thank-you page (no-JS form, after a successful send) ---------- */

/* The page is short: main grows so the footer sits at the bottom of the viewport. */
body.page-thanks {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}
.thanks-main { flex: 1 0 auto; }
.thanks {
  max-width: 40rem;
  padding: clamp(40px, 6vw, 96px) var(--gutter) clamp(56px, 7vw, 110px);
  margin-left: clamp(0px, 9vw, 160px);
}
.thanks .section-id { margin-bottom: clamp(20px, 2.4vw, 32px); }
.thanks h1 {
  margin-bottom: 0.7em;
  font: 400 clamp(32px, 4vw, 56px)/1.12 var(--serif);
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

/* ---------- Motion hooks (src/js/held.js) ---------- */

html.js.motion-ok [data-settle] {
  transition:
    translate 700ms var(--ease-settle),
    rotate 700ms var(--ease-settle);
}
html.js.motion-ok [data-settle]:not(.is-settled) {
  translate: 0 calc(12px * var(--motion-scale));
  rotate: calc(var(--rot, 0deg) * var(--rot-scale) + 0.6deg * var(--motion-scale));
}

/* ---------- Tablet: 700–1099px ---------- */

@media (max-width: 1099.98px) {
  :root { --motion-scale: 0.7; }

  /* landscape tablets keep the heading beside the photograph, with a little more room for it */
  .hero { grid-template-columns: 31% 58% 1fr; }

  .pair { grid-template-columns: 4% 47% 33% 1fr; }
  .pair-b { margin-top: 9vw; }

  .details { grid-template-columns: 8% 24% 16% 44% 1fr; }
  .detail-small { margin-top: 5vw; }
  .note { margin-left: 30%; margin-top: 0.4em; }

  .play { grid-template-columns: 4% 54% 0% 38% 1fr; }
  .play-word { font-size: 9.4vw; }
  .play-black {
    width: calc(100% + 3vw);
    margin-left: -3vw;
    margin-top: 7vw;
  }

  .release-photo { width: 92%; }
  .release-photo img { aspect-ratio: 4 / 3; }

  .observation { grid-template-columns: 9% 36% 8% 40% 1fr; }
  /* uses the spare right column so the line keeps its two-line shape from 700px */
  .observation-line { grid-column: 4 / -1; margin-top: 12vw; padding-right: var(--gutter); }

  .climax-figure { grid-template-columns: 20% 54% 2% 20% 1fr; }
  .climax-figure figcaption { margin-bottom: 14%; }

  .about { grid-template-columns: minmax(0, 26vw) minmax(0, 30rem); }
}

/* ---------- Hero, stacked: portrait tablets and anything narrower than 900px ----------
   Landscape tablets from 900px keep the desktop composition (heading beside the photograph). */

@media (max-width: 899.98px), (max-width: 1099.98px) and (orientation: portrait) {
  .hero {
    grid-template-columns: 8% 78% 1fr;
    grid-template-rows: auto;
  }
  .hero .section-id { grid-column: 1 / -1; padding: 0 var(--gutter) clamp(14px, 2vw, 22px); }
  .hero-photo { grid-column: 2; grid-row: 2; width: auto; }
  .hero-photo img { aspect-ratio: 1.2; }
  .hero-title {
    grid-column: 2;
    grid-row: 3;
    align-self: start;
    padding: clamp(24px, 3.6vw, 36px) 0 0;
    font-size: clamp(19px, 2.6vw, 23px);
  }
  .hero-name { font-size: clamp(26px, 3.8vw, 34px); }
  .scroll-cue { grid-column: 2 / -1; grid-row: 3; }
}

/* ---------- Mobile: < 700px ---------- */

@media (max-width: 699.98px) {
  :root {
    --header-h: 60px;
    --rot-scale: 0.6;
    --motion-scale: 0.45;
    --touch: 0px;
  }

  .site-header { padding: 0 max(12px, 3.5vw); gap: 8px; }
  .brand { flex-direction: column; align-items: flex-start; gap: 3px; padding-block: 8px; }
  .brand strong { font-size: 13px; }
  .brand small { font-size: 8.5px; }
  .site-nav { gap: 4px; }
  .nav-link { display: none; }
  .language a { min-height: 44px; font-size: 10.5px; }
  .write { padding: 0 11px; font-size: 10px; letter-spacing: 0.08em; }

  .section-id { font-size: 10px; }

  /* 7% left, 3% right: the photograph's right edge meets the header's, its left edge the heading's */
  .hero {
    grid-template-columns: 7% 90% 1fr;
    padding-top: 18px;
    padding-bottom: 64px;
  }
  .hero .section-id { padding: 0 7% 12px; }
  .hero-photo img { aspect-ratio: 1.05; }
  /* the narrower measure leaves the cue its own corner on the heading's last line */
  .hero-title {
    grid-column: 1 / -1;
    padding: 22px 26% 0 7%;
    font-size: clamp(17px, 5vw, 20px);
  }
  .hero-name { font-size: clamp(23px, 6.8vw, 28px); }
  .scroll-cue { grid-column: 1 / -1; padding-right: max(12px, 3.5vw); }

  .pair { grid-template-columns: 4% 36% 47% 10% 1fr; padding-bottom: 0; }
  .pair .section-id { padding-inline: 5%; }
  .pair-a { grid-column: 2 / 4; }
  .pair-b {
    grid-column: 3 / 5;
    grid-row: 3;
    width: 100%;
    margin: -9vw 0 0;
    padding: 4px;
  }

  .silence { min-height: clamp(380px, 64vh, 560px); padding-inline: 7%; }
  .silence p { font-size: clamp(21px, 6.3vw, 28px); } /* keeps two lines down to 320px */

  .details { grid-template-columns: 5% 21% 19% 51% 1fr; padding-bottom: 72px; }
  .details .section-id { padding-inline: 5%; }
  .detail-small { grid-column: 2 / 4; margin-top: 4px; }
  .detail-small .print { padding: 4px; }
  .note { margin: 0.7em 0 0 48%; font-size: 17px; }
  .detail-large { grid-column: 3 / 5; grid-row: 3; margin-top: 10px; }

  .play {
    grid-template-columns: 4% 38% 40% 14% 1fr;
    padding-bottom: 64px;
  }
  .play .section-id { padding-inline: 5%; padding-bottom: 20px; }
  .play-word {
    grid-column: 2 / -1;
    margin: 0;
    font-size: 16.5vw;
  }
  html[lang="fr"] .play-word { font-size: 19vw; }
  .play-black {
    grid-column: 3 / 5;
    grid-row: 3;
    width: 100%;
    margin: 9vw 0 0;
  }
  .play-running {
    grid-column: 2 / 4;
    grid-row: 4;
    margin-top: -7vw;
  }

  .release { padding: 64px 0 40px; }
  .release-photo { width: 92%; }

  .observation { grid-template-columns: 6% 13% 69% 1fr; padding-bottom: 72px; }
  .observation .section-id { padding-inline: 5%; padding-bottom: 22px; }
  .observation-line {
    grid-column: 2 / 4;
    grid-row: 2;
    margin: 0 0 clamp(48px, 16vw, 80px);
    font-size: clamp(24px, 7.6vw, 32px); /* "qu’on remarque à peine." fits one line at 320px */
  }
  .observed { grid-column: 3; grid-row: 3; }

  .climax { padding-bottom: 72px; }
  .climax .section-id { padding-inline: 5%; }
  .climax-figure { grid-template-columns: 5% 86% 1fr; }
  .climax-figure figcaption {
    grid-column: 2;
    justify-self: end;
    margin: 26px 2% 0 0;
    font-size: 18px;
    text-align: right;
  }

  .about { display: block; padding: 60px 8% 76px; }
  .portrait { width: 42%; margin-bottom: 40px; }
  .about h2 { font-size: clamp(32px, 9.6vw, 40px); }
  .about-copy > p:not(.section-id) { font-size: clamp(19px, 5.4vw, 22px); }

  .contact { margin: 0 3% 3%; padding: 64px 7% 60px; }
  .contact .section-id { margin-bottom: 32px; }
  .contact-word { font-size: clamp(54px, 18vw, 96px); }
  .contact-intro { font-size: clamp(18px, 5.2vw, 21px); }
  .email { font-size: clamp(17px, 5.6vw, 28px); line-height: 1.45; }

  .site-footer { display: block; padding: 18px 5% 28px; font-size: 10px; }
  .site-footer p { margin: 8px 0 2px; }

  .contact--page { margin-top: 12px; }
  .form-wrap { margin-left: 0; }
  .contact-form { grid-template-columns: 1fr; gap: 26px; }
  .contact-form button { width: 100%; justify-content: center; }
}

/* English silence line: the mockup break holds down to 320px; below that, balance decides.
   French breaks are plain <br> (build-pages.mjs, COPY.fr.softBreaks). */
@media (max-width: 319.98px) {
  .soft-br { display: none; }
}

@media (max-width: 359.98px) {
  .site-header { gap: 6px; }
  .brand strong { font-size: 12px; letter-spacing: -0.03em; }
  .write { padding: 0 5px; letter-spacing: 0.04em; }
}

/* ---------- Hero, landscape phones (and any very short landscape window) ----------
   Stacked, the photograph would be taller than the screen and the heading far below the fold:
   photograph and heading sit side by side instead, the cue top right on the header's gutter. */

@media (orientation: landscape) and (max-height: 520px) {
  .hero {
    grid-template-columns: 8% auto 1fr;
    grid-template-rows: auto 1fr auto;
  }
  .hero .section-id { grid-column: 1 / -1; grid-row: 1; padding: 0 var(--gutter) 12px; }
  .hero-photo {
    grid-column: 2;
    grid-row: 2 / 4;
    width: calc((100vh - var(--header-h) - 72px) * 1.2);
    width: calc((100svh - var(--header-h) - 72px) * 1.2);
  }
  .hero-photo img { aspect-ratio: 1.2; }
  .hero-title {
    grid-column: 3;
    grid-row: 3;
    align-self: end;
    padding: 0 var(--gutter) 0 24px;
  }
  .scroll-cue { grid-column: 3; grid-row: 2; align-self: start; }
}

/* ---------- Reduced motion, print ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .site-header { position: static; }
  .skip-link, .scroll-cue { display: none; }
  [data-drift],
  [data-settle] {
    translate: none !important;
    rotate: calc(var(--rot, 0deg) * var(--rot-scale)) !important;
    transition: none !important;
  }
  .contact { background: none; color: var(--ink); border: 1px solid var(--ink); }
  .email { color: var(--ink); }
}
