/*
Theme Name: Dalbir Rana
Theme URI: https://www.dalbirrana.com/
Author: Dalbir Rana
Description: Dark, editorial portfolio theme matching the current dalbirrana.com design exactly. Case studies are a CMS-managed custom post type (add/edit/delete, editable SEO-friendly /work/ slugs, show/hide on homepage), pre-loaded on first run. Semantic HTML, responsive, optimized WebP images.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: dalbir-rana
*/

/* The complete design system is loaded from the same stylesheet the live
   site uses. This header block is required by WordPress; the actual rules
   are appended below by the build (identical to the current styles.css). */

/* ============== Tokens ============== */
:root {
  /* Cool dark monochrome — sophisticated, editorial */
  --bg: oklch(0.135 0.005 250);
  --bg-2: oklch(0.16 0.006 250);
  --surface: oklch(0.185 0.008 250);
  --surface-2: oklch(0.22 0.009 250);
  --line: oklch(0.27 0.01 250);
  --line-soft: oklch(0.22 0.007 250);

  --fg: oklch(0.965 0.005 80);
  --fg-2: oklch(0.86 0.008 80);
  --muted: oklch(0.6 0.01 250);
  --muted-2: oklch(0.44 0.01 250);

  /* Silver / white-gray accent system — no chromatic accent */
  --accent: oklch(0.86 0.003 250);          /* primary silver — was lime */
  --accent-2: oklch(0.74 0.003 250);        /* mid silver */
  --accent-3: oklch(0.58 0.005 250);        /* steel */
  --cream: oklch(0.96 0.003 250);           /* near-white italic emphasis */
  --jade: oklch(0.78 0.11 160);             /* available status (unchanged) */

  /* One family across the whole site */
  --serif: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --sans: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --mono: "Space Grotesk", system-ui, -apple-system, sans-serif;

  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --max: 1320px;
  --pad: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); overflow-x: clip; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.h-display, .h-section, .cs-title, .proj-title, .stat .v,
.quote p, .service-title, .footer-mark, .brand,
.process-step .num, .process-step h4, .cs-block h2,
.cs-kpi .v, .cs-meta b, .cs-next-card .t, .contact-row .value,
.archive-row .t, .feat-title, .pl-num, .cta-mega {
  font-variation-settings: normal;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: #0d100c; }

/* ============== Layout ============== */
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.section { padding: clamp(72px, 10vw, 140px) 0; position: relative; }
.section--tight { padding: clamp(48px, 7vw, 96px) 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow::before {
  content: "✦";
  color: var(--accent);
  font-size: 12px;
}

.h-display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(54px, 9vw, 142px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 0;
}
/* Hero headline — kept to two lines, smaller & calmer */
.hero-display {
  font-size: clamp(40px, 5.2vw, 72px);
  line-height: 1.0;
  text-wrap: balance;
}
.h-display em, .h-section em, .feat-title em, .cs-title em, .cta-mega em {
  font-style: italic;
  font-weight: 400;
  color: var(--cream);
}
.h-section {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 4.4vw, 60px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0;
}
.lede {
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 60ch;
}
.muted { color: var(--muted); }

/* ============== Loader ============== */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding: var(--pad);
  transition: opacity .8s cubic-bezier(.7,0,.3,1), visibility 0s .8s;
}
.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-top { display: flex; justify-content: space-between; align-items: center; }
.loader-top .lbl { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.loader-pct {
  font-family: var(--serif);
  font-size: clamp(120px, 22vw, 320px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--fg);
  font-weight: 300;
}
.loader-pct .ch { display: inline-block; min-width: 0.55em; text-align: left; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.loader-bar {
  width: 100%; height: 1px; background: var(--line-soft); position: relative;
  margin-top: 14px;
}
.loader-bar::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform .2s linear;
}
.loader.has-progress .loader-bar::after { transform: scaleX(var(--p, 0)); }

/* ============== Custom cursor ============== */
.dot-cursor {
  position: fixed; top: 0; left: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 90;
  mix-blend-mode: difference;
  transform: translate(-9999px, -9999px);
  transition: width .35s cubic-bezier(.2,.7,.2,1), height .35s cubic-bezier(.2,.7,.2,1), background .3s ease;
}
.dot-cursor.is-hover { width: 56px; height: 56px; background: var(--accent); }
.dot-cursor .label {
  opacity: 0;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0d100c;
  white-space: nowrap;
  position: absolute; inset: 0;
  display: grid; place-items: center;
  transition: opacity .25s ease;
}
.dot-cursor.is-hover .label { opacity: 1; }

.submit-form-btn .btn {
  display: inline-flex !important; align-items: center !important; gap: 10px !important;
  padding: 16px 22px !important; border-radius: 999px !important;
  font-family: var(--mono) !important; font-size: 11.5px !important; letter-spacing: 0.18em !important; text-transform: uppercase !important;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), background .3s ease, color .3s ease, border-color .3s ease, box-shadow .4s ease !important;
}
.submit-form-btn .btn--primary { background: var(--accent) !important; color: #0d100c !important;  cursor: pointer; }
.submit-form-btn .btn--primary:hover { background: var(--cream) !important; transform: translateY(-2px) !important; box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 22%, transparent) !important; }
.submit-form-btn .btn--big { padding: 22px 32px !important; font-size: 12.5px !important; gap: 14px !important; }

@media (max-width: 900px), (hover: none) { .dot-cursor { display: none; } }

/* ============== Top bar ============== */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 18px var(--pad);
  display: flex; align-items: center; justify-content: space-between;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: padding .35s cubic-bezier(.2,.7,.2,1), border-color .3s ease;
}
.topbar::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  background: transparent;
  opacity: 0;
  transition: opacity .35s ease, backdrop-filter .35s ease, -webkit-backdrop-filter .35s ease, background .35s ease;
}
.topbar.is-scrolled::before {
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  opacity: 1;
}
.topbar.is-scrolled {
  padding: 10px var(--pad);
  border-bottom-color: var(--line-soft);
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.brand-img {
  height: 26px; width: auto; display: block;
  filter: brightness(0) invert(1);
}
.nav-links { display: flex; gap: 4px; align-items: center; padding: 4px; border: 1px solid var(--line-soft); border-radius: 999px; background: color-mix(in oklab, var(--bg-2) 80%, transparent); }
.nav-links a {
  font-family: var(--mono); font-size: 11.5px; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--fg-2);
  padding: 10px 16px; border-radius: 999px;
  transition: color .3s ease, background .3s ease;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--fg); background: var(--surface); }
.nav-cta {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--line);
  display: inline-flex; align-items: center; gap: 10px;
  transition: border-color .3s ease, background .3s ease, color .3s ease;
}
.nav-cta:hover { border-color: var(--accent); color: var(--fg); background: color-mix(in oklab, var(--accent) 8%, transparent); }
.dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 24%, transparent);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 24%, transparent); }
  50% { box-shadow: 0 0 0 9px color-mix(in oklab, var(--accent) 0%, transparent); }
}
@media (max-width: 820px) { .nav-links { display: none; } }

