/* =========================================================
   Luísa Nogueira — Portfolio
   Implemented from the Claude Design canvas
   (Home / Lubeno / La Fermina)
   ========================================================= */

/* ---- Design tokens ---- */
:root {
  --ink: #171a1a;
  --body: #515a5a;

  --purple-900: #0b0810; /* deep near-black purple — footer */
  --purple-800: #2e2438; /* headings, brand */
  --purple-700: #36274e; /* subtitles, ghost hover */
  --purple-600: #4b376d; /* soft muted purple */
  --purple-200: #e1dceb; /* light lilac — hero bg */
  --purple-100: #f0edf5; /* lightest lilac — cards / section bg */

  /* Primary accent */
  --purple-500: #6b4e9b; /* primary actions + links (white text passes AA) */
  --purple-ink: #241633; /* darkest — link hover, tag text */
  --purple-muted: #6e6280; /* small labels on light */
  --purple-accent: #c9bbe0; /* tag / ghost border / pills */
  --purple-tint-1: #efeaf6; /* step tints, light → deep */
  --purple-tint-2: #e3d9ef;
  --purple-tint-3: #d6c8e8;
  --purple-tint-4: #c7b5e0;
  --purple-tint-5: #b8a4d8;
  --purple-border: #e6e0ee;
  --purple-border-2: #ddd3ea;
  --purple-footer-text: #d8cfe6;
  --purple-footer-mute: #9d8fb8;
  --purple-paper: #f7f4fb; /* near-white text on purple */

  --white: #ffffff;

  /* Secondary accent
     Plays off the purple as a complementary pairing. */
  --gold-deep: #382e1b; /* dark brown — "key insight" / quote block bg, tag text */
  --gold-accent: #b99a5b; /* golden — tag pill, ghost border, accents on dark block */
  --gold-paper: #f8f7f1; /* warm cream text on the dark brown block */
  --champagne: #f0e9d9;
  --sand: #ded6c9;

  /* Links — purple */
  --link: var(--purple-500);
  --link-hover: var(--purple-ink);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Epilogue", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --max: 1320px;
  --max-narrow: 880px;
  --max-text: 720px;

  /* Spacing scale — 8px system (4px half-step) */
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-28: 28px;
  --space-32: 32px;
  --space-36: 36px;
  --space-40: 40px;
  --space-44: 44px;
  --space-48: 48px;
  --space-56: 56px;
  --space-64: 64px;
  --space-72: 72px;
  --space-80: 80px;

  /* Type scale — size / line-height pairs (h1 64/72 … paragraph-small 14/20) */
  --text-h1: 64px;
  --leading-h1: 72px;
  --text-h2: 48px;
  --leading-h2: 56px;
  --text-h3: 36px;
  --leading-h3: 48px;
  --text-h4: 24px;
  --leading-h4: 32px;
  --text-h5: 18px;
  --leading-h5: 28px;
  --text-body: 16px;
  --leading-body: 24px;
  --leading-body-tight: 20px;
  --text-sm: 14px;
  --leading-sm: 20px;

  --px: var(--space-48); /* section horizontal padding */
  --shadow-sm: 0 4px 14px rgba(40, 22, 60, 0.06);
  --shadow-md: 0 6px 20px rgba(40, 22, 60, 0.08);
  --shadow-lg: 0 10px 28px rgba(40, 22, 60, 0.16);
}

@media (max-width: 640px) {
  :root {
    --px: var(--space-24);
  }
}

/* ---- Base ---- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  overflow-x: clip; /* safety net: never scroll sideways on small screens */
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--link);
}
a:hover {
  color: var(--link-hover);
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3 {
  font-family: var(--serif);
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

/* ---- Layout ---- */
.wrap {
  max-width: var(--max);
  margin-inline: auto;
}
.wrap-narrow {
  max-width: var(--max-narrow);
  margin-inline: auto;
}
.stack {
  display: flex;
  flex-direction: column;
}

/* =========================================================
   Navigation
   ========================================================= */
.site-nav {
  padding: var(--space-16) var(--px);
  border-bottom: 1px solid var(--purple-border);
  background: var(--gold-paper);
  position: sticky;
  top: 0;
  z-index: 10;
}
/* Inner wrapper aligns the logo + menu to the same column as page content.
   Carries .wrap (home) or .wrap-narrow (case studies) for the max-width. */
.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12) var(--space-16);
  flex-wrap: wrap;
}

