/* ==========================================================================
   Cailin Kuhn — Portfolio
   Built from Figma frame "Sep.29.2" (1920 × 4450). Sizes scale fluidly
   down from the 1920px design; values in comments are the design px.
   ========================================================================== */

:root {
  /* Colors */
  --c-bg: #fff6e3;
  --c-ink: #20383c;        /* headings, body copy, rules */
  --c-navy: #132845;       /* buttons */
  --c-nav: #546e73;        /* header nav + theme toggle */
  --c-button: #20383c;     /* pill buttons */
  --c-footer-bg: #546e73;
  --c-footer-head: #fff6e3;
  --c-footer-text: #dad2c1;

  /* Type */
  --f-display: "East Sea Dokdo", "Comic Sans MS", cursive;
  --f-body: "Hanken Grotesk", system-ui, sans-serif;
  --f-button: "Darker Grotesque", "Hanken Grotesk", sans-serif;

  --fs-body: clamp(17px, 1.667vw, 32px);   /* 32 */
  --fs-meta: clamp(14px, 1.25vw, 24px);    /* 24 */
  --fs-nav: clamp(15px, 1.302vw, 25px);    /* 25 */
  --fs-button: clamp(17px, 1.25vw, 24px);  /* 24 */
  --fs-tag: clamp(13px, 1.042vw, 20px);    /* 20 */

  /* Spacing */
  --px: clamp(20px, 3.906vw, 75px);            /* page gutter 75 */
  --gap: clamp(14px, 1.302vw, 25px);           /* grid gap 25 */
  --sp-section: clamp(96px, 10.104vw, 194px);  /* between sections 194 */
  --sp-label: clamp(28px, 3.125vw, 60px);      /* label → title 60 */
  --sp-title: clamp(40px, 6.667vw, 128px);     /* title → cards 128 */
  --sp-content: clamp(28px, 2.917vw, 56px);    /* label → about content 56 */
  --sp-action: clamp(28px, 2.5vw, 48px);       /* content → button 48 */
  --sp-card-title: clamp(14px, 1.354vw, 26px); /* image → title 26 */
  --sp-card-meta: clamp(10px, 0.781vw, 15px);  /* title → meta 15 */

  --radius: 5px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

:root[data-theme="dark"] {
  --c-bg: #132845;
  --c-ink: #fff6e3;
  --c-navy: #fff6e3;
  --c-nav: #749eb8;
  --c-button: #fff6e3;
  --c-footer-bg: #749EB8;
  --c-footer-head: #132845;
  --c-footer-text: #30496d;
}

/* ---------- Base ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: normal;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}

h1, h2, h3, p, ul { margin: 0; }
ul[role="list"] { list-style: none; padding: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: var(--px);
  top: -100px;
  padding: 8px 16px;
  background: var(--c-navy);
  color: var(--c-bg);
  z-index: 10;
}
.skip-link:focus { top: 16px; }

/* Content column: 1770 wide at 1920 with 75 gutters. Also a size container
   so display type can scale with it (cqi). */
.wrap {
  width: 100%;
  max-width: 1920px;
  margin-inline: auto;
  padding-inline: var(--px);
  container-type: inline-size;
}

/* Trim text boxes to cap height / baseline, matching Figma's text-box-trim. */
.label,
.display,
.hero__tagline,
.status__currently,
.status__availability-text,
.card__title,
.card__meta,
.card__tag,
.case__facts dt,
.case__facts dd,
.case__description,
.site-footer__signal,
.about__text,
.about-intro__hello,
.about-intro__body,
.specs__title,
.specs__list li,
.specs__log p,
.sightings__intro p,
.sightings__empty,
.field-note__tag,
.field-note__name,
.field-note__latin,
.field-note__facts dt,
.field-note__facts dd,
.field-note__note,
.pill-button__label,
.site-footer__tagline,
.footer-col__title,
.footer-col li {
  text-box: trim-both cap alphabetic;
}

/* Copy that changes with the theme: land (light) / sea (dark). */
.dark-only { display: none; }
[data-theme="dark"] .light-only { display: none; }
[data-theme="dark"] .dark-only { display: revert; }

/* Icons use the Figma SVGs as masks so they follow the current text color. */
.icon {
  display: block;
  background-color: currentColor;
  -webkit-mask: var(--icon) center / 100% 100% no-repeat;
          mask: var(--icon) center / 100% 100% no-repeat;
}
.icon--sun   { --icon: url("../assets/icons/sun.svg");   width: 21.5px;    height: 21.5px; }
.icon--moon  { --icon: url("../assets/icons/moon.svg");  width: 19.4px;    height: 19.4px; }
.icon--arrow { --icon: url("../assets/icons/arrow-dark.svg"); width: 31.4176px; height: 25.7456px; }

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

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-top: clamp(20px, 2.292vw, 44px);  /* 44 */
}

.site-header__logo {
  justify-self: start;
  width: clamp(56px, 5.104vw, 98px);        /* 98 × 99 */
  margin-left: -6px;                        /* logo sits at x=69 vs 75 gutter */
}
.site-header__logo .logo {
  width: 100%;
  height: auto;
  transition: transform .45s cubic-bezier(.34, 1.56, .64, 1);   /* slight overshoot, like a head tilt */
}
/* Hover: the creature cocks its head. Click: a quick squish. */
.site-header__logo:hover .logo,
.site-header__logo:focus-visible .logo { transform: rotate(-10deg) scale(1.06); }
.site-header__logo:active .logo { transform: rotate(-4deg) scale(.9); transition-duration: .12s; }
/* Header + footer logos swap per theme. */
.logo--dark { display: none; }
[data-theme="dark"] .logo--light { display: none; }
[data-theme="dark"] .logo--dark { display: block; }