/* ============== Buttons ============== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 22px; border-radius: 999px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), background .3s ease, color .3s ease, border-color .3s ease, box-shadow .4s ease;
}
.btn--primary { background: var(--accent); color: #0d100c; }
.btn--primary:hover { background: var(--cream); transform: translateY(-2px); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 22%, transparent); }
.btn--ghost { border: 1px solid var(--line); color: var(--fg-2); }
.btn--ghost:hover { border-color: var(--accent); color: var(--fg); background: color-mix(in oklab, var(--accent) 8%, transparent); transform: translateY(-2px); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 14%, transparent); }
.btn--big { padding: 22px 32px; font-size: 12.5px; gap: 14px; }
.btn .arrow { transition: transform .35s ease; }
.btn:hover .arrow { transform: translate(3px, -3px); }

/* ============== Hero ============== */
.hero {
  padding-top: clamp(120px, 16vw, 200px);
  padding-bottom: clamp(56px, 8vw, 96px);
  min-height: 800px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.hero-top-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.intro-pill {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 6px 16px 6px 6px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2);
}
.intro-pill .avatar { width: 36px; height: 36px; border-radius: 50%; background-size: cover; background-position: center; background-color: var(--surface); }
.intro-pill .label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-2); }
.meta-strip { display: flex; gap: 22px; flex-wrap: wrap; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.hero-name-row { display: flex; align-items: baseline; gap: 24px; flex-wrap: wrap; margin-bottom: 12px; }
.hero-name-row .said { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2vw, 32px); color: var(--fg-2); }
.hero-headline em { color: var(--cream); }
.hero-headline .rotator,
.hero-display .rotator {
  display: inline-block; position: relative;
  overflow: hidden;
  vertical-align: top;
  color: var(--cream);
  font-style: italic;
  padding-bottom: 0.12em;
  line-height: 1.08;
  box-shadow: inset 0 -0.06em 0 color-mix(in oklab, var(--cream) 45%, transparent);
}
.hero-headline .rotator .slot { display: inline-block; min-width: 1ch; transition: transform .65s cubic-bezier(.2,.7,.2,1), opacity .5s ease; }
.hero-sub { margin-top: 30px; display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; align-items: flex-end; }
.hero-sub p { max-width: 48ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.scroll-cue {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
}
.scroll-cue .line-bar { width: 36px; height: 1px; background: var(--muted-2); position: relative; overflow: hidden; }
.scroll-cue .line-bar::after { content: ""; position: absolute; inset: 0; background: var(--accent); animation: cue 2s ease-in-out infinite; }
@keyframes cue { 0% { transform: translateX(-100%); } 60%,100% { transform: translateX(100%); } }

/* ============== Hero marquee rows (parallax thumbnail strips) ============== */
/* ============== Hero interactive carousel ============== */
.hero-carousel { margin-top: clamp(40px, 5vw, 72px); }
.hc { position: relative; }
.hc-viewport {
  overflow: hidden;
  cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  padding: 10px 0 16px;
}
.hc-viewport.is-dragging { cursor: grabbing; }
.hc-track { display: flex; gap: 20px; will-change: transform; }
.hc-card {
  flex: 0 0 auto;
  width: clamp(280px, 30vw, 420px);
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--surface);
  text-decoration: none; color: var(--fg);
  transform-origin: center;
  will-change: transform, opacity;
  box-shadow: 0 20px 50px -30px oklch(0 0 0 / 0.8);
}
.hc-media { position: relative; aspect-ratio: 16 / 11; overflow: hidden; }
.hc-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  filter: grayscale(calc(1 - var(--focus, 0))) brightness(calc(0.78 + var(--focus, 0) * 0.22));
  transition: filter .5s ease, transform 1.2s cubic-bezier(.2,.7,.2,1);
  user-select: none; -webkit-user-drag: none;
}
.hc-card:hover .hc-media img { transform: scale(1.05); }
.hc-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, oklch(0.15 0.005 250 / 0.7));
  pointer-events: none;
}
.hc-index {
  position: absolute; top: 14px; left: 16px; z-index: 2;
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 26px; line-height: 1; color: var(--cream);
  text-shadow: 0 2px 12px oklch(0 0 0 / 0.6);
  opacity: calc(0.4 + var(--focus, 0) * 0.6);
}
.hc-info {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 4px;
}
.hc-title { font-family: var(--serif); font-size: clamp(20px, 1.8vw, 26px); font-weight: 500; letter-spacing: -0.01em; line-height: 1.05; }
.hc-title em { font-style: italic; color: var(--cream); }
.hc-meta { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-2); }
.hc-open {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: 999px;
  background: color-mix(in oklab, var(--bg) 55%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg);
  opacity: 0; transform: translateY(-4px); transition: opacity .35s ease, transform .35s ease, background .3s ease;
}
.hc-card:hover .hc-open { opacity: 1; transform: translateY(0); }
.hc-card:hover .hc-open { background: var(--accent); color: #14110c; border-color: var(--accent); }

.hc-controls { display: flex; gap: 10px; margin-top: 22px; }
.hc-arrow {
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  background: var(--bg-2);
  transition: background .3s ease, border-color .3s ease, transform .3s ease;
}
.hc-arrow:hover { border-color: var(--accent); background: var(--surface); transform: translateY(-2px); }
.hc-arrow svg { width: 20px; height: 20px; }
@media (max-width: 640px) {
  .hc-card { width: 78vw; }
}

/* ============== Bio paragraph with highlights ============== */
.bio-section { padding: clamp(64px, 9vw, 120px) 0; border-top: 1px solid var(--line-soft); }
.bio-grid { display: grid; grid-template-columns: 220px 1fr; gap: clamp(24px, 4vw, 80px); align-items: start; }
@media (max-width: 820px) { .bio-grid { grid-template-columns: 1fr; } }
.bio-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); padding-top: 14px; position: sticky; top: 100px; }
.bio-body {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(26px, 3vw, 44px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--fg);
}
.bio-body em { font-style: italic; color: var(--cream); }
.bio-body .hl { background: linear-gradient(180deg, transparent 65%, color-mix(in oklab, var(--accent) 30%, transparent) 65%); padding: 0 4px; border-radius: 2px; }
.bio-body .hl-num {
  display: inline-flex; align-items: baseline; gap: 4px;
  font-family: var(--mono); font-style: normal; font-size: 0.55em; letter-spacing: 0.04em;
  color: var(--accent); vertical-align: middle;
  padding: 2px 10px; border: 1px solid var(--accent); border-radius: 999px;
  margin: 0 4px;
  transform: translateY(-4px);
}

/* ============== Featured work — sticky-stack case study cards ============== */
.featured-head { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 80px); align-items: end; padding-bottom: clamp(36px, 5vw, 64px); }
@media (max-width: 820px) { .featured-head { grid-template-columns: 1fr; } }
.featured-head .right { color: var(--fg-2); max-width: 50ch; }
.featured-headsup {
  display: inline-flex; gap: 10px; align-items: flex-start;
  padding: 12px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--bg-2);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; text-transform: none;
  color: var(--fg-2);
  margin-bottom: 18px;
  line-height: 1.5;
  max-width: 56ch;
}
.featured-headsup::before {
  content: "→";
  color: var(--accent);
  font-family: var(--sans);
  font-weight: 600;
  flex: 0 0 auto;
}

.feat-stack {
  display: flex; flex-direction: column;
  gap: clamp(48px, 8vw, 120px);
}
.feat-card {
  position: sticky;
  top: 88px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--surface);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: clamp(420px, 60vh, 640px);
  isolation: isolate;
  transition: transform .9s cubic-bezier(.2,.7,.2,1), opacity .9s ease;
  box-shadow: 0 30px 60px -30px oklch(0 0 0 / 0.6);
}
@media (max-width: 820px) {
  .feat-card { grid-template-columns: 1fr; min-height: 0; position: relative; top: 0; }
}
.feat-cover { position: relative; overflow: hidden; background: var(--bg); }
.feat-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s cubic-bezier(.2,.7,.2,1); filter: brightness(0.92) saturate(0.95); }
.feat-card:hover .feat-cover img { transform: scale(1.04); filter: brightness(1) saturate(1.02); }
.feat-cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, color-mix(in oklab, var(--bg) 80%, transparent));
  pointer-events: none;
}
.feat-info {
  padding: clamp(28px, 3.5vw, 48px);
  display: flex; flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}
.feat-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.feat-meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
}
.feat-meta .pip { color: var(--accent); }
.feat-num { font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; color: var(--accent); }
.feat-eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); display: inline-block;
}
.feat-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(30px, 3.4vw, 50px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin: 14px 0 14px;
}
.feat-desc { color: var(--fg-2); font-size: clamp(15px, 1.1vw, 17px); line-height: 1.55; max-width: 42ch; }
.feat-bottom { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.feat-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--fg-2);
}
.feat-cta {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 20px; border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg);
  transition: background .3s ease, border-color .3s ease, color .3s ease;
}
.feat-card:hover .feat-cta { background: var(--accent); color: #0d100c; border-color: var(--accent); }
.feat-cta svg { transition: transform .35s ease; }
.feat-card:hover .feat-cta svg { transform: translate(3px, -3px); }

/* ============== Services (Where I can help) ============== */
.services {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
@media (max-width: 760px) { .services { grid-template-columns: 1fr; } }
.service {
  background: var(--bg);
  padding: clamp(28px, 3.5vw, 44px);
  display: flex; flex-direction: column; gap: 16px;
  transition: background .35s ease;
  position: relative;
  min-height: 280px;
}
.service:hover { background: var(--bg-2); }
.service-num { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; color: var(--accent); }
.service-title { font-family: var(--serif); font-size: clamp(28px, 3vw, 40px); margin: 8px 0 0; letter-spacing: -0.015em; line-height: 1.05; }
.service-desc { color: var(--fg-2); font-size: 15px; max-width: 42ch; line-height: 1.55; }
.service-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* ============== Process ============== */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius-xl); overflow: hidden; }
@media (max-width: 900px) { .process { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .process { grid-template-columns: 1fr; } }
.process-step { padding: 32px 28px; background: var(--bg); display: flex; flex-direction: column; gap: 14px; min-height: 240px; }
.process-step .num { font-family: var(--serif); font-style: italic; font-size: 56px; line-height: 1; color: var(--accent); }
.process-step h4 { font-family: var(--serif); font-size: 24px; margin: 0; }
.process-step p { color: var(--fg-2); font-size: 14.5px; margin: 0; line-height: 1.55; }

/* ============== Testimonials ============== */
.quotes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius-xl); overflow: hidden; }
@media (max-width: 760px) { .quotes { grid-template-columns: 1fr; } }
.quote { background: var(--bg); padding: clamp(28px, 3vw, 40px); display: flex; flex-direction: column; gap: 24px; }
.quote .mark { font-family: var(--serif); font-style: italic; font-size: 64px; line-height: 1; color: var(--accent); height: 28px; }
.quote p { font-family: var(--serif); font-size: clamp(19px, 1.7vw, 24px); line-height: 1.4; margin: 0; color: var(--fg); font-style: italic; font-weight: 400; }
.quote .by { display: flex; align-items: center; gap: 12px; }
.quote .by .av {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(140deg, var(--accent), var(--accent-3));
  display: grid; place-items: center;
  font-family: var(--serif); font-style: italic; color: #0d100c; font-size: 17px;
}
.quote .by .n { font-size: 14px; }
.quote .by .r { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }

/* ============== Archive (older work) — minimal text rows ============== */
.archive { border-top: 1px solid var(--line-soft); }
.archive-row {
  display: grid;
  grid-template-columns: 56px 200px 1fr auto auto;
  gap: clamp(16px, 3vw, 48px);
  align-items: center;
  padding: clamp(20px, 2.4vw, 30px) 0;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
  transition: padding .5s cubic-bezier(.2,.7,.2,1);
}
.archive-row:hover { padding-left: 14px; padding-right: 14px; }
.archive-row::before {
  content: ""; position: absolute; left: -100vw; right: -100vw; top: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, var(--bg-2) 30%, var(--bg-2) 70%, transparent);
  opacity: 0; transition: opacity .4s ease; pointer-events: none; z-index: 0;
}
.archive-row:hover::before { opacity: 1; }
.archive-row > * { position: relative; z-index: 1; }
.archive-row .num { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; color: var(--muted-2); }
.archive-row .cat { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.archive-row .t {
  font-family: var(--serif); font-size: clamp(26px, 3.4vw, 48px); line-height: 1.05; letter-spacing: -0.015em;
  transition: transform .5s cubic-bezier(.2,.7,.2,1), color .3s ease;
}
.archive-row:hover .t { transform: translateX(8px); color: var(--cream); }
.archive-row .yr { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--fg-2); }
.archive-row .arrow-c {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.archive-row .arrow-c svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.archive-row:hover .arrow-c { background: var(--accent); color: #0d100c; border-color: var(--accent); }
@media (max-width: 760px) {
  .archive-row { grid-template-columns: 36px 1fr auto; gap: 14px; padding: 18px 0; }
  .archive-row .cat, .archive-row .yr { display: none; }
  .archive-row .t { font-size: 22px; }
}

/* ============== Stats inline ============== */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  margin-top: 36px;
}
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { padding: 24px 18px; border-right: 1px solid var(--line-soft); }
.stat:last-child { border-right: 0; }
@media (max-width: 640px) { .stat:nth-child(2n) { border-right: 0; } }
.stat .v { font-family: var(--serif); font-size: clamp(40px, 4.6vw, 64px); line-height: 1; letter-spacing: -0.02em; }
.stat .v em { color: var(--accent); font-style: italic; }
.stat .l { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }

/* ============== Tools marquee ============== */
.tools-marquee { display: flex; gap: 60px; overflow: hidden; padding: 28px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.tools-track { display: inline-flex; gap: 60px; flex: 0 0 auto; animation: marquee-l 36s linear infinite; }
.tools-track .item {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--serif); font-style: italic; font-size: clamp(24px, 3vw, 38px);
  color: var(--fg-2);
  flex: 0 0 auto;
}
.tools-track .item::after {
  content: "✦";
  color: var(--accent); font-style: normal; font-size: 14px;
  margin-left: 8px;
}

/* ============== CTA mega ============== */
.cta-section {
  padding: clamp(80px, 12vw, 160px) 0;
  border-top: 1px solid var(--line-soft);
  background: radial-gradient(ellipse at top, color-mix(in oklab, var(--accent) 8%, transparent), transparent 60%);
  text-align: center;
}
.cta-eyebrow { color: var(--muted); margin-bottom: 24px; }
.cta-mega {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 92px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
}
.cta-mega em { font-style: italic; color: var(--cream); display: inline-block; }
.cta-mega .underline-link {
  position: relative; display: inline-block;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
}
.cta-sub { margin: 36px auto 0; max-width: 50ch; color: var(--fg-2); font-size: clamp(16px, 1.3vw, 19px); }
.cta-actions { margin-top: 40px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.spinner-disc {
  width: 132px; height: 132px;
  position: relative;
  margin: 0 auto 32px;
}
.spinner-disc svg { width: 100%; height: 100%; animation: spin 18s linear infinite; }
.spinner-disc .core {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  pointer-events: none;
}
.spinner-disc .core span {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent);
}
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* ============== Footer ============== */
.footer { border-top: 1px solid var(--line-soft); padding: 64px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h5 { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: var(--fg-2); font-size: 14px; transition: color .3s ease; }
.footer ul a:hover { color: var(--accent); }
.footer-mark { font-family: var(--serif); font-style: italic; font-size: 72px; line-height: 0.9; letter-spacing: -0.025em; }
.footer-mark img { height: 38px; width: auto; display: block; filter: brightness(0) invert(1); }
.footer-mark em { color: var(--accent); }
.footer-tag { color: var(--fg-2); margin-top: 12px; max-width: 36ch; font-size: 14px; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 32px; margin-top: 56px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  flex-wrap: wrap; gap: 14px;
}

/* ============== Reveal ============== */
.js-reveal .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.js-reveal .reveal.is-in, .reveal.is-in { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }

/* Line splitting for word-by-word reveal */
.word-reveal { display: inline-block; overflow: hidden; vertical-align: bottom; }
.word-reveal .w { display: inline-block; transform: translateY(110%); transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.is-in > .word-reveal .w, .reveal.is-in .word-reveal .w { transform: translateY(0); }
.word-reveal.d2 .w { transition-delay: 0.06s; }
.word-reveal.d3 .w { transition-delay: 0.12s; }
.word-reveal.d4 .w { transition-delay: 0.18s; }
.word-reveal.d5 .w { transition-delay: 0.24s; }

/* ============== Case study page ============== */
.cs-hero { padding-top: clamp(120px, 14vw, 180px); padding-bottom: clamp(32px, 4vw, 56px); position: relative; isolation: isolate; }
.cs-back {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 40px; padding: 0;
  transition: color .3s ease;
}
.cs-back .ci {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 999px;
  border: 1px solid var(--line-soft);
  transition: border-color .3s ease, background .3s ease, transform .4s cubic-bezier(.2,.7,.2,1);
}
.cs-back .ci svg { width: 13px; height: 13px; transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.cs-back:hover { color: var(--fg); }
.cs-back:hover .ci { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 12%, transparent); }
.cs-back:hover .ci svg { transform: translateX(-3px); }

.cs-hero-top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-end; }
.cs-eyebrow-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.cs-eyebrow-row .pill {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--fg-2);
}
.cs-eyebrow-row .pill--accent { background: var(--accent); color: #0d100c; border-color: var(--accent); }
.cs-title { font-family: var(--serif); font-size: clamp(42px, 5.6vw, 70px); line-height: 0.95; letter-spacing: -0.03em; margin: 28px 0 0; }
.cs-sub { color: var(--fg-2); font-size: clamp(18px, 1.6vw, 22px); max-width: 62ch; line-height: 1.45; margin-top: 24px; font-family: var(--serif); font-weight: 400; font-style: italic; }

.cs-meta {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius-xl); overflow: hidden;
  margin-top: 56px;
}
@media (max-width: 760px) { .cs-meta { grid-template-columns: repeat(2, 1fr); } }
.cs-meta > div { background: var(--bg); padding: 24px 22px; }
.cs-meta span { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.cs-meta b { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 22px; }

.cs-cover {
  margin-top: clamp(40px, 6vw, 72px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  position: relative;
  aspect-ratio: 16 / 9;
}
.cs-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 8s ease-out; transform: scale(1.04); }
.cs-cover.is-in img { transform: scale(1); }

.cs-section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.cs-section--accent { background: var(--bg-2); }
.cs-block { display: grid; grid-template-columns: 240px 1fr; gap: clamp(24px, 4vw, 72px); align-items: start; }
@media (max-width: 900px) { .cs-block { grid-template-columns: 1fr; } }
.cs-block-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); padding-top: 12px; }
.cs-block h2 { font-family: var(--serif); font-size: clamp(28px, 3.4vw, 46px); margin: 0 0 24px; letter-spacing: -0.02em; line-height: 1.0; }
.cs-block h2 em { font-style: italic; color: var(--cream); }
.cs-block p { color: var(--fg-2); font-size: clamp(16px, 1.2vw, 18px); line-height: 1.65; max-width: 62ch; }
.cs-block p strong { color: var(--fg); font-weight: 500; }
.cs-block p + p { margin-top: 16px; }
.cs-block ul { color: var(--fg-2); padding-left: 0; list-style: none; max-width: 62ch; }
.cs-block ul li { margin: 14px 0; padding-left: 24px; position: relative; line-height: 1.55; font-size: 16.5px; }
.cs-block ul li::before {
  content: "→"; position: absolute; left: 0; top: 0; color: var(--accent);
}

.cs-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius-xl); overflow: hidden; margin-top: 16px; }
@media (max-width: 760px) { .cs-kpis { grid-template-columns: 1fr; } }
.cs-kpi { background: var(--bg); padding: 32px 26px; }
.cs-kpi .v { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(48px, 5vw, 72px); line-height: 1; color: var(--accent); letter-spacing: -0.02em; }
.cs-kpi .l { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-top: 12px; }
.cs-kpi .d { color: var(--fg-2); font-size: 13.5px; margin-top: 10px; line-height: 1.5; }

.cs-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 28px; }
@media (max-width: 760px) { .cs-gallery { grid-template-columns: 1fr; } }
.cs-gallery .full { grid-column: span 2; }
@media (max-width: 760px) { .cs-gallery .full { grid-column: span 1; } }
.cs-gallery .frame { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.cs-gallery .frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-gallery .placeholder {
  aspect-ratio: 4 / 3; display: grid; place-items: center;
  background-image: repeating-linear-gradient(45deg, var(--surface) 0 14px, var(--surface-2) 14px 28px);
  color: var(--muted);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  text-align: center; padding: 16px;
}

.cs-pull {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--fg);
  max-width: 22ch;
  padding-left: clamp(20px, 3vw, 56px);
  border-left: 2px solid var(--accent);
  margin: 32px 0;
}

.cs-next {
  border-top: 1px solid var(--line-soft);
  padding: clamp(56px, 8vw, 96px) 0;
}
.cs-next-card {
  display: grid; grid-template-columns: 1fr 320px;
  gap: clamp(20px, 4vw, 56px);
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  transition: border-color .35s ease, transform .5s cubic-bezier(.2,.7,.2,1);
  align-items: center;
}
@media (max-width: 760px) { .cs-next-card { grid-template-columns: 1fr; } }
.cs-next-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.cs-next-card .l { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.cs-next-card .t { font-family: var(--serif); font-size: clamp(36px, 5vw, 64px); margin: 0; letter-spacing: -0.02em; line-height: 1.0; }
.cs-next-card .t em { color: var(--cream); }
.cs-next-card .preview {
  aspect-ratio: 16 / 11;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-soft);
}
.cs-next-card .preview img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.2,.7,.2,1); }
.cs-next-card:hover .preview img { transform: scale(1.05); }
.cs-next-card .row { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.cs-next-card .row .arr-c {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: #0d100c;
  display: grid; place-items: center;
  flex: 0 0 auto;
}
.cs-next-card .row .arr-c svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; transition: transform .3s ease; }
.cs-next-card:hover .row .arr-c svg { transform: translate(3px, -3px); }


/* ============================================
   RESPONSIVE — Mobile + Tablet refinements
   ============================================ */

/* ----- Universal responsive safety nets ----- */
img, svg, video { max-width: 100%; }
* { min-width: 0; }
.wrap { width: 100%; }
@media (max-width: 480px) {
  .cs-kicker, .cs-block-label { font-size: 11px; padding: 9px 15px 9px 13px; letter-spacing: 0.14em; }
  .cs-hscroll .shot { height: clamp(440px, 64vh, 560px); }
  .cs-lead { font-size: clamp(21px, 6vw, 28px); }
}