.site-nav__brand {
  font-family: var(--serif);
  font-size: var(--text-h5);
  line-height: var(--leading-h5);
  font-weight: 600;
  color: var(--purple-800);
  text-decoration: none;
}
.site-nav__brand:hover {
  color: var(--purple-800);
  text-decoration: none;
}
.site-nav__links {
  display: flex;
  gap: var(--space-28);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  font-weight: 500;
  flex-wrap: wrap;
}
.site-nav__link {
  text-decoration: none;
  color: var(--ink);
}
.site-nav__link:hover {
  color: var(--purple-500);
  text-decoration: none;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  font-weight: 600;
  gap: var(--space-8);
  padding: var(--space-12) var(--space-24);
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
  white-space: nowrap;
}
.btn:hover {
  text-decoration: none;
}
/* Icon sized in em so it scales with whichever button it sits in.
   The nudge optically centres it on the text's cap height: flexbox centres the
   icon on the line box, but that box reserves ~4px below the baseline for
   descenders most labels don't use, leaving the icon sitting ~1.3px low. */
.btn__icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  transform: translateY(-0.08em);
}
/* Filled brand marks read heavier than the stroked icons, so size them down
   slightly to match optically. */
.btn__icon--solid {
  width: 1em;
  height: 1em;
}

.btn--primary {
  background: var(--purple-700);
  color: var(--purple-paper);
}
.btn--primary:hover {
  background: var(--purple-800);
  color: var(--purple-paper);
}

.btn--outline {
  background: var(--white);
  color: var(--purple-500);
  border-color: var(--purple-500);
}
.btn--outline:hover {
  background: var(--purple-paper);
  color: var(--purple-500);
}

.btn--dark {
  background: var(--purple-800);
  color: var(--purple-paper);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  padding: var(--space-8) var(--space-20);
}
.btn--dark:hover {
  background: var(--purple-500);
  color: var(--purple-paper);
}

.btn--light {
  background: var(--white);
  color: var(--purple-800);
  padding: var(--space-12) var(--space-24);
}
.btn--light:hover {
  background: var(--purple-200);
  color: var(--purple-800);
}

.btn--ghost {
  background: transparent;
  color: var(--purple-paper);
  border-color: var(--gold-accent);
  padding: var(--space-8) var(--space-24);
}
.btn--ghost:hover {
  background: var(--gold-deep);
  color: var(--gold-paper);
}

/* =========================================================
   Image placeholder (unfilled design slot)
   ========================================================= */