.site-nav {
  display: flex;
  gap: clamp(20px, 2.604vw, 50px);          /* 50 */
  font-size: var(--fs-nav);
  font-weight: 500;
  color: var(--c-nav);
  white-space: nowrap;
}
.site-nav a {
  position: relative;
  padding-bottom: 2px;
}
/* Underline is its own layer so land mode can give it a pencil edge. */
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }

.theme-toggle {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--c-nav);
  font: 300 var(--fs-nav) / normal var(--f-body);
  cursor: pointer;
}
.theme-toggle__icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  transition: transform .5s var(--ease);
}
.theme-toggle:hover .theme-toggle__icon { transform: rotate(45deg); }

/* Sun (20px) in light mode, moon (18px) in dark mode. */
.icon--moon { display: none; }
[data-theme="dark"] .icon--sun { display: none; }
[data-theme="dark"] .icon--moon { display: block; }
[data-theme="dark"] .theme-toggle__icon { width: 18px; height: 18px; }
[data-theme="dark"] .theme-toggle:hover .theme-toggle__icon { transform: rotate(-20deg); }

/* ---------- Section label row ("01.Welcome_User ——— right text") ---------- */

.label-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.label { font-size: var(--fs-body); font-weight: 400; white-space: nowrap; }
.label--end { text-align: right; }
.rule {
  flex: 1;
  min-width: 40px;
  height: 2px;
  margin-top: 6px;               /* rule sits 14px below the label's cap top */
  border-radius: 1px;
  background: currentColor;
}

/* ---------- Display type ---------- */

.display {
  font-family: var(--f-display);
  font-weight: 400;
  white-space: nowrap;
}
.display--hero    { font-size: 22.55cqi; }                          /* 400 */
.display--section { font-size: 11.3cqi; margin-top: var(--sp-label); } /* 200 */
.display--section.display--tight { margin-top: clamp(22px, 2.292vw, 44px); } /* 44 */

/* ---------- 01 Hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: calc(min(100svh, 1080px) + 14px);  /* +20px below the nav for the hero interaction; tagline ends at y=1094 */
  padding-top: 260px;
}
/* Flock / school canvas (js/flock.js), placed by JS between the nav and the 01 label. */
.hero { position: relative; }
.flock {
  position: absolute;
  left: 0;
  width: 100%;
  pointer-events: none;
}

.hero .display--hero { margin-top: clamp(24px, 2.969vw, 57px); }   /* 57 */
.hero__tagline { margin-top: clamp(28px, 6.354vw, 122px); }        /* 122 */

/* Status under the name (Figma "Oct.5.1-light" › introduction):
   "currently …" at 32px, then an indented availability line with a pulsing dot. */
.hero:has(.status) { min-height: calc(min(100svh, 1080px) + 74px); }  /* status ends at y=1154; 01 label at y=724 */
.status { margin-top: clamp(28px, 6.354vw, 122px); }               /* 122 */
.status__currently { font-size: var(--fs-body); }
.status__availability {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: clamp(12px, 1.198vw, 23px);                           /* 23 */
  margin-left: clamp(6px, 0.625vw, 12px);                           /* indented 12 */
  font-size: var(--fs-meta);
}
.status__dot {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--c-nav);
  animation: status-pulse 2.4s ease-out infinite;
}
@keyframes status-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c-nav) 60%, transparent); }
  100% { box-shadow: 0 0 0 10px transparent; }
}

/* The availability line sits in the space above Featured Work, so that gap
   is 40px shorter than the other section gaps (194 → 154). */
.hero:has(.status) + .section { padding-top: calc(var(--sp-section) - clamp(20px, 2.083vw, 40px)); }

/* ---------- Sections ---------- */

.section { padding-top: var(--sp-section); }
.section--page-top { padding-top: clamp(160px, 11.458vw, 220px); }  /* first section on inner pages: label at y=220 */

.section__action {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--sp-action);
}

/* ---------- Cards ---------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: var(--sp-title);
}

.card { display: flex; flex-direction: column; }
.card__media {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--c-ink) 8%, transparent);
}
.card__media img,
.card__media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.card:hover .card__media img,
.card:hover .card__media video { transform: scale(1.04); }

.card__media--featured { aspect-ratio: 573 / 384; }

/* Two-up featured grid (Figma "Oct.5.2-light"): 873 × 528 images, 80px between rows. */
.work-grid--pairs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  row-gap: clamp(40px, 4.167vw, 80px);
}
.work-grid--pairs .card__media--featured { aspect-ratio: 873 / 528; }

/* Title row: project title left, specimen tag right, vertically centered. */
.card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: var(--sp-card-title);
}
.card__head .card__title { margin-top: 0; }
.card__tag {
  font-size: var(--fs-tag);
  color: var(--c-nav);
  white-space: nowrap;
}
.card__media--play     { aspect-ratio: 374 / 320; }

.card__title {
  margin-top: var(--sp-card-title);
  font-size: var(--fs-body);
  font-weight: 700;
}
.card__meta {
  margin-top: var(--sp-card-meta);
  font-size: var(--fs-meta);
}

/* ---------- Case study pages ---------- */

.case__hero {
  margin: var(--sp-title) 0 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
}
.case__hero img { width: 100%; height: 100%; object-fit: cover; }

/* Same 3-column rhythm as About: details left, description across 2 columns. */
.case__intro {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: start;
  margin-top: clamp(48px, 4.167vw, 80px);                           /* 80 */
}
.case__facts {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 1.667vw, 32px);                                  /* 32 */
  margin: 0;
}
.case__facts dt { font-size: var(--fs-tag); color: var(--c-nav); }
.case__facts dd { margin: var(--sp-card-meta) 0 0; font-size: var(--fs-body); }
.case__body { grid-column: 2 / 4; }
.case__body .pill-button { margin-top: var(--sp-action); }

