/* ==========================================================================
   noblepatrick.com · Signal Earth
   All colors, type sizes and spacing come from the tokens below.
   Source: Figma "PTN – Portfolio", Tokens collection, mode "Signal · Earth".
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL Open Font License; see /fonts) ---------- */
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/barlow-condensed-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-style: normal; font-display: swap; src: url("fonts/barlow-condensed-800.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/dm-sans-400.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/dm-sans-400-italic.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/dm-sans-500.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/dm-sans-700.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  /* Color: light sections */
  --color-bg: #f1ece1;
  --color-surface: #fbf8f1;
  --color-ink: #1f2a1f;
  --color-ink-active: #1f2a1f;
  --color-muted: #575a4a;
  --color-accent: #355e3b;
  --color-on-accent: #ffffff;
  --color-accent-soft: #dde3cf;
  --color-line: #d8d0be;
  --color-placeholder: #e2dbcb;
  --color-disabled-fill: #e4ddcf;
  --color-disabled-text: #9c9789;
  --color-hero-disabled-fill: #2e3c31;
  --color-hero-disabled-text: #6e7663;
  --color-clay: #7d5034;
  --color-paper: #ffffff; /* behind screenshots and slides */
  /* Accessibility badges: a white chip, the same in every mode and background */
  --a11y-chip: #ffffff;
  --a11y-ink: #1f2a1f;
  --a11y-pass: #1e6b34;
  --a11y-fail: #a3261c;
  /* Device mockup (hardware colors: the same in light and dark mode) */
  --device-bezel: #0b0d0c;
  --device-frame-a: #6b6f6a;
  --device-frame-b: #2b2e2c;
  --device-frame-c: #8d918b;
  --device-island: #000000;
  /* status bar color = the top edge of each app screen, so the app reaches the top of the phone */
  --screen-top-seat: #0e2950;
  --screen-top-map: #2e2c2d;
  --screen-top-staff: #071220;
  --color-shadow: rgb(0 0 0 / 0.28);

  /* Color: dark (hero) sections */
  --color-hero-bg: #1e2b22;
  --color-hero-surface: #2a3a2d;
  --color-hero-ink: #f2ede1;
  --color-hero-ink-active: #f2ede1;
  --color-hero-muted: #aaad9b;
  --color-hero-accent: #a9ae6a;
  --color-hero-on-accent: #1e2b22;
  --color-hero-line: #3a4a3a;
  --color-hero-clay: #d4a27f;

  /* Type */
  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text-xs: 0.75rem;     /* 12 */
  --text-sm: 0.875rem;    /* 14 */
  --text-base: 1.0625rem; /* 17 */
  --text-md: 1.1875rem;   /* 19 */
  --text-lg: 1.375rem;    /* 22 */
  --display-sm: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);    /* 20 → 24 */
  --display-md: clamp(1.5rem, 1.25rem + 1vw, 1.875rem);    /* 24 → 30 */
  --display-lg: clamp(1.5rem, 1.05rem + 1.9vw, 2.75rem);   /* 24 → 44 */
  --display-xl: clamp(2rem, 1.4rem + 2.6vw, 3.5rem);       /* 32 → 56 */
  --display-hero: clamp(1.875rem, 1.35rem + 2.2vw, 2.5rem); /* 30 → 40 */
  --stat: clamp(1.5rem, 1.3rem + 0.8vw, 1.75rem);          /* 24 → 28 */
  --display-portrait: clamp(2rem, 1.2rem + 2.9vw, 3.25rem); /* 32 → 52 */
  --leading-tight: 1.05;
  --leading-snug: 1.4;
  --leading-body: 1.65;
  --tracking-label: 0.12em;

  /* Space */
  --space-1: 0.25rem;  /* 4 */
  --space-2: 0.5rem;   /* 8 */
  --space-3: 0.75rem;  /* 12 */
  --space-4: 1rem;     /* 16 */
  --space-5: 1.25rem;  /* 20 */
  --space-6: 1.5rem;   /* 24 */
  --space-7: 2rem;     /* 32 */
  --space-8: 2.5rem;   /* 40 */
  --space-9: 3.5rem;   /* 56 */
  --space-10: 4.5rem;  /* 72 */
  --space-11: 6rem;    /* 96 */
  --gutter: clamp(1.25rem, 7vw, 7.5rem); /* 20 → 120 */
  --content-max: 75rem;                  /* 1200 */
  --section-pad: clamp(var(--space-8), 6vw, var(--space-11));

  /* Shape */
  --radius-sm: 0.5rem;
  --radius-card: 0.875rem;
  --radius-pill: 999px;
  --radius-phone: 2.25rem;
  --shadow-lift: 0 1rem 2.5rem var(--color-shadow);

  /* Interaction states */
  --color-accent-hover: #2a4b2f;
  --color-accent-pressed: #1f3a24;
  --color-hero-accent-hover: #c4c98a;
  --color-hero-accent-pressed: #a0a566;
  --color-ink-hover: #2f3d2f;
  --color-ink-pressed: #141c15;
  --color-shadow-soft: rgb(0 0 0 / 0.12);
  --shadow-hover: 0 0.375rem 1.25rem var(--color-shadow-soft);
  --tab-bar: 3px;

  /* Motion */
  --reveal-distance: 1.5rem;
  --lift: -1px;
  --duration-reveal: 650ms;
  --stagger: 80ms;
  --duration-fast: 140ms;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);


  /* Header height, used for anchor offsets */
  --header-h: 4.25rem;
  --header-opacity: 92%;
  --header-blur: 14px;
}


/* ---------- Dark theme ----------
   Used when the visitor picks dark with the toggle, or when their device is
   set to dark and they haven't picked. Every pair meets WCAG 2.2 AA. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #141c16;
  --color-surface: #1c261e;
  --color-ink: #abaa9f;   /* #ece7da at 70% over the dark background */
  --color-ink-active: #ece7da; /* full brightness: hovered and current tabs */
  --color-hero-ink-active: #f2ede1;
  --color-muted: #9b9b90; /* #ece7da at 62% */
  --color-hero-ink: #aeaca2;
  --color-hero-muted: #8e8f86;
  --color-accent: #a9ae6a;
  --color-on-accent: #141c16;
  --color-accent-soft: #1a251d;
  --color-line: #3a4a3c;
  --color-placeholder: #263126;
  --color-disabled-fill: #222c24;
  --color-disabled-text: #5f6158;
  --color-hero-disabled-fill: #18221a;
  --color-hero-disabled-text: #4e544c;
  --color-clay: #d4a27f;
  --color-hero-bg: #0e1510;
  --color-hero-surface: #1b271e;
  --color-hero-line: #2c3a2e;
  --color-accent-hover: #c4c98a;
  --color-accent-pressed: #a0a566;
  --color-ink-hover: #bdbcb1;
  --color-ink-pressed: #9a998f;
  --color-shadow: rgb(0 0 0 / 0.55);
  --color-shadow-soft: rgb(0 0 0 / 0.4);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --color-bg: #141c16; --color-surface: #1c261e; --color-ink: #abaa9f; --color-ink-active: #ece7da; --color-hero-ink-active: #f2ede1; --color-muted: #9b9b90; --color-hero-ink: #aeaca2; --color-hero-muted: #8e8f86;
    --color-accent: #a9ae6a; --color-on-accent: #141c16; --color-accent-soft: #1a251d; --color-line: #3a4a3c;
    --color-placeholder: #263126; --color-disabled-fill: #222c24; --color-disabled-text: #5f6158; --color-hero-disabled-fill: #18221a; --color-hero-disabled-text: #4e544c; --color-clay: #d4a27f; --color-hero-bg: #0e1510; --color-hero-surface: #1b271e;
    --color-hero-line: #2c3a2e; --color-accent-hover: #c4c98a; --color-accent-pressed: #a0a566;
    --color-ink-hover: #bdbcb1; --color-ink-pressed: #9a998f; --color-shadow: rgb(0 0 0 / 0.55); --color-shadow-soft: rgb(0 0 0 / 0.4);
  }
}

