/* muckup.app · built from src/css (01-tokens.css, 02-base.css, 03-layout.css, 04-components.css, 05-pages.css) */
/* =========================================================================
   01 · TOKENS
   Every colour, type size, space, radius and duration used by the site.
   Components only reference these variables.
   Breakpoints (CSS cannot read variables in @media, so they are fixed here):
     --bp-md: 1100px  (tablet / small laptop)
     --bp-sm: 700px   (phone)
   ========================================================================= */

/* Typefaces, self-hosted (no third-party request). */
@font-face { font-family: 'Archivo'; src: url('../fonts/Archivo-latin.woff2') format('woff2'); font-weight: 400 600; font-display: swap; }
@font-face { font-family: 'Apfel Grotezk'; src: url('../fonts/ApfelGrotezk-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Apfel Grotezk'; src: url('../fonts/ApfelGrotezk-Mittel.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Apfel Grotezk'; src: url('../fonts/ApfelGrotezk-Fett.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Gap Sans'; src: url('../fonts/GapSans-Black.woff2') format('woff2'); font-weight: 900; font-display: swap; }

:root {
  /* Families: text, headings, accent (fancy: the Muckup wordmark). */
  --font-text: 'Archivo', 'Helvetica Neue', sans-serif;
  --font-heading: 'Apfel Grotezk', 'Helvetica Neue', sans-serif;
  --font-accent: 'Gap Sans', 'Apfel Grotezk', sans-serif;

  /* Type scale. Fluid sizes clamp between phone and desktop. */
  --fs-display: clamp(60px, 8.4vw, 132px);  /* homepage hero */
  --fs-h1: clamp(42px, 6vw, 92px);          /* page titles */
  --fs-h2: clamp(36px, 4.3vw, 62px);        /* section titles */
  --fs-h2-sm: clamp(28px, 2.4vw, 34px);     /* small section titles */
  --fs-h3: clamp(23px, 2vw, 28px);          /* card and sub titles */
  --fs-h4: clamp(19px, 1.6vw, 22px);
  --fs-lead: clamp(17px, 1.4vw, 20px);
  --fs-body: 17px;
  --fs-sm: 15px;
  --fs-xs: 13px;
  --fs-2xs: 12px;
  --fs-3xs: 11px;
  --fs-4xs: 10px;
  --fs-ui: 14px;            /* buttons, pills, tables */
  --fs-md: 16px;            /* section intros */
  --fs-quote: 18px;         /* definitions */
  --fs-title-sm: 25px;      /* small titles: prose h3, callouts, maker */
  --fs-icon: 22px;          /* text glyphs used as icons (+, arrows) */
  --fs-menu: clamp(46px, 13.5vw, 84px);     /* mobile menu links */
  --logo-size: 34px;        /* header wordmark, 27px on phones */
  --logo-size-compact: 26px; /* "mckp" once the page scrolls */
  --lh-tight: .95;
  --lh-heading: 1.1;
  --lh-body: 1.6;
  --tracking-display: -.035em;
  --tracking-heading: -.02em;

  /* Spacing scale (4 px base). */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px; --sp-5: 24px;
  --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px; --sp-10: 128px;
  --section-y: clamp(64px, 8vw, 110px);

  /* Layout. */
  --container: 1280px;
  --container-wide: 1440px;
  --gutter: clamp(20px, 4vw, 56px);
  --grid-gap: clamp(16px, 2.6vw, 40px);
  --header-h: 72px;
  --header-h-compact: 56px; /* header once the page scrolls */

  /* Radii. */
  --r-xs: 4px; --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-pill: 999px;

  /* Motion. */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur-fast: .15s;
  --dur-mid: .35s;
  --dur-morph: .7s;         /* Muckup -> mckp */
  --ease-morph: cubic-bezier(.65, 0, .35, 1);
  --dur-slow: .9s;

  /* Colour: one light appearance (the dark theme was dropped on 7 Nov.). */
  color-scheme: light;
  --acid: #d8f20f;
  --on-acid: #10110f;
  --ink: #f6f2e8;          /* page background */
  --surface: #ede9df;      /* alternate sections, panels */
  --surface-raised: #f9f7f0;
  --cream: #1a1b17;        /* main text */
  --muted: #60625a;        /* secondary text */
  --line: #d4d0c5;         /* borders */
  --media-bg: #111716;     /* behind films */
  --overlay: #141710e6;    /* labels on images */
  --on-media: #f3f0e7;
  --header-bg: #faf8f1;
  --field-bg: #fcfaf5;
  --field-line: #a8aa9e;
  --link-hover: #4b5900;
  --button-hover: #c9dd12;
  --focus: #526000;
  --shadow-sm: 0 5px 24px #352c1510;
  --shadow-md: 0 8px 30px #352c1518;
  --shadow-handle: 0 2px 10px #0003;
  --shadow-window: 0 30px 80px #0000002e;
  --mac-close: #ff5f57; --mac-min: #febc2e; --mac-max: #28c840; /* window buttons */
  --dark-hover: #2b2d27;
}

/* =========================================================================
   02 · BASE
   Element defaults only. No classes except the global helpers at the end.
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 40px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--cream); font: var(--fs-body)/var(--lh-body) var(--font-text); -webkit-font-smoothing: antialiased; }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 5px; }
button, input, select, textarea { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 500; font-synthesis: none; text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: 1; letter-spacing: -.03em; }
h2 { font-size: var(--fs-h2); line-height: var(--lh-heading); letter-spacing: var(--tracking-heading); }
h3 { font-size: var(--fs-h3); line-height: 1.2; }
h4 { font-size: var(--fs-h4); line-height: 1.25; }
kbd { padding: 1px 6px; border: 1px solid var(--line); border-radius: var(--r-xs); background: var(--surface); font: var(--fs-xs) var(--font-text); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 5px; }
[hidden] { display: none !important; }

/* Global helpers */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -80px; left: var(--sp-5); z-index: 70; padding: 10px 16px; background: var(--acid); color: var(--on-acid); }
.skip-link:focus { top: 10px; }
.muted { color: var(--muted); }
.accent-face { font-family: var(--font-accent); font-weight: 900; }

@media (max-width: 700px) {
  :root { --header-h: 62px; --header-h-compact: 52px; --logo-size: 27px; --logo-size-compact: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* =========================================================================
   03 · LAYOUT
   One container, one 12-column grid, one section rhythm.
   Layout classes say WHERE things go; components say what they look like.
   ========================================================================= */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.container-wide { width: min(100% - 2 * var(--sp-5), var(--container-wide)); margin-inline: auto; }

/* 12-column grid. Children choose a span; below the breakpoints they stack. */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); row-gap: var(--sp-6); }
.grid--end { align-items: end; }
.grid--center { align-items: center; }
.grid--start { align-items: start; }
.span-3 { grid-column: auto / span 3; } .span-4 { grid-column: auto / span 4; } .span-5 { grid-column: auto / span 5; }
.span-6 { grid-column: auto / span 6; } .span-7 { grid-column: auto / span 7; } .span-8 { grid-column: auto / span 8; }
.span-12 { grid-column: 1 / -1; }
.start-5 { grid-column-start: 5; } .start-6 { grid-column-start: 6; } .start-7 { grid-column-start: 7; } .start-8 { grid-column-start: 8; } .start-9 { grid-column-start: 9; }

/* Auto-fitting card grids. */
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); }
.cols-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--sp-4); }