.case__media {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  margin-top: var(--sp-title);
}
.case__media video,
.case__media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}
.case__media video { background: #000; }

/* Full / condensed switch. Anything marked data-only shows in that view only. */
.case[data-case-view="full"] [data-only="condensed"],
.case[data-case-view="condensed"] [data-only="full"] { display: none; }

.case-view {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px var(--gap);
  margin-top: clamp(48px, 4.167vw, 80px);                           /* 80 */
}
.case-view__hint { font-size: var(--fs-meta); color: var(--c-nav); }
.case-view__switch {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  padding: 4px;
  border-radius: 50px;
}
.case-view__switch::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 2px solid var(--c-button);
  border-radius: inherit;
}
.case-view__switch button {
  padding: 10px clamp(18px, 1.354vw, 26px);
  border: 0;
  border-radius: 50px;
  background: none;
  color: var(--c-button);
  font: 700 var(--fs-button) / 1 var(--f-button);
  cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.case-view__switch button[aria-pressed="true"] { background: var(--c-button); color: var(--c-bg); }

/* Sections: title on the left, content across two columns (like the intro). */
.case { counter-reset: case-section; }
.case-section {
  counter-increment: case-section;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: var(--sp-content);
  align-items: start;
  margin-top: var(--sp-section);
}
.case-view + .case-section { margin-top: var(--sp-title); }
.case-section__head { display: flex; flex-direction: column; gap: clamp(12px, 1.042vw, 20px); }
.case-section__head::before {
  content: counter(case-section, decimal-leading-zero);
  font-size: var(--fs-tag);
  color: var(--c-nav);
}
.case-section__title {
  font-family: var(--f-display);
  font-size: clamp(44px, 4.52cqi, 80px);                            /* 80 */
  font-weight: 400;
  line-height: .9;
}
.case-section__q { font-size: var(--fs-meta); color: var(--c-nav); max-width: 22em; }
.case-section__body { grid-column: 2 / 4; min-width: 0; }
.case-section--wide .case-section__body { grid-column: 1 / -1; }
.case-section__body > * + * { margin-top: var(--sp-action); }

.case__facts--grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 1.667vw, 32px) var(--gap);
}
.case__facts--grid dd,
.case__facts--stack dd { font-size: var(--fs-meta); line-height: 1.3; text-box: none; }
.is-placeholder { color: var(--c-nav); font-style: italic; }

/* Design decisions: numbered 2×2 grid (full study), a single column inside Approach (condensed). */
.decisions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-content) var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
.decisions--stack { grid-template-columns: 1fr; gap: 24px; margin-top: var(--sp-card-meta); }
.decisions--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.decision { display: flex; flex-direction: column; gap: 12px; }
.decision__num { font-size: var(--fs-tag); color: var(--c-nav); }
.decision__title { font-size: var(--fs-body); font-weight: 700; line-height: 1.15; }
.decision__text { font-size: var(--fs-meta); line-height: 1.35; }
.decisions--stack .decision { gap: 6px; }
.decisions--stack .decision__title { font-size: var(--fs-meta); }

/* Quiet secondary link (e.g. the process deck): muted text, underline, small arrow. */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--c-nav);
  font-size: var(--fs-meta);
  transition: color .25s var(--ease);
}
.text-link__label { position: relative; padding-bottom: 4px; }
.text-link__label::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: currentColor;
  opacity: .5;
  transition: opacity .25s var(--ease);
}
.text-link .icon--arrow {
  width: 18px;
  height: 15px;
  transition: transform .3s var(--ease);
}
.text-link:hover { color: var(--c-ink); }
.text-link:hover .text-link__label::after { opacity: 1; }
.text-link:hover .icon--arrow { transform: translate(3px, -3px); }   /* the icon points up-right: opens elsewhere */

/* Placeholder frames for screens still to come. */
.case-grid { display: grid; gap: var(--gap); }
.case-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.case-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.case-grid__full { grid-column: 1 / -1; }
.case-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.case-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* Logo lockups: each centered in a soft square tile. */
.lockup {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 14%;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--c-ink) 5%, transparent);
}
.lockup .zoom-trigger img { border-radius: 0; }

/* Pages without the full/condensed switch: first section sits closer to the hero. */
.case__hero + .case-section { margin-top: var(--sp-title); }

.case-figure { margin: 0; }
.case-section__body > .case-figure { margin-top: clamp(40px, 4.167vw, 80px); }   /* 80: more air between copy and images */
.case-figure__caption {
  max-width: 46em;
  margin-top: 16px;
  color: var(--c-nav);
  font-size: var(--fs-meta);
  line-height: 1.35;
}

/* Merchandise: large shirt + tag detail on top, tote and hat below. */
.merch {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--gap);
}
.merch > * { grid-column: span 3; }
.merch > .merch__main { grid-column: span 4; }
.merch > .merch__side { grid-column: span 2; aspect-ratio: auto; }
.merch img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.placeholder {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  aspect-ratio: var(--ratio, 16 / 9);
  padding: 16px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--c-ink) 5%, transparent);
  text-align: center;
}
.placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 2px dashed color-mix(in srgb, var(--c-ink) 40%, transparent);
  border-radius: inherit;
}
.placeholder__name { font-size: var(--fs-meta); font-weight: 700; }
.placeholder__note { font-size: var(--fs-tag); color: var(--c-nav); }

