/* Clark Renders — showcase homepage (index.html). (Earlier drafts are kept outside the site, in _drafts/site-old.)
   Type: Instrument Sans Bold throughout, Instrument Serif italic for one word at a time,
   the logo lockup in its own faces. Sizes follow the grndwrk scale (14 / 28 / 43 px at 1440 wide). */

:root {
  --paper: #f3f1ea;
  --ink: #15140f;
  --soft: #6e6a5f;   /* grey labels: 4.8:1 on the paper, meeting the accessibility standard for small text */
  --line: #d3cec2;
  --plate: #e4e0d5;
  --scrim: rgba(12, 11, 9, 0.62);
  --pad: 16px;                         /* grndwrk keeps a fixed 16px edge at every size */
  --gap: 16px;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --fs-small: clamp(11px, 0.97vw, 14px);  /* labels: 14px from 1440 up, as grndwrk */
  --fs-state: clamp(18px, 1.95vw, 28px);  /* tagline: 28px from 1440 up */
  --fs-big: clamp(26px, 3vw, 56px);       /* names: 3% of the width, up to 56px */
  --fs-intro: clamp(15px, 1.15vw, 18px);  /* the one-sentence introductions under page titles (Services, About) */
  --fs-body: clamp(14px, 1.1vw, 17px);    /* running text: service descriptions, the About biography */
  --nw: calc(var(--fs-small) * 3);        /* the indent text starts at, under the page title, past the small numbers */
  --indent-1: 4.6em;   /* name column, in small-text ems (room for "Project" plus a small gap) */
  --indent-2: 11.6em;  /* second-row value column */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-move: cubic-bezier(0.25, 0.2, 0, 1);
}
/* dark: the deep grey grndwrk uses (#1D1E20), with near-white text and soft grey labels */
:root[data-theme="dark"] {
  --paper: #1d1e20;
  --ink: #f6f5f1;
  --soft: #a4a4a5;
  --line: #333438;
  --plate: #26272a;
  --scrim: rgba(0, 0, 0, 0.5);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-weight: 700; font-stretch: 92%;
  text-transform: uppercase; line-height: 1.15;
  -webkit-font-smoothing: antialiased;
  transition: background-color 500ms ease, color 500ms ease;
}
::selection { background: var(--ink); color: var(--paper); }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; text-transform: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.skip { position: absolute; left: var(--pad); top: -100px; background: var(--ink); color: var(--paper); padding: 10px 14px; z-index: 50; }
.skip:focus { top: 10px; }
.t-small { font-size: var(--fs-small); line-height: 1.1; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; text-transform: none; font-stretch: 100%; }

/* ---------- desktop stage: one screen, no page scroll ---------- */
.stage {
  display: grid; grid-template-columns: minmax(0, 1fr) var(--colw);
  column-gap: var(--gap); padding-inline: var(--pad);
  height: 100vh; height: 100svh; overflow: hidden;
}
html.track-mode, html.track-mode body { overflow: hidden; height: 100%; }

.panel { display: flex; flex-direction: column; justify-content: space-between; padding: var(--pad) 0; min-width: 0; }

/* identity */
.ident { position: relative; z-index: 30; }
.ident-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
/* the logo set in type: heavy "clark." with normal spacing (letters never touch),
   the italic serif "r", and a light "enders" */
/* Sizing follows grndwrk's proportions at every width: their wordmark is about 6% of the
   screen width tall and sits tight to the top edge, with the tagline tucked just under it,
   starting about a third of the way across the wordmark. --logo drives all three. */
