/* ==========================================================================
   Gouri Dixit — Portfolio
   Design system + styles. Hand-written CSS, no build step, no dependencies.

   Palette is derived from the logo navy (#011228) and the brand gold
   (#C9A53E). Gold is used as a FILL and as text on dark only — gold text on
   the light paper ground measures 2.1:1 and fails WCAG AA. Where gold must
   read as text on light, --gold-deep (#8A6B1A, 4.7:1) is used instead.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Ink ------------------------------------------------------------------ */
  --ink:          #011228;  /* logo navy — headings, body text            */
  --ink-70:       #3A4657;  /* de-emphasised text on paper   (7.0:1)      */
  --ink-on-dark:  #FAF7F0;  /* paper on navy                (17.7:1)      */
  --muted:        #5A554C;  /* secondary text on paper       (6.9:1)      */
  --muted-dark:   #9AA6B4;  /* secondary text on navy        (7.7:1)      */

  /* Brand ---------------------------------------------------------------- */
  --gold:         #C9A53E;  /* FILLS, rules, and text on navy (8.0:1)     */
  /* Gold as TEXT. Dark enough to clear 4.5:1 on all three light grounds:
     paper 5.8:1, paper-alt 5.3:1, gold-wash 5.1:1. */
  --gold-deep:    #7A5E12;
  --gold-wash:    #F3E9CC;  /* tint for chips and hover states            */

  /* Ground --------------------------------------------------------------- */
  --paper:        #FAF7F0;
  --paper-alt:    #F2ECE0;
  --surface:      #FFFFFF;
  --line:         #E2D9C8;
  --line-dark:    #1C2B41;

  /* Type ----------------------------------------------------------------- */
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body:    "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-hero:  clamp(2.35rem, 1.2rem + 3.3vw, 4.15rem);
  --fs-h2:    clamp(1.95rem, 1.35rem + 2.2vw, 2.95rem);
  --fs-h3:    clamp(1.3rem, 1.15rem + 0.7vw, 1.65rem);
  --fs-lead:  clamp(1.1rem, 1.03rem + 0.42vw, 1.35rem);
  --fs-body:  clamp(1.02rem, 0.99rem + 0.15vw, 1.12rem);
  --fs-sm:    0.95rem;
  --fs-label: 0.83rem;
  --fs-stat:  clamp(2.1rem, 1.5rem + 2.2vw, 3.1rem);

  /* Space (mid density — marketing page, not dashboard) ------------------- */
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4rem;
  --space-8: 6rem;

  --section-y: clamp(3.75rem, 7vw, 7rem);
  --gutter:    clamp(1.25rem, 4vw, 3rem);
  --measure:   66ch;

  /* Other ---------------------------------------------------------------- */
  --radius:    4px;
  --radius-lg: 8px;
  --shadow:    0 1px 2px rgba(1, 18, 40, 0.05),
               0 8px 24px -12px rgba(1, 18, 40, 0.16);
  --ease:      cubic-bezier(0.2, 0.6, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.65;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0;
  color: var(--ink);
}

p { margin: 0 0 var(--space-3); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--gold-deep);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-dark :focus-visible { outline-color: var(--gold); }

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

.skip-link {
  position: absolute;
  left: var(--space-3);
  top: var(--space-3);
  z-index: 100;
  padding: 0.7rem 1.1rem;
  background: var(--ink);
  color: var(--ink-on-dark);
  font-size: var(--fs-sm);
  font-weight: 600;
  border-radius: var(--radius);
  transform: translateY(-160%);
  transition: transform 0.18s var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 820px; }

.section { padding-block: var(--section-y); }
.section--alt   { background: var(--paper-alt); }
.section--paper { background: var(--paper); }

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* Section heading: a short gold rule + a plain-case kicker.
   Deliberately not an all-caps eyebrow. */
.kicker {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--gold-deep);
  margin-bottom: var(--space-3);
}
.kicker::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--gold);
  flex: none;
}
.on-dark .kicker { color: var(--gold); }

.section-title { font-size: var(--fs-h2); max-width: 20ch; }
.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--ink-70);
  max-width: 58ch;
}