/* Vertical rhythm. */
.section { padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * .5); }
.section--alt { background: var(--surface); }
.section--flush { padding-top: 0; }
.mt-4 { margin-top: var(--sp-4); } .mt-5 { margin-top: var(--sp-5); } .mt-6 { margin-top: var(--sp-6); } .mt-7 { margin-top: var(--sp-7); }

@media (max-width: 1100px) {
  .md-span-12 { grid-column: 1 / -1; }
  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .grid > * { grid-column: 1 / -1; }
  .grid { row-gap: var(--sp-5); }
  .cols-3 { grid-template-columns: 1fr; }
}

/* Design aid shown by ?grid or Shift+G (see site.js). */
.grid-overlay { position: fixed; inset: 0; z-index: 9999; pointer-events: none; }
.grid-overlay .grid { height: 100%; }
.grid-overlay span { background: var(--acid); opacity: .18; outline: 1px solid var(--acid); }

/* =========================================================================
   04 · COMPONENTS
   Each block is self-contained and named after what it is.
   Variants use a double dash (.btn--sm). Children use a single dash (.card-body).
   ========================================================================= */

/* ---------- Button ------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); min-height: 50px; padding: 14px var(--sp-5); border: 1px solid var(--acid); border-radius: var(--r-sm); background: var(--acid); color: var(--on-acid); font-size: var(--fs-ui); font-weight: 500; line-height: 1.3; text-decoration: none; white-space: nowrap; transition: background var(--dur-fast), border-color var(--dur-fast); }
.btn:hover { background: var(--button-hover); border-color: var(--button-hover); }
.btn--lg { min-height: 54px; padding: 15px var(--sp-5); font-size: var(--fs-sm); }
.btn--sm { min-height: 40px; padding: 10px var(--sp-4); font-size: var(--fs-xs); }
.btn--dark { background: var(--on-acid); border-color: var(--on-acid); color: var(--on-media); }
.btn--dark:hover { background: var(--dark-hover); border-color: var(--dark-hover); }

/* ---------- Links --------------------------------------------------------- */
.link { font-size: var(--fs-xs); text-decoration-color: var(--muted); }
.link:hover { color: var(--link-hover); text-decoration-color: currentColor; }
.link--more { display: inline-block; margin-top: var(--sp-5); }
.link--lg { font-size: var(--fs-ui); }

