/* ============================================================
   Studio Low Five — Marketing site styles
   Built on the official design-system tokens. Imports must lead.
   ============================================================ */
@import "tokens/fonts.css";
@import "tokens/colors.css";
@import "tokens/typography.css";
@import "tokens/spacing.css";
@import "tokens/effects.css";
@import "tokens/base.css";

/* ---- Reduced motion ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
html { scroll-behavior: smooth; background: var(--purple-950); }
body { overflow-x: hidden; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ---- Layout ------------------------------------------------- */
.wrap { max-width: var(--container-wide); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--max { max-width: var(--container-max); }
.wrap--narrow { max-width: var(--container-narrow); }
.section { padding-block: clamp(56px, 7vw, 96px); }
.section--tight { padding-block: clamp(36px, 5vw, 56px); }
.ink-field { background: var(--surface-ink); color: var(--text-on-dark); }
.ink-field-deep { background: var(--surface-ink-deep); color: var(--text-on-dark); }
.cream { background: var(--surface-base); }
.cream-2 { background: var(--cream-200); }

.stack > * + * { margin-top: var(--space-4); }
.stack-lg > * + * { margin-top: var(--space-6); }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.center { text-align: center; }
.center .lead, .center p { margin-inline: auto; }
.measure { max-width: 34em; }
.flex { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---- Typography helpers ------------------------------------ */
.t-hero { font-family: var(--font-display); font-weight: var(--fw-black);
  font-size: clamp(2.6rem, 6vw, 5rem); line-height: 0.98; letter-spacing: -0.025em; margin: 0; }
.t-h2 { font-family: var(--font-display); font-weight: var(--fw-black);
  font-size: clamp(2rem, 4vw, 3rem); line-height: 1.04; letter-spacing: -0.02em; margin: 0; }
.t-h3 { font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: 1.5rem; line-height: 1.12; letter-spacing: -0.01em; margin: 0; }
.lead { font-family: var(--font-text); font-size: clamp(1rem, 1.4vw, 1.25rem);
  line-height: 1.55; color: var(--text-secondary); }
.ink-field .lead, .ink-field-deep .lead { color: var(--text-on-dark-muted); }
.muted { color: var(--text-secondary); }
.ink-field .muted { color: var(--text-on-dark-muted); }

.script { font-family: var(--font-script-bold); font-weight: 700; color: var(--pink-500);
  font-size: 1.18em; line-height: 0.7; }
.script--ghost { color: var(--pink-400); text-shadow: 4px 4px 0 var(--purple-700); }

/* ---- Eyebrow ------------------------------------------------ */
.eyebrow { display: inline-flex; align-items: baseline; gap: 6px;
  font-family: var(--font-mono); font-size: var(--fs-eyebrow); font-weight: var(--fw-bold);
  letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--pink-500); }
.eyebrow::before { content: "//"; opacity: 0.85; }
.eyebrow--yellow { color: var(--yellow-400); }
.eyebrow--purple { color: var(--purple-600); }
.eyebrow--blue  { color: var(--blue-500); }
.eyebrow--ink   { color: var(--ink-700); }
.eyebrow--cream { color: var(--cream-100); }

/* ---- Buttons (per Button.jsx) ------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--control-h-md); padding: 0 22px;
  font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 15px;
  line-height: 1; letter-spacing: -0.01em;
  color: var(--white); background: var(--pink-500);
  border: var(--border-ink-w) solid var(--ink-900); border-radius: var(--radius-md);
  box-shadow: var(--shadow-comic-sm); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-snap), box-shadow var(--dur-fast) var(--ease-snap), background var(--dur-base) var(--ease-out); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink-900); }
.btn--secondary { background: var(--purple-600); color: #fff; }
.btn--yellow { background: var(--yellow-400); color: var(--ink-900); }
.btn--outline { background: var(--white); color: var(--ink-900); }
.btn--ondark { background: var(--cream-100); color: var(--ink-900); }
.btn--ghost { background: transparent; color: var(--purple-600); border-color: transparent; box-shadow: none; }
.btn--ghost:active { transform: none; box-shadow: none; }
.btn--ghost:hover { background: var(--purple-100); }
.ink-field .btn--ghost, .ink-field-deep .btn--ghost { color: var(--cream-100); }
.ink-field .btn--ghost:hover { background: rgba(245,239,226,0.10); }
.btn--sm { height: var(--control-h-sm); padding: 0 16px; font-size: 14px; }
.btn--lg { height: var(--control-h-lg); padding: 0 30px; font-size: 17px; }
.btn--full { display: flex; width: 100%; }

/* ---- Comic keyline card (per Card variant="comic") --------- */
.card { background: var(--surface-card); color: var(--text-primary);
  border: var(--border-ink-w) solid var(--ink-900); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-comic-md); padding: 22px 24px;
  transition: transform var(--dur-base) var(--ease-snap), box-shadow var(--dur-base) var(--ease-snap); }
