:root {
  /* Soft neutral palette: pale grey, cool grey, taupe, warm grey, charcoal */
  --ink: #3d3d3b;
  --muted: #777775;
  --bg: #ebebeb;
  --surface: #e0e2e6;      /* placeholder boxes, cards, pills */
  --faint: #98978f;        /* "coming soon" labels */
  --line: #d3d3d1;
  --line-strong: #c1b4aa;
  --button: #f2f2f1;
  --shadow: rgba(60, 55, 50, 0.08);
  --accent: #7cb87f;       /* green: active-tab dot and small highlights */
  color-scheme: light;
}

/* Dark mode: when the lamp is switched off (data-theme="dark"), or when the computer
   prefers dark and nobody has pulled the string yet. Keep the two blocks identical. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #ebebeb;
    --muted: #a9a8a2;
    --bg: #262625;
    --surface: #323231;
    --faint: #777775;
    --line: #3e3e3c;
    --line-strong: #5a5652;
    --button: #2e2e2d;
    --shadow: rgba(0, 0, 0, 0.35);
    --accent: #7cb87f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #ebebeb;
  --muted: #a9a8a2;
  --bg: #262625;
  --surface: #323231;
  --faint: #777775;
  --line: #3e3e3c;
  --line-strong: #5a5652;
  --button: #2e2e2d;
  --shadow: rgba(0, 0, 0, 0.35);
  --accent: #7cb87f;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; background: var(--bg); }
body { font-family: 'Inter', system-ui, sans-serif; color: var(--ink); }
a { color: inherit; text-decoration: none; }

/* ---------- Navigation ---------- */
.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 920px;
  margin: 0 auto;
  padding: 18px 24px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  color: var(--muted);
  transition: color 0.2s ease;
}
.brand:hover { color: var(--ink); }
.brand img { height: 26px; width: auto; display: block; }

.links {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.links { position: relative; }
.links a { color: var(--muted); transition: color 0.2s ease; }
/* Little green dot that marks the current tab and glides between tabs */
.tab-dot {
  position: absolute;
  top: 50%;
  left: 0;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.2s ease;
}
@media (prefers-reduced-motion: reduce) { .tab-dot { transition: opacity 0.2s ease; } }
.links a:hover,
.links a[aria-current="page"] { color: var(--ink); }

.social {
  display: flex;
  gap: 20px;
  justify-self: end;
  align-items: center;
}
.social a { color: var(--muted); display: grid; place-items: center; transition: color 0.2s ease; }
.social a:hover { color: var(--ink); }
.social svg { width: 16px; height: 16px; }

a:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 4px; }

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

/* Shared compact column, same width as the nav */
.wrap { max-width: 920px; margin: 0 auto; padding: 0 24px; }

/* ---------- Hero: lamp + duck on an open "stage" (filler for a future interactive piece) ---------- */
.hero { padding-top: 8px; }
.placeholder {
  position: relative;
  isolation: isolate;      /* keeps the lamp's glow behind the duck */
  height: 400px;
}

/* Waving duck (filler for the future interactive piece). Layers are the same size, stacked. */
.duck {
  position: absolute;
  left: 50%;
  bottom: 36px;
  height: 230px;
  transform: translateX(-50%);
  aspect-ratio: 826 / 1302;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.duck .layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.duck img.layer { display: block; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.duck .rig { transform-origin: 50% 98%; }
.duck .shoulder { transform-origin: 77.3% 52.5%; }
.duck .arm { transform-origin: 84.56% 64.75%; }
.duck .eyes { transform-origin: 49.5% 26%; }
.duck .shadow {
  position: absolute;
  left: 10%; right: 10%; bottom: -2%;
  height: 5%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0));
}
.duck:focus-visible { outline: 2px solid var(--ink); outline-offset: 8px; border-radius: 8px; }

.scroll-cue {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  margin: 12px auto 0;
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}
.scroll-cue:hover { color: var(--ink); transform: translateY(2px); }
.scroll-cue svg { width: 18px; height: 18px; }

/* ---------- Projects ---------- */
.projects { padding-top: 72px; padding-bottom: 96px; scroll-margin-top: 16px; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 24px;
  margin: 0 0 28px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.section-head h2,
.section-head p { margin: 0; font-size: inherit; font-weight: 400; }
.section-head em { font-style: italic; }
.section-head strong { font-weight: 600; }
.section-head .tags li { text-transform: none; }   /* pills keep their own case ("project") */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 24px;
}
.card { display: block; }
.card-frame {
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--faint);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card:hover .card-frame { transform: translateY(-3px); box-shadow: 0 10px 30px var(--shadow); }
.card-title { margin: 14px 0 4px; font-size: 15px; font-weight: 500; color: var(--ink); }
/* Title on the left, rounded tag bubbles on the right */
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 14px 0 4px; }
.card-head .card-title { margin: 0; }
.tags { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; flex-shrink: 0; }
.tags li {
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.4;
}
.card-desc { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }

/* Phones: name + icons on top, tabs on their own row */
@media (max-width: 720px) {
  .nav {
    grid-template-columns: 1fr auto;
    row-gap: 12px;
    padding: 14px 16px;
  }
  .links { grid-column: 1 / -1; grid-row: 2; justify-content: center; }
  .social { gap: 18px; }
  .wrap { padding: 0 16px; }
  .placeholder { height: 320px; }
  /* smaller lamp on a shorter cord on phones */
  .placeholder .lamp { --cord: 24px; left: calc(50% - 15px); width: 30px; }
  .placeholder .lamp svg { width: 30px; height: 40px; }
  .placeholder .lamp-glow { top: 54px; }
  .duck { height: 190px; bottom: 30px; }
  .projects { padding-top: 56px; padding-bottom: 72px; }
  .grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- About page ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding-bottom: 96px;
}
.about-page { padding-top: 56px; }
.about-page .section-head { margin-bottom: 56px; }
.about h1 {
  margin: -6px 0 32px;       /* top lines up with the photo; extra space before the bio */
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.hand {
  font-family: 'Caveat', cursive;
  font-weight: 500;
  font-size: 1.4em;
  letter-spacing: 0;
  line-height: 1;
}
.bio p { margin: 0 0 14px; font-size: 13px; line-height: 1.75; letter-spacing: 0.04em; color: var(--muted); }
.bio p:last-child { margin-bottom: 0; }
.photo {
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--faint);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 720px) {
  .about { grid-template-columns: 1fr; gap: 32px; padding-bottom: 72px; }
  .about-page { padding-top: 32px; }
  .about-page .section-head { margin-bottom: 36px; }
  .about h1 { font-size: 24px; }
  .photo { max-width: 320px; }
}