/* --------------------------------------------------------------------------
   4. Buttons & links
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 44px;              /* touch target */
  padding: 0.72rem 1.4rem;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;          /* a wrapped button label always looks broken */
  transition: background-color 0.18s var(--ease),
              border-color 0.18s var(--ease),
              color 0.18s var(--ease),
              transform 0.18s var(--ease);
}
.btn .arrow { transition: transform 0.18s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* Gold fill + navy text = 8.0:1 */
/* Hover deepens the gold to #B8942F — navy on it still measures 6.6:1 */
.btn--primary { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.btn--primary:hover { background: #B8942F; border-color: #B8942F; }

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

.on-dark .btn--ghost { color: var(--ink-on-dark); border-color: var(--line-dark); }
.on-dark .btn--ghost:hover { border-color: var(--gold); background: transparent; }

/* Text link with a gold underline that thickens on hover */
.link {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--gold), var(--gold));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 2px;
  padding-bottom: 2px;
  transition: background-size 0.18s var(--ease);
}
.link:hover { background-size: 100% 6px; }
.on-dark .link { color: var(--ink-on-dark); }

/* --------------------------------------------------------------------------
   5. Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 240, 0.88);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 68px;
  padding-block: 0.65rem;
}

/* min-height keeps the logo link a 44px touch target even though the
   wordmark itself is only ~20px tall. */
.brand { display: inline-flex; align-items: center; flex: none; min-height: 44px; }
.brand img { height: 21px; width: auto; }

.site-nav { margin-left: auto; }

.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.6vw, 2rem);
}

/* Nav links: plain text with a gold underline on hover. */
.site-nav__list > li > a {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink-70);
  text-decoration: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.55rem 0.15rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.site-nav__list > li > a:hover,
.site-nav__list > li > a[aria-current="page"],
.site-nav__list > li > a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--gold); }


/* Mobile menu button — hidden until the nav no longer fits on one row */
.nav-toggle {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.5rem 0.8rem;
  font: 600 var(--fs-sm)/1 var(--font-body);
  color: var(--ink);
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle svg { width: 18px; height: 18px; flex: none; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open  { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Below 40rem the logo plus three nav items stop fitting on one row, so the
   nav collapses into a panel that drops down under the header bar. */
@media (max-width: 40rem) {
  .brand img { height: 18px; }
  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 24px -18px rgba(1, 18, 40, 0.3);
  }
  .site-header.is-open .site-nav { display: block; }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.25rem var(--gutter) 0.75rem;
  }
  .site-nav__list > li { border-bottom: 1px solid var(--line); }
  .site-nav__list > li:last-child { border-bottom: 0; }

  .site-nav__list > li > a {
    width: 100%;
    justify-content: space-between;
    min-height: 52px;
    padding: 0.85rem 0;
    font-size: 1rem;
    border-bottom: 0;
  }


  /* No JS: show the nav as a plain stacked list under the logo. */
  .no-js .nav-toggle { display: none; }
  .no-js .site-header__inner { flex-wrap: wrap; }
  .no-js .site-nav { display: block; position: static; flex-basis: 100%; box-shadow: none; border: 0; }
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */

.hero { padding-block: clamp(3rem, 6.5vw, 6rem) clamp(3rem, 6vw, 5.5rem); }

.hero__grid {
  display: grid;
  gap: clamp(2.25rem, 5vw, 4.5rem);
  align-items: center;
}
@media (min-width: 60rem) {
  .hero__grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); }
}

.hero__role {
  font-size: var(--fs-label);
  font-weight: 600;
  color: var(--gold-deep);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.hero__role::before {
  content: "";
  width: 32px; height: 2px;
  background: var(--gold);
  flex: none;
}

/* The headline is set in one ink colour on purpose. The line break exposes
   the sentence's own parallel structure instead of colouring a phrase. */
.hero__title {
  font-size: var(--fs-hero);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-4);
  text-wrap: balance;
}
/* No forced line breaks — the column is too narrow to honour them at any
   width. text-wrap: balance evens out the rag instead. */
.hero__title .brk { display: none; }

.hero__lead { margin-bottom: var(--space-5); }
.hero__lead strong {
  font-family: var(--font-display);
  font-size: 1.18em;
  font-weight: 500;
  display: block;
  color: var(--ink);
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); align-items: center; }

/* Portrait: background-removed cut-out standing in front of an offset gold
   panel. The image is already greyscale and transparent, so it carries no
   rounded corners or filter — the silhouette itself is the edge. */
.portrait { position: relative; max-width: 430px; margin-inline: auto; }
/* The panel spans both sides of the figure, running a little past each edge. */
.portrait::before {
  content: "";
  position: absolute;
  inset: auto -14px 0 -14px;
  height: 56%;
  background: var(--gold);
  border-radius: var(--radius);
  z-index: 0;
}
.portrait img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
}