.card--pink   { box-shadow: var(--shadow-comic-pink); }
.card--purple { box-shadow: var(--shadow-comic-purple); }
.card--yellow { box-shadow: var(--shadow-comic-yellow); }
.card--flush { padding: 0; overflow: hidden; }
.card--hover:hover { transform: translate(-2px, -2px); box-shadow: 9px 9px 0 var(--ink-900); }
.card--hover.card--pink:hover   { box-shadow: 9px 9px 0 var(--pink-500); }
.card--hover.card--purple:hover { box-shadow: 9px 9px 0 var(--purple-600); }
.card--hover.card--yellow:hover { box-shadow: 9px 9px 0 var(--yellow-400); }
.card--ink { background: var(--surface-card-ink); color: var(--cream-100); }
.card--ink .muted { color: var(--purple-200); }

/* ---- Stat --------------------------------------------------- */
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat__value { font-family: var(--font-display); font-weight: var(--fw-black);
  font-size: 3.25rem; line-height: 0.95; letter-spacing: -0.03em; color: var(--pink-500); }
.stat__label { font-family: var(--font-mono); font-size: 12px; font-weight: var(--fw-bold);
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-500); }
.stat--sm .stat__value { font-size: 2.25rem; }
.stat--pink .stat__value { color: var(--pink-500); }
.stat--purple .stat__value { color: var(--purple-600); }
.stat--yellow .stat__value { color: var(--yellow-400); }
.stat--cream .stat__value { color: var(--cream-100); }
.ink-field .stat__label, .ink-field-deep .stat__label { color: var(--purple-200); }

/* ---- Tag / Badge / Pill ------------------------------------ */
.tag { display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: 11px; font-weight: var(--fw-bold);
  letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px;
  border: var(--border-1) solid var(--ink-900); border-radius: var(--radius-pill);
  background: var(--white); color: var(--ink-900); }
.ink-field .tag, .card--ink .tag { background: transparent; border-color: var(--border-on-dark); color: var(--cream-100); }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 28px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; padding: 3px 8px;
  border-radius: var(--radius-pill); }
.badge--pink { background: var(--pink-100); color: var(--pink-700); }
.badge--purple { background: var(--purple-100); color: var(--purple-700); }
.badge--yellow { background: var(--yellow-200); color: #7a5a00; }
.pill { display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 5px 12px; border-radius: var(--radius-pill);
  border: var(--border-1) solid var(--ink-900); }
.pill--live { background: var(--yellow-400); color: var(--ink-900); }
.pill--live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-900); }
.pill--soon { background: var(--white); color: var(--ink-500); }

/* ---- Header / Nav ------------------------------------------ */
.site-header { position: sticky; top: 0; z-index: 50;
  background: var(--purple-900); border-bottom: var(--border-ink-w) solid var(--ink-900);
  transition: background var(--dur-base) var(--ease-out); }
