/* =========================================================================
   Slop Agency — slop.ee stylesheet — v2 "Confident Play" (direction #68)
   Expression-led layer on the approved structure (artifact #19) and the
   staged build #66. Structure, grid, components, empty-state framework and
   accessibility are UNCHANGED; this restyles the expressive layer only.

   Three colour layers: neutral ink READS, pastel surfaces CARRY, saturated
   pops ACT. Every readable pairing meets WCAG AA (see #68 §1.2).
   ========================================================================= */

/* ---- Webfonts (all SIL OFL 1.1 — $0, self-hosted, no Google hot-link) ----
   Drop the WOFF2 files into /assets/fonts/ before/at deploy (see handoff).
   If absent, the geometric-grotesque / serif fallback stacks below render the
   site correctly with no broken layout — files are $0 OFL, not a gate.
   Body = Inter (unchanged from #66). Display = Bricolage Grotesque 700/800.
   Italic accent = Instrument Serif Italic. URLs are CSS-relative to this file. */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("../fonts/inter-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 600;
  font-display: swap; src: url("../fonts/inter-semibold.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 700;
  font-display: swap; src: url("../fonts/inter-bold.woff2") format("woff2");
}
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 700;
  font-display: swap; src: url("../fonts/bricolage-bold.woff2") format("woff2");
}
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 800;
  font-display: swap; src: url("../fonts/bricolage-extrabold.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif"; font-style: italic; font-weight: 400;
  font-display: swap; src: url("../fonts/instrument-serif-italic.woff2") format("woff2");
}

/* ----------------------------- Design tokens ---------------------------- */
:root {
  /* Layer A — neutral ink & paper (the reading colours; brand-kit source-of-truth) */
  --paper:   #ffffff;   /* brightest surface; cards on pastel zones */
  --ink-900: #08090b;   /* headlines, dark sections/footer, line illustration */
  --ink-600: #4c4e52;   /* BODY text default */
  --ink-400: #7d7f83;   /* tertiary/meta — large or non-body only */
  --line-300:#d3d4d5;   /* non-text hairlines only */
  --mute-500:#a1a3a6;   /* non-text only: disabled/placeholder */
  --slate:   #2c3037;   /* logo ink (sacred) — marks only */

  /* Layer B — pastel surfaces (the dominant canvas) */
  --lilac:  #ECE6FF;
  --mint:   #DDF3E4;
  --peach:  #FFE9DC;
  --blush:  #FFE4EE;
  --butter: #FBF0C9;

  /* Layer C — pops & marker (saturated, assigned jobs only) */
  --indigo:        #271bff;
  --indigo-hover:  #1b13b8;
  --indigo-on-dark:#8e9bff;
  --magenta:       #cc1c84;
  --marker:        #e9f65c;

  /* Type */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: "Bricolage Grotesque", "Inter", system-ui, -apple-system,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", "Times", serif;

  --fs-display-xl: clamp(3rem, 8vw, 6rem);
  --fs-display: clamp(2.5rem, 5vw, 4rem);
  --fs-h1: 2.5rem;
  --fs-h2: 1.95rem;
  --fs-h3: 1.56rem;
  --fs-h4: 1.25rem;
  --fs-body-l: 1.125rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-overline: 0.75rem;

  /* Spacing (8pt) */
  --s-4: 4px;   --s-8: 8px;   --s-12: 12px; --s-16: 16px; --s-24: 24px;
  --s-32: 32px; --s-48: 48px; --s-64: 64px; --s-96: 96px; --s-128: 128px;

  --container: 1200px;
  --measure: 65ch;
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ------------------------------- Reset/base ----------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink-600);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  color: var(--ink-900);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 var(--s-16);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-h1); line-height: 1.1; font-family: var(--font-display); font-weight: 700; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.2; }
h4 { font-size: var(--fs-h4); line-height: 1.3; letter-spacing: 0; }
p  { margin: 0 0 var(--s-16); }