:root { --logo: max(46px, 7.6vw); }
.mark {
  display: block; width: max-content; max-width: 100%;
  font-family: "Inter Tight", var(--sans); text-transform: none; font-stretch: 100%;
  font-size: var(--logo); font-weight: 300;
  letter-spacing: -0.02em; line-height: 0.74; white-space: nowrap;
  margin: calc(var(--logo) * -0.035) 0 0 -0.04em; /* pull the tops of the letters up to the page edge */
}
.mark b { font-weight: 800; letter-spacing: -0.012em; }
.mark i { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.2em; letter-spacing: 0; margin-left: 0.01em; }
/* ?logo=file: the logo image (media/logo.png), as a mask so it takes the text colour */
html[data-logo="file"] .mark {
  width: min(100%, 52vw); aspect-ratio: 1590 / 206; margin-left: 0;
  background: currentColor;
  -webkit-mask: url(media/logo.png) no-repeat left center / contain;
          mask: url(media/logo.png) no-repeat left center / contain;
}
html[data-logo="file"] .mark .mk { visibility: hidden; }
.controls { display: none; } /* phones only; desktop uses the menu above the films */
.menu-btn { display: inline-flex; align-items: center; gap: 8px; padding: 2px 0; }
.plus { position: relative; width: 10px; height: 10px; transition: transform 420ms var(--ease-out); }
.plus::before, .plus::after { content: ""; position: absolute; left: 0; top: 4px; width: 10px; height: 2px; background: currentColor; }
.plus::after { transform: rotate(90deg); }
.menu-btn[aria-expanded="true"] .plus { transform: rotate(45deg); }
.theme { color: var(--soft); padding: 2px 0; }
@media (hover: hover) and (pointer: fine) { .theme:hover { color: var(--ink); } }

.statement {
  /* tucked under the logo, starting a third of the way across it, as grndwrk's does */
  /* starts under the dot of "clark." and runs right across to the films, as grndwrk's does:
     a long first line, a shorter second */
  margin: calc(var(--logo) * 0.12) 0 0 calc(var(--logo) * 2.3);
  max-width: none;
  font-size: var(--fs-state); line-height: 1; letter-spacing: -0.005em;
}
.statement em { font-size: 1.16em; letter-spacing: -0.01em; }

/* the project showing */
.now { font-size: var(--fs-small); }
.now-time { color: var(--soft); margin: 0 0 1.1em var(--indent-1); font-variant-numeric: tabular-nums; }
.row { display: grid; align-items: baseline; }
.r1 { grid-template-columns: var(--indent-1) minmax(0, 1fr) auto; }
.r2 { grid-template-columns: var(--indent-1) calc(var(--indent-2) - var(--indent-1)) minmax(0, 1fr); }
.r2 .lab { grid-column: 2; }
.r2 .big { grid-column: 3; }
.lab { color: var(--soft); }
.big { font-size: var(--fs-big); letter-spacing: -0.025em; }
.count { color: var(--soft); padding-left: 16px; font-variant-numeric: tabular-nums; }
.now-foot { margin: 2.6em 0 0 var(--indent-1); display: grid; gap: 1.4em; justify-items: start; }
.desc { color: var(--soft); max-width: 27em; line-height: 1.2; min-height: 3.6em; }
.view { border-bottom: 2px solid currentColor; padding-bottom: 2px; }
@media (hover: hover) and (pointer: fine) { .view:hover { color: var(--soft); } }

/* spacing learnt from grndwrk: more air around the project, the description as wide as the names,
   the small labels hanging from the tops of the big words, and the time set apart, starting on the
   same line as the tagline above */
.row { align-items: start; }
.lab, .count { padding-top: calc(var(--fs-big) * 0.13); }
.now-time { margin: 0 0 3.4em calc(var(--logo) * 2.3); }
.now-foot { margin-top: 4.2em; gap: 2.4em; }
.desc { max-width: 40em; min-height: 0; }
/* what was commissioned, listed quietly straight under the description in the same grey, so it doesn't
   pull the eye; the pair keep room for two lines of description so "View project" never jumps */
.desc-wrap { min-height: 4.1em; }
.comm { margin: 0.45em 0 0; color: var(--soft); line-height: 1.2; }
.comm[hidden] { display: none; }

/* ---------- large text: rolls one line (timings measured on grndwrk.studio) ----------
   Scrolling down, the old name lifts one line and fades out as the new one rises into
   its place; scrolling up, the reverse. It only ever moves one line, contained in the
   line's own space: the lines either side are invisible. */
/* the line is a window: text moving out of it is cut off at its edges, as on grndwrk
   (their .text_reel has overflow: hidden at exactly one line high). A little room is
   left above the capitals so accents such as the À in Tràigh are not clipped. */
.reel {
  display: block; position: relative; --lh: 0.86em; --head: 0.16em;
  height: calc(var(--lh) + var(--head)); padding-top: var(--head); margin-top: calc(var(--head) * -1);
  overflow: hidden;
}
.reel-list { display: block; transition: transform 600ms cubic-bezier(0.25, 0.2, 0, 1); will-change: transform; }
.reel-item {
  display: block; height: var(--lh); line-height: var(--lh); white-space: nowrap;
  opacity: 0; filter: blur(2px);
  transition: opacity 350ms cubic-bezier(0.7, 0.2, 0, 1), filter 350ms cubic-bezier(0.7, 0.2, 0, 1);
}
.reel-item.on { opacity: 1; filter: blur(0); }
.count.reel { --lh: 1.1em; }