/* ---------- Background layer ----------
   Components never use raw colors. They read these semantic tokens, and each
   background (Page, Surface, Soft, Hero, Hero raised) sets them. This mirrors
   the Figma collection "Background" (one mode per background), which aliases
   the "Color mode" collection (Light / Dark) above.
   var() resolves where it is declared, so every background class redeclares
   the set; that lets any block switch background (or mode) anywhere. */
:root, .bg-page, .scope-light, .scope-dark {
  --bg-fill: var(--color-bg);
  --bg-raised: var(--color-surface);
  --bg-placeholder: var(--color-placeholder);
  --text-primary: var(--color-ink);
  --text-secondary: var(--color-muted);
  --text-active: var(--color-ink-active);
  --text-label: var(--color-accent);
  --text-label-alt: var(--color-clay);
  --link: var(--color-accent);
  --link-hover: var(--color-accent-hover);
  --link-pressed: var(--color-accent-pressed);
  --button-fill: var(--color-ink);
  --button-fill-hover: var(--color-ink-hover);
  --button-fill-pressed: var(--color-ink-pressed);
  --button-text: var(--color-on-accent);
  --line: var(--color-line);
  --focus: var(--color-accent);
  --disabled-fill: var(--color-disabled-fill);
  --disabled-text: var(--color-disabled-text);
  --border: 1px solid var(--line);
}
.bg-surface { --bg-fill: var(--color-surface); --bg-raised: var(--color-bg); }
.bg-soft, .section--soft { --bg-fill: var(--color-accent-soft); --bg-raised: var(--color-surface); }
.bg-hero, .on-dark, .bg-hero-raised, .process-band {
  --bg-fill: var(--color-hero-bg);
  --bg-raised: var(--color-hero-surface);
  --bg-placeholder: var(--color-hero-surface);
  --text-primary: var(--color-hero-ink);
  --text-secondary: var(--color-hero-muted);
  --text-active: var(--color-hero-ink-active);
  --text-label: var(--color-hero-accent);
  --text-label-alt: var(--color-hero-clay);
  --link: var(--color-hero-accent);
  --link-hover: var(--color-hero-accent-hover);
  --link-pressed: var(--color-hero-accent-pressed);
  --button-fill: var(--color-hero-accent);
  --button-fill-hover: var(--color-hero-accent-hover);
  --button-fill-pressed: var(--color-hero-accent-pressed);
  --button-text: var(--color-hero-on-accent);
  --line: var(--color-hero-line);
  --focus: var(--color-hero-accent);
  --disabled-fill: var(--color-hero-disabled-fill);
  --disabled-text: var(--color-hero-disabled-text);
  --border: 1px solid var(--line);
}
.bg-hero-raised, .process-band { --bg-fill: var(--color-hero-surface); --bg-raised: var(--color-hero-bg); --bg-placeholder: var(--color-hero-bg); }
.bg-page, .bg-surface, .bg-soft, .bg-hero, .bg-hero-raised, .on-dark, .section--soft, .process-band { color: var(--text-primary); background-color: var(--bg-fill); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + var(--space-4)); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--text-primary);
  background: var(--bg-fill);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-weight: 800; line-height: var(--leading-tight); }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
strong { font-weight: 700; color: var(--text-label); }

/* ---------- Links: default, hover, pressed, focus-visible ---------- */
a {
  color: var(--link);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: color var(--duration-fast) var(--ease-out), text-decoration-thickness var(--duration-fast) var(--ease-out);
}
a:hover { color: var(--link-hover); text-decoration-line: none; }
a:active { color: var(--link-pressed); text-decoration-line: none; }

/* The ring follows each element's own shape (outlines track border-radius), so focus never reshapes a control. */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }


.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill);
  background: var(--color-hero-accent); color: var(--color-hero-on-accent); font-weight: 700;
}
.skip-link:focus { top: var(--space-3); }

.container { width: 100%; max-width: calc(var(--content-max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Type helpers ---------- */
.eyebrow { font-size: var(--text-xs); font-weight: 700; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-label); }
.display { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: 0.005em; }
.section-title { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: var(--display-lg); }
.lead { font-size: var(--text-lg); font-weight: 500; line-height: var(--leading-snug); }
.muted { color: var(--text-secondary); }
.arrow-link { font-weight: 700; font-size: var(--text-sm); }

/* ---------- Header (sticky) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--line);
}
/* Frosted header: content blurs as it scrolls underneath. 92% opaque so nav
   text stays above 4.5:1 and the tab bar above 3:1, even over the lightest
   section. Nav text stays light in every state; the bar shows hover/current. */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header {
    background: color-mix(in srgb, var(--bg-fill) var(--header-opacity), transparent);
    -webkit-backdrop-filter: blur(var(--header-blur)) saturate(140%);
    backdrop-filter: blur(var(--header-blur)) saturate(140%);
  }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--bg-fill); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--header-h); }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: var(--display-sm); text-transform: uppercase; letter-spacing: 0.02em; color: var(--text-primary); text-decoration: none; }
/* Nav tabs: default, hover, pressed, focus-visible, active (current page) */
.nav-list { display: flex; align-items: center; gap: var(--space-6); }
.nav-list a, .nav-list .tab {
  position: relative; display: block; padding-block: var(--space-3);
  color: var(--text-secondary); text-decoration: none; font-size: var(--text-sm); font-weight: 500;
  transition: color var(--duration-fast) var(--ease-out);
}
.nav-list a::after, .nav-list .tab::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--tab-bar);
  border-radius: var(--radius-pill); background: var(--text-label);
  transform: scaleX(0); transition: transform var(--duration-fast) var(--ease-out), opacity var(--duration-fast) var(--ease-out);
}
.nav-list a:hover, .nav-list .is-hover { color: var(--text-active); }
.nav-list a:hover::after, .nav-list .is-hover::after { transform: scaleX(1); opacity: 0.5; }
.nav-list a:active, .nav-list .is-pressed { color: var(--text-active); }
.nav-list a:active::after, .nav-list .is-pressed::after { transform: scaleX(1); opacity: 0.75; }
.nav-mobile .nav-list a:active::after { transform: scaleY(1); }
/* Same weight in every state so tab labels never shift; the full bar marks the current page. */
.nav-list a[aria-current="page"], .nav-list .is-current { color: var(--text-active); }
.nav-list a[aria-current="page"]::after, .nav-list .is-current::after { transform: scaleX(1); }
.site-header .wordmark:hover { color: var(--link-hover); }
.site-header .wordmark:active { color: var(--text-secondary); }

.nav-desktop { display: none; }
.nav-mobile summary {
  list-style: none; cursor: pointer; user-select: none;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill);
  background: var(--button-fill); color: var(--button-text); font-weight: 700; font-size: var(--text-sm);
  transition: background-color var(--duration-fast) var(--ease-out), translate var(--duration-fast) var(--ease-out);
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile summary:hover { background: var(--button-fill-hover); translate: 0 var(--lift); }
.nav-mobile summary:active { background: var(--button-fill-pressed); translate: 0 0; }
.nav-mobile[open] summary { background: var(--text-primary); color: var(--bg-fill); }
.nav-mobile .nav-list {
  position: absolute; left: 0; right: 0; top: 100%;
  flex-direction: column; align-items: stretch; gap: 0;
  padding: var(--space-2) var(--gutter) var(--space-5);
  background: var(--bg-fill); border-bottom: 1px solid var(--line);
}
.nav-mobile .nav-list a { padding: var(--space-3) 0 var(--space-3) var(--space-4); font-size: var(--text-base); border-bottom: 1px solid var(--line); }
.nav-mobile .nav-list a::after { left: 0; right: auto; top: var(--space-2); bottom: var(--space-2); width: var(--tab-bar); height: auto; transform: scaleY(0); }
.nav-mobile .nav-list a:hover::after { transform: scaleY(1); opacity: 0.5; }
.nav-mobile .nav-list a[aria-current="page"]::after { transform: scaleY(1); }
@media (min-width: 52rem) {
  .nav-desktop { display: block; }
  .nav-mobile { display: none; }
}