a { color: var(--indigo); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

/* Visible focus on every interactive element (AA): 2px ring + 2px offset */
:focus-visible {
  outline: 2px solid var(--ink-900);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link — first focusable element */
.skip-link {
  position: absolute; left: var(--s-8); top: -48px;
  background: var(--ink-900); color: var(--paper);
  padding: var(--s-8) var(--s-16); border-radius: 999px;
  text-decoration: none; z-index: 1000; transition: top 150ms ease;
}
.skip-link:focus { top: var(--s-8); }

/* ------------------------- Display type / accents ----------------------- */
.display-xl {
  font-family: var(--font-display); font-weight: 800;
  font-size: var(--fs-display-xl); line-height: 0.95;
  letter-spacing: -0.02em; color: var(--ink-900);
  margin: 0 0 var(--s-24);
}
.display {
  font-family: var(--font-display); font-weight: 800;
  font-size: var(--fs-display); line-height: 1.0;
  letter-spacing: -0.015em; color: var(--ink-900);
  margin: 0 0 var(--s-16);
}
/* Italic-serif accent word — display sizes only, never body/UI/nav */
.accent-serif {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  letter-spacing: 0; /* serif sets its own rhythm */
}
/* Marker highlighter sweep behind ONE word — black text only */
.marker { position: relative; white-space: nowrap; z-index: 0; }
.marker::before {
  content: ""; position: absolute; z-index: -1;
  left: -0.08em; right: -0.08em; top: 0.46em; height: 0.5em;
  background: var(--marker); transform: scaleX(1); transform-origin: left;
  border-radius: 2px;
}

/* ------------------------------ Layout ---------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s-24);
}
.section { padding-block: var(--s-96); }
.section--tight { padding-block: var(--s-64); }
.divider { border: 0; border-top: 1px solid var(--line-300); margin: 0; }

/* Full-bleed pastel colour-block surfaces (clean colour-block edges) */
.surface-paper  { background: var(--paper); }
.surface-lilac  { background: var(--lilac); }
.surface-mint   { background: var(--mint); }
.surface-peach  { background: var(--peach); }
.surface-blush  { background: var(--blush); }
.surface-butter { background: var(--butter); }
.surface-dark   { background: var(--ink-900); color: var(--paper); }
.surface-dark h1, .surface-dark h2, .surface-dark h3, .surface-dark h4 { color: var(--paper); }

.overline {
  font-size: var(--fs-overline);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin: 0 0 var(--s-12);
}
.overline--indigo  { color: var(--indigo); }
.overline--magenta { color: var(--magenta); }
.lead { font-size: var(--fs-body-l); color: var(--ink-600); max-width: 60ch; }
.muted { color: var(--ink-600); }
.center { text-align: center; }

/* Responsive grids */
.grid { display: grid; gap: var(--s-24); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1024px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px)  { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* ------------------------------ Buttons (pills) ------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-8);
  min-height: 44px; padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600; font-size: var(--fs-body);
  text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 150ms var(--ease), background-color 150ms ease,
    color 150ms ease, border-color 150ms ease;
}
.btn-primary { background: var(--ink-900); color: var(--paper); }
.btn-primary:hover { background: var(--indigo); color: #fff; transform: scale(1.02); }
.btn-primary:active { transform: scale(0.99); }
.btn-ghost {
  background: transparent; color: var(--ink-900);
  border-color: var(--ink-900);
}
.btn-ghost:hover { background: rgba(8, 9, 11, 0.06); }
.btn-magenta { background: var(--magenta); color: #fff; }
.btn-magenta:hover { background: #b3186f; transform: scale(1.02); }
.btn[aria-disabled="true"], .btn:disabled {
  background: var(--mute-500); color: var(--paper);
  border-color: transparent; pointer-events: none;
}
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-16); }
@media (max-width: 680px) { .btn-row .btn { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .btn:hover, .btn:active { transform: none; } }

/* Plain inline arrow link — soft wayfinding prompt */
.arrow-link {
  display: inline-flex; align-items: center; gap: var(--s-8);
  font-weight: 600; color: var(--indigo); text-decoration: none;
}
.arrow-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------- Slop Line illustration ----------------------- */
/* One stroke logic across every drawing: ink on pastel/paper, knockout on
   dark, at most one indigo/magenta accent per drawing. */
.slopline { color: var(--ink-900); }
.slopline svg { width: 100%; height: auto; display: block; overflow: visible; }
.surface-dark .slopline, .site-footer .slopline { color: var(--paper); }
.sl-accent { stroke: var(--indigo); }
.sl-accent-fill { fill: var(--indigo); stroke: none; }
.sl-accent-magenta { stroke: var(--magenta); }
.surface-dark .sl-accent { stroke: var(--indigo-on-dark); }
.surface-dark .sl-accent-fill { fill: var(--indigo-on-dark); }

/* ------------------------- Header / navigation -------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  height: var(--header-h);
  transition: box-shadow 150ms ease, border-color 150ms ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line-300);
  box-shadow: 0 1px 0 var(--line-300);
}
.site-header .container {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; }
.brand img { height: 36px; width: auto; }
.brand .logo-compact { display: none; }
.primary-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: var(--s-32); align-items: center;
}
.primary-nav a {
  text-decoration: none; color: var(--ink-600);
  font-weight: 600; padding-block: var(--s-8);
}
.primary-nav a:hover { color: var(--ink-900); }
.primary-nav a[aria-current="page"] {
  color: var(--ink-900);
  border-bottom: 2px solid var(--indigo);
}
.nav-toggle { display: none; }
.nav-close { display: none; }

@media (max-width: 768px) {
  .brand .logo-full { display: none; }
  .brand .logo-compact { display: block; height: 30px; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; background: transparent; border: 0;
    cursor: pointer; color: var(--ink-900);
  }
  .nav-toggle svg { width: 24px; height: 24px; }
  .primary-nav {
    position: fixed; inset: 0; z-index: 200;
    background: var(--paper);
    display: none; flex-direction: column;
    padding: var(--s-24);
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav .nav-close {
    display: inline-flex; align-items: center; justify-content: center;
    align-self: flex-end; width: 44px; height: 44px;
    background: transparent; border: 0; cursor: pointer; color: var(--ink-900);
  }
  .primary-nav ul {
    flex-direction: column; gap: var(--s-16);
    margin-top: var(--s-48); align-items: flex-start;
  }
  .primary-nav a { font-size: var(--fs-h4); }
}

/* ------------------------------- Hero ----------------------------------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(var(--s-64), 11vw, 120px); }
.hero__grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: var(--s-48); align-items: center;
}
.hero__inner { max-width: 760px; }
.hero .lead { font-size: var(--fs-body-l); margin-top: var(--s-24); }
.hero__art { width: 100%; max-width: 460px; margin-inline: auto; }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { max-width: 360px; margin-top: var(--s-32); margin-inline: 0; }
}

/* Page hero band (about/work/blog) */
.page-hero { padding-block: var(--s-96) var(--s-64); }
.page-hero h1 { font-size: var(--fs-display); line-height: 1.0; font-family: var(--font-display); font-weight: 800; letter-spacing: -0.015em; }
.page-hero .lead { margin-top: var(--s-16); }

/* A small Slop Line section-mark that sits above a heading */
.section-mark { width: 40px; color: var(--ink-900); margin-bottom: var(--s-16); }
.section-mark.is-indigo { color: var(--indigo); }

/* ------------------------------- Cards ---------------------------------- */
.card {
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line-300);
  border-radius: var(--radius);
  padding: var(--s-24);
  text-decoration: none; color: inherit;
  transition: transform 150ms var(--ease), border-color 150ms ease, box-shadow 150ms ease;
}
a.card:hover, a.card:focus-visible {
  transform: translateY(-3px); border-color: var(--indigo);
  box-shadow: 0 12px 30px rgba(8, 9, 11, 0.10);
}
.card__thumb {
  aspect-ratio: 16 / 10;
  background: var(--lilac);
  border-radius: var(--radius-sm);
  margin: calc(-1 * var(--s-24)) calc(-1 * var(--s-24)) var(--s-16);
  display: grid; place-items: center;
  overflow: hidden; padding: var(--s-24);
}
.card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.card__thumb .slopline { width: 70%; }
.card__cap { width: 44px; color: var(--ink-900); margin-bottom: var(--s-16); }
.card__title { font-size: var(--fs-h4); margin: 0 0 var(--s-8); color: var(--ink-900); }
.card__desc { font-size: var(--fs-small); color: var(--ink-600); margin: 0; }
.card__meta { font-size: var(--fs-small); color: var(--ink-400); margin: var(--s-12) 0 0; }
.card__num {
  font-family: var(--font-display); font-weight: 800; font-size: 1.5rem;
  color: var(--indigo); line-height: 1; margin: 0 0 var(--s-12);
}

/* Skeleton / placeholder work cards (intentional empty state) */
.card--skeleton { pointer-events: none; }
.card--skeleton .card__thumb { background: var(--lilac); }
.card--skeleton .card__thumb .slopline { width: 64%; color: var(--ink-900); }
.skeleton-bar {
  height: 12px; border-radius: 6px; background: var(--mute-500);
  opacity: 0.5; margin-top: var(--s-8);
}
.skeleton-bar.w-60 { width: 60%; }
.skeleton-bar.w-90 { width: 90%; }
.card--skeleton .overline { color: var(--indigo); }

/* Empty-state block (portfolio & blog) */
.empty-state {
  max-width: 560px; margin-inline: auto; text-align: center;
  padding-block: var(--s-48);
}
.empty-state__mark { width: 132px; margin: 0 auto var(--s-24); color: var(--ink-900); }
.empty-state p { color: var(--ink-600); }
/* Zero-data block on a pastel panel */
.empty-panel {
  background: var(--mint); border-radius: var(--radius);
  padding: var(--s-48) var(--s-24);
}

/* ------------------------- About-specific bits -------------------------- */
.two-col { display: grid; grid-template-columns: 7fr 5fr; gap: var(--s-48); align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; gap: var(--s-32); } }
.panel {
  background: var(--lilac);
  border-radius: var(--radius);
  padding: var(--s-32);
}
.panel dl { margin: 0; }
.panel dt { font-weight: 600; color: var(--ink-900); margin-top: var(--s-16); }
.panel dt:first-child { margin-top: 0; }
.panel dd { margin: var(--s-4) 0 0; color: var(--ink-600); }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-32); }
@media (max-width: 768px) { .principles { grid-template-columns: 1fr; } }
.principles .overline { color: var(--indigo); }
.quote-band { text-align: center; padding-block: var(--s-96); }
.quote-band__mark { width: 56px; margin: 0 auto var(--s-24); color: var(--ink-900); }
.quote-band blockquote {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--fs-display); color: var(--ink-900);
  max-width: 18ch; margin-inline: auto; line-height: 1.05; letter-spacing: -0.015em;
}
.quote-band cite { display: block; margin-top: var(--s-24); font-size: var(--fs-small); color: var(--ink-400); font-style: normal; }

