/* ==========================================================================
   Editorial Portfolio — Style System
   Fonts: Bricolage Grotesque (sans) + Instrument Serif (italic accents)
   Palette: monochrome — hierarchy comes from size, weight, and gray steps
   ========================================================================== */

:root {
  /* Color tokens */
  --paper: #f1f1f1;
  --ink: #181818;
  --ink-soft: #5c5c5c;
  --ink-faint: #919191;
  --hairline: #dcdcdc;

  /* Type */
  --font-sans: "Bricolage Grotesque", system-ui, sans-serif;
  --font-geist: "Geist", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;

  /* Fluid type scale */
  --text-xs: 0.75rem;                              /* 12px labels */
  --text-sm: 0.875rem;                             /* 14px UI */
  --text-base: clamp(1rem, 0.9rem + 0.4vw, 0.25rem);
  --text-lg: clamp(1.5rem, 1rem + 2.2vw, 3rem);    /* statements */
  --text-xl: clamp(2rem, 1.2rem + 3.6vw, 4.5rem);  /* section heads */
  --text-display: clamp(4rem, 1rem + 17vw, 17rem); /* hero / contact */

  /* Spacing scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: clamp(5rem, 4rem + 6vw, 11rem);       /* section rhythm */
  --gutter: clamp(1.25rem, 4vw, 4rem);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-swap: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 0.3s;
  --dur-base: 0.6s;

  /* Blueprint grid — 4 vertical lines: page margins + thirds of the content */
  --grid-1: 11.2%;
  --grid-2: 37.067%;
  --grid-3: 62.933%;
  --grid-4: 88.8%;
}

/* ---------- Reset & base ---------- */

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

html { scroll-behavior: smooth; }
html.lenis { height: auto; scroll-behavior: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Faint blueprint grid over the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 1;
  transition: opacity 0.32s ease-out;
  background-image:
    linear-gradient(var(--hairline), var(--hairline)),
    linear-gradient(var(--hairline), var(--hairline)),
    linear-gradient(var(--hairline), var(--hairline)),
    linear-gradient(var(--hairline), var(--hairline));
  background-size: 1px 100%;
  background-repeat: no-repeat;
  background-position:
    var(--grid-1) 0,
    var(--grid-2) 0,
    var(--grid-3) 0,
    var(--grid-4) 0;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
em.serif, .serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }

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

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--gutter);
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-1) var(--space-2);
  z-index: 100;
}
.skip-link:focus { top: var(--space-1); }

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

/* ---------- Intro curtain ---------- */

/* The curtain is driven entirely by CSS so it ALWAYS lifts, even if every
   script is blocked — the page can never be stuck black. JS only layers the
   Mac zoom on top of this. Holds black, then slides up off-screen. */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: var(--paper);
  pointer-events: none;
  animation: intro-curtain 3s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}
@keyframes intro-curtain {
  0%, 58% { transform: translateY(0); }
  100% { transform: translateY(-100.5%); }
}
/* During the intro the hero stage floats above the curtain so the Mac zoom is visible. */
body.is-intro main {
  position: relative;
  z-index: 31;
}
body.is-intro .hero__mac { z-index: 1; }
body.is-intro::before { opacity: 0; }
body.is-intro.is-revealing::before { opacity: 1; }
body.is-intro::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 32;
  background: var(--paper);
  pointer-events: none;
  animation: intro-paper-fade 0.75s ease-out forwards;
}
@keyframes intro-paper-fade {
  0% { opacity: 1; }
  100% { opacity: 0; }
}
body.is-intro:not(.is-revealing) .hero__nav-space,
body.is-intro:not(.is-revealing) .hero__title-row {
  border-color: transparent;
}
body.is-intro .hero__intro::before,
body.is-intro .hero__based::after {
  opacity: 0;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--gutter);
  font-size: var(--text-sm);
  mix-blend-mode: difference;
  color: #e7e7e7;
}
.site-header__logo { font-weight: 500; letter-spacing: 0; justify-self: start; }
.site-header__logo-dot { font-weight: 700; }
.site-nav { justify-self: center; }
.site-nav ul { display: flex; gap: clamp(1.5rem, 3.2vw, 3.75rem); }
.site-header__status { justify-self: end; }

/* ---------- Label swap micro-interaction ---------- */

/* inline-grid so the box auto-sizes to the WIDER of the label and its swap
   text — this stops longer swaps like "(Copied)" from being clipped. */
.swap-label {
  position: relative;
  display: inline-grid;
  justify-items: start; /* keep the visible label flush-left in its box even
                           when the box is widened by a longer swap text */
  overflow: hidden;
  white-space: nowrap;
}
.swap-label > span,
.swap-label::after {
  grid-area: 1 / 1;
  transition: transform var(--dur-fast) var(--ease-swap);
}
.swap-label::after {
  content: attr(data-swap);
  transform: translateY(100%);
}
.swap-label:hover > span,
.swap-label:focus-visible > span,
.swap-label.is-swapped > span { transform: translateY(-100%); }
.swap-label:hover::after,
.swap-label:focus-visible::after,
.swap-label.is-swapped::after { transform: translateY(0); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-bottom: clamp(3rem, 8vh, 7rem);
}

/* Strip under the fixed nav, closed by the first horizontal grid line */
.hero__nav-space {
  height: clamp(4.5rem, 14vh, 8rem);
  border-bottom: 1px solid var(--hairline);
}