.site-header.is-scrolled { background: rgba(30,13,78,0.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.nav { max-width: var(--container-wide); margin-inline: auto;
  padding: 14px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 38px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.nav__links a { font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; color: var(--cream-100);
  padding: 10px 14px; border-radius: var(--radius-sm); transition: color var(--dur-fast) var(--ease-out); }
.nav__links a:hover { color: var(--yellow-400); }
.nav__links a.is-active { color: var(--yellow-400); }
.nav__links .btn { font-family: var(--font-display); color: #fff; letter-spacing: -0.01em; text-transform: none; }
.nav__cta { margin-left: 8px; }
.nav__toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  background: var(--purple-800); border: var(--border-ink-w) solid var(--ink-900); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-comic-sm); cursor: pointer; }
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  content: ""; display: block; width: 20px; height: 2.5px; background: var(--cream-100); border-radius: 2px; position: relative;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-fast) var(--ease-out); }
.nav__toggle span::before { position: absolute; top: -6px; }
.nav__toggle span::after { position: absolute; top: 6px; }
.nav.is-open .nav__toggle span { background: transparent; }
.nav.is-open .nav__toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav.is-open .nav__toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; }
  .nav__links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 2px; background: var(--purple-900); border-bottom: var(--border-ink-w) solid var(--ink-900);
    padding: 12px var(--gutter) 20px; transform: translateY(-130%); transition: transform var(--dur-slow) var(--ease-out); z-index: -1; }
  .nav.is-open .nav__links { transform: translateY(0); }
  .nav__links a { padding: 12px 8px; font-size: 14px; }
  .nav__links a:not(.btn) { display: block; }
  .nav__cta { margin: 8px 0 0; }
  .nav__cta .btn { width: 100%; }
}

/* ---- Hero --------------------------------------------------- */
.hero { position: relative; overflow: hidden; }
.hero .halftone-wash { position: absolute; inset: 0; pointer-events: none; }
.hero__inner { position: relative; }

.halftone-wash { background-image: radial-gradient(currentColor 1.4px, transparent 1.5px); background-size: 7px 7px; }

/* framed illustration with offset shadow */
.framed { border: var(--border-ink-bold) solid var(--ink-900); border-radius: var(--radius-xl);
  overflow: hidden; box-shadow: 10px 10px 0 var(--pink-500); }
.framed--purple { box-shadow: 10px 10px 0 var(--purple-600); }
.framed img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- Manifesto band ---------------------------------------- */
.manifesto { position: relative; overflow: hidden; background: var(--yellow-400); color: var(--ink-900);
  border-block: var(--border-ink-bold) solid var(--ink-900); padding: clamp(48px, 6vw, 84px) var(--gutter); }
.manifesto .halftone-wash { position: absolute; inset: 0; color: rgba(20,10,36,0.10); }
.manifesto__inner { position: relative; max-width: var(--container-max); margin-inline: auto; text-align: center; }
.manifesto__line { font-family: var(--font-display); font-weight: var(--fw-black);
  font-size: clamp(2rem, 5vw, 3.75rem); line-height: 1.04; letter-spacing: -0.025em; margin: 18px auto 0; max-width: 16em; }

/* ---- Capability card (illustration) ------------------------ */
.cap__media { overflow: hidden; border-bottom: var(--border-ink-w) solid var(--ink-900);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.cap__media img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.cap__body { padding: 18px 20px 22px; }
.cap__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ---- Work rows --------------------------------------------- */
.work-row { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center;
  padding: 24px 28px; background: var(--purple-800); color: var(--cream-100);
  border: var(--border-ink-w) solid var(--ink-900); border-radius: var(--radius-lg); box-shadow: 6px 6px 0 var(--ink-900); }
.work-row__num { font-family: var(--font-display); font-weight: var(--fw-black); font-size: 2.5rem;
  color: var(--pink-400); line-height: 1; min-width: 1.4em; }
.work-row__result { margin: 0; max-width: 18em; text-align: right; color: var(--purple-200); font-size: 1.05rem; line-height: 1.4; }
.work-row__result strong { color: var(--yellow-400); font-weight: 700; }
@media (max-width: 720px) {
  .work-row { grid-template-columns: auto 1fr; }
  .work-row__result { grid-column: 1 / -1; text-align: left; max-width: none; }
}

/* ---- Case panels (Work page) ------------------------------- */
.case { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; scroll-margin-top: 96px;
  background: var(--white); border: var(--border-ink-w) solid var(--ink-900);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-comic-lg); }
.case__media { position: relative; min-height: 280px; display: grid; place-items: start;
  align-content: end; padding: 22px; border-right: var(--border-ink-w) solid var(--ink-900); }
.case__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.case__media > * { position: relative; z-index: 1; }
.case__body { padding: clamp(20px, 3vw, 36px); display: flex; flex-direction: column; gap: 14px; }
.case__metric { font-family: var(--font-display); font-weight: var(--fw-black);
  font-size: clamp(2.2rem, 3vw, 3.25rem); line-height: 0.95; letter-spacing: -0.03em; color: var(--pink-500); }
