/* fakkeldy.ca, in spruce and lichen.
   Began as the tasteskill direction "The pinned poster" (seed 675515014). Since
   November 2026 nothing pins: every section sits in normal flow on one grid,
   one background and one left edge. Every colour lives in the theme tokens below;
   tests/check-site.mjs pins them and their contrast. Type sizes are rem clamps,
   so a reader's own text size still applies. */

/* ── Fonts ─────────────────────────────────────────────── */
/* TikTok Sans is variable in weight (300–900) and width (75–150%). */
@font-face {
  font-family: 'TikTok Sans';
  font-style: normal;
  font-weight: 300 900;
  font-stretch: 75% 150%;
  font-display: swap;
  src: url('/fonts/tiktok-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'TikTok Sans';
  font-style: normal;
  font-weight: 300 900;
  font-stretch: 75% 150%;
  font-display: swap;
  src: url('/fonts/tiktok-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Only downloaded once someone presses Aa. */
@font-face {
  font-family: 'OpenDyslexic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/OpenDyslexic-Regular.woff2') format('woff2');
}

/* ── Tokens ────────────────────────────────────────────── */
/* Spruce (the default, "dark"): bone type on spruce green, one lichen action,
   one moss band. Ratios are against --bg unless noted. */
:root,
:root[data-theme="dark"] {
  --bg: #1C3326;           /* spruce */
  --surface: #24402F;      /* panels */
  --ink: #E4E0CF;          /* 10.23:1, 8.58:1 on --surface */
  --muted: #B4C2A6;        /* 7.23:1, 6.06:1 on --surface */
  --accent: #B5C97A;       /* the one action: lichen, the brightest thing on spruce */
  --accent-ink: #10231A;   /* 9.08:1 on --accent */
  --accent-hover: #C8D992; /* 10.80:1 with --accent-ink */
  --field: #8DAA6C;        /* the moss band */
  --field-ink: #0C1A13;    /* 6.91:1 on --field */
  --field-step: #7A975B;   /* 5.46:1 with --field-ink */
  --field-hover: #728F56;  /* 4.93:1 with --field-ink */
  --duo-dark: #10231A;     /* found photographs, toned spruce to ochre */
  --duo-light: #C79A3E;
  --scrim: #0C1610;        /* the band under text on a map panel */
  --scrim-ink: #E4E0CF;    /* 13.94:1 on --scrim */
  --focus: #E4E0CF;
  color-scheme: dark;
}

/* Bone ("light"): the same proportions, inverted. */
:root[data-theme="light"] {
  --bg: #E4E0CF;
  --surface: #D5D5BF;
  --ink: #10231A;          /* 12.42:1, 11.04:1 on --surface */
  --muted: #364B3A;        /* 7.13:1, 6.34:1 on --surface */
  --accent: #2E5A3B;
  --accent-ink: #F1EEE2;   /* 6.84:1 on --accent */
  --accent-hover: #22462D; /* 9.12:1 with --accent-ink */
  --field: #8DAA6C;
  --field-ink: #0C1A13;
  --field-step: #7A975B;
  --field-hover: #728F56;
  --duo-dark: #364B3A;
  --duo-light: #F3EFE3;
  --scrim: #0C1610;
  --scrim-ink: #E4E0CF;
  --focus: #10231A;
  color-scheme: light;
}

:root {
  --font-text: 'TikTok Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'TikTok Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wide: 112%;
  /* Five sizes do all the work. */
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(3.25rem, 14vw, 8.75rem);
  --margin: 16px;
  --gutter: 16px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --col: calc((100cqw - 2 * var(--margin) - 11 * var(--gutter)) / 12);
}

/* The Aa toggle swaps every face. OpenDyslexic has no width axis. */
:root[data-font="dyslexic"] {
  --font-text: 'OpenDyslexic', sans-serif;
  --font-display: 'OpenDyslexic', sans-serif;
  --wide: 100%;
}

@media (min-width: 48em) {
  :root {
    --wide: 150%;
    --step-display: clamp(4.5rem, 9vw, 8.75rem);
    --margin: 28px;
    --gutter: 24px;
  }

  :root[data-font="dyslexic"] {
    --wide: 100%;
  }
}

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

html {
  background: var(--bg);
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-body);
  font-weight: 400;
  line-height: 1.45;
}

h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
}