.hero__title-row {
  text-align: center;
  border-bottom: 1px solid var(--hairline);
}
.hero__name-box {
  display: inline-block;
  position: relative;
}
.hero__title {
  font-size: clamp(3.2rem, 11.5vw, 15rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  font-weight: 600;
}
.hero__title .serif {
  letter-spacing: -0.04em;
  margin-right: 0.02em;
}
.hero__title-sans { letter-spacing: -0.06em; }

/* Masked line reveals */
.line { display: block; overflow: hidden; }
.line__inner { display: inline-block; will-change: transform; }

/* Anchored to the name box so its right edge tracks the end of "Yousuf" */
.hero__role {
  position: absolute;
  right: 0;
  top: calc(100% + var(--space-2));
  white-space: nowrap;
  font-size: var(--text-sm);
  font-weight: 500;
}

.hero__grid {
  display: grid;
  grid-template-columns: var(--grid-1) 1fr 1fr 1fr var(--grid-1);
  align-items: start;
  margin-top: clamp(2.5rem, 9vh, 5.5rem);
}

/* Metrics matched to the reference (16px / 120% / -0.01em), nudged +0.5px */
.hero__intro,
.hero__based {
  position: relative;
  font-size: 1.03125rem; /* 16.5px */
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.hero__intro em.serif,
.hero__based em.serif { color: var(--ink-soft); }

.hero__intro {
  grid-column: 2;
  max-width: 247px; /* keeps the same 4-line wrap at 16.5px */
  margin-top: clamp(4.5rem, 11vh, 8rem);
}
.hero__intro::before,
.hero__based::after {
  content: "+";
  position: absolute;
  font-size: 1.3125rem;
  font-weight: 300;
  line-height: 1;
  color: var(--ink-faint);
}
.hero__intro::before {
  left: 0;
  top: -1.2em;
  transform: translateX(-50%);
}

.hero__mac {
  grid-column: 3;
  justify-self: center;
  position: relative;
  width: clamp(320px, 38vw, 720px);
}
.hero__mac img { width: 100%; height: auto; }

/* The MacPaint canvas area of the image — hosts the lottie.
   Canvas rect (pixel-measured from mac.avif): left 39.5%, top 21.7%,
   25.1% × 16.9% → center at 52.1% / 30.2%. The comp is square, sized
   a touch wider than the canvas so the word fills it like the original. */
.hero__hello {
  position: absolute;
  left: 52.1%;
  top: 30.2%;
  width: 27.5%;
  aspect-ratio: 1;
  /* -50% would center the box; the extra nudge compensates for the word
     sitting slightly left/low inside the lottie comp */
  transform: translate(-49.4%, -51.8%);
}
.hero__hello svg { display: block; }

.hero__based {
  grid-column: 4;
  justify-self: end;
  align-self: end;
  text-align: right;
  max-width: 310px;
  margin-top: 18vh;
  margin-bottom: 4vh;
}
.hero__based::after {
  right: 0;
  top: -1.2em;
  transform: translateX(50%);
}

/* ---------- Specimen frame (crop-mark figure) ---------- */

.specimen { position: relative; padding: 10px; }
.specimen__mark {
  position: absolute;
  width: 14px; height: 14px;
  border-color: var(--ink);
  border-style: solid;
  border-width: 0;
}
.specimen__mark--tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.specimen__mark--tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.specimen__mark--bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.specimen__mark--br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.specimen__caption {
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--ink-faint);
  text-transform: lowercase;
}

/* Placeholder asset blocks */
.ph {
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(45deg, transparent 0 10px, rgba(24, 24, 24, 0.04) 10px 20px),
    #efefef;
  border: 1px solid var(--hairline);
  color: var(--ink-faint);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
}
.ph--hero { aspect-ratio: 4 / 5; }
.ph--portrait { aspect-ratio: 3 / 4; }

/* Split-text word reveal */
[data-split] .word { display: inline-block; overflow: hidden; vertical-align: top; }
[data-split] .word > span { display: inline-block; will-change: transform; }

/* ---------- Section heads ---------- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0 var(--gutter) var(--space-4);
  border-bottom: 1px solid var(--ink);
  margin: 0 0 0;
}
.section-head h2 {
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}
.section-head__label {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--ink-faint);
  vertical-align: top;
  margin-right: 0.5em;
  letter-spacing: 0;
}
.section-head__note { font-size: var(--text-sm); color: var(--ink-soft); }

/* ---------- Works ---------- */

/* Opaque cover so the section slides over the pinned hero; the grid
   lines are redrawn with fixed attachment so they align seamlessly
   with the page-level ones */
.works {
  position: relative;
  z-index: 2;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--hairline), var(--hairline)),
    linear-gradient(var(--hairline), var(--hairline)),
    linear-gradient(var(--hairline), var(--hairline)),
    linear-gradient(var(--hairline), var(--hairline));
  background-size: 1px 100%;
  background-repeat: no-repeat;
  background-position:
    var(--grid-1) 0,
    var(--grid-2) 0,
    var(--grid-3) 0,
    var(--grid-4) 0;
  background-attachment: fixed;
}