/* ----- Mobile nav toggle ----- */
.mobile-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
  position: relative;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
}
.mobile-toggle .bar {
  display: block; width: 18px; height: 1.5px; background: var(--fg);
  transition: transform .35s ease, opacity .35s ease;
  border-radius: 1px;
}

.mobile-sheet {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 90;
  padding: 24px;
  display: flex; flex-direction: column;
  gap: 24px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .35s ease, transform .45s cubic-bezier(.2,.7,.2,1), visibility 0s .45s;
}
.mobile-sheet.is-open { opacity: 1; visibility: visible; transform: translateY(0); transition: opacity .35s ease, transform .45s cubic-bezier(.2,.7,.2,1), visibility 0s 0s; }
.mobile-sheet-top { display: flex; justify-content: space-between; align-items: center; padding-top: 4px; }
.mobile-sheet-top .lbl { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.mobile-close {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg-2);
  color: var(--fg); font-size: 18px;
  display: grid; place-items: center;
}
.mobile-nav-links { display: flex; flex-direction: column; gap: 0; margin-top: 12px; border-top: 1px solid var(--line-soft); }
.mobile-nav-links a {
  font-family: var(--serif); font-size: clamp(40px, 12vw, 64px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; align-items: center;
}
.mobile-nav-links a::after { content: "↗"; font-family: var(--sans); font-size: 0.4em; color: var(--accent); }
.mobile-sheet-foot {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 18px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg-2);
  align-self: flex-start;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-2);
}

@media (max-width: 820px) {
  .mobile-toggle { display: flex; }
  .nav-cta { display: none; }
}

/* ----- Tablet (≤ 1024px) ----- */
@media (max-width: 1024px) {
  :root { --pad: 28px; --max: 100%; }
  .h-display { font-size: clamp(48px, 9.5vw, 96px); }
  .h-section { font-size: clamp(36px, 7vw, 64px); }
  .feat-card {
    grid-template-columns: 1fr;
    min-height: 0;
    position: relative;
    top: 0 !important;
  }
  .feat-cover { aspect-ratio: 16 / 10; }
  .feat-title { font-size: clamp(32px, 6vw, 48px); }
  .feat-stack { gap: 24px; }
  .feat-info { padding: clamp(22px, 3.5vw, 36px); gap: 22px; }
}

/* ----- Small tablet / large phone (≤ 820px) ----- */
@media (max-width: 820px) {
  :root { --pad: 22px; }
  .topbar { padding: 14px 22px; }
  .section { padding: 64px 0; }
  .section--tight { padding: 48px 0; }
  .hero { padding-top: 96px; padding-bottom: 40px; }
  .hero-name-row { gap: 14px; margin-bottom: 8px; }
  .hero-name-row .said { font-size: 18px; }
  .h-display { font-size: clamp(40px, 11vw, 76px); }
  .hero-headline .rotator { display: inline-block; }
  .hero-top-row { flex-direction: column; align-items: flex-start; gap: 14px; }
  .meta-strip { gap: 14px; font-size: 10px; }
  .meta-strip span { white-space: nowrap; }
  .hero-sub { gap: 24px; margin-top: 24px; flex-direction: column; align-items: flex-start; }
  .hero-cta { width: 100%; }
  .hero-cta .btn { flex: 1; justify-content: center; min-width: 0; }
  .hero-strip { gap: 12px; margin-top: 36px; }
  .strip-card { width: clamp(200px, 60vw, 280px); }

  .bio-grid { gap: 18px; }
  .bio-label { position: static; padding-top: 0; }
  .bio-body { font-size: clamp(22px, 5vw, 32px); line-height: 1.3; }
  .bio-body .hl-num { font-size: 11px; padding: 3px 9px; transform: translateY(-3px); }

  .featured-head { padding-bottom: 32px; gap: 18px; }
  .featured-head .right { width: 100%; }
  .feat-info { padding: 22px; gap: 20px; }
  .feat-title { font-size: clamp(28px, 7.5vw, 40px); margin: 14px 0 12px; }
  .feat-desc { font-size: 14.5px; }
  .feat-bottom { flex-direction: column; align-items: stretch; gap: 14px; }
  .feat-cta { justify-content: center; padding: 14px 18px; }
  .feat-meta { font-size: 9.5px; gap: 10px; }

  .services { grid-template-columns: 1fr; border-radius: 18px; }
  .service { min-height: 0; padding: 26px 22px; gap: 12px; }
  .service-title { font-size: 30px; }

  .process { grid-template-columns: 1fr 1fr; }
  .process-step { padding: 24px 20px; min-height: 0; gap: 10px; }
  .process-step .num { font-size: 40px; }
  .process-step h4 { font-size: 20px; }

  .quotes { grid-template-columns: 1fr; }
  .quote { padding: 24px 22px; gap: 18px; }
  .quote p { font-size: 18px; }

  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 18px 14px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-last-child(-n+2) { border-bottom: 0; }
  .stat .v { font-size: 40px; }

  .cta-section { padding: 80px 0; }
  .cta-mega { font-size: clamp(46px, 13vw, 96px); }
  .cta-actions { flex-direction: column; align-items: stretch; }
  .cta-actions .btn { justify-content: center; }
  .spinner-disc { width: 100px; height: 100px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-mark { font-size: 56px; }
  .footer-bottom { gap: 14px; }

  .tools-track .item { font-size: 22px; }

  /* Case study pages */
  .cs-hero { padding-top: 92px; }
  .cs-back { margin-bottom: 24px; padding: 8px 14px; font-size: 10px; }
  .cs-title { font-size: clamp(44px, 12vw, 68px); margin-top: 22px; }
  .cs-sub { font-size: 17px; }
  .cs-meta { margin-top: 36px; grid-template-columns: 1fr 1fr; }
  .cs-meta > div { padding: 18px 18px; }
  .cs-meta span { font-size: 9.5px; }
  .cs-meta b { font-size: 18px; }
  .cs-cover { aspect-ratio: 4 / 3; margin-top: 32px; }
  .cs-section { padding: 56px 0; }
  .cs-block { gap: 20px; }
  .cs-block-label { position: static; padding-top: 0; }
  .cs-block h2 { font-size: clamp(28px, 7vw, 40px); margin-bottom: 18px; }
  .cs-block p { font-size: 16px; }
  .cs-block ul li { font-size: 15.5px; padding-left: 22px; }
  .cs-pull { font-size: 22px; padding-left: 18px; margin: 24px 0; }
  .cs-kpis { grid-template-columns: 1fr; }
  .cs-kpi { padding: 24px 22px; }
  .cs-kpi .v { font-size: 48px; }
  .cs-next-card { grid-template-columns: 1fr; padding: 24px 22px; gap: 20px; }
  .cs-next-card .t { font-size: clamp(32px, 8vw, 44px); }
  .cs-next-card .preview { aspect-ratio: 16 / 10; order: -1; }
  .cs-next-card .row { margin-top: 14px; }
  .cs-eyebrow-row { gap: 8px; }
  .cs-eyebrow-row .pill { padding: 6px 10px; font-size: 9.5px; }

  /* Disable custom cursor on touch */
  .dot-cursor { display: none !important; }
}

/* ----- Small phone (≤ 480px) ----- */
@media (max-width: 480px) {
  :root { --pad: 18px; }
  .topbar { padding: 12px 18px; }
  .brand-img { height: 22px; }
  .mobile-toggle { width: 40px; height: 40px; }

  .loader { padding: 22px 18px; }
  .loader-pct { font-size: clamp(96px, 32vw, 160px); }
  .loader-top .lbl { font-size: 9.5px; letter-spacing: 0.16em; }
  .loader-top { gap: 12px; flex-wrap: wrap; }

  .h-display { font-size: clamp(36px, 12vw, 60px); }
  .hero-name-row .said { font-size: 16px; }
  .intro-pill { padding: 5px 14px 5px 5px; }
  .intro-pill .avatar { width: 32px; height: 32px; }
  .intro-pill .label { font-size: 10px; letter-spacing: 0.14em; }

  .lede { font-size: 15.5px; }
  .btn { padding: 14px 18px; font-size: 10.5px; letter-spacing: 0.16em; }
  .btn--big { padding: 18px 22px; font-size: 11.5px; }

  .strip-card { width: 75vw; }
  .strip-row { gap: 12px; }
  .strip-track { gap: 12px; }

  .bio-section { padding: 56px 0; }
  .bio-body { font-size: 22px; }

  .h-section { font-size: clamp(34px, 10vw, 52px); }
  .feat-title { font-size: clamp(26px, 9vw, 36px); }
  .feat-desc { font-size: 14px; }
  .feat-cover { aspect-ratio: 4 / 3; }
  .feat-meta { font-size: 9px; gap: 8px; }
  .feat-num { font-size: 10.5px; }
  .feat-bottom .tag { font-size: 9px; padding: 5px 9px; }

  .archive-row { padding: 16px 0; gap: 12px; grid-template-columns: 28px 1fr auto; }
  .archive-row .num { font-size: 10px; }
  .archive-row .t { font-size: 20px; }
  .archive-row .arrow-c { width: 36px; height: 36px; }

  .process { grid-template-columns: 1fr; }
  .process-step { min-height: 0; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 16px 12px; }
  .stat .v { font-size: 34px; }

  .quote { padding: 22px 20px; }
  .quote p { font-size: 17px; }

  .cta-section { padding: 64px 0; }
  .cta-mega { font-size: clamp(38px, 14vw, 64px); }
  .cta-sub { font-size: 14.5px; margin-top: 28px; }
  .cta-actions { margin-top: 28px; }
  .spinner-disc { width: 88px; height: 88px; margin-bottom: 24px; }

  .footer { padding: 48px 0 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-mark { font-size: 48px; }
  .footer-bottom { font-size: 10px; }

  /* Case study */
  .cs-title { font-size: clamp(40px, 14vw, 56px); }
  .cs-sub { font-size: 16px; }
  .cs-meta { grid-template-columns: 1fr; }
  .cs-block h2 { font-size: clamp(26px, 8.5vw, 36px); }
  .cs-block p { font-size: 15.5px; }
  .cs-pull { font-size: 20px; }
  .cs-kpi .v { font-size: 42px; }
  .cs-next-card .t { font-size: clamp(28px, 9vw, 38px); }
}

/* ----- Touch / no-hover devices ----- */
@media (hover: none) {
  .feat-card:hover .feat-cover img { transform: none; }
  .feat-card:hover .feat-cta { background: var(--bg-2); color: var(--fg); border-color: var(--line); }
  .archive-row:hover { padding-left: 0; padding-right: 0; }
  .archive-row:hover .t { transform: none; color: inherit; }
  .archive-row:hover::before { opacity: 0; }
  .archive-row:hover .arrow-c { background: transparent; color: inherit; border-color: var(--line); }
}

/* ----- Tap-highlight cleanup ----- */
a, button { -webkit-tap-highlight-color: transparent; }

/* ----- Ensure content never overflows on landscape phones ----- */
@media (max-width: 900px) and (orientation: landscape) {
  .hero { padding-top: 80px; }
  .h-display { font-size: clamp(36px, 7vw, 64px); }
  .mobile-sheet { padding: 16px 22px; }
  .mobile-nav-links a { padding: 14px 0; font-size: clamp(28px, 6vw, 40px); }
}


/* ============================================
   NEW — May 2026 Refresh
   ============================================ */

/* ---------- Hero corner glow (single soft light-gray spotlight) ---------- */
.hero { position: relative; isolation: isolate; }

/* ---------- Subtle wave video background (index hero) ---------- */
.hero-video {
  position: absolute;
  left: 0; right: 0; top: -120px; bottom: 0;
  width: 100%; height: calc(100% + 120px);
  object-fit: cover;
  z-index: -3;
  opacity: 0.28;
  filter: grayscale(1) contrast(1.05) brightness(0.7);
  pointer-events: none;
}
/* deepen edges so copy stays legible over the wave */
.hero::after {
  content: "";
  position: absolute; left: 0; right: 0; top: -120px; bottom: 0;
  z-index: -2; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 0%, oklch(0.135 0.005 250 / 0.55) 78%),
    linear-gradient(180deg, oklch(0.135 0.005 250 / 0.5) 0%, transparent 30%, transparent 68%, var(--bg) 100%);
}
@media (prefers-reduced-motion: reduce) { .hero-video { display: none; } }

/* ---------- Hero social rail (left of the heading) ---------- */
.hero-social {
  position: absolute;
  left: calc(max(var(--pad), (100% - var(--max)) / 2 + var(--pad)) - 54px);
  top: 50%;
  transform: translateY(-50%);
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 14px;
  z-index: 3;
}
.hero-social::after {
  content: ""; display: block; width: 1px; height: 56px;
  margin: 6px auto 0;
  background: linear-gradient(var(--line), transparent);
}
.hero-social a {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
  transition: transform .45s cubic-bezier(.2,.7,.2,1), color .35s ease, border-color .35s ease, background .35s ease, box-shadow .45s ease;
}
.hero-social svg { width: 22px; height: 22px; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.hero-social a:hover {
  color: #fff;
  background: color-mix(in oklab, var(--fg) 8%, transparent);
  border-color: var(--line);
  transform: translateY(-3px);
  box-shadow: 0 12px 26px -12px oklch(0 0 0 / 0.6);
}
.hero-social a:hover svg { transform: rotate(360deg) scale(1.08); }
@media (max-width: 1180px) {
  .hero-social {
    position: static; transform: none;
    flex-direction: row; gap: 12px;
    margin-bottom: 20px;
  }
  .hero-social::after { display: none; }
}

.aurora {
  position: absolute;
  left: 0; right: 0;
  top: -120px;            /* reach up behind the fixed header so they merge */
  bottom: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  /* Soft spotlight from the upper-left, fading into the dark base — light but a touch more present */
  background:
    radial-gradient(130% 130% at 14% 12%, oklch(0.47 0.004 250 / 0.44) 0%, transparent 50%),
    radial-gradient(70% 70% at 10% 10%, oklch(0.60 0.004 250 / 0.26) 0%, transparent 46%);
}
/* gentle breathing so it isn't static, but stays calm */
.a-blob {
  position: absolute;
  inset: 0;
  background: radial-gradient(50% 50% at 12% 12%, oklch(0.66 0.004 250 / 0.20) 0%, transparent 60%);
  opacity: 1;
  will-change: transform, opacity;
  animation: glow-breathe 16s ease-in-out infinite alternate;
}
.a-blob-2, .a-blob-3 { display: none; }
@keyframes glow-breathe {
  0%   { opacity: 0.7; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.08); }
}
.a-grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  opacity: 0.10;
  mix-blend-mode: overlay;
}
@media (prefers-reduced-motion: reduce) {
  .a-blob { animation: none; }
}

