/* ==========================================================================
   The Inky Void
   One stylesheet for the whole site. Each page sets --accent on <body> so
   cards, links and focus rings pick up that project's colour.
   ========================================================================== */

:root {
  --void: #08090b;
  --surface: #101216;
  --surface-2: #171a1f;
  --line: #23262c;
  --line-soft: #1a1d22;

  --ink: #f4f1ea;
  --ink-dim: #9aa0a8;
  --ink-faint: #6b7079;

  --accent: #f4f1ea;

  --animator: #5cc8e8;
  --quiz: #8f7ff2;
  --wsh: #5c93f7;
  --motion: #c9a227;

  --display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --body: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Code', monospace;

  --page: 1160px;
  --radius: 14px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The void: a faint starfield, fixed behind everything. Pure CSS so it costs
   nothing at runtime and never needs a script. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, rgba(244,241,234,0.55), transparent),
    radial-gradient(1.2px 1.2px at 68% 9%, rgba(244,241,234,0.40), transparent),
    radial-gradient(1.6px 1.6px at 34% 62%, rgba(244,241,234,0.32), transparent),
    radial-gradient(1.1px 1.1px at 84% 47%, rgba(244,241,234,0.45), transparent),
    radial-gradient(1.3px 1.3px at 22% 88%, rgba(244,241,234,0.30), transparent),
    radial-gradient(1.5px 1.5px at 91% 76%, rgba(244,241,234,0.38), transparent),
    radial-gradient(1px 1px at 51% 33%, rgba(244,241,234,0.35), transparent),
    radial-gradient(1.2px 1.2px at 6% 54%, rgba(244,241,234,0.28), transparent);
  background-size: 620px 620px;
  opacity: 0.9;
}

/* A slow wash of colour so the black is never quite flat. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 78% -10%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%),
    radial-gradient(50rem 36rem at -10% 108%, rgba(120,130,160,0.07), transparent 70%);
}

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

a { color: var(--accent); text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

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

.wrap { width: min(100% - 2.5rem, var(--page)); margin-inline: auto; }

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

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.12rem; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; text-wrap: pretty; }

.lede { font-size: clamp(1.05rem, 1.9vw, 1.3rem); color: var(--ink-dim); max-width: 62ch; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9rem;
}

.muted { color: var(--ink-dim); }
.small { font-size: 0.9rem; }

/* ---------- header -------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--void) 82%, transparent);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 66px;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); flex: none; }
.brand img { width: 34px; height: 34px; }
.brand span { font-family: var(--display); font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; }

.site-nav { margin-left: auto; display: flex; gap: 0.35rem; flex-wrap: wrap; }
.site-nav a {
  font-size: 0.9rem;
  color: var(--ink-dim);
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
}
.site-nav a:hover { color: var(--ink); background: var(--surface); }
.site-nav a[aria-current='page'] { color: var(--ink); background: var(--surface); }

/* Narrow screens: four wrapped nav items turn the sticky header into a wall.
   Drop the nav onto its own line as a single swipeable row instead. */
@media (max-width: 720px) {
  .site-header .wrap { flex-wrap: wrap; gap: 0.5rem; min-height: 0; padding-block: 0.55rem; }
  .site-nav {
    margin-left: 0;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { white-space: nowrap; font-size: 0.85rem; padding: 0.35rem 0.6rem; }
}

/* ---------- hero ---------------------------------------------------------- */

.hero { position: relative; padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2.5rem, 5vw, 4rem); }

.hero-home { text-align: center; }
.hero-home .mark {
  width: min(320px, 62vw);
  margin: 0 auto clamp(1.2rem, 3vw, 2rem);
  filter: drop-shadow(0 0 46px rgba(244, 241, 234, 0.10));
}
.hero-home h1 { margin-bottom: 1rem; }
.hero-home .lede { margin-inline: auto; }

.hero-project { display: grid; gap: 1.1rem; }
.hero-project h1 { max-width: 18ch; }

/* ---------- meta strip ---------------------------------------------------- */

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.55rem;
  padding: 0;
  margin: 0.4rem 0 0;
  list-style: none;
}
.meta li {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  background: var(--surface);
}
.meta li.is-accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); }

/* ---------- buttons ------------------------------------------------------- */

.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 0.6rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.96rem;
  letter-spacing: -0.01em;
  padding: 0.72rem 1.25rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}
.btn:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #07131a;
}
.btn-primary:hover { filter: brightness(1.08); }

.btn small { font-family: var(--mono); font-weight: 400; font-size: 0.72rem; opacity: 0.75; letter-spacing: 0.04em; }

/* Links whose destination isn't configured yet (see tools/build-pages.js). */
a[data-pending] { opacity: 0.4; pointer-events: none; cursor: default; }

/* ---------- sections ------------------------------------------------------ */

section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-head { margin-bottom: clamp(1.5rem, 3vw, 2.4rem); max-width: 60ch; }
.section-head p { color: var(--ink-dim); margin-bottom: 0; }

/* ---------- work grid ----------------------------------------------------- */

/* Two up on desktop: four projects land as a clean 2x2 rather than 3 + 1
   orphan, and the screenshots get enough room to actually read. */