/* Full-viewport intro panel: outlined italic "Selected" behind solid "Works" */
.works-hero {
  position: relative;
  min-height: clamp(440px, 64svh, 680px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.works-hero__outline {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(7rem, 19vw, 24rem);
  line-height: 1;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px #bdbdbd;
  pointer-events: none;
  user-select: none;
}
.works-hero__years {
  position: relative;
  font-size: var(--text-base);
  font-weight: 500;
  margin-bottom: var(--space-1);
}
.works-hero__title {
  position: relative;
  font-size: clamp(3.5rem, 6.5vw, 10rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 1;
}
/* Project cards */
.works__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: var(--space-4) calc(var(--grid-1) + var(--space-4));
}
.works__grid .project:nth-child(3) { grid-column: 1 / 2; }
.project__link { display: block; }
.project__media {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.project__media .ph,
.project__media img {
  width: 100%;
  height: 100%;
  transition: transform 0.6s var(--ease-out), filter 0.6s var(--ease-out);
}
.project__media img {
  object-fit: cover;
  display: block;
}
.project__link:hover .ph,
.project__link:focus-visible .ph,
.project__link:hover .project__media img,
.project__link:focus-visible .project__media img { transform: scale(1.04); }

/* Grayscale by default, color on hover — only where hover actually exists.
   Touch devices (no hover) keep the images in full color. */
@media (hover: hover) and (pointer: fine) {
  .project__media img { filter: grayscale(1); }
  .project__link:hover .project__media img,
  .project__link:focus-visible .project__media img { filter: grayscale(0); }
}
.project__meta {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  padding-top: var(--space-1);
  font-size: var(--text-sm);
}
.project__title { font-weight: 600; }
.project__tag { color: var(--ink-faint); }

/* ---------- Digital Archive (scroll-driven invert) ---------- */

.archive {
  position: relative;
  height: 850vh;                 /* scroll track length (longer = slower) */
  background: var(--paper);
  z-index: 3;                    /* sits above the works/hero pin layer */
}
.archive__stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  background-color: var(--paper);
  /* vertical grid columns — same hairline as the rest of the site so the
     lines stay one consistent color/opacity/stroke across every section */
  background-image:
    linear-gradient(var(--hairline), var(--hairline)),
    linear-gradient(var(--hairline), var(--hairline)),
    linear-gradient(var(--hairline), var(--hairline)),
    linear-gradient(var(--hairline), var(--hairline));
  background-repeat: no-repeat;
  background-size: 1px 100%, 1px 100%, 1px 100%, 1px 100%;
  background-position: var(--grid-1) 0, var(--grid-2) 0, var(--grid-3) 0, var(--grid-4) 0;
}

/* The black "inverted" layer — a full-viewport dark panel with light grid
   lines, revealed through an expanding circular clip driven by scroll. */
.archive__invert {
  --clip: 0;
  position: absolute;
  inset: 0;
  background-color: #000000;
  background-image:
    /* vertical lines aligned to the page grid */
    linear-gradient(rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.22)),
    linear-gradient(rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.22)),
    linear-gradient(rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.22)),
    linear-gradient(rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.22)),
    /* two horizontal lines — spaced to leave padding around "Digital" */
    linear-gradient(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.16)),
    linear-gradient(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.16));
  background-repeat: no-repeat;
  background-size: 1px 100%, 1px 100%, 1px 100%, 1px 100%, 100% 1px, 100% 1px;
  background-position:
    var(--grid-1) 0, var(--grid-2) 0, var(--grid-3) 0, var(--grid-4) 0,
    /* hug "Digital" with a small, even gap (its ink sits ~35%–71%) */
    0 32%, 0 74%;
  /* 72vmax just covers the viewport at clip:1, so the zoom-out reads almost
     immediately once it begins (less "fully covered" dead time) */
  clip-path: circle(calc(var(--clip) * 72vmax) at 50% 50%);
  will-change: clip-path;
}

/* Headline — outlined "Digital" behind solid "Archive" */
/* Layering inside the stage: invert(0) < Digital(1) < cards(2) < Archive(3) */
.archive__digital {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  /* centering via GSAP xPercent/yPercent so scale tweens don't clobber it */
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  /* vh cap stops the tall italic (esp. the "g" descender) from overflowing
     the horizontal grid lines on wide/short viewports */
  font-size: clamp(7.5rem, min(21vw, 38vh), 25rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.32);
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}
.archive__headline {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  text-align: center;
  pointer-events: none;
}
.archive__title {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 5.5rem);
  letter-spacing: -0.03em;
  line-height: 1;
  color: #f3f3f3;
}

/* Project cards that cycle inside the circle */
.archive__item {
  position: absolute;
  z-index: 2;
  top: 50%; /* vertical centering handled by GSAP yPercent:-50 */
  /* fits inside one content column (col 2 / col 4) with a small inset */
  width: calc(var(--grid-2) - var(--grid-1) - 2rem);
  opacity: 0;
  visibility: hidden;
}
.archive__item--l { left: calc(var(--grid-1) + 1rem); }
.archive__item--r { left: calc(var(--grid-3) + 1rem); }
/* Gray frame / mat around each project shot — tight sides, deeper bottom */
.archive__frame {
  padding: 15px 11px 32px;
  background: #1d1d1d;
  border-radius: 2px;
}
.archive__media {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background:
    repeating-linear-gradient(45deg, transparent 0 11px, rgba(255, 255, 255, 0.04) 11px 22px),
    #0e0e0e;
  color: rgba(255, 255, 255, 0.4);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  overflow: hidden;
}
.archive__media img,
.archive__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.archive__cap {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  padding-top: var(--space-1);
  font-family: var(--font-geist);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.72);
}

/* ---------- About (settles inside the archive stage) ---------- */
/* As the archive's black circle shrinks, the "About" headline straddles it:
   the white word inside the circle + the dark word on the page read as one
   word whose colour flips at the circle's edge. Once the circle is gone, the
   portrait + bio fade in. There is no separate About section — this keeps the
   circle shrinking exactly where it always did. */

/* The two "About" words overlap exactly; only their colour differs. Centred via
   GSAP xPercent/yPercent so the scale tween doesn't clobber positioning. */
.archive__about {
  position: absolute;
  z-index: 0;                    /* base sits below .archive__invert (black) */
  left: 50%;
  top: 50%;                      /* centred on the circle during the shrink */
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  /* this is the SETTLED size; the timeline scales it up ~1.35x during the
     shrink (to match the "Digital" headline) then zooms it back to this. The
     30vh cap keeps it compact on short windows so the portrait has room. */
  font-size: clamp(6.5rem, min(18vw, 30vh), 22rem);
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}
/* dark word on the white page (revealed outside the circle) */
.archive__about--base {
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0.22);
}
/* white word inside the black circle (clipped with .archive__invert) */
.archive__about--invert {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.55);
}