p {
  text-wrap: pretty;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 0.16em;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* The width the column maths measures; nothing scrolls sideways. */
.site {
  container-type: inline-size;
  overflow-x: clip;
}

/* The display face: wide, heavy capitals. */
.name,
.section-title,
.panel-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: var(--wide);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1;
  text-wrap: balance;
}

.section-title {
  font-size: var(--step-head);
}

/* ── Hero: the name in two corners ─────────────────────── */
/* Phone and tablet: one composed stack, nothing pinned. */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "name"
    "place"
    "pic1"
    "copy"
    "doors"
    "pic2";
  row-gap: 20px;
  padding: var(--margin) var(--margin) 0;
}

.hero-stage,
.hero-panel,
.hero-pictures {
  display: contents;
}

.name {
  grid-area: name;
  font-size: var(--step-display);
  line-height: 0.85;
}

.name-first,
.name-last {
  display: block;
}

.name-last {
  text-align: right;
}

.place {
  grid-area: place;
  color: var(--muted);
}

.controls {
  position: absolute;
  top: var(--margin);
  right: var(--margin);
  display: flex;
  gap: 8px;
}

/* Without JavaScript the toggles can't work, so they don't appear. */
html:not(.js) .controls {
  display: none;
}

.control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  /* The square is a fixed 44px, so the label stops growing at 20px. */
  font-size: min(1rem, 20px);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.font-toggle[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}

/* The theme button shows the theme you would switch to: a sun on spruce,
   a moon on bone. CSS picks it so it is right on first paint. */
