/* ==========================================================================
   whyneil.com — design system
   Hand-crafted. Fraunces (display) + Inter (text).
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --paper: #FBF6F0;
  --paper-warm: #F4EBDF;
  --ink: #191512;
  --ink-2: #6B6055;
  --line: rgba(25, 21, 18, 0.14);
  --brand: #FD976D;
  --brand-soft: #FEDCCE;
  --accent: #C74E24;
  --accent-deep: #A63E19;
  --cream-text: #F8F1E8;
  --cream-text-2: rgba(248, 241, 232, 0.68);

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-text: "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --size-display: clamp(2.9rem, 6.5vw + 0.8rem, 6rem);
  --size-h1-case: clamp(2.4rem, 4.6vw + 0.8rem, 4.6rem);
  --size-h2: clamp(2rem, 2.6vw + 0.9rem, 3.1rem);
  --size-h3: clamp(1.35rem, 1vw + 1rem, 1.75rem);
  --size-body-lg: clamp(1.125rem, 0.4vw + 1rem, 1.3125rem);
  --size-body: 1.0625rem;

  --space-section: clamp(5rem, 10vw, 9rem);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-card: 0 1px 2px rgba(25, 21, 18, 0.05), 0 12px 40px -12px rgba(25, 21, 18, 0.18);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--size-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, p, ul, figure { margin: 0; }
ul { padding: 0; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

::selection { background: var(--brand); color: var(--ink); }

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  background: var(--ink);
  color: var(--cream-text);
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Layout ---------- */
.container {
  width: min(100% - 3rem, 1180px);
  margin-inline: auto;
}
.container--wide { width: min(100% - 3rem, 1360px); margin-inline: auto; }

.section { padding-block: var(--space-section); }
.section--tight { padding-block: calc(var(--space-section) * 0.6); }

/* ---------- Typography ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 2.2em;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.eyebrow--plain::before { display: none; }

.display {
  font-family: var(--font-display);
  font-size: var(--size-display);
  font-weight: 560;
  font-variation-settings: "opsz" 100;
  line-height: 1.02;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.display em, .h2 em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}

.h2 {
  font-family: var(--font-display);
  font-size: var(--size-h2);
  font-weight: 560;
  font-variation-settings: "opsz" 80;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.h3 {
  font-family: var(--font-display);
  font-size: var(--size-h3);
  font-weight: 600;
  line-height: 1.2;
}
.lede {
  font-size: var(--size-body-lg);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 62ch;
}
.text-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1.5px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s var(--ease-out);
}
.text-link:hover { background-size: 0% 1.5px; background-position: 100% 100%; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.95em 1.7em;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--cream-text);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background-color 0.25s var(--ease-out), border-color 0.25s var(--ease-out),
    color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--cream-text); border-color: var(--ink); }

.btn--light { background: var(--cream-text); border-color: var(--cream-text); color: var(--ink); }
.btn--light:hover { background: var(--brand); border-color: var(--brand); color: var(--ink); }

.btn--ghost-light { background: transparent; border-color: rgba(248, 241, 232, 0.4); color: var(--cream-text); }
.btn--ghost-light:hover { background: var(--cream-text); border-color: var(--cream-text); color: var(--ink); }

.btn .btn-arrow { transition: transform 0.25s var(--ease-out); }
.btn:hover .btn-arrow { transform: translateX(4px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.nav.is-scrolled {
  background: rgba(251, 246, 240, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1rem;
  transition: padding 0.35s var(--ease-out);
}
.nav.is-scrolled .nav-inner { padding-block: 0.65rem; }

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 600;
}
.nav-brand img { width: 42px; height: 42px; border-radius: 10px; }
.nav-brand .nav-brand-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
}
.nav-link {
  position: relative;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding-block: 0.4em;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease-out);
}
.nav-link:hover::after, .nav-link[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav-cta { margin-left: 0.5rem; }
.nav .btn { padding: 0.7em 1.35em; font-size: 0.875rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 46px;
  height: 46px;
  padding: 10px;
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 12px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* progress bar (case studies) */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 110;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--accent);
}