/* Settled About layout: portrait left, bio + Learn More right */
.archive__content {
  position: absolute;
  z-index: 4;                    /* above the (gone) circle once revealed */
  left: 0;
  right: 0;
  top: 40%;
  display: grid;
  grid-template-columns: var(--grid-1) 1fr 1fr 1fr var(--grid-1);
  align-items: start;
  column-gap: var(--space-4);
}
/* invisible scroll target for the (About) nav link — lands on settled About */
.archive__about-anchor {
  position: absolute;
  top: 90%;
  left: 0;
  width: 1px;
  height: 1px;
}
/* Fills column 2 (with inset padding). The width cap is set so the media's
   true 4:5 HEIGHT (= width × 1.25) stays well under the pinned stage height —
   Width cap ⇒ natural height = width × 1.443; 52svh wide ⇒ ~75svh tall. The
   negative top margin pulls the photo up out of the content row (which starts at
   40%) so it begins high under the header instead of below the "About" title. */
.about__figure { grid-column: 2; align-self: start; width: min(100%, 52svh); margin: -26svh 0 0; padding: 0 var(--space-2); }
.about__media {
  display: block;
  width: 100%;
  height: auto;                  /* natural 1000:1443 ratio — full photo, never cropped */
}
.about__body {
  grid-column: 3 / 5;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-top: var(--space-2);
  max-width: 46ch;             /* match the bio's wrap width so the right-aligned
                                  CTA lands on the text block's right edge */
}
.about__lead {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--ink-soft);
  max-width: 46ch;
}
.about__more {
  align-self: flex-end;        /* right edge of the bio text block */
  margin-top: var(--space-3);
  font-family: var(--font-geist);
  font-size: var(--text-sm);
  color: var(--ink);
  text-decoration: none;
}

/* ---------- Contact ---------- */

.contact {
  border-top: 1px solid var(--hairline);
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: var(--grid-1) 1fr 1fr 1fr var(--grid-1);
  grid-template-rows: minmax(80px, 10vh) minmax(160px, 32vh) 1fr minmax(92px, 13vh);
  align-items: start;
  overflow: hidden;
  padding: 0;
}
.contact__object {
  position: absolute;
  z-index: 2;
  /* centered horizontally within its grid column (col 2) */
  left: calc(var(--grid-1) + (var(--grid-2) - var(--grid-1)) / 2);
  transform: translateX(-50%);
  bottom: 59%; /* bottom edge rests just on top of the "L" — no overlap */
  width: 188px;
  aspect-ratio: 1;
  border: 1px solid #bdbdbd;
  display: grid;
  place-items: center;
  background: transparent;
}
.contact__object-label {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  font-family: var(--font-geist);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  padding: 2px 4px 3px;
  background: #d8d8d8;
  color: var(--ink);
}
.contact__handle {
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid #9d9d9d;
  background: var(--paper);
}
.contact__handle--tl { top: -4px; left: -4px; }
.contact__handle--tr { top: -4px; right: -4px; }
.contact__handle--bl { bottom: -4px; left: -4px; }
.contact__handle--br { bottom: -4px; right: -4px; }
.contact__object img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(1);
}
.contact__lead {
  position: absolute;
  z-index: 2;
  left: var(--grid-2);
  top: 20%; /* upper area, well above "Let's Talk" */
  max-width: 320px;
  font-family: var(--font-geist);
  font-size: 15px;
  line-height: 1.18;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--ink);
}
.contact__title {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 60%;
  transform: translate(-50%, -50%);
  width: max-content;
  font-family: var(--font-serif);
  font-size: clamp(9rem, 21vw, 27rem);
  line-height: 0.78;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  color: transparent;
  -webkit-text-stroke: 1.25px #c9c9c9;
  pointer-events: none;
  user-select: none;
}
.contact__links {
  position: relative;
  z-index: 2;
  grid-column: 4;
  grid-row: 4;
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3) var(--space-4);
  margin: 0;
  padding: 0 var(--space-3) var(--space-5);
  font-family: var(--font-geist);
  font-size: 14px;
}
.contact__link { font-weight: 500; }

/* ---------- Footer bar ---------- */

.footer-bar {
  background: #000;
  color: #f3f3f3;
  text-align: center;
  font-family: var(--font-geist);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  padding: 1.15rem var(--gutter);
}
.footer-bar p { margin: 0; }
.footer-bar__mark {
  display: inline-block;
  margin: 0 0.45em;
  vertical-align: middle;
  font-size: 0.85em;
}

/* ---------- Responsive ---------- */

/* ===== Tablet & smaller (≤900px) =====
   All scroll animations are viewport-relative (vh/vw/innerWidth), so they
   carry over automatically — these rules only re-flow the layout to fit. */