/* ---------- Footer ---------- */
.site-footer { padding-block: var(--space-9); border-top: 1px solid var(--line); }
.site-footer__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-5); margin-bottom: var(--space-6); }
.site-footer h2 { font-size: var(--display-lg); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); font-size: var(--text-sm); }
.footer-links a, .footer-links span { color: var(--text-secondary); }
/* Buttons: default, hover (lift 1px), pressed, focus-visible */
.button {
  display: inline-block; padding: var(--space-3) var(--space-5); border-radius: var(--radius-pill);
  background: var(--button-fill); color: var(--button-text); font-weight: 700; font-size: var(--text-sm); text-decoration: none;
  transition: background-color var(--duration-fast) var(--ease-out), translate var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
/* One button: it is dark on light backgrounds and olive on hero backgrounds. */
.button, a.button:hover, a.button:active { color: var(--button-text); }
a.button:hover, .button.is-hover { background: var(--button-fill-hover); translate: 0 var(--lift); box-shadow: var(--shadow-hover); }
a.button:active, .button.is-pressed { background: var(--button-fill-pressed); translate: 0 0; box-shadow: none; }


/* ---------- Sections ---------- */
.section { padding-block: var(--section-pad); }
.section--tight-top { padding-top: 0; }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-7); }

/* ---------- Home hero ---------- */
.hero { padding-block: var(--space-7) var(--space-6); }
.hero__grid { display: grid; gap: var(--space-8); }
.hero__intro { display: grid; gap: var(--space-5); align-content: start; }
.byline { display: flex; align-items: center; gap: var(--space-4); }
.byline img { width: 5.25rem; height: 5.25rem; border-radius: 50%; border: 2px solid var(--text-label); flex: none; }
.byline__name { font-family: var(--font-display); font-weight: 700; font-size: var(--display-sm); }
.byline__role { font-size: var(--text-sm); color: var(--text-secondary); line-height: var(--leading-snug); }
.hero h1 { font-family: var(--font-display); font-weight: 700; font-size: var(--display-hero); line-height: var(--leading-tight); text-transform: none; }

.how-list { counter-reset: step; }
.how-list li {
  display: grid; grid-template-columns: auto 1fr; gap: var(--space-1) var(--space-3);
  padding-block: var(--space-2); border-bottom: 1px solid var(--line);
}
.how-list .num, .process .num {
  grid-row: span 2; align-self: start; display: inline-grid; place-items: center; min-width: 1.75rem; height: 1.5rem; padding-inline: var(--space-2);
  border-radius: var(--radius-pill); background: var(--text-label); color: var(--bg-fill); font-weight: 700; font-size: var(--text-xs);
}
.how-list__head { display: flex; justify-content: space-between; gap: var(--space-3); align-items: baseline; }
.how-list__step { font-family: var(--font-display); font-weight: 700; font-size: var(--display-sm); text-transform: uppercase; }
.how-list__detail { font-size: var(--text-sm); line-height: var(--leading-snug); }
.how-list a { font-size: var(--text-xs); font-weight: 700; white-space: nowrap; }
.site-line { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); font-weight: 500; }
.site-line a { font-weight: 700; font-size: var(--text-sm); }

/* artifacts: stacked grid on phones, overlapping collage on wide screens */
.artifacts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); align-items: start; }
.artifact { margin: 0; display: grid; gap: var(--space-2); justify-items: start; }
.artifact img { border-radius: var(--radius-sm); }
.artifact--journey img { background: var(--color-paper); }
.artifact figcaption, .tag {
  display: inline-block; padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill);
  background: var(--text-label); color: var(--bg-fill); font-size: var(--text-xs); font-weight: 700;
}
.artifact a { text-decoration: none; }
.artifact--journey, .artifact--auditor { grid-column: 1; }
.artifact--usher { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 63.99rem) {
  .artifacts { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .artifact figcaption { font-size: var(--text-xs); line-height: var(--leading-snug); padding: var(--space-1) var(--space-2); }
}
@media (min-width: 64rem) {
  .hero__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--space-9); }
  .artifacts { position: relative; display: block; min-height: 33rem; }
  .artifact { position: absolute; padding: var(--space-3); border-radius: var(--radius-card); background: var(--bg-raised); box-shadow: var(--shadow-lift); }
  .artifact--journey { width: 62%; left: 0; top: 0; rotate: -3deg; }
  .artifact--auditor { width: 66%; left: 24%; top: 47%; rotate: 2deg; }
  .artifact--usher { width: 34%; right: 0; top: 4%; rotate: -2deg; padding: 0; background: none; box-shadow: none; }
}

/* phone frame */
.phone { padding: 0.5rem; border-radius: var(--radius-phone); background: var(--color-hero-bg); box-shadow: var(--shadow-lift); }
.phone img { border-radius: calc(var(--radius-phone) - 0.5rem); }

/* proof boxes */
.proof { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); padding-bottom: var(--space-6); }
@media (min-width: 52rem) { .proof { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); } }
.proof li { display: grid; gap: var(--space-1); align-content: start; padding: var(--space-4); border-radius: var(--radius-card); background: var(--bg-raised); }
.proof .display { font-size: var(--stat); color: var(--text-label); }
.proof p { font-size: var(--text-sm); line-height: var(--leading-snug); }
.proof a { font-size: var(--text-xs); font-weight: 700; }

/* ---------- Cards ---------- */
.card { display: grid; gap: var(--space-4); padding: var(--space-3); border: var(--border); border-radius: var(--radius-card); background: var(--bg-raised); }
.card__media { border-radius: calc(var(--radius-card) - 0.25rem); overflow: hidden; background: var(--bg-placeholder); aspect-ratio: 16 / 10; }
.card__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.card__media--contain img { object-fit: contain; background: var(--color-paper); }
.card__media--dark { background: var(--color-hero-bg); }
.card__media--dark img { object-fit: contain; }
.card__body { display: grid; gap: var(--space-3); align-content: start; padding: var(--space-2) var(--space-3) var(--space-3); }
.card h3 { font-family: var(--font-display); font-weight: 700; font-size: var(--display-md); }
.card h3 a { color: var(--text-primary); text-decoration: none; }
.card p { color: var(--text-secondary); }
.card--feature { gap: var(--space-6); }
@media (min-width: 52rem) {
  .card--feature { grid-template-columns: 1.4fr 1fr; align-items: center; }
  .card--feature .card__media { aspect-ratio: 5 / 3; }
}
.card-grid { display: grid; gap: var(--space-6); }
@media (min-width: 46rem) { .card-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 52rem) { .card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card--small h3 { font-size: var(--display-sm); }
.card .confidential, .confidential { display: grid; place-items: center; height: 100%; padding: var(--space-4); color: var(--color-hero-muted); font-size: var(--text-sm); text-align: center; }

.stack { display: grid; gap: var(--space-6); }

/* stand-outs */
.standouts { display: grid; gap: var(--space-5); }
@media (min-width: 40rem) { .standouts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .standouts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.standouts li { display: grid; gap: var(--space-2); align-content: start; padding: var(--space-6); border: var(--border); border-radius: var(--radius-card); background: var(--bg-raised); }
.standouts .kind { font-size: var(--text-xs); font-weight: 700; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-label-alt); }
.standouts h3 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: var(--display-md); color: var(--text-label); }
.standouts p { font-size: var(--text-sm); line-height: 1.5; }
.standouts .source { color: var(--text-secondary); font-weight: 500; }