/* Iteration: version tabs + annotated screens. */
.versions__tabs { display: flex; flex-wrap: wrap; gap: 10px; }
.versions__tabs [role="tab"] {
  position: relative;
  isolation: isolate;
  padding: 12px clamp(20px, 1.563vw, 30px);
  border: 0;
  border-radius: 50px;
  background: none;
  color: var(--c-button);
  font: 700 var(--fs-button) / 1 var(--f-button);
  cursor: pointer;
  transition: color .25s var(--ease);
}
.versions__tabs [role="tab"]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 2px solid var(--c-button);
  border-radius: inherit;
  transition: background-color .25s var(--ease);
}
.versions__tabs [role="tab"][aria-selected="true"] { color: var(--c-bg); }
.versions__tabs [role="tab"][aria-selected="true"]::before { background: var(--c-button); }
.versions__summary { font-size: var(--fs-meta); }
.versions__panel > * + * { margin-top: var(--sp-content); }

.annotated {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 24px;
  align-items: start;
}
.annotated__screen {
  position: relative;
  grid-column: 1 / 3;
  margin: 0;
}
.annotated__screen img { width: 100%; height: auto; border-radius: var(--radius); }

.pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  place-items: center;
  width: clamp(28px, 1.875vw, 36px);
  height: clamp(28px, 1.875vw, 36px);
  margin: calc(clamp(28px, 1.875vw, 36px) / -2) 0 0 calc(clamp(28px, 1.875vw, 36px) / -2);
  padding: 0;
  border: 2px solid #20383c;
  border-radius: 50%;
  background: #fff6e3;
  color: #20383c;
  font: 700 var(--fs-tag) / 1 var(--f-button);
  cursor: pointer;
  box-shadow: 0 2px 10px rgb(0 0 0 / .25);
  transition: transform .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.pin:hover { transform: scale(1.12); }
.pin[aria-pressed="true"] { background: #20383c; color: #fff6e3; transform: scale(1.12); }
.pin[aria-pressed="false"]::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid #fff6e3;
  animation: pin-ping 2.4s ease-out infinite;
}
@keyframes pin-ping {
  0%   { transform: scale(1);   opacity: .9; }
  70%, 100% { transform: scale(1.8); opacity: 0; }
}