/* ---------- Prominent stats (3 only) ---------- */
.stats--prominent {
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-top: 0;
  background: var(--bg-2);
}
.stats--prominent .stat {
  padding: clamp(36px, 5vw, 64px) clamp(28px, 4vw, 48px);
  border-right: 1px solid var(--line-soft);
  border-bottom: 0;
  display: flex; flex-direction: column; gap: 14px;
  position: relative;
  overflow: hidden;
}
.stats--prominent .stat:last-child { border-right: 0; }
.stats--prominent .stat::before {
  content: ""; position: absolute; left: 0; top: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0; transition: opacity .6s ease;
}
.stats--prominent .stat:hover::before { opacity: 1; }
.stats--prominent .stat .v {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(72px, 9vw, 132px);
  line-height: 0.9;
  letter-spacing: -0.03em;
}
.stats--prominent .stat .v em { color: var(--accent); font-style: italic; }
.stats--prominent .stat .l { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 1.8vw, 26px); margin-top: 4px; color: var(--fg); text-transform: none; letter-spacing: -0.01em; }
.stats--prominent .stat .s { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-top: 8px; line-height: 1.6; max-width: 28ch; }
@media (max-width: 820px) {
  .stats--prominent { grid-template-columns: 1fr; }
  .stats--prominent .stat { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .stats--prominent .stat:last-child { border-bottom: 0; }
}

/* ---------- Tool grid (real logos) ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
@media (max-width: 900px) { .tool-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 540px) { .tool-grid { grid-template-columns: repeat(3, 1fr); } }
.tool-cell {
  background: var(--bg);
  padding: clamp(24px, 3vw, 36px) 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; min-height: 144px;
  transition: background .35s ease, transform .35s ease;
  position: relative;
}
.tool-cell:hover { background: var(--bg-2); }
.tool-cell .t-logo {
  width: 100%;
  height: 56px;
  display: grid; place-items: center;
  transition: filter .4s ease, opacity .4s ease, transform .4s cubic-bezier(.2,.7,.2,1);
}
.tool-cell .t-logo img,
.tool-cell .t-logo svg {
  height: 44px;
  width: auto;
  max-width: 90%;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  filter: grayscale(1) brightness(1.4) contrast(0.9);
  opacity: 0.7;
  transition: filter .4s ease, opacity .4s ease, transform .4s cubic-bezier(.2,.7,.2,1);
}
.tool-cell:hover .t-logo img,
.tool-cell:hover .t-logo svg { filter: none; opacity: 1; transform: translateY(-2px) scale(1.08); }
.tool-cell .t-name {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
  transition: color .35s ease;
}
.tool-cell:hover .t-name { color: var(--fg); }

/* ---------- Contact section ---------- */
.contact-section {
  padding: clamp(80px, 11vw, 140px) 0;
  border-top: 1px solid var(--line-soft);
  position: relative;
  overflow: hidden;
}
.contact-section::before {
  content: ""; position: absolute;
  top: -20%; left: 40%;
  width: 70vw; height: 70vw;
  max-width: 900px; max-height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle at center, color-mix(in oklab, var(--accent) 12%, transparent), transparent 65%);
  filter: blur(80px);
  pointer-events: none;
  z-index: -1;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 56px; } }

.contact-aside .spinner-disc { margin-left: 0; margin-right: auto; }
.contact-aside .cta-mega { text-align: left; }
.contact-aside { position: sticky; top: 100px; }
@media (max-width: 900px) { .contact-aside { position: static; } }

.contact-meta {
  margin-top: 40px;
  border-top: 1px solid var(--line-soft);
}
.contact-meta-row {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
  transition: color .3s ease;
}
.contact-meta-row .v { color: var(--fg); }
.contact-meta-row[href]:hover { color: var(--fg); }
.contact-meta-row[href]:hover .v { color: var(--accent); }

/* ---------- Contact form ---------- */
.contact-form {
  display: flex; flex-direction: column; gap: 0;
}
.contact-form .field {
  display: flex; flex-direction: column;
  padding: 24px 0;
  border-bottom: 1px solid var(--line-soft);
}
.contact-form .field:first-child { padding-top: 4px; }
.contact-form label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 6px;
}
.contact-form label .req { color: var(--accent); font-size: 13px; }
.contact-form input,
.contact-form textarea {
  background: transparent;
  border: 0;
  outline: 0;
  padding: 8px 0;
  width: 100%;
  font-family: var(--sans);
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--fg);
  resize: vertical;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--muted-2); }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
}
.contact-form .field:focus-within { border-bottom-color: var(--accent); }
.contact-form .field:focus-within label { color: var(--fg); }

/* Chip row */
.chip-row {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 4px;
}
.chip {
  font-family: var(--sans);
  font-size: 14px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg-2);
  cursor: pointer;
  white-space: nowrap;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}
.chip:hover { color: var(--fg); border-color: var(--fg-2); }
.chip.is-active {
  background: var(--cream);
  color: #1a1409;
  border-color: var(--cream);
  font-weight: 500;
}