/* ---------- Home hero ---------- */
.hero {
  padding-top: clamp(8rem, 16vh, 11rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.hero-copy > * + * { margin-top: 1.6rem; }
.hero-copy .btn-row { margin-top: 2.4rem; }

.hero-portrait {
  position: relative;
  justify-self: center;
  width: min(100%, 420px);
}
.hero-portrait-shape {
  background: linear-gradient(160deg, var(--brand) 0%, #FDB18F 100%);
  border-radius: 200px 200px 28px 28px;
  overflow: hidden;
  aspect-ratio: 5 / 5.6;
  display: flex;
  align-items: flex-end;
}
.hero-portrait-shape img { width: 100%; object-fit: cover; }
.hero-badge {
  position: absolute;
  left: -1.25rem;
  bottom: 1.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--ink);
  color: var(--cream-text);
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-card);
}
.hero-badge svg { flex: none; }

/* ---------- Stats band ---------- */
.stats-band { border-block: 1px solid var(--line); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: clamp(1.5rem, 3vw, 2.5rem) 1.5rem;
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: none; padding-left: 0; }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 3vw, 3rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.stat-label { margin-top: 0.6rem; color: var(--ink-2); font-size: 0.9375rem; }

/* ---------- Section headers ---------- */
.section-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head > * + * { margin-top: 1.1rem; }
.section-head--split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

/* ---------- Work cards ---------- */
.work-list { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }

.work-card {
  --tile: var(--brand-soft);
  position: relative;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3.5vw, 3rem);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.work-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
}
.work-card:nth-child(even) .work-card-media { order: -1; }

.work-card-index {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-2);
  letter-spacing: 0.08em;
}
.work-card-content > * + * { margin-top: 1rem; }
.work-card-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.2vw + 0.6rem, 2.4rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.work-card-desc { color: var(--ink-2); max-width: 46ch; }

.work-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; }
.work-tags li {
  font-size: 0.78125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4em 0.9em;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
}
.work-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  background: var(--tile);
  border-radius: 999px;
  padding: 0.45em 1em;
  font-weight: 600;
  font-size: 0.875rem;
}

.work-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 1.4rem;
}
.work-card-cta svg { transition: transform 0.3s var(--ease-out); }
.work-card:hover .work-card-cta svg { transform: translateX(6px); }

.work-card-media {
  background: var(--tile);
  border-radius: var(--radius-md);
  padding: clamp(1.25rem, 2.5vw, 2.25rem);
  overflow: hidden;
}
.work-card-media img {
  border-radius: 6px;
  transition: transform 0.6s var(--ease-out);
}
.work-card:hover .work-card-media img { transform: scale(1.045) rotate(-0.5deg); }

/* smaller, non-linked work */
.more-work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}
.more-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.more-card .work-card-media { margin-top: auto; }
.more-card .work-card-title { font-size: clamp(1.3rem, 1.4vw + 0.7rem, 1.7rem); }