/* ---------- Text pieces --------------------------------------------------- */
.eyebrow { display: block; margin-bottom: var(--sp-4); font-size: var(--fs-xs); color: var(--muted); }
.lede { font-size: var(--fs-lead); line-height: 1.5; }
.lede--muted { font-size: var(--fs-body); line-height: var(--lh-body); color: var(--muted); }
.copy { font-size: var(--fs-sm); color: var(--muted); }
.copy > * + * { margin-top: var(--sp-4); }
.display { font-size: var(--fs-display); line-height: var(--lh-tight); letter-spacing: var(--tracking-display); }

/* ---------- Release line (dated proof that the product moves) --------- */
.release { display: inline-block; font-size: var(--fs-xs); color: var(--muted); text-decoration-color: var(--line); }
.release strong { font-weight: 500; color: var(--cream); }
.release:hover { color: var(--cream); }

/* ---------- Values (the singular ones, as a line of text) --------------- */
.values { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); margin: 0; padding: var(--sp-4) 0; border-block: 1px solid var(--line); list-style: none; font-size: var(--fs-ui); }
.values li:not(:last-child)::after { content: "/"; margin-left: var(--sp-4); color: var(--muted); }

/* ---------- Statement (a big typographic moment) ------------------------- */
.statement { max-width: 16ch; font-family: var(--font-heading); font-size: var(--fs-h1); font-weight: 500; line-height: 1; letter-spacing: -.03em; text-wrap: balance; }
.statement--xl { max-width: 13ch; font-size: var(--fs-display); line-height: var(--lh-tight); letter-spacing: var(--tracking-display); }

/* ---------- Case (a real project) ------------------------------------------ */
.case { display: block; text-decoration: none; }
.case img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--media-bg); }
.case--large img { aspect-ratio: 4/3; }
.case-caption { display: block; max-width: 46ch; margin-top: var(--sp-3); font-size: var(--fs-xs); line-height: 1.5; color: var(--muted); }
.case-caption strong { font-weight: 500; color: var(--cream); }
.case:hover .case-caption strong { color: var(--link-hover); }
.case-stack { display: grid; gap: var(--sp-6); }

/* ---------- Call to action group ------------------------------------------ */
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px var(--sp-5); }
.cta-note { font-size: var(--fs-2xs); color: var(--muted); }

/* ---------- Byline (maker proof) ------------------------------------------ */
.byline { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-xs); color: var(--muted); }
.byline img { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; }
.byline strong { color: var(--cream); font-weight: 500; }

/* ---------- Film and media ------------------------------------------------- */
.film video, .film img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--media-bg); }
.film--contain video { object-fit: contain; }
.film figcaption { margin-top: var(--sp-3); font-size: var(--fs-3xs); line-height: 1.6; color: var(--muted); }

/* ---------- Before / after comparison ------------------------------------- */
.compare { --split: 55%; position: relative; aspect-ratio: 3/2; overflow: hidden; border-radius: var(--r-lg); touch-action: pan-y; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare-after { clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--split); width: 2px; background: var(--on-media); transform: translateX(-50%); pointer-events: none; }
.compare-handle span { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--on-media); color: var(--on-acid); font-size: var(--fs-icon); transform: translate(-50%, -50%); box-shadow: var(--shadow-handle); }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare:focus-within { outline: 2px solid var(--focus); outline-offset: 5px; }
.media-label { position: absolute; bottom: 18px; padding: 6px var(--sp-3); border-radius: var(--r-sm); background: var(--overlay); color: var(--on-media); font-size: var(--fs-2xs); pointer-events: none; }
.media-label--left { left: 18px; } .media-label--right { right: 18px; }