/* Submit row */
.field-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 26px 0 0;
  gap: 18px;
  flex-wrap: wrap;
}
.form-note {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
}
.form-success {
  font-family: var(--serif); font-style: italic;
  font-size: 18px;
  color: var(--accent);
  padding: 14px 0;
  min-height: 0;
}

/* ---------- Footer rebuild ---------- */
.footer { border-top: 1px solid var(--line-soft); padding: 72px 0 32px; }
.footer-top {
  display: grid; grid-template-columns: 1fr auto;
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line-soft);
}
@media (max-width: 760px) {
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
}
.footer-brand .footer-mark { font-family: var(--serif); font-style: italic; font-size: clamp(64px, 8vw, 104px); line-height: 0.9; letter-spacing: -0.03em; }
.footer-brand .footer-mark em { color: var(--accent); }
.footer-tag { color: var(--fg-2); margin-top: 14px; max-width: 40ch; font-size: 15.5px; line-height: 1.55; }

.footer-cta {
  display: inline-flex; flex-direction: column; gap: 4px;
  padding: 22px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  transition: background .3s ease, border-color .3s ease, transform .35s ease;
  position: relative;
  min-width: 280px;
}
.footer-cta:hover { background: var(--surface); border-color: var(--accent); transform: translateY(-2px); }
.footer-cta .l { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.footer-cta .v { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2vw, 26px); color: var(--fg); }
.footer-cta .arr {
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); display: grid; place-items: center;
  transition: background .3s ease, border-color .3s ease;
}
.footer-cta:hover .arr { background: var(--accent); border-color: var(--accent); color: #0d100c; }
.footer-cta .arr svg { width: 14px; height: 14px; }
.footer-cta .v { padding-right: 56px; }

/* Social row */
.footer-socials {
  display: flex; flex-wrap: wrap;
  gap: 0;
  padding: 28px 0;
  border-bottom: 1px solid var(--line-soft);
}
.social {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 22px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-2);
  border-right: 1px solid var(--line-soft);
  transition: color .3s ease, background .3s ease;
}
.social:first-child { padding-left: 0; }
.social:last-child { border-right: 0; }
.social svg { width: 16px; height: 16px; transition: color .3s ease, transform .3s ease; }
.social:hover { color: var(--fg); }
.social:hover svg { color: var(--accent); transform: translateY(-1px); }
@media (max-width: 600px) {
  .social { padding: 10px 14px; }
  .social:first-child { padding-left: 0; }
}

/* Single-line bottom */
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-top: 26px; margin-top: 0;
  border-top: 0;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  flex-wrap: wrap;
}
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a { color: var(--fg-2); transition: color .3s ease; }
.footer-nav a:hover { color: var(--accent); }
@media (max-width: 760px) {
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* ---------- Subtle text-link refinement for jazziness ---------- */
.h-display em, .h-section em, .cs-title em, .cta-mega em, .feat-title em {
  position: relative;
}

/* Add subtle glow to focused buttons */
.btn--primary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* Scroll progress bar at top */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 100%;
  z-index: 60;
  pointer-events: none;
}
.scroll-progress::before {
  content: ""; position: absolute; inset: 0;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(var(--p, 0));
  transition: transform .12s linear;
}


/* ============================================
   CASE STUDY — premium redesign additions
   ============================================ */

/* Reading progress bar (top) already exists globally as .scroll-progress */

/* ----- Overview: lead + at-a-glance ----- */
.cs-overview { padding: clamp(56px, 8vw, 110px) 0; border-top: 1px solid var(--line-soft); }
.cs-overview-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
@media (max-width: 900px) { .cs-overview-grid { grid-template-columns: 1fr; gap: 36px; } }
.cs-lead {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.32; letter-spacing: -0.015em;
  color: var(--fg);
}
.cs-lead em { font-style: italic; color: var(--cream); }
.cs-lead .hl { background: linear-gradient(180deg, transparent 62%, color-mix(in oklab, var(--accent) 26%, transparent) 62%); padding: 0 3px; }
.cs-facts { border-top: 1px solid var(--line-soft); }
.cs-fact { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.cs-fact .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.cs-fact .val { font-size: 14.5px; color: var(--fg); text-align: right; max-width: 60%; }

/* ----- Prototype showcase ----- */
.cs-proto { padding: clamp(64px, 9vw, 130px) 0; background: var(--bg-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); position: relative; overflow: hidden; }
.cs-proto::before {
  content: ""; position: absolute; top: -30%; left: 50%; transform: translateX(-50%);
  width: 80vw; height: 80vw; max-width: 1000px; max-height: 1000px; border-radius: 50%;
  background: radial-gradient(circle at center, oklch(0.5 0.004 250 / 0.18), transparent 60%);
  filter: blur(60px); pointer-events: none;
}
.cs-proto .wrap { position: relative; z-index: 1; }
.cs-proto-head { text-align: center; max-width: 60ch; margin: 0 auto clamp(40px, 6vw, 72px); }
.cs-proto-head .eyebrow { justify-content: center; }
.cs-proto-head h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 4.4vw, 60px); letter-spacing: -0.025em; line-height: 1; margin: 18px 0 16px; }
.cs-proto-head h2 em { font-style: italic; color: var(--cream); }
.cs-proto-head p { color: var(--fg-2); font-size: clamp(15px, 1.2vw, 18px); margin: 0 auto; max-width: 52ch; }

.proto-live {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent);
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg);
  margin-bottom: 22px;
}
.proto-live .blip { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 60%, transparent); animation: blip 1.8s ease-out infinite; }
@keyframes blip { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 50%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }

/* Browser frame */
.proto-browser {
  max-width: 980px; margin: 0 auto;
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 40px 90px -40px oklch(0 0 0 / 0.85);
}
.proto-bar { display: flex; align-items: center; gap: 8px; padding: 13px 16px; background: var(--bg); border-bottom: 1px solid var(--line-soft); }
.proto-bar .dots { display: flex; gap: 6px; }
.proto-bar .dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); display: block; }
.proto-bar .url { flex: 1; margin-left: 10px; height: 26px; border-radius: 7px; background: var(--surface-2); display: flex; align-items: center; padding: 0 12px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: 0.04em; }
.proto-screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg); }
.proto-screen img { position: absolute; top: 0; left: 0; width: 100%; height: auto; will-change: transform; animation: proto-scroll 16s cubic-bezier(.6,0,.4,1) infinite alternate; }
@keyframes proto-scroll { 0%,12% { transform: translateY(0); } 88%,100% { transform: translateY(calc(-100% + 62.5cqw)); } }
.proto-screen { container-type: inline-size; }

/* Phone frame */
.proto-phones { display: flex; gap: clamp(20px, 3vw, 40px); justify-content: center; align-items: flex-start; flex-wrap: wrap; }
.proto-phone {
  width: clamp(220px, 24vw, 290px);
  border-radius: 38px; padding: 12px;
  background: linear-gradient(160deg, oklch(0.28 0.004 250), oklch(0.18 0.004 250));
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -36px oklch(0 0 0 / 0.85);
  position: relative;
}
.proto-phone:nth-child(2) { transform: translateY(28px); }
.proto-phone:nth-child(3) { transform: translateY(56px); }
@media (max-width: 760px) { .proto-phone:nth-child(2), .proto-phone:nth-child(3) { transform: none; } }
.proto-phone .notch { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 90px; height: 22px; background: oklch(0.12 0.004 250); border-radius: 999px; z-index: 3; }
.proto-phone .screen { border-radius: 28px; overflow: hidden; aspect-ratio: 9 / 19.5; background: var(--bg); position: relative; container-type: inline-size; }
.proto-phone .screen img { position: absolute; top: 0; left: 0; width: 100%; height: auto; will-change: transform; }
.proto-phone:nth-child(1) .screen img { animation: proto-scroll-p 14s cubic-bezier(.6,0,.4,1) infinite alternate; }
.proto-phone:nth-child(2) .screen img { animation: proto-scroll-p 17s cubic-bezier(.6,0,.4,1) infinite alternate; animation-delay: -3s; }
.proto-phone:nth-child(3) .screen img { animation: proto-scroll-p 15s cubic-bezier(.6,0,.4,1) infinite alternate; animation-delay: -6s; }
@keyframes proto-scroll-p { 0%,10% { transform: translateY(0); } 90%,100% { transform: translateY(calc(-100% + 216cqw)); } }
@media (prefers-reduced-motion: reduce) {
  .proto-screen img, .proto-phone .screen img { animation: none !important; }
}

/* ----- Section intro headers for cs ----- */
.cs-sec-head { max-width: 60ch; margin-bottom: clamp(28px, 4vw, 48px); }
.cs-sec-head .eyebrow { color: var(--accent); }
.cs-sec-head h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 4vw, 52px); letter-spacing: -0.025em; line-height: 1; margin: 16px 0 0; }
.cs-sec-head h2 em { font-style: italic; color: var(--cream); }

/* big full-bleed image block */
.cs-figure { border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--line); background: var(--surface); margin-top: 12px; }
.cs-figure img { width: 100%; height: auto; display: block; }
.cs-figure.tall { aspect-ratio: 16/9; }
.cs-figure.tall img { width:100%; height:100%; object-fit: cover; }
.cs-figcaption { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 12px; }
.cs-figure.placeholder {
  aspect-ratio: 16 / 9; display: grid; place-items: center;
  background-image: repeating-linear-gradient(45deg, var(--surface) 0 16px, var(--surface-2) 16px 32px);
  transition: border-color .4s ease;
}
.cs-figure.placeholder:hover { border-color: var(--accent); }
.cs-figure-ph { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

/* ============================================
   CASE STUDY v3 — meta / summary / shots / sections
   ============================================ */

/* 3-up meta (Client / Role / Website) */
.cs-meta--three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .cs-meta--three { grid-template-columns: 1fr; } }
.cs-meta a { color: var(--fg); border-bottom: 1px solid var(--line); transition: color .3s ease, border-color .3s ease; }
.cs-meta a:hover { color: var(--accent); border-color: var(--accent); }
.cs-meta b.cs-meta-link { font-style: normal; font-family: var(--mono); font-size: 14px; letter-spacing: 0.02em; display: inline-flex; align-items: center; gap: 7px; }