/* two-column label / text rows (How I lead, case study sections) */
.rows > * { display: grid; gap: var(--space-3); padding-block: var(--space-7); border-top: var(--border); }
.rows > *:first-child { border-top: 0; }
.rows h2 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: var(--display-md); }
.rows p + p, .rows p + ul { margin-top: var(--space-4); }
@media (min-width: 52rem) {
  .rows > * { grid-template-columns: 17.5rem 1fr; gap: var(--space-10); }
  .rows--loose > * { padding-block: var(--space-8); }
}
.prose { font-size: var(--text-md); max-width: 46rem; }
.link-row { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); margin-top: var(--space-4); }

.split { display: grid; gap: var(--space-5); }
@media (min-width: 52rem) { .split { grid-template-columns: 21rem 1fr; gap: var(--space-10); } }
.split .section-title { color: var(--text-label); }
.split p { font-size: var(--text-lg); line-height: 1.6; }

/* ---------- Case study ---------- */
.case-header { padding-block: var(--space-9) var(--space-8); }
.case-header__grid { display: grid; gap: var(--space-8); align-items: center; }
@media (min-width: 64rem) { .case-header__grid--media { grid-template-columns: 1.3fr 1fr; } }
.case-header h1 { font-family: var(--font-display); font-weight: 700; font-size: var(--display-xl); max-width: 22ch; margin-block: var(--space-4); }
.case-header .subtitle { font-style: italic; color: var(--text-secondary); font-size: var(--text-md); margin-bottom: var(--space-6); }
.badge { display: inline-block; margin-left: var(--space-2); padding: 0.125rem var(--space-3); border-radius: var(--radius-pill); background: var(--text-label); color: var(--bg-fill); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; vertical-align: middle; }