.image-slot {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  text-align: center;
  padding: var(--space-16);
  background: var(--purple-100);
  border: 1px dashed var(--purple-border-2);
  border-radius: 10px;
  color: var(--purple-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: var(--leading-sm);
}
.image-slot::before {
  content: "";
  width: 30px;
  height: 30px;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239B86B5' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E");
}
.image-slot span {
  max-width: 34ch;
}
.image-slot--rect {
  border-radius: 0;
}
.image-slot--flush {
  border-style: solid;
  border-color: var(--purple-border-2);
}

/* =========================================================
   Home — hero
   ========================================================= */
.hero {
  background: var(--purple-accent);
  padding: var(--space-80) var(--px);
}
.hero__inner {
  display: flex;
  align-items: center;
  gap: var(--space-64);
  flex-wrap: wrap;
}
.hero__text {
  flex: 1 1 460px;
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
}
.hero__title {
  font-size: var(--text-h1);
  font-weight: 600;
  color: var(--purple-800);
  margin: 0;
  line-height: var(--leading-h1);
}
.hero__subtitle {
  font-family: var(--serif);
  font-size: var(--text-h4);
  font-weight: 500;
  color: var(--purple-700);
  margin: 0;
  line-height: var(--leading-h4);
  text-wrap: balance;
}
.hero__actions {
  display: flex;
  gap: var(--space-16);
  margin-top: var(--space-8);
  flex-wrap: wrap;
}
.hero__media {
  flex: 0 0 300px;
  transform: rotate(3deg);
}

.polaroid {
  position: relative;
  background: var(--white);
  padding: var(--space-12) var(--space-12) var(--space-40);
  border-radius: 4px;
  box-shadow: 0 12px 32px rgba(40, 22, 60, 0.18);
}
.polaroid .image-slot {
  width: 276px;
  height: 330px;
  max-width: 100%;
}
.polaroid__photo {
  display: block;
  width: 276px;
  height: 330px;
  max-width: 100%;
  object-fit: cover;
}

/* Washi-tape strips holding two opposite corners of a photo.
   Semi-transparent so the frame and background show through, like real tape.
   Shared by the home polaroid (.polaroid) and case-study hero images (.taped). */
.polaroid::before,
.polaroid::after,
.taped::before,
.taped::after {
  content: "";
  position: absolute;
  width: 104px;
  height: 30px;
  z-index: 3;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.3),
      rgba(255, 255, 255, 0) 45%
    ),
    linear-gradient(
      90deg,
      rgba(228, 196, 160, 0.6),
      rgba(235, 208, 178, 0.86) 50%,
      rgba(228, 196, 160, 0.6)
    );
  box-shadow: 0 2px 6px rgba(40, 22, 60, 0.16);
}
.polaroid::before {
  top: -13px;
  left: -26px;
  transform: rotate(-46deg);
}
.polaroid::after {
  bottom: -13px;
  right: -26px;
  transform: rotate(-46deg);
}

/* Corner-tape wrapper for any image (survives swapping the slot for a real <img>) */
.taped {
  position: relative;
}
.taped::before {
  top: -14px;
  left: -22px;
  transform: rotate(-44deg);
}
.taped::after {
  bottom: -14px;
  right: -22px;
  transform: rotate(-44deg);
}

.media__image {
  display: block;
  object-fit: scale-down;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  border: 1px solid var(--purple-border-2);
}

.sitemap__image {
  background: #2c0c0b;
}

/* Portrait prototype recording — capped by height so the tall aspect ratio
   doesn't run away down the page, and centred in the content column. */
.media__video {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 640px;
  margin-inline: auto;
  border-radius: 8px;
  border: 1px solid var(--purple-border-2);
  background: var(--purple-100);
}

/* =========================================================
   Sections (Home)
   ========================================================= */
.section {
  padding: var(--space-80) var(--px);
  background: var(--gold-paper);
}
.section--purple {
  background: var(--purple-100);
}
.section--champagne {
  background: var(--champagne);
}

.section-title {
  font-size: var(--text-h3);
  line-height: var(--leading-h3);
  font-weight: 600;
  color: var(--purple-800);
  margin: 0;
}

/* About */
.about__grid {
  display: flex;
  gap: var(--space-56);
  flex-wrap: wrap;
}
.about__text {
  flex: 1 1 440px;
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}
.about__text p {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  margin: 0;
  color: var(--body);
}
.about__cards {
  flex: 1 1 380px;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-16);
  align-content: start;
}
.skill-card {
  background: var(--white);
  border: 1px solid var(--purple-border);
  border-radius: 8px;
  padding: var(--space-24) var(--space-28);
  box-shadow: var(--shadow-sm);
}
.skill-card__label {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--purple-muted);
  text-transform: uppercase;
  margin-bottom: var(--space-8);
}
.skill-card__body {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--body);
}