/* ---------- Card ------------------------------------------------------------ */
.card { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--ink); text-decoration: none; transition: border-color var(--dur-fast), background var(--dur-fast); }
a.card:hover { border-color: var(--acid); }
.card-media { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.card-body { padding: var(--sp-4) 20px 20px; }
.card-body p { margin-top: 6px; font-size: var(--fs-ui); color: var(--muted); }
.card--link { padding: 20px var(--sp-5) var(--sp-5); border-radius: var(--r-lg); background: transparent; }
.card--link:hover { background: var(--surface); }
.card--link strong { display: block; font-family: var(--font-heading); font-size: var(--fs-h4); font-weight: 500; line-height: 1.2; }
.card--link span { display: block; margin-top: var(--sp-2); font-size: var(--fs-xs); line-height: 1.5; color: var(--muted); }

/* ---------- Section head (title left, intro right) ------------------------ */
.section-head { margin-bottom: 44px; }
.section-head .copy { font-size: var(--fs-md); }
.section-title-sm { margin-bottom: var(--sp-5); font-size: var(--fs-h2-sm); }

/* ---------- Site header ------------------------------------------------------ */
.site-header { position: sticky; top: 16px; z-index: 40; pointer-events: none; }
.site-header-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-6); width: min(100% - 48px, var(--container-wide)); min-height: var(--header-h); margin-inline: auto; padding: var(--sp-3) var(--sp-5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--header-bg); box-shadow: var(--shadow-sm); pointer-events: auto; transition: box-shadow var(--dur-mid), min-height var(--dur-mid) var(--ease-out), padding var(--dur-mid) var(--ease-out), width var(--dur-mid) var(--ease-out); }
/* Once the page scrolls the bar tightens and the wordmark shortens to "mckp". */
.site-header.is-scrolled .site-header-bar { width: min(100% - 48px, var(--container)); min-height: var(--header-h-compact); padding-block: var(--sp-2); box-shadow: var(--shadow-md); }
.site-header .wordmark { transition: font-size var(--dur-morph) var(--ease-out); }
.site-header.is-scrolled .wordmark { font-size: var(--logo-size-compact); }
/* Wordmark morph: each letter is a grid cell whose column shrinks to 0, so the rest slide together.
   The two u drop out one after the other, so "muckup" becomes "mckp". */
.wm { display: inline-grid; grid-template-columns: 1fr; vertical-align: top; transition: grid-template-columns var(--dur-morph) var(--ease-morph) var(--wm-delay, 0s), opacity var(--dur-mid) ease var(--wm-delay, 0s), transform var(--dur-morph) var(--ease-morph) var(--wm-delay, 0s); }
.wm > span { min-width: 0; }
.wm--late { --wm-delay: .12s; }
.site-header.is-scrolled .wm--drop { grid-template-columns: 0fr; opacity: 0; transform: translateY(-.35em) scale(.6); }
.site-nav { display: flex; align-items: center; gap: var(--sp-5); font-size: var(--fs-xs); color: var(--muted); }
.site-nav a:not(.btn) { text-decoration: none; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current] { color: var(--cream); }
.wordmark { display: inline-block; font-family: var(--font-accent); font-weight: 900; font-size: var(--logo-size); line-height: 1; letter-spacing: -.02em; white-space: nowrap; text-decoration: none; }
.site-header .wordmark { transform: translateY(-.04em); }
.wordmark--footer { padding-bottom: .12em; font-size: clamp(62px, 17vw, 245px); }

/* ---------- Site footer ------------------------------------------------------ */
.site-footer { display: grid; grid-template-columns: 1fr auto; gap: var(--sp-4) 40px; width: min(100% - 48px, var(--container-wide)); margin: 0 auto var(--sp-5); padding: 36px 40px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--muted); }
.site-footer .wordmark { grid-column: 1 / -1; justify-self: start; color: var(--cream); }
.site-footer-tagline, .site-footer-links { font-size: var(--fs-2xs); }
.site-footer-links { display: flex; gap: var(--sp-5); }
.site-footer small { grid-column: 1 / -1; font-size: var(--fs-3xs); }
.footer-map { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--line); }
.footer-map p { margin-bottom: 10px; font-size: var(--fs-2xs); color: var(--cream); }
.footer-map ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; font-size: var(--fs-2xs); }
.footer-map a, .site-footer-links a { text-decoration: none; }
.footer-map a:hover, .site-footer-links a:hover { color: var(--cream); }

/* ---------- Breadcrumb ------------------------------------------------------- */
.crumbs { font-size: var(--fs-2xs); color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.crumbs li + li::before { content: "/"; margin-right: var(--sp-2); opacity: .6; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--cream); }