/* --------------------------------------------------------------------------
   7. Proof strip
   -------------------------------------------------------------------------- */

.proof { background: var(--ink); color: var(--ink-on-dark); padding-block: clamp(2.5rem, 5vw, 3.75rem); }

/* Explicit breakpoints rather than auto-fit — auto-fit left a 3 + 1 orphan
   row at mid widths. */
.proof__grid {
  display: grid;
  gap: var(--space-5) var(--space-4);
  grid-template-columns: 1fr;
}
/* Phones: single column, centred */
@media (max-width: 29.99rem) {
  .proof__grid { text-align: center; }
  .stat__label { margin-inline: auto; }
}
@media (min-width: 30rem) { .proof__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 48rem) { .proof__grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 64rem) { .proof__grid { grid-template-columns: repeat(5, 1fr); } }

.stat__value {
  font-family: var(--font-display);
  font-size: var(--fs-stat);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--gold);
  margin-bottom: 0.45rem;
}
.stat__label {
  font-size: var(--fs-sm);
  line-height: 1.45;
  color: var(--muted-dark);
  max-width: 26ch;
}

/* --------------------------------------------------------------------------
   8. About
   -------------------------------------------------------------------------- */

.about__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
}
@media (min-width: 56rem) {
  .about__grid { grid-template-columns: minmax(0, 0.62fr) minmax(0, 1fr); align-items: start; }
  .about__aside { position: sticky; top: 7rem; }
}

.prose { max-width: var(--measure); }
.prose p { margin-bottom: var(--space-3); }
.prose p + p { margin-top: 0; }

/* Pull quote — set in the display serif, marked by a gold rule. */
.pullquote {
  margin: var(--space-5) 0;
  padding-left: var(--space-4);
  border-left: 3px solid var(--gold);
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.7rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.focus-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 30rem) { .focus-list { grid-template-columns: 1fr 1fr; } }

.focus-list li {
  background: var(--surface);
  padding: var(--space-3) var(--space-3);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.4;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.focus-list li::before {
  content: "";
  flex: none;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   9. Work
   -------------------------------------------------------------------------- */

.work-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s var(--ease),
              box-shadow 0.2s var(--ease),
              transform 0.2s var(--ease);
}
.work-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.work-card__grid { display: grid; }
@media (min-width: 52rem) {
  .work-card__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr); align-items: stretch; }
}

.work-card__body { padding: clamp(1.5rem, 3.5vw, 2.75rem); }

.tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: var(--space-3); padding: 0; list-style: none; }
.tag {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--gold-deep);
  background: var(--gold-wash);
  border-radius: 100px;
  padding: 0.28rem 0.7rem;
  white-space: nowrap;
}

.work-card__title { font-size: var(--fs-h3); margin-bottom: var(--space-2); }
.work-card__desc { color: var(--muted); font-size: var(--fs-sm); margin-bottom: var(--space-4); max-width: 48ch; }

.work-card__results {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: var(--space-3) 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
}
.work-card__results dt { font-size: 0.82rem; color: var(--muted); line-height: 1.35; }
.work-card__results dd {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}

.work-card__cue {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
}
.work-card__cue .arrow { transition: transform 0.18s var(--ease); }
.work-card:hover .work-card__cue .arrow { transform: translateX(4px); }

.work-card__media { background: var(--paper-alt); border-left: 1px solid var(--line); overflow: hidden; }
.work-card__media img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
@media (max-width: 51.99rem) {
  .work-card__media { border-left: 0; border-top: 1px solid var(--line); max-height: 260px; }
}

/* --------------------------------------------------------------------------
   10. Contact band
   -------------------------------------------------------------------------- */

.contact { background: var(--ink); color: var(--ink-on-dark); }
.contact .section-title { color: var(--ink-on-dark); max-width: 18ch; }
.contact__lead { color: var(--muted-dark); font-size: var(--fs-lead); max-width: 46ch; margin-top: var(--space-3); }
.contact__grid { display: grid; gap: var(--space-5); align-items: end; }
@media (min-width: 52rem) { .contact__grid { grid-template-columns: 1fr auto; } }
.contact__actions { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); }

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--ink);
  color: var(--muted-dark);
  border-top: 1px solid var(--line-dark);
  padding-block: var(--space-5);
  font-size: var(--fs-sm);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
}
.site-footer img { height: 18px; width: auto; opacity: 0.92; }
.site-footer nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: var(--space-4); }
.site-footer a {
  color: var(--muted-dark);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 0.18s var(--ease);
}
.site-footer a:hover { color: var(--gold); }
/* --muted-dark, not a dimmer grey: at 13.6px this needs 4.5:1 and gets 7.7:1 */
.site-footer__note { flex-basis: 100%; color: var(--muted-dark); font-size: 0.85rem; }