/* smaller text: changes almost at once, with a short fade, and does not move */
.slide { display: inline-block; transition: opacity 400ms cubic-bezier(0.25, 0.2, 0, 1); }
.slide.out { opacity: 0; transition-duration: 100ms; }
.desc.slide { display: block; }

/* bottom of the panel */
.panel-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
/* Next / Prev step in like the names above: Prev starts where Next's project name starts */
.steps { display: grid; grid-template-columns: auto auto 1fr; column-gap: 0.4em; row-gap: 3px; }
.step { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; justify-items: start; text-align: left; }
.step span { display: inline-block; color: var(--soft); }
#n-next span { grid-column: 1; } #n-next b { grid-column: 2 / -1; }
#n-prev span { grid-column: 2; } #n-prev b { grid-column: 3; }
@media (hover: hover) and (pointer: fine) { .step:hover b { color: var(--soft); } }
.step b { font-weight: inherit; }
.enquire { display: inline-flex; align-items: center; gap: 6px; }
.enquire svg { width: 0.9em; height: 0.9em; transition: transform 320ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .enquire:hover svg { transform: translate(2px, -2px); } }

/* ---------- right column: menu along the top, then the films ---------- */
.col { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.topnav {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--pad) 0 calc(var(--pad) * 0.9);
}
.topnav a, .topnav button { padding: 3px 0; position: relative; }
.topnav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform 320ms var(--ease-out);
}
.topnav a[aria-current="page"]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) { .topnav a:hover::after { transform: scaleX(1); } }

/* ---------- the track ---------- */
.track { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.item { position: absolute; left: 0; right: 0; top: 0; transition: transform 600ms var(--ease-move); will-change: transform; }
.item.no-anim { transition: none; }
.frame { position: relative; display: block; aspect-ratio: var(--ar, 16 / 9); overflow: hidden; background: var(--plate); }
.frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
.scrim { display: none; }
.info { display: none; }
.phone-end { display: none; }

/* ---------- the menu ----------
   A panel slides in over the right half of the screen (over the films), right beside the Menu
   button; the rest of the page fades right back, the logo and the button stay where they are.
   Clicking anywhere outside the words closes it (menu.js). */
.sheet {
  /* the panel's edge lines up with the left edge of the films, a divide the tagline never crosses */
  position: fixed; inset: 0 0 0 auto; width: calc(var(--colw) + var(--gap) + var(--pad)); z-index: 20;
  background: var(--paper);
  display: flex; flex-direction: column; justify-content: center;
  padding: 80px clamp(24px, 3.4vw, 64px) var(--pad);
  border-left: 1px solid var(--line);
  /* the whole panel slides in, so its line sweeps across first rather than appearing last */
  transform: translateX(100%);
  transition: transform 560ms cubic-bezier(0.22, 1, 0.36, 1), background-color 500ms ease;
  will-change: transform;
}
.sheet.is-open { transform: none; }
/* homepage on a computer: the edge sits exactly on the left edge of the films */
html.track-mode .sheet { width: calc(var(--colw) + var(--pad)); }
.sheet[hidden] { display: none; }
/* the fade: a layer of paper over the page, under the logo, the Menu button and the menu */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 15; background: var(--paper);
  opacity: 0; pointer-events: none; transition: opacity 450ms var(--ease-out);
}
html:has(.menu-btn[aria-expanded="true"]) body::after { opacity: 0.97; pointer-events: auto; }
.sheet-nav { display: grid; justify-items: start; }
.sheet-nav a {
  display: flex; align-items: baseline; gap: 0.35em;
  /* a size down from the logo, so the menu never outweighs it */
  font-size: clamp(34px, 4.4vw, 76px); line-height: 0.92; letter-spacing: -0.025em;
  padding: 0.04em 0;
  opacity: 0; transform: translateX(24px);
  transition: opacity 380ms ease, transform 560ms var(--ease-out), color 200ms ease;
}
.sheet-nav a[aria-current="page"] { color: var(--soft); }   /* where you are now */
.sheet-nav:focus { outline: none; }
.sheet.is-open .sheet-nav a { opacity: 1; transform: none; }
.sheet.is-open .sheet-nav a:nth-child(2) { transition-delay: 40ms; }
.sheet.is-open .sheet-nav a:nth-child(3) { transition-delay: 80ms; }
.sheet.is-open .sheet-nav a:nth-child(4) { transition-delay: 120ms; }
.sheet.is-open .sheet-nav a:nth-child(5) { transition-delay: 160ms; }
@media (hover: hover) and (pointer: fine) {
  .sheet-nav:hover a { color: var(--soft); }
  .sheet-nav a:hover { color: var(--ink); }
}
.sheet-foot {
  position: absolute; left: clamp(24px, 3.4vw, 64px); right: var(--pad); bottom: var(--pad);
  display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 14px; border-top: 1px solid var(--line);
}
/* where the studio is (two lines), then after a half-line pause the copyright, small and muted at the
   right of the footer row */