/* ---------- Marquee ---------- */
.marquee-section { padding-block: clamp(2.5rem, 5vw, 4rem); border-block: 1px solid var(--line); overflow: hidden; }
.marquee-label { text-align: center; margin-bottom: 1.75rem; }
.marquee { overflow: hidden; position: relative; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track {
  display: flex;
  align-items: center;
  gap: clamp(3rem, 7vw, 6rem);
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track img {
  height: 44px;
  width: auto;
  opacity: 0.75;
  filter: grayscale(1) contrast(0.9);
  transition: opacity 0.3s, filter 0.3s;
}
.marquee-track img:hover { opacity: 1; filter: none; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Testimonials ---------- */
.testimonials-section { background: var(--paper-warm); }
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
.t-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.t-quote-mark {
  font-family: var(--font-display);
  font-size: 3.4rem;
  line-height: 0.6;
  color: var(--brand);
  padding-top: 0.4em;
}
.t-quote {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 460;
  line-height: 1.5;
  letter-spacing: -0.005em;
  flex: 1;
}
.t-person { display: flex; align-items: center; gap: 0.9rem; }
.t-person img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.t-person-name { font-weight: 600; font-size: 0.95rem; }
.t-person-role { color: var(--ink-2); font-size: 0.875rem; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.about-media {
  background: var(--paper-warm);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.about-copy > * + * { margin-top: 1.5rem; }
.about-facts {
  list-style: none;
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}
.about-facts li {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.about-facts li span:first-child { color: var(--ink-2); }
.about-facts li span:last-child { font-weight: 600; text-align: right; }

/* ---------- Contact / big footer ---------- */
.contact-section {
  background: var(--ink);
  color: var(--cream-text);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.contact-inner { text-align: center; }
.contact-inner .eyebrow { color: var(--brand); }
.contact-inner .eyebrow::before { background: var(--brand); }
.contact-inner > * + * { margin-top: 1.75rem; }
.contact-email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.6vw, 4rem);
  font-weight: 560;
  letter-spacing: -0.02em;
  color: var(--cream-text);
  text-decoration: none;
  background-image: linear-gradient(var(--brand), var(--brand));
  background-size: 0% 3px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.4s var(--ease-out), color 0.4s var(--ease-out);
  padding-bottom: 0.08em;
}
.contact-email:hover { background-size: 100% 3px; color: var(--brand); }
.contact-sub { color: var(--cream-text-2); max-width: 52ch; margin-inline: auto; }
.contact-section .btn-row { justify-content: center; margin-top: 2.5rem; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 2rem;
  margin-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid rgba(248, 241, 232, 0.14);
  color: var(--cream-text-2);
  font-size: 0.875rem;
}
.footer-bottom a { color: var(--cream-text-2); text-decoration: none; }
.footer-bottom a:hover { color: var(--cream-text); }

/* ==========================================================================
   Case study pages
   ========================================================================== */
.case-hero { padding-top: clamp(8rem, 15vh, 11rem); }
.case-hero-copy { max-width: 60rem; }
.case-hero-copy > * + * { margin-top: 1.6rem; }
.case-title { font-size: var(--size-h1-case); }
.case-standfirst { font-size: var(--size-body-lg); color: var(--ink-2); max-width: 66ch; line-height: 1.65; }

.case-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink);
}
.case-meta div > dt {
  font-size: 0.78125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 0.45rem;
}
.case-meta div > dd { margin: 0; font-weight: 560; line-height: 1.45; }

.case-hero-media { margin-top: clamp(2.5rem, 5vw, 4.5rem); }
.frame {
  --tile: var(--brand-soft);
  background: var(--tile);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3.5vw, 3.5rem);
  overflow: hidden;
}
.frame img { border-radius: 8px; margin-inline: auto; }
.frame--flush { padding: 0; }
.frame--flush img { border-radius: 0; }
.frame-caption {
  font-size: 0.875rem;
  color: var(--ink-2);
  margin-top: 0.9rem;
}

/* video embed */
.video-embed {
  position: relative;
  padding-top: 56.25%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--ink);
}
.video-embed iframe, .video-embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* chapters */
.case-body { display: grid; gap: var(--space-section); padding-block: var(--space-section); }
.chapter { display: grid; gap: clamp(1.75rem, 4vw, 3rem); }
.chapter-head {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  border-top: 1px solid var(--ink);
  padding-top: 1.25rem;
}
.chapter-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  flex: none;
}
.chapter-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 4.5vw, 4.5rem);
  align-items: start;
}
.chapter-grid--flip .chapter-media { order: -1; }
.chapter-copy > * + * { margin-top: 1.4rem; }
.chapter-copy .h3 { margin-top: 2.2rem; }