/* Work / case list */
.work {
  display: flex;
  flex-direction: column;
  gap: var(--space-36);
}
.case-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: var(--space-28);
}
.case-card {
  text-decoration: none;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--purple-border-2);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.case-card:hover {
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.case-card__thumb {
  height: 250px;
  background: var(--purple-100);
}
.case-card__thumb .image-slot {
  height: 100%;
  border: 0;
  border-radius: 0;
  background: var(--purple-100);
}
/* Fills the fixed-height thumb. Default crop is centred; --top anchors the
   crop to the top for screenshots whose subject sits in the upper portion. */
.case-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.case-card__image--top {
  object-position: top center;
}
.case-card__body {
  padding: var(--space-24) var(--space-32) var(--space-32);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
.case-card__title {
  font-size: var(--text-h4);
  line-height: var(--leading-h4);
  font-weight: 600;
  color: var(--purple-800);
  margin: 0;
}
.case-card__desc {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  margin: 0;
  color: var(--body);
}
.case-card__cta {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  font-weight: 600;
  color: var(--purple-500);
  margin-top: var(--space-4);
}

/* How I Work */
.process {
  display: flex;
  flex-direction: column;
  gap: var(--space-48);
}
.process-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
  max-width: 1200px;
  text-wrap: pretty;
}
.process-block__title {
  font-size: var(--text-h4);
  line-height: var(--leading-h4);
  font-weight: 600;
  color: var(--purple-500);
  margin: 0;
}
.process-block__lead {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  margin: 0;
  color: var(--body);
}
.step {
  border-radius: 8px;
  padding: var(--space-16) var(--space-16);
}
.step--1 {
  background: var(--purple-tint-1);
}
.step--2 {
  background: var(--purple-tint-2);
}
.step--3 {
  background: var(--purple-tint-3);
}
.step--4 {
  background: var(--purple-tint-4);
}
.step--5 {
  background: var(--purple-tint-5);
}
.step__title {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: 700;
  color: var(--purple-800);
  margin-bottom: var(--space-4);
}
/* =========================================================
   Research cycle — the shape has to say "loop", not "line".
   Steps run in sequence, then a return path carries what was
   learned back into step 1.
   ========================================================= */
.cycle {
  position: relative;
}
/* Owns its grid so the responsive rules below stay local to the cycle */
.cycle__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-12);
}
/* Connector sitting in the grid gap between consecutive steps */
.cycle__steps .step {
  position: relative;
}
.cycle__steps .step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(var(--space-12) * -1);
  width: var(--space-12);
  height: 2px;
  background: var(--purple-accent);
  transform: translateY(-50%);
}
/* The return path: a U that ties the last step back to the first */
.cycle__return {
  position: relative;
  height: var(--space-32);
  margin-top: var(--space-16);
  border: 2px solid var(--purple-accent);
  border-top: 0;
  border-radius: 0 0 var(--space-16) var(--space-16);
}
/* Arrowhead pointing up into step 1 */
.cycle__return::after {
  content: "";
  position: absolute;
  left: -7px;
  top: -2px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 8px solid var(--purple-accent);
}
/* Sits on the return path, punching a gap in the line */
.cycle__note {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 50%);
  margin: 0;
  background: var(--gold-paper);
  padding: 0 var(--space-12);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--purple-muted);
  white-space: nowrap;
}

/* Narrow screens: the steps stack, so the loop runs up the left-hand side */
@media (max-width: 900px) {
  .cycle {
    padding-left: var(--space-32);
  }
  .cycle__steps {
    grid-template-columns: 1fr;
  }
  .cycle__steps .step:not(:last-child)::after {
    top: auto;
    right: auto;
    bottom: calc(var(--space-12) * -1);
    left: var(--space-24);
    width: 2px;
    height: var(--space-12);
    transform: none;
  }
  .cycle__return {
    position: absolute;
    left: 0;
    top: var(--space-24);
    bottom: var(--space-32);
    width: var(--space-20);
    height: auto;
    margin-top: 0;
    border: 2px solid var(--purple-accent);
    border-right: 0;
    border-radius: var(--space-16) 0 0 var(--space-16);
  }
  /* arrowhead now points right, into step 1 */
  .cycle__return::after {
    left: auto;
    top: -6px;
    right: -7px;
    border: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid var(--purple-accent);
  }
  .cycle__note {
    position: static;
    transform: none;
    background: none;
    padding: 0;
    margin-top: var(--space-16);
    white-space: normal;
  }
}