/* --------------------------------------------------------------------------
   12. Case study
   -------------------------------------------------------------------------- */

.cs-hero { padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(2rem, 4vw, 3rem); }

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: var(--space-4);
  min-height: 44px;
}
.backlink:hover { color: var(--ink); }

.cs-title {
  font-size: clamp(2.4rem, 1.5rem + 3.6vw, 4.1rem);
  letter-spacing: -0.028em;
  margin-bottom: var(--space-3);
}
.cs-dek { font-size: var(--fs-lead); color: var(--ink-70); max-width: 56ch; line-height: 1.5; }

.cs-meta {
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: var(--space-4) 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
}
.cs-meta dt { font-size: var(--fs-label); font-weight: 600; color: var(--gold-deep); margin-bottom: 0.3rem; }
.cs-meta dd { margin: 0; font-size: var(--fs-sm); color: var(--ink); line-height: 1.5; }

.cs-body { max-width: 720px; }
.cs-body > * + * { margin-top: var(--space-3); }
.cs-body h2 {
  font-size: var(--fs-h2);
  margin-top: var(--space-7);
  margin-bottom: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  max-width: 22ch;
}
.cs-body h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.cs-body > h3 {
  font-size: var(--fs-h3);
  font-weight: 500;
  letter-spacing: -0.018em;
}
.cs-body ul { padding-left: 1.15rem; margin: 0 0 var(--space-3); }
.cs-body li { margin-bottom: 0.5rem; }
.cs-body li::marker { color: var(--gold-deep); }

/* Numbered workstreams. Numbering is used because the content genuinely is
   a sequence — research, then strategy, then production, then measurement. */
.steps { list-style: none; counter-reset: step; margin: var(--space-5) 0 0; padding: 0; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: clamp(3rem, 7vw, 4.25rem);
  padding-bottom: var(--space-5);
  margin-bottom: var(--space-5);
  border-bottom: 1px solid var(--line);
}
.steps > li:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: -0.12em;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem);
  font-weight: 500;
  line-height: 1;
  color: var(--gold);
  letter-spacing: -0.02em;
}
.steps h3 { font-size: var(--fs-h3); margin-bottom: var(--space-2); }
.steps p { color: var(--ink-70); }

/* Growth-engine flow */
.flow {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: var(--space-4);
  background: var(--ink);
  border-radius: var(--radius-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.35rem;
}
.flow li {
  display: flex;
  align-items: center;
  gap: 0.5rem 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-on-dark);
}
.flow li::after {
  content: "\2192";
  color: var(--gold);
  font-weight: 400;
  margin-left: 0.15rem;
}
.flow li:last-child { color: var(--gold); }
.flow li:last-child::after { content: none; }

.tools { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tools li { background: var(--surface); padding: var(--space-3); font-size: var(--fs-sm); line-height: 1.5; }
.tools strong { display: block; font-weight: 600; margin-bottom: 0.12rem; }
.tools span { color: var(--muted); }
@media (min-width: 40rem) { .tools { grid-template-columns: 1fr 1fr; } }

/* Results */
.results-grid {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}
.result {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
}
.result__value {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 0.25rem;
}
.result__label { font-size: 0.88rem; color: var(--muted); line-height: 1.45; }

figure { margin: var(--space-5) 0 0; }
figure img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.18s var(--ease);
}

/* These are dense analytics screenshots. Scaled into a phone column they land
   at roughly 0.25x, which makes their text unreadable — so each one opens at
   full resolution, where the browser's own pinch-zoom takes over. */
.figure-zoom { display: block; text-decoration: none; }
.figure-zoom:hover img { border-color: var(--gold); }

figcaption {
  margin-top: var(--space-2);
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
  padding-left: var(--space-2);
  border-left: 2px solid var(--gold);
}
.zoom-hint {
  color: var(--gold-deep);
  font-weight: 600;
  white-space: nowrap;
}

.callout {
  margin: var(--space-5) 0 0;
  padding: var(--space-4);
  background: var(--gold-wash);
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  line-height: 1.6;
}
.callout strong { display: block; margin-bottom: 0.3rem; }