/* Project Summary block */
.cs-summary { padding: clamp(48px, 6vw, 84px) 0 0; }
.cs-summary-grid { display: grid; grid-template-columns: 240px 1fr; gap: clamp(24px, 4vw, 72px); align-items: start; }
@media (max-width: 900px) { .cs-summary-grid { grid-template-columns: 1fr; gap: 18px; } }
.cs-summary-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); padding-top: 12px; }
.cs-summary-body {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(22px, 2.3vw, 32px);
  line-height: 1.36; letter-spacing: -0.015em;
  color: var(--fg); max-width: 40ch;
}
.cs-summary-body em { font-style: italic; color: var(--cream); }
.cs-summary-body .hl { background: linear-gradient(180deg, transparent 62%, color-mix(in oklab, var(--accent) 24%, transparent) 62%); padding: 0 3px; }

/* Responsibilities list */
.cs-resp { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); overflow: hidden; max-width: none; }
@media (max-width: 640px) { .cs-resp { grid-template-columns: 1fr; } }
.cs-resp li { background: var(--bg); padding: 22px 24px; display: flex; gap: 14px; align-items: flex-start; font-size: 16px; color: var(--fg-2); line-height: 1.5; }
.cs-resp li::before { content: ""; flex: 0 0 auto; margin-top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.cs-resp li b { color: var(--fg); font-weight: 600; display: block; font-size: 13px; font-family: var(--mono); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 4px; }

/* Process steps (numbered) */
.cs-steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); overflow: hidden; margin-top: 8px; }
@media (max-width: 760px) { .cs-steps { grid-template-columns: 1fr; } }
.cs-step { background: var(--bg); padding: 30px 28px; display: flex; flex-direction: column; gap: 10px; }
.cs-step .n { font-family: var(--serif); font-style: italic; font-size: 34px; line-height: 1; color: var(--accent); }
.cs-step h4 { font-family: var(--serif); font-size: 22px; margin: 0; letter-spacing: -0.01em; }
.cs-step p { margin: 0; font-size: 15px; color: var(--fg-2); line-height: 1.55; max-width: none; }

/* ---- Image placeholder shots ---- */
.cs-shots { display: grid; gap: 16px; margin-top: 28px; }
.cs-shots.cols-2 { grid-template-columns: 1fr 1fr; }
.cs-shots.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .cs-shots.cols-2, .cs-shots.cols-3 { grid-template-columns: 1fr; } }
.cs-shot {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  background-color: var(--surface);
  background-image: repeating-linear-gradient(45deg, oklch(0.20 0.005 250) 0 18px, oklch(0.225 0.006 250) 18px 36px);
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 22px;
  transition: border-color .35s ease, transform .5s cubic-bezier(.2,.7,.2,1);
}
.cs-shot:hover { border-color: var(--accent); transform: translateY(-3px); }
.cs-shot .cs-shot-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 80%; }
.cs-shot .ic {
  width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line);
  display: grid; place-items: center; background: var(--bg); color: var(--accent);
}
.cs-shot .ic svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.cs-shot .t { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg); }
.cs-shot .s { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.cs-shot.ar-wide { aspect-ratio: 16 / 9; }
.cs-shot.ar-dash { aspect-ratio: 16 / 10; }
.cs-shot.ar-flow { aspect-ratio: 2.4 / 1; }
.cs-shot.ar-square { aspect-ratio: 4 / 3; }
.cs-shot.ar-tall { aspect-ratio: 9 / 17; }
@media (max-width: 760px) { .cs-shot.ar-tall { aspect-ratio: 16 / 11; } }
.cs-shots-cap { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 14px; }

/* Horizontal-scroll screen rail (real mobile screenshots) */
.cs-hscroll { display: flex; gap: 18px; overflow-x: auto; padding: 6px 2px 20px; margin-top: 28px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.cs-hscroll::-webkit-scrollbar { height: 8px; }
.cs-hscroll::-webkit-scrollbar-track { background: transparent; }
.cs-hscroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.cs-hscroll::-webkit-scrollbar-thumb:hover { background: var(--line-2, var(--muted-2)); }
.cs-hscroll .shot { flex: 0 0 auto; height: clamp(520px, 74vh, 680px); aspect-ratio: 9 / 19.5; width: auto; margin: 0; border-radius: 28px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); scroll-snap-align: start; box-shadow: 0 24px 50px -30px rgba(0,0,0,.8); transition: transform .5s cubic-bezier(.2,.7,.2,1), border-color .3s ease; }
.cs-hscroll .shot:hover { transform: translateY(-6px); border-color: var(--accent); }
.cs-hscroll .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.cs-hscroll .shot.desk { height: clamp(240px, 40vw, 360px); width: clamp(360px, 76vw, 560px); border-radius: 16px; }
.cs-hscroll .shot.desk img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* Web-screen grid (no horizontal scroll) */
.cs-webgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 28px; }
.cs-webgrid .shot { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 24px 50px -30px rgba(0,0,0,.8); transition: transform .5s cubic-bezier(.2,.7,.2,1), border-color .3s ease; }
.cs-webgrid .shot:hover { transform: translateY(-4px); border-color: var(--accent); }
.cs-webgrid .shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; aspect-ratio: 4 / 3.4; }
.cs-webgrid .shot.span2 { grid-column: 1 / -1; }
.cs-webgrid .shot.span2 img { aspect-ratio: 16 / 10; }
/* Full-content variant — show entire image, no cropping */
.cs-webgrid.contain .shot { background: var(--bg-2); }
.cs-webgrid.contain .shot img { height: auto; aspect-ratio: auto; object-fit: contain; }
@media (max-width: 680px) { .cs-webgrid { grid-template-columns: 1fr; } .cs-webgrid .shot.span2 { grid-column: auto; } }

/* Scroll-to-top floating button (all case study pages) — with scroll-progress ring */
.scroll-top { --p: 0; position: fixed; right: clamp(18px, 3vw, 34px); bottom: clamp(18px, 3vw, 34px); z-index: 60; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: var(--fg); background: color-mix(in oklab, var(--surface) 82%, transparent); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(14px) scale(.92); transition: opacity .4s ease, transform .5s cubic-bezier(.2,.7,.2,1), visibility .4s, border-color .3s ease, background .3s ease; }
.scroll-top::before { content: ""; position: absolute; inset: -5px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 360deg), color-mix(in oklab, var(--line) 60%, transparent) 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2.5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2.5px)); pointer-events: none; opacity: .9; }
.scroll-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.scroll-top:hover { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 14%, var(--surface)); transform: translateY(-3px) scale(1.04); }
.scroll-top svg { width: 20px; height: 20px; transition: transform .35s cubic-bezier(.2,.7,.2,1); position: relative; }
.scroll-top:hover svg { transform: translateY(-2px); }
@media (hover: none) { .scroll-top { width: 46px; height: 46px; } }

/* Real screenshot rows (case studies) */
.cs-imgrow { display: grid; gap: 14px; margin-top: 24px; }
.cs-imgrow.one { grid-template-columns: 1fr; }
.cs-imgrow.two { grid-template-columns: 1fr 1fr; }
.cs-imgrow.three { grid-template-columns: 1fr 1fr 1fr; }
.cs-imgrow .fig { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.cs-imgrow .fig img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.cs-imgrow .fig.desk { aspect-ratio: 16 / 10; }
.cs-imgrow .fig.phone { aspect-ratio: 9 / 16; }
@media (max-width: 760px) { .cs-imgrow.two, .cs-imgrow.three { grid-template-columns: 1fr; } .cs-imgrow .fig.phone { aspect-ratio: 9 / 15; } }

/* =====================================================================
   Progressive scroll reveal (impilo-style) — case study detail pages
   Smoother easing, gentle blur-in, and per-element stagger.
   ===================================================================== */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(30px);
  filter: blur(6px);
  transition: opacity 1s cubic-bezier(.16,.84,.24,1), transform 1.1s cubic-bezier(.16,.84,.24,1), filter .85s ease;
}
.js-reveal .reveal.is-in, .reveal.is-in { opacity: 1; transform: none; filter: none; }

