:root {
  --bg: #ffffff;
  --text: #151515;
  --muted: #666666;
  --pill: #ededed;
  --pill-active: #0a0a0a;
  --pill-active-text: #ffffff;
  --media: #e4e4e7;
  --toggle: #e0e0e0;
  --knob: #ffffff;
  --accent: #a7f175;
  --link-hover: #000000;
  /* Like Ruby's site, the layout scales with the window: 2% side margins, content starting at ~17%. */
  --sidebar-w: max(180px, calc(15.1vw - 10px)); /* 207px at 1440 */
  --gutter: 2vw; /* 29px at 1440 */
}
:root[data-theme="dark"] {
  --bg: #0f0f10;
  --text: #f2f2f2;
  --muted: #9a9a9a;
  --pill: #262628;
  --pill-active: #f2f2f2;
  --pill-active-text: #0f0f10;
  --media: #232326;
  --toggle: #2e2e31;
  --knob: #4a4a4e;
  --accent: #a7f175;
  --link-hover: #a7f175; /* lime on the dark background */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
#work { scroll-margin-top: 30px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 50;
  background: var(--pill-active); color: var(--pill-active-text);
  padding: 8px 14px; border-radius: 14px; font-size: 14px;
}
.skip-link:focus { top: 12px; }

/* ---------- Layout ---------- */
.page {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  column-gap: 10px;
  padding: 20px var(--gutter);
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky;
  top: 20px;
  height: calc(100vh - 40px);
  max-height: 900px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 20px 20px 5px;
}
.logo {
  display: inline-flex; align-items: baseline;
  font-family: "Manrope", sans-serif; font-weight: 500;
  font-size: 40px; line-height: 1; letter-spacing: -0.02em;
  color: var(--text);
}
.logo .smile {
  display: inline-block; width: 22px; height: 12px; margin: 0 1px;
  border-bottom: 3px solid currentColor; border-radius: 0 0 14px 14px;
  transform: translateY(2px);
}
.bio {
  margin: 22px 0 0;
  font-size: 17px; line-height: 27px; font-weight: 500;
}
.nav { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 14px;
  background: var(--pill);
  font-size: 14px; line-height: 19.6px; font-weight: 500;
  transition: background-color .2s ease, color .2s ease;
}
.pill:hover { background: color-mix(in srgb, var(--pill) 70%, var(--text) 12%); }
.pill[aria-current="page"], .pill[aria-current="true"] { background: var(--accent); color: #151515; } /* "true" = inside that section, e.g. Work on a case study */

/* External links, bottom left above the theme switch (open in a new tab) */
.links { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ext {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; line-height: 19.6px; font-weight: 500; /* same as the pills */
  text-underline-offset: 3px;
  transition: color .2s ease;
}
.ext:hover, .ext:focus-visible { color: var(--link-hover); text-decoration: underline; }
.ext-icon { flex: none; }
.sidebar-foot { display: flex; flex-direction: column; gap: 10px; }

.theme-toggle {
  position: relative; width: 80px; height: 48px; padding: 0;
  border: 0; border-radius: 24px; background: var(--toggle); cursor: pointer;
}
.theme-toggle .knob {
  position: absolute; top: 6px; left: 6px; width: 36px; height: 36px; border-radius: 50%;
  background: var(--knob); box-shadow: 0 4px 16px rgba(0,0,0,.15);
  display: grid; place-items: center;
  transition: transform .25s ease, background-color .25s ease;
}
.theme-toggle .knob::after {
  content: ""; width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--media);
}
:root[data-theme="dark"] .theme-toggle .knob { transform: translateX(32px); }

/* ---------- Top bar (tablet / mobile) ---------- */
.topbar { display: none; }

/* ---------- Main ---------- */
main { min-width: 0; }
.intro {
  display: flex; justify-content: flex-end; align-items: flex-start;
  padding-top: 22px;
  min-height: 600px;
}
.intro h1 {
  margin: 0;
  /* 59% of the content width keeps the headline ~30% wider than a work image (45% of the row); never below 690px unless the screen is narrower */
  width: max(59%, min(690px, 100%));
  font-family: "Inter", sans-serif; font-weight: 400;
  font-size: clamp(30px, 3.65vw, 96px); /* grows with the screen so line breaks stay the same */
  line-height: 1.17; letter-spacing: -0.02em;
}
.intro h1 em {
  font-style: italic;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px;
}
.intro h1 .kw {
  background: var(--accent); color: var(--text);
  padding: 0 .12em; margin: 0 -.04em; border-radius: 6px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
:root[data-theme="dark"] .intro h1 .kw { background: none; color: var(--accent); padding: 0; margin: 0; }
.intro h1 strong { font-weight: 600; }
.intro h1 .kw:empty { padding: 0; margin: 0; }
.intro h1 .caret {
  display: inline-block; width: 3px; height: .9em; margin-left: 3px;
  vertical-align: -.08em; background: currentColor;
  animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .intro h1 .caret { display: none; } }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Work: case study list */
.work-label { display: flex; margin: 0 0 52px; }
/* Scroll cue (the heading is for screen readers only): a long, thin arrow with no box.
   Clicking it scrolls to #work like the "Work" nav link. It drifts gently until the visitor scrolls.
   Inline SVG in currentColor, so it follows the theme without a filter. */
.scroll-cue {
  display: inline-flex; padding: 8px 12px; margin: -8px -12px; /* bigger hit area, same visual position */
  color: var(--text);
  transition: color .2s ease;
}
.scroll-cue:hover { color: var(--muted); }
.scroll-cue svg { display: block; animation: scroll-cue 2.8s ease-in-out infinite; }
.scroll-cue:hover svg { animation: none; transform: translateY(6px); transition: transform .3s ease; }
@keyframes scroll-cue {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(8px); }
}
.has-scrolled .scroll-cue svg { animation: none; }
@media (prefers-reduced-motion: reduce) { .scroll-cue svg { animation: none; } }
.cases { display: flex; flex-direction: column; gap: 56px; }
.case {
  display: grid;
  grid-template-columns: minmax(0, 569fr) minmax(0, 470fr); /* text and image grow together */
  column-gap: 30px; align-items: start;
}
.case-eyebrow {
  margin: 0 0 10px;
  font-size: 13px; line-height: 18px; font-weight: 400; color: var(--muted);
  text-transform: uppercase; letter-spacing: .02em;
}
.case-title {
  margin: 0;
  font-family: "Inter", sans-serif; font-weight: 500;
  font-size: 36px; line-height: 1.1; letter-spacing: -0.02em; /* same h2 style as .section-heading */
}
.case-body { margin: 20px 0 0; font-size: 17px; line-height: 27px; font-weight: 400; }
.case-media { aspect-ratio: 470 / 380; border-radius: 8px; background: var(--media); }
/* The title is the link; its ::after stretches over the whole card so the image and text are clickable too. */
.case { position: relative; }
.case-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.case-link:focus-visible { outline: none; }
.case:has(.case-link:focus-visible) { outline: 2px solid #3b82f6; outline-offset: 8px; border-radius: 8px; }
.tags { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
/* Tags are metadata, not buttons: no fill, hairline outline, squarer corners and muted text,
   so they don't echo the filled, fully rounded nav pills. */
.tags li {
  border: 1px solid color-mix(in srgb, var(--text) 16%, transparent);
  border-radius: 4px;
  padding: 1px 8px;
  color: var(--muted);
  font-family: "Inter", sans-serif; font-weight: 400;
  font-size: 12px; line-height: 19.2px; letter-spacing: -0.02em;
}

/* Testimonials */
.testimonials { margin-top: 160px; }
.section-eyebrow { margin: 0 0 8px; font-size: 16px; line-height: 34px; font-weight: 500; color: var(--muted); }
.section-heading {
  margin: 0 0 48px;
  font-family: "Inter", sans-serif; font-weight: 500;
  font-size: 36px; line-height: 1.1; letter-spacing: -0.02em;
}
.quotes { columns: 2; column-gap: 30px; }
.quote {
  break-inside: avoid; margin: 0 0 30px;
  padding: 32px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--pill);
}
.quote--tint { background: color-mix(in srgb, var(--accent) 22%, var(--bg)); border-color: transparent; }
.quote--grey { background: color-mix(in srgb, var(--pill) 65%, var(--bg)); border-color: transparent; }
:root[data-theme="dark"] .quote--tint { background: color-mix(in srgb, var(--accent) 10%, var(--bg)); }
.quote-mark {
  display: block; height: 22px; margin-bottom: 16px;
  font-family: "Inter", sans-serif; font-weight: 600; font-size: 44px; line-height: 1;
}
.quote blockquote { margin: 0; }
.quote blockquote p { margin: 0 0 14px; font-size: 17px; line-height: 27px; font-weight: 400; }
.quote blockquote p:last-child { margin-bottom: 0; }
.quote mark { background: none; color: inherit; font-weight: 600; }
.quote figcaption { display: flex; align-items: center; gap: 12px; margin-top: 24px; }
.avatar {
  flex: 0 0 44px; height: 44px; border-radius: 50%; background: var(--text); color: var(--bg);
  display: grid; place-items: center; font-size: 13px; font-weight: 600; letter-spacing: .02em;
}
.quote .who { display: flex; flex-direction: column; font-size: 15px; line-height: 1.35; }
.quote .who b { font-weight: 600; }
.quote .who span { font-size: 14px; color: var(--muted); }

/* About page */
.about-page { padding-bottom: 120px; }
.about { padding-top: 30px; }
.about-intro { display: grid; grid-template-columns: minmax(0, 48.6vw) minmax(0, 20.2vw); justify-content: space-between; column-gap: 40px; } /* text ~49%, photo ~20% of the window */
.about-text p { margin: 0 0 20px; font-size: 17px; line-height: 27px; font-weight: 400; }
.about-text a { text-decoration: underline; text-underline-offset: 2px; }
.portrait { display: block; width: 100%; height: 300px; object-fit: cover; object-position: center 20%; border-radius: 8px; background: var(--media); }
@media (min-width: 1440px) {
  .about-intro { grid-template-columns: minmax(0, 48.6vw) minmax(0, 18.6vw); }
  .portrait { height: 405px; } /* 268 x 405 at 1440, wider (same height) on bigger screens */
}

.facts {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); /* Ruby's 6-column grid */
  column-gap: 20px; row-gap: 40px;
  margin-top: 152px;
}
.fact-label {
  display: inline-block; margin: 0 0 14px;
  padding: 0 12px; border-radius: 14px; background: var(--pill);
  font-size: 17px; line-height: 27px; font-weight: 500;
}
.facts ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.facts li { font-size: 17px; line-height: 27px; font-weight: 400; }
@media (min-width: 1024px) and (max-width: 1199px) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } } /* small laptops: 6 columns get too narrow */