/* Title-only steps (homepage summary) — drop the gap meant for the description */
.step__title:last-child {
  margin-bottom: 0;
}
.step__text {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--body);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-12);
  --timeline-last: 4; /* highest index — 5 items, 0…4 */
}
/* The top border ramps light → dark as the steps progress left → right.
   Each item only declares its index; the colour is interpolated once here,
   so changing the ramp (or adding a step) is a one-line edit. */
.timeline__item {
  --i: 0;
  border-top: 3px solid var(--purple-accent); /* fallback if no color-mix */
  border-top-color: color-mix(
    in oklab,
    var(--purple-700) calc(var(--i) / var(--timeline-last) * 100%),
    var(--purple-accent)
  );
  padding: var(--space-12) var(--space-4) 0;
}
.timeline__item:nth-child(2) {
  --i: 1;
}
.timeline__item:nth-child(3) {
  --i: 2;
}
.timeline__item:nth-child(4) {
  --i: 3;
}
.timeline__item:nth-child(5) {
  --i: 4;
}
.timeline__title {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: 700;
  color: var(--purple-800);
  margin-bottom: var(--space-4);
}
.timeline__text {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--body);
}

/* =========================================================
   Footer (shared, dark)
   ========================================================= */
.site-footer {
  background: var(--purple-800);
  padding: var(--space-80) var(--px);
  color: var(--purple-paper);
}
.site-footer--compact {
  padding: var(--space-56) var(--px);
}
.site-footer__inner {
  max-width: var(--max-text);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-16);
  text-align: center;
}
.tag {
  background: var(--gold-accent);
  color: var(--gold-deep);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: var(--space-8) var(--space-16);
  border-radius: 999px;
}
.footer-title {
  font-size: var(--text-h2);
  line-height: var(--leading-h2);
  font-weight: 600;
  margin: 0;
  color: var(--purple-paper);
}
.site-footer--compact .footer-title {
  font-size: var(--text-h3);
  line-height: var(--leading-h3);
}
.footer-lead {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  margin: 0;
  color: var(--purple-footer-text);
}
.footer-actions {
  display: flex;
  gap: var(--space-16);
  margin-top: var(--space-8);
  flex-wrap: wrap;
  justify-content: center;
}
.footer-copy {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--purple-footer-mute);
  margin-top: var(--space-28);
}

/* =========================================================
   Case study pages
   ========================================================= */
.case-hero {
  background: var(--purple-200);
  padding: var(--space-72) var(--px) var(--space-56);
}
.case-hero__inner {
  max-width: var(--max-narrow);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  text-align: center;
  align-items: center;
}
.case-hero__title {
  font-size: var(--text-h2);
  font-weight: 600;
  color: var(--purple-800);
  margin: 0;
  line-height: var(--leading-h2);
}
.case-hero__subtitle {
  font-family: var(--serif);
  font-size: var(--text-h4);
  font-weight: 500;
  font-style: italic;
  color: var(--purple-700);
  margin: 0;
  line-height: var(--leading-h4);
  text-wrap: balance;
}

.meta-bar {
  max-width: var(--max-narrow);
  margin: calc(-1 * var(--space-28)) auto 0;
  padding: 0 var(--space-32);
  position: relative;
  z-index: 2;
}
.meta-bar__card {
  background: var(--purple-100);
  border: 1px solid var(--purple-border-2);
  border-radius: 8px;
  padding: var(--space-24) var(--space-32);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-20);
  box-shadow: var(--shadow-md);
}
.meta__label {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--purple-muted);
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}
.meta__value {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  font-weight: 500;
}