@media (max-width: 900px) {
  /* ONE source of truth for the mobile grid: redefine the --grid-* variables
     here and every grid that uses them (page background, Works, Archive) lines
     up. Tighter outer margins (5% / 95%) bracket the content; still 3 equal
     columns, aligned to the gutter the hero content uses. */
  :root {
    --grid-1: 5%;
    --grid-2: 35%;
    --grid-3: 65%;
    --grid-4: 95%;
    /* Slightly darker hairline on small screens — ONE value drives every line
       (page grid, Works grid, section borders, the phone.obj frame) so they all
       match. */
    --hairline: #cdcdcd;
  }

  /* Header → logo left, nav pushed to the right (matches the mobile reference) */
  .site-header { grid-template-columns: auto 1fr; }
  .site-nav { justify-self: end; }
  .site-header__logo {font-size: 15px; }

  /* Hero → full-screen EDITORIAL layout, rebuilt for mobile (not a scaled
     desktop). Name high & wide • intro top-left • Mac large & centred • based
     bottom-right. min-height keeps the section ≥ viewport so the hero pin
     engages at the bottom (a shorter-than-viewport hero pins at scroll 0 and
     offsets the whole layout). */
  .hero {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
  }
  .hero__nav-space { height: clamp(5rem, 9vh, 8rem); }   /* gap below the nav */
  .hero__title-row { text-align: center; padding: 0 var(--gutter); border-bottom: none; }
  /* shrink-to-name so its right edge IS the last letter — the role aligns to it */
  .hero__name-box { display: inline-block; width: auto; }
  .hero__title {
    font-size: clamp(2.6rem, 15.5vw, 7rem);
    line-height: 0.92;
    padding-bottom: var(--space-1);   /* gap: name → line */
    position: relative;
  }
  /* Full-width line under the name. (The name-box only spans the name so the
     role can align to the last letter, so a border there gets cropped — this
     pseudo-element spans the whole viewport instead.) */
  .hero__title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 1px;
    background: var(--hairline);
  }
  .hero__role {
    position: static;
    display: block;
    text-align: right;       /* job title, right-aligned, BELOW the line */
    margin-top: 1;
    white-space: nowrap;
  }
  /* The 3-zone grid fills the rest of the screen */
  .hero__grid {
    flex: 1 1 auto;
    display: grid;
    /* minmax(0,1fr) so a wide Mac can't stretch the grid past the viewport
       (it bleeds/clips instead of dragging the columns + text out of place) */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    margin-top: var(--space-3);
    padding: var(--space-4) var(--gutter) var(--space-5);
    column-gap: 0;
    row-gap: 0;
  }
  .hero__intro {              /* top-left, ~2 columns wide */
    grid-column: 1 / 3;
    grid-row: 1;
    justify-self: start;
    align-self: start;
    text-align: left;
    max-width: none;
    margin: 0;
  }
  .hero__mac {                /* centred focal point, generous space around */
    grid-column: 1 / 4;
    grid-row: 2;
    justify-self: center;
    align-self: start;
    width: min(92vw, 420px);
    margin-top: -1px;   /* ← gap between the intro text and the Mac */
  }
  /* Fade the bottom (keyboard) into the page — lets the bottom text tuck up
     close to the Mac without clutter, so it fits in one screen. Adjust the
     two percentages: 1st = where the fade starts, 2nd = where it's fully gone. */
  .hero__mac img {
    -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 90%);
    mask-image: linear-gradient(to bottom, #000 55%, transparent 90%);
  }
  .hero__based {              /* bottom-right, balances the intro */
    grid-column: 2 / 4;
    grid-row: 3;
    justify-self: end;
    align-self: end;
    text-align: right;
    max-width: none;
    /* gap between the Mac and this text. translateY (not margin) because the
       flexible grid row above would otherwise absorb a margin. More negative =
       closer to the Mac (less gap); 0 or positive = lower (more gap). */
    transform: translateY(-10rem);
  }
  .hero__based::after { right: 0; left: auto; transform: translateX(50%); }

  /* Works → single column */
  .works__grid {
    grid-template-columns: 1fr;
    /* side padding around the project cards — raise/lower to taste */
    padding-left: var(--space-4);
    padding-right: var(--space-4);
    /* gap between the "Works" title and the projects. MORE negative = projects
       move UP, closer to the title (less gap); less negative / positive = more gap. */
    margin-top: -1rem;
  }
  .works__grid .project:nth-child(3) { grid-column: auto; }
  .works-hero__outline { font-size: clamp(5rem, 26vw, 14rem); }

  /* Archive → smaller decorative headlines, centred + wider project cards,
     stacked About so it fits the narrower stage. Circle/invert/straddle and
     the whole scroll timeline are unchanged. */
  .archive__digital { font-size: clamp(4rem, 17vw, 9rem); }
  .archive__title { font-size: clamp(2rem, 8vw, 4rem); }
  .archive__about { font-size: clamp(4rem, 20vw, 8rem); }
  .archive__item,
  .archive__item--l,
  .archive__item--r { left: 18vw; width: 64vw; }
  /* side-by-side: image on the LEFT, bio text + CTA on the RIGHT */
  .archive__content {
    grid-template-columns: 38% minmax(0, 1fr);   /* image | text */
    column-gap: var(--space-2);                  /* gap between image & text */
    row-gap: var(--space-3);
    align-items: start;
    padding: 0 var(--gutter);
    top: 42%;                                    /* gap below the "About" title (centers cluster on tablet) */
  }
  .about__figure { grid-column: 1; grid-row: 1; width: 100%; padding: 0; margin: 0; }
  .about__body { grid-column: 2; grid-row: 1; padding-top: 0; }
  .about__lead { font-size: 20px; line-height: 1.5; }   /* larger bio text on tablet */
  .about__more { margin-top: var(--space-3); }   /* right-aligned via base align-self */

  /* Contact → editorial split (matches the reference): object top-left, lead
     text top-right on the same row, "Let's Talk" across the middle, and the
     links on a single bottom row aligned to the right. */
  .contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;            /* content-sized rows — compact, so the
                                            footer sits right after the content */
    align-items: start;
    row-gap: var(--space-4);
    min-height: auto;
    padding: 4rem var(--gutter) var(--space-4);
  }
  .contact__object {
    grid-column: 1;
    grid-row: 1;
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    justify-self: start;
    width: min(42vw, 200px);
    margin: 0;
  }
  .contact__lead {
    grid-column: 2;
    grid-row: 1;
    position: static;
    left: auto;
    top: auto;
    justify-self: end;
    align-self: center;
    max-width: 22ch;
    text-align: right;
  }
  .contact__title {
    grid-column: 1 / -1;
    grid-row: 2;
    position: static;
    left: auto;
    top: auto;
    transform: none;
    width: auto;
    justify-self: center;
    align-self: center;       /* centered in the flexible middle row */
    font-size: clamp(4.5rem, 24vw, 11rem);
    line-height: 0.85;
  }
  .contact__links {
    grid-column: 1 / -1;
    grid-row: 3;
    position: static;
    justify-self: end;
    align-self: end;          /* sits at the bottom of the section, above the footer */
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: var(--space-4);
    padding: 0;
  }

  /* Shorter black footer bar on small screens — extra bottom padding clears
     the phone browser's bottom toolbar / home indicator (safe-area). */
  .footer-bar {
    padding: 0.6rem var(--gutter) calc(0.6rem + env(safe-area-inset-bottom));
    font-size: 13px;
  }
}