/* Off-screen */
.offscreen { margin-top: 140px; }
.offscreen-title { margin: 0 0 16px; font-size: 18px; line-height: 27px; font-weight: 400; }
.ticker { display: flex; gap: 20px; overflow: hidden; margin-right: calc(var(--gutter) * -1); } /* bleeds to the window edge */
.ticker > div { flex: 0 0 300px; height: 400px; border-radius: 8px; background: var(--media); }

.outro { display: flex; justify-content: flex-end; padding: 120px 0 40px; }
/* Loom-style video bubble: round webcam frame with a soft shadow and a play badge */
.bubble {
  position: relative; display: grid; place-items: center;
  width: 200px; height: 200px; border-radius: 50%; overflow: hidden;
  background: var(--media);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .14), 0 2px 6px rgba(0, 0, 0, .08);
}
.bubble img, .bubble video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.03); /* trims the white edge of the screenshot */
  transition: transform .4s ease;
}
.bubble:hover img { transform: scale(1.07); }
.bubble-play {
  position: absolute; left: 50%; bottom: 18px; margin-left: -20px; /* low, on the jumper, so it never covers the face */
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%; padding-left: 3px;
  background: rgba(255, 255, 255, .88); color: #151515;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform .25s ease;
}
.bubble:hover .bubble-play { transform: scale(1.08); }