.sheet-meta { margin-left: auto; display: grid; justify-items: end; gap: 4px; color: var(--soft); text-align: right; }
.sheet-meta .sm-c { margin-top: 0.55em; }
/* section numbers: a small editorial detail at the panel's right-hand edge, level with the top of each word */
.sheet-nav { justify-items: stretch; }
.sheet-nav a { justify-content: space-between; }
.sheet-nav a .sn-n {
  align-self: flex-start; margin: 0.6em 0 0 0.45em;
  font-size: var(--fs-small); line-height: 1; letter-spacing: 0.02em; color: var(--soft);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 900px) {
  .sheet { width: 82vw; padding: 80px 24px var(--pad); }
  .sheet-foot { left: 24px; }
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* the logo and tagline don't rise in: the opening, the page fade and the logo's glide between pages
     already bring them in, and a rise here made them jump (on every inner page, and again as the
     opening finished, when its own fade was removed and this one restarted) */
  .topnav { animation: rise 900ms var(--ease-out) 100ms both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .item, .reel-list, .reel-item, .slide, .sheet, .sheet-nav a { transition: none !important; }
}

/* ---------- tablet + phone: one screen, the films in a sideways row (as grndwrk on a phone) ----------
   Logo and tagline at the top; the project name and architect above a row of films with the
   current one centred and the next peeking in; the description below; the counter at the
   bottom centre and the menu bottom-right. Swipe sideways (or up and down) to move. */
@media (max-width: 900px) {
  html.swipe-mode, html.swipe-mode body { overflow: hidden; height: 100%; }
  :root { --fs-big: clamp(22px, 6.2vw, 34px); --fs-small: 11px; --fs-state: clamp(13px, 3.7vw, 17px); --fs-intro: 13.5px; --fs-body: 14px; --filmw: 72vw; }
  .stage {
    display: grid; grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto 1fr auto auto auto auto auto 1fr auto;
    height: 100vh; height: 100svh; overflow: hidden; touch-action: none;
    padding: var(--pad) var(--pad) 44px; /* room at the bottom for the counter */
  }
  .panel, .ident, .now, .col { display: contents; }
  .ident-top { grid-row: 1; position: relative; z-index: 30; } /* the logo stays above the menu's fade */
  /* phones: the logo the same size as on every other page, Menu and Dark in the top-right corner */
  .mark { --logo: clamp(40px, 4.4vw, 84px); font-size: var(--logo); margin-top: calc(var(--logo) * -0.035); }
  html[data-logo="file"] .mark { width: 100%; }
  .statement { grid-row: 2; margin: 10px 0 0; max-width: none; font-size: var(--fs-state); line-height: 1.05; }
  .now-time { grid-row: 4; margin: 0 0 10px var(--indent-1); }
  .r1 { grid-row: 5; grid-template-columns: var(--indent-1) minmax(0, 1fr); }
  .r2 { grid-row: 6; }
  .track { grid-row: 7; position: relative; height: calc(var(--filmw) * 9 / 16); margin: 16px 0; overflow: visible; }
  .now-foot { grid-row: 8; margin: 0 0 0 var(--indent-1); gap: 12px; }
  .desc { min-height: 0; max-width: 34em; }
  .desc-wrap { min-height: 0; }
  .panel-foot, .topnav, .info, .phone-end { display: none; }
  /* the films: absolutely placed side by side; the script centres the current one */
  .item { width: var(--filmw); right: auto; }
  /* counter bottom centre; Menu and Dark top-right, where they are on every page */
  .count { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); padding: 0; z-index: 25; }
  .count.reel { height: 1.1em; }
  .controls {
    display: flex; position: relative; z-index: 30;
    flex-direction: column; align-items: flex-end; gap: 6px; padding-top: 4px;
  }
  .sheet-nav a { flex-direction: row; }
  .sheet-meta { margin-left: 0; width: 100%; justify-items: start; text-align: left; }
}