.media {
  max-width: var(--max-narrow);
  margin: var(--space-40) auto 0;
  padding: 0 var(--space-32);
}

.cs-section {
  padding: var(--space-64) var(--px);
}
.cs-section--first {
  padding: var(--space-80) var(--px) var(--space-64);
}
.cs-section--last {
  padding: var(--space-64) var(--px) var(--space-80);
}
.cs-section--divider {
  border-top: 1px solid var(--purple-border);
}
.cs-section__inner {
  max-width: var(--max-narrow);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-28);
}
.cs-section--first .cs-section__inner {
  gap: var(--space-24);
}

.cs-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-20);
}
.cs-num {
  font-size: var(--text-h1);
  font-weight: 500;
  color: var(--purple-border-2);
  line-height: 1;
  font-family: var(--serif);
}
.cs-title {
  font-size: var(--text-h3);
  line-height: var(--leading-h3);
  font-weight: 600;
  color: var(--purple-800);
  margin: 0;
}

.prose {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  margin: 0;
  color: var(--body);
  max-width: 1200px;
  text-wrap: pretty;
}
.prose em {
  color: inherit;
}

/* Stats */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-16);
}
.stat {
  background: var(--purple-100);
  border-radius: 8px;
  padding: var(--space-24);
  text-align: center;
}
.stat__num {
  font-family: var(--serif);
  font-size: var(--text-h3);
  line-height: var(--leading-h3);
  font-weight: 600;
  color: var(--purple-800);
}
/* Citation under each figure — quiet, but present and clickable */
.stat__source {
  margin-top: var(--space-8);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--purple-muted);
  text-wrap: pretty;
}
.stat__source a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--purple-border-2);
}
.stat__source a:hover {
  color: var(--link-hover);
  text-decoration-color: currentColor;
}
.stat__label {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--body);
}

/* Generic grids */
.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-20);
}
.grid-2-wide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-36);
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-16);
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-16);
}

/* Info cards */
.info-card {
  background: var(--purple-100);
  border-radius: 8px;
  padding: var(--space-20) var(--space-24);
}
.info-card__title {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  font-weight: 700;
  color: var(--purple-800);
  margin-bottom: var(--space-8);
}
.info-card__text {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--body);
}

.insight-card {
  background: var(--purple-100);
  border-radius: 8px;
  padding: var(--space-16) var(--space-20);
}
.insight-card__num {
  font-family: var(--serif);
  font-size: var(--text-h4);
  line-height: var(--leading-h4);
  font-weight: 600;
  color: var(--purple-500);
  margin-bottom: var(--space-8);
}
.insight-card__title {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: 700;
  color: var(--purple-800);
  margin-bottom: var(--space-4);
}
.insight-card__text {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--body);
}

/* Quote / callout */
.quote {
  background: var(--gold-deep);
  border-radius: 10px;
  padding: var(--space-32) var(--space-40);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
.quote__label {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold-accent);
  text-transform: uppercase;
}
.quote__text {
  font-family: var(--serif);
  font-size: var(--text-h4);
  font-weight: 500;
  line-height: var(--leading-h4);
  margin: 0;
  color: var(--gold-paper);
  text-wrap: pretty;
}
.quote__cite {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: 600;
  color: var(--gold-accent);
}

.callout {
  background: var(--purple-100);
  border-left: 3px solid var(--purple-500);
  border-radius: 0 8px 8px 0;
  padding: var(--space-16) var(--space-24);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--body);
}
.callout strong {
  color: var(--purple-800);
}

/* Split text blocks */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-36);
}
.split__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
.split__title {
  font-size: var(--text-h5);
  line-height: var(--leading-h5);
  font-weight: 600;
  color: var(--purple-500);
  margin: 0;
}
.split__col p {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  margin: 0;
  color: var(--body);
  text-wrap: pretty;
}
.list {
  margin: 0;
  padding-left: var(--space-16);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--body);
}