/* ---------- Case study page ---------- */
.cs { padding-bottom: 160px; }
.cs-pager { display: flex; justify-content: flex-end; padding-top: 10px; margin-bottom: 32px; }
.cs-next {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 8px 0;
  font-size: 13px; line-height: 18px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .14em;
  transition: color .2s ease;
}
.cs-next svg { transition: transform .3s ease; }
.cs-next:hover { color: var(--muted); }
.cs-next:hover svg { transform: translateX(6px); }

/* Project info: summary ~53% of the content width, facts ~39%, like the case rows on the home page */
.cs-info {
  display: grid;
  grid-template-columns: minmax(0, 615fr) minmax(0, 459fr);
  justify-content: space-between; column-gap: 7.8%;
  margin-bottom: 64px;
}
.cs-title {
  margin: 0;
  font-family: "Inter", sans-serif; font-weight: 500;
  font-size: 36px; line-height: 1.15; letter-spacing: -0.02em; /* same h2 style as .case-title */
}
.cs-body { margin: 20px 0 0; font-size: 17px; line-height: 27px; font-weight: 400; }
.cs-body + .cs-body { margin-top: 12px; }
.cs-outcomes { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cs-outcomes li { position: relative; padding-left: 20px; font-size: 17px; line-height: 27px; font-weight: 400; }
.cs-outcomes li::before {
  content: ""; position: absolute; left: 2px; top: 11px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 18%, transparent);
}