.theme-toggle .icon-moon,
:root[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

.hero-copy {
  grid-area: copy;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.lede {
  font-size: var(--step-lead);
  line-height: 1.3;
  max-width: 30ch;
}

.contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: var(--step-body);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.button:hover {
  background: var(--accent-hover);
}

.note {
  color: var(--muted);
}

.note-more {
  color: var(--muted);
}

/* The address is plain, selectable text; one tap or click selects all of it. */
.address {
  -webkit-user-select: all;
  user-select: all;
  overflow-wrap: anywhere;
}

.doors {
  grid-area: doors;
  padding-top: 8px;
}

.doors-title {
  font-size: var(--step-body);
  font-weight: 600;
  color: var(--muted);
}

.links {
  display: grid;
  gap: 16px;
  margin-top: 12px;
  padding: 0;
  list-style: none;
}

.links a {
  display: grid;
  gap: 2px;
  text-decoration: none;
}

.links .title {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
  text-wrap: pretty;
}

.links a:hover .title {
  text-decoration-thickness: 0.16em;
}

.links .sub,
.studio-note {
  font-size: var(--step-small);
  color: var(--muted);
}

.studio-note {
  margin-top: 20px;
  max-width: 34ch;
}

.hero-picture {
  position: relative;
  margin-inline: calc(-1 * var(--margin));
  overflow: hidden;
}

.hero-picture-1 {
  grid-area: pic1;
  height: 38svh;
}

.hero-picture-2 {
  grid-area: pic2;
  height: auto;
  margin-top: 28px;
}

.hero-picture picture,
.hero-picture .duo {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-picture-1 img {
  object-position: 30% 50%;
}

.hero-picture figcaption,
.panel-fact,
.panel-year {
  font-size: var(--step-small);
}

.hero-picture figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 8px var(--margin);
  background: var(--bg);
  color: var(--ink);
}

/* The geological sheet is a map, so its edges and caption stay visible. */
.hero-picture-2 picture,
.hero-picture-2 img {
  height: auto;
}

.hero-picture-2 img {
  object-fit: contain;
}

.hero-picture-2 figcaption {
  position: static;
}

/* Documentary images keep their source colours and tones. */
.duo {
  position: relative;
  display: block;
  overflow: hidden;
  background: transparent;
}

.documentary img {
  width: 100%;
  height: auto;
}

/* ── Who I am ──────────────────────────────────────────── */
.who {
  padding: 120px var(--margin) 0;
}

/* On phones the heading holds at the top while its three chapters pass. */
.who-pin {
  position: sticky;
  top: 0;
  z-index: 1;
  margin-inline: calc(-1 * var(--margin));
  padding: 12px var(--margin) 10px;
  background: var(--bg);
}

.who-items {
  display: grid;
  gap: 64px;
  margin-top: 40px;
}

/* Every chapter starts on the same left edge; nothing zigzags. */
.chapter {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chapter figure {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.chapter .duo {
  aspect-ratio: 4 / 5;
}

.chapter .duo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chapter figcaption {
  font-size: var(--step-small);
  color: var(--muted);
}

.chapter h3 {
  font-size: var(--step-lead);
  font-weight: 600;
  line-height: 1.2;
}

.chapter p {
  max-width: 34ch;
}

/* ── Maps: full images with captions underneath ───────── */
.maps {
  margin-top: 140px;
}

.maps-intro {
  display: grid;
  gap: 16px;
  padding: 0 var(--margin) 48px;
}

.maps-intro p {
  font-size: var(--step-lead);
  line-height: 1.3;
  max-width: 34ch;
}

.panel {
  display: block;
  margin: 0 auto 40px;
  max-width: 1440px;
  color: var(--ink);
  text-decoration: none;
}

.panel img {
  width: 100%;
  height: auto;
}

.panel-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "title title" "year fact";
  gap: 8px 16px;
  padding: 20px var(--margin);
  background: var(--surface);
}

.panel-title {
  grid-area: title;
  font-size: var(--step-lead);
}

.panel-go {
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

.panel:hover .panel-go,
.panel:focus-visible .panel-go {
  text-decoration-thickness: 0.16em;
}

.panel-year {
  grid-area: year;
  font-variant-numeric: tabular-nums;
}

.panel-year,
.panel-fact {
  font-size: var(--step-small);
}

.panel-fact {
  grid-area: fact;
  text-align: right;
}

/* An interface capture sits inset on its panel, so it reads as a picture
   of the live map, not a map you can type into. */
.panel-ui figure {
  padding: 12px 12px 0;
  background: var(--surface);
}

.map-credits {
  max-width: 72ch;
  margin: 0 var(--margin);
  font-size: var(--step-small);
  color: var(--muted);
}

/* ── Selected work: a sticky photograph and a list ─────── */
.work {
  padding: 140px var(--margin) 0;
}

.work-photo {
  display: none;
}

.rows {
  display: grid;
  gap: 40px;
  margin-top: 40px;
  padding: 0;
  list-style: none;
}

.row a {
  display: grid;
  gap: 6px;
  text-decoration: none;
}

/* On phones every row picture sits whole on the same mat, one measure:
   covers, maps and interface captures alike, none cut through its text. */
.row-shot {
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 12px;
  object-fit: contain;
  background: var(--surface);
  margin-bottom: 10px;
}

.row-shot.map-shot {
  aspect-ratio: 4 / 3;
}

/* The NS Marks map already fills the panel just above; it is not shown twice. */
.row-repeat .row-shot {
  display: none;
}

@media (max-width: 63.99em) {
  .rows .row + .row {
    padding-top: 32px;
    border-top: 1px solid var(--surface);
  }
}

.row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.6em;
}

.row .title {
  font-weight: 600;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--muted);
  transition: text-decoration-color var(--t-hover) ease, text-decoration-thickness var(--t-hover) ease;
}

.row .subject {
  flex: none;
  font-size: var(--step-small);
  color: var(--muted);
}

.row .subject::before {
  content: "· ";
}

.row .sub {
  color: var(--muted);
  max-width: 40ch;
}

.row a {
  position: relative;
}

.row a:hover .title,
.row a:focus-visible .title {
  text-decoration-color: currentColor;
  text-decoration-thickness: 0.12em;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ── What are you working around? The moss band ───────── */
.ask {
  --focus: var(--field-ink);
  display: grid;
  align-content: start;
  gap: 28px;
  margin-top: 120px;
  padding: 72px var(--margin) 64px;
  background: var(--field);
  color: var(--field-ink);
}

.ask .section-title {
  max-width: 16ch;
}

.picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice {
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 0;
  background: var(--field-step);
  color: var(--field-ink);
  font-family: inherit;
  font-size: var(--step-body);
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.choice[aria-pressed="true"] {
  border-color: var(--field-ink);
  background: var(--field-ink);
  color: var(--field);
}

.picker-result {
  max-width: 48ch;
  min-height: 2.9em;
}

html:not(.js) .picker,
html:not(.js) .picker-result {
  display: none;
}

.email {
  justify-self: start;
  max-width: 100%;
  font-family: var(--font-display);
  font-size: var(--step-head);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.12em;
}

/* After a choice, the address carries its subject line, like an envelope. */
.email-subject {
  margin-top: -12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* ── Footer ────────────────────────────────────────────── */
.colophon {
  display: grid;
  gap: 24px;
  padding: 64px var(--margin) 28px;
}

.credits {
  max-width: 60ch;
  font-size: var(--step-small);
  color: var(--muted);
}

.footline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
}

.sign {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: var(--wide);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.sign:hover,
.sign:focus-visible {
  text-decoration: underline;
}

.footline a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* ── 404: the same building with the lights off ─────── */
/* The name in its corner, the place, what went wrong, the ways on;
   the Baddeck wharf runs edge to edge beside it, as on the front page. */
.lost {
  display: grid;
  gap: 40px;
}

.lost-panel {
  position: relative;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: var(--margin) var(--margin) 0;
}

.lost-panel > .lost-name-first { order: -2; }
.lost-panel > .lost-name-last { order: -1; }

.lost-name {
  justify-self: start;
  font-family: var(--font-display);
  font-size: var(--step-display);
  font-weight: 800;
  font-stretch: var(--wide);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.85;
  text-decoration: none;
}

.lost-name-first {
  margin-bottom: -6px;
}

.lost-name-last {
  justify-self: end;
}

.lost .controls {
  top: var(--margin);
}

/* The front page names these grid areas; here they are plain flow. */
.lost .place,
.lost .doors {
  grid-area: auto;
}

.lost-words {
  display: grid;
  gap: 24px;
  justify-items: start;
  margin-top: 40px;
}

.lost .section-title {
  font-size: calc(var(--step-lead) * 1.6);
  font-weight: 700;
  font-stretch: 100%;
  text-transform: none;
  letter-spacing: -0.01em;
}

/* Both halves of the name answer together: one name, one way home. */
.lost-panel:has(.lost-name:hover) .lost-name {
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.12em;
}

/* The dimmed wharf is also a door: pointing at it brings the lights up.
   The caption lets the pointer through to the picture under it. */
.lost-picture figcaption {
  pointer-events: none;
}

.lost-picture .duo:active img {
  filter: none;
}

@media (hover: hover) {
  .lost-picture .duo:hover img {
    filter: none;
  }

  .lost-picture:has(.duo:hover) .lost-back {
    text-decoration: underline;
  }
}

/* Without hover, the caption shows it is a way home from the start. */
@media (hover: none) {
  .lost-back {
    text-decoration: underline;
  }
}

.lost .doors .title {
  text-wrap: balance;
}

.lost .doors .sub {
  text-wrap: pretty;
}

.lost .lede {
  font-size: var(--step-lead);
  line-height: 1.3;
  max-width: 34ch;
}

.lost-path {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.lost .doors {
  grid-area: auto;
  padding-top: 8px;
}

.lost-picture {
  position: relative;
}

.lost-picture .duo {
  aspect-ratio: 4 / 3;
}

/* The same wharf as the front page, with the lights lowered. */
.lost-picture picture {
  display: block;
  height: 100%;
}

.lost-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.72) contrast(1.05);
}

:root[data-theme="light"] .lost-picture img {
  filter: brightness(0.78) contrast(1.04);
}

.lost-picture figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 8px var(--margin);
  background: var(--bg);
  font-size: var(--step-small);
}

@media (min-width: 48em) {
  .lost .doors .links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}

@media (min-width: 64em) {
  .lost {
    display: block;
    position: relative;
    min-height: 100svh;
  }

  .lost-panel {
    width: var(--panel);
    min-height: 100svh;
    padding: 28px var(--margin) 28px;
    background: var(--surface);
  }

  .lost .control {
    background: var(--bg);
  }

  .lost .controls {
    top: 28px;
  }

  /* The name in two corners, as on the front page; the message between. */
  .lost-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .lost-panel > .lost-name-first,
  .lost-panel > .lost-name-last {
    order: 0;
  }

  .lost-name-first {
    align-self: flex-start;
    margin-bottom: 18px;
  }

  .lost-name-last {
    align-self: flex-end;
    margin-top: auto;
    padding-top: 48px;
  }

  .lost .doors {
    position: static;
    width: auto;
  }

  .lost .note {
    margin-bottom: 40px;
  }

  .lost-words {
    margin-top: 10svh;
    margin-left: calc(var(--col) + var(--gutter));
    max-width: calc(7 * var(--col) + 6 * var(--gutter));
  }

  .lost-picture {
    position: absolute;
    top: 0;
    right: 0;
    width: calc(100cqw - var(--panel));
    height: 100%;
  }

  .lost-picture .duo {
    height: 100%;
    aspect-ratio: auto;
  }

  .lost-picture img {
    object-position: 35% 50%;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .js .lost-picture .duo {
    animation: shutter 1300ms var(--ease-in-out) 200ms both;
  }

  .js .lost .section-title {
    animation: name-in 1100ms var(--ease-out) 120ms both;
  }

  .js .lost-words > :not(h1) {
    animation: rise 800ms var(--ease-out) 360ms both;
  }

  .lost-picture img {
    transition: filter 400ms var(--ease-out);
  }
}

/* ── Tablet ────────────────────────────────────────────── */
@media (min-width: 48em) {
  .hero {
    row-gap: 28px;
  }

  .doors .links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }

  /* Three equal chapters side by side; the heading stays in the flow. */
  .who-pin {
    position: static;
    margin-inline: 0;
    padding: 0;
  }

  .who-items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: var(--gutter);
    align-items: start;
    margin-top: 48px;
  }

  /* The map keeps its whole sheet but sits in the same 4:5 frame as the
     photographs, so the three captions and headings line up. */
  .chapter .documentary {
    display: flex;
    align-items: center;
    aspect-ratio: 4 / 5;
  }

  .email {
    font-size: var(--step-display);
  }

}

/* ── Desktop: one grid, nothing pinned ─────────────────── */
@media (min-width: 64em) {
  :root {
    --panel: calc(var(--margin) + 9 * var(--col) + 8.5 * var(--gutter));
  }

  /* The hero is one plain grid in normal flow: the name across the top,
     then the line, the doors and the survey sheet side by side, then the
     Baddeck photograph as a full-width band. Nothing pins or overlaps. */
  .hero {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-areas:
      "name name name name name name name name name name name name"
      "place place place place place place place place pic2 pic2 pic2 pic2"
      "copy copy copy copy copy doors doors doors pic2 pic2 pic2 pic2"
      "pic1 pic1 pic1 pic1 pic1 pic1 pic1 pic1 pic1 pic1 pic1 pic1";
    /* The tall sheet's extra height goes below the copy, not above it. */
    grid-template-rows: auto auto 1fr auto;
    column-gap: var(--gutter);
    row-gap: 0;
  }

  .place {
    margin-top: 16px;
  }

  .hero-copy,
  .doors {
    margin-top: 56px;
  }

  .hero-picture-2 {
    margin-top: 16px;
  }

  .doors {
    padding-top: 0;
  }

  .doors .links {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  /* The survey sheet sits whole in its column, edges and caption visible. */
  /* The sheet is tall and narrow, so it sits on the right margin, under
     the last letter of the name; its caption wraps to its width. */
  .hero-picture-2 {
    justify-self: end;
    width: fit-content;
    margin-inline: 0;
  }

  .hero-picture-2 figcaption {
    contain: inline-size;
  }

  .hero-picture-2 img {
    width: auto;
    height: 60svh;
  }

  .hero-picture-1 {
    height: 62svh;
    margin-top: 72px;
  }

  /* Who I am: the heading, then three equal chapters on one row. */
  .who {
    padding-top: 120px;
  }

  .maps {
    margin-top: 96px;
  }

  /* Both maps share the page margins, so every block starts on one edge. */
  .maps .panel {
    max-width: none;
    margin-inline: var(--margin);
  }

  .map-credits {
    margin-left: var(--margin);
  }

  .maps-intro {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
    align-items: end;
  }

  .maps-intro h2 {
    grid-column: 1 / 7;
  }

  .maps-intro p {
    grid-column: 7 / 13;
  }

  /* Selected work: the photograph holds while the list scrolls. */
  .work {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
    padding-top: 112px;
  }

  .work-photo {
    grid-column: 1 / 6;
    grid-row: 1;
    align-self: start;
    position: sticky;
    top: 12vh;
    display: block;
    width: min(34vw, 100%);
    aspect-ratio: 4 / 5;
    background: var(--surface);
    overflow: hidden;
  }

  .work-live .work-photo {
    cursor: pointer;
  }

  /* Captures, covers and maps sit whole on the mat, as on phones. */
  .work-photo .work-shot {
    inset: 16px;
    width: calc(100% - 32px);
    height: calc(100% - 32px);
    object-fit: contain;
    object-position: 50% 50%;
  }

  /* Hidden pictures are not displayed at all, so lazy loading waits for them. */
  .work-shot {
    position: absolute;
    inset: 0;
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 0;
    opacity: 0;
    transition: opacity 300ms ease;
  }

  .work-shot.is-near,
  .work-shot.is-active {
    display: block;
  }

  /* Maps show their whole capture, attribution included; the NS Marks
     capture is already 4:5, and wider ones sit centred in the frame. */
  .work-shot.map-shot {
    object-fit: contain;
    object-position: 50% 50%;
  }

  .work-shot.is-active {
    opacity: 1;
  }

  .work-list {
    grid-column: 7 / 12;
    grid-row: 1;
  }

  /* The row the photograph shows carries a bar at its left; the bar grows
     into the new row as the photograph changes. */
  .work-live .row a::before {
    content: "";
    position: absolute;
    top: 16px;
    bottom: 16px;
    left: -22px;
    width: 4px;
    background: currentColor;
    scale: 1 0;
  }

  .work-live .row.is-active a::before {
    scale: 1 1;
  }

  /* The rows the photograph is not showing keep their titles, but their
     descriptions step back, so the lit row reads at a glance. */
  .work-live .row:not(.is-active) .sub {
    color: color-mix(in srgb, var(--muted) 85%, var(--bg)); /* 5.70:1 spruce, 5.01:1 bone */
  }

  /* The jump to the question lands with the band above the words: with
     the page's 72px scroll padding, the band edge stops 24px down. */
  #ask {
    scroll-margin-top: 96px;
  }

  .row-shot {
    display: none;
  }

  .rows {
    gap: 0;
    margin-top: 48px;
  }

  .row a {
    min-height: 58px;
    padding: 16px 0;
  }

  .ask {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
    padding-top: 144px;
    padding-bottom: 120px;
  }

  .ask > * {
    grid-column: 1 / 13;
  }

  .ask .section-title,
  .picker-result {
    grid-column: 1 / 9;
  }
}

/* ── Motion ────────────────────────────────────────────── */
/* Feedback under the hand: things give on press and answer the pointer. */
a {
  transition: text-decoration-thickness var(--t-hover) ease;
}

.button,
.control,
.choice {
  transition: scale var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}

.button:active,
.control:active,
.choice:active {
  scale: 0.97;
}

@media (hover: hover) and (pointer: fine) {
  .control:hover {
    background: var(--muted);
    color: var(--bg);
  }

  .choice:hover {
    background: var(--field-hover);
  }

  .choice[aria-pressed="true"]:hover {
    background: var(--field-ink);
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* The signature: the name halves wipe up out of their own baselines. */
  .js .name-first,
  .js .name-last {
    animation: name-in 1100ms var(--ease-out) 120ms both;
  }

  .js .name-last {
    animation-delay: 260ms;
  }

  /* Then the line, the contact and the doors, in reading order. */
  .js .hero-copy .lede,
  .js .hero-copy .contact,
  .js .doors,
  .js .place {
    animation: rise 800ms var(--ease-out) both;
  }

  .js .place { animation-delay: 420ms; }
  .js .hero-copy .lede { animation-delay: 520ms; }
  .js .hero-copy .contact { animation-delay: 610ms; }
  .js .doors { animation-delay: 700ms; }

  /* The first picture opens like a shutter. */
  .js .hero-picture-1 .duo {
    animation: shutter 1300ms var(--ease-in-out) 200ms both;
  }

  /* Scroll entrances, once each; only hidden after site.js has started. */
  .motion .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 80ms);
  }

  .motion .reveal.is-in {
    opacity: 1;
    transform: none;
  }

  /* A chapter's picture settles from a slight scale as its words rise. */
  .motion .chapter .duo img {
    scale: 1.08;
    transition: scale 1600ms var(--ease-soft);
  }

  .motion .chapter.is-in .duo img {
    scale: 1;
  }

  /* A map opens like the hero picture's shutter; its caption follows. */
  .motion .panel img {
    clip-path: inset(0 0 100% 0);
    transition: clip-path 1300ms var(--ease-in-out);
  }

  .motion .panel .panel-row {
    opacity: 0;
    translate: 0 12px;
    transition: opacity 700ms var(--ease-out) 350ms, translate 800ms var(--ease-out) 350ms;
  }

  .motion .panel.is-in img {
    clip-path: inset(0);
  }

  .motion .panel.is-in .panel-row {
    opacity: 1;
    translate: none;
  }

  /* The work photograph slides a little in the direction of the list. */
  .work-shot {
    translate: 0 2.5%;
    transition: opacity 300ms ease, translate 700ms var(--ease-out);
  }

  .work-shot.is-active {
    translate: none;
  }

  .work-live .row a::before {
    transition: scale 320ms var(--ease-out);
  }

  .work-live .row .sub {
    transition: color var(--t-hover) ease;
  }

  @starting-style {
    .work-shot.is-active {
      opacity: 0;
      translate: 0 2.5%;
    }
  }

  /* The picker's choices come in one after another. */
  .motion .picker.reveal {
    transform: none;
  }

  .motion .picker .choice {
    opacity: 0;
    translate: 0 14px;
    transition: opacity 600ms var(--ease-out), translate 700ms var(--ease-out), scale var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
    transition-delay: calc(var(--i, 0) * 70ms), calc(var(--i, 0) * 70ms), 0ms, 0ms, 0ms;
  }

  .motion .picker.is-in .choice {
    opacity: 1;
    translate: none;
  }

  /* The subject line arrives under the address after a choice. */
  .email-subject:not([hidden]) {
    animation: rise 600ms var(--ease-out) both;
  }

  /* The address wipes up like the name. */
  .motion .email.reveal {
    opacity: 1;
    transform: translateY(24%);
    clip-path: inset(100% 0 0 0);
    transition: clip-path 1100ms var(--ease-out), transform 1100ms var(--ease-out);
  }

  .motion .email.reveal.is-in {
    transform: none;
    clip-path: inset(-25% -2% -25% -2%);
  }
}

@keyframes name-in {
  from {
    clip-path: inset(100% 0 0 0);
    transform: translateY(35%);
  }
  to {
    clip-path: inset(-20% -2% -20% -2%);
    transform: none;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes shutter {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0); }
}


/* Windows High Contrast and other forced-colour modes drop backgrounds. */
@media (forced-colors: active) {
  .button,
  .control,
  .choice {
    border: 1px solid ButtonText; /* taste-skill-ignore: forced-colours modes drop backgrounds */
  }

  .font-toggle[aria-pressed="true"],
  .choice[aria-pressed="true"] {
    forced-color-adjust: none;
    border-color: Highlight;
    background: Highlight;
    color: HighlightText;
  }
}