/* Figures */
.figure {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
.figure--tight {
  gap: var(--space-8);
}
.caption {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--body);
}
.caption--center {
  text-align: center;
}
.caption strong {
  color: var(--purple-800);
}
.eyebrow {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--purple-muted);
  text-transform: uppercase;
}

/* Personas */
.persona {
  background: var(--white);
  border: 1px solid var(--purple-border-2);
  border-radius: 8px;
  padding: var(--space-24) var(--space-28);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
.persona__name {
  font-size: var(--text-h5);
  line-height: var(--leading-h5);
  font-weight: 600;
  color: var(--purple-800);
  margin: 0;
}
.persona p {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  margin: 0;
  color: var(--body);
}

/* Finding cards */
.finding-card {
  border: 1px solid var(--purple-border-2);
  border-radius: 8px;
  padding: var(--space-20) var(--space-24);
}
.finding-card .eyebrow {
  margin-bottom: var(--space-8);
  display: block;
}
.finding-card .list {
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

/* Accessibility items */
.a11y-item {
  border-left: 3px solid var(--purple-500);
  padding: var(--space-4) 0 var(--space-4) var(--space-16);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--body);
}

/* Next-case link */
.next-case {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-20);
  border: 1px solid var(--purple-border-2);
  border-radius: 10px;
  padding: var(--space-24) var(--space-32);
  text-decoration: none;
  color: var(--ink);
  margin-top: var(--space-12);
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.next-case:hover {
  box-shadow: 0 8px 22px rgba(40, 22, 60, 0.12);
  color: var(--ink);
  text-decoration: none;
  transform: translateY(-2px);
}
.next-case__label {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--purple-muted);
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}
.next-case__title {
  font-family: var(--serif);
  font-size: var(--text-h4);
  line-height: var(--leading-h4);
  font-weight: 600;
  color: var(--purple-800);
}
.next-case__arrow {
  font-size: var(--text-h4);
  line-height: var(--leading-h4);
  color: var(--purple-500);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  :root {
    --text-h1: 48px;
    --leading-h1: 56px;
    --text-h2: 36px;
    --leading-h2: 44px;
    --text-h3: 28px;
    --leading-h3: 36px;
    --text-h4: 22px;
    --leading-h4: 30px;
  }

  .section,
  .hero {
    padding-block: var(--space-64);
  }

  .timeline {
    grid-template-columns: repeat(2, 1fr);
  }
  .meta-bar__card {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  :root {
    --text-h1: 36px;
    --leading-h1: 44px;
    --text-h2: 30px;
    --leading-h2: 38px;
    --text-h3: 24px;
    --leading-h3: 32px;
    --text-h4: 20px;
    --leading-h4: 28px;
    /* Body copy drops 2px so paragraphs don't overwhelm a small screen */
    --text-body: 14px;
    --leading-body: 22px;
  }

  /* Tighter vertical rhythm between sections on small screens */
  .section,
  .hero,
  .site-footer {
    padding-block: var(--space-48);
  }
  .cs-section,
  .cs-section--first,
  .cs-section--last {
    padding-block: var(--space-48);
  }
  .cs-section__inner,
  .cs-section--first .cs-section__inner {
    gap: var(--space-20);
  }
  .process {
    gap: var(--space-32);
  }

  .site-nav__links {
    gap: var(--space-16);
    font-size: var(--text-sm);
    line-height: var(--leading-sm);
  }

  .case-list {
    grid-template-columns: 1fr;
  }
  .timeline,
  .meta-bar__card,
  .grid-2,
  .grid-2-wide,
  .grid-3,
  .grid-4,
  .split,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .cs-head {
    gap: var(--space-16);
  }
  .quote {
    padding: var(--space-24) var(--space-24);
  }
  .hero__media {
    flex-basis: 100%;
    display: flex;
    justify-content: center;
  }
}