.work { display: grid; gap: 1.15rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); }

.card {
  --accent: var(--ink);
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.card:hover .card-shot img { transform: scale(1.03); }

.card-shot {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.card-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.4s ease; }

.card-body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.card-body h3 { color: var(--ink); }
.card-body p { color: var(--ink-dim); font-size: 0.94rem; margin: 0; }
.card-kind {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.card-go { margin-top: auto; padding-top: 0.6rem; font-size: 0.88rem; color: var(--accent); font-weight: 500; }

/* Accent per card, set inline via class */
.card.is-animator { --accent: var(--animator); }
.card.is-quiz { --accent: var(--quiz); }
.card.is-wsh { --accent: var(--wsh); }
.card.is-motion { --accent: var(--motion); }

/* ---------- Quizium hero ---------------------------------------------------
   The live site's own front-door animation, rebuilt from the same layered
   WebP export rather than screen-recorded: the splat, wordmark and tagline
   as one image, with the seven doodle icons placed over it as a percentage
   of that crop, so they stay registered at every size.

   The whole thing is a link to quiziumgames.com.
   -------------------------------------------------------------------------- */

.quizium-hero {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.quizium-art {
  position: relative;
  width: 100%;
  aspect-ratio: 1920 / 1000;
  /* cqh below is a share of THIS box, which keeps the icon bob proportional
     to the logo rather than to each tiny icon. */
  container-type: size;
  transition: transform 0.35s cubic-bezier(0.22, 0.9, 0.24, 1);
}
.quizium-hero:hover .quizium-art { transform: scale(1.015); }

.quizium-body,
.quizium-icon {
  position: absolute;
  pointer-events: none;
  user-select: none;
  will-change: transform;
}

.quizium-body {
  inset: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 20px 26px rgba(0, 0, 0, 0.55)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
  animation: quizium-hover 3.6s ease-in-out infinite;
}

@keyframes quizium-hover {
  0%, 100% { transform: translateY(-1.2%); }
  50% { transform: translateY(1.2%); }
}

/* Neighbouring icons run half a cycle apart, so the row reads as a wave
   rather than seven things bobbing in unison. Half the splat's travel is
   enough once they oppose each other. */
.quizium-icon {
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  animation: quizium-icon-hover 3.6s ease-in-out infinite;
  animation-delay: calc(-0.5s - var(--phase) * 1.8s);
}

@keyframes quizium-icon-hover {
  0%, 100% { transform: translateY(-0.6cqh); }
  50% { transform: translateY(0.6cqh); }
}


@media (prefers-reduced-motion: reduce) {
  .quizium-body, .quizium-icon { animation: none; }
  .quizium-hero:hover .quizium-art { transform: none; }
}

/* ---------- media / figures ----------------------------------------------- */

.shot {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  margin: 0;
}
.shot img { width: 100%; }
.shot figcaption {
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

/* ---------- coverflow ------------------------------------------------------
   A 3D carousel for the phone screenshots. Slides are absolutely positioned on
   a shared stage and placed by JS (assets/js/coverflow.js), which sets
   --offset on each one; everything below is driven off that single number, so
   the script never has to touch individual style properties.

   Without JS the stage falls back to a plain horizontal scroller, so the
   screenshots are still browsable.
   -------------------------------------------------------------------------- */

.coverflow { position: relative; margin-top: 0.5rem; }

.cf-stage {
  position: relative;
  height: clamp(360px, 52vw, 560px);
  perspective: 1400px;
  perspective-origin: 50% 45%;
  transform-style: preserve-3d;
}

/* No-JS / no-support fallback: a normal scrollable row. */
.cf-stage:not([data-ready]) {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  height: auto;
  perspective: none;
  padding-bottom: 0.5rem;
}
.cf-stage:not([data-ready]) .cf-item { position: static; flex: 0 0 clamp(150px, 40vw, 190px); }

.cf-item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(150px, 21vw, 216px);
  margin: 0;
  cursor: pointer;
  transform-style: preserve-3d;
  /* Placed from --offset: how many slides away from the active one. */
  transform:
    translate(-50%, -50%)
    translateX(calc(var(--offset) * 62%))
    translateZ(calc(max(var(--dist), 0) * -150px))
    rotateY(calc(var(--offset) * -38deg))
    scale(calc(1 - max(var(--dist), 0) * 0.06));
  opacity: calc(1 - max(var(--dist), 0) * 0.22);
  z-index: calc(10 - max(var(--dist), 0));
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.5s ease;
}
.cf-item[data-hidden] { opacity: 0; pointer-events: none; }

.cf-item img {
  width: 100%;
  display: block;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
}

.cf-item[data-active] {
  cursor: zoom-in;
  z-index: 20;
}
.cf-item[data-active] img {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7),
              0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
}

.cf-item figcaption {
  position: absolute;
  left: 0; right: 0;
  bottom: -2.1rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.cf-item[data-active] figcaption { opacity: 1; color: var(--accent); }

/* ---------- coverflow controls -------------------------------------------- */

.cf-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.6rem;
}

.cf-nav {
  width: 38px; height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.cf-nav:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: var(--surface-2); }

.cf-dots { display: flex; gap: 0.45rem; }
.cf-dot {
  width: 8px; height: 8px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: var(--line);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.cf-dot[aria-selected='true'] { background: var(--accent); transform: scale(1.35); }

.cf-hint {
  margin: 0.9rem 0 0;
  text-align: center;
  font-size: 0.86rem;
  color: var(--ink-faint);
}

/* ---------- lightbox ------------------------------------------------------- */

.cf-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(4, 5, 7, 0.92);
  backdrop-filter: blur(6px);
}
.cf-lightbox[open] { display: flex; }

.cf-lightbox figure {
  margin: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}
.cf-lightbox img {
  max-height: calc(100vh - 9rem);
  width: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8);
}
.cf-lightbox figcaption {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.cf-close {
  position: absolute;
  top: clamp(0.8rem, 3vw, 1.6rem);
  right: clamp(0.8rem, 3vw, 1.6rem);
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.1rem;
  cursor: pointer;
}
.cf-close:hover { border-color: var(--accent); }

.cf-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.2rem;
  cursor: pointer;
}
.cf-lb-nav:hover { border-color: var(--accent); }
.cf-lb-prev { left: clamp(0.5rem, 3vw, 2rem); }
.cf-lb-next { right: clamp(0.5rem, 3vw, 2rem); }

/* Motion-sensitive visitors get the same carousel without the swooping. */
@media (prefers-reduced-motion: reduce) {
  .cf-item { transition: none; }
}

/* ---------- prose columns ------------------------------------------------- */

.cols { display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.feature { border-top: 1px solid var(--line); padding-top: 1rem; }
.feature h3 { margin-bottom: 0.4rem; }
.feature p { color: var(--ink-dim); font-size: 0.94rem; margin: 0; }

/* ---------- spec table ---------------------------------------------------- */

.spec { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.spec th, .spec td { text-align: left; padding: 0.7rem 0.2rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  width: 34%;
  white-space: nowrap;
}
.spec td { color: var(--ink-dim); }

/* ---------- code ---------------------------------------------------------- */

.code {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
  background: #0c0e12;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  color: color-mix(in srgb, var(--accent) 75%, var(--ink));
  white-space: pre;
}

/* ---------- callout ------------------------------------------------------- */

.note {
  display: flex;
  gap: 0.85rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid color-mix(in srgb, var(--motion) 32%, var(--line));
  background: color-mix(in srgb, var(--motion) 7%, var(--surface));
  border-radius: 10px;
  font-size: 0.92rem;
  color: #d7c48c;
}
.note strong { color: var(--motion); }

/* ---------- animation gallery --------------------------------------------- */

/* Ten clips laid out 5 x 2 on a wide screen, stepping down to 3 and then 2 as
   the viewport narrows. Explicit counts rather than auto-fit, because the row
   structure is the point here. */
.reel { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 680px) { .reel { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1080px) { .reel { grid-template-columns: repeat(5, 1fr); } }

/* The reel needs more room than the reading column to hold five across. */
.wrap-wide { width: min(100% - 2.5rem, 1500px); margin-inline: auto; }

.clip {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  margin: 0;
}

/*
 * The renders are a mix of landscape and portrait. A fixed 16:9 window with
 * object-fit: contain keeps every tile the same height — so rows line up and
 * the native controls always sit in the same place — while pillarboxing the
 * vertical pieces instead of cropping their composition away.
 */
.clip-frame { aspect-ratio: 16 / 9; background: #000; }
.clip-frame video { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Opt-in for clips that are pure texture, where filling the frame beats
   preserving a composition nobody is reading. */
.clip-frame.is-cover video { object-fit: cover; }

/* Once the script takes over, the tile is a button that opens the viewer. */
.clip-frame.is-button { position: relative; cursor: zoom-in; border: 0; padding: 0; width: 100%; }
.clip-frame.is-button:hover .clip-play { transform: translate(-50%, -50%) scale(1.08); background: var(--accent); color: #07131a; }

.clip-play {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(10, 12, 15, 0.72);
  border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line));
  color: var(--ink);
  backdrop-filter: blur(3px);
  pointer-events: none;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}
/* Play triangle, drawn rather than shipped as an icon file. */
.clip-play::after {
  content: '';
  position: absolute;
  left: 52%; top: 50%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent currentColor;
}

/* The video viewer is wider than the portrait screenshot one. */
.cf-lightbox.is-video figure { width: min(100%, 1200px); }
.cf-lightbox.is-video video {
  width: 100%;
  max-height: calc(100vh - 9rem);
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #000;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8);
}

.clip figcaption {
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* ---------- footer -------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line-soft);
  margin-top: clamp(3rem, 8vw, 6rem);
  padding: 2.5rem 0 3rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
.site-footer p { margin: 0; color: var(--ink-faint); font-size: 0.88rem; }
.footer-links { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.footer-links a { color: var(--ink-dim); text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: var(--ink); }

/* ---------- utilities ----------------------------------------------------- */

.stack-sm > * + * { margin-top: 0.6rem; }
.stack > * + * { margin-top: 1.4rem; }
.center { text-align: center; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