.annotated__notes { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.note { border-bottom: 2px solid color-mix(in srgb, var(--c-ink) 20%, transparent); }
.note__btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 0;
  border: 0;
  background: none;
  color: inherit;
  font: 400 var(--fs-meta) / 1.25 var(--f-body);
  text-align: left;
  cursor: pointer;
}
.note__num {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid currentColor;
  border-radius: 50%;
  font: 700 var(--fs-tag) / 1 var(--f-button);
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.note.is-active .note__title { font-weight: 700; }
.note.is-active .note__num { background: var(--c-ink); color: var(--c-bg); }
.note:not(.is-active) .note__text { display: none; }
.note__text { padding: 0 0 16px 44px; font-size: var(--fs-meta); line-height: 1.35; }
.note.is-active .note__text { animation: note-in .35s var(--ease); }

/* Case media: screens, research boards and the demo video. */
.case-grid > img,
.case-grid .zoom-trigger img,
.case-section__body .media-frame video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}
.media-frame { position: relative; }
.media-frame video { background: #000; }

/* ---------- Lightbox (js/lightbox.js) ---------- */

.zoom-trigger {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: none;
  color: inherit;
  cursor: zoom-in;
}
.zoom-trigger img { transition: transform .4s var(--ease), filter .4s var(--ease); }
/* Theme-specific images (e.g. land/sea wordmarks): the button takes over their show/hide. */
.zoom-trigger.dark-only,
[data-theme="dark"] .zoom-trigger.light-only { display: none; }
[data-theme="dark"] .zoom-trigger.dark-only { display: block; }
.zoom-trigger:hover img { filter: brightness(1.04); }
.case__hero .zoom-trigger { overflow: hidden; }
.case__hero .zoom-trigger:hover img { transform: scale(1.015); }

.zoom-button {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(19 40 69 / .7);
  color: #fff6e3;
  cursor: zoom-in;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.zoom-button:hover { background: rgb(19 40 69 / .9); transform: scale(1.08); }
.zoom-button svg,
.lightbox__close svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

html.has-lightbox { overflow: hidden; }

.lightbox {
  --lb-pad-y: clamp(56px, 5vw, 96px);
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}
.lightbox::backdrop {
  background: rgb(8 16 26 / .78);
  backdrop-filter: blur(3px);
}
.lightbox[open],
.lightbox[open]::backdrop { animation: lightbox-in .25s var(--ease); }
.lightbox__stage {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);   /* lets the media's max-height: 100% resolve */
  place-items: center;
  width: 100%;
  height: 100%;
  padding: var(--lb-pad-y) clamp(16px, 4vw, 96px);
}
.lightbox__media {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgb(0 0 0 / .45);
  animation: lightbox-zoom .3s var(--ease);
}
/* Videos have no intrinsic size until loaded: fit 16:9 inside the stage. */
.lightbox__media--logo { padding: clamp(24px, 6vmin, 72px); background: var(--c-bg); }
video.lightbox__media { width: min(100%, (100dvh - 2 * var(--lb-pad-y)) * 16 / 9); aspect-ratio: 16 / 9; background: #000; }
.lightbox__close {
  position: fixed;
  top: clamp(12px, 1.25vw, 24px);
  right: clamp(12px, 1.25vw, 24px);
  z-index: 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid rgb(255 246 227 / .6);
  border-radius: 50%;
  background: rgb(8 16 26 / .4);
  color: #fff6e3;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .3s var(--ease);
}
.lightbox__close:hover { background: rgb(255 246 227 / .15); border-color: #fff6e3; transform: rotate(90deg); }
.lightbox__step {
  position: fixed;
  top: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  padding: 0;
  border: 2px solid rgb(255 246 227 / .6);
  border-radius: 50%;
  background: rgb(8 16 26 / .4);
  color: #fff6e3;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.lightbox__step[hidden] { display: none; }
.lightbox__step--prev { left: clamp(12px, 1.25vw, 24px); }
.lightbox__step--next { right: clamp(12px, 1.25vw, 24px); }
.lightbox__step:hover { background: rgb(255 246 227 / .15); border-color: #fff6e3; }
.lightbox__step--prev:hover { transform: translateX(-3px); }
.lightbox__step--next:hover { transform: translateX(3px); }
.lightbox__step svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lightbox__count {
  position: fixed;
  bottom: clamp(16px, 1.667vw, 32px);
  left: 50%;
  transform: translateX(-50%);
  color: #fff6e3;
  font: 700 var(--fs-button) / 1 var(--f-button);
  letter-spacing: .05em;
}
.lightbox .cursor { border-color: #fff6e3; }
.lightbox .cursor.is-pressed { background-color: #fff6e3; }

@keyframes lightbox-in { from { opacity: 0; } }
@keyframes lightbox-zoom { from { opacity: 0; transform: scale(.96); } }

/* ---------- About page (about.html) ---------- */

/* Intro (Figma "Oct.8.1-about"): photo collage 737 wide, 61 gap, blurb 972 wide. */
.about-intro {
  display: grid;
  grid-template-columns: 737fr 972fr;
  column-gap: 3.446cqi;                                             /* 61 */
  align-items: start;
  margin-top: var(--sp-title);
}

/* Four overlapping photos in a 737 × 552 box; positions are % of that box. */
.about-collage {
  position: relative;
  aspect-ratio: 737 / 552;
}
.about-collage__photo {
  position: absolute;
  object-fit: cover;
  border-radius: var(--radius);
}
.about-collage__photo--lake     { left: 0;       top: 0;       width: 40.570%; height: 40.580%; } /* 299 × 224 */
.about-collage__photo--cat      { left: 64.179%; top: 14.493%; width: 35.821%; height: 36.232%; } /* 264 × 200 */
.about-collage__photo--portrait { left: 27.001%; top: 10.507%; width: 40.706%; height: 72.464%; } /* 300 × 400 */
.about-collage__photo--concert  { left: 65.536%; top: 66.667%; width: 24.966%; height: 33.333%; } /* 184 × 184 */

.about-intro__text { margin-top: 2px; }                            /* heading cap top 2px below the photos */
.about-intro__hello { font-size: var(--fs-body); font-weight: 700; }
.about-intro__body {
  margin-top: clamp(20px, 1.771vw, 34px);                           /* 34 */
  font-size: var(--fs-body);
}
.about-intro__body p + p { margin-top: 1lh; }                      /* a blank line between paragraphs */

/* Spec sheet: services / tools / experience in three columns. */
.specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: start;
  margin-top: var(--sp-content);
}
.specs__title { font-size: var(--fs-tag); font-weight: 400; color: var(--c-nav); }
.specs__list,
.specs__log {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 1.25vw, 24px);
  margin-top: clamp(24px, 1.667vw, 32px);
}
.specs__log { gap: clamp(32px, 2.5vw, 48px); }
.specs__list li { font-size: var(--fs-body); }
.specs__when { font-size: var(--fs-tag); color: var(--c-nav); }
.specs__role { margin-top: clamp(12px, 0.938vw, 18px); font-size: var(--fs-body); font-weight: 700; }
.specs__org { margin-top: var(--sp-card-meta); font-size: var(--fs-meta); }

/* Rare sightings (js/sightings.js): a band of creatures, a dock for the
   field note you just identified, and the full list behind a button. */
.sightings .display--section { font-size: 9.04cqi; }                 /* 160 */
.sightings__intro {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px 40px;
  margin-top: clamp(40px, 4.167vw, 80px);
  font-size: var(--fs-meta);
}
.sightings__tools {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.083vw, 40px);
}
.sightings__count { font-size: var(--fs-tag); color: var(--c-nav); white-space: nowrap; }
.sightings__count [data-found] { font-weight: 700; color: var(--c-ink); }
.sightings__count.is-complete::after { content: " · complete :)"; }

.sightings__arena {
  position: relative;
  height: clamp(360px, 33.333vw, 640px);
  margin-top: var(--sp-content);
}
.sightings__arena canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}

.sightings__dock { margin-top: var(--sp-content); }
.sightings__empty { font-size: var(--fs-meta); color: var(--c-nav); }

.sightings__all { margin-top: var(--sp-action); }
.sightings__all > summary {
  display: flex;
  width: fit-content;
  margin-left: auto;
  list-style: none;
  cursor: pointer;
}
.sightings__all > summary::-webkit-details-marker { display: none; }
.sightings__all[open] .when-closed,
.sightings__all:not([open]) .when-open { display: none; }
.sightings__all .pill-button__arrow .icon { transition: transform .3s var(--ease); }
.sightings__all[open] .pill-button__arrow .icon { transform: rotate(129deg); }   /* points down */

.field-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: var(--sp-content);
}

/* Field note card. The outline is its own layer so land mode can ink it. */
.field-note {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(12px, 0.833vw, 16px);
  height: 100%;
  padding: clamp(20px, 1.667vw, 32px);
}
.field-note::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 2px solid color-mix(in srgb, var(--c-ink) 40%, transparent);
  border-radius: var(--radius);
}
.field-note__tag { font-size: var(--fs-tag); color: var(--c-nav); }
.field-note__name { font-size: var(--fs-body); font-weight: 700; }
.field-note__latin { font-size: var(--fs-meta); font-style: italic; color: var(--c-nav); }
.field-note__swatch {
  display: block;
  width: 64px;
  height: 18px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--a) 50%, var(--b) 50%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--c-ink) 15%, transparent);
}
.field-note__swatch--stacked {             /* Rothko: two soft stacked fields */
  width: 40px;
  height: 48px;
  background: linear-gradient(var(--a) 0 52%, var(--b) 52%);
  filter: blur(.6px);
}
.field-note__facts { display: flex; flex-direction: column; gap: 14px; margin: 4px 0 0; }
.field-note__facts dt { font-size: var(--fs-tag); color: var(--c-nav); }
.field-note__facts dd { margin: 8px 0 0; font-size: var(--fs-meta); line-height: 1.3; }
.field-note__note { margin-top: auto; padding-top: 8px; font-size: var(--fs-meta); line-height: 1.3; }