/* ===== Phones (≤600px) ===== */
@media (max-width: 600px) {
  .site-header { padding: var(--space-2) var(--gutter); }
  .site-nav ul { gap: 1.1rem; }

  .hero__title { font-size: clamp(2.4rem, 15.5vw, 5rem); }
  .hero__intro, .hero__based { font-size: 0.95rem; }

  /* tighter block so the title sits closer to the section above + the projects */
  .works-hero { min-height: clamp(220px, 38svh, 320px); }
  .works-hero__outline { font-size: clamp(3.5rem, 33vw, 9rem); }
  .works-hero__years { font-size: 0.8125rem; margin-bottom: -1px; }   /* "2022-2025" */
  .works-hero__title { font-size: clamp(2.2rem, 10vw, 4rem); }   /* "Works" */

  /* Archive on phones — shorter scroll track so the cards (and the whole
     sequence) show up sooner / need less scrolling. Lower = appears even
     earlier & faster; higher = slower. */
  .archive { height: 440vh; }
  /* headlines fit the width, cards near-full-width */
  .archive__digital { font-size: clamp(3.5rem, 35vw, 11rem); }   /* "Digital" fills the width */
  .archive__about { font-size: clamp(4rem, 27vw, 7.5rem); }   /* bigger "About" title */
  .archive__title { font-size: clamp(1.8rem, 13vw, 3.6rem); }
  /* frame the "Digital Archive" cluster with two horizontal lines (top/bottom) */
  .archive__invert {
    background-position:
      var(--grid-1) 0, var(--grid-2) 0, var(--grid-3) 0, var(--grid-4) 0,
      0 43%, 0 59.5%;
  }
  .archive__item,
  .archive__item--l,
  .archive__item--r { left: 12vw; width: 76vw; }
  /* Track the JS-settled "About" title with a constant gap on every height.
     Both the title and this % now reference the same stage height (svh): the
     title settles with its centre at 32% of the stage, and its half-height is
     ≈13.5vw (font is 27vw), so content sits just under the title bottom. */
  .archive__content { top: calc(38% + 13.5vw + 0.5rem); }
  .about__figure { width: 100%; }   /* fills its column in the side-by-side */
  .about__lead { font-size: 15px; line-height: 1.45; max-width: none; }
  .about__body { gap: var(--space-2); padding-top: 0; }

  .contact__title { font-size: clamp(3.5rem, 26vw, 7rem); }
  .contact__links { flex-direction: row; justify-content: flex-end; gap: var(--space-3); }
}

/* Very short phones (e.g. iPhone SE) — tighten gaps so portrait, text and the
   "Learn More" link fit. Threshold kept LOW (≤620px) so it only targets genuinely
   tiny screens and never flips on normal phones whose viewport height oscillates
   as the browser toolbar collapses/expands during scroll. Font size is left
   untouched here (stays 15px) so the bio never visibly resizes mid-scroll. */
@media (max-width: 600px) and (max-height: 620px) {
  .archive__content { row-gap: var(--space-1); }
  .about__more { margin-top: var(--space-2); }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .intro-overlay { display: none; }
  /* No scroll timeline runs — collapse the archive/About to a static state */
  .archive { height: auto; }
  .archive__stage { position: static; height: auto; min-height: 100svh; padding-bottom: var(--space-6); }
  .archive__invert, .archive__digital, .archive__headline, .archive__item { display: none; }
  .archive__about { position: static; display: block; text-align: center; opacity: 1 !important; visibility: visible !important; margin: var(--space-6) 0 var(--space-5); }
  .archive__about--invert { display: none; }
  .archive__content { position: static; opacity: 1 !important; visibility: visible !important; }
}

/* ==========================================================================
   Case study page (/case-study/<slug>)
   Editorial layout: title • tagline • meta row • full-bleed cover • sections.
   Reuses the global grid lines, header, contact and footer.
   ========================================================================== */

.cs {
  padding-top: clamp(7rem, 16vh, 11rem);   /* clear the fixed header */
}

/* ---- Hero: breadcrumb, title, tagline, meta ---- */
.cs-hero {
  padding: 0 var(--grid-1);
}
.cs-breadcrumb {
  font-family: var(--font-geist);
  font-size: var(--text-sm);
  color: var(--ink-faint);
  letter-spacing: 0;
  margin-bottom: var(--space-4);
}
.cs-breadcrumb a { color: var(--ink-faint); transition: color var(--dur-fast) var(--ease-out); }
.cs-breadcrumb a:hover { color: var(--ink); }
.cs-breadcrumb .cs-breadcrumb__sep { margin: 0 0.5em; }
.cs-breadcrumb .cs-breadcrumb__here { color: var(--ink); }