.snapshot { display: grid; gap: var(--space-4) var(--space-6); margin-top: var(--space-6); }
@media (min-width: 40rem) { .snapshot { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .snapshot { grid-template-columns: repeat(4, minmax(0, 1fr)); } .case-header__grid--media .snapshot { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.snapshot div { padding-top: var(--space-3); border-top: 1px solid var(--line); }
.snapshot dt { font-size: var(--text-xs); font-weight: 700; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-label); }
.snapshot dd { font-size: var(--text-sm); line-height: 1.5; margin-top: var(--space-1); }

.process-band { padding-block: var(--space-8) var(--space-9); }
.process { display: grid; gap: var(--space-5); margin-top: var(--space-5); }
@media (min-width: 52rem) { .process { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.process li { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-3); align-content: start; }
@media (min-width: 52rem) { .process li { grid-template-columns: 1fr; } .process .num { grid-row: auto; justify-self: start; } }
.process h3 { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: var(--display-sm); color: var(--text-primary); }
.process p { font-size: var(--text-sm); line-height: 1.5; color: var(--text-secondary); grid-column: 2; }
@media (min-width: 52rem) { .process p { grid-column: auto; } }

.decisions { display: grid; gap: var(--space-5); margin-top: var(--space-2); }
@media (min-width: 52rem) { .decisions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* three decisions sit in one row on wide screens instead of leaving a gap */
@media (min-width: 64rem) { .decisions:has(> li:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.decisions li { display: grid; gap: var(--space-2); align-content: start; padding: var(--space-6); border: var(--border); border-radius: var(--radius-card); background: var(--bg-raised); }
.decisions .num { font-family: var(--font-display); font-weight: 800; font-size: var(--display-lg); color: var(--text-label); line-height: 1; }
.decisions h3 { font-size: var(--text-md); font-weight: 700; font-family: var(--font-body); line-height: 1.35; }
.decisions p { font-size: var(--text-base); }
.rows .decisions-row { grid-template-columns: 1fr; }

.figures { display: grid; gap: var(--space-8) var(--space-6); }
@media (min-width: 46rem) { .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.figures--3 { justify-items: center; }
@media (min-width: 46rem) { .figures--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.figure { margin: 0; display: grid; gap: var(--space-3); align-content: start; }
.figure__frame { border-radius: var(--radius-card); overflow: hidden; border: var(--border); background: var(--color-paper); }
.figure__frame--dark { background: var(--color-hero-bg); border-color: var(--color-hero-line); }
.figure figcaption { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.5; }
.figure--phone { max-width: 18.75rem; width: 100%; }
.figure--phone figcaption { text-align: center; color: var(--text-primary); font-weight: 500; }
.img-todo {
  display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: var(--radius-card);
  border: 2px dashed var(--line); background: var(--bg-placeholder); color: var(--text-secondary); font-size: var(--text-sm); font-weight: 500;
}
.figures__note { margin-top: var(--space-6); font-size: var(--text-sm); font-style: italic; color: var(--text-secondary); }
.wp-card { display: grid; gap: var(--space-4); padding: var(--space-5); border: var(--border); border-radius: var(--radius-card); background: var(--bg-raised); align-items: center; }
@media (min-width: 30rem) { .wp-card { grid-template-columns: 12rem 1fr; } }
.wp-card img { border-radius: var(--radius-sm); }

/* ---------- About ---------- */
.about-header__grid { display: grid; gap: var(--space-8); align-items: center; }
@media (min-width: 52rem) { .about-header__grid { grid-template-columns: 1.4fr 1fr; } }
.about-header img { border-radius: var(--radius-card); width: 100%; }
.refs { display: grid; gap: var(--space-5); }
@media (min-width: 52rem) { .refs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.refs li { margin: 0; display: grid; gap: var(--space-4); align-content: space-between; padding: var(--space-6); border: var(--border); border-radius: var(--radius-card); background: var(--bg-raised); }
.refs blockquote { margin: 0; font-size: var(--text-md); line-height: 1.5; }
.refs blockquote::before { content: "\201C"; display: block; font-family: var(--font-display); font-weight: 800; font-size: 3.5rem; line-height: 0.6; color: var(--text-label); margin-bottom: var(--space-2); }
.refs .who { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.45; }
.refs .who a { font-weight: 700; font-size: var(--text-base); }
.pending { font-size: var(--text-sm); color: var(--text-label-alt); font-weight: 500; }

/* ---------- Earlier work ---------- */
.timeline li { display: grid; gap: var(--space-1) var(--space-8); padding-block: var(--space-6); border-bottom: var(--border); }
@media (min-width: 52rem) { .timeline li { grid-template-columns: 17.5rem 8rem 1fr; align-items: baseline; } }
.timeline h2 { font-family: var(--font-display); font-weight: 700; font-size: var(--display-sm); }
.timeline .years { color: var(--text-label-alt); font-size: var(--text-sm); font-weight: 500; }

/* ---------- Tokens showcase (How I built this site) ---------- */
.swatches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
@media (min-width: 46rem) { .swatches { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.swatches li { display: grid; gap: var(--space-1); font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: var(--text-xs); }
.swatch { height: 4rem; border-radius: var(--radius-sm); border: var(--border); margin-bottom: var(--space-1); }
.type-samples { display: grid; gap: var(--space-5); margin-top: var(--space-7); }
@media (min-width: 46rem) { .type-samples { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.type-samples li { padding: var(--space-5); border: var(--border); border-radius: var(--radius-card); background: var(--bg-raised); display: grid; gap: var(--space-2); }
.type-samples .kind { font-size: var(--text-xs); font-weight: 700; letter-spacing: var(--tracking-label); color: var(--text-label-alt); text-transform: uppercase; }

/* ---------- Clickable cards ----------
   The card's title link is stretched over the whole card, so the entire
   card is one target with one accessible name. States: hover (lift 1px),
   pressed, and focus-visible (ring around the whole card). */
.is-clickable { position: relative; transition: translate var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out); }
.is-clickable .stretched { text-decoration: none; }
.is-clickable .stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.is-clickable:hover, .is-clickable.is-hover { translate: 0 var(--lift); box-shadow: var(--shadow-hover); border-color: var(--link); }
.is-clickable:active, .is-clickable.is-pressed { translate: 0 0; box-shadow: none; }
.is-clickable:hover .button { background: var(--button-fill-hover); }
.is-clickable:active .button { background: var(--button-fill-pressed); }
.is-clickable:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.is-clickable .stretched:focus-visible { outline: none; }
.is-clickable:not(:has(:focus-visible)):not(.is-focus) { outline: none; }
.stretched-cue { pointer-events: none; }

/* artifact links in the home hero */
.artifact__link { display: grid; gap: var(--space-2); justify-items: start; color: inherit; text-decoration: none; border-radius: var(--radius-card); transition: translate var(--duration-fast) var(--ease-out); }
.artifact__link:hover { translate: 0 var(--lift); }
.artifact__link:hover figcaption { background: var(--link-hover); }
.artifact__link:active { translate: 0 0; }
.artifact__link:active figcaption { background: var(--link-pressed); }

/* small layout helpers (instead of inline styles) */
.after-list { margin-top: var(--space-6); }

/* ---------- Reduced motion: no lift, no transitions ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  .is-clickable:hover, .artifact__link:hover, a.button:hover, .nav-mobile summary:hover { translate: none; }
}

/* ---------- Scroll reveal ----------
   site.js adds .js to <html> and .is-visible to each .reveal element as it
   enters the viewport. Without JavaScript, or with reduced motion, content is
   simply shown. Uses transform (not translate) so it never fights the 1px
   hover lift on cards. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(var(--reveal-distance));
    transition: opacity var(--duration-reveal) var(--ease-out), transform var(--duration-reveal) var(--ease-out), translate var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
  }
  .js .reveal.is-visible { opacity: 1; transform: none; }
  .js :is(.card-grid, .standouts, .decisions, .figures, .refs, .specimens, .card-specimens, .process, .how-list, .proof, .bg-grid) > .reveal:nth-child(2) { transition-delay: var(--stagger); }
  .js :is(.card-grid, .standouts, .decisions, .figures, .refs, .specimens, .card-specimens, .process, .how-list, .proof, .bg-grid) > .reveal:nth-child(3) { transition-delay: calc(var(--stagger) * 2); }
  .js :is(.card-grid, .standouts, .decisions, .figures, .refs, .specimens, .card-specimens, .process, .how-list, .proof, .bg-grid) > .reveal:nth-child(4) { transition-delay: calc(var(--stagger) * 3); }
  .js :is(.card-grid, .standouts, .decisions, .figures, .refs, .specimens, .card-specimens, .process, .how-list, .proof, .bg-grid) > .reveal:nth-child(5) { transition-delay: calc(var(--stagger) * 4); }
  .js :is(.card-grid, .standouts, .decisions, .figures, .refs, .specimens, .card-specimens, .process, .how-list, .proof, .bg-grid) > .reveal:nth-child(n+6) { transition-delay: calc(var(--stagger) * 5); }
  .js .reveal.is-visible:hover { transition-delay: 0s; }
}

/* ---------- Theme toggle ---------- */
.header-tools { display: flex; align-items: center; gap: var(--space-4); }
.theme-toggle {
  display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: var(--bg-raised); color: var(--text-primary);
  transition: background-color var(--duration-fast) var(--ease-out), translate var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}
.theme-toggle svg { width: 1.125rem; height: 1.125rem; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle:is([aria-pressed="true"], [data-on="true"]) .icon-sun { display: block; }
.theme-toggle:is([aria-pressed="true"], [data-on="true"]) .icon-moon { display: none; }
.theme-toggle:hover, .theme-toggle.is-hover { translate: 0 var(--lift); border-color: var(--text-label); color: var(--link-hover); }
.theme-toggle:active, .theme-toggle.is-pressed { translate: 0 0; background: var(--bg-fill); color: var(--text-secondary); }
html:not(.js) .site-header .theme-toggle { display: none; }

/* circular reveal when the theme changes (View Transitions); site.js animates the clip */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }
.is-theme-swapping .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; }

/* ---------- Component specimens (How I built this site) ---------- */
.specimens { display: grid; gap: var(--space-6); }
@media (min-width: 52rem) { .specimens { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.specimen { margin: 0; display: grid; gap: var(--space-4); align-content: start; padding: var(--space-6); border: var(--border); border-radius: var(--radius-card); background: var(--bg-raised); }
.specimen--wide { grid-column: 1 / -1; }
.specimen h3 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: var(--display-sm); }
.specimen > p { color: var(--text-secondary); font-size: var(--text-sm); }
.state-row { display: flex; flex-wrap: wrap; gap: var(--space-5) var(--space-6); align-items: flex-end; }
.state { display: grid; gap: var(--space-2); justify-items: start; }
.state__label { font-size: var(--text-xs); font-weight: 700; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-label-alt); }
.stage { padding: var(--space-2) var(--space-5); border-radius: var(--radius-sm); }
.stage .nav-list { gap: var(--space-5); flex-wrap: wrap; }
.stage .tab { color: var(--text-secondary); font-size: var(--text-sm); font-weight: 500; padding-block: var(--space-3); }
.is-focus { outline: 3px solid var(--focus); outline-offset: 3px; }
.link-specimen { color: var(--link); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.link-specimen.is-hover { color: var(--link-hover); text-decoration-line: none; }
.link-specimen.is-pressed { color: var(--link-pressed); text-decoration-line: none; }
.card-specimens { display: grid; gap: var(--space-5); }
@media (min-width: 40rem) { .card-specimens { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .card-specimens { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card-specimens .state { justify-items: stretch; }
.card-specimens .card__body { padding: var(--space-2); gap: var(--space-2); }
.card-specimens .card h3 { font-size: var(--display-sm); }

/* ---------- Print ---------- */
@media print {
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .theme-toggle { display: none; }
  .site-header, .skip-link { position: static; }
  .nav-mobile, .nav-desktop { display: none; }
  .on-dark { background: var(--color-paper); color: var(--color-ink); }
}

/* ---------- Mode scopes ----------
   .scope-light / .scope-dark render a block in one mode regardless of the
   page theme (used by the Light / Dark tabs on How I built this site).
   Derived tokens are redeclared so they pick up the scoped colors. */
.scope-light, .scope-dark {
  --shadow-lift: 0 1rem 2.5rem var(--color-shadow);
  --shadow-hover: 0 0.375rem 1.25rem var(--color-shadow-soft);
  color: var(--text-primary);
  background: var(--bg-fill);
}
.scope-light {
  color-scheme: light;
  --color-bg: #f1ece1; --color-surface: #fbf8f1; --color-ink: #1f2a1f; --color-ink-active: #1f2a1f; --color-hero-ink-active: #f2ede1; --color-muted: #575a4a;
  --color-accent: #355e3b; --color-on-accent: #ffffff; --color-accent-soft: #dde3cf; --color-line: #d8d0be;
  --color-placeholder: #e2dbcb; --color-disabled-fill: #e4ddcf; --color-disabled-text: #9c9789; --color-hero-disabled-fill: #2e3c31; --color-hero-disabled-text: #6e7663; --color-clay: #7d5034; --color-hero-bg: #1e2b22; --color-hero-surface: #2a3a2d;
  --color-hero-line: #3a4a3a; --color-hero-clay: #d4a27f; --color-hero-ink: #f2ede1; --color-hero-muted: #aaad9b; --color-accent-hover: #2a4b2f; --color-accent-pressed: #1f3a24;
  --color-ink-hover: #2f3d2f; --color-ink-pressed: #141c15; --color-shadow: rgb(0 0 0 / 0.28); --color-shadow-soft: rgb(0 0 0 / 0.12);
}
.scope-dark {
  color-scheme: dark;
  --color-bg: #141c16; --color-surface: #1c261e; --color-ink: #abaa9f; --color-ink-active: #ece7da; --color-hero-ink-active: #f2ede1; --color-muted: #9b9b90; --color-hero-ink: #aeaca2; --color-hero-muted: #8e8f86;
  --color-accent: #a9ae6a; --color-on-accent: #141c16; --color-accent-soft: #1a251d; --color-line: #3a4a3c;
  --color-placeholder: #263126; --color-disabled-fill: #222c24; --color-disabled-text: #5f6158; --color-hero-disabled-fill: #18221a; --color-hero-disabled-text: #4e544c; --color-clay: #d4a27f; --color-hero-bg: #0e1510; --color-hero-surface: #1b271e;
  --color-hero-line: #2c3a2e; --color-accent-hover: #c4c98a; --color-accent-pressed: #a0a566;
  --color-ink-hover: #bdbcb1; --color-ink-pressed: #9a998f; --color-shadow: rgb(0 0 0 / 0.55); --color-shadow-soft: rgb(0 0 0 / 0.4);
}

/* ---------- Tabs (content tabs; nav uses the same bar language) ----------
   States: default, hover, pressed, focus-visible, selected (aria-selected). */
.tabs__list { display: flex; gap: var(--space-6); border-bottom: var(--border); margin-bottom: var(--space-7); }
html:not(.js) .tabs__list { display: none; }
.tab-button {
  position: relative; padding: var(--space-3) 0; margin: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: var(--text-base); font-weight: 500; color: var(--text-secondary);
  transition: color var(--duration-fast) var(--ease-out);
}
.tab-button::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: var(--tab-bar); border-radius: var(--radius-pill);
  background: var(--text-label); transform: scaleX(0); transition: transform var(--duration-fast) var(--ease-out), opacity var(--duration-fast) var(--ease-out);
}
.tab-button:hover { color: var(--text-active); }
.tab-button:hover::after { transform: scaleX(1); opacity: 0.5; }
.tab-button:active { color: var(--text-active); }
.tab-button:active::after { transform: scaleX(1); opacity: 0.75; }
.tab-button:is([aria-selected="true"], [aria-pressed="true"]) { color: var(--text-active); }
.tab-button:is([aria-selected="true"], [aria-pressed="true"])::after { transform: scaleX(1); }
.tabs__panel { display: grid; gap: var(--space-8); padding: var(--space-7); border-radius: var(--radius-card); border: var(--border); }
.tabs__panel + .tabs__panel { margin-top: var(--space-7); }
.js .tabs__panel + .tabs__panel { margin-top: 0; }
.tabs__panel[hidden] { display: none; }
.js .tabs__panel .panel-title { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.panel-title { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: var(--display-md); }
.subsection-title { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: var(--display-sm); margin-bottom: var(--space-4); }
@media (max-width: 39.99rem) { .tabs__panel { padding: var(--space-5); } }
.after-head { margin: calc(var(--space-2) * -1) 0 var(--space-5); font-size: var(--text-sm); }
.card-specimen__title { font-family: var(--font-display); font-weight: 700; font-size: var(--display-sm); color: var(--text-primary); line-height: var(--leading-tight); }
.specimen .subsection-title { margin-bottom: 0; }
.js .tabs__panel { position: relative; }

/* ---------- Breadcrumb ("← Work / Broadcom case study") ----------
   Link states come from the shared link styles; the arrow nudges left on
   hover. The current page is plain text marked aria-current="page". */
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); font-size: var(--text-sm); font-weight: 500; }
.breadcrumb li { display: inline-flex; align-items: center; gap: var(--space-2); }
.breadcrumb li + li::before { content: "/"; color: var(--text-secondary); }
.breadcrumb a { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 1.5rem; padding-block: var(--space-1); font-weight: 700; text-decoration: none; }
.breadcrumb__arrow { display: inline-block; transition: transform var(--duration-fast) var(--ease-out); }
.breadcrumb a:hover .breadcrumb__arrow { transform: translateX(-3px); }
.breadcrumb [aria-current="page"] { color: var(--text-secondary); }
.breadcrumb .badge { margin-left: 0; }
.case-header .breadcrumb { margin-bottom: var(--space-2); }
.badge { white-space: nowrap; }
/* Phones: show just "← Work" (and any badge); the page name stays for screen readers. */
@media (max-width: 39.99rem) {
  .breadcrumb li + li::before { display: none; }
  .breadcrumb [aria-current="page"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

.nav-list a[aria-current="page"]::after, .nav-list .is-current::after, .tab-button:is([aria-selected="true"], [aria-pressed="true"])::after { opacity: 1; }

/* ---------- Typewriter (footer "Let's talk") ---------- */
.typewriter { display: inline-grid; }
.typewriter > * { grid-area: 1 / 1; }
.typewriter__ghost { visibility: hidden; }
.typewriter__typed::after {
  content: ""; display: inline-block; width: 0.08em; height: 0.9em; margin-left: 0.06em; vertical-align: -0.05em;
  background: var(--text-label); opacity: 0;
}
.typewriter.is-typing .typewriter__typed::after { opacity: 1; animation: caret-blink 1s steps(1) infinite; }
@keyframes caret-blink { 50% { opacity: 0; } }
/* Tabs and text links have no visible shape, so give their focus ring soft corners. */
.nav-list a, .nav-list .tab, .tab-button, .breadcrumb a { border-radius: var(--radius-sm); }
a:not([class]):focus-visible, .link-specimen.is-focus, .arrow-link:focus-visible { border-radius: 3px; }

/* ---------- Design system showcase (How I built this site) ---------- */
.swatch--bg { background: var(--color-bg); }
.swatch--surface { background: var(--color-surface); }
.swatch--accent-soft { background: var(--color-accent-soft); }
.swatch--ink { background: var(--color-ink); }
.swatch--ink-active { background: var(--color-ink-active); }
.swatch--hero-ink-active { background: var(--color-hero-ink-active); }
.swatch--muted { background: var(--color-muted); }
.swatch--accent { background: var(--color-accent); }
.swatch--accent-hover { background: var(--color-accent-hover); }
.swatch--accent-pressed { background: var(--color-accent-pressed); }
.swatch--on-accent { background: var(--color-on-accent); }
.swatch--ink-hover { background: var(--color-ink-hover); }
.swatch--ink-pressed { background: var(--color-ink-pressed); }
.swatch--clay { background: var(--color-clay); }
.swatch--line { background: var(--color-line); }
.swatch--hero-bg { background: var(--color-hero-bg); }
.swatch--hero-surface { background: var(--color-hero-surface); }
.swatch--hero-ink { background: var(--color-hero-ink); }
.swatch--hero-muted { background: var(--color-hero-muted); }
.swatch--hero-accent { background: var(--color-hero-accent); }
.swatch--hero-accent-hover { background: var(--color-hero-accent-hover); }
.swatch--hero-accent-pressed { background: var(--color-hero-accent-pressed); }
.swatch--hero-on-accent { background: var(--color-hero-on-accent); }
.swatch--hero-clay { background: var(--color-hero-clay); }
.swatch--hero-line { background: var(--color-hero-line); }
.chip--bg-fill { background: var(--bg-fill); }
.chip--bg-raised { background: var(--bg-raised); }
.chip--text-primary { background: var(--text-primary); }
.chip--text-secondary { background: var(--text-secondary); }
.chip--text-label { background: var(--text-label); }
.chip--text-label-alt { background: var(--text-label-alt); }
.chip--link { background: var(--link); }
.chip--link-hover { background: var(--link-hover); }
.chip--link-pressed { background: var(--link-pressed); }
.chip--button-fill { background: var(--button-fill); }
.chip--button-fill-hover { background: var(--button-fill-hover); }
.chip--button-fill-pressed { background: var(--button-fill-pressed); }
.chip--button-text { background: var(--button-text); }
.chip--line { background: var(--line); }
.chip--focus { background: var(--focus); }
@media (min-width: 64rem) { .swatches--dense { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.swatches--dense .swatch { height: 3rem; }
.table-scroll { overflow-x: auto; border: var(--border); border-radius: var(--radius-card); }
.token-table { width: 100%; min-width: 46rem; border-collapse: collapse; font-size: var(--text-xs); }
.token-table th, .token-table td { padding: var(--space-2) var(--space-3); text-align: left; border-bottom: var(--border); white-space: nowrap; }
.token-table thead th { font-weight: 700; letter-spacing: var(--tracking-label); text-transform: uppercase; }
.token-table td span:last-child { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.token-table td { color: var(--text-secondary); }
.token-table code { font-size: var(--text-xs); }
.chip { display: inline-block; width: 1rem; height: 1rem; margin-right: var(--space-2); vertical-align: -0.2em; border-radius: 4px; border: 1px solid var(--line); }
.bg-grid { display: grid; gap: var(--space-5); }
.bg-sample { padding: var(--space-6); border-radius: var(--radius-card); border: var(--border); display: grid; gap: var(--space-5); }
.bg-sample__grid { display: grid; gap: var(--space-6); }
@media (min-width: 52rem) { .bg-sample__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 80rem) { .bg-sample__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bg-sample__group { display: grid; gap: var(--space-3); align-content: start; }
.bg-sample__group--wide { grid-column: 1 / -1; }
.bg-sample__text { display: grid; gap: var(--space-1); }
.bg-sample__alt { font-size: var(--text-xs); font-weight: 700; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-label-alt); }
.bg-sample .card-specimens { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 51.99rem) { .bg-sample .card-specimens { grid-template-columns: 1fr; } }
.bg-sample .nav-list { gap: 0; }
.bg-sample .tab { font-size: var(--text-sm); font-weight: 500; padding-block: var(--space-3); }
/* Clickable cards signal hover with the 1px lift and border, not an underline. */
.is-clickable .stretched, .is-clickable:hover .stretched { text-decoration: none; }
/* State pictures are illustrations: they don't react to the real pointer. */
.bg-sample__grid, .specimens { pointer-events: none; }
.tabs__panel > * { min-width: 0; }
.chip--text-active { background: var(--text-active); }

/* ---------- Home hero (C2 design): eyebrow, headline, portrait, three stats ---------- */
.hero--portrait { padding-block: var(--space-9) var(--space-8); }
.hero--portrait .hero__grid { align-items: center; gap: var(--space-8); }
.hero--portrait .hero__intro { gap: var(--space-5); }
.hero--portrait h1 { font-size: var(--display-portrait); }
.hero__portrait { width: min(100%, 18.75rem); aspect-ratio: 300 / 460; object-fit: cover; object-position: center top; border-radius: var(--radius-card); border: 1px solid var(--line); }
@media (min-width: 52rem) {
  .hero--portrait .hero__grid { grid-template-columns: minmax(0, 1fr) 18.75rem; gap: var(--space-10); }
}
@media (max-width: 51.99rem) { .hero__portrait { width: 12rem; order: -1; } }
.proof--3 { margin-top: var(--space-9); padding-bottom: 0; }
@media (min-width: 52rem) { .proof--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 51.99rem) { .proof--3 { grid-template-columns: 1fr; } }
.proof--3 li { padding: var(--space-5) var(--space-5) var(--space-6); }
.proof--3 .display { font-size: var(--display-lg); line-height: 1; }
.proof--3 .stretched { color: var(--text-primary); text-decoration: none; }
.proof--3 .stretched:hover { color: var(--text-primary); }
.proof li.is-clickable { border: 1px solid transparent; }
.proof--3 .stretched { font-size: var(--text-sm); font-weight: 400; line-height: var(--leading-snug); }
@media (max-width: 51.99rem) { .hero__portrait { width: 9.5rem; } }
.bg-switch { margin-bottom: var(--space-5); flex-wrap: wrap; gap: var(--space-2) var(--space-6); }
.bg-sample { transition: background-color var(--duration-reveal) var(--ease-out), color var(--duration-reveal) var(--ease-out); }

/* ---------- Home hero, C3 compact layout (Figma node 25:3) ---------- */
@media (min-width: 64rem) {
  .hero { padding-block: var(--space-6) var(--space-5); }
  .hero__intro { gap: var(--space-4); }
  .hero h1 { font-size: var(--display-hero); }
  .how-list li {
    grid-template-columns: auto 8.5rem minmax(0, 1fr) auto;
    align-items: center; gap: var(--space-4); padding-block: var(--space-2);
  }
  .how-list .num { grid-row: auto; align-self: center; }
  .how-list__head { display: contents; }
  .how-list__step { grid-column: 2; grid-row: 1; font-size: var(--text-lg); }
  .how-list__detail { grid-column: 3; grid-row: 1; }
  .how-list__head a { grid-column: 4; grid-row: 1; }
  .artifacts { min-height: 27rem; }
  .artifact--journey { width: 58%; }
  .artifact--auditor { width: 58%; left: 16%; top: 47%; }
  .artifact--usher { width: 28%; top: 2%; }
  .artifact--usher figcaption { white-space: nowrap; }
  .proof { padding-bottom: var(--space-6); }
}

/* ---------- Client logo plate (case study headers) ----------
   Brand marks keep their own colors, so they sit on a light plate in every
   background and mode. */
.logo-plate {
  display: inline-flex; align-items: center; margin-top: var(--space-5);
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-sm);
  background: var(--color-paper);
}
.logo-plate img { height: 1.625rem; width: auto; }
.logo-plate--marks { gap: var(--space-5); }
.logo-plate--marks img { height: 3.25rem; }

/* ---------- Disabled state (every interactive component) ----------
   Uses --disabled-fill / --disabled-text from the current background.
   Disabled controls are exempt from WCAG contrast, but stay distinct from
   the default quiet text. No hover, press or lift. */
.button:is(.is-disabled, [aria-disabled="true"], :disabled),
a.button[aria-disabled="true"]:hover {
  background: var(--disabled-fill); color: var(--disabled-text); box-shadow: none; translate: none; cursor: not-allowed;
}
a[aria-disabled="true"], .link-specimen.is-disabled { color: var(--disabled-text); text-decoration-line: none; cursor: not-allowed; pointer-events: none; }
.nav-list :is(a[aria-disabled="true"], .is-disabled), .tab-button:is(:disabled, [aria-disabled="true"], .is-disabled) { color: var(--disabled-text); cursor: not-allowed; }
.nav-list :is(a[aria-disabled="true"], .is-disabled)::after, .tab-button:is(:disabled, [aria-disabled="true"], .is-disabled)::after { transform: scaleX(0); }
.theme-toggle:is(:disabled, .is-disabled) { color: var(--disabled-text); border-color: var(--line); background: var(--disabled-fill); translate: none; cursor: not-allowed; }
.is-clickable.is-disabled { translate: none; box-shadow: none; border-color: var(--line); cursor: not-allowed; }
.is-clickable.is-disabled :is(.card-specimen__title, p, .eyebrow) { color: var(--disabled-text); }
.chip--disabled-fill { background: var(--disabled-fill); }
.chip--disabled-text { background: var(--disabled-text); }
.swatch--disabled-fill { background: var(--color-disabled-fill); }
.swatch--disabled-text { background: var(--color-disabled-text); }
.swatch--hero-disabled-fill { background: var(--color-hero-disabled-fill); }
.swatch--hero-disabled-text { background: var(--color-hero-disabled-text); }

/* ---------- iPhone mockup ----------
   Titanium frame, black bezel, Dynamic Island, side buttons. The screenshot
   fills the screen from the top. Used for Usher's Toolkit screens. */
.iphone {
  position: relative; width: 100%; aspect-ratio: 9 / 19.2;
  padding: 2.6%; border-radius: 15% / 7%;
  background: linear-gradient(145deg, var(--device-frame-c), var(--device-frame-b) 35%, var(--device-frame-a) 60%, var(--device-frame-b));
  box-shadow: var(--shadow-lift), inset 0 0 0 1px rgb(255 255 255 / 0.18);
}
.iphone::before, .iphone::after { content: ""; position: absolute; width: 1.2%; border-radius: 2px; background: var(--device-frame-b); }
.iphone::before { left: -1%; top: 20%; height: 11%; }
.iphone::after { right: -1%; top: 25%; height: 15%; }
.iphone__screen {
  position: relative; height: 100%; overflow: hidden; border-radius: 12.5% / 5.8%;
  display: flex; flex-direction: column; background: var(--device-bezel);
}
.iphone__screen img { flex: 1; min-height: 0; width: 100%; object-fit: cover; object-position: center top; }
/* status bar strip keeps app content clear of the Dynamic Island */
.iphone__island {
  flex: none; position: relative; height: 0; padding-top: 13%; background: var(--device-bezel);
}
.iphone__island::after {
  content: ""; position: absolute; top: 28%; left: 50%; translate: -50% 0;
  width: 31%; height: 50%; border-radius: var(--radius-pill); background: var(--device-island);
}
@media (min-width: 64rem) { .artifact--usher { z-index: 2; } }

/* ---------- Minimum target size (WCAG 2.2 · 2.5.8) ----------
   Standalone links get at least a 24px-tall target; links inside sentences
   are exempt. Buttons, tabs and the toggle are already larger. */
:root { --target-min: 1.5rem; }
.how-list a, .arrow-link, .footer-links a, .site-line a, .breadcrumb a, .proof a, .after-list a, .link-row a {
  display: inline-flex; align-items: center; gap: 0.3em; min-height: var(--target-min); min-width: var(--target-min);
}

/* ---------- Accessibility section and "Show accessibility" ---------- */
.a11y-table { margin-top: var(--space-5); }
.a11y-table .token-table { min-width: 34rem; font-size: var(--text-sm); }
.a11y-table th[scope="row"] { font-weight: 500; white-space: normal; }
.pass { font-weight: 700; color: var(--text-label); }
.a11y-note { margin-top: var(--space-4); font-size: var(--text-sm); }
.bg-tools { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); border-bottom: var(--border); }
.bg-tools .bg-switch { margin-bottom: 0; border-bottom: 0; }
.a11y-toggle {
  display: inline-flex; align-items: center; gap: var(--space-3); min-height: var(--target-min); margin-bottom: var(--space-3);
  padding: var(--space-2) var(--space-3); border: 0; border-radius: var(--radius-pill); background: none; cursor: pointer;
  font: inherit; font-size: var(--text-sm); font-weight: 700; color: var(--text-primary);
}
.a11y-toggle__track { position: relative; width: 2.5rem; height: 1.5rem; border-radius: var(--radius-pill); background: var(--line); transition: background-color var(--duration-fast) var(--ease-out); }
.a11y-toggle__track::after { content: ""; position: absolute; top: 0.1875rem; left: 0.1875rem; width: 1.125rem; height: 1.125rem; border-radius: 50%; background: var(--bg-fill); box-shadow: 0 1px 2px var(--color-shadow-soft); transition: translate var(--duration-fast) var(--ease-out); }
.a11y-toggle[aria-pressed="true"] .a11y-toggle__track { background: var(--button-fill); }
.a11y-toggle[aria-pressed="true"] .a11y-toggle__track::after { translate: 1rem 0; background: var(--button-text); }
.a11y-toggle:hover .a11y-toggle__track { background: var(--text-secondary); }
.a11y-toggle[aria-pressed="true"]:hover .a11y-toggle__track { background: var(--button-fill-hover); }
html:not(.js) .a11y-toggle { display: none; }
.show-a11y .bg-sample__grid { pointer-events: auto; }
.a11y-badge { display: grid; gap: 2px; margin-top: var(--space-2); padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm);
  background: var(--a11y-chip); color: var(--a11y-ink); font-size: var(--text-xs); font-weight: 500; line-height: 1.35; box-shadow: 0 1px 3px var(--color-shadow-soft); }
.a11y-badge .is-pass { color: var(--a11y-pass); }
.a11y-badge .is-fail { color: var(--a11y-fail); font-weight: 700; }
.a11y-badge--inline { display: inline-grid; margin: 0 0 var(--space-2); }
.show-a11y .bg-sample, .show-a11y .bg-sample * { transition: none !important; }
.rows > * > * { min-width: 0; }
.iphone--seat .iphone__island { background: var(--screen-top-seat); }
.iphone--map .iphone__island { background: var(--screen-top-map); }
.iphone--staff .iphone__island { background: var(--screen-top-staff); }
/* stat boxes: links line up along the bottom of every box */
.proof li { display: flex; flex-direction: column; gap: var(--space-1); }
.proof li > a { margin-top: auto; padding-top: var(--space-2); }
/* Accessibility result chips follow the mode: white in light, near-black in dark */
:root[data-theme="dark"], .scope-dark { --a11y-chip: #0b100c; --a11y-ink: #d9d4c6; --a11y-pass: #8fd19e; --a11y-fail: #ff9b8c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) { --a11y-chip: #0b100c; --a11y-ink: #d9d4c6; --a11y-pass: #8fd19e; --a11y-fail: #ff9b8c; } }
.scope-light { --a11y-chip: #ffffff; --a11y-ink: #1f2a1f; --a11y-pass: #1e6b34; --a11y-fail: #a3261c; }
.scope-dark .a11y-badge { box-shadow: 0 0 0 1px var(--line); }
.header-photo { margin: 0; display: grid; gap: var(--space-2); }
.header-photo img { width: 100%; border-radius: var(--radius-card); }
.header-photo figcaption { font-size: var(--text-xs); color: var(--text-secondary); }
/* ---------- Before / after comparison ---------- */
.compare { grid-column: 1 / -1; }
.compare__panes { display: grid; gap: var(--space-5); align-items: start; }
@media (min-width: 52rem) { .compare__panes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.compare__pane .figure__frame { aspect-ratio: 16 / 10; display: grid; place-items: center; padding: var(--space-3); background: var(--color-paper); }
.compare__pane img { width: 100%; height: 100%; object-fit: contain; }
.compare__pane { display: grid; gap: var(--space-2); justify-items: start; }
.compare__pane .figure__frame { width: 100%; }
.compare__tag { margin-left: 0; }
/* a single image in a figures grid is centered at a readable width */
.figures > .figure:only-child:not(.compare) { grid-column: 1 / -1; justify-self: center; width: min(100%, 40rem); }
.new-tab { font-size: 0.85em; }