/* Docked (just identified): the same card laid out across three columns. */
.sightings__dock .field-note {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: row dense;
  align-content: start;
  align-items: start;
  column-gap: var(--gap);
}
.sightings__dock .field-note > * { grid-column: 1; }
.sightings__dock .field-note__facts { grid-column: 2; grid-row: 1 / span 5; margin: 0; }
.sightings__dock .field-note__note { grid-column: 3; grid-row: 1 / span 5; margin: 0; padding: 0; }
.field-note.is-new { animation: note-in .5s var(--ease); }
@keyframes note-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 03 About ---------- */

.about {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: start;
  margin-top: var(--sp-content);
}
.about__photos {
  display: grid;
  grid-template-columns: 174fr 175fr 174fr;
  gap: var(--gap);
  align-items: start;
}
.about__photo {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius);
}
.about__photo--1 { aspect-ratio: 174 / 232; }
.about__photo--2 { aspect-ratio: 175 / 192; object-position: 45% 50%; }
.about__photo--3 { aspect-ratio: 174 / 152; object-position: 50% 55%; }

.about__text {
  grid-column: 2 / 4;
  margin-top: 4px;               /* text cap top sits 4px below the photos */
}

/* ---------- 04 Playground (horizontal scroller, bleeds off the right) ---------- */

.playground-row {
  display: flex;
  gap: var(--gap);
  margin-top: var(--sp-title);
  margin-right: calc(-1 * var(--px));
  padding-right: var(--px);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.playground-row::-webkit-scrollbar { display: none; }
.playground-row > li {
  flex: 0 0 clamp(240px, 19.479vw, 374px);  /* 374 */
  scroll-snap-align: start;
}
.card__media--play .scout-one { object-position: 100% 50%; }

/* ---------- Pill button ---------- */

.pill-button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 14px calc(clamp(24px, 2.083vw, 40px) + 2px);   /* 12 / 40 + the 2px outline */
  border-radius: 50px;
  color: var(--c-button);
  font-family: var(--f-button);
  font-size: var(--fs-button);
  font-weight: 700;
  white-space: nowrap;
  transition: color .25s var(--ease);
}
/* Outline + hover fill live on a layer behind the label, so land mode can
   give them a pencil edge without roughening the text. */
.pill-button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 2px solid var(--c-button);
  border-radius: inherit;
  transition: background-color .25s var(--ease);
}
.pill-button__arrow {
  display: grid;
  place-items: center;
  width: 37.103px;
  height: 36.267px;
  transition: transform .3s var(--ease);
}
.pill-button__arrow .icon { transform: rotate(39.02deg); }
.pill-button:hover { color: var(--c-bg); }
.pill-button:hover::before { background-color: var(--c-button); }
.pill-button:hover .pill-button__arrow { transform: translateX(6px); }

/* Land mode: UI lines look hand-drawn in ink — a gentle wobble (SVG filters
   defined in js/main.js). Sea mode keeps clean vectors. */