/* ---------- Page hero (inner pages) ------------------------------------------ */
.page-hero { padding-block: var(--sp-6) 56px; border-bottom: 1px solid var(--line); }

/* ---------- Table of contents ------------------------------------------------ */
.toc { position: sticky; top: 120px; align-self: start; font-size: var(--fs-2xs); color: var(--muted); }
.toc p { margin-bottom: var(--sp-3); color: var(--cream); }
.toc ol { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.toc a { text-decoration: none; }
.toc a:hover { color: var(--cream); }

/* ---------- Prose (long-form text) ------------------------------------------- */
.prose { min-width: 0; max-width: 720px; font-size: var(--fs-body); line-height: 1.7; }
.prose > * + * { margin-top: 20px; }
.prose h2 { margin-top: var(--sp-8); font-size: clamp(32px, 3.2vw, 44px); scroll-margin-top: 120px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 36px; font-size: var(--fs-title-sm); }
.prose h2 + p, .prose h3 + p { margin-top: var(--sp-4); }
.prose p, .prose li { color: var(--muted); }
.prose strong { font-weight: 500; color: var(--cream); }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: 9px; }
.prose li::marker { color: var(--muted); }
.prose figure { margin-top: var(--sp-6); }
.prose figure video, .prose figure img { width: 100%; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--media-bg); }
.prose figure video { aspect-ratio: 16/9; object-fit: contain; }
.prose figcaption { margin-top: var(--sp-3); font-size: var(--fs-2xs); color: var(--muted); }
.prose .note { font-size: var(--fs-xs); }

/* ---------- Definition and callout ------------------------------------------- */
.definition { padding: var(--sp-5) var(--sp-5); border-left: 3px solid var(--acid); border-radius: 0 var(--r-md) var(--r-md) 0; background: var(--surface); }
.definition p { color: var(--cream); font-size: var(--fs-quote); line-height: 1.6; }
.callout { padding: var(--sp-5) 28px; border: 1px solid var(--line); border-radius: var(--r-lg); }
.callout p { color: var(--cream); font-family: var(--font-heading); font-size: var(--fs-title-sm); line-height: 1.3; }

/* ---------- Table --------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: var(--fs-ui); line-height: 1.5; }
.table-wrap th, .table-wrap td { padding: 14px var(--sp-4); text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table-wrap tr:last-child td, .table-wrap tr:last-child th { border-bottom: 0; }
.table-wrap thead th { font-weight: 500; color: var(--cream); background: var(--surface); }
.table-wrap tbody th { font-weight: 400; color: var(--cream); }
.table-wrap td { color: var(--muted); }

/* ---------- Numbered steps ------------------------------------------------------- */
.steps { padding: 0 !important; list-style: none; counter-reset: step; }
.steps > li { position: relative; padding-left: 52px; counter-increment: step; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; font-size: var(--fs-xs); color: var(--cream); }
.steps > li + li { margin-top: var(--sp-5); }

/* ---------- FAQ (disclosure list) ------------------------------------------------ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5); padding-block: 21px; list-style: none; font-size: var(--fs-ui); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary span { font-size: var(--fs-icon); color: var(--muted); transition: transform var(--dur-fast); }
.faq details[open] summary span { transform: rotate(45deg); }
.faq details p { padding: 0 var(--sp-5) var(--sp-5) 0; font-size: var(--fs-xs); line-height: 1.75; color: var(--muted); }
.faq--large summary { font-size: var(--fs-md); }
.faq--large details p { padding-right: 0; font-size: var(--fs-sm); }

/* ---------- Call-to-action card --------------------------------------------------- */
.cta-card { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--sp-5) 40px; margin-bottom: 40px; padding: 44px var(--sp-7); border-radius: var(--r-xl); background: var(--acid); color: var(--on-acid); }
.cta-card h2 { max-width: 640px; font-size: clamp(34px, 3.6vw, 52px); }
.cta-card p { margin-top: var(--sp-3); font-size: var(--fs-ui); }