/* ------------------------- Blog post (article) -------------------------- */
.breadcrumb { font-size: var(--fs-small); color: var(--ink-400); margin-bottom: var(--s-16); }
.breadcrumb a { color: var(--ink-600); }
.breadcrumb span[aria-current] { color: var(--ink-400); }

.article { max-width: var(--measure); margin-inline: auto; }
.article__header { margin-bottom: var(--s-48); }
.article__spot { width: 96px; color: var(--ink-900); margin-bottom: var(--s-24); }
.article__header h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: var(--fs-display); line-height: 1.0; max-width: 18ch; letter-spacing: -0.015em;
}
.article__byline { font-size: var(--fs-small); color: var(--ink-400); }
.article__body { font-size: var(--fs-body-l); color: var(--ink-600); }
.article__body > * + * { margin-top: var(--s-24); }
.article__body h2 { font-size: var(--fs-h2); margin-top: var(--s-48); color: var(--ink-900); }
.article__body h3 { font-size: var(--fs-h3); margin-top: var(--s-32); color: var(--ink-900); }
.article__body ul, .article__body ol { padding-left: var(--s-24); }
.article__body li { margin-top: var(--s-8); }
.article__body strong { color: var(--ink-900); }
.article__body a { color: var(--indigo); text-decoration: underline; text-underline-offset: 2px; }
.article__body a:focus-visible { text-decoration-thickness: 2px; text-decoration-color: var(--indigo); }
.article__body blockquote {
  margin: var(--s-32) 0; padding: var(--s-32);
  background: var(--peach); border-radius: var(--radius);
  color: var(--ink-900); font-style: normal;
}
.article__body figure { margin: var(--s-32) 0; }
.article__body figure img { border-radius: var(--radius-sm); }
.article__body figcaption { font-size: var(--fs-small); color: var(--ink-400); margin-top: var(--s-8); }
.article__body code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  background: var(--lilac); padding: 2px 6px; border-radius: 6px; font-size: 0.9em;
}
.article__body pre {
  background: var(--ink-900); color: var(--paper);
  padding: var(--s-16); border-radius: var(--radius-sm); overflow-x: auto;
}
.article__body pre code { background: none; padding: 0; color: inherit; }
.pull-quote {
  text-align: center; font-family: var(--font-display); font-weight: 700;
  font-size: var(--fs-h2); color: var(--ink-900);
}
.article__footer { max-width: var(--measure); margin: var(--s-64) auto 0; }
.author-note { font-size: var(--fs-small); color: var(--ink-600); }