@media (max-width: 900px) {
  .case { grid-template-columns: 1fr; }
  .case__media { border-right: none; border-bottom: var(--border-ink-w) solid var(--ink-900); min-height: 0; aspect-ratio: 16 / 9; }
}

/* ---- Forms -------------------------------------------------- */
.form-card { background: var(--white); border: var(--border-ink-bold) solid var(--ink-900);
  border-radius: var(--radius-xl); box-shadow: 10px 10px 0 var(--purple-600); padding: 30px 32px; }
.field { display: block; margin-bottom: 16px; }
.field > label { display: block; font-family: var(--font-text); font-weight: var(--fw-semibold);
  font-size: 0.9rem; margin-bottom: 6px; color: var(--ink-700); }
.field .req { color: var(--pink-500); }
.field input, .field select, .field textarea { width: 100%; font-family: var(--font-text); font-size: 1rem;
  color: var(--ink-900); background: var(--white); padding: 0 14px; height: var(--control-h-md);
  border: var(--border-ink-w) solid var(--ink-900); border-radius: var(--radius-sm);
  transition: box-shadow var(--dur-fast) var(--ease-out); }
.field textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: 3px 3px 0 var(--purple-600); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.form-note { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--ink-400); margin-top: 4px; }

/* ---- Callout ------------------------------------------------ */
.callout { border: var(--border-ink-w) solid var(--ink-900); border-radius: var(--radius-md);
  background: var(--success-bg); padding: 16px 18px; box-shadow: var(--shadow-comic-sm); }
.callout h3 { margin: 0 0 4px; font-size: 1.1rem; }

/* ---- Checklist --------------------------------------------- */
.list-check { margin: 0; padding: 0; }
.list-check li { position: relative; padding-left: 28px; margin-bottom: 12px; }
.list-check li::before { content: ""; position: absolute; left: 0; top: 0.4em; width: 14px; height: 14px;
  border-radius: 50%; background: var(--pink-500); box-shadow: inset 0 0 0 2px var(--ink-900); }
.ink-field .list-check li::before, .ink-field-deep .list-check li::before { background: var(--yellow-400); }

/* ---- Footer ------------------------------------------------- */
.site-footer { background: var(--purple-950); color: var(--cream-100); border-top: var(--border-ink-bold) solid var(--ink-900); }
.footer-grid { max-width: var(--container-wide); margin-inline: auto; padding: 56px var(--gutter) 28px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.site-footer .brand img { height: 50px; }
.footer-grid h4 { margin: 0; }
.footer-col ul { margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--cream-100); text-decoration: none; font-size: 0.95rem; opacity: 0.85; }
.footer-col a:hover { color: var(--yellow-400); opacity: 1; }
.footer-bottom { border-top: 1px solid rgba(245,239,226,0.14); max-width: var(--container-wide);
  margin-inline: auto; padding: 18px var(--gutter); display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--purple-300); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---- Reveal on scroll -------------------------------------- */
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; } }

/* ---- Skip link ---------------------------------------------- */
.skip { position: absolute; left: -999px; top: 0; z-index: 200; background: var(--ink-900); color: #fff;
  padding: 10px 16px; border-radius: 0 0 8px 0; }
.skip:focus { left: 0; }

/* ---- Spacing utilities ------------------------------------- */
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; } .mt-5 { margin-top: 44px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }

/* ---- Long-form case study page ----------------------------- */
.grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 960px) { .grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .grid-5 { grid-template-columns: repeat(2, 1fr); } }
.stat--fit .stat__value { font-size: clamp(1.5rem, 2.35vw, 2.25rem); white-space: nowrap; }

.prose > * + * { margin-top: 1.15em; }
.prose p { margin-bottom: 0; font-size: 1.0625rem; line-height: var(--lh-relaxed); color: var(--ink-700); }
.prose strong { color: var(--ink-900); }
.ink-field .prose p, .ink-field .prose li { color: var(--purple-200); }
.ink-field .prose strong { color: var(--cream-100); }
.prose .list-check li { font-size: 1.0625rem; line-height: var(--lh-relaxed); margin-bottom: 14px; }
.prose .list-check li::before { top: 0.5em; }