.cs-meta { margin: 0; }
.cs-meta > div {
  display: grid; grid-template-columns: 129px minmax(0, 1fr); column-gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  font-size: 14px; line-height: 21px; font-weight: 500;
}
.cs-meta > div:first-child { padding-top: 6px; } /* first row lines up with the headline's cap height */
.cs-meta > div:last-child { border-bottom: 0; }
.cs-meta dt { color: var(--muted); }
.cs-meta dd { margin: 0; }
.cs-meta ul { list-style: none; margin: 0; padding: 0; }

/* Media placeholders: swap the div for <img>/<video> with the same classes */
.media-ph {
  display: grid; place-items: center; width: 100%;
  border-radius: 8px; background: var(--media);
  color: var(--muted); font-size: 14px; line-height: 21px; font-weight: 400;
}
.media-ph--soft { background: color-mix(in srgb, var(--pill) 65%, var(--bg)); } /* same tint as .quote--grey */
img.cs-hero, video.cs-hero, .cs-figure img, .cs-figure video { display: block; width: 100%; height: auto; object-fit: cover; border-radius: 8px; }
.cs-hero { aspect-ratio: 1165 / 333; }

/* Story sections: one centred reading column, ~66% of the content width (772px at 1440) */
.cs-section { max-width: 66.3%; margin: 0 auto; }
.cs-hero + .cs-section { margin-top: 80px; }
.cs-section + .cs-section { margin-top: 160px; }
.cs-heading {
  margin: 0;
  font-family: "Inter", sans-serif; font-weight: 500;
  font-size: 26px; line-height: 1.3; letter-spacing: -0.02em;
}
.cs-figure { margin: 48px 0 0; }
.cs-figure figcaption { margin-top: 12px; font-size: 14px; line-height: 21px; color: var(--muted); }
.cs-video { width: 50%; aspect-ratio: 16 / 9; }
.cs-visual { aspect-ratio: 772 / 440; }

.cs-scope { display: flex; flex-direction: column; gap: 16px; margin-top: 48px; }
.scope-card {
  padding: 28px 30px; border-radius: 8px;
  background: color-mix(in srgb, var(--pill) 65%, var(--bg)); /* same tint as .quote--grey */
}
.scope-card h3 { margin: 0 0 6px; font-size: 17px; line-height: 27px; font-weight: 600; }
.scope-card p { margin: 0; font-size: 17px; line-height: 27px; font-weight: 400; color: var(--muted); }