:root:not([data-theme="dark"]) .rule,
:root:not([data-theme="dark"]) .site-nav a::after,
:root:not([data-theme="dark"]) .text-link__label::after { filter: url(#pencil-line); }
:root:not([data-theme="dark"]) .pill-button::before,
:root:not([data-theme="dark"]) .field-note::before,
:root:not([data-theme="dark"]) .placeholder::before,
:root:not([data-theme="dark"]) .case-view__switch::before,
:root:not([data-theme="dark"]) .versions__tabs [role="tab"]::before { filter: url(#pencil-box); }

/* Sea mode: buttons pulse in time with the availability dot (same keyframes). */
[data-theme="dark"] .pill-button { animation: status-pulse 2.4s ease-out infinite; }

/* ---------- Playground (playground.html, js/playground.js) ---------- */

.playground__intro { max-width: 36em; margin-top: var(--sp-content); font-size: var(--fs-body); line-height: 1.3; }

.playground__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: clamp(40px, 4.167vw, 80px);
}

/* Category stickers: slightly crooked, straighten on hover. */
.stickers { display: flex; flex-wrap: wrap; gap: 10px; }
.sticker {
  --tilt: -2deg;
  padding: 10px 16px;
  border: 0;
  border-radius: 6px;
  background: color-mix(in srgb, var(--c-ink) 9%, transparent);
  color: var(--c-ink);
  font: 700 var(--fs-tag) / 1 var(--f-button);
  letter-spacing: .04em;
  cursor: pointer;
  transform: rotate(var(--tilt));
  transition: transform .25s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.sticker:nth-child(even) { --tilt: 2deg; }
.sticker:hover { transform: rotate(0) scale(1.05); }
.sticker[aria-pressed="true"] { background: var(--c-button); color: var(--c-bg); }

.playground__actions { display: flex; flex-wrap: wrap; gap: 12px; }
button.pill-button { border: 0; background: none; cursor: pointer; }
.pill-button--small { padding: 12px 26px; font-size: var(--fs-tag); }
.when-tidy { display: none; }
.playground[data-layout="tidy"] .when-messy { display: none; }
.playground[data-layout="tidy"] .when-tidy { display: inline; }

/* The desk: pieces are absolutely placed by --x / --y / --w / --r. */
.desk {
  position: relative;
  height: clamp(800px, 60cqi, 1150px);
  margin-top: var(--sp-content);
}
.desk::before {                              /* wireframe outline of the play area */
  content: "";
  position: absolute;
  inset: 0;
  border: 2px dashed color-mix(in srgb, var(--c-ink) 18%, transparent);
  border-radius: var(--radius);
  pointer-events: none;
}
.desk__pile { margin: 0; padding: 0; list-style: none; }

.piece {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: var(--z, 1);
  width: var(--w);
  transform: rotate(var(--r));
  touch-action: none;
  transition: transform .3s var(--ease), left .7s var(--ease), top .7s var(--ease), opacity .3s var(--ease), filter .3s var(--ease);
}
.piece.is-dragging { transition: none; transform: rotate(var(--r)) scale(1.04); }
.piece__card {
  display: block;
  width: 100%;
  padding: 10px 10px 14px;
  border: 0;
  border-radius: 4px;
  background: var(--c-bg);
  color: inherit;
  text-align: left;
  cursor: grab;
  box-shadow: 0 8px 22px rgb(0 0 0 / .12), 0 1px 3px rgb(0 0 0 / .12);
  transition: box-shadow .25s var(--ease);
}
.piece:hover .piece__card { box-shadow: 0 14px 32px rgb(0 0 0 / .18), 0 2px 6px rgb(0 0 0 / .12); }
.piece.is-dragging .piece__card { cursor: grabbing; box-shadow: 0 24px 48px rgb(0 0 0 / .25); }
.piece__media { display: block; overflow: hidden; border-radius: 2px; background: color-mix(in srgb, var(--c-ink) 8%, transparent); pointer-events: none; }
.piece__media img,
.piece__media video { display: block; width: 100%; height: auto; }
.piece__label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 12px; }
.piece__title { flex: 1 1 100%; font-size: var(--fs-tag); font-weight: 700; line-height: 1.15; }
.tag {
  padding: 4px 7px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--c-ink) 10%, transparent);
  font: 700 12px / 1 var(--f-button);
  letter-spacing: .05em;
}
.tag--wip { background: var(--c-nav); color: var(--c-bg); }

/* Land: pieces are taped into the sketchbook. */
:root:not([data-theme="dark"]) .piece::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  z-index: 1;
  width: 34%;
  height: 22px;
  background: rgb(214 196 150 / .7);
  transform: translateX(-50%) rotate(-3deg);
}
/* Sea: pieces float in the tank, bobbing out of step with each other. */
[data-theme="dark"] .piece__card {
  background: color-mix(in srgb, var(--c-ink) 7%, var(--c-bg));
  animation: bob 6s ease-in-out var(--d, 0s) infinite;
}
@keyframes bob { 50% { translate: 0 -10px; } }

/* Sticker filter: picked pieces come forward, the rest fade back. */
.desk.is-filtering .piece:not(.is-picked) { opacity: .3; filter: grayscale(.7); }

/* Margin doodles ride along with their piece (and its tilt). */
.piece__doodle {
  position: absolute;
  color: var(--c-nav);
  font: 400 clamp(22px, 1.771vw, 34px) / 1 var(--f-display);
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}
.piece__doodle--above { bottom: 100%; left: 50%; margin-bottom: 18px; transform: translateX(-50%) rotate(-3deg); }
.piece__doodle--above-left { bottom: 100%; left: 2%; margin-bottom: 16px; text-align: left; transform: rotate(-3deg); }
.piece__doodle--below { top: 100%; left: 8%; margin-top: 14px; transform: rotate(2deg); }
.piece__doodle--right { top: 48%; left: 100%; margin-left: 16px; transform: rotate(-4deg); }

/* Tidy (and every phone): a plain grid, no tilt, no tape, no doodles. */
.playground[data-layout="tidy"] .desk { height: auto; }
.playground[data-layout="tidy"] .desk::before,
.playground[data-layout="tidy"] .piece__doodle,
.playground[data-layout="tidy"] .piece::before { display: none; }
.playground[data-layout="tidy"] .desk__pile {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(200px, 18cqi, 320px), 1fr));
  gap: var(--gap);
}
.playground[data-layout="tidy"] .piece { position: relative; left: auto; top: auto; width: auto; transform: none; }
.playground[data-layout="tidy"] .piece__card { cursor: pointer; animation: none; }
.playground[data-layout="tidy"] .piece__media { aspect-ratio: 4 / 3; }
.playground[data-layout="tidy"] .piece__media img,
.playground[data-layout="tidy"] .piece__media video { height: 100%; object-fit: cover; }

/* Note card that opens when a piece is clicked. */
.note-card {
  width: min(720px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  padding: clamp(24px, 2.5vw, 48px);
  border: 0;
  border-radius: 8px;
  background: var(--c-bg);
  color: var(--c-ink);
  overflow: auto;
}
.note-card::backdrop { background: rgb(8 16 26 / .7); backdrop-filter: blur(3px); }
.note-card[open] { animation: lightbox-zoom .3s var(--ease); }
.note-card__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: none;
  color: inherit;
  cursor: pointer;
  transition: transform .3s var(--ease);
}
.note-card__close:hover { transform: rotate(90deg); }
.note-card__close svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.note-card .placeholder { margin-bottom: 24px; }
.note-card > .piece__media { margin-bottom: 24px; border-radius: var(--radius); }
.note-card__type { color: var(--c-nav); font-size: var(--fs-tag); }
.note-card h2 { margin-top: 10px; font: 400 clamp(40px, 3.333vw, 64px) / .9 var(--f-display); }
.note-card p { margin-top: 16px; font-size: var(--fs-meta); line-height: 1.4; }
.note-card .note-card__testing { color: var(--c-nav); }
:root:not([data-theme="dark"]) .note-card .note-card__testing { font: 400 clamp(24px, 1.667vw, 32px) / 1.1 var(--f-display); }
.note-card .pill-button { margin-top: 24px; }

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