/* ---------- Folder explorer (a Finder-like window, homepage) ------------------- */
.explorer { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-window); }
.explorer-bar { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); }
.explorer-dots { display: flex; gap: var(--sp-2); }
.explorer-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--mac-close); }
.explorer-dots i:nth-child(2) { background: var(--mac-min); }
.explorer-dots i:nth-child(3) { background: var(--mac-max); }
.explorer-title { flex: 1; font-size: var(--fs-xs); font-weight: 500; }
.explorer-path { font-weight: 400; color: var(--muted); }
.explorer-status { font-size: var(--fs-2xs); color: var(--muted); }
.explorer-body { display: grid; grid-template-columns: 150px minmax(0, 1fr); min-height: 300px; background: var(--surface-raised); }
.explorer-tabs { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-4) 10px; background: var(--surface); }
.explorer-tabs button { display: flex; align-items: center; gap: var(--sp-2); padding: 10px var(--sp-2); border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); font-size: var(--fs-2xs); text-align: left; transition: background var(--dur-fast), color var(--dur-fast); }
.explorer-tabs button[aria-selected="true"] { background: var(--line); color: var(--cream); }
.explorer-tabs button:hover { color: var(--cream); }
.explorer-tabs svg { flex-shrink: 0; width: 23px; height: 20px; }
.explorer-panel { min-width: 0; padding: var(--sp-6) var(--sp-5); }
.explorer-files { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); }
.explorer-files figure { position: relative; animation: file-in var(--dur-mid) var(--ease-out) both; }
.explorer-files figure:nth-child(2) { animation-delay: .07s; }
.explorer-files figure:nth-child(3) { animation-delay: .14s; }
.explorer-files img { width: 100%; height: 150px; object-fit: contain; }
.explorer-files figcaption { margin-top: var(--sp-3); font-size: var(--fs-3xs); line-height: 1.5; text-align: center; overflow-wrap: anywhere; color: var(--muted); }
.explorer-files figure[data-flag]::after { content: attr(data-flag); position: absolute; top: calc(-1 * var(--sp-2)); right: 0; padding: 3px var(--sp-2); border-radius: var(--r-pill); background: var(--acid); color: var(--on-acid); font-size: var(--fs-4xs); font-weight: 500; }
.explorer-text { min-height: 66px; padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--muted); }
@keyframes file-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- Scrolly (a section that stays put while the page scroll tells a story) */
.points { display: grid; gap: var(--sp-5); margin: var(--sp-6) 0; padding: 0; list-style: none; counter-reset: point; }
.points li { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-1) var(--sp-3); counter-increment: point; }
.points li::before { content: counter(point); grid-row: span 2; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--acid); color: var(--on-acid); font-size: var(--fs-2xs); font-weight: 500; }
.points strong { font-family: var(--font-heading); font-size: var(--fs-h4); font-weight: 500; line-height: 1.2; }
.points span { font-size: var(--fs-sm); line-height: 1.55; color: var(--muted); }
.folder-steps { display: grid; margin: var(--sp-6) 0 0; padding: 0; list-style: none; counter-reset: step; }
.folder-steps button { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-1) var(--sp-3); width: 100%; padding: var(--sp-4) 0; border: 0; border-top: 1px solid var(--line); background: none; color: var(--muted); text-align: left; counter-increment: step; transition: color var(--dur-mid); }
.folder-steps li:last-child button { border-bottom: 1px solid var(--line); }
.folder-steps button::before { content: counter(step); grid-row: span 2; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; font-size: var(--fs-2xs); transition: background var(--dur-mid), color var(--dur-mid), border-color var(--dur-mid); }
.folder-steps strong { font-family: var(--font-heading); font-size: var(--fs-h4); font-weight: 500; line-height: 1.2; }
.folder-steps span { font-size: var(--fs-xs); line-height: 1.5; }
.folder-steps button:hover, .folder-steps .is-active { color: var(--cream); }
.folder-steps .is-active::before { border-color: var(--acid); background: var(--acid); color: var(--on-acid); }
.folder-steps .is-active span { color: var(--muted); }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Signup (beta list form) ------------------------------------------------ */
.signup { width: min(100% - 48px, var(--container-wide)); margin: 0 auto; padding: 60px var(--sp-7); border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); }
.signup-mark { width: 50px; height: 50px; margin-bottom: var(--sp-5); border-radius: var(--r-md); }
.signup h2 { font-size: clamp(37px, 3.6vw, 49px); }
.signup .lede--muted { max-width: 360px; margin-top: var(--sp-5); font-size: var(--fs-ui); }
.field-label { display: block; margin-bottom: 10px; font-size: var(--fs-xs); }
.field-row { display: flex; gap: 10px; }
.field { width: 100%; min-width: 0; min-height: 50px; padding: 13px var(--sp-4); border: 1px solid var(--field-line); border-radius: var(--r-sm); background: var(--field-bg); font-size: var(--fs-ui); }
.field::placeholder { color: var(--muted); opacity: 1; }
.form-note { margin-top: 15px; font-size: var(--fs-3xs); color: var(--muted); }
.form-status { margin-top: 10px; font-size: var(--fs-2xs); }
.form-status:empty { display: none; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Portrait (about page) ----------------------------------------------- */
.portrait { width: 96px; height: 96px; object-fit: cover; border-radius: var(--r-lg); }

/* ---------- Maker note -------------------------------------------------------------- */
.maker { display: flex; align-items: center; gap: var(--sp-5); padding-block: var(--sp-7); }
.maker picture { flex-shrink: 0; width: 64px; height: 64px; }
.maker img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-md); }
.maker h2 { margin-bottom: 7px; font-size: var(--fs-title-sm); }
.maker p { max-width: 780px; font-size: var(--fs-xs); line-height: 1.65; color: var(--muted); }
.maker strong { font-weight: 500; color: var(--cream); }
.maker a { color: var(--cream); white-space: nowrap; }