/* ---------- Theme switch: circular reveal ----------
   site.js wraps the switch in a view transition: the old theme stays still and the new one grows
   as a circle from the toggle (--theme-x/y) to the farthest corner (--theme-r). */
::view-transition-old(root) { animation: none; }
::view-transition-new(root) { animation: theme-reveal .52s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes theme-reveal {
  from { clip-path: circle(0 at var(--theme-x, 50%) var(--theme-y, 50%)); }
  to   { clip-path: circle(var(--theme-r, 150vmax) at var(--theme-x, 50%) var(--theme-y, 50%)); }
}
.theme-switching, .theme-switching *:not(.knob) { transition: none !important; } /* the knob still slides */

/* ---------- Page transition: curtain ----------
   Following an internal link covers the page in the text colour (near-black, or near-white in dark mode)
   with the logo small in the centre, then the next page is revealed. site.js adds .curtain-out before
   leaving; the inline <head> script adds .curtain-in so the next page paints already covered. */
.curtain {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--text); color: var(--bg);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .5s cubic-bezier(.4, 0, .2, 1) .12s, visibility 0s linear .62s; /* reveal */
}
.curtain .logo {
  color: inherit; font-size: 28px;
  opacity: 0; transform: translateY(4px);
  transition: opacity .25s ease, transform .25s ease;
}
.curtain-in .curtain, .curtain-out .curtain { opacity: 1; visibility: visible; pointer-events: auto; }
.curtain-out .curtain { transition: opacity .35s cubic-bezier(.4, 0, .2, 1); } /* cover */
.curtain-in .curtain .logo, .curtain-out .curtain .logo { opacity: 1; transform: none; }
.curtain-out .curtain .logo { transition: opacity .3s ease .15s, transform .3s ease .15s; }