.cs-title {
  font-size: clamp(2.6rem, 6vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 600;
}
.cs-tagline {
  margin-top: var(--space-2);
  max-width: 60ch;
  color: var(--ink-soft);
  font-family: var(--font-geist);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.45;
}

.cs-meta {
  margin-top: var(--space-5);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  max-width: 64ch;
}
.cs-meta__label {
  display: block;
  font-family: var(--font-geist);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.5em;
}
.cs-meta__value {
  font-family: var(--font-geist);
  font-size: var(--text-sm);
  color: var(--ink);
}

/* ---- Full-width cover ---- */
.cs-cover {
  margin: clamp(2.5rem, 6vh, 5rem) 0 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(0, 0, 0, 0.035) 14px 28px),
    #dedede;
  color: var(--ink-faint);
  font-family: var(--font-geist);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
}
.cs-cover img { width: 100%; height: auto; display: block; }
/* Crop variant — force a 16:9 banner (center) instead of the image's natural ratio.
   figure.* specificity beats the later `.cs-cover:has(img){aspect-ratio:auto}` rule. */
figure.cs-cover--crop:has(img) { aspect-ratio: 16 / 9; overflow: hidden; position: relative; }
figure.cs-cover--crop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
/* When the cover holds a real image, drop the fixed ratio + placeholder bg so
   the image shows in full (uncropped) at every width. */
.cs-cover:has(img) { aspect-ratio: auto; background: none; overflow: visible; }

/* ---- Body: stacked content sections ---- */
.cs-body {
  --cs-gap: clamp(3rem, 7vh, 6rem);
  padding: clamp(3.5rem, 9vh, 7rem) var(--grid-1) clamp(4rem, 10vh, 8rem);
  display: flex;
  flex-direction: column;
  gap: var(--cs-gap);
}

/* Two-up: sticky heading on the left, prose on the right */
.cs-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  column-gap: var(--space-4);
  row-gap: var(--space-3);
  align-items: start;
}
/* Full-bleed rule after each section, centred in the gap to the next block */
.cs-section::after {
  content: "";
  position: absolute;
  left: calc(50% - 50vw);
  width: 100vw;
  bottom: calc(-0.5 * var(--cs-gap));
  height: 1px;
  background: var(--hairline);
}
/* The last section sits right above the .cs-next nav, which already draws its
   own top rule — drop this one so the two don't double up. */
.cs-section:last-of-type::after { display: none; }
.cs-section__head {
  font-family: var(--font-geist);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  position: sticky;
  top: clamp(5rem, 12vh, 8rem);
}
.cs-section__body > * + * { margin-top: var(--space-2); }
.cs-section__body p {
  font-family: var(--font-geist);
  font-size: clamp(0.9375rem, 0.9rem + 0.25vw, 1.0625rem);
  line-height: 1.6;
  color: var(--ink);
  max-width: 62ch;
}
.cs-section__body .cs-lede {
  font-size: clamp(1.4rem, 2.4vw, 2.25rem);
  line-height: 1.32;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-weight: 400;
}

/* In-body image block (spans full content width) */
.cs-figure {
  margin: 0;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(0, 0, 0, 0.035) 12px 24px),
    #e2e2e2;
  color: var(--ink-faint);
  font-family: var(--font-geist);
  font-size: var(--text-xs);
}
.cs-figure img { width: 100%; height: 100%; object-fit: cover; }

/* Outcome metrics */
.cs-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-2);
}
.cs-stat__num {
  display: block;
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: -0.03em;
  line-height: 1;
  font-weight: 600;
}
.cs-stat__label {
  display: block;
  margin-top: 0.5em;
  font-family: var(--font-geist);
  font-size: var(--text-xs);
  color: var(--ink-faint);
}

/* Next / back navigation at the foot of the study */
.cs-next {
  position: relative;
  margin-top: clamp(2rem, 5vh, 4rem);
  padding-top: var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  font-family: var(--font-geist);
  font-size: var(--text-sm);
}
/* Full-bleed divider — extends edge to edge instead of being cropped to the
   padded content column (.cs-body has var(--grid-1) side padding). */
.cs-next::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(50% - 50vw);
  width: 100vw;
  height: 1px;
  background: var(--hairline);
}
.cs-next__label { color: var(--ink-faint); }

@media (max-width: 900px) {
  .cs-hero, .cs-body { padding-left: var(--gutter); padding-right: var(--gutter); }
  .cs-meta { grid-template-columns: 1fr 1fr; row-gap: var(--space-3); }
  .cs-section { grid-template-columns: 1fr; }
  .cs-section__head { position: static; }
  .cs-cover { aspect-ratio: 4 / 3; }
}

@media (max-width: 600px) {
  .cs-meta { grid-template-columns: 1fr 1fr; }
  .cs-stats { grid-template-columns: 1fr; gap: var(--space-2); }
  .cs-cover { aspect-ratio: 3 / 4; }
}

/* ==========================================================================
   "Read More" pill cursor — follows the pointer over Works project cards
   ========================================================================== */