/* ---------- Mobile menu: a full-screen acid sheet that opens from the Menu button -------- */
.menu-toggle { display: none; align-items: center; gap: 10px; min-height: 40px; padding: 0 var(--sp-1) 0 var(--sp-2); border: 0; background: none; color: var(--cream); font-size: var(--fs-xs); font-weight: 500; cursor: pointer; }
.menu-toggle-label { line-height: 1; }
.menu-icon { position: relative; display: block; width: 22px; height: 12px; }
.menu-icon i { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform var(--dur-mid) var(--ease-out), top var(--dur-mid) var(--ease-out); }
.menu-icon i:first-child { top: 0; }
.menu-icon i:last-child { top: 10px; }
.menu-toggle--close .menu-icon i { top: 5px; }
.menu-toggle--close .menu-icon i:first-child { transform: rotate(45deg); }
.menu-toggle--close .menu-icon i:last-child { transform: rotate(-45deg); }
.mobile-menu { position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: var(--sp-3) var(--sp-5) var(--sp-6); border: 0; background: var(--acid); color: var(--on-acid); overflow-y: auto; overscroll-behavior: contain; }
.mobile-menu[open] { display: flex; flex-direction: column; animation: menu-in var(--dur-slow) var(--ease-out) both; }
.mobile-menu.is-closing { animation: menu-out var(--dur-mid) var(--ease-morph) both; }
.mobile-menu:focus { outline: none; }
.mobile-menu::backdrop { background: transparent; }
.mobile-menu-bar { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h-compact); padding-inline: var(--sp-2); }
.mobile-menu-bar .wordmark { font-size: var(--logo-size-compact); }
.mobile-menu-bar .menu-toggle { display: inline-flex; color: var(--on-acid); }
.mobile-menu-nav { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-block: var(--sp-7) var(--sp-6); }
.mobile-menu-links { margin: 0; padding: 0; list-style: none; }
.mobile-menu-links li { overflow: hidden; border-bottom: 1px solid color-mix(in srgb, var(--on-acid) 18%, transparent); }
.mobile-menu-links a { display: flex; align-items: baseline; padding-block: var(--sp-2) var(--sp-3); font-family: var(--font-heading); font-size: var(--fs-menu); font-weight: 500; line-height: 1; letter-spacing: -.035em; text-decoration: none; }
.mobile-menu-word { display: inline-block; transition: transform var(--dur-mid) var(--ease-out); }
.mobile-menu-links a:hover .mobile-menu-word, .mobile-menu-links a:focus-visible .mobile-menu-word { transform: translateX(var(--sp-2)); }
.mobile-menu-links a[aria-current] .mobile-menu-word { text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .12em; }
.mobile-menu[open] .mobile-menu-links a { animation: menu-line var(--dur-slow) var(--ease-out) both; }
.mobile-menu-links li:nth-child(2) a { animation-delay: .05s; }
.mobile-menu-links li:nth-child(3) a { animation-delay: .1s; }
.mobile-menu-links li:nth-child(4) a { animation-delay: .15s; }
.mobile-menu-more { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); margin: var(--sp-6) 0 0; padding: 0; list-style: none; font-size: var(--fs-sm); }
.mobile-menu-more a { text-decoration-color: color-mix(in srgb, var(--on-acid) 35%, transparent); }
.mobile-menu[open] .mobile-menu-more, .mobile-menu[open] .mobile-menu-foot { animation: menu-fade var(--dur-slow) var(--ease-out) .2s both; }
.mobile-menu-foot { display: grid; gap: var(--sp-4); padding-inline: var(--sp-2); }
.mobile-menu-foot .btn { width: 100%; min-height: 56px; font-size: var(--fs-sm); }
.mobile-menu-foot p { font-size: var(--fs-xs); line-height: 1.6; opacity: .75; }
html.menu-open { overflow: hidden; }
@media (max-width: 380px) { .site-header .menu-toggle-label { display: none; } }
@keyframes menu-in { from { clip-path: circle(0 at var(--menu-x, 100%) var(--menu-y, 0)); } to { clip-path: circle(150% at var(--menu-x, 100%) var(--menu-y, 0)); } }
@keyframes menu-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-12px); } }
@keyframes menu-line { from { transform: translateY(105%); } to { transform: none; } }
@keyframes menu-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .mobile-menu[open], .mobile-menu.is-closing, .mobile-menu[open] .mobile-menu-links a, .mobile-menu[open] .mobile-menu-more, .mobile-menu[open] .mobile-menu-foot { animation-name: menu-fade; animation-duration: .01s; }
}