.case-list { list-style: none; display: grid; gap: 1rem; }
.case-list li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--ink-2);
}
.case-list li strong { color: var(--ink); font-weight: 600; }
.case-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--brand);
}

.chapter-media { display: grid; gap: 1.5rem; position: sticky; top: 7rem; }
@supports not (position: sticky) { .chapter-media { position: static; } }

/* stats */
.case-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2vw, 1.75rem);
}
.case-stat {
  background: var(--paper-warm);
  border-radius: var(--radius-md);
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
}
.case-stat .stat-num { color: var(--accent); }
.case-stat p { margin-top: 0.9rem; color: var(--ink-2); font-size: 0.9375rem; }
.case-stats--duo { grid-template-columns: repeat(2, 1fr); }
.case-stats--trio { grid-template-columns: repeat(3, 1fr); }

/* award / pull quote */
.award-block {
  background: var(--brand-soft);
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 5rem);
  text-align: center;
}
.award-block > * + * { margin-top: 1.75rem; }
.award-quote {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw + 0.7rem, 2.1rem);
  font-weight: 480;
  font-style: italic;
  line-height: 1.42;
  letter-spacing: -0.01em;
  max-width: 46ch;
  margin-inline: auto;
  text-wrap: balance;
}
.award-cite { font-style: normal; font-weight: 600; font-size: 0.95rem; color: var(--ink-2); }

/* next case */
.next-case {
  display: block;
  background: var(--ink);
  color: var(--cream-text);
  text-decoration: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}
.next-case-inner {
  padding-block: clamp(4rem, 8vw, 7rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.next-case .eyebrow { color: var(--brand); }
.next-case .eyebrow::before { background: var(--brand); }
.next-case-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3.6rem);
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin-top: 1rem;
  max-width: 20ch;
  text-wrap: balance;
}
.next-case-arrow {
  flex: none;
  width: clamp(64px, 8vw, 96px);
  height: clamp(64px, 8vw, 96px);
  border: 1.5px solid rgba(248, 241, 232, 0.35);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background-color 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.next-case:hover .next-case-arrow { background: var(--brand); transform: translateX(8px); }
.next-case:hover .next-case-arrow svg { color: var(--ink); }
.next-case-arrow svg { color: var(--cream-text); transition: color 0.35s var(--ease-out); }
.next-case .footer-bottom { margin-top: 0; }

/* ---------- Reveal animations ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- 404 ---------- */
.error-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem;
}
.error-page .display { font-size: clamp(5rem, 18vw, 12rem); color: var(--accent); }
.error-page > div > * + * { margin-top: 1.5rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 991px) {
  .hero-grid, .about-grid { grid-template-columns: 1fr; }
  .hero-portrait { width: min(100%, 340px); justify-self: start; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(odd) { border-left: none; padding-left: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .testimonial-grid { grid-template-columns: 1fr; }
  .work-card, .chapter-grid { grid-template-columns: 1fr; }
  .work-card:nth-child(even) .work-card-media { order: 0; }
  .chapter-grid--flip .chapter-media { order: 0; }
  .chapter-media { position: static; }
  .case-meta, .case-stats { grid-template-columns: repeat(2, 1fr); }
  .case-stats--trio { grid-template-columns: repeat(2, 1fr); }

  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    inset: 0;
    z-index: -1;
    flex-direction: column;
    justify-content: center;
    gap: 1.4rem;
    background: var(--paper);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease-out), visibility 0.35s;
  }
  .nav-links.is-open { opacity: 1; visibility: visible; }
  .nav-links .nav-link { font-size: 1.6rem; font-family: var(--font-display); font-weight: 560; }
  .nav-cta { margin-left: 0; }
}

@media (max-width: 560px) {
  .more-work-grid, .case-stats, .case-stats--trio { grid-template-columns: 1fr; }
  .case-meta { grid-template-columns: 1fr 1fr; }
  .next-case-inner { flex-direction: column; align-items: flex-start; }
  .hero-badge { left: 0.75rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; width: 100%; }
}