/* granular staggered children */
.js-reveal .rv {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(5px);
  transition: opacity .85s cubic-bezier(.16,.84,.24,1), transform .95s cubic-bezier(.16,.84,.24,1), filter .7s ease;
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js-reveal .rv.is-in { opacity: 1; transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal, .js-reveal .rv { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
}

/* =====================================================================
   CASE STUDY v4 — premium storytelling sections
   ===================================================================== */

/* Section header: pill kicker (spark icon + uppercase label) */
.cs-kicker { display:inline-flex; align-items:center; gap:11px; font-family:var(--mono); font-size:12px; letter-spacing:0.18em; text-transform:uppercase; color:var(--fg-2); padding:11px 20px 11px 16px; border:1px solid var(--line); border-radius:999px; background:color-mix(in oklab, var(--surface) 60%, transparent); }
.cs-kicker::before { content:""; width:17px; height:17px; flex:0 0 auto; background:var(--accent); -webkit-mask:var(--spark) center/contain no-repeat; mask:var(--spark) center/contain no-repeat; }
:root { --spark:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%23000'%3E%3Ccircle cx='12' cy='12' r='2.4'/%3E%3Ccircle cx='12' cy='3.2' r='1.7'/%3E%3Ccircle cx='12' cy='20.8' r='1.7'/%3E%3Ccircle cx='3.2' cy='12' r='1.7'/%3E%3Ccircle cx='20.8' cy='12' r='1.7'/%3E%3Ccircle cx='5.8' cy='5.8' r='1.5'/%3E%3Ccircle cx='18.2' cy='18.2' r='1.5'/%3E%3Ccircle cx='18.2' cy='5.8' r='1.5'/%3E%3Ccircle cx='5.8' cy='18.2' r='1.5'/%3E%3C/g%3E%3C/svg%3E"); }
.cs-h { font-family:var(--serif); font-weight:500; font-size:clamp(28px,3.4vw,46px); line-height:1.0; letter-spacing:-0.02em; margin:18px 0 0; max-width:20ch; }
.cs-h em { font-style:italic; color:var(--cream); }
.cs-intro { font-size:clamp(17px,1.35vw,20px); line-height:1.6; color:var(--fg-2); max-width:62ch; margin:22px 0 0; }
.cs-intro strong { color:var(--fg); font-weight:600; }

/* Overview — big editorial lead + fact rail */
.cs-lead { font-family:var(--serif); font-weight:400; font-size:clamp(24px,2.8vw,40px); line-height:1.32; letter-spacing:-0.02em; color:var(--fg); max-width:22ch; }
.cs-lead em { font-style:italic; color:var(--cream); }
.cs-overview-grid { display:grid; grid-template-columns:1.15fr 0.85fr; gap:clamp(32px,5vw,80px); align-items:start; }
@media (max-width:900px){ .cs-overview-grid{ grid-template-columns:1fr; gap:32px; } }
.cs-factrail { display:flex; flex-direction:column; }
.cs-factrail .row { display:flex; justify-content:space-between; gap:20px; padding:16px 0; border-top:1px solid var(--line-soft); font-size:15px; }
.cs-factrail .row:last-child { border-bottom:1px solid var(--line-soft); }
.cs-factrail .k { font-family:var(--mono); font-size:11px; letter-spacing:0.16em; text-transform:uppercase; color:var(--muted); }
.cs-factrail .v { color:var(--fg); text-align:right; }

/* Research & Insights — insight cards */
.cs-insights { display:grid; grid-template-columns:repeat(3,1fr); gap:1px; background:var(--line-soft); border:1px solid var(--line-soft); border-radius:var(--radius-lg); overflow:hidden; margin-top:32px; }
@media (max-width:820px){ .cs-insights{ grid-template-columns:1fr; } }
.cs-insight { background:var(--bg); padding:32px 28px; display:flex; flex-direction:column; gap:14px; transition:background .4s ease; }
.cs-insight:hover { background:var(--bg-2); }
.cs-insight .stat { font-family:var(--serif); font-style:italic; font-size:clamp(34px,3.4vw,48px); line-height:1; letter-spacing:-0.02em; background:linear-gradient(118deg,var(--cream),var(--accent)); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; color:transparent; }
.cs-insight .lab { font-family:var(--mono); font-size:10.5px; letter-spacing:0.16em; text-transform:uppercase; color:var(--muted); }
.cs-insight p { margin:0; font-size:14.5px; color:var(--fg-2); line-height:1.6; }
.cs-methods { display:flex; flex-wrap:wrap; gap:8px; margin-top:22px; }
.cs-methods .m { font-family:var(--mono); font-size:10.5px; letter-spacing:0.14em; text-transform:uppercase; color:var(--fg-2); padding:8px 14px; border:1px solid var(--line); border-radius:999px; transition:border-color .3s ease,color .3s ease; }
.cs-methods .m:hover { border-color:var(--accent); color:var(--fg); }

/* Learnings — numbered takeaway cards */
.cs-learnings { display:grid; grid-template-columns:repeat(3,1fr); gap:1px; background:var(--line-soft); border:1px solid var(--line-soft); border-radius:var(--radius-lg); overflow:hidden; margin-top:8px; }
@media (max-width:820px){ .cs-learnings{ grid-template-columns:1fr; } }
.cs-learn { background:var(--bg); padding:32px 28px; display:flex; flex-direction:column; gap:12px; }
.cs-learn .n { font-family:var(--serif); font-style:italic; font-size:30px; line-height:1; color:var(--accent); }
.cs-learn h4 { font-family:var(--serif); font-size:20px; margin:0; letter-spacing:-0.01em; line-height:1.15; }
.cs-learn p { margin:0; font-size:14.5px; color:var(--fg-2); line-height:1.6; }

/* Final UI — framed gallery */
.cs-gallery-lead { margin-bottom:8px; }
.cs-ui-grid { display:grid; gap:16px; margin-top:28px; }
.cs-ui-grid.two { grid-template-columns:1fr 1fr; }
.cs-ui-grid.hero-split { grid-template-columns:1fr; }
@media (max-width:760px){ .cs-ui-grid.two{ grid-template-columns:1fr; } }

/* Refined section divider rhythm */
.cs-section { position:relative; }
.cs-section + .cs-section { border-top:1px solid var(--line-soft); }

/* =====================================================================
   CASE STUDY — jazzy / creative detail refinements
   ===================================================================== */

/* Eyebrow pills lift on hover */
.cs-eyebrow-row .pill { transition: transform .3s cubic-bezier(.2,.7,.2,1), border-color .3s ease, color .3s ease; }
.cs-eyebrow-row .pill:not(.pill--accent):hover { transform: translateY(-2px); border-color: var(--accent); color: var(--fg); }
.cs-eyebrow-row .pill--accent { box-shadow: 0 8px 22px -10px color-mix(in oklab, var(--accent) 60%, transparent); }

/* Title emphasis — animated underline sweep */
.cs-title em { position: relative; display: inline-block; }
.cs-title em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.06em; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .8s cubic-bezier(.2,.7,.2,1) .3s;
}
.cs-hero.is-in .cs-title em::after, .cs-hero .reveal.is-in ~ * .cs-title em::after { transform: scaleX(1); }
.cs-title em::after { animation: cs-underline 1s cubic-bezier(.2,.7,.2,1) .5s both; }
@keyframes cs-underline { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Section labels: leading marker rule + accent dot */
.cs-block-label { display:inline-flex; align-self:start; width:auto; align-items:center; gap:11px; font-family:var(--mono); font-size:12px; letter-spacing:0.18em; text-transform:uppercase; color:var(--fg-2); padding:11px 20px 11px 16px; border:1px solid var(--line); border-radius:999px; background:color-mix(in oklab, var(--surface) 60%, transparent); position: sticky; top: 110px; }
.cs-block-label::before { content:""; width:17px; height:17px; flex:0 0 auto; background:var(--accent); -webkit-mask:var(--spark) center/contain no-repeat; mask:var(--spark) center/contain no-repeat; }

/* Accent sections get a soft vertical sheen */
.cs-section--accent { background: linear-gradient(180deg, var(--bg-2) 0%, color-mix(in oklab, var(--bg-2) 70%, var(--bg)) 100%); }

/* KPI figures shimmer with a cream→accent gradient */
.cs-kpi { transition: background .35s ease, transform .5s cubic-bezier(.2,.7,.2,1); }
.cs-kpi:hover { background: var(--bg-2); transform: translateY(-3px); }
.cs-kpi .v {
  background: linear-gradient(118deg, var(--cream) 0%, var(--accent) 90%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* Pull-quote gets a bolder accent rule + oversized opening mark */
.cs-pull { position: relative; }
.cs-pull::before {
  content: "\201C"; position: absolute; left: clamp(-6px, -0.4vw, 0px); top: -0.4em;
  font-family: var(--serif); font-style: italic; font-size: 2.4em; line-height: 1;
  color: var(--accent); opacity: 0.35; pointer-events: none;
}

/* ---- NEXT CASE STUDY — dramatic, immersive ---- */
.cs-next { position: relative; overflow: hidden; padding: clamp(64px, 9vw, 120px) 0; }
.cs-next::before {
  content: "Up next"; position: absolute; left: 50%; top: 8%;
  transform: translateX(-50%);
  font-family: var(--serif); font-style: italic; font-weight: 600;
  font-size: clamp(90px, 18vw, 260px); line-height: 1; white-space: nowrap;
  letter-spacing: -0.04em;
  color: transparent; -webkit-text-stroke: 1px var(--line);
  opacity: 0.35; pointer-events: none; z-index: 0;
}
.cs-next .wrap { position: relative; z-index: 1; }

.cs-next-card {
  grid-template-columns: 1.15fr 0.85fr;
  padding: clamp(28px, 4vw, 56px);
  min-height: clamp(260px, 34vw, 380px);
  position: relative;
  overflow: hidden;
  background: color-mix(in oklab, var(--surface) 85%, transparent);
  backdrop-filter: blur(8px);
}
.cs-next-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in oklab, var(--accent) 14%, transparent), transparent 55%);
  opacity: 0; transition: opacity .6s ease;
}
.cs-next-card:hover::after { opacity: 1; }
.cs-next-card .l {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--accent);
}
.cs-next-card .l::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 60%, transparent);
  animation: cs-next-pulse 2s ease-out infinite;
}
@keyframes cs-next-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 50%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }
.cs-next-card .t {
  font-size: clamp(40px, 6vw, 60px);
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.cs-next-card:hover .t { transform: translateX(8px); }
.cs-next-card .t em {
  background: linear-gradient(118deg, var(--cream), var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.cs-next-card .preview { aspect-ratio: 4 / 3; border-radius: var(--radius-lg); }
.cs-next-card .preview img { transition: transform 1.1s cubic-bezier(.2,.7,.2,1), filter .6s ease; filter: saturate(0.9) brightness(0.92); }
.cs-next-card:hover .preview img { transform: scale(1.08); filter: saturate(1.05) brightness(1); }
.cs-next-card .row .arr-c {
  width: 64px; height: 64px;
  transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .4s ease;
}
.cs-next-card:hover .row .arr-c { transform: rotate(45deg) scale(1.06); box-shadow: 0 14px 30px -10px color-mix(in oklab, var(--accent) 70%, transparent); }
.cs-next-card:hover .row .arr-c svg { transform: none; }
@media (max-width: 760px) {
  .cs-next::before { font-size: clamp(70px, 24vw, 130px); top: 2%; }
  .cs-next-card .preview { aspect-ratio: 16 / 10; }
}

/* tighten cs-block paragraph max width consistency */
.cs-block .body-wide { max-width: 64ch; }