.site-footer {
  margin-top: var(--sp-section);
  background: var(--c-footer-bg);
  transition: background-color .3s var(--ease);
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 997fr 399fr 374fr;  /* columns at x = 75, 1072, 1471 */
  padding-top: clamp(56px, 8.125vw, 156px);    /* 156 */
  padding-bottom: clamp(48px, 5.99vw, 115px);  /* 115 */
}
.site-footer__brand { padding-top: 2px; }
.site-footer__logo { width: clamp(80px, 7.292vw, 140px); height: auto; }  /* 140 × 144 */
.site-footer__home { display: inline-block; vertical-align: top; }
.site-footer__tagline {
  margin-top: clamp(24px, 2.24vw, 43px);       /* 43 */
  font-family: var(--f-display);
  font-size: min(clamp(44px, 5.208vw, 100px), 12.5cqi);  /* 100; never wider than the footer */
  color: var(--c-footer-head);
  white-space: nowrap;
}
.site-footer__tagline .apos { letter-spacing: -0.048em; }
.site-footer__signal {
  margin-top: clamp(20px, 1.667vw, 32px);       /* 32 */
  font-size: var(--fs-meta);
  color: var(--c-footer-text);
}
.site-footer__signal a { color: var(--c-footer-head); text-decoration: underline; text-underline-offset: 4px; }

.footer-col__title {
  font-size: var(--fs-body);
  font-weight: 400;
  color: var(--c-footer-head);
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: clamp(18px, 1.354vw, 26px);      /* 26 */
  color: var(--c-footer-text);
  white-space: nowrap;
}
.footer-col a { transition: color .2s var(--ease); }
.footer-col a:hover { color: var(--c-footer-head); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Texture: paper grain (land) / marine snow (sea, js/snow.js) ---------- */

/* Fine grain + soft blotchy paper tone, generated (no image files). Sits
   behind all content and fades out in sea mode. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3  0 0 0 0 .25  0 0 0 0 .18  1.4 0 0 0 -.5'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='640'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.008 .014' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55  0 0 0 0 .47  0 0 0 0 .32  .7 0 0 0 -.28'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
  background-size: 220px 220px, 640px 640px;
  mix-blend-mode: multiply;
  opacity: .22;
  transition: opacity .8s var(--ease);
}
[data-theme="dark"] body::before { opacity: 0; }

.marine-snow {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .8s var(--ease);
}
[data-theme="dark"] .marine-snow { opacity: 1; }

/* Map lines (js/contours.js): topography on land, bathymetry at sea. */
.contours {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---------- Custom cursor (js/cursor.js) ---------- */

.has-custom-cursor,
.has-custom-cursor * { cursor: none !important; }

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;   /* center on the pointer */
  border: 2px solid var(--c-ink);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: background-color .12s ease, border-color .3s ease, opacity .2s ease,
              width .2s var(--ease), height .2s var(--ease), margin .2s var(--ease);
}
/* Over something clickable on a canvas (e.g. a rare sighting): the ring grows. */
.cursor.is-target { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
.cursor.is-visible { opacity: 1; }
.cursor.is-pressed { background-color: var(--c-ink); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
    row-gap: 20px;
  }
  .site-nav {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .about { grid-template-columns: 1fr; row-gap: 28px; }
  .about__photos { max-width: 520px; }
  .about__text { grid-column: auto; margin-top: 0; }

  .case__intro { grid-template-columns: 1fr; row-gap: 40px; }

  .about-intro { grid-template-columns: 1fr; row-gap: 40px; }
  .about-collage { max-width: 620px; }
  .about-intro__text { margin-top: 0; }
  .specs { grid-template-columns: 1fr 1fr; row-gap: 48px; }
  .specs__col:last-child { grid-column: 1 / -1; }
  .field-notes { grid-template-columns: 1fr 1fr; }
  .sightings__dock .field-note { display: flex; }
  .case__body { grid-column: auto; }
  .case-section { grid-template-columns: 1fr; }
  .case-section__body { grid-column: auto; }
  .annotated { grid-template-columns: 1fr; }
  .annotated__screen { grid-column: auto; }
  .case__facts--grid { grid-template-columns: 1fr 1fr; }
  .case-grid--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .decisions--3 { grid-template-columns: 1fr; }

  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
    row-gap: 48px;
  }
  .site-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .playground__actions { display: none; }   /* phones always get the tidy grid */
  .label-row { flex-wrap: wrap; row-gap: 14px; }
  .case-grid--2, .case-grid--3, .case__facts--grid, .decisions { grid-template-columns: 1fr; }
  .case-grid--4, .case-grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merch > *, .merch > .merch__main, .merch > .merch__side { grid-column: 1 / -1; }
  .merch > .merch__side { aspect-ratio: 3 / 4; }
  .label-row .rule { display: none; }
  .label--end { flex-basis: 100%; text-align: left; white-space: normal; opacity: .8; }


  .hero,
  .hero:has(.status) { min-height: calc(85svh + 20px); }

  .work-grid { grid-template-columns: 1fr; row-gap: 40px; }

  .specs { grid-template-columns: 1fr; }
  .field-notes { grid-template-columns: 1fr; }

  .site-footer__tagline { font-size: 12.5cqi; }
}

@media (max-width: 480px) {
  .site-footer__inner { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .status__dot,
  .pill-button { animation: none !important; }
  .field-note.is-new,
  .note.is-active .note__text,
  .pin::after,
  .lightbox[open],
  .lightbox[open]::backdrop,
  .lightbox__media,
  .note-card[open],
  .piece__card { animation: none !important; }
}