/* ------------------------------ Tags/chips ------------------------------ */
.tag {
  display: inline-block; font-size: var(--fs-small); color: var(--ink-600);
  border: 1px solid var(--line-300); border-radius: 999px;
  padding: 2px var(--s-12);
}
.chip {
  display: inline-block; font-size: var(--fs-small); font-weight: 600;
  color: #fff; background: var(--magenta); border-radius: 999px;
  padding: 4px var(--s-12); letter-spacing: 0.02em;
}

/* ------------------------------ Pagination ------------------------------ */
.pagination { display: flex; gap: var(--s-8); align-items: center; justify-content: center; margin-top: var(--s-48); }
.pagination [aria-current="page"] { font-weight: 700; color: var(--ink-900); }
.pagination [aria-disabled="true"] { color: var(--mute-500); pointer-events: none; }

/* ------------------------------- Footer --------------------------------- */
.site-footer { background: var(--ink-900); color: var(--paper); padding-block: var(--s-64); position: relative; overflow: hidden; }
.site-footer a { color: var(--indigo-on-dark); }
.site-footer__brand { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-32); }
.site-footer__brand img { height: 32px; margin-bottom: var(--s-32); }
.site-footer__mark { width: 88px; color: var(--paper); opacity: 0.9; flex: none; }
@media (max-width: 680px) { .site-footer__mark { display: none; } }
.site-footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-32); }
@media (max-width: 768px) { .site-footer__cols { grid-template-columns: 1fr; gap: var(--s-24); } }
.site-footer h2 {
  font-size: var(--fs-overline); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--line-300); margin-bottom: var(--s-16);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: var(--s-8); }