/* ---------- Tablet ---------- */
@media (max-width: 1023px) {
  :root { --gutter: 38px; }
  .page { display: block; padding-top: 0; }
  .sidebar { display: none; }

  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 20;
    height: 74px; margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter);
    background: var(--bg);
  }
  .topbar .logo { font-size: 32px; }
  /* Burger: a filled circle, big enough to hit with a thumb */
  .menu-btn {
    width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
    display: grid; place-content: center; gap: 5px;
    background: var(--pill-active); color: var(--pill-active-text);
    transition: transform .2s ease;
  }
  .menu-btn:active { transform: scale(.94); }
  .menu-btn span { display: block; width: 20px; height: 2px; border-radius: 1px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
  .menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Menu: full screen, no bio, just big links (like Ruby's mobile menu) */
  .drawer {
    position: fixed; inset: 74px 0 0 0; z-index: 19;
    background: var(--bg);
    padding: 0 var(--gutter) 32px;
    display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
    overflow-y: auto;
  }
  .drawer[hidden] { display: none; }
  .drawer .nav {
    margin: 0; padding: 32px 0;
    gap: 16px; align-items: stretch;
    border-top: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
  }
  .menu-link {
    display: block; padding: 6px 0; /* the whole row is the tap target */
    font-family: "Inter", sans-serif; font-weight: 400;
    font-size: clamp(56px, 15vw, 84px); line-height: 1.12; letter-spacing: -0.03em;
    transition: color .2s ease;
  }
  .menu-link:hover, .menu-link:active { color: var(--muted); }
  /* Current page: the lime highlight from the headline */
  .menu-link[aria-current] { color: var(--text); }
  .menu-link[aria-current]::after {
    content: ""; display: inline-block; width: .22em; height: .22em; margin-left: .18em;
    border-radius: 50%; background: var(--accent); vertical-align: .12em;
  }
  .drawer .sidebar-foot { gap: 32px; }
  .drawer .links { gap: 20px; margin-bottom: 0; }
  .drawer .ext { font-size: 16px; line-height: 24px; }
  /* Links rise in one after another when the menu opens */
  .drawer:not([hidden]) .nav li, .drawer:not([hidden]) .sidebar-foot { animation: menu-in .4s cubic-bezier(.2, .7, .2, 1) both; }
  .drawer:not([hidden]) .nav li:nth-child(2) { animation-delay: .05s; }
  .drawer:not([hidden]) .sidebar-foot { animation-delay: .1s; }
  #work { scroll-margin-top: 90px; } /* clears the sticky top bar */

  .intro { justify-content: flex-start; min-height: 0; padding: 36px 0 96px; }
  .intro h1 { max-width: 640px; font-size: clamp(30px, 5.4vw, 44px); }
  /* With the burger menu the arrow goes: the headline flows straight into the first project.
     The visually hidden "Work selected" heading stays for screen readers. */
  .work-label { margin-bottom: 0; }
  .scroll-cue { display: none; }
  .cases { gap: 48px; }
  .case { grid-template-columns: 1fr; row-gap: 20px; }
  .case-media { order: -1; aspect-ratio: 691 / 470; }
  .testimonials { margin-top: 120px; }
  .case-title { font-size: 36px; }
  .section-heading { font-size: 36px; margin-bottom: 32px; }
  .quotes { columns: 1; }
  .quote { padding: 28px; margin-bottom: 20px; }
  .about { padding-top: 30px; }
  .about-page { padding-bottom: 80px; }
  .about-intro { grid-template-columns: minmax(0, 1fr) minmax(0, 235px); column-gap: 42px; }
  .portrait { height: auto; aspect-ratio: 268 / 405; }
  .facts { grid-template-columns: 1fr; row-gap: 22px; }
  .ticker { overflow-x: auto; scroll-snap-type: x mandatory; padding-right: var(--gutter); }
  .ticker > div { scroll-snap-align: start; }
  .outro { padding: 80px 0 60px; }

  .cs { padding-bottom: 120px; }
  .cs-pager { padding-top: 8px; margin-bottom: 16px; }
  .cs-info { grid-template-columns: 1fr; row-gap: 40px; margin-bottom: 48px; }
  .cs-summary { max-width: 640px; }
  .cs-meta > div:first-child { border-top: 1px solid color-mix(in srgb, var(--text) 12%, transparent); padding-top: 16px; }
  .cs-hero { aspect-ratio: 16 / 9; }
  .cs-section { max-width: 640px; margin-left: 0; }
  .cs-hero + .cs-section { margin-top: 64px; }
  .cs-section + .cs-section { margin-top: 120px; }
  .cs-figure { margin-top: 40px; }
  .cs-scope { margin-top: 40px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 599px) {
  :root { --gutter: 19px; }
  .topbar .logo { font-size: 28px; }
  .intro { padding: 24px 0 64px; }
  .intro h1 { font-size: 30px; line-height: 1.2; }
  .case-title { font-size: 32px; }
  .case-body { margin-top: 14px; }
  .tags { margin-top: 14px; }
  .testimonials { margin-top: 96px; }
  .section-heading { font-size: 32px; margin-bottom: 24px; }
  .quote { padding: 22px; }
  .about-intro { grid-template-columns: 1fr; row-gap: 39px; }
  .portrait { aspect-ratio: 338 / 347; object-position: center 15%; }
  .about-page { padding-bottom: 60px; }
  .offscreen-title { font-size: 16px; }
  .outro { padding: 64px 0 40px; }

  .cs { padding-bottom: 80px; }
  .cs-title { font-size: 32px; }
  .cs-heading { font-size: 24px; }
  .cs-meta > div { grid-template-columns: 104px minmax(0, 1fr); column-gap: 16px; }
  .cs-hero { aspect-ratio: 4 / 3; }
  .cs-section + .cs-section { margin-top: 96px; }
  .cs-video { width: 100%; }
  .cs-visual { aspect-ratio: 4 / 3; }
  .scope-card { padding: 22px; }
}

@keyframes menu-in { from { opacity: 0; transform: translateY(14px); } }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .drawer .nav li, .drawer .sidebar-foot { animation: none !important; }
}