.cursor-pill {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  pointer-events: none;
  will-change: transform;
}
.cursor-pill__inner {
  display: block;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  transition: opacity 0.25s var(--ease-out), transform 0.3s var(--ease-out);
  padding: 0.3em 0.8em;
  border-radius: 999px;
  background: var(--ink);          /* gray pill */
  color: #fff;
  font-family: var(--font-geist);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  user-select: none;
}
.cursor-pill.is-visible .cursor-pill__inner {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
/* Hide the system cursor over the cards only when the pill is active */
.cursor-pill-on .works .project__link,
.cursor-pill-on .works .project__link * { cursor: none; }

/* ==========================================================================
   Case study — long-form content elements
   ========================================================================== */
/* 4-field meta (Role / Timeline / Brand / Scope) */
.cs-meta--wide { max-width: none; }
.cs-meta__wide { grid-column: 1 / -1; }

/* Intro statement between hero and cover */
.cs-intro { padding: clamp(3rem, 7vh, 5rem) var(--grid-1) 0; }
.cs-intro p {
  font-family: var(--font-geist);
  font-size: clamp(1.1rem, 1rem + 0.45vw, 1.375rem);
  line-height: 1.45;
  letter-spacing: -0.005em;
  color: var(--ink);
  max-width: 58ch;
}

/* Bold lead-ins + lists inside a section body */
.cs-section__body strong { font-weight: 600; color: var(--ink); }
.cs-section__body .cs-list,
.cs-section__body .cs-pillars {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.cs-section__body .cs-list li,
.cs-section__body .cs-pillars li {
  font-family: var(--font-geist);
  font-size: clamp(0.9375rem, 0.9rem + 0.25vw, 1.0625rem);
  line-height: 1.6;
  color: var(--ink);
  max-width: 62ch;
}

/* Big serif pull line (the brand promise) */
.cs-pull {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: var(--space-2) 0 !important;
  max-width: none !important;
}

/* Before / After repositioning block */
.cs-shift {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin: var(--space-3) 0;
  padding: var(--space-3) 0;
}
/* Full-bleed top + bottom rules (extend edge to edge, not just the column).
   left/right -100vw overshoot is clipped by the body's overflow-x: clip. */
.cs-shift::before,
.cs-shift::after {
  content: "";
  position: absolute;
  left: -100vw;
  right: -100vw;
  height: 1px;
  background: var(--hairline);
}
.cs-shift::before { top: 0; }
.cs-shift::after { bottom: 0; }
.cs-shift__label {
  display: block;
  font-family: var(--font-geist);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.6em;
}
.cs-shift p {
  font-family: var(--font-geist);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.1875rem) !important;
  line-height: 1.45;
  margin: 0 !important;
}

@media (max-width: 600px) {
  .cs-shift { grid-template-columns: 1fr; gap: var(--space-2); }
}

/* Case study — metrics table (Snoozley results) */
.cs-metrics {
  margin-top: var(--space-3);
  border-top: 1px solid var(--hairline);
}
.cs-metric {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--hairline);
}
.cs-metric dt {
  font-family: var(--font-geist);
  font-size: var(--text-sm);
  color: var(--ink-soft);
}
.cs-metric dd {
  margin: 0;
  font-size: clamp(1.1rem, 0.95rem + 0.5vw, 1.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 600;
  white-space: nowrap;
}

/* Snoozley results — small proof image in the left column, beside the text */
.cs-proof { margin: 0; }
.cs-proof img {
  width: 100%;
  height: auto;
  border: 1px solid var(--hairline);
}
.cs-proof figcaption {
  margin-top: var(--space-1);
  font-family: var(--font-geist);
  font-size: var(--text-xs);
  color: var(--ink-faint);
}
@media (min-width: 901px) {
  /* 3-col grid: label (1) · text (2–3) on top; below, the GIF spans columns 1–2
     and the metrics table sits beside it in column 3. */
  .cs-section--proof { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cs-section--proof .cs-section__head { grid-column: 1; grid-row: 1; }
  .cs-section--proof .cs-section__body { grid-column: 2 / 4; grid-row: 1; }
  .cs-section--proof .cs-proof {
    grid-column: 1 / 3;
    grid-row: 2;
    align-self: start;
    margin-top: var(--space-4);
  }
  .cs-section--proof .cs-metrics {
    grid-column: 3;
    grid-row: 2;
    align-self: start;
    margin-top: var(--space-4);
  }
}
@media (max-width: 900px) {
  .cs-proof { margin-top: var(--space-3); }   /* stacks below the text on mobile */
}

/* Two-up render grid (Snoozley art direction) */
.cs-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.cs-grid-2 img { width: 100%; height: auto; display: block; }
@media (max-width: 600px) {
  .cs-grid-2 { grid-template-columns: 1fr; }
}

/* Creative section — testimonial image spans 2 columns, copy sits beside it */
.cs-creative-img { margin: 0; }
.cs-creative-img img { width: 100%; height: auto; display: block; }
@media (min-width: 901px) {
  /* small ad on the left (capped column), copy fills the rest on the right */
  .cs-section--creative { grid-template-columns: minmax(0, clamp(200px, 24vw, 350px)) 1fr; }
  .cs-section--creative .cs-section__head { grid-column: 1; grid-row: 1; }
  .cs-section--creative .cs-creative-img {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    margin-top: var(--space-3);
  }
  .cs-section--creative .cs-section__body {
    grid-column: 2;
    grid-row: 2;          /* sit in the image row so the copy aligns with the image top */
    align-self: start;
    margin-top: var(--space-3);
  }
}
@media (max-width: 900px) {
  .cs-creative-img { margin-top: var(--space-3); }
}


/* Feed Smart — stacked process slides + full-width identity (logo gif) */
.cs-stack { display: grid; gap: var(--space-3); }
.cs-stack img { width: 100%; height: auto; display: block; }
.cs-identity { margin: 0; }
.cs-identity img { width: 100%; height: auto; display: block; }

/* Three-up product grid (Feed Smart in-market) — all images cropped to one
   shared portrait ratio so the row lines up perfectly height-wise. */
.cs-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.cs-grid-3 img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}
@media (max-width: 600px) { .cs-grid-3 { grid-template-columns: 1fr; } }

/* Feed Smart — product grid promoted to the hero position; First Atta photo
   used as the In-Market shot. */
.cs-grid-3--hero { margin-top: clamp(2.5rem, 6vh, 5rem); padding-inline: var(--gutter); }
.cs-photo { margin: 0; }
.cs-photo img { width: 100%; height: auto; display: block; }
/* A single inline plate at 16:9, no placeholder bg (image is pre-cropped to 16:9). */
.cs-figure--photo { aspect-ratio: 16 / 9; background: none; }