/* =====================================================================
   MENU POSITION OPTIONS — switch with draft-cycle.html?nav=1 … 4
   (no ?nav = the current version: menu across the top of the films)
   In every option the films run the full height of the screen.
   ===================================================================== */
:root { --colw: max(320px, 36vw); } /* films keep their share of the width on big screens */
@media (min-width: 901px) {
  .stage { position: relative; grid-template-columns: minmax(0, 1fr) var(--colw); }
  html[data-nav] .topnav { position: absolute; z-index: 5; padding: 0; animation: none; }
  html[data-nav] .col { height: 100%; }

  /* 1 — a thin row above the logo, over the text side only */
  html[data-nav="1"] .topnav { top: var(--pad); left: var(--pad); right: calc(var(--pad) + var(--colw) + var(--gap)); justify-content: flex-start; gap: 2.2em; }
  html[data-nav="1"] .topnav .theme { margin-left: auto; }
  html[data-nav="1"] .panel { padding-top: calc(var(--pad) + 2.6em); }

  /* 2 — a stacked list beside the logo, larger and spaced out */
  html[data-nav="2"] .topnav { top: var(--pad); right: calc(var(--pad) + var(--colw) + var(--gap)); flex-direction: column; align-items: flex-end; gap: 0.35em; font-size: clamp(12px, 1.05vw, 16px); }
  html[data-nav="2"] .topnav .theme { margin-top: 0.6em; }
  html[data-nav="2"] .mark { max-width: calc(100% - 8.5rem); }

  /* 3 — along the bottom of the text side, with Next / Prev */
  html[data-nav="3"] .topnav { bottom: var(--pad); right: calc(var(--pad) + var(--colw) + var(--gap)); gap: 2em; }
  html[data-nav="3"] .panel-foot .enquire { display: none; }

  /* 4 — one Menu button beside the logo, opening the full-screen menu */
  html[data-nav="4"] .topnav { display: none; }
  html[data-nav="4"] .controls { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding-top: 4px; }
  html[data-nav="4"] .mark { max-width: calc(100% - 6rem); }
}
@media (min-width: 901px) { html[data-nav="2"] .statement { margin-right: 8.5rem; } }


/* =====================================================================
   OPENING (draft: index.html?intro=a or ?intro=b, add &fresh=1 to replay)
   The logo and tagline open large in the middle, then move up into place
   while the rest of the page appears around them.
   A: darkened first film behind white type · B: plain page background
   ===================================================================== */