.figure { margin: 0; }
.figure .framed { box-shadow: 10px 10px 0 var(--ink-900); }
.figure--pink .framed { box-shadow: 10px 10px 0 var(--pink-500); }
.figure--yellow .framed { box-shadow: 10px 10px 0 var(--yellow-400); }
.figure figcaption { margin-top: 22px; font-family: var(--font-mono); font-size: 11px; font-weight: var(--fw-bold);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-500); }
.ink-field .figure figcaption { color: var(--purple-300); }

.shot { margin: 0; }
.shot__img { border: var(--border-ink-w) solid var(--ink-900); border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-comic-md); aspect-ratio: 4 / 3; background: var(--purple-800); }
.shot__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot figcaption { margin-top: 16px; font-size: 0.9rem; line-height: 1.4; color: var(--purple-200); }
.shot figcaption strong { display: block; font-family: var(--font-display); font-size: 1.05rem; color: var(--cream-100); }
.shot figcaption strong span { color: var(--yellow-400); margin-right: 6px; }
.photo-credit { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--cream-100); background: rgba(20,10,36,0.72); padding: 4px 8px; border-radius: var(--radius-xs); }
.case__media .photo-credit { position: absolute; top: 12px; right: 12px; }
.framed { position: relative; }
.framed .photo-credit { position: absolute; left: 12px; bottom: 12px; }
.pullquote { margin: 0; }
.prose > .pullquote { margin-top: 1.75em; }
.prose .pullquote p, .ink-field .prose .pullquote p { font-size: clamp(1.35rem, 2.4vw, 1.9rem); line-height: 1.25; color: var(--ink-900); }
.deliverables { display: flex; flex-wrap: wrap; gap: 24px; }
.deliverables > .card { flex: 1 1 200px; }
.pullquote p { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  line-height: 1.25; letter-spacing: -0.015em; color: var(--ink-900); margin: 0; }
.pullquote footer { margin-top: 18px; font-family: var(--font-mono); font-size: 12px; font-weight: var(--fw-bold);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-500); }

.punchline, .prose p.punchline { font-family: var(--font-display); font-weight: var(--fw-black); font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.1; letter-spacing: -0.02em; color: var(--ink-900); margin-bottom: 0; }
.backlink { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; text-decoration: none; color: var(--yellow-400); }
.backlink:hover { color: var(--cream-100); }
.byline { margin: 22px 0 0; font-family: var(--font-mono); font-size: 12px; font-weight: var(--fw-bold);
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--yellow-400); }
.hero-stats { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(16px, 2.6vw, 32px); margin-top: 44px; max-width: 34rem; }
.hero-stats .stat__value { font-size: clamp(1.4rem, 2.7vw, 2.25rem); white-space: nowrap; }

/* ---- Audit fixes ------------------------------------------- */
.prose > .eyebrow + h2 { margin-top: 14px; }
.manifesto--stats { padding-inline: 0; }

/* Product card: illustration beside the copy, stacked on tablet and phone */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.product .cap__media { border-bottom: none; border-radius: 0; }
.product .cap__media img { height: 100%; aspect-ratio: auto; }
.product .cap__media:first-child { border-right: var(--border-ink-w) solid var(--ink-900); }
.product .cap__media:last-child { border-left: var(--border-ink-w) solid var(--ink-900); }
@media (max-width: 900px) {
  .product { grid-template-columns: minmax(0, 1fr); }
  .product .cap__media { order: -1; border-inline: none; border-bottom: var(--border-ink-w) solid var(--ink-900); }
  .product .cap__media img { height: auto; aspect-ratio: 16 / 10; }
}
.product .btn { white-space: normal; height: auto; min-height: var(--control-h-lg); padding-block: 10px; text-align: center; }
@media (max-width: 360px) { .btn--lg { padding-inline: 20px; font-size: 16px; } }

/* ---- Homepage hero: stack of three tagged pieces ----------- */
.hero-stack { position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 600px; margin-inline: auto; container-type: inline-size; }
.hero-stack__item { position: absolute; margin: 0; background: var(--purple-800);
  border: var(--border-ink-bold) solid var(--ink-900); border-radius: var(--radius-md); }