.site-footer .secondary { color: var(--line-300); }
.site-footer__bottom {
  display: flex; flex-wrap: wrap; gap: var(--s-16);
  justify-content: space-between; align-items: center;
  margin-top: var(--s-48); padding-top: var(--s-24);
  border-top: 1px solid #2c3037;
  font-size: var(--fs-small); color: var(--line-300);
}
.to-top { color: var(--paper); text-decoration: none; font-weight: 600; }
.to-top:hover { text-decoration: underline; }
@media (max-width: 680px) {
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
  .to-top { align-self: stretch; }
}

/* --------------------------- Motion (compositor-only) ------------------- */
/* No-JS / reduced-motion: everything is shown finished. Entrances only run
   when JS is on (html.js) AND motion is allowed. */
.reveal { opacity: 1; transform: none; }
.draw__cover { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(12px); }
  .js .reveal.is-in {
    opacity: 1; transform: none;
    transition: opacity 400ms var(--ease), transform 400ms var(--ease);
  }
  /* Stagger children of a .stagger group (cap ~240ms) */
  .js .stagger .reveal:nth-child(2).is-in { transition-delay: 80ms; }
  .js .stagger .reveal:nth-child(3).is-in { transition-delay: 160ms; }
  .js .stagger .reveal:nth-child(4).is-in { transition-delay: 240ms; }

  /* Hero display rise + fade (once, on load) */
  .js .hero__inner > * { opacity: 0; transform: translateY(16px); animation: rise 450ms var(--ease) forwards; }
  .js .hero__inner > *:nth-child(1) { animation-delay: 60ms; }
  .js .hero__inner > *:nth-child(2) { animation-delay: 120ms; }
  .js .hero__inner > *:nth-child(3) { animation-delay: 180ms; }
  .js .hero__inner > *:nth-child(4) { animation-delay: 240ms; }

  /* Marker sweep wipes in behind its word, after the headline lands */
  .js .marker::before { transform: scaleX(0); animation: sweep 320ms 520ms var(--ease) forwards; }

  /* Slop Line "draw-on": a cover shape SCALES away to reveal the static SVG
     left -> right (transform only; no layout, CLS 0). */
  .js .draw { position: relative; }
  .js .draw__cover {
    display: block; content: ""; position: absolute; inset: 0;
    background: var(--reveal-bg, var(--paper)); transform-origin: right;
    transform: scaleX(1); animation: drawoff 560ms 260ms var(--ease) forwards;
    pointer-events: none;
  }
}

@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes sweep { to { transform: scaleX(1); } }
@keyframes drawoff { to { transform: scaleX(0); } }

.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;
}