/* ---------- Case study pages ---------- */
.case { padding-top: 40px; padding-bottom: 96px; }
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 0.2s ease;
}
.back:hover { color: var(--ink); }
.back svg { width: 14px; height: 14px; }
.back.bottom { margin-top: 72px; }

.case-head { margin-top: 32px; }
/* Title on the left, project pills on the right */
.case-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 8px; }
.case-head h1 { margin: 0; font-size: 28px; font-weight: 400; letter-spacing: 0.02em; }
.lede { margin: 0; font-size: 15px; letter-spacing: 0.02em; color: var(--muted); }

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 24px;
  margin: 28px 0 0;
}
.facts dt {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--muted) 65%, var(--faint));   /* a touch lighter than the answers */
  margin-bottom: 8px;        /* more room under the label than between answer lines */
}
.facts dd { margin: 0; font-size: 13.5px; line-height: 1.4; letter-spacing: 0.01em; }
/* Little arrow next to the title that opens the live site */
.case-head h1 { display: inline-flex; align-items: center; gap: 6px; }
.visit { display: inline-flex; color: var(--muted); transition: color 0.2s ease; }
.visit:hover { color: var(--ink); }
.visit svg { width: 20px; height: 20px; transition: transform 0.2s ease; }
.visit:hover svg { transform: translate(2px, -2px); }

.case-banner, .case-image {
  border-radius: 14px;
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--faint);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  overflow: hidden;
}
.case-banner { aspect-ratio: 16 / 9; margin-top: 40px; }
.case-image { aspect-ratio: 4 / 3; }
.case-image.wide { aspect-ratio: 16 / 9; margin-top: 24px; }
/* Duckweather process: stage labels on top, then one row of three drawings per duck */
.layers { margin-top: 24px; }
.layer-labels, .layer-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.layer-labels { list-style: none; margin: 0 0 12px; padding: 0 0 10px; border-bottom: 1px solid var(--surface); font-size: 13px; color: var(--muted); letter-spacing: 0.02em; }
.layer-labels span { margin-right: 8px; font-size: 11px; color: var(--faint); }
.layer-temp { margin: 28px 0 10px; font-size: 11px; letter-spacing: 0.04em; color: var(--faint); }
.layer-labels + .layer-temp { margin-top: 16px; }
.layer-row img { display: block; width: 100%; height: auto; }
/* The outline is black lines on transparent: flip it to white in dark mode so it shows */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .line-art { filter: invert(1); } }
:root[data-theme="dark"] .line-art { filter: invert(1); }
.case-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }

.case-section {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  column-gap: 32px;
  margin-top: 72px;
}
.case-section > *:not(.label) { grid-column: 2; }
.label {
  grid-column: 1;
  grid-row: 1 / span 4;
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.prose p, .prose-note { margin: 0 0 14px; font-size: 14px; line-height: 1.75; letter-spacing: 0.02em; }
.prose p:last-child { margin-bottom: 0; }
.prose-note { color: var(--muted); }
.placeholder-text { color: var(--faint); font-style: italic; }

/* Try-it demo */
.demo {
  margin-top: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  padding: 28px;
  border-radius: 14px;
  background: var(--surface);
}
.demo-stage { display: grid; place-items: center; height: 260px; }
.demo-stage img { height: 240px; width: auto; max-width: 100%; object-fit: contain; display: block; }
.demo-temp { margin: 0; font-size: 56px; font-weight: 400; letter-spacing: -0.02em; line-height: 1; }
.demo-range { margin: 6px 0 20px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.demo input[type="range"] { width: 100%; accent-color: var(--accent); }
.demo-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 2px; }
.demo-rain {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 20px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--button);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.demo-rain svg { width: 15px; height: 15px; }
.demo-rain:hover { color: var(--ink); border-color: var(--line-strong); }
.demo-rain[aria-pressed="true"] { color: #fff; background: #6f8fb3; border-color: #6f8fb3; }
.demo-rain:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Duck grid */
/* Cold vs hot: three ducks beside a short note on the outfit choices */
.extremes { display: grid; gap: 40px; margin-top: 48px; }
.extreme { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.extreme-ducks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; }
.extreme-ducks img { display: block; width: 100%; height: 130px; object-fit: contain; object-position: center bottom; }
.duck-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 20px 8px;
  margin-top: 36px;
}
.duck-grid figure { margin: 0; text-align: center; }
.duck-grid img { height: 96px; width: 100%; object-fit: contain; object-position: center bottom; display: block; }   /* feet on one line */
.duck-grid figcaption { margin-top: 6px; font-size: 11px; letter-spacing: 0.04em; color: var(--muted); }

@media (max-width: 720px) {
  .case { padding-top: 24px; padding-bottom: 72px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-section { grid-template-columns: 1fr; margin-top: 56px; }
  .case-section > *:not(.label) { grid-column: 1; }
  .label { grid-row: auto; margin-bottom: 14px; }
  .demo { grid-template-columns: 1fr; padding: 20px; gap: 16px; }
  .demo-stage { height: 220px; }
  .demo-stage img { height: 200px; }
  .duck-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .extreme { grid-template-columns: 1fr; gap: 16px; }
  .case-images { grid-template-columns: 1fr; }
  .layer-labels, .layer-row { gap: 10px; }
  .layer-labels { font-size: 11px; }
  .layer-labels span { display: block; margin: 0 0 2px; }
}

/* ---------- Project showcase: app screenshot in a browser window on a soft sky ---------- */
/* Sky colours are taken from the Duckweather app itself */
.showcase { background: linear-gradient(180deg, #a9c3de 0%, #c9d8e8 45%, #efe6d8 100%); }
.mock {
  width: 84%;
  border-radius: 10px;
  overflow: hidden;
  background: #f6f2ec;
  box-shadow: 0 1px 2px rgba(30, 45, 70, 0.08), 0 18px 40px rgba(30, 50, 80, 0.18);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.mock-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 18px;
  padding: 0 9px;
  background: #f6f2ec;
  border-bottom: 1px solid rgba(60, 50, 40, 0.06);
}
.mock-bar span { width: 6px; height: 6px; border-radius: 50%; background: #ddd6cc; }
.card-frame .mock img,
.mock img { display: block; width: 100%; height: auto; object-fit: initial; }
.card:hover .card-frame.showcase { transform: none; box-shadow: none; }
.card:hover .mock { transform: translateY(-4px); box-shadow: 0 1px 2px rgba(30, 45, 70, 0.08), 0 26px 50px rgba(30, 50, 80, 0.24); }

.case-banner.showcase .mock { width: 78%; border-radius: 12px; }
.case-banner.showcase .mock-bar { height: 24px; gap: 6px; padding: 0 12px; }
.case-banner.showcase .mock-bar span { width: 8px; height: 8px; }

@media (max-width: 720px) {
  .mock { width: 88%; border-radius: 8px; }
  .case-banner.showcase .mock { width: 88%; border-radius: 8px; }
  .mock-bar, .case-banner.showcase .mock-bar { height: 14px; gap: 4px; padding: 0 7px; }
  .mock-bar span, .case-banner.showcase .mock-bar span { width: 5px; height: 5px; }
}

/* Light mode shows the daytime screenshot on a day sky; dark mode shows the night
   screenshot on a night sky (colours from the app's night mode). Keep the two blocks identical. */
.shot-night { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shot-day { display: none !important; }
  :root:not([data-theme="light"]) .shot-night { display: block !important; }
  :root:not([data-theme="light"]) .showcase { background: linear-gradient(180deg, #343b4f 0%, #292a33 50%, #241e1a 100%); }
  :root:not([data-theme="light"]) .showcase .mock { background: #2a2522; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 18px 44px rgba(0, 0, 0, 0.45); }
  :root:not([data-theme="light"]) .showcase .mock-bar { background: #2a2522; border-bottom-color: rgba(255, 255, 255, 0.05); }
  :root:not([data-theme="light"]) .showcase .mock-bar span { background: #4b443e; }
  :root:not([data-theme="light"]) .card:hover .showcase .mock { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09), 0 26px 54px rgba(0, 0, 0, 0.55); }
}
:root[data-theme="dark"] .shot-day { display: none !important; }
:root[data-theme="dark"] .shot-night { display: block !important; }
:root[data-theme="dark"] .showcase { background: linear-gradient(180deg, #343b4f 0%, #292a33 50%, #241e1a 100%); }
:root[data-theme="dark"] .showcase .mock { background: #2a2522; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 18px 44px rgba(0, 0, 0, 0.45); }
:root[data-theme="dark"] .showcase .mock-bar { background: #2a2522; border-bottom-color: rgba(255, 255, 255, 0.05); }
:root[data-theme="dark"] .showcase .mock-bar span { background: #4b443e; }
:root[data-theme="dark"] .card:hover .showcase .mock { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09), 0 26px 54px rgba(0, 0, 0, 0.55); }

/* ---------- Project video (replaces the banner on case pages) ---------- */
.case-video {
  position: relative;
  margin-top: 32px;
  border-radius: 14px;
  overflow: hidden;
  background: #b3d1ea;   /* the video's opening sky, shown while it loads */
}
.case-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }


@media (max-width: 720px) {
  .case-video { border-radius: 10px; }
}

/* ---------- On-this-page contents (case studies) ---------- */
/* Sits in the empty left margin beside the 920px column; hidden when there isn't room */
.toc {
  position: fixed;
  top: 140px;              /* set by the page script (level with "Overview", or the video on Duckweather) */
  left: max(24px, calc((100vw - 920px) / 2 - 196px));
  width: 160px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  z-index: 5;
}
.toc-title { margin: 0 0 20px; color: var(--faint); }
.toc ul { position: relative; list-style: none; margin: 0; padding: 0 0 0 18px; }
.toc li { margin: 0; }
.toc a {
  display: block;
  padding: 10px 0;
  color: var(--muted);
  transition: color 0.2s ease;
}
.toc a:hover,
.toc a[aria-current] { color: var(--ink); }
.toc-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.2s ease;
}
@media (prefers-reduced-motion: reduce) { .toc-dot { transition: opacity 0.2s ease; } }
@media (max-width: 1299px) { .toc { display: none; } }

/* Jumping to a section leaves a little room above its heading */
.case-section { scroll-margin-top: 48px; }

/* Overview: short lead, a row of key numbers, then a softer supporting paragraph */
.prose p.lead { font-size: 15px; line-height: 1.7; color: var(--ink); }
/* Body text in case studies: darker than the nav grey so it reads comfortably */
.case-section .prose p:not(.lead):not(.placeholder-text):not(.mini-label):not(.source) { color: color-mix(in srgb, var(--ink) 72%, var(--muted)); }
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 24px;
  list-style: none;
  margin: 28px 0;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats strong {
  display: block;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--ink);
}
.stats span {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--muted) 65%, var(--faint));
}
@media (max-width: 720px) {
  .stats { gap: 12px; }
  .stats strong { font-size: 22px; }
}

/* ---------- Case study building blocks (Protect Pollinators and later projects) ---------- */
.case-hero { margin: 32px 0 0; border-radius: 14px; overflow: hidden; background: var(--surface); }
.case-hero img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
/* The image itself is rounded (not the figure), so a caption underneath never squares off its bottom corners */
.frame { margin: 24px 0 0; }
.frame img, .frame video { display: block; width: 100%; height: auto; border-radius: 12px; background: var(--surface); }
.frame figcaption, .type-sample figcaption, .type-sample small {
  display: block;
  padding: 10px 2px 0;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--muted) 65%, var(--faint));
}
.mini-label {
  margin: 0 0 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--muted) 65%, var(--faint));
}
.prose p.pull { font-size: 18px; line-height: 1.5; color: var(--ink); letter-spacing: 0; }
.audience { margin-top: 24px; padding: 16px 18px; border-radius: 12px; background: var(--surface); }
.audience p:last-child { margin: 0; font-size: 13.5px; line-height: 1.65; }

/* three pillars */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; list-style: none; margin: 20px 0 0; padding: 0; }
.pillars li { padding: 18px; border-radius: 12px; background: var(--surface); }
.pillars strong { display: block; margin-bottom: 6px; font-size: 15px; font-weight: 500; }
.pillars p { margin: 0; font-size: 13px; line-height: 1.6; color: color-mix(in srgb, var(--ink) 72%, var(--muted)); }

/* type + colour */
.type-color { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; margin-top: 32px; }
.type-sample { margin: 0 0 18px; }
.type-sample.sigurd img { display: block; width: 72%; height: auto; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .type-sample.sigurd img { filter: invert(1); } }
:root[data-theme="dark"] .type-sample.sigurd img { filter: invert(1); }
.type-sample span { display: block; font-size: 20px; line-height: 1.3; color: var(--ink); }
.type-sample small { padding-top: 6px; }
.futura { font-family: "Futura PT", Futura, "Century Gothic", "Avenir Next", sans-serif; font-weight: 500; }
.georgia { font-family: Georgia, "Times New Roman", serif; }
.palette { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.palette li { aspect-ratio: 1; border-radius: 10px; background: var(--c); display: flex; align-items: flex-end; padding: 8px; }
.palette span { font-size: 10px; letter-spacing: 0.06em; color: rgba(30, 30, 30, 0.75); }

/* final + text side by side */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 8px; }
.split .frame { margin-top: 0; }
.split.build-shots { margin-top: 28px; gap: 16px; }
.split.reverse { margin-top: 24px; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 16px; align-items: stretch; }
.split.reverse .frame img { height: 100%; object-fit: cover; }

/* process steps */
.steps-title { margin-top: 40px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.steps.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.steps figure { margin: 0 0 10px; border-radius: 10px; overflow: hidden; background: var(--surface); aspect-ratio: 3 / 4; }
.steps.three figure { aspect-ratio: 4 / 3; }
.steps img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.step-n { display: block; margin-bottom: 4px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink); }
.steps p { margin: 0; font-size: 12.5px; line-height: 1.55; color: color-mix(in srgb, var(--ink) 72%, var(--muted)); }
.after-steps { margin-top: 24px; }

/* packets + carousel rows */
.packets, .slides { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 24px 0 0; padding: 0; }
.packets img, .slides img { display: block; width: 100%; height: auto; border-radius: 8px; }
.packets span { display: block; margin-top: 8px; font-size: 11px; letter-spacing: 0.04em; color: var(--muted); }

.credits { margin: 28px 0 0; font-size: 11px; line-height: 1.6; letter-spacing: 0.02em; color: var(--faint); }

@media (max-width: 720px) {
  .pillars { grid-template-columns: 1fr; }
  .type-color, .split, .split.reverse { grid-template-columns: 1fr; }
  .steps, .steps.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .packets, .slides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .type-sample.sigurd img { width: 100%; }
}

/* ---------- A Night to Remember extras ---------- */
.team { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.team li { padding: 16px; border-radius: 12px; background: var(--surface); }
.team strong { display: block; font-size: 13.5px; font-weight: 500; color: var(--ink); }
.team span { display: block; margin-top: 4px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.team li.is-me { box-shadow: inset 0 0 0 1px var(--ink); }
.team li.is-me strong::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  margin: 0 7px 2px 0;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}
.prose p.source { font-size: 11px; letter-spacing: 0.02em; color: var(--faint); }
.poppins { font-family: 'Poppins', sans-serif; font-weight: 600; }
.type-sample.script img { display: block; height: 110px; width: auto; }
.palette.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.palette li.on-dark span { color: rgba(255, 255, 255, 0.85); }
.slides.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.booth { display: grid; grid-template-columns: 1.6fr 1fr 1fr 0.6fr; gap: 12px; align-items: stretch; margin-top: 24px; }
.booth .frame { margin: 0; display: grid; place-items: center; }
.booth .frame img { width: 100%; height: 100%; object-fit: contain; }

/* script sample is black ink: flip it to light ink in dark mode. Keep the two blocks identical. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .type-sample.script img { filter: invert(1); } }
:root[data-theme="dark"] .type-sample.script img { filter: invert(1); }

@media (max-width: 720px) {
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .palette.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .slides.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .booth { grid-template-columns: 1fr 1fr; }
  .booth .booth-main { grid-column: 1 / -1; }
}

/* ---------- Totten Trot extras ---------- */
.video-split { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; }
.timelapse video { display: block; width: 100%; height: auto; aspect-ratio: 640 / 920; background: #fff; }
.steps figure.dark, .dark-frame img { background: #2a2a30; }

/* ---------- Art page ---------- */
.art-page { padding-top: 56px; padding-bottom: 96px; }
@media (max-width: 720px) { .art-page { padding-top: 32px; padding-bottom: 72px; } }

/* Filter chips */
.art-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.chip {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.chip:hover { color: var(--ink); border-color: var(--line-strong); }
.chip[aria-pressed="true"] { color: var(--bg); background: var(--ink); border-color: var(--ink); }
.chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Masonry: pieces keep their own shape and stack in columns */
.masonry { position: relative; columns: 3; column-gap: 20px; list-style: none; margin: 0; padding: 0; }
.art-item { break-inside: avoid; margin: 0 0 22px; will-change: transform; }
.art-item[hidden] { display: none; }
.art-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 2px;
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
}
.art-open img { display: block; width: 100%; height: auto; transition: transform 0.4s ease; }
.art-open:hover img { transform: scale(1.025); }
.art-open:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.art-caption { display: flex; justify-content: space-between; gap: 12px; margin: 8px 2px 0; font-size: 12px; }
.art-caption span { color: var(--ink); }
.art-caption small { font-size: 11px; color: var(--muted); text-align: right; }

/* Lightbox */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: transparent;
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox[open] { display: flex; }
.lightbox::backdrop { background: rgba(15, 15, 14, 0.88); }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: min(1100px, 84vw); }
.lightbox img { display: block; max-width: 100%; max-height: 80vh; width: auto; height: auto; border-radius: 2px; }
.lightbox figcaption { display: flex; gap: 12px; align-items: baseline; margin-top: 14px; color: #f2f1ee; font-size: 13px; }
.lightbox figcaption small { font-size: 11px; color: #a9a8a3; letter-spacing: 0.04em; }
.lb-close, .lb-nav {
  display: grid; place-items: center;
  border: 0; background: rgba(255, 255, 255, 0.1); color: #fff;
  border-radius: 50%; cursor: pointer;
  transition: background 0.2s ease;
}
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, 0.2); }
.lb-close { position: absolute; top: 20px; right: 20px; width: 40px; height: 40px; }
.lb-nav { width: 44px; height: 44px; margin: 0 16px; flex-shrink: 0; }
.lb-close svg, .lb-nav svg { width: 20px; height: 20px; }

@media (max-width: 900px) { .masonry { columns: 2; column-gap: 14px; } }
@media (max-width: 720px) {
  .lb-nav { position: absolute; bottom: 24px; margin: 0; }
  .lb-prev { left: calc(50% - 56px); }
  .lb-next { right: calc(50% - 56px); }
  .lightbox figure { max-width: 92vw; }
  .lightbox img { max-height: 70vh; }
}

/* About: portrait + off the clock */
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.off-clock { padding-bottom: 96px; }
.oc-group { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; margin-bottom: 56px; }
.oc-intro h3 { margin: 0 0 8px; font-size: 12px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); }
.oc-intro p { margin: 0; font-size: 13px; line-height: 1.65; }
.oc-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.oc-photos.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.oc-photos li { border-radius: 12px; overflow: hidden; background: var(--surface); aspect-ratio: 4 / 3; }
.oc-photos.three li { aspect-ratio: 3 / 4; }
.oc-photos li.wide { grid-column: span 2; aspect-ratio: 16 / 9; }
.oc-photos img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 720px) {
  .oc-group { grid-template-columns: 1fr; gap: 16px; margin-bottom: 40px; }
  .oc-photos { gap: 8px; }
  .off-clock { padding-bottom: 72px; }
}

/* Transparent line sketches sit straight on the page (no card); black lines flip to white in dark mode. Keep the two blocks identical. */
.frame.sketch img { background: none; border-radius: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .frame.sketch img { filter: invert(1); } }
:root[data-theme="dark"] .frame.sketch img { filter: invert(1); }

/* Concept: base duck sketch with a note beside it */
.base-duck {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: center;
  column-gap: 32px;
  margin-top: 48px;
}
.base-duck .frame.base { margin: 0; }
.base-duck .frame.base img { width: 100%; }
@media (max-width: 720px) {
  .base-duck { grid-template-columns: 100px minmax(0, 1fr); column-gap: 20px; }
}

/* ---------- Protect Pollinators layout touch-ups ---------- */
/* Inline facts (e.g. Audience) under a paragraph, without a box */
.facts.inline-facts { grid-template-columns: 1fr; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--surface); }

/* Numbered row, in the same style as Duckweather's "01 Outline" stage labels */
.numbered { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; list-style: none; margin: 24px 0 0; padding: 0; }
.numbered li { padding-top: 12px; border-top: 1px solid var(--line); }
.numbered .num { display: block; margin-bottom: 10px; font-size: 11px; color: var(--faint); letter-spacing: 0.04em; }
.numbered strong { display: block; font-size: 15px; font-weight: 500; color: var(--ink); }
.numbered small { display: block; margin: 2px 0 8px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: color-mix(in srgb, var(--muted) 65%, var(--faint)); }
.numbered p { margin: 0; font-size: 13px; line-height: 1.6; color: color-mix(in srgb, var(--ink) 72%, var(--muted)); }

/* Iterations: numbered labels once on top, then the drafts with short notes */
.iter { margin-top: 48px; }
.iter-labels, .iter-row { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.iter-labels { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--surface); font-size: 13px; color: var(--muted); letter-spacing: 0.02em; }
.iter-labels span { margin-right: 8px; font-size: 11px; color: var(--faint); }
.iter-row figure { margin: 0 0 10px; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--surface); }
.iter[style*="--cols:3"] .iter-row figure { aspect-ratio: 4 / 3; }
.iter-row img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.iter-row p { margin: 0; font-size: 12.5px; line-height: 1.55; color: color-mix(in srgb, var(--ink) 72%, var(--muted)); }

/* Packet back beside its notes */
.split.back-split { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: center; margin-top: 24px; }

@media (max-width: 720px) {
  .numbered { grid-template-columns: 1fr; gap: 16px; }
  .iter-labels, .iter-row { gap: 8px; }
  .iter-labels { font-size: 11px; }
  .iter-labels span { display: block; margin: 0 0 2px; }
  .iter-row p { font-size: 11.5px; }
  .split.back-split { grid-template-columns: 1fr; }
}

/* Home card: image set slightly inside the frame on a soft gradient, like the Duckweather card */
.card-frame.framed { display: grid; place-items: center; }
.card-frame.framed img {
  width: 90%;
  height: 86%;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(40, 35, 25, 0.08), 0 18px 40px rgba(50, 40, 25, 0.2);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.card:hover .card-frame.framed { transform: none; box-shadow: none; }
.card:hover .card-frame.framed img { transform: translateY(-4px); box-shadow: 0 1px 2px rgba(40, 35, 25, 0.08), 0 26px 50px rgba(50, 40, 25, 0.26); }
/* Regional Roots: goldenrod yellow drifting into aster blue, from the flowers on the packets */
.card-frame.rr { background: linear-gradient(135deg, #f1e3a6 0%, #e9e1cf 48%, #c9d0ea 100%); }
@media (max-width: 720px) { .card-frame.framed img { width: 92%; height: 88%; border-radius: 8px; } }
/* Hero the same shape as the Duckweather video (16:9), so Role / Timeline / Tools sit higher */
.case-hero.fit img { aspect-ratio: 16 / 9; }
@media (max-width: 720px) { .case-hero.fit { border-radius: 10px; } }
/* Extra breathing room between case-study sections (Regional Roots) */
.case.roomy .case-section { margin-top: 128px; }
@media (max-width: 720px) { .case.roomy .case-section { margin-top: 88px; } }
.prose p.pull strong { font-weight: 600; }
.numbered ul { margin: 10px 0 0; padding: 0; list-style: none; font-size: 12.5px; line-height: 1.55; color: color-mix(in srgb, var(--ink) 72%, var(--muted)); }
.numbered ul li { position: relative; padding: 0 0 0 12px; border: 0; }
.numbered ul li + li { margin-top: 4px; }
.numbered ul li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }
/* Strategy columns: rows line up across all three (subgrid), the sentence reads first,
   and the key points follow as a green-dot list */
.numbered:has(ul) { grid-template-rows: repeat(5, auto); row-gap: 0; }
.numbered:has(ul) > li { display: grid; grid-row: span 5; grid-template-rows: subgrid; }
.numbered:has(ul) > li > p { margin-bottom: 16px; font-size: 13.5px; color: var(--ink); }
.numbered ul { margin: 0; padding: 0; }
.numbered ul li::before { background: var(--accent); }
@media (max-width: 720px) {
  .numbered:has(ul) { grid-template-rows: none; row-gap: 24px; }
  .numbered:has(ul) > li { display: block; }
}
/* Collage with a see-through background: no rounded grey box behind it */
.frame.cutout img { background: none; border-radius: 0; }
/* Type & color: three "Aa" specimens over a row of pill swatches */
.type-color-row { margin-top: 56px; }
.specimens { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 20px; }
.spec { margin: 0; }
.spec img, .spec .aa { display: block; height: 64px; margin-bottom: 14px; }
.spec img { width: auto; }
.spec .aa { font-size: 84px; line-height: 64px; color: var(--ink); }
.spec .aa.georgia { font-weight: 400; }
.spec figcaption { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.spec figcaption small { display: block; margin-top: 3px; font-size: 10px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.08em; color: color-mix(in srgb, var(--muted) 65%, var(--faint)); }
.swatches { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; list-style: none; margin: 40px 0 0; padding: 0; font-size: 12px; letter-spacing: 0.02em; color: color-mix(in srgb, var(--ink) 72%, var(--muted)); }
.swatches span { display: block; height: 40px; margin-bottom: 10px; border-radius: 999px; background: var(--c); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .spec img { filter: invert(1); } }
:root[data-theme="dark"] .spec img { filter: invert(1); }
@media (max-width: 720px) {
  .specimens { gap: 12px; }
  .spec img, .spec .aa { height: 44px; }
  .spec .aa { font-size: 58px; line-height: 44px; }
  .swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; }
}
/* Even out the cap heights so the three "Aa" read the same size */
.spec .aa.georgia { font-size: 90px; }
.spec .aa.futura { font-size: 80px; }
@media (max-width: 720px) { .spec .aa.georgia { font-size: 62px; } .spec .aa.futura { font-size: 55px; } }
/* Sigurd "Aa" drawn as vector outlines from the font, so it stays sharp and follows the theme colour */
.spec .aa-svg { display: block; height: 64px; width: auto; margin-bottom: 14px; color: var(--ink); overflow: visible; }
@media (max-width: 720px) { .spec .aa-svg { height: 44px; } }
/* Closer to the reference: centred specimens, shorter pill swatches with the hex centred underneath */
.spec { text-align: center; }
.spec .aa-svg, .spec .aa { margin-left: auto; margin-right: auto; }
.swatches { text-align: center; margin-top: 48px; }
.swatches span { width: 72px; height: 46px; margin: 0 auto 10px; }
@media (max-width: 720px) { .swatches span { width: 60px; height: 38px; } }
/* Hex codes in the same small caps label style as the rest of the page */
.swatches li { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: color-mix(in srgb, var(--muted) 80%, var(--ink)); }
.type-color-row { margin-top: 104px; }
@media (max-width: 720px) { .type-color-row { margin-top: 72px; } }
.type-notes { margin-top: 48px; }
/* Typesetting: no single-word last lines in body copy, evenly balanced headings */
p, li, dd, figcaption, blockquote { text-wrap: pretty; }
h1, h2, h3, .lede { text-wrap: balance; }
/* Problem statement: large enough that the first line runs the full width of the text column */
.prose p.pull { font-size: 22px; line-height: 1.45; letter-spacing: -0.005em; }
@media (max-width: 720px) { .prose p.pull { font-size: 18px; } }
/* Final poster: crisper corners, and it opens larger on click */
.poster-frame img { border-radius: 4px; }
.zoomable { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.zoomable img { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.zoomable:hover img { transform: translateY(-3px); box-shadow: 0 16px 36px var(--shadow); }
.zoomable:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 4px; }

/* Viewer: the whole poster, as large as the screen allows */
.zoom-view img { display: block; max-height: 92vh; max-width: 92vw; width: auto; height: auto; border-radius: 2px; }
.zoom-view .lb-close { position: fixed; z-index: 1; background: rgba(30, 30, 28, 0.6); }
.prose.airy p { margin-bottom: 24px; }
.prose.airy p:last-child { margin-bottom: 0; }
/* Poster iterations: two per row so the drafts are big enough to read */
.iter-grid ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 28px; list-style: none; margin: 12px 0 0; padding: 0; }
.iter-grid .iter-name { margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--surface); font-size: 13px; color: var(--muted); letter-spacing: 0.02em; }
.iter-grid .iter-name span { margin-right: 8px; font-size: 11px; color: var(--faint); }
.iter-grid figure { margin: 0 0 12px; aspect-ratio: 7 / 10; border-radius: 6px; overflow: hidden; background: var(--surface); }
.iter-grid img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.iter-grid li > p:last-child { margin: 0; font-size: 13px; line-height: 1.6; color: color-mix(in srgb, var(--ink) 72%, var(--muted)); }
@media (max-width: 720px) { .iter-grid ol { gap: 28px 14px; } .iter-grid li > p:last-child { font-size: 12px; } }
/* Clickable iteration thumbnails fill their frame; the viewer shows the full uncropped image */
.iter-grid .zoomable { height: 100%; }
.iter-grid .zoomable img { border-radius: 0; }
.iter-grid .zoomable:hover img { transform: scale(1.02); box-shadow: none; }
/* Row headings ("1st drafts", "2nd drafts") span both columns */
.iter-grid .iter-row-head { grid-column: 1 / -1; margin-bottom: -24px; padding-bottom: 10px; border-bottom: 1px solid var(--surface); font-size: 13px; color: var(--muted); letter-spacing: 0.02em; }
@media (max-width: 720px) { .iter-grid .iter-row-head { margin-bottom: -16px; } }
.iter-grid ol { margin-top: 24px; }
/* One shared note under a row of drafts */
.iter-grid .iter-row-note { grid-column: 1 / -1; margin-top: -16px; }
.iter-grid .iter-row-note p { max-width: 640px; }
.prose p.lead strong { font-weight: 600; }
/* Seed packet pairs: two per row, crisp corners, click to view larger */
.packet-pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; list-style: none; margin: 16px 0 0; padding: 0; }
.packet-pairs img { display: block; width: 100%; height: auto; border-radius: 4px; }
.packet-pairs span { display: block; margin-top: 8px; font-size: 11px; letter-spacing: 0.04em; color: var(--muted); }
@media (max-width: 720px) { .packet-pairs { gap: 16px 10px; } }
.packet-pairs span { margin-top: 12px; text-align: center; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
/* Packet iterations: tall sketch on the left, the two drafts stacked beside it; images keep their own shape */
.iter-feature ol { grid-template-rows: auto auto; gap: 28px 28px; }
.iter-feature .iter-tall { grid-row: span 2; }
.iter-feature figure { aspect-ratio: auto; }
.iter-feature img { height: auto; }
@media (max-width: 720px) { .iter-feature ol { grid-template-columns: 1fr; } .iter-feature .iter-tall { grid-row: auto; } }
/* About bio: darker text and more room between paragraphs */
.bio p { margin-bottom: 22px; color: color-mix(in srgb, var(--ink) 80%, var(--muted)); }
.bio p:last-child { margin-bottom: 0; }
/* Signature under the bio, bottom right of the text column, level with the bottom of the photo */
.about .bio { align-self: stretch; display: flex; flex-direction: column; }
.signature { display: block; width: 210px; height: auto; margin: auto 0 0 auto; padding-top: 32px; overflow: visible; }
.signature path { fill: none; stroke: #6789a3; stroke-width: 7.5; stroke-linecap: round; stroke-linejoin: round; }
.signature.ready path { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .signature path { stroke: #9bb8d0; } }
:root[data-theme="dark"] .signature path { stroke: #9bb8d0; }
@media (max-width: 720px) { .signature { width: 170px; margin-top: 8px; } }
/* Signature: black (white in dark mode), a bit smaller */
.signature { width: 160px; }
.signature path, :root[data-theme="dark"] .signature path { stroke: var(--ink); stroke-width: 8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .signature path { stroke: var(--ink); } }
@media (max-width: 720px) { .signature { width: 140px; } }
.slides img { border-radius: 4px; }
/* Duckweather "Try it" card: whole card links to the live site */
.try-card { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: center; gap: 28px; padding: 32px; border-radius: 14px; color: #2b2b2b; transition: transform 0.35s ease, box-shadow 0.35s ease; }
.try-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(60, 80, 110, 0.18); }
.try-kicker { margin: 0 0 10px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(43, 43, 43, 0.6); }
.try-title { margin: 0; font-size: 22px; line-height: 1.3; letter-spacing: -0.005em; text-wrap: balance; }
.try-sub { margin: 10px 0 22px; font-size: 13px; line-height: 1.6; color: rgba(43, 43, 43, 0.72); }
.try-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: #2b2b2b; color: #fff; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; transition: gap 0.25s ease; }
.try-btn svg { width: 14px; height: 14px; }
.try-card:hover .try-btn { gap: 12px; }
.try-card .mock { width: 100%; }
:root[data-theme="dark"] .try-card { color: #f2f1ee; }
:root[data-theme="dark"] .try-kicker, :root[data-theme="dark"] .try-sub { color: rgba(242, 241, 238, 0.7); }
:root[data-theme="dark"] .try-btn { background: #f2f1ee; color: #1a1a1a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .try-card { color: #f2f1ee; }
  :root:not([data-theme="light"]) .try-kicker, :root:not([data-theme="light"]) .try-sub { color: rgba(242, 241, 238, 0.7); }
  :root:not([data-theme="light"]) .try-btn { background: #f2f1ee; color: #1a1a1a; }
}
@media (max-width: 720px) { .try-card { grid-template-columns: 1fr; padding: 22px; gap: 20px; } .try-title { font-size: 19px; } }
/* Viewer arrows: shown when the image belongs to a group */
.zoom-view[open] { align-items: center; justify-content: center; }
.zoom-view img { max-width: min(92vw, calc(100vw - 160px)); }
.zoom-view.single .lb-nav { display: none; }
.zoom-view.single img { max-width: 92vw; }
/* Bottom of case studies: back to work on the left, next project on the right */
.case-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-top: 72px; padding-top: 24px; }
.next-project { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.next-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.next-title { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; color: var(--ink); transition: gap 0.25s ease; }
.next-title svg { width: 16px; height: 16px; }
.next-project:hover .next-title { gap: 12px; }
/* Next project title in the same small caps as "back to work" */
.case-foot { align-items: center; }
.next-project { flex-direction: row; align-items: center; gap: 6px; }
.next-label { font-size: 12px; letter-spacing: 0.04em; color: var(--faint); }
.next-label::after { content: ":"; }
.next-title { gap: 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); transition: color 0.2s ease, gap 0.25s ease; }
.next-title svg { width: 14px; height: 14px; }
.next-project:hover .next-title { color: var(--ink); gap: 9px; }
/* A Night to Remember: pale concrete fading down into the flyer's night blue */
.card-frame.night { background: linear-gradient(180deg, #d8d6d1 0%, #bcbcbd 45%, #8e97ad 100%); }
.team span { margin-top: 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.team-note { margin-top: 20px; }
/* A Night to Remember type & color: two specimens, five swatches */
.specimens.two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 560px; margin-left: auto; margin-right: auto; }
.spec .aa.poppins { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 86px; }
.spec .aa-img { display: block; height: 76px; width: auto; margin: -12px auto 14px; }
.swatches.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .spec .aa-img { filter: invert(1); } }
:root[data-theme="dark"] .spec .aa-img { filter: invert(1); }
@media (max-width: 720px) { .spec .aa.poppins { font-size: 60px; } .spec .aa-img { height: 52px; margin-top: -8px; } .swatches.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
#brand .type-color-row { margin-top: 8px; }
/* Photobooth: large mockup on its own, then the three panels at equal height filling the width (no grey boxes) */
.booth { display: block; margin-top: 32px; }
.booth figure { margin: 0; }
.booth-main img { display: block; height: min(560px, 70vw); width: auto; margin: 0 auto; }
.booth-panels { display: grid; grid-template-columns: 836fr 836fr 506fr; gap: 16px; margin-top: 40px; align-items: start; }
.booth-panels img { display: block; width: 100%; height: auto; border-radius: 4px; }
@media (max-width: 720px) { .booth-panels { gap: 8px; margin-top: 24px; } }
/* Totten stages: two per row, full drawing visible, click to view larger */
.steps.big { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 28px; margin-top: 12px; }
.steps.big figure { aspect-ratio: 720 / 1036; border-radius: 6px; margin-bottom: 12px; }
.steps.big .zoomable { height: 100%; }
.steps.big .zoomable img { border-radius: 0; }
.steps.big .zoomable:hover img { transform: scale(1.02); box-shadow: none; }
.steps.big .step-n { font-size: 13px; }
.steps.big p { font-size: 13px; }
@media (max-width: 720px) { .steps.big { gap: 20px 12px; } }
.art-caption small:only-child { text-align: left; }
/* About photos: sharp corners like the art gallery */
.photo, .oc-photos li { border-radius: 2px; }
/* Duck line drawings in dark mode: swap to a cream-filled "sticker" version instead of inverting
   (inverting turned the eyes white, which looked spooky) */
.only-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-light { display: none !important; }
  :root:not([data-theme="light"]) .only-dark { display: block !important; }
}
:root[data-theme="dark"] .only-light { display: none !important; }
:root[data-theme="dark"] .only-dark { display: block !important; }
.frame.sketch.base img { filter: none !important; }
.frame.sketch img.no-invert { filter: none !important; }
/* Hero illustration: the pond duck fills the stage, with the lamp hanging over it */
.placeholder { height: auto; aspect-ratio: 2000 / 1100; border-radius: 2px; overflow: hidden; }
.hero-art { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; display: block; transition: filter 0.6s ease; }
/* Lamp off: the pond dims to night so the fireflies glow */
:root[data-theme="dark"] .hero-art { filter: brightness(0.62) saturate(0.9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero-art { filter: brightness(0.62) saturate(0.9); } }
@media (max-width: 720px) { .placeholder { height: auto; aspect-ratio: 4 / 3; } }
/* Hero illustration: soft, cloudy edges that fade into the page (a blurred, scalloped mask) */
.placeholder { overflow: visible; border-radius: 0; }
.hero-art {
  -webkit-mask-image: url("assets/hero/fog-mask.png?v=8"); mask-image: url("assets/hero/fog-mask.png?v=8");
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
/* Pond ripples: drawn over the illustration, faded at the same cloudy edge */
.placeholder { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ripples {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  -webkit-mask-image: url("assets/hero/fog-mask.png?v=8"); mask-image: url("assets/hero/fog-mask.png?v=8");
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
}
.ripple { position: absolute; width: 140px; height: 140px; margin: -70px 0 0 -70px; }
.ripple svg { width: 100%; height: 100%; overflow: visible; }
/* Hand-painted look: soft blue and slate brush arcs that spread slowly and fade */
.ripple .rg { transform-box: view-box; transform-origin: 100px 100px; }   /* spread by script, on held frames */
.ripple .rg.blue path { fill: rgba(74, 126, 172, 0.6); }
.ripple .rg.slate path { fill: rgba(58, 92, 104, 0.4); }
@media (prefers-reduced-motion: reduce) {
  .ripple .rg { animation: ripple-fade 0.8s ease both; scale: 0.5; }
  @keyframes ripple-fade { from { opacity: 0.8; } to { opacity: 0; } }
}
/* Hero image can't be dragged or selected; clicks pass through to the pond for ripples */
.hero-art { pointer-events: none; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
.placeholder { cursor: default; user-select: none; -webkit-user-select: none; }
/* Quieter ripples (a leaf landing): a little wider, slower and fainter than a tap */
.ripple.ambient { width: 180px; height: 180px; margin: -90px 0 0 -90px; }
.ripple.ambient .rg.blue path { fill: rgba(74, 126, 172, 0.42); }
.ripple.ambient .rg.slate path { fill: rgba(58, 92, 104, 0.28); }
/* Home: the pond fills the first screen, centred, with the arrow just below it */
.hero {
  --nav-h: 64px;
  min-height: calc(100svh - var(--nav-h));
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding-top: 0; padding-bottom: 12px;
}
.hero.wrap { max-width: 1040px; }
.hero .placeholder { width: min(100%, calc((100svh - var(--nav-h) - 96px) * 2000 / 1100)); }
.hero .scroll-cue { margin-top: 18px; animation: cue-bob 2.4s ease-in-out infinite; }
@keyframes cue-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .hero .scroll-cue { animation: none; } }
@media (max-width: 720px) {
  .hero { --nav-h: 96px; }
  .hero .placeholder { width: 100%; }
}
/* Lamp cord fades in from the top so it melts into the cloudy edge of the pond */
.hero .lamp-cord { -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 70%); mask-image: linear-gradient(to bottom, transparent 0%, #000 70%); }
/* Fireflies glow when the lamp is off: soft lights placed over the painted ones, gently twinkling.
   The layer matches how the picture is cropped (cover, centred at 52%). */
.fireflies { position: absolute; left: 0; width: 100%; aspect-ratio: 2000 / 1390; top: 52%; transform: translateY(-52%); opacity: 0; transition: opacity 0.8s ease; }
.fireflies span {
  position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%;
  background: #fff6c8;
  box-shadow: 0 0 6px 2px rgba(255, 230, 140, 0.95), 0 0 18px 7px rgba(255, 205, 90, 0.5), 0 0 40px 14px rgba(255, 190, 70, 0.18);
  scale: var(--s);
  animation: firefly var(--t) ease-in-out var(--d) infinite;
}
@keyframes firefly { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
:root[data-theme="dark"] .fireflies { opacity: 1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fireflies { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fireflies span { animation: none; } }
@media (max-width: 720px) { .fireflies { top: 0; height: 100%; width: auto; left: 50%; transform: translateX(-50%); } }
/* The duck, in pieces over the pond: same crop as the picture (cover, centred at 52%) */
.pond-stage { position: absolute; left: 0; width: 100%; aspect-ratio: 2360 / 1640; top: 52%; transform: translateY(-52%); z-index: -1; pointer-events: none; transition: filter 0.6s ease; }
.pond-duck { position: absolute; inset: 0; transform-origin: 47.5% 52.5%; will-change: transform; }
.duck-part { position: absolute; height: auto; display: block; user-select: none; -webkit-user-drag: none; will-change: transform; }
.duck-part.wing-l { transform-origin: 88% 22%; }
.duck-part.wing-r { transform-origin: 55% 9%; }
.duck-part.foot-l { transform-origin: 62% 40%; }
.duck-part.foot-r { transform-origin: 45% 12%; }
:root[data-theme="dark"] .pond-stage { filter: brightness(0.62) saturate(0.9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pond-stage { filter: brightness(0.62) saturate(0.9); } }
@media (max-width: 720px) { .pond-stage { top: 0; height: 100%; width: auto; left: 50%; transform: translateX(-50%); } }
/* Sunlight through the leaves: two faint warm patches drifting near the top of the pond (daytime only) */
.dapples { position: absolute; inset: 0; transition: opacity 0.8s ease; }
.dapples i {
  position: absolute; width: 34%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 246, 214, 0.12), rgba(255, 246, 214, 0.035) 55%, transparent);
  mix-blend-mode: soft-light; animation: dapple 34s ease-in-out infinite alternate;
}
.dapples i:nth-child(1) { left: 6%;  top: 8%;  animation-duration: 38s; }
.dapples i:nth-child(2) { left: 58%; top: 2%;  width: 26%; animation-duration: 29s; animation-delay: -9s; }
@keyframes dapple {
  0%   { transform: translate(0, 0) scale(1);       opacity: 0.6; }
  35%  { transform: translate(6%, 4%) scale(1.08);  opacity: 1; }
  70%  { transform: translate(-3%, 9%) scale(0.95); opacity: 0.75; }
  100% { transform: translate(5%, -4%) scale(1.04); opacity: 0.9; }
}
:root[data-theme="dark"] .dapples { opacity: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dapples { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .dapples i { animation: none; } }
/* A willow leaf floating across the pond */
.drift-leaf { position: absolute; left: 0; top: 0; height: auto; margin: -2% 0 0 -1.5%; pointer-events: none; user-select: none; filter: var(--tint, none); }
:root[data-theme="dark"] .drift-leaf { filter: var(--tint, none) brightness(0.62) saturate(0.9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .drift-leaf { filter: var(--tint, none) brightness(0.62) saturate(0.9); } }
/* Daytime fireflies: the painted ones now live here, so they show with the light on too (softer, like the painting) */
.fireflies { opacity: 1; }
.fireflies span { background: #ffe58a; box-shadow: 0 0 4px 2px rgba(255, 214, 96, 0.75), 0 0 12px 5px rgba(255, 200, 80, 0.35); transition: box-shadow 0.8s ease, background 0.8s ease; }
:root[data-theme="dark"] .fireflies span { background: #fff6c8; box-shadow: 0 0 6px 2px rgba(255, 230, 140, 0.95), 0 0 18px 7px rgba(255, 205, 90, 0.5), 0 0 40px 14px rgba(255, 190, 70, 0.18); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fireflies span { background: #fff6c8; box-shadow: 0 0 6px 2px rgba(255, 230, 140, 0.95), 0 0 18px 7px rgba(255, 205, 90, 0.5), 0 0 40px 14px rgba(255, 190, 70, 0.18); } }
/* The lamp's warm light falls over the whole scene (duck, ripples and leaves too), still under the lamp itself */
.hero .lamp-glow { z-index: 0; }
/* Branches over the pond: they sit above the duck, and sway from their stems */
.branch { position: absolute; height: auto; display: block; user-select: none; -webkit-user-drag: none; will-change: transform; }
.duck-part.plants { transform-origin: 50% 80%; }
/* The WebGL water takes over from the picture once it's ready */
.hero-art.water[hidden] { display: none; }
/* Little plants floating on the pond */
.floater { position: absolute; height: auto; display: block; user-select: none; -webkit-user-drag: none; transform-origin: 50% 60%; will-change: transform; }