/* Images are shown whole: each frame takes its image's own shape, nothing is cropped. */
.hero-stack__item img { display: block; width: 100%; height: auto; border-radius: calc(var(--radius-md) - 4px); }
/* The tag is a tab on the top edge, outside the picture, so it never covers the image. */
.hero-stack__item figcaption { position: absolute; left: 12px; bottom: 100%; padding: 5px 9px 4px; white-space: nowrap;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-900); background: var(--yellow-400); border: var(--border-ink-bold) solid var(--ink-900); border-bottom: none;
  border-radius: var(--radius-xs) var(--radius-xs) 0 0; }
.hero-stack__item--a { top: 2%; left: 0; width: 47%; transform: rotate(-3deg); box-shadow: 8px 8px 0 var(--yellow-400); z-index: 2; }
.hero-stack__item--b { top: 13%; right: 0; width: 56%; transform: rotate(2.5deg); box-shadow: 8px 8px 0 var(--pink-500); z-index: 3; }
.hero-stack__item--b figcaption { left: auto; right: 12px; }
.hero-stack__item--c { bottom: 1%; left: 5%; width: 53%; transform: rotate(-1.5deg); box-shadow: 8px 8px 0 var(--cream-100); z-index: 1; }
.hero-stack__placeholder { display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; border-radius: calc(var(--radius-md) - 4px);
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-900);
  background-color: var(--yellow-400); background-image: radial-gradient(rgba(20,10,36,0.16) 1.4px, transparent 1.5px); background-size: 7px 7px; }
.hero-stack__item--c .hero-stack__placeholder { background-color: var(--pink-400); }
/* When the stack itself is small (phones, and tablets where it shares the row), shrink the tags so none is clipped. */
@container (max-width: 420px) {
  .hero-stack__item figcaption { font-size: 9px; letter-spacing: 0.04em; padding: 4px 6px 3px; left: 8px; }
  .hero-stack__item--b figcaption { left: auto; right: 8px; }
  .hero-stack__item--c { left: 1%; }
}
@container (max-width: 315px) {
  .hero-stack__item figcaption { font-size: 8px; letter-spacing: 0; padding: 3px 5px 2px; left: 6px; }
  .hero-stack__item--b figcaption { left: auto; right: 6px; }
}