/* Data table — scrolls inside its own box on narrow screens. */
.cs-table-wrap {
  margin-top: var(--space-4);
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.cs-table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.cs-table th,
.cs-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
}
.cs-table tbody tr:last-child th,
.cs-table tbody tr:last-child td { border-bottom: 0; }
.cs-table thead th {
  font-size: var(--fs-label);
  font-weight: 600;
  color: var(--gold-deep);
  background: var(--paper-alt);
}
.cs-table tbody th { font-weight: 600; white-space: nowrap; }

/* A flow nested inside a numbered step sits a little tighter. */
.steps .flow { margin-top: var(--space-3); }
.steps ul { margin-top: 0; }

/* --------------------------------------------------------------------------
   12b. Featured work — grouped external link cards
   -------------------------------------------------------------------------- */

.feature-group + .feature-group { margin-top: var(--space-7); }

.feature-group__title {
  font-size: var(--fs-h3);
  font-weight: 500;
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--line);
}

.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 44rem) { .feature-grid { grid-template-columns: 1fr 1fr; } }

/* The whole card is the link, so the tap target is the full card. */
.feature-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s var(--ease),
              box-shadow 0.2s var(--ease),
              transform 0.2s var(--ease);
}
.feature-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* Feature image. The source images are mixed shapes — mostly tall article
   screenshots, a couple wide — so every card crops to one ratio, anchored to
   the top where each screenshot's headline and masthead sit. */
.feature-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper-alt);
  border-bottom: 1px solid var(--line);
}
.feature-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s var(--ease);
}
.feature-card:hover .feature-card__media img { transform: scale(1.03); }

.feature-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

.feature-card__source {
  font-size: var(--fs-label);
  font-weight: 600;
  color: var(--gold-deep);
  margin-bottom: var(--space-2);
}
.feature-card__title {
  font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  line-height: 1.22;
  margin-bottom: var(--space-2);
}
.feature-card__desc {
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: var(--space-3);
}
.feature-card__meta {
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem var(--space-3);
  font-size: 0.82rem;
  color: var(--muted);
}
.feature-card__cue { font-weight: 600; color: var(--ink); white-space: nowrap; }

/* Small uppercase label above a page heading. gold-deep keeps it at 5.8:1 on paper. */
.eyebrow {
  margin: 0 0 var(--space-3);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

/* --------------------------------------------------------------------------
   12c. Case studies page — one full-width row per case study
   -------------------------------------------------------------------------- */

.case-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); }

/* The whole row is the link, so the tap target is the full bar. */
.case-row {
  position: relative;
  display: grid;
  gap: var(--space-4);
  padding: clamp(1.5rem, 3.5vw, 2.25rem) clamp(1.5rem, 3.5vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.case-row::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--gold);
  transform: scaleY(0.35);
  transform-origin: top;
  transition: transform 0.25s var(--ease);
}
.case-row:hover { border-color: var(--gold); box-shadow: var(--shadow); transform: translateY(-2px); }
.case-row:hover::before { transform: scaleY(1); }

@media (min-width: 60rem) {
  .case-row {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-6);
  }
}

.case-row .tags { margin-bottom: var(--space-2); }
.case-row__title {
  font-size: clamp(1.45rem, 1.2rem + 1vw, 1.95rem);
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: var(--space-2);
}
.case-row__desc { margin: 0; font-size: var(--fs-sm); line-height: 1.55; color: var(--muted); max-width: 52ch; }

.case-row__stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}
.case-row__stats li { padding-left: var(--space-3); border-left: 1px solid var(--line); }
.case-row__value {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}
.case-row__label { margin: 0; font-size: 0.8rem; line-height: 1.35; color: var(--muted); }

.case-row__cue {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.case-row__cue .arrow { transition: transform 0.18s var(--ease); }
.case-row:hover .case-row__cue .arrow { transform: translateX(4px); }

@media (max-width: 30rem) {
  .case-row__stats { gap: var(--space-2); }
  .case-row__stats li { padding-left: var(--space-2); }
  .case-row__label { font-size: 0.75rem; }
}

/* --------------------------------------------------------------------------
   13. Motion — subtle reveal, fully disabled under reduced-motion
   -------------------------------------------------------------------------- */

.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
/* If JS never runs, nothing stays hidden. */
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.is-in { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   14. Print
   -------------------------------------------------------------------------- */

@media print {
  .site-header, .contact, .backlink, .hero__actions { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section { padding-block: 1.5rem; }
  a { text-decoration: underline; }
}