/* ---------- Responsive ---------------------------------------------------------------- */
@media (max-width: 1100px) {
  .explorer-body { grid-template-columns: 120px minmax(0, 1fr); }
  .explorer-files img { height: 110px; }
  .footer-map { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .toc { display: none; }
}
@media (max-width: 900px) {
  .site-nav a:not(.btn) { display: none; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 700px) {
  .values { flex-direction: column; gap: 0; padding: 0; }
  .values li { padding-block: var(--sp-3); }
  .values li + li { border-top: 1px solid var(--line); }
  .values li:not(:last-child)::after { content: none; }
  .site-header { top: 10px; }
  .site-header-bar, .site-header.is-scrolled .site-header-bar { width: calc(100% - 20px); padding: 10px var(--sp-3); gap: var(--sp-3); border-radius: var(--r-lg); }
  .wordmark--footer { font-size: clamp(62px, 18vw, 118px); }
  .site-nav { gap: var(--sp-2); }
  .site-nav .btn { min-height: 36px; padding: 9px 11px; font-size: var(--fs-4xs); }
  .media-label { bottom: 14px; padding: 5px var(--sp-2); font-size: var(--fs-4xs); }
  .media-label--left { left: 12px; } .media-label--right { right: 12px; }
  .compare-handle span { width: 36px; height: 36px; font-size: var(--fs-quote); }
  .explorer-body { grid-template-columns: 100px minmax(0, 1fr); }
  .explorer-files { grid-template-columns: 1fr 1fr; gap: 20px 10px; }
  .explorer-files img { height: 70px; }
  .explorer-bar .explorer-status { display: none; }
  .signup { width: calc(100% - 24px); padding: var(--sp-6) 20px; border-radius: var(--r-lg); }
  .field .btn, .field-row .btn { padding-inline: var(--sp-3); font-size: var(--fs-2xs); }
  .maker { align-items: flex-start; gap: var(--sp-4); }
  .maker picture { width: 48px; height: 48px; }
  .site-footer { grid-template-columns: 1fr; width: calc(100% - 24px); margin-bottom: var(--sp-3); padding: var(--sp-5) 20px; border-radius: var(--r-lg); }
  .footer-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .definition, .callout { padding: 20px; }
  .callout p { font-size: var(--fs-h4); }
  .table-wrap th, .table-wrap td { padding: 11px var(--sp-3); font-size: var(--fs-xs); }
  .steps > li { padding-left: var(--sp-7); }
  .cta-card { padding: var(--sp-6) var(--sp-5); }
  .prose { font-size: var(--fs-md); }
  .prose h2 { margin-top: var(--sp-7); }
}

/* =========================================================================
   05 · PAGES
   Only what is specific to one page type. Everything else lives above.
   ========================================================================= */

/* Homepage hero: spacing between the pieces of the first screen. */
.home-hero { padding-top: var(--sp-8); }
.home-hero h1 { margin-top: var(--sp-5); }
.home-hero .lede { max-width: 470px; }
.home-hero .cta,
.home-hero .byline,
.home-hero .film { margin-top: var(--sp-6); }
.home-hero .values { margin-top: var(--sp-7); }

/* Inner pages: clear the floating header, then hero, body, related. */
.page-main { padding-top: calc(var(--header-h) + var(--sp-7)); }
.page-body { padding-block: var(--sp-8) var(--sp-9); }
.page-related { padding-block: var(--sp-2) var(--sp-8); }

@media (max-width: 700px) {
  .page-main { padding-top: calc(var(--header-h) + var(--sp-6)); }
  .page-hero { padding-block: var(--sp-5) var(--sp-7); }
}