/* from the very first frame until the opening is set up: plain background, nothing else */
html.intro:not(.intro-run)::after { content: ""; position: fixed; inset: 0; z-index: 39; background: var(--paper); }
html.intro[data-intro="a"]:not(.intro-run)::after { background: #0d0d0c; }
/* everything except the logo and tagline waits */
html.intro .now, html.intro .panel-foot, html.intro .controls, html.intro .topnav,
html.intro .item, html.intro .phone-end, html.intro .count { opacity: 0; }
.item { transition: transform 600ms var(--ease-move), opacity 500ms ease; }
/* the logo and tagline sit above the background while it runs */
html.intro .ident { z-index: 41; }
html.intro .mark, html.intro .statement { position: relative; z-index: 41; }
html.intro.intro-run .mark, html.intro.intro-run .statement { animation: introIn 700ms cubic-bezier(0.23, 1, 0.32, 1) both; }
html.intro.intro-run .statement { animation-delay: 150ms; }
@keyframes introIn { from { opacity: 0; } to { opacity: 1; } }
/* A: white over the darkened film, turning to the page colour as they move */
html.intro[data-intro="a"] .mark, html.intro[data-intro="a"] .statement { color: #fff; }
html.intro[data-intro="a"].intro-move .mark, html.intro[data-intro="a"].intro-move .statement { color: var(--ink); }

.intro-bg { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.intro-fill { position: absolute; inset: 0; background: var(--paper); transition: opacity 1000ms cubic-bezier(0.65, 0, 0.35, 1); }
html[data-intro="a"] .intro-fill { background: #0d0d0c; opacity: 0.55; }
html.intro-move .intro-fill { opacity: 0; }
.intro-film {
  position: fixed; left: 0; top: 0; width: 100vw; height: 100vh;
  object-fit: cover; display: block; filter: brightness(0.3);
}
.intro-film.lit { filter: brightness(1); }

/* as the logo moves, the films come in; once it has landed, the project details and controls */
html.intro.intro-move .item { opacity: 1; transition: transform 600ms var(--ease-move), opacity 700ms ease 400ms; }
html.intro[data-intro="a"].intro-move .item:first-child { opacity: 0; }
html.intro[data-intro="a"].intro-landed .item:first-child { opacity: 1; transition: none; }
html.intro.intro-landed .now, html.intro.intro-landed .panel-foot, html.intro.intro-landed .controls,
html.intro.intro-landed .topnav, html.intro.intro-landed .count, html.intro.intro-landed .phone-end { opacity: 1; transition: opacity 600ms ease; }
/* skipping: straight to the finished page */
html.intro-skip *, html.intro-skip *::before, html.intro-skip *::after { transition: none !important; animation: none !important; }

/* =====================================================================
   LOGO LETTERING OPTIONS (draft only) — index.html?logov=1 … 4
   All keep "clark." heavy, "enders" light, the dot and the lowercase italic serif r,
   and all are limited by the screen height so the logo cannot dominate a wide screen.
   ===================================================================== */
@media (min-width: 901px) {
  html[data-logov] { --logo: min(7.6vw, 12.5vh); }

  /* 1 — the lettering as first set for the site: tighter spacing throughout */
  html[data-logov="1"] .mark { letter-spacing: -0.035em; }
  html[data-logov="1"] .mark b { letter-spacing: -0.045em; }
  html[data-logov="1"] .mark i { font-size: 1.22em; margin: 0 0.01em 0 0; }

  /* 2 — CLARK. in capitals, renders in lowercase */
  html[data-logov="2"] { --logo: min(7.2vw, 12vh); }
  html[data-logov="2"] .mark b { text-transform: uppercase; letter-spacing: -0.02em; }

  /* 3 — CLARK. and ENDERS in capitals, the italic r kept lowercase */
  html[data-logov="3"] { --logo: min(6.4vw, 10.6vh); }
  html[data-logov="3"] .mark b, html[data-logov="3"] .mark .en { text-transform: uppercase; }
  html[data-logov="3"] .mark b { letter-spacing: -0.02em; }
  html[data-logov="3"] .mark i { font-size: 1.28em; margin: 0 0.015em 0 0.01em; }

  /* 4 — as 3, with ENDERS a touch heavier so the capitals hold together */
  html[data-logov="4"] { --logo: min(6.4vw, 10.6vh); }
  html[data-logov="4"] .mark b, html[data-logov="4"] .mark .en { text-transform: uppercase; }
  html[data-logov="4"] .mark b { letter-spacing: -0.02em; }
  html[data-logov="4"] .mark .en { font-weight: 400; letter-spacing: -0.015em; }
  html[data-logov="4"] .mark i { font-size: 1.28em; margin: 0 0.015em 0 0.01em; }

  html[data-logov="3"] .statement, html[data-logov="4"] .statement { margin-left: calc(var(--logo) * 2.2); }
}


/* ---------- changing page: the logo glides between the homepage's large top-left logo and the small
   centred one on the other pages, while the rest of the page fades across. Chrome, Edge and Safari 18+;
   other browsers simply change page as normal. ---------- */
@view-transition { navigation: auto; }
.mark { view-transition-name: cr-logo; }
::view-transition-group(cr-logo) { animation-duration: 750ms; animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1); }
::view-transition-old(cr-logo), ::view-transition-new(cr-logo) { animation-duration: 750ms; }
::view-transition-old(root) { animation: 300ms ease both crFadeOut; }
::view-transition-new(root) { animation: 500ms ease 150ms both crFadeIn; }
@keyframes crFadeOut { to { opacity: 0; } }
@keyframes crFadeIn { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }

/* ---------- accessibility helpers ----------
   .vh: read by screen readers and search engines, not shown (e.g. the homepage and Work page headings).
   Page titles are real h1 headings that look exactly as before. */
.vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
h1.p-crumb { margin: 0; font-weight: inherit; }
.sheet-foot a[aria-current="page"] { color: var(--soft); }