/* ---- Case study: production engine steps -------------------- */
.engine { list-style: none; margin: clamp(24px, 4vw, 40px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.engine > li { display: flex; flex-direction: column; gap: 8px; padding: 20px; }
.engine__n { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; color: var(--pink-500); }
.engine > li p { margin: 0; font-size: 0.95rem; }
.engine__who { margin-top: auto; align-self: flex-start; padding: 5px 9px; border: 2px solid var(--ink-900); border-radius: var(--radius-xs);
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.engine__who--person { background: var(--yellow-400); color: var(--ink-900); }
.engine__who--ai { background: var(--purple-600); color: var(--cream-100); }
@media (max-width: 960px) { .engine { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .engine { grid-template-columns: minmax(0, 1fr); } }

/* ---- Case study: four voices board -------------------------- */
.voices { list-style: none; margin: clamp(28px, 4vw, 44px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.voices > li { display: flex; flex-direction: column; padding: 0; overflow: hidden; color: var(--ink-900); }
.voices__head { padding: 16px 18px 14px; border-bottom: var(--border-ink-w) solid var(--ink-900); background: var(--voice, var(--yellow-400)); color: var(--voice-ink, var(--ink-900)); }
.voices__who { display: block; font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.9; }
.voices__job { display: block; margin-top: 6px; font-family: var(--font-display); font-weight: var(--fw-black); font-size: clamp(1.35rem, 2vw, 1.7rem); line-height: 1.05; letter-spacing: -0.02em; }
.voices__rows { margin: 0; padding: 6px 18px 16px; }
.voices__rows div { padding: 11px 0; border-bottom: 1px solid rgba(20,10,36,0.14); }
.voices__rows div:last-child { border-bottom: none; }
.voices__rows dt { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-500); }
.voices__rows dd { margin: 4px 0 0; font-size: 0.95rem; line-height: 1.4; color: var(--ink-900); }
@media (max-width: 1020px) { .voices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .voices { grid-template-columns: minmax(0, 1fr); } }
.voices__shared { margin: 26px 0 0; font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.7; color: var(--yellow-400); }

/* ---- Case study: stats grouped by season -------------------- */
.season-stats { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); text-align: left; }
.season-stats__group .eyebrow { margin-bottom: 16px; }
.season-stats__group + .season-stats__group { border-left: var(--border-ink-w) solid var(--ink-900); padding-left: clamp(24px, 4vw, 56px); }
.season-stats .grid { gap: clamp(14px, 2vw, 24px); }
@media (max-width: 960px) {
  .season-stats { grid-template-columns: minmax(0, 1fr); }
  .season-stats__group + .season-stats__group { border-left: none; padding-left: 0; border-top: var(--border-ink-w) solid var(--ink-900); padding-top: 24px; }
  .season-stats .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 480px) { .season-stats .stat__value { font-size: 1.35rem; } }

/* Services: proof link under a capability, and whole-card links on the homepage */
.svc-proof { margin: 14px 0 0; font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.svc-proof a { color: var(--purple-600); text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 1px; }
.svc-proof a:hover { color: var(--pink-500); }
.card--flush { position: relative; }
.cap__link { color: inherit; text-decoration: none; }
.cap__link::after { content: ""; position: absolute; inset: 0; }
.cap__link:focus-visible { outline: none; }
.cap__link:focus-visible::after { outline: 3px solid var(--pink-500); outline-offset: 3px; border-radius: inherit; }
.section[id] { scroll-margin-top: 72px; }
.ink-field .card:not(.card--ink) .muted { color: var(--text-secondary); }

/* Split-flap numbers (see assets/js/main.js). Cells exist only while a number is flipping. */
.flap { display: inline-block; text-align: center; backface-visibility: hidden; }
.is-flapping .flap {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(50% - 1px), transparent calc(50% - 1px), transparent calc(50% + 1px), #000 calc(50% + 1px));
          mask-image: linear-gradient(to bottom, #000 calc(50% - 1px), transparent calc(50% - 1px), transparent calc(50% + 1px), #000 calc(50% + 1px));
}
.flap-wait { opacity: 0 !important; }
.stat, .case__metric { transition: opacity .35s var(--ease-out); }
@media print { .flap-wait { opacity: 1 !important; } }
.flap-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---- Motion --------------------------------------------------
   Three moves, all in the print language of the brand: cards are dealt
   onto the page, the script line is written on, and numbers flip.
   Everything here is skipped when the visitor asks for reduced motion. */
.hero-stack__item--a { --r: -3deg; }
.hero-stack__item--b { --r: 2.5deg; }
.hero-stack__item--c { --r: -1.5deg; }
.script.write { display: inline-block; clip-path: inset(-25% 100% -25% -6%); }
.script.write.in { clip-path: inset(-25% -6% -25% -6%); transition: clip-path .9s var(--ease-in-out); }

@media (prefers-reduced-motion: no-preference) {
  /* Page turn, where the browser supports it: the header holds still and the
     new page rises in over the old one. Slow enough to notice, short enough not to wait on. */
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: site-header; }
  ::view-transition-old(root) { animation: none; mix-blend-mode: normal; }
  ::view-transition-new(root) { animation: page-in .65s var(--ease-out) both; mix-blend-mode: normal; }
  ::view-transition-group(site-header) { animation-duration: .65s; }

  /* Hero cards land one at a time, in the order of the headline. */
  .hero-stack__item { animation: deal .7s var(--ease-snap) backwards;
    transition: transform var(--dur-slow) var(--ease-snap); }
  .hero-stack__item--a { animation-delay: .15s; }
  .hero-stack__item--b { animation-delay: .33s; }
  .hero-stack__item--c { animation-delay: .51s; }
  .hero-stack__item:hover { transform: rotate(calc(var(--r) * 0.25)) translate(-3px, -4px); }

  /* The script line in a page's opening headline is written on as the page loads. */
  .hero .script { display: inline-block; animation: write-on .9s var(--ease-in-out) .2s backwards; }
  /* Where cards are being dealt, the script line waits for the third one. */
  .hero:has(.hero-stack) .script { animation-delay: .5s; }
}
@keyframes deal {
  from { opacity: 0; transform: translateY(-36px) rotate(calc(var(--r) * 4)) scale(1.06); }
  to   { opacity: 1; transform: rotate(var(--r)); }
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes write-on {
  from { clip-path: inset(-25% 100% -25% -6%); }
  to   { clip-path: inset(-25% -6% -25% -6%); }
}
