/* ==========================================================
   Lamees Zafar · Portfolio
   Type: DM Serif Display (display), Space Grotesk (body/UI),
         Inter (section labels), JetBrains Mono (small caps)
   ========================================================== */

:root {
  --bg: #fff9f1;
  --bg-2: #f6eee2;
  --paper: #ffffff;
  --ink: #060606;
  --ink-2: rgba(6, 6, 6, .78);
  --muted: rgba(6, 6, 6, .5);
  --line: rgba(6, 6, 6, .1);

  --margalla: #3e6b4f;
  --sun: #f2b544;
  --night: #0f1838;
  --night-2: #1d2a52;

  --gaia: #cfe3db;
  --gaia-ink: #2f5d4f;
  --ia: #e3dbf5;
  --ia-ink: #6b3fd1;
  --ss: #1b2a55;
  --ss-ink: #2d4aa8;

  --serif: "DM Serif Display", Georgia, serif;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --label: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --ease: cubic-bezier(.25, .46, .45, .94);
  --spring: cubic-bezier(.2, .7, .2, 1);
  --gutter: clamp(16px, 4.2vw, 60px);
  --maxw: 1320px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--sun); color: var(--ink); }
:focus-visible { outline: 2px solid var(--margalla); outline-offset: 3px; border-radius: 8px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* Section header (Inter, like a quiet label + big line) */
.eyebrow { font-family: var(--label); font-size: 14px; letter-spacing: -.04em; color: var(--muted); text-transform: uppercase; margin: 0 0 6px; }
.heading { font-family: var(--label); font-weight: 400; font-size: clamp(30px, 3.2vw, 40px); letter-spacing: -.04em; line-height: 1.36; margin: 0; color: rgba(6, 6, 6, .9); }
.heading em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(32px, 4vw, 56px); }
.sec-head .aside { max-width: 360px; color: var(--muted); margin: 0; font-size: 16px; }
.sec-head.center { flex-direction: column; align-items: center; text-align: center; }
.section { padding: clamp(80px, 11vw, 150px) 0; position: relative; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px; border: 1px solid transparent;
  font-size: 16px; font-weight: 500; text-decoration: none; cursor: pointer;
  transition: transform .35s var(--spring), background .3s, color .3s, border-color .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-ghost { background: rgba(255, 255, 255, .55); border-color: var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn .arrow { transition: transform .3s var(--spring); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Nav ---------- */
.nav { position: fixed; top: 16px; left: 0; right: 0; z-index: 60; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 var(--gutter); pointer-events: none; }
.nav > * { pointer-events: auto; }
.nav-pill {
  display: flex; align-items: center; gap: 2px; padding: 6px; border-radius: 999px;
  background: rgba(255, 249, 241, .72); border: 1px solid rgba(255, 255, 255, .7);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 6px 24px -10px rgba(15, 24, 56, .3);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 3px 12px 3px 3px; text-decoration: none; font-weight: 500; }
.brand-mark { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 35%, #ffe7a3, var(--sun) 60%, #e08b2e); font-family: var(--serif); font-size: 18px; box-shadow: inset 0 -2px 6px rgba(0, 0, 0, .12); }
.nav-links { display: flex; gap: 2px; }
.nav-links a { text-decoration: none; font-size: 16px; padding: 8px 16px; border-radius: 999px; transition: background .25s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: rgba(6, 6, 6, .06); }
.nav-links a.cta { background: var(--ink); color: var(--bg); display: inline-flex; align-items: center; gap: 8px; }
.nav-links a.cta svg { width: 16px; height: 16px; }
.clock-chip { display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 14px; }
.clock-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: #3fbf6a; box-shadow: 0 0 0 4px rgba(63, 191, 106, .18); }
.clock-chip.off .dot { background: var(--sun); box-shadow: 0 0 0 4px rgba(242, 181, 68, .22); }
.clock-chip .reset { display: none; border: 0; background: var(--ink); color: var(--bg); font-size: 12px; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.clock-chip.off .reset { display: inline-block; }
@media (max-width: 760px) {
  .brand-name, .clock-chip .label-long { display: none; }
  .brand { padding-right: 4px; }
  .nav-links a { padding: 8px 11px; font-size: 15px; }
  .clock-chip { padding: 8px 12px; gap: 8px; }
}
@media (max-width: 480px) { .nav-links a.cta { display: none; } }

/* ==========================================================
   HERO · live Islamabad sky
   ========================================================== */
.hero {
  --sky-top: #5fa3e0; --sky-bot: #cfe6f7;
  --hill-1: #9db7b0; --hill-2: #6f9580; --hill-3: #4e7a5e; --hill-4: #3b5e47;
  --cloud: #fff; --night-amt: 0;
  --hero-ink: var(--ink); --hero-ink-2: rgba(6, 6, 6, .72);
  position: relative; min-height: max(700px, 100svh); overflow: hidden; isolation: isolate;
  color: var(--hero-ink);
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bot) 80%);
}
.hero.is-night { --hero-ink: #fff9f1; --hero-ink-2: rgba(255, 249, 241, .8); }
.stars { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero .stars { opacity: var(--night-amt); transition: opacity .6s; }
.star { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; animation: twinkle var(--d, 3s) ease-in-out infinite; animation-delay: var(--delay, 0s); }
.star.big { width: 3px; height: 3px; box-shadow: 0 0 6px rgba(255, 255, 255, .8); }
@keyframes twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

.clouds { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.cloud { position: absolute; fill: var(--cloud); opacity: calc(.92 - var(--night-amt) * .55); animation: drift linear infinite; filter: drop-shadow(0 8px 12px rgba(15, 24, 56, .07)); }
@keyframes drift { from { transform: translateX(-30vw); } to { transform: translateX(130vw); } }

.orb { position: absolute; left: 0; top: 0; z-index: 2; width: 92px; height: 92px; margin: -46px 0 0 -46px; border: 0; padding: 0; background: none; cursor: grab; touch-action: none; will-change: transform; }
.orb:active { cursor: grabbing; }
.orb .sun, .orb .moon { position: absolute; inset: 0; border-radius: 50%; transition: opacity .5s, transform .5s var(--spring); }
.orb .sun { background: radial-gradient(circle at 40% 38%, #fff6d6 0%, #ffe39a 35%, #f6b84a 70%, #ee9a36 100%); box-shadow: 0 0 0 14px rgba(255, 214, 120, .22), 0 0 60px 26px rgba(255, 200, 100, .45); }
.orb .moon { inset: 14px; opacity: 0; background: radial-gradient(circle at 60% 40%, #fffdf3, #e9e4d3 70%); box-shadow: 0 0 40px 10px rgba(230, 230, 255, .28); }
.orb .moon::before, .orb .moon::after { content: ""; position: absolute; border-radius: 50%; background: rgba(170, 165, 150, .35); }
.orb .moon::before { width: 12px; height: 12px; left: 16px; top: 18px; }
.orb .moon::after { width: 7px; height: 7px; left: 36px; top: 34px; }
.orb.is-moon .sun { opacity: 0; transform: scale(.7); }
.orb.is-moon .moon { opacity: 1; }
.orb:hover .sun { transform: scale(1.06); }
.orb:focus-visible { outline: 2px dashed var(--hero-ink); outline-offset: 6px; border-radius: 50%; }
.orb-hint { position: absolute; z-index: 3; left: 0; top: 0; display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--hero-ink); white-space: nowrap; pointer-events: none; transition: opacity .5s; }
.orb-hint svg { width: 46px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 3 4; }
.orb-hint.flip { flex-direction: row-reverse; }
.orb-hint.flip svg { transform: scaleX(-1); }
.orb-hint.gone { opacity: 0; }
.hero:not(.ready) .orb, .hero:not(.ready) .orb-hint { opacity: 0; }

.landscape { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: 40%; min-height: 260px; pointer-events: none; }
.landscape svg { width: 100%; height: 100%; display: block; }
.hill-1 { fill: var(--hill-1); } .hill-2 { fill: var(--hill-2); } .hill-3 { fill: var(--hill-3); } .hill-4 { fill: var(--hill-4); }
.city-light { fill: #ffd27a; opacity: calc(var(--night-amt) * var(--o, 1)); animation: flicker var(--d, 4s) ease-in-out infinite; animation-delay: var(--delay, 0s); }
@keyframes flicker { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(.6); } }
.mosque-glow { opacity: calc(var(--night-amt) * .9); }
.haze { opacity: calc(.35 - var(--night-amt) * .3); }

.side-label { position: absolute; z-index: 4; left: calc(var(--gutter) * .45); top: 50%; transform: translate(-50%, -50%) rotate(-90deg); transform-origin: center; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--hero-ink-2); white-space: nowrap; }
@media (max-width: 900px) { .side-label { display: none; } }

.hero-content { position: relative; z-index: 4; min-height: max(700px, 100svh); display: flex; flex-direction: column; justify-content: center; padding-top: 100px; padding-bottom: 33vh; }
.hero-eyebrow { font-family: var(--mono); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--hero-ink-2); margin: 0 0 22px; display: flex; align-items: center; gap: 12px; min-height: 1.4em; }
.hero-eyebrow .spark { width: 8px; height: 8px; background: var(--sun); border-radius: 2px; transform: rotate(45deg); flex: none; }
.hero-eyebrow .caret { display: inline-block; width: .55em; height: 1.05em; background: currentColor; vertical-align: -3px; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(46px, min(6.9vw, 11.5vh), 112px); line-height: .98; letter-spacing: -.015em; margin: 0; }
.hero h1 em { font-style: italic; }
.hero h1 .u { position: relative; white-space: nowrap; }
.hero h1 .u svg { position: absolute; left: -2%; bottom: -.12em; width: 104%; height: .28em; overflow: visible; }
.hero h1 .u path { fill: none; stroke: var(--sun); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 1.2s .9s var(--spring) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero-sub { max-width: 560px; margin: 28px 0 32px; font-size: clamp(17px, 1.45vw, 20px); line-height: 1.45; letter-spacing: -.02em; color: var(--hero-ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero.is-night .btn-primary { background: #fff9f1; color: var(--ink); }
.hero.is-night .btn-ghost { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .25); color: #fff9f1; }
.hero-foot { position: absolute; z-index: 5; left: 0; right: 0; bottom: 22px; display: flex; justify-content: space-between; align-items: end; color: rgba(255, 249, 241, .85); pointer-events: none; }
.scroll-cue { display: flex; align-items: center; gap: 10px; }
.scroll-cue i { width: 1px; height: 34px; background: currentColor; opacity: .6; animation: cue 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }
@media (max-width: 760px) {
  .hero-content { justify-content: flex-start; padding-top: 124px; padding-bottom: 36vh; }
  .hero h1 br { display: none; }
  .orb { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
  .orb .moon { inset: 9px; }
  .orb .sun { box-shadow: 0 0 0 8px rgba(255, 214, 120, .2), 0 0 30px 10px rgba(255, 200, 100, .35); }
  .hero-foot .coords { display: none; }
}

/* ==========================================================
   Intro statement
   ========================================================== */
.intro { padding: clamp(110px, 14vw, 190px) 0 clamp(70px, 9vw, 120px); }
.intro-copy { max-width: 940px; margin: 0 auto; text-align: center; font-size: clamp(22px, 2.3vw, 32px); line-height: 1.358; letter-spacing: -.04em; }
.intro-copy p { margin: 0; }
.intro-copy p + p { margin-top: 1.1em; font-weight: 700; }
.intro-copy .hl { font-family: var(--serif); font-style: italic; letter-spacing: -.01em; }
.intro-copy .chip { display: inline-flex; align-items: center; gap: .3em; padding: 0 .35em; margin: 0 .05em; border-radius: .4em; font-size: .9em; vertical-align: .04em; line-height: 1.25; }
.intro-copy .chip.ai { background: var(--ia); }
.intro-copy .chip.health { background: var(--gaia); }
.intro-copy .chip.sport { background: #dbe2f5; }

/* ==========================================================
   Work tiles
   ========================================================== */
.project-tiles { display: flex; flex-direction: column; gap: 25px; padding: 0 var(--gutter); max-width: 1440px; margin: 0 auto; }
.tiles-row { display: flex; gap: 1.97%; --reveal: 1; transform: scale(calc(.6 + .4 * var(--reveal))); opacity: calc(.35 + .65 * var(--reveal)); transform-origin: center center; will-change: transform, opacity; }
.project-tile { position: relative; flex-shrink: 0; height: clamp(420px, 41vw, 595px); border-radius: 40px; overflow: hidden; display: block; text-decoration: none; color: inherit; box-shadow: inset 0 0 0 0 #323131; transition: box-shadow .35s var(--ease); isolation: isolate; }
.project-tile:hover { box-shadow: inset 0 0 0 1px #323131; }
.tile-wide { width: 59.39%; }
.tile-narrow { width: 38.64%; }
.tile-scene { position: absolute; inset: 0; z-index: 0; }
.tile-scene::after { content: ""; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E"); mix-blend-mode: multiply; pointer-events: none; }
.tile-overlay { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px; backdrop-filter: blur(7.7px); -webkit-backdrop-filter: blur(7.7px); background: rgba(255, 249, 241, .42); opacity: 0; transition: opacity .35s var(--ease); text-align: center; }
.project-tile:hover .tile-overlay, .project-tile:focus-visible .tile-overlay { opacity: 1; }
.tile-overlay-title { margin: 0; font-size: clamp(26px, 2.8vw, 40px); letter-spacing: -.04em; line-height: 1.358; text-transform: uppercase; }
.tile-overlay-subtitle { margin: 0; font-size: clamp(15px, 1.35vw, 19px); letter-spacing: -.04em; line-height: 1.358; max-width: 30ch; }
.tile-overlay .go { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; padding: 8px 14px; border-radius: 999px; background: var(--ink); color: var(--bg); }
.tile-caption { display: none; }

/* scene: GAIA (fanned phones) */
.scene-gaia { background: radial-gradient(120% 90% at 50% 110%, #a9cbbd 0%, #cfe3db 55%, #e7f0ea 100%); }
.phone { position: absolute; width: clamp(150px, 15vw, 218px); aspect-ratio: 9 / 19.2; border-radius: 34px; padding: 7px; background: linear-gradient(145deg, #2b2f2d, #0c0d0d); box-shadow: 0 2px 0 1px rgba(255, 255, 255, .12) inset, 0 30px 60px -20px rgba(20, 50, 40, .55), 0 12px 24px -12px rgba(0, 0, 0, .35); transition: transform .8s var(--spring); }
.phone .screen { width: 100%; height: 100%; border-radius: 28px; overflow: hidden; background: #fff; }
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; transform: scale(1.03); }
.scene-gaia .phone.c { left: 50%; top: 13%; transform: translateX(-50%); z-index: 3; }
.scene-gaia .phone.l { left: 50%; top: 21%; transform: translateX(-138%) rotate(-9deg); z-index: 2; }
.scene-gaia .phone.r { left: 50%; top: 21%; transform: translateX(38%) rotate(9deg); z-index: 2; }
.project-tile:hover .scene-gaia .phone.l { transform: translateX(-148%) rotate(-12deg); }
.project-tile:hover .scene-gaia .phone.r { transform: translateX(48%) rotate(12deg); }

/* scene: ImagineArt (browser window bleeding off) */
.scene-ia { background: radial-gradient(90% 70% at 20% 10%, #f6f0ff 0%, #e3dbf5 45%, #c9b8ee 100%); }
.scene-ia .blob { position: absolute; border-radius: 50%; filter: blur(30px); opacity: .7; }
.scene-ia .blob.a { width: 60%; height: 40%; left: -10%; bottom: -5%; background: #f5b8d8; }
.scene-ia .blob.b { width: 50%; height: 40%; right: -10%; top: 5%; background: #b8c8ff; }
.browser { position: absolute; left: 12%; top: 16%; width: 150%; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 40px 80px -30px rgba(60, 30, 120, .55), 0 0 0 1px rgba(60, 30, 120, .08); transform: rotate(-4deg); transform-origin: top left; transition: transform .8s var(--spring); }
.browser .bar { height: 26px; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: #f3f0f8; border-bottom: 1px solid #e6e0f0; }
.browser .bar i { width: 9px; height: 9px; border-radius: 50%; background: #d9d2e6; }
.browser .bar i:nth-child(1) { background: #ff8f80; } .browser .bar i:nth-child(2) { background: #ffd36b; } .browser .bar i:nth-child(3) { background: #7fd68b; }
.browser img { width: 100%; }
.project-tile:hover .browser { transform: rotate(-2deg) translate(-2%, -2%); }

/* scene: StableStakes (laptop) */
.scene-ss { background: radial-gradient(110% 80% at 50% 0%, #3a56a8 0%, #1b2a55 55%, #0e1630 100%); }
.scene-ss .track { position: absolute; left: -10%; right: -10%; bottom: -30%; height: 60%; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .14); }
.scene-ss .track.t2 { bottom: -38%; height: 70%; border-color: rgba(255, 255, 255, .08); }
.laptop { position: absolute; left: 50%; top: 52%; width: min(78%, 680px); transform: translate(-50%, -50%); transition: transform .8s var(--spring); }
.laptop .lid { position: relative; border-radius: 18px 18px 6px 6px; padding: 2.2% 2.2% 3%; background: linear-gradient(160deg, #3b3f46, #15171b); box-shadow: 0 1px 0 1px rgba(255, 255, 255, .1) inset, 0 50px 80px -30px rgba(0, 0, 0, .7); }
.laptop .lid img { width: 100%; border-radius: 4px; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.laptop .base { height: 14px; margin: 0 -7%; border-radius: 0 0 16px 16px; background: linear-gradient(180deg, #c9ccd2, #8b8f97); box-shadow: 0 18px 30px -10px rgba(0, 0, 0, .6); position: relative; }
.laptop .base::before { content: ""; position: absolute; left: 50%; top: 0; width: 16%; height: 5px; transform: translateX(-50%); border-radius: 0 0 8px 8px; background: #a3a7ae; }
.project-tile:hover .laptop { transform: translate(-50%, -52%) scale(1.03); }

/* scene: D4 (in progress) */
.scene-d4 { background: linear-gradient(180deg, #2e3770 0%, #a0618a 60%, #f39a6b 100%); }
.wire { position: absolute; left: 50%; top: 50%; width: 64%; transform: translate(-50%, -54%) rotate(-3deg); display: grid; gap: 10px; }
.wire > div { background: rgba(255, 249, 241, .16); border: 1px solid rgba(255, 249, 241, .3); border-radius: 12px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.wire .w1 { height: 120px; } .wire .w2 { height: 48px; width: 70%; } .wire .w3 { height: 80px; }
.wire .row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; background: none; border: 0; backdrop-filter: none; }
.wire .row span { height: 70px; border-radius: 12px; background: rgba(255, 249, 241, .16); border: 1px solid rgba(255, 249, 241, .3); }
.tile-soon { cursor: default; }
.tile-soon .tile-overlay { opacity: 1; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; justify-content: flex-end; color: #fff9f1; }
.tile-soon .pill { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: rgba(255, 249, 241, .2); border: 1px solid rgba(255, 249, 241, .35); margin-bottom: 10px; }

@media (max-width: 1100px) {
  .project-tile { border-radius: 30px; }
}
@media (max-width: 760px) {
  .tiles-row { flex-direction: column; gap: 16px; transform: none; opacity: 1; }
  .project-tiles { gap: 16px; }
  .tile-wide, .tile-narrow { width: 100%; height: clamp(320px, 92vw, 460px); }
  .tile-overlay { display: none; }
  .tile-soon .tile-overlay { display: flex; }
  .tile-caption { display: block; padding: 4px 6px 18px; }
  .tile-caption b { display: block; font-weight: 500; text-transform: uppercase; letter-spacing: -.03em; font-size: 20px; }
  .tile-caption span { color: var(--muted); }
  .phone { width: 34vw; }
}

/* ==========================================================
   Experience
   ========================================================== */
.xp { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.xp li { display: grid; grid-template-columns: 56px minmax(0, 1.1fr) minmax(0, 1.7fr) auto 150px; gap: 24px; align-items: center; padding: 26px 18px; border-bottom: 1px solid var(--line); border-radius: 18px; transition: background .3s, transform .4s var(--spring); }
.xp li:hover { background: var(--paper); transform: translateX(6px); }
.xp .logo { width: 56px; height: 56px; border-radius: 14px; overflow: hidden; background: var(--bg-2); }
.xp .logo img { width: 100%; height: 100%; object-fit: contain; }
.xp h3 { margin: 0; font-weight: 500; font-size: 22px; letter-spacing: -.03em; display: flex; align-items: center; gap: 10px; }
.xp .role { color: var(--muted); font-size: 15px; }
.xp .what { margin: 0; color: var(--ink-2); font-size: 17px; letter-spacing: -.02em; }
.xp .tools { display: flex; gap: 6px; }
.xp .tools img { width: 28px; height: 28px; border-radius: 8px; }
.xp .when { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--muted); text-align: right; text-transform: uppercase; }
.now-dot { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--margalla); background: rgba(63, 191, 106, .12); padding: 3px 8px; border-radius: 999px; }
.now-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #3fbf6a; }
.xp-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 28px; color: var(--muted); font-size: 15px; }
.xp-foot a { color: var(--ink); }
@media (max-width: 960px) {
  .xp li { grid-template-columns: 48px minmax(0, 1fr); gap: 6px 16px; padding: 22px 6px; }
  .xp .logo { width: 48px; height: 48px; grid-row: span 2; align-self: start; }
  .xp .what, .xp .tools, .xp .when { grid-column: 2; text-align: left; }
  .xp .tools { margin-top: 6px; }
  .xp li:hover { transform: none; }
}

/* ==========================================================
   Reviews · golden hour over the Margallas
   ========================================================== */
.reviews { position: relative; overflow: hidden; isolation: isolate; padding: clamp(100px, 12vw, 160px) 0 0; background: linear-gradient(180deg, var(--bg) 0%, #fde3c2 22%, #f6b68a 52%, #d77d72 78%, #8a5a8c 100%); }
.reviews .sunset { position: absolute; left: 50%; bottom: 150px; width: min(520px, 70vw); aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle, #fff1c9 0%, #ffd27f 45%, rgba(255, 190, 110, 0) 70%); z-index: 0; }
.reviews .birds { position: absolute; z-index: 1; top: 24%; left: 12%; width: 120px; stroke: rgba(60, 30, 50, .55); fill: none; stroke-width: 2; stroke-linecap: round; animation: fly 26s linear infinite; }
@keyframes fly { from { transform: translate(-20vw, 20px); } to { transform: translate(100vw, -40px); } }
.reviews .sec-head { position: relative; z-index: 3; }
.reviews .heading { color: #2a1520; }
.reviews .eyebrow { color: rgba(42, 21, 32, .6); }
.marquee { position: relative; z-index: 4; overflow: hidden; padding: 20px 0 60px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 24px; width: max-content; animation: scrollx 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scrollx { to { transform: translateX(calc(-50% - 12px)); } }
.review { width: min(420px, 82vw); flex: none; display: flex; flex-direction: column; gap: 22px; padding: 30px; border-radius: 28px; background: rgba(255, 249, 241, .55); border: 1px solid rgba(255, 255, 255, .7); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); box-shadow: 0 30px 60px -30px rgba(90, 40, 60, .5); transition: transform .5s var(--spring), background .3s; }
.review:nth-child(odd) { transform: rotate(-1.2deg); }
.review:nth-child(even) { transform: rotate(1deg) translateY(18px); }
.review:hover { transform: rotate(0) translateY(-6px); background: rgba(255, 249, 241, .8); }
.review .q { font-family: var(--serif); font-size: 72px; line-height: .5; height: 28px; color: #d77d72; }
.review p { margin: 0; font-size: 17px; line-height: 1.5; letter-spacing: -.02em; color: #2a1520; flex: 1; }
.review .who { display: flex; align-items: center; gap: 12px; padding-top: 18px; border-top: 1px solid rgba(42, 21, 32, .12); }
.review .avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #f6b68a; font-family: var(--serif); font-size: 20px; color: #2a1520; flex: none; }
.review .who b { display: block; font-weight: 500; }
.review .who span { font-size: 14px; color: rgba(42, 21, 32, .6); }
.review .co { margin-left: auto; width: 34px; height: 34px; border-radius: 10px; opacity: .85; }
.review.placeholder p { font-style: italic; opacity: .75; }
.reviews .ridge { position: relative; z-index: 2; margin-top: -40px; height: clamp(140px, 16vw, 220px); pointer-events: none; }
.reviews .ridge svg { width: 100%; height: 100%; display: block; }
.placeholder-note { position: relative; z-index: 4; text-align: center; color: rgba(42, 21, 32, .6); margin: -30px 0 40px; }

/* ==========================================================
   Footer · night over the Margallas
   ========================================================== */
.footer-scene { --night-amt: 1; position: relative; overflow: hidden; isolation: isolate; background: linear-gradient(180deg, #2b2246 0%, var(--night) 30%, var(--night-2) 75%, #3a3a6a 100%); color: #fff9f1; cursor: crosshair; padding: clamp(110px, 14vw, 180px) 0 0; }
.footer-scene .placed-star { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff7d6; box-shadow: 0 0 10px 3px rgba(255, 240, 190, .8); animation: placed .8s var(--spring) both; pointer-events: none; }
@keyframes placed { from { transform: scale(0); opacity: 0; } 60% { transform: scale(2); opacity: 1; } to { transform: scale(1); } }
.footer-inner { position: relative; z-index: 2; text-align: center; }
.footer-inner .mono { color: rgba(255, 249, 241, .6); }
.footer-inner h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(48px, 7.5vw, 112px); line-height: 1; letter-spacing: -.015em; margin: 18px auto 24px; max-width: 13ch; }
.footer-inner h2 em { color: #ffd98a; }
.footer-inner > p { max-width: 540px; margin: 0 auto 34px; font-size: 18px; letter-spacing: -.02em; color: rgba(255, 249, 241, .75); }
.footer-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; cursor: default; }
.footer-scene .btn-primary { background: #fff9f1; color: var(--ink); }
.footer-scene .btn-ghost { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: #fff9f1; }
.copy-toast { display: block; min-height: 22px; margin-top: 14px; font-size: 14px; color: #ffd98a; }
.star-hint { margin-top: 22px; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 249, 241, .55); }
.footer-hills { position: relative; z-index: 1; margin-top: clamp(30px, 6vw, 70px); height: clamp(160px, 22vw, 280px); pointer-events: none; }
.footer-hills svg { width: 100%; height: 100%; display: block; }
.footer-bar { position: absolute; z-index: 3; left: 0; right: 0; bottom: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; color: rgba(255, 249, 241, .65); cursor: default; }
.footer-bar a { color: rgba(255, 249, 241, .85); text-decoration: none; }
.footer-bar a:hover { color: #fff; }
.footer-bar nav { display: flex; gap: 18px; }

/* ==========================================================
   About
   ========================================================== */
.page-hero { position: relative; overflow: hidden; padding: 180px 0 0; background: linear-gradient(180deg, #2e3770 0%, #a0618a 55%, #f39a6b 100%); color: #fff9f1; }
.page-hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(50px, 8vw, 120px); line-height: .98; letter-spacing: -.015em; margin: 16px 0 26px; max-width: 14ch; }
.page-hero h1 em { color: #ffd98a; }
.page-hero .lede { max-width: 600px; font-size: clamp(17px, 1.5vw, 21px); letter-spacing: -.02em; color: rgba(255, 249, 241, .85); margin: 0; }
.page-hero .mono { color: rgba(255, 249, 241, .7); }
.mini-hills { margin-top: 80px; height: 160px; }
.mini-hills svg { width: 100%; height: 100%; display: block; }

.cards-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 28px; padding: 28px; display: flex; flex-direction: column; gap: 14px; transition: transform .45s var(--spring), box-shadow .45s var(--spring); }
.card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -30px rgba(6, 6, 6, .3); }
.card .num { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .1em; }
.card h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.08; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--ink-2); font-size: 16px; letter-spacing: -.01em; }
.card .icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--bg-2); }
.card .icon svg { width: 22px; height: 22px; stroke: var(--ink); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card .tool-row { display: flex; gap: 6px; margin-top: auto; padding-top: 6px; }
.card .tool-row img { width: 26px; height: 26px; border-radius: 8px; }
@media (max-width: 1080px) { .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .cards-3 { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .cards-4 { grid-template-columns: 1fr; } }

.statband { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.statband div { padding: 34px 20px; border-right: 1px solid var(--line); }
.statband div:last-child { border-right: 0; }
.statband strong { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 5vw, 72px); line-height: 1; }
.statband span { display: block; margin-top: 8px; color: var(--muted); font-size: 15px; }
@media (max-width: 760px) { .statband { grid-template-columns: repeat(2, minmax(0, 1fr)); } .statband div:nth-child(2) { border-right: 0; } .statband div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

.toolkit { display: grid; grid-template-columns: 180px 1fr; border-top: 1px solid var(--line); }
.toolkit > * { padding: 22px 0; border-bottom: 1px solid var(--line); }
.toolkit dt { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 30px; }
.toolkit dd { margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tool { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: 15px; }
.tool img { width: 28px; height: 28px; border-radius: 8px; }
@media (max-width: 640px) { .toolkit { grid-template-columns: 1fr; } .toolkit dt { padding: 22px 0 0; border-bottom: 0; } }

.offclock { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.oc-card { position: relative; overflow: hidden; border-radius: 28px; padding: 28px; min-height: 270px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; border: 1px solid var(--line); }
.oc-card h3 { margin: 0 0 8px; font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.05; }
.oc-card p { margin: 0; color: var(--ink-2); font-size: 16px; }
.oc-card svg { width: 96px; height: 96px; }
.oc-card.pulao { background: #fbefd9; cursor: pointer; }
.oc-card.home { background: #e9eef6; }
.oc-card.lang { background: #f3e6ea; }
.oc-card.lang .flags { font-family: var(--serif); font-size: 46px; line-height: 1; }
.steam path { stroke: #c79a5a; stroke-width: 3; fill: none; stroke-linecap: round; animation: steam 3s ease-in-out infinite; opacity: .7; }
.steam path:nth-child(2) { animation-delay: .6s; } .steam path:nth-child(3) { animation-delay: 1.2s; }
@keyframes steam { 0% { transform: translateY(6px); opacity: 0; } 40% { opacity: .8; } 100% { transform: translateY(-8px); opacity: 0; } }
.pulao-lid { transform-box: fill-box; transform-origin: 85% 100%; transition: transform .6s var(--spring); }
.oc-card.pulao:hover .pulao-lid, .oc-card.pulao.open .pulao-lid { transform: rotate(-22deg) translateY(-6px); }
@media (max-width: 960px) { .offclock { grid-template-columns: 1fr; } .oc-card { min-height: 0; } }

.edu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.edu .card h3 { font-size: 26px; }
@media (max-width: 700px) { .edu { grid-template-columns: 1fr; } }

/* ==========================================================
   Case study pages
   ========================================================== */
.case { --c: var(--gaia); --ci: var(--gaia-ink); }
.case.ia { --c: var(--ia); --ci: var(--ia-ink); }
.case.ss { --c: #dbe2f5; --ci: var(--ss-ink); }
.case-hero { background: var(--c); padding: 160px 0 60px; position: relative; overflow: hidden; }
.case-hero::after { content: ""; position: absolute; right: -10vw; top: -20vw; width: 50vw; height: 50vw; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .55), transparent 65%); pointer-events: none; }
.back-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink-2); font-size: 15px; }
.case-hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(56px, 9.5vw, 136px); line-height: .95; margin: 26px 0 16px; letter-spacing: -.015em; }
.case-hero .subtitle { font-size: clamp(20px, 2.2vw, 30px); letter-spacing: -.04em; line-height: 1.3; max-width: 30ch; margin: 0 0 44px; color: var(--ink-2); }
.case-meta { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; border-top: 1px solid rgba(6, 6, 6, .14); padding-top: 22px; }
.case-meta span { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.case-meta b { font-weight: 500; }
.case-meta a { color: var(--ci); }
.case-meta .tools { display: flex; gap: 6px; }
.case-meta .tools img { width: 26px; height: 26px; border-radius: 8px; }
@media (max-width: 760px) { .case-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.case-cover { margin-top: 50px; border-radius: 28px; overflow: hidden; box-shadow: 0 30px 70px -40px rgba(6, 6, 6, .45); background: var(--paper); }

.case-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); padding: 90px 0 40px; }
.toc { position: sticky; top: 100px; align-self: start; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 2px solid transparent; text-decoration: none; color: var(--muted); font-size: 14px; transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--ink); border-left-color: var(--ci); }
@media (max-width: 960px) { .case-body { grid-template-columns: 1fr; } .toc { display: none; } }

.case-section { padding-bottom: 76px; scroll-margin-top: 100px; }
.case-section > h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 4.4vw, 56px); line-height: 1.05; margin: 0 0 22px; letter-spacing: -.01em; }
.case-section > h3 { font-size: 21px; font-weight: 500; letter-spacing: -.03em; margin: 44px 0 10px; }
.case-section p { font-size: 18px; line-height: 1.6; letter-spacing: -.015em; color: var(--ink-2); margin: 0 0 18px; max-width: 68ch; }
.case-section p.pull { font-family: var(--serif); font-size: clamp(30px, 3.2vw, 42px); line-height: 1.15; letter-spacing: -.01em; color: var(--ink); margin: 34px 0; max-width: 24ch; }
.case-section p.pull em { color: var(--ci); }
.tldr { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 22px 24px; margin: 0 0 28px; }
.tldr .mono { color: var(--ci); font-size: 11px; }
.tldr p { margin: 8px 0 0 !important; font-size: 17px !important; color: var(--ink) !important; }

.hmw { list-style: none; counter-reset: h; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; }
.hmw li { counter-increment: h; display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; font-size: 17px; letter-spacing: -.01em; }
.hmw li::before { content: counter(h); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: var(--ci); font-weight: 600; }
.hmw b { color: var(--ci); font-weight: 600; }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 30px 0; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.stat strong { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4vw, 50px); line-height: 1; color: var(--ci); }
.stat span { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); }
@media (max-width: 760px) { .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 26px 0; }
.pillar { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.pillar h4 { margin: 0 0 6px; font-size: 17px; font-weight: 500; }
.pillar p { font-size: 15px !important; margin: 0 !important; color: var(--muted) !important; }
@media (max-width: 760px) { .pillars { grid-template-columns: 1fr; } }
.quotes-inline { display: grid; gap: 10px; margin: 24px 0; }
.quotes-inline blockquote { margin: 0; padding: 14px 18px; border-left: 3px solid var(--ci); background: var(--paper); border-radius: 0 16px 16px 0; font-family: var(--serif); font-size: 23px; line-height: 1.3; }
figure.shot { margin: 28px 0 36px; }
figure.shot img { width: 100%; border-radius: 24px; cursor: zoom-in; background: var(--c); transition: transform .5s var(--spring), box-shadow .5s var(--spring); }
figure.shot img:hover { transform: translateY(-3px); box-shadow: 0 24px 50px -30px rgba(6, 6, 6, .35); }
figure.shot figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); display: flex; gap: 10px; }
figure.shot figcaption::before { content: "↳"; color: var(--ci); }
.learnings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
.learning { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.learning h3 { margin: 0 0 8px; font-size: 18px; font-weight: 500; letter-spacing: -.02em; }
.learning p { font-size: 15px !important; margin: 0 !important; color: var(--muted) !important; }
@media (max-width: 760px) { .learnings { grid-template-columns: 1fr; } }
.next-case { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 40px clamp(20px, 4vw, 48px); margin: 30px 0 100px; background: var(--paper); border: 1px solid var(--line); border-radius: 36px; text-decoration: none; transition: transform .4s var(--spring), box-shadow .4s var(--spring); }
.next-case:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -30px rgba(6, 6, 6, .3); }
.next-case .mono { color: var(--muted); }
.next-case h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 5vw, 66px); line-height: 1; margin: 8px 0 0; }
.next-case .circle { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-size: 22px; transition: transform .4s var(--spring); }
.next-case:hover .circle { transform: rotate(-45deg); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; display: none; background: rgba(15, 24, 56, .88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); padding: 4vh 3vw; cursor: zoom-out; overflow: auto; }
.lightbox.open { display: grid; place-items: center; }
.lightbox img { max-width: min(1600px, 100%); height: auto; border-radius: 14px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); }
.lightbox .close { position: fixed; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff9f1; cursor: pointer; font-size: 20px; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--spring), transform .9s var(--spring); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .tiles-row { transform: none !important; opacity: 1 !important; }
  .cloud, .reviews .birds { display: none; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .hero h1 .u path { stroke-dashoffset: 0; }
}

/* Static drag note under hero buttons */
.orb-hint.static { position: static; margin: 26px 0 0; gap: 10px; font-size: 12px; transform: none !important; }
.orb-hint.static .ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(242, 181, 68, .25); color: #c47a10; font-size: 13px; letter-spacing: 0; }
.hero.is-night .orb-hint.static .ico { background: rgba(255, 249, 241, .15); color: #fff9f1; }
.hero:not(.ready) .orb-hint.static { opacity: 1; }
.xp li { grid-template-columns: 56px minmax(0, 1.1fr) minmax(0, 1.7fr) auto 178px; }
.xp .when { white-space: nowrap; }
@media (max-width: 960px) { .xp li { grid-template-columns: 48px minmax(0, 1fr); } }
/* Real logos: transparent PNG marks sit on white with breathing room */
.xp .logo img[src$=".png"], .review .co[src$=".png"] { object-fit: contain; padding: 8px; background: #fff; }
.review .co { object-fit: cover; }
.xp li { grid-template-columns: 56px minmax(230px, 1.1fr) minmax(0, 1.6fr) auto 170px; gap: 22px; }
.xp h3 { white-space: nowrap; }
.xp .tools { gap: 5px; }
.xp .tools img { width: 26px; height: 26px; object-fit: cover; }
@media (max-width: 1180px) { .xp li { grid-template-columns: 56px minmax(220px, 1fr) minmax(0, 1.3fr) 170px; } .xp .tools { grid-column: 3; grid-row: 2; } .xp .when { grid-column: 4; grid-row: 1; } }
@media (max-width: 960px) { .xp li { grid-template-columns: 48px minmax(0, 1fr); } .xp .tools, .xp .when { grid-column: 2; grid-row: auto; } .xp h3 { white-space: normal; } }

/* Logos with a white background get an outline so they don't melt into the page */
:root { --logo-outline: rgba(0, 0, 0, .3); }
img[src*="tools/figma.png"], img[src*="companies/d4-interactive.png"] { box-shadow: inset 0 0 0 1px var(--logo-outline); outline: 1px solid var(--logo-outline); outline-offset: -1px; }
.xp .logo img { border-radius: inherit; }

/* ==========================================================
   HERO v3 · centred, minimal, glass/grain
   ========================================================== */
.hero, .hero.is-night { --hero-ink: #fff9f1; --hero-ink-2: rgba(255, 249, 241, .88); }
.hero-glow { position: absolute; inset: 0; z-index: 1; pointer-events: none; mix-blend-mode: soft-light;
  background:
    radial-gradient(55% 45% at 68% 22%, rgba(255, 255, 255, .55), transparent 70%),
    radial-gradient(70% 60% at 20% 80%, rgba(255, 255, 255, .25), transparent 70%); }
.hero-noise { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: .14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.2 -0.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1 -0.45'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
}
.hero .landscape { z-index: 2; }
.hero .hero-noise { z-index: 3; }

.hero-content { align-items: center; text-align: center; justify-content: center; padding-top: 90px; padding-bottom: 30vh; }
.hero-eyebrow { justify-content: center; font-size: 14px; letter-spacing: .1em; color: var(--hero-ink); margin: 0 0 26px; }
.hero-eyebrow .spark { width: 10px; height: 10px; border-radius: 50%; transform: none; background: #ffd23f; }
.hero h1 {
  font-family: var(--serif); font-weight: 400; color: var(--hero-ink);
  font-size: clamp(54px, min(9.4vw, 15vh), 136px);
  line-height: 1.2; letter-spacing: .02em; max-width: none;
  text-shadow: 0 2px 40px rgba(20, 40, 90, .18);
}
.h-line { display: block; white-space: nowrap; }
.roll { display: inline-grid; vertical-align: bottom; overflow: hidden; justify-items: start; padding-bottom: .08em; }
.roll-word { grid-area: 1 / 1; transform: translateY(100%); opacity: 0; transition: transform .7s var(--spring), opacity .5s; }
.roll-word.is-on { transform: none; opacity: 1; }
.roll-word.is-off { transform: translateY(-100%); opacity: 0; }

.side-label { font-weight: 700; font-size: 13px; letter-spacing: .1em; color: var(--hero-ink); }
.hero-foot { color: var(--hero-ink); }
.drag-note { display: inline-flex; align-items: center; gap: 10px; }
.drag-note .ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 249, 241, .2); border: 1px solid rgba(255, 249, 241, .4); letter-spacing: 0; font-size: 13px; }
@media (max-width: 760px) {
  .hero-content { justify-content: center; padding-top: 110px; padding-bottom: 34vh; }
  .hero h1 { font-size: clamp(42px, 13vw, 64px); }
  .h-line { white-space: normal; }
}
.roll { transition: width .7s var(--spring); }
.roll-word { white-space: nowrap; width: max-content; }
.hero .cloud { opacity: calc(.62 - var(--night-amt) * .3); }
.hero-eyebrow, .side-label, .hero-foot { text-shadow: 0 1px 14px rgba(20, 40, 90, .35); }
.hero h1 { text-shadow: 0 2px 40px rgba(20, 40, 90, .28); }
.hero-eyebrow { display: block; max-width: 34ch; margin-left: auto; margin-right: auto; line-height: 1.6; }
.hero-eyebrow .spark { display: inline-block; vertical-align: 1px; margin-right: 10px; }

/* ==========================================================
   v4 · Theme toggle + Zainab-style hero layout
   ========================================================== */
.theme-pill { padding: 5px; }
.theme-toggle { width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: #fff9f1; color: #e0a020; box-shadow: inset 0 0 0 1px rgba(6, 6, 6, .08); position: relative; overflow: hidden; transition: background .4s, color .4s; }
.theme-toggle svg { width: 22px; height: 22px; fill: currentColor; position: absolute; transition: transform .5s var(--spring), opacity .35s; }
.theme-toggle .ico-moon { transform: translateY(120%) rotate(-40deg); opacity: 0; }
html[data-theme="dark"] .theme-toggle { background: #1c2340; color: #f4ecd8; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
html[data-theme="dark"] .theme-toggle .ico-sun { transform: translateY(-120%) rotate(40deg); opacity: 0; }
html[data-theme="dark"] .theme-toggle .ico-moon { transform: none; opacity: 1; }
.theme-toggle:hover svg { transform: rotate(20deg) scale(1.06); }
html[data-theme="dark"] .theme-toggle:hover .ico-moon { transform: rotate(-12deg) scale(1.06); }

/* Orb: fixed spot, top-right; click toggles theme */
.hero .orb { left: auto; top: auto; right: 9%; top: 15%; margin: 0; width: clamp(90px, 10vw, 150px); height: clamp(90px, 10vw, 150px); cursor: pointer; transform: none !important; touch-action: auto; }
.hero .orb .moon { inset: 14%; }
.hero .orb .moon::before { width: 18%; height: 18%; left: 24%; top: 26%; }
.hero .orb .moon::after { width: 11%; height: 11%; left: 56%; top: 52%; }
.hero .orb .sun { background: radial-gradient(circle at 40% 38%, #fff6d6 0%, #ffe39a 35%, #f6c64a 70%, #eea436 100%); }
.hero .orb .sun::after { content: ""; position: absolute; inset: -18%; border-radius: 50%; background: repeating-linear-gradient(135deg, rgba(255, 214, 90, .55) 0 7px, transparent 7px 16px); -webkit-mask: radial-gradient(circle, transparent 54%, #000 55%, #000 70%, transparent 71%); mask: radial-gradient(circle, transparent 54%, #000 55%, #000 70%, transparent 71%); animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-content { align-items: center; text-align: left; justify-content: center; padding-top: 90px; padding-bottom: 28vh; }
.hero-wrap { position: relative; display: inline-block; }
.hero .side-label { position: absolute; left: -56px; top: 52%; transform: translate(-50%, -50%) rotate(-90deg); font-weight: 700; font-size: 13px; letter-spacing: .1em; }
.hero-eyebrow { display: flex; justify-content: flex-start; align-items: center; max-width: none; margin: 0 0 4px; font-size: 14px; letter-spacing: .1em; }
.hero-eyebrow .spark { display: block; width: 11px; height: 11px; margin: 0; border-radius: 50%; background: #ffd23f; }
.hero h1.hero-title { font-family: var(--serif); font-weight: 400; color: var(--hero-ink); font-size: clamp(54px, min(9.6vw, 15.5vh), 136px); line-height: 1.2; letter-spacing: .02em; margin: 0; text-shadow: 0 2px 40px rgba(20, 40, 90, .28); }
.hero-title .h-line { display: block; white-space: nowrap; }
.hero-title .l2 { display: flex; align-items: center; gap: .38em; }
.hero-title .roll { display: inline-grid; justify-items: start; overflow: hidden; width: auto !important; padding-bottom: .06em; }

/* Inline widget (sits where Zainab's recorder sits) */
.hero-widget { flex: none; width: 3.1em; height: .96em; border-radius: .48em; text-decoration: none; color: var(--ink); display: block;
  background: linear-gradient(180deg, rgba(255, 252, 246, .92), rgba(240, 232, 218, .86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -3px 8px rgba(120, 100, 70, .12), 0 18px 40px -16px rgba(15, 24, 56, .45);
  border: 1px solid rgba(255, 255, 255, .7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .5s var(--spring); text-shadow: none; letter-spacing: 0; }
.hero-widget:hover { transform: translateY(-3px) rotate(-1deg); }
.hw-inner { font-family: var(--sans); font-size: .115em; height: 100%; display: flex; align-items: center; gap: 1.1em; padding: 0 1.2em 0 1em; }
.hw-stack { position: relative; width: 6.4em; height: 5.4em; flex: none; }
.hw-stack img { position: absolute; top: 50%; width: 4.2em; height: 4.2em; object-fit: cover; object-position: top; border-radius: 1em; border: 3px solid #fff; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .35); transition: transform .5s var(--spring); }
.hw-stack img:nth-child(1) { left: 0; transform: translateY(-50%) rotate(-10deg); }
.hw-stack img:nth-child(2) { left: 1.1em; transform: translateY(-50%) rotate(-2deg); }
.hw-stack img:nth-child(3) { left: 2.2em; transform: translateY(-50%) rotate(7deg); }
.hero-widget:hover .hw-stack img:nth-child(1) { transform: translate(-.5em, -55%) rotate(-16deg); }
.hero-widget:hover .hw-stack img:nth-child(3) { transform: translate(.6em, -45%) rotate(13deg); }
.hw-text { display: flex; flex-direction: column; gap: .3em; min-width: 0; flex: 1; }
.hw-label { font-family: var(--mono); font-size: .72em; letter-spacing: .1em; text-transform: uppercase; color: rgba(6, 6, 6, .5); }
.hw-title { font-size: 1.05em; font-weight: 500; letter-spacing: -.02em; white-space: nowrap; }
.hw-bar { display: block; height: .32em; border-radius: 1em; background: rgba(6, 6, 6, .1); overflow: hidden; }
.hw-bar i { display: block; height: 100%; width: 35%; border-radius: inherit; background: var(--ink); animation: hwbar 3.2s ease-in-out infinite; }
@keyframes hwbar { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
.hw-go { width: 2.6em; height: 2.6em; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff9f1; font-size: 1.1em; }
@media (max-width: 760px) {
  .hero-content { padding-top: 120px; padding-bottom: 34vh; }
  .hero h1.hero-title { font-size: clamp(44px, 13.5vw, 64px); }
  .hero-title .l2 { flex-wrap: wrap; gap: .18em .3em; }
  .hero-widget { order: 2; font-size: 64px; }
  .hero .side-label { display: none; }
  .hero .orb { right: 6%; top: 12%; width: 70px; height: 70px; }
}

/* ==========================================================
   Dark mode
   ========================================================== */
html[data-theme="dark"] {
  --bg: #0e1120; --bg-2: #1a1f33; --paper: #151a2c;
  --ink: #f4ecdd; --ink-2: rgba(244, 236, 221, .78); --muted: rgba(244, 236, 221, .55); --line: rgba(244, 236, 221, .12);
  --gaia: #1d302a; --gaia-ink: #8fd0b4; --ia: #251f3d; --ia-ink: #b9a0ff; --ss-ink: #9db4ff;
  color-scheme: dark;
}
html[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
html, body, .card, .xp li, .stat, .pillar, .learning, .hmw li, .tldr, .next-case, .tool, .nav-pill { transition: background-color .5s, color .5s, border-color .5s; }
html[data-theme="dark"] .nav-pill { background: rgba(18, 22, 40, .66); border-color: rgba(255, 255, 255, .1); }
html[data-theme="dark"] .nav-links a:hover, html[data-theme="dark"] .nav-links a[aria-current="page"] { background: rgba(255, 255, 255, .08); }
html[data-theme="dark"] .nav-links a.cta { background: #f4ecdd; color: #0e1120; }
html[data-theme="dark"] .btn-primary { background: #f4ecdd; color: #0e1120; }
html[data-theme="dark"] .btn-ghost { background: rgba(255, 255, 255, .06); border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] .heading { color: var(--ink); }
html[data-theme="dark"] .intro-copy .chip.ai { background: #2c2550; }
html[data-theme="dark"] .intro-copy .chip.health { background: #1f3a32; }
html[data-theme="dark"] .intro-copy .chip.sport { background: #22305a; }
html[data-theme="dark"] .tile-overlay { background: rgba(14, 17, 32, .5); color: var(--ink); }
html[data-theme="dark"] .tile-overlay .go { background: #f4ecdd; color: #0e1120; }
html[data-theme="dark"] .project-tile:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
html[data-theme="dark"] .xp li:hover { background: var(--paper); }
html[data-theme="dark"] .xp .logo { background: var(--bg-2); }
html[data-theme="dark"] .now-dot { color: #7fe0a0; }
html[data-theme="dark"] .card .icon svg { stroke: var(--ink); }
html[data-theme="dark"] .hw-label { color: rgba(6, 6, 6, .5); }
html[data-theme="dark"] .hero-widget { color: #060606; }
html[data-theme="dark"] .hw-go { background: #060606; }
html[data-theme="dark"] .hw-bar i { background: #060606; }
html[data-theme="dark"] .oc-card.pulao { background: #3a2c1c; }
html[data-theme="dark"] .oc-card.home { background: #1d2540; }
html[data-theme="dark"] .oc-card.lang { background: #3a2230; }
html[data-theme="dark"] .case-hero::after { background: radial-gradient(circle, rgba(255, 255, 255, .06), transparent 65%); }
html[data-theme="dark"] .case-meta { border-top-color: var(--line); }
html[data-theme="dark"] .hmw li::before { color: var(--ci); }
html[data-theme="dark"] :root, html[data-theme="dark"] { --logo-outline: rgba(255, 255, 255, .3); }
html[data-theme="dark"] .page-hero { background: linear-gradient(180deg, #0f1838 0%, #2e3770 55%, #6a4a7a 100%); }
html[data-theme="dark"] .page-hero .mini-hills path[fill="#fff9f1"] { fill: var(--bg); }
html[data-theme="dark"] .reviews { background: linear-gradient(180deg, var(--bg) 0%, #1b1d3a 25%, #3a2c5a 55%, #6b3f63 80%, #3a2a4f 100%); }
html[data-theme="dark"] .reviews .heading { color: #f4ecdd; }
html[data-theme="dark"] .reviews .eyebrow, html[data-theme="dark"] .placeholder-note { color: rgba(244, 236, 221, .6); }
html[data-theme="dark"] .reviews .sunset { background: radial-gradient(circle, rgba(255, 241, 201, .5) 0%, rgba(255, 210, 127, .25) 45%, rgba(255, 190, 110, 0) 70%); }
html[data-theme="dark"] .review { background: rgba(20, 24, 44, .55); border-color: rgba(255, 255, 255, .12); }
html[data-theme="dark"] .review:hover { background: rgba(20, 24, 44, .8); }
html[data-theme="dark"] .review p { color: #f4ecdd; }
html[data-theme="dark"] .review .who { border-top-color: rgba(255, 255, 255, .12); }
html[data-theme="dark"] .review .who span { color: rgba(244, 236, 221, .6); }

/* v5 · centred hero heading, no widget */
.hero-content { align-items: center; text-align: center; }
.hero-eyebrow { justify-content: center; margin: 0 0 18px; }
.hero h1.hero-title { text-align: center; }
.hero-title .l2 { display: block; }
.hero-title .roll { display: inline-grid; justify-items: start; vertical-align: bottom; transition: width .7s var(--spring); }
.hero-title .roll-word { white-space: nowrap; width: max-content; }
.hero > .side-label { position: absolute; left: calc(var(--gutter) * .55); top: 50%; transform: translate(-50%, -50%) rotate(-90deg); z-index: 4; }
@media (max-width: 760px) { .hero-title .h-line { white-space: normal; } }
img[src*="companies/bloom-designs"] { outline: 1px solid var(--logo-outline); outline-offset: -1px; }

/* Photo mockups with screens mapped in perspective */
.mock { overflow: hidden; background: #222; }
.mock::after { display: none; }
.mock-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--spring); }
.mock-screen { position: absolute; left: 0; top: 0; transform-origin: 0 0; object-fit: cover; object-position: top; opacity: 0; transition: opacity .4s; backface-visibility: hidden; }
.mock-screen.ready { opacity: 1; }
.mock-screen.phone-screen { border-radius: 9% / 4.2%; }
.mock-scaler { position: absolute; inset: 0; transition: transform 1.2s var(--spring); transform-origin: center; }
.project-tile:hover .mock-scaler { transform: scale(1.04); }
.project-tile:hover .mock > .mock-photo { transform: scale(1.04); }
.mock-screen { max-width: none; max-height: none; }

/* ==========================================================
   About v3 · intro + polaroids, accordion experience
   ========================================================== */
.about-intro { position: relative; overflow: hidden; min-height: max(760px, 100svh); display: flex; align-items: center; padding: 130px 0 160px; background: linear-gradient(180deg, #fff9f1 0%, #e7d6bd 100%); isolation: isolate; }
.ai-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(30px, 5vw, 80px); align-items: center; position: relative; z-index: 2; }
.ai-heading { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 2.9vw, 42px); line-height: 1.36; margin: 0 0 26px; color: #000; max-width: 20ch; }
.ai-copy p { font-size: clamp(18px, 1.7vw, 24px); line-height: 1.68; letter-spacing: -.04em; color: #2b2b2b; margin: 0 0 18px; max-width: 34em; }
.ai-copy strong { font-weight: 700; color: #000; }
.ai-sun { position: absolute; z-index: 1; right: 8%; top: 70px; width: 130px; height: 130px; border-radius: 50%; background: repeating-linear-gradient(135deg, #f6cf4a 0 7px, rgba(246, 207, 74, .35) 7px 14px); opacity: .9; }
.ai-cloud { position: absolute; z-index: 1; fill: #e9dcc6; opacity: .9; }
.ai-cloud.c1 { width: 280px; right: 14%; top: 110px; }
.ai-cloud.c2 { width: 200px; right: 2%; top: 150px; fill: #e3d3ba; }
.ai-ground { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 200px; z-index: 1; }
.ai-ground .sprigs { stroke: #cbb08a; stroke-width: 3; }
.ai-ground .hill-back { fill: #d8c1a0; }
.ai-ground .hill-front { fill: var(--bg); }

.ai-photos { position: relative; height: 520px; cursor: pointer; outline: none; }
.ai-polaroid { position: absolute; margin: 0; transition: transform .7s var(--spring), z-index 0s .25s; }
.ai-card { display: block; background: #fff; padding: 12px 12px 28px; border-radius: 3px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); transition: transform .5s var(--spring), box-shadow .5s; }
.ai-card img { display: block; width: 100%; aspect-ratio: 5 / 6; object-fit: cover; border-radius: 3px; }
.ai-polaroid.p1 { width: 248px; left: 34%; top: 2%; transform: rotate(-2deg); z-index: 1; }
.ai-polaroid.p2 { width: 284px; left: 6%; top: 18%; transform: rotate(-8deg); z-index: 2; }
.ai-polaroid.p3 { width: 266px; left: 42%; top: 28%; transform: rotate(7deg); z-index: 3; }
.ai-polaroid.p4 { width: 292px; left: 20%; top: 10%; transform: rotate(-1deg); z-index: 4; }
.ai-photos:hover .ai-polaroid.p4 .ai-card, .ai-photos:focus-visible .ai-polaroid.p4 .ai-card { transform: translateY(-8px) rotate(-1.5deg); box-shadow: 0 22px 40px rgba(0, 0, 0, .2); }
.ai-polaroid.leaving { transform: translateX(-60%) rotate(-18deg) !important; }
.ai-hint { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); color: rgba(6, 6, 6, .45); font-size: 11px; white-space: nowrap; }
@media (max-width: 900px) {
  .ai-grid { grid-template-columns: 1fr; }
  .ai-photos { height: 440px; max-width: 420px; width: 100%; margin: 0 auto; }
  .ai-polaroid.p1 { width: 190px; } .ai-polaroid.p2 { width: 210px; } .ai-polaroid.p3 { width: 200px; } .ai-polaroid.p4 { width: 220px; }
  .ai-sun { width: 90px; height: 90px; right: 6%; top: 90px; }
  .ai-cloud.c1 { width: 180px; } .ai-cloud.c2 { display: none; }
}

.about-exp { padding: clamp(90px, 11vw, 150px) 0; }
.aexp-grid { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: clamp(20px, 4vw, 60px); }
.aexp-label { margin: 0; font-family: var(--serif); font-size: 44px; line-height: 1.36; color: rgba(0, 0, 0, .53); writing-mode: vertical-rl; transform: rotate(180deg); align-self: start; position: sticky; top: 110px; white-space: nowrap; }
.aexp-list { border-top: 1px solid var(--line); }
.aexp-item { border-bottom: 1px solid var(--line); }
.aexp-item summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto 28px; align-items: center; gap: 24px; padding: 26px 4px; }
.aexp-item summary::-webkit-details-marker { display: none; }
.aexp-head { display: flex; flex-direction: column; }
.aexp-name { font-size: clamp(24px, 2.1vw, 30px); font-weight: 500; letter-spacing: -.04em; line-height: 1.36; color: var(--ink); }
.aexp-role, .aexp-date { font-size: clamp(16px, 1.4vw, 20px); letter-spacing: -.04em; line-height: 1.68; color: #2b2b2b; }
.aexp-icon { position: relative; width: 22px; height: 22px; }
.aexp-icon::before, .aexp-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transform: translate(-50%, -50%); transition: transform .4s var(--spring); }
.aexp-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.aexp-item[open] .aexp-icon::before { transform: translate(-50%, -50%) rotate(45deg); }
.aexp-item[open] .aexp-icon::after { transform: translate(-50%, -50%) rotate(135deg); }
.aexp-body { padding: 0 4px 30px; animation: aexpIn .5s var(--spring); }
@keyframes aexpIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.aexp-body p, .aexp-body li { font-size: clamp(16px, 1.4vw, 20px); line-height: 1.68; letter-spacing: -.04em; color: #2b2b2b; }
.aexp-body p { margin: 0 0 10px; }
.aexp-body ul { margin: 0; padding-left: 1.2em; }
.aexp-body li { margin-bottom: 6px; }
.aexp-body li::marker { color: rgba(6, 6, 6, .35); }
@media (max-width: 760px) {
  .aexp-grid { grid-template-columns: 1fr; }
  .aexp-label { writing-mode: horizontal-tb; transform: none; position: static; font-size: 36px; }
  .aexp-item summary { grid-template-columns: minmax(0, 1fr) 24px; }
  .aexp-date { grid-column: 1; grid-row: 2; }
  .aexp-icon { grid-column: 2; grid-row: 1; }
}

.about-fun { padding: 0 0 clamp(100px, 12vw, 160px); }
.fun-placeholder { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fun-slot { display: grid; place-items: center; min-height: 260px; border-radius: 28px; border: 1.5px dashed var(--line); color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
@media (max-width: 760px) { .fun-placeholder { grid-template-columns: 1fr; } .fun-slot { min-height: 140px; } }

/* About · dark mode */
html[data-theme="dark"] .about-intro { background: linear-gradient(180deg, #0e1120 0%, #1d2240 100%); }
html[data-theme="dark"] .ai-heading, html[data-theme="dark"] .ai-copy strong { color: var(--ink); }
html[data-theme="dark"] .ai-copy p, html[data-theme="dark"] .aexp-role, html[data-theme="dark"] .aexp-date, html[data-theme="dark"] .aexp-body p, html[data-theme="dark"] .aexp-body li { color: var(--ink-2); }
html[data-theme="dark"] .ai-sun { background: radial-gradient(circle at 60% 40%, #fffdf3, #e9e4d3 70%); box-shadow: 0 0 40px 10px rgba(230, 230, 255, .2); }
html[data-theme="dark"] .ai-cloud { fill: #2a3156; }
html[data-theme="dark"] .ai-ground .hill-back { fill: #262c4d; }
html[data-theme="dark"] .ai-ground .sprigs { stroke: #3a4270; }
html[data-theme="dark"] .ai-hint { color: var(--muted); }
html[data-theme="dark"] .aexp-label { color: rgba(244, 236, 221, .5); }
html[data-theme="dark"] .aexp-body li::marker { color: var(--muted); }
.ai-heading { max-width: 26ch; }



/* ==========================================================
   Case study infographics (built in code, themed per project)
   ========================================================== */
.viz { margin: 28px 0 36px; }
.viz figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); display: flex; gap: 10px; }
.viz figcaption::before { content: "↳"; color: var(--ci); }
.viz-card { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: clamp(18px, 2.4vw, 28px); }
.viz-card.scroll-x { overflow-x: auto; }
.viz-title { margin: 0 0 6px; font-size: 17px; font-weight: 500; letter-spacing: -.02em; color: var(--ink); }
.viz-top { display: flex; justify-content: space-between; align-items: start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.viz-legend { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.viz-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--ci); display: inline-block; }
.viz-legend i.alt { background: var(--c); margin-left: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.viz-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.viz-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .viz-grid-2, .viz-grid-3 { grid-template-columns: 1fr; } }

/* line charts */
.lc { width: 100%; height: auto; display: block; overflow: visible; }
.lc .g { stroke: var(--line); stroke-dasharray: 2 4; }
.lc .ya, .lc .xa { font-family: var(--sans); font-size: 11px; fill: var(--muted); }
.lc .ya { text-anchor: end; } .lc .xa { text-anchor: middle; }
.lc .l { fill: none; stroke: var(--ci); stroke-width: 2.5; stroke-linejoin: round; }
.lc .a { fill: var(--ci); opacity: .08; }
.lc .d { fill: var(--paper); stroke: var(--ci); stroke-width: 2.5; }
.lc .nt { font-family: var(--sans); font-size: 11px; fill: var(--ink-2); }

/* horizontal bars (StableStakes ages) */
.hb-group { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.hb-group:first-of-type { border-top: 0; }
.hb-age { font-size: 14px; color: var(--muted); }
.hb-bars { display: grid; gap: 8px; }
.hb-row { display: flex; align-items: center; gap: 10px; }
.hb { display: block; height: 26px; width: var(--v); min-width: 6px; border-radius: 8px; }
.hb-1 { background: var(--ci); } .hb-2 { background: var(--c); box-shadow: inset 0 0 0 1px var(--line); }
.hb-v { font-size: 14px; font-weight: 500; }

/* gap diagram */
.gap { display: grid; grid-template-columns: 1fr auto 1.1fr auto 1fr; align-items: center; gap: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: clamp(18px, 2.4vw, 28px); }
.gap-side { display: grid; gap: 8px; }
.gap-pill { font-size: 13px; text-align: center; padding: 9px 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.gap-node { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; text-align: center; font-size: 15px; font-weight: 500; line-height: 1.2; background: var(--c); color: var(--ci); border: 2px solid var(--ci); }
.gap-mid { display: grid; gap: 4px; text-align: center; padding: 16px; border-radius: 16px; border: 1.5px dashed #e06b6b; background: rgba(224, 107, 107, .08); font-size: 13px; color: var(--ink-2); }
.gap-mid b { color: #c24545; font-weight: 600; font-size: 14px; }
@media (max-width: 860px) { .gap { grid-template-columns: 1fr; justify-items: center; } .gap-side { grid-template-columns: repeat(3, 1fr); width: 100%; } }

/* personas */
.persona { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.p-head { display: flex; align-items: center; gap: 12px; }
.p-head b { display: block; font-weight: 500; }
.p-head span span { font-size: 13px; color: var(--muted); }
.p-av { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: var(--ci); font-weight: 600; }
.persona ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; font-size: 15px; color: var(--ink-2); }
.p-body { margin: 0 !important; font-size: 14px !important; line-height: 1.55 !important; color: var(--ink-2) !important; }
.p-quote { margin: 0 !important; font-size: 14px !important; line-height: 1.5 !important; color: var(--ink) !important; padding-left: 12px; border-left: 2px solid var(--ci); }
.p-goal { margin: auto 0 0 !important; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px !important; color: var(--ci) !important; }
.p-goal b { font-weight: 600; }

/* pros / cons */
.pc { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 10px 12px; align-items: stretch; }
.pc-h { font-weight: 600; font-size: 16px; text-align: center; }
.pc-h span { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.pc-name { display: flex; align-items: center; font-weight: 500; font-size: 15px; }
.pc-cell { display: flex; flex-wrap: wrap; gap: 6px; align-content: center; padding: 12px; border-radius: 14px; }
.pc-cell.pro { background: rgba(63, 160, 100, .08); border: 1px solid rgba(63, 160, 100, .28); }
.pc-cell.con { background: rgba(214, 90, 90, .07); border: 1px solid rgba(214, 90, 90, .26); }
.chip { font-size: 12.5px; padding: 4px 8px; border-radius: 7px; line-height: 1.3; }
.chip.pro { background: rgba(63, 160, 100, .16); color: #1f6b3e; }
.chip.con { background: rgba(214, 90, 90, .14); color: #9a2f2f; }
@media (max-width: 760px) { .pc { grid-template-columns: 1fr; } .pc > div:first-child, .pc-h { display: none; } .pc-name { margin-top: 10px; } }

/* ImagineArt research */
.ia-research { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; }
.ia-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.viz-card.mini { padding: 16px; display: flex; flex-direction: column; gap: 4px; border-radius: 18px; }
.viz-card.mini.wide { grid-column: span 1; }
.m-k { font-size: 13px; font-weight: 500; color: var(--ci); }
.viz-card.mini strong { font-size: 36px; font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.viz-card.mini span:not(.m-k) { font-size: 13px; color: var(--muted); }
.viz-card.mini p { margin: 0 !important; font-size: 12.5px !important; line-height: 1.45 !important; color: var(--ink-2) !important; }
.m-foot { margin-top: auto; padding-top: 6px; }
@media (max-width: 860px) { .ia-research { grid-template-columns: 1fr; } }

/* journey */
.journey { position: relative; height: 300px; margin-top: 10px; }
.journey svg { position: absolute; left: 0; right: 0; top: 50px; width: 100%; height: 220px; }
.jl { fill: none; stroke: var(--ci); stroke-width: 3; vector-effect: non-scaling-stroke; }
.jd { fill: var(--ci); }
.jn { position: absolute; transform: translateX(-50%); width: 30%; max-width: 230px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.jn b { font-size: 14px; font-weight: 500; }
.jn span { font-size: 12px; line-height: 1.4; color: var(--ink-2); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.jn.up { flex-direction: column-reverse; }
.jn[style*="left:3%"] { transform: none; align-items: flex-start; text-align: left; }
.jn[style*="left:87%"] { transform: translateX(-80%); }
@media (max-width: 760px) { .journey { height: auto; display: grid; gap: 10px; } .journey svg { display: none; } .jn, .jn.up { position: static; transform: none !important; width: 100%; max-width: none; flex-direction: column; align-items: flex-start; text-align: left; } }

/* pie + feature bars */
.pie-wrap { display: flex; align-items: center; gap: 22px; margin-top: 10px; }
.pie { width: 140px; flex: none; }
.pie path { stroke: var(--paper); stroke-width: 1.5; }
.pie-0 { fill: var(--ci); background: var(--ci); }
.pie-1 { fill: color-mix(in srgb, var(--ci) 70%, white); background: color-mix(in srgb, var(--ci) 70%, white); }
.pie-2 { fill: color-mix(in srgb, var(--ci) 45%, white); background: color-mix(in srgb, var(--ci) 45%, white); }
.pie-3 { fill: color-mix(in srgb, var(--ci) 25%, white); background: color-mix(in srgb, var(--ci) 25%, white); }
.pie .pt { font-family: var(--sans); font-size: 9px; fill: #fff; text-anchor: middle; font-weight: 600; }
.pie-leg { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; color: var(--ink-2); }
.pie-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; }
.fb { display: grid; grid-template-columns: 1fr 40px; gap: 10px; align-items: center; margin-top: 10px; }
.fb-bar { position: relative; height: 32px; border-radius: 9px; background: var(--bg); overflow: hidden; display: flex; align-items: center; }
.fb-bar::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--v); background: var(--ci); opacity: .85; border-radius: 9px; }
.fb-bar span { position: relative; padding-left: 12px; font-size: 13px; color: #fff; font-weight: 500; }
.fb b { font-size: 13px; font-weight: 500; text-align: right; }

/* matrix */
.matrix { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 14px; }
.matrix th, .matrix td { padding: 12px 8px; text-align: center; border-bottom: 1px solid var(--line); }
.matrix thead th { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.matrix tbody th { text-align: left; font-weight: 500; }
.matrix tbody tr:last-child th, .matrix tbody tr:last-child td { border-bottom: 0; }
.mx { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-size: 13px; font-weight: 700; }
.mx.y { background: rgba(63, 160, 100, .14); color: #2f8a55; }
.mx.p { background: rgba(214, 160, 50, .16); color: #a8771a; }
.mx.x { background: rgba(214, 90, 90, .12); color: #c24545; }
.mx-key { display: flex; align-items: center; gap: 8px; margin: 14px 0 0 !important; font-size: 13px !important; color: var(--muted) !important; }
.mx-key .mx { width: 22px; height: 22px; font-size: 11px; margin-left: 8px; }

/* ==========================================================
   Case study pages: Space Grotesk only
   ========================================================== */
body.case main, body.case main * { font-family: var(--sans); }
body.case .case-hero h1 { font-weight: 500; letter-spacing: -.045em; line-height: .95; }
body.case .case-section > h2 { font-weight: 500; letter-spacing: -.04em; }
body.case .case-section p.pull { font-weight: 500; letter-spacing: -.035em; line-height: 1.2; }
body.case .stat strong { font-weight: 500; letter-spacing: -.04em; }
body.case .quotes-inline blockquote { font-size: 20px; font-weight: 400; letter-spacing: -.02em; }
body.case .next-case h2 { font-weight: 500; letter-spacing: -.04em; }
body.case .case-meta span, body.case .mono, body.case .tldr .mono { font-family: var(--mono); }

/* dark mode tweaks for viz */
html[data-theme="dark"] .chip.pro { color: #8fe0ae; } html[data-theme="dark"] .chip.con { color: #f2a3a3; }
html[data-theme="dark"] .gap-mid b { color: #f2a3a3; }
body.case main * { font-family: var(--sans) !important; }
body.case main .mono, body.case main .case-meta div > span:first-child, body.case main .tldr .mono { font-family: var(--mono) !important; }
.lc .ya, .lc .xa, .lc .nt { font-size: 13px; }
.journey { height: 390px; }
.journey svg { top: 80px; }

/* Artistic hills */
.landscape .facet path { fill: #fff; opacity: calc(.13 - var(--night-amt) * .09); }
.landscape .facet.f2 path { opacity: calc(.09 - var(--night-amt) * .06); }
.landscape .ground-edge { fill: var(--bg); }
.landscape .ground-strokes path { fill: none; stroke: var(--bg); stroke-width: 3; stroke-linecap: round; opacity: .75; }
.landscape { height: 44%; }
.hero-foot { bottom: 70px; }
@media (max-width: 760px) { .landscape { height: 40%; } .hero-foot { bottom: 50px; } }
.landscape .facet path { opacity: calc(.16 - var(--night-amt) * .1); }
.landscape .facet.f2 path { opacity: calc(.1 - var(--night-amt) * .06); }
.hero .landscape { bottom: -3px; }
.hero .orb .sun::after { display: none; }

/* Hand-drawn touches */
.landscape .brush path { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; }
.landscape .brush { opacity: calc(1 - var(--night-amt) * .75); }
.landscape .brush.b2 path { stroke-width: 2; }
.cloud .cloud-strokes path, .cloud .cloud-under { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; opacity: .8; }
.cloud .cloud-strokes path { stroke: rgba(160, 190, 225, .55); stroke-width: 2; }
.cloud .cloud-under { opacity: .65; }
html[data-theme="dark"] .cloud .cloud-strokes path { stroke: rgba(255, 255, 255, .12); }
html[data-theme="dark"] .cloud .cloud-under { stroke: rgba(255, 255, 255, .18); }

/* Reviews · glass cards matched to Zainab's spec */
.marquee-track { gap: 28px; align-items: stretch; }
.review, .review:nth-child(odd), .review:nth-child(even) { transform: none; }
.review {
  width: min(430px, 84vw); min-height: 440px; padding: 34px; border-radius: 34px; gap: 22px;
  background: linear-gradient(180deg, rgba(251, 252, 248, .5) 0%, rgba(149, 150, 148, .5) 100%);
  border: 1px solid #999;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 4px 4px 20px rgba(0, 0, 0, .3);
}
.review:hover { transform: translateY(-6px); background: linear-gradient(180deg, rgba(251, 252, 248, .6) 0%, rgba(149, 150, 148, .5) 100%); }
.review .q { width: 82px; height: 82px; color: #a8533f; margin: -6px 0 0 -10px; flex: none; }
.review p { font-size: 14px; line-height: 1.45; color: #000; }
.review.placeholder p { font-style: normal; opacity: .8; }
.review .who { border-top: 1px solid rgba(0, 0, 0, .5); padding-top: 22px; align-items: center; }
.review .avatar { width: 40px; height: 40px; font-size: 18px; background: rgba(255, 255, 255, .55); border: 1px solid rgba(0, 0, 0, .15); }
.review .who b { font-size: 22px; font-weight: 400; color: #000; line-height: 1.25; }
.review .who span span, .review .who > span > span { font-size: 16px; color: #000; }
html[data-theme="dark"] .review { background: linear-gradient(180deg, rgba(60, 64, 90, .5) 0%, rgba(20, 22, 40, .55) 100%); border-color: rgba(255, 255, 255, .25); }
html[data-theme="dark"] .review p, html[data-theme="dark"] .review .who b, html[data-theme="dark"] .review .who span span { color: #f4ecdd; }
html[data-theme="dark"] .review .who { border-top-color: rgba(255, 255, 255, .35); }
html[data-theme="dark"] .review .q { color: #f2a48f; }

/* Birds: slow, drifting up and down */
.reviews .birds { animation: birdsDrift 95s linear infinite; top: 20%; left: 0; width: 130px; }
.reviews .birds path { transform-box: fill-box; transform-origin: center; animation: flap 1.6s ease-in-out infinite alternate; }
.reviews .birds path:nth-child(2) { animation-duration: 1.9s; animation-delay: -.6s; }
.reviews .birds path:nth-child(3) { animation-duration: 1.4s; animation-delay: -1.1s; }
@keyframes flap { from { transform: scaleY(1); } to { transform: scaleY(.55) translateY(2px); } }
@keyframes birdsDrift {
  0%   { transform: translate(-12vw, 0); }
  14%  { transform: translate(4vw, -26px); }
  28%  { transform: translate(20vw, 8px); }
  42%  { transform: translate(36vw, -18px); }
  57%  { transform: translate(52vw, 14px); }
  71%  { transform: translate(68vw, -30px); }
  85%  { transform: translate(84vw, 4px); }
  100% { transform: translate(104vw, -16px); }
}
.reviews .birds { animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
.reviews .birds { animation: birdsAcross 95s linear infinite, birdsBob 23s ease-in-out infinite; }
@keyframes birdsAcross { from { transform: translateX(-12vw); } to { transform: translateX(104vw); } }
@keyframes birdsBob {
  0%, 100% { translate: 0 0; }
  20% { translate: 0 -28px; }
  38% { translate: 0 10px; }
  57% { translate: 0 -18px; }
  76% { translate: 0 16px; }
}

/* Review card refinements */
.review .q { transform: rotate(180deg); margin: -6px 0 0 -6px; }
.review p { font-size: 17px; line-height: 1.5; }
.review .who b { font-size: 18px; }
.review .who span span, .review .who > span > span { font-size: 14px; }
.review { border: 1px solid rgba(255, 255, 255, .55); box-shadow: 2px 4px 18px rgba(80, 40, 30, .1); }
.review .who { border-top-color: rgba(0, 0, 0, .18); }
html[data-theme="dark"] .review { border-color: rgba(255, 255, 255, .14); box-shadow: 2px 4px 18px rgba(0, 0, 0, .18); }
/* Lighter, clearer glass */
.review { background: linear-gradient(180deg, rgba(255, 253, 248, .34) 0%, rgba(255, 248, 240, .16) 100%); backdrop-filter: blur(9px) saturate(1.15); -webkit-backdrop-filter: blur(9px) saturate(1.15); }
.review:hover { background: linear-gradient(180deg, rgba(255, 253, 248, .42) 0%, rgba(255, 248, 240, .22) 100%); }

/* ==========================================================
   Case study screens placed directly on the page
   ========================================================== */
.case-cover.bare { background: none; box-shadow: none; border-radius: 0; overflow: visible; }
.screens { display: grid; gap: 28px 16px; align-items: start; }
figure.screens { margin: 30px 0 40px; }
.screens .s { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
.screens .s span { font-size: 14px; color: var(--ink-2); text-align: center; letter-spacing: -.01em; }
figure.shot.screens img, .screens img { width: 100%; height: auto; background: none !important; border-radius: 0; cursor: zoom-in; filter: drop-shadow(0 18px 22px rgba(30, 40, 40, .13)) drop-shadow(0 2px 4px rgba(30, 40, 40, .08)); transition: transform .5s var(--spring); }
figure.shot.screens img:hover, .screens img:hover { transform: translateY(-4px); }
.screens.phones { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.screens.flat .s img, .screens.desk2 .s img, .screens.pair .s img, .screens.iters .s img { border-radius: 12px; filter: none; box-shadow: 0 1px 0 var(--line), 0 18px 40px -18px rgba(30, 40, 60, .3), 0 0 0 1px var(--line); }
.screens.flat .s img { border-radius: 18px; }
.screens.desk2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.screens.pair { grid-template-columns: minmax(0, 3.2fr) minmax(0, 1fr); align-items: end; }
.screens.pair .s:last-child img, .screens.pair .s:nth-last-child(2) img { border-radius: 16px; }
.screens.iters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.it-label { grid-column: 1 / -1; margin: 6px 0 -12px !important; font-family: var(--mono) !important; font-size: 11px !important; letter-spacing: .1em; text-transform: uppercase; color: var(--muted) !important; }
.screens figcaption { grid-column: 1 / -1; margin-top: 4px; }
.case-cover .screens { margin-top: 0; }
@media (max-width: 860px) {
  .screens.phones { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 44%; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 18px; margin-left: -4px; margin-right: -4px; }
  .screens.phones .s { scroll-snap-align: start; }
  .screens.phones figcaption { grid-column: auto; grid-row: 2; position: sticky; left: 0; width: max-content; }
  .screens.desk2, .screens.iters { grid-template-columns: 1fr; }
}
.case-body > article, .case-section { min-width: 0; }
@media (max-width: 960px) { .case-body { grid-template-columns: minmax(0, 1fr); } }
.screens { max-width: 100%; }
@media (max-width: 860px) {
  .screens.phones .s { grid-row: 1; }
  .screens.phones figcaption { grid-row: 2; grid-column: 1 / span 2; position: sticky; left: 0; width: auto; }
}

/* Footer headline in Space Grotesk */
.footer-inner h2, body.case .footer-inner h2 { font-family: var(--sans) !important; font-weight: 500; letter-spacing: -.045em; line-height: 1; max-width: 14ch; }
.footer-inner h2 em { font-family: var(--sans) !important; font-style: normal; }
.footer-inner h2 em { display: block; white-space: nowrap; }
/* Softer clouds so text on top stays readable */
.hero .cloud { opacity: calc(.32 - var(--night-amt) * .14); }
.hero .cloud .cloud-under { opacity: .45; }
/* Keep outline + shadow on flat screens when hovered (overrides the generic figure.shot img:hover) */
.screens.flat .s img:hover, .screens.desk2 .s img:hover, .screens.pair .s img:hover, .screens.iters .s img:hover { box-shadow: 0 1px 0 var(--line), 0 24px 46px -18px rgba(30, 40, 60, .34), 0 0 0 1px var(--line); }

/* ==========================================================
   ImagineArt design system board (built in code)
   ========================================================== */
.ds-board { --t: #f4f1fd; --ink-ds: #1b1830; display: grid; gap: 12px; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-auto-rows: minmax(56px, auto);
  grid-template-areas:
    "shot shot shot icon icon icon sp rad"
    "grid grid grid icon icon icon tok tok"
    "text text pal logo logo logo tok tok"
    "text text pal fx fx bp plat nest"
    "type type type fx fx stk plat nest"; }
.ds-t { background: var(--t); border-radius: 18px; padding: 16px; min-width: 0; color: var(--ink-ds); font-size: 13px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.ds-shot { grid-area: shot; min-height: 190px; background: linear-gradient(135deg, #b48cff, #7c4dff 70%); padding: 0; }
.ds-shot img { position: absolute; border-radius: 8px; box-shadow: 0 12px 30px -10px rgba(40, 10, 90, .55); width: auto !important; }
.ds-shot .a { height: 86%; left: 34%; top: 12%; }
.ds-shot .b { height: 55%; left: 6%; bottom: -6%; }
.ds-grid4 { grid-area: grid; } .ds-sp { grid-area: sp; } .ds-rad { grid-area: rad; } .ds-bp { grid-area: bp; } .ds-stk { grid-area: stk; }
.ds-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #ece7fb; white-space: nowrap; font-size: 13px; }
.ds-var { width: 16px; height: 16px; border-radius: 5px; background: #1b1830; box-shadow: inset 0 0 0 4px #1b1830, inset 0 0 0 5.5px #fff; transform: rotate(45deg) scale(.8); }
.ds-hash { font-weight: 600; }
.ds-icons { grid-area: icon; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px 8px; justify-items: center; align-content: center; }
.ds-t svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ds-t svg.fill { fill: currentColor; stroke: none; }
.ds-tok { grid-area: tok; flex-wrap: wrap; align-content: center; justify-content: flex-start; gap: 7px; }
.ds-swatch { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px 6px 7px; border-radius: 8px; background: #ece7fb; font-size: 12px; white-space: nowrap; }
.ds-swatch i { width: 14px; height: 14px; border-radius: 4px; }
.ds-text { grid-area: text; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 8px; background: #fff; box-shadow: inset 0 0 0 1px #ebe6f8; }
.ds-ph { display: flex; justify-content: space-between; align-items: center; padding-bottom: 8px; border-bottom: 1px solid #ebe6f8; }
.ds-ph b { font-weight: 600; font-size: 13px; }
.ds-search { color: #9b97ad; font-size: 12px; padding: 4px 0; }
.ds-search::before { content: "⌕ "; }
.ds-text ul { list-style: none; margin: 0; padding: 0 0 0 10px; display: grid; gap: 7px; font-size: 12px; color: #4a465c; }
.ds-text ul b { font-weight: 700; color: var(--ink-ds); }
.ds-pal { grid-area: pal; flex-direction: column; gap: 6px; }
.ds-row { display: flex; gap: 4px; }
.ds-row i { width: 12px; height: 12px; border-radius: 50%; }
.ds-logo { grid-area: logo; gap: 14px; font-size: 30px; font-weight: 500; letter-spacing: -.02em; }
.ds-ring { width: 46px; height: 46px; border-radius: 50%; background: conic-gradient(#6b5cff, #b14cff, #ff5ca8, #4cc3ff, #6b5cff); -webkit-mask: radial-gradient(circle, transparent 55%, #000 57%); mask: radial-gradient(circle, transparent 55%, #000 57%); }
.ds-type { grid-area: type; gap: clamp(10px, 2vw, 26px); }
.ds-type .big { font-size: 32px; font-weight: 400; }
.ds-type .aa { display: flex; flex-direction: column; align-items: center; font-size: 30px; line-height: 1; }
.ds-type .aa small { font-size: 10px; margin-top: 4px; color: #6d6980; font-weight: 400; }
.ds-type .r { font-weight: 400; } .ds-type .m { font-weight: 500; } .ds-type .b { font-weight: 700; }
.ds-fx { grid-area: fx; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; padding: 0; background: #fff; box-shadow: inset 0 0 0 1px #ebe6f8; }
.ds-fx .ds-ph { padding: 12px 14px; }
.ds-elev { flex: 1; min-height: 90px; display: grid; place-items: center; background: linear-gradient(135deg, #4c7df0, #8db1ff); }
.ds-elev span { width: 52px; height: 52px; border-radius: 50%; background: #fff; box-shadow: 0 10px 24px rgba(10, 30, 90, .35); }
.ds-fx dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; margin: 0; padding: 12px 14px; font-size: 11.5px; }
.ds-fx dt { color: #4a465c; } .ds-fx dd { margin: 0; background: #f4f1fd; border-radius: 6px; padding: 3px 8px; color: #6d6980; }
.ds-plat { grid-area: plat; flex-direction: column; align-items: flex-start; gap: 14px; font-size: 18px; }
.ds-plat span { display: flex; align-items: center; gap: 10px; }
.ds-nest { grid-area: nest; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 10px; }
.ds-nt { font-weight: 600; font-size: 13px; }
.ds-panel { background: #fff; border-radius: 10px; padding: 10px; box-shadow: 0 0 0 1px #ebe6f8; display: grid; gap: 5px; font-size: 11px; }
.ds-panel .ds-ph { padding-bottom: 6px; }
.ds-k { margin: 4px 0 0 !important; color: #9b97ad !important; font-size: 11px !important; }
.ds-p { margin: 0 !important; font-size: 11px !important; color: var(--ink-ds) !important; line-height: 1.4 !important; }
.ds-p em { font-style: normal; color: #9b97ad; }
@media (max-width: 960px) {
  .ds-board { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas:
    "shot shot" "icon icon" "grid grid" "sp rad" "tok tok" "text pal" "logo logo" "type type" "fx fx" "bp stk" "plat nest"; }
  .ds-pal { padding: 12px 6px; } .ds-row i { width: 9px; height: 9px; }
}
html[data-theme="dark"] .ds-board { --t: #1f1b33; --ink-ds: #efeaff; }
html[data-theme="dark"] .ds-chip, html[data-theme="dark"] .ds-swatch { background: #2b2545; }
html[data-theme="dark"] .ds-text, html[data-theme="dark"] .ds-fx, html[data-theme="dark"] .ds-panel { background: #171427; box-shadow: inset 0 0 0 1px #2e2848; }
html[data-theme="dark"] .ds-var { background: #efeaff; box-shadow: inset 0 0 0 4px #efeaff, inset 0 0 0 5.5px #1f1b33; }
html[data-theme="dark"] .ds-text ul, html[data-theme="dark"] .ds-fx dt { color: #c8c2e0; }
html[data-theme="dark"] .ds-fx dd { background: #2b2545; color: #b9b3d2; }
body.case main .ds-type .big, body.case main .ds-type .aa { font-family: "Inter", sans-serif !important; } body.case main .ds-type .aa small { font-family: var(--mono) !important; }

/* Design system board: break out of the text column on desktop */
@media (min-width: 961px) {
  .ds-board-wrap { margin-left: calc(-200px - clamp(24px, 5vw, 72px)); width: calc(100% + 200px + clamp(24px, 5vw, 72px)); position: relative; z-index: 1; }
  .ds-board-wrap figcaption { margin-left: calc(200px + clamp(24px, 5vw, 72px)); }
}
.ds-t { padding: 14px; }
.ds-chip { white-space: normal; text-align: left; font-size: 12px; padding: 7px 12px; line-height: 1.25; }
.ds-sp, .ds-rad, .ds-bp, .ds-stk { padding: 10px 8px; }
.ds-row { gap: 3px; } .ds-row i { width: 10px; height: 10px; }
.ds-plat { font-size: 15px; gap: 12px; padding-left: 16px; }
.ds-plat svg { width: 20px; height: 20px; flex: none; }
.ds-swatch { font-size: 11.5px; }
.ds-nest { padding: 12px; }
.case-body { padding-left: var(--gutter); padding-right: var(--gutter); }
@media (min-width: 961px) {
  .ds-board { grid-template-areas:
    "shot shot shot icon icon icon sp rad"
    "grid grid grid icon icon icon bp stk"
    "tok tok tok tok tok tok tok tok"
    "text text pal logo logo logo plat nest"
    "type type type fx fx fx plat nest"; }
  .ds-board-wrap { background: var(--bg); box-shadow: 0 0 0 14px var(--bg); }
}
.ds-shot { min-height: 170px; }
.ds-tok { padding: 16px 18px; gap: 8px; }
.ds-text, .ds-fx { min-height: 0; }
.ds-elev { min-height: 110px; }
/* Experience rows: no hover state */
.xp li:hover, html[data-theme="dark"] .xp li:hover { background: none; transform: none; }
.ai-ground .ground-strokes path { fill: none; stroke: var(--bg); stroke-width: 3; stroke-linecap: round; opacity: .8; }
.about-intro .ai-ground { bottom: -2px; }
.brand-mark { overflow: hidden; background: #e9e2da; box-shadow: 0 0 0 1.5px rgba(255,255,255,.7); }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Home: roomier section rhythm, centred headings */
body.home .sec-head > div { display: flex; flex-direction: column; align-items: center; }
body.home .sec-head { margin-bottom: clamp(44px, 5vw, 72px); }
body.home .intro { padding-bottom: clamp(100px, 12vw, 170px); }
body.home #work { padding-bottom: clamp(40px, 5vw, 70px); }
body.home .section { padding: clamp(110px, 14vw, 190px) 0; }
body.home .reviews { padding-top: clamp(130px, 15vw, 200px); }
.hero-eyebrow { font-weight: 500; }

/* ===== ImagineArt design system board (scaled replica, stays in the text column) ===== */
.dsb-wrap { container-type: inline-size; }
.dsb { --u: calc(100cqw / 1700); --t: #f3f2fc; --chip: #e8e6f6; --ink: #1d1b26; --mut: #8d8a99;
  display: flex; gap: calc(18 * var(--u)); aspect-ratio: 1700 / 950; color: var(--ink); font-size: calc(15 * var(--u)); line-height: 1.3; }
body.case main .dsb, body.case main .dsb * { font-family: "Inter", system-ui, sans-serif !important; }
body.case main .dsb .aa small { font-family: var(--mono) !important; }
.dsb .col, .dsb .row { display: flex; gap: calc(18 * var(--u)); min-width: 0; min-height: 0; }
.dsb > .col { flex: 1; flex-direction: column; }
.dsb .col .col { flex-direction: column; }
.dsb .t { background: var(--t); border-radius: calc(22 * var(--u)); min-width: 0; min-height: 0; position: relative; overflow: hidden; }
.dsb .c { display: flex; align-items: center; justify-content: center; }
.dsb svg { width: calc(26 * var(--u)); height: calc(26 * var(--u)); fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.dsb svg.f { fill: currentColor; stroke: none; }
.dsb .chip { display: inline-flex; align-items: center; gap: calc(12 * var(--u)); padding: calc(13 * var(--u)) calc(22 * var(--u)); border-radius: 999px; background: var(--chip); font-size: calc(16 * var(--u)); white-space: nowrap; }
.dsb .chip svg.v { width: calc(22 * var(--u)); height: calc(22 * var(--u)); stroke: none; }
.dsb .hash { font-size: calc(22 * var(--u)); font-weight: 400; line-height: 1; }
/* screens */
.dsb .shot { background: linear-gradient(120deg, #a14ff5 0%, #8b5cf6 45%, #b8a6ff 100%); }
.dsb .shot img { position: absolute; width: auto; max-width: none; border-radius: calc(8 * var(--u)) calc(8 * var(--u)) 0 0; box-shadow: 0 calc(10 * var(--u)) calc(30 * var(--u)) rgba(40, 10, 90, .3); }
.dsb .shot .a { height: 92%; left: 36%; top: 8%; }
.dsb .shot .b { height: 50%; left: 6%; top: 52%; }
/* icons */
.dsb .icons { display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(5, 1fr); place-items: center; padding: calc(36 * var(--u)) calc(50 * var(--u)); color: #2a2833; }
.dsb .icons svg { width: calc(30 * var(--u)); height: calc(30 * var(--u)); stroke-width: 1.5; }
/* semantic tokens */
.dsb .toks { display: flex; flex-wrap: wrap; align-content: center; gap: calc(18 * var(--u)) calc(18 * var(--u)); padding: calc(26 * var(--u)); }
.dsb .sw { display: inline-flex; align-items: center; gap: calc(12 * var(--u)); padding: calc(11 * var(--u)) calc(16 * var(--u)); border-radius: calc(10 * var(--u)); background: var(--chip); font-size: calc(16 * var(--u)); white-space: nowrap; }
.dsb .sw i { width: calc(22 * var(--u)); height: calc(22 * var(--u)); border-radius: calc(5 * var(--u)); }
/* text styles */
.dsb .styles { padding: calc(18 * var(--u)) calc(16 * var(--u)); display: flex; flex-direction: column; gap: calc(12 * var(--u)); }
.dsb .ph { display: flex; justify-content: space-between; align-items: center; font-size: calc(16 * var(--u)); font-weight: 500; }
.dsb .styles .ph { padding: 0 calc(14 * var(--u)) calc(12 * var(--u)); border-bottom: 1px solid #dedbea; }
.dsb .plus { font-size: calc(22 * var(--u)); font-weight: 300; line-height: 1; }
.dsb .srch { display: flex; align-items: center; gap: calc(10 * var(--u)); color: var(--mut); font-size: calc(14 * var(--u)); padding: 0 calc(14 * var(--u)); }
.dsb .srch svg { width: calc(18 * var(--u)); height: calc(18 * var(--u)); color: var(--ink); }
.dsb .styles ul { list-style: none; margin: 0; padding: 0 0 0 calc(60 * var(--u)); display: grid; gap: calc(16 * var(--u)); font-size: calc(13.5 * var(--u)); color: #4a4757; }
.dsb .styles li { margin: 0; padding: 0; }
.dsb .styles b { font-weight: 700; color: var(--ink); }
/* palette */
.dsb .pal { display: flex; flex-direction: column; justify-content: center; gap: calc(7 * var(--u)); padding-left: calc(24 * var(--u)); }
.dsb .pr { display: flex; gap: calc(7 * var(--u)); }
.dsb .pr i { width: calc(24 * var(--u)); height: calc(24 * var(--u)); border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
/* logo + type */
.dsb .logo { gap: calc(26 * var(--u)); font-size: calc(44 * var(--u)); font-weight: 500; letter-spacing: -.01em; }
.dsb .ring { width: calc(76 * var(--u)); height: calc(76 * var(--u)); border-radius: 50%; background: conic-gradient(from 200deg, #2fd2ff, #6b5cff, #c04cff, #ff4fa3, #6b5cff, #2fd2ff);
  -webkit-mask: radial-gradient(circle, transparent 58%, #000 60%); mask: radial-gradient(circle, transparent 58%, #000 60%); }
.dsb .type { gap: calc(52 * var(--u)); }
.dsb .inter { font-size: calc(50 * var(--u)); font-weight: 400; letter-spacing: -.01em; }
.dsb .aa { display: flex; flex-direction: column; align-items: center; font-size: calc(46 * var(--u)); line-height: 1.05; }
.dsb .aa small { font-size: calc(11 * var(--u)); margin-top: calc(10 * var(--u)); color: #4a4757; font-weight: 400; }
.dsb .aa.r { font-weight: 400; } .dsb .aa.m { font-weight: 500; } .dsb .aa.b { font-weight: 700; }
/* effect styles */
.dsb .fx { display: flex; flex-direction: column; background: var(--t); border-radius: calc(22 * var(--u)) calc(22 * var(--u)) calc(22 * var(--u)) calc(22 * var(--u)); }
.dsb .fx .ph { padding: calc(14 * var(--u)) calc(16 * var(--u)); background: #f6f5fc; }
.dsb .fx .x { font-size: calc(16 * var(--u)); font-weight: 400; }
.dsb .elev { flex: 1 1 calc(146 * var(--u)); display: grid; place-items: center; background: linear-gradient(135deg, #4a86ef, #6f9df5); }
.dsb .elev span { width: calc(90 * var(--u)); height: calc(90 * var(--u)); border-radius: 50%; background: #fff; box-shadow: 0 calc(8 * var(--u)) calc(24 * var(--u)) rgba(10, 30, 90, .25); }
.dsb .fx dl { display: grid; grid-template-columns: calc(105 * var(--u)) 1fr; align-items: center; gap: calc(12 * var(--u)) 0; margin: 0; padding: calc(14 * var(--u)) calc(14 * var(--u)) calc(16 * var(--u)); background: #fff; font-size: calc(13.5 * var(--u)); }
.dsb .fx dt { color: #3a3846; margin: 0; }
.dsb .fx dd { margin: 0; background: #f2f1f6; border-radius: calc(5 * var(--u)); padding: calc(6 * var(--u)) calc(14 * var(--u)); color: #4a4757; font-size: calc(11 * var(--u)); }
/* platforms */
.dsb .plat { display: flex; flex-direction: column; justify-content: center; gap: calc(30 * var(--u)); padding-left: calc(34 * var(--u)); font-size: calc(24 * var(--u)); }
.dsb .plat span { display: flex; align-items: center; gap: calc(20 * var(--u)); }
.dsb .plat svg { width: calc(28 * var(--u)); height: calc(28 * var(--u)); stroke-width: 1.4; }
/* nested instances */
.dsb .nest { padding: calc(24 * var(--u)) calc(30 * var(--u)) 0 calc(26 * var(--u)); display: flex; flex-direction: column; gap: calc(26 * var(--u)); }
.dsb .nt { font-size: calc(16 * var(--u)); font-weight: 500; }
.dsb .panel { flex: 1; background: #fff; border-radius: calc(10 * var(--u)) calc(10 * var(--u)) 0 0; padding: calc(12 * var(--u)) calc(14 * var(--u)); display: flex; flex-direction: column; gap: calc(10 * var(--u)); font-size: calc(11.5 * var(--u)); }
.dsb .panel .ph { font-size: calc(13 * var(--u)); font-weight: 600; padding-bottom: calc(6 * var(--u)); }
.dsb .panel .ic { font-weight: 400; letter-spacing: .25em; color: #3a3846; font-size: calc(12 * var(--u)); }
.dsb .k { display: flex; justify-content: space-between; color: var(--mut); font-size: calc(11.5 * var(--u)); margin-top: calc(2 * var(--u)); }
.dsb .k em { font-style: normal; font-size: calc(16 * var(--u)); line-height: .8; }
.dsb .p { display: flex; align-items: center; gap: calc(8 * var(--u)); color: var(--mut); background: #f6f6f9; border-radius: calc(4 * var(--u)); padding: calc(5 * var(--u)) calc(6 * var(--u)); white-space: nowrap; overflow: hidden; }
.dsb .p:nth-last-child(-n+2) { background: none; color: #3a3846; }
.dsb .p b { color: var(--ink); font-weight: 600; }
.dsb .p svg { width: calc(12 * var(--u)); height: calc(12 * var(--u)); stroke-width: 1.3; color: #555; }
/* keep it a light board in dark mode too, framed so it sits nicely */
html[data-theme="dark"] .dsb-wrap .dsb { --t: #f3f2fc; }
/* phones: let it scroll sideways instead of shrinking past legibility */
@media (max-width: 700px) {
  .dsb-wrap { overflow-x: auto; container-type: normal; -webkit-overflow-scrolling: touch; }
  .dsb { width: 760px; --u: calc(760px / 1700); }
}
/* Case hero: same warm hand-drawn scene as the About intro */
.case-hero { background: linear-gradient(180deg, #fff9f1 0%, #e7d6bd 100%) !important; padding: 160px 0 190px; isolation: isolate; }
.case-hero::after { display: none; }
.case-hero > .container { position: relative; z-index: 2; }
.case-hero .ai-sun { top: 110px; }
.case-hero .ai-cloud.c1 { top: 150px; } .case-hero .ai-cloud.c2 { top: 190px; }
.case-hero .ai-ground { bottom: -2px; }
.case-hero .case-meta { border-top-color: rgba(60, 40, 20, .18); }
html[data-theme="dark"] .case-hero { background: linear-gradient(180deg, #0e1120 0%, #1d2240 100%) !important; }
html[data-theme="dark"] .case-hero .case-meta { border-top-color: rgba(255, 255, 255, .14); }
@media (max-width: 760px) { .case-hero { padding-bottom: 150px; } .case-hero .ai-sun { top: 100px; } }
/* Case studies use the main site's palette, not per-project colours */
.case, .case.ia, .case.ss { --c: var(--bg-2); --ci: var(--ink); }
.case .case-meta a { color: var(--ink); }
.case .hmw li::before, .case .p-av { background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
.case .viz .pie-1 { fill: color-mix(in srgb, var(--ink) 65%, var(--bg)); background: color-mix(in srgb, var(--ink) 65%, var(--bg)); }
.case .viz .pie-2 { fill: color-mix(in srgb, var(--ink) 40%, var(--bg)); background: color-mix(in srgb, var(--ink) 40%, var(--bg)); }
.case .viz .pie-3 { fill: color-mix(in srgb, var(--ink) 20%, var(--bg)); background: color-mix(in srgb, var(--ink) 20%, var(--bg)); }
img[src*="tools/openai.svg"] { box-shadow: inset 0 0 0 1px var(--logo-outline); outline: 1px solid var(--logo-outline); outline-offset: -1px; }
/* Case accent = the site's warm sun/sand palette (replaces the flat black) */
.case, .case.ia, .case.ss { --c: #f4e4c9; --ci: #b5652a; }
html[data-theme="dark"] .case, html[data-theme="dark"] .case.ia, html[data-theme="dark"] .case.ss { --c: #2a2440; --ci: #f2b544; }
.case .case-meta a { color: var(--ci); }
.case .hmw li::before, .case .p-av { background: var(--c); box-shadow: none; color: var(--ci); }
.case .viz .pie-1 { fill: color-mix(in srgb, var(--ci) 70%, var(--bg)); background: color-mix(in srgb, var(--ci) 70%, var(--bg)); }
.case .viz .pie-2 { fill: color-mix(in srgb, var(--ci) 45%, var(--bg)); background: color-mix(in srgb, var(--ci) 45%, var(--bg)); }
.case .viz .pie-3 { fill: color-mix(in srgb, var(--ci) 25%, var(--bg)); background: color-mix(in srgb, var(--ci) 25%, var(--bg)); }
/* Design system board in the site's warm sand palette */
.dsb { --t: #f5ead9; --chip: #ecdcc3; --ink: #2a2118; --mut: #9a8a76; }
.dsb .shot { background: linear-gradient(120deg, #e9a25a 0%, #f2b544 50%, #f6d79a 100%); }
.dsb .fx .ph { background: #f8efe2; }
.dsb .styles .ph { border-bottom-color: #e2d2b8; }
.dsb .fx dd { background: #f6eee2; }
.dsb .p { background: #f8f2e9; }
html[data-theme="dark"] .dsb-wrap .dsb { --t: #1f2440; --chip: #2c3256; --ink: #f4ecdd; --mut: #a8a3b8; }
html[data-theme="dark"] .dsb .shot { background: linear-gradient(120deg, #2a3366 0%, #3b3f7a 55%, #6b5a8c 100%); }
html[data-theme="dark"] .dsb .fx .ph { background: #262b4a; }
html[data-theme="dark"] .dsb .fx dl, html[data-theme="dark"] .dsb .panel { background: #171b30; }
html[data-theme="dark"] .dsb .fx dt, html[data-theme="dark"] .dsb .styles ul, html[data-theme="dark"] .dsb .aa small, html[data-theme="dark"] .dsb .p:nth-last-child(-n+2), html[data-theme="dark"] .dsb .panel .ic { color: #cfc8dc; }
html[data-theme="dark"] .dsb .fx dd, html[data-theme="dark"] .dsb .p { background: #232845; color: #a8a3b8; }
html[data-theme="dark"] .dsb .styles .ph { border-bottom-color: #343a60; }
html[data-theme="dark"] .dsb .icons { color: #e8e2f0; }
html[data-theme="dark"] .dsb .chip svg.v path:nth-child(odd) { fill: #f4ecdd; }
html[data-theme="dark"] .dsb .chip svg.v path:nth-child(2) { fill: #2c3256; }
/* Experience rows: straight separators, columns line up across rows */
.xp li { border-radius: 0; }
@media (min-width: 1181px) {
  .xp li { grid-template-columns: 56px minmax(230px, 1.1fr) minmax(0, 1.6fr) 150px 170px; }
  .xp .tools { justify-content: flex-start; }
}
/* Home: tighten the gap between sections (was too airy) */
body.home .section { padding: clamp(90px, 10vw, 140px) 0; }
body.home #experience { padding-bottom: clamp(30px, 3vw, 50px); }
body.home .reviews { padding-top: clamp(80px, 8vw, 120px); }
/* Footer night sky: star-shaped cursor (links/buttons keep the pointer) */
.footer-scene { cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><defs><radialGradient id='g'><stop offset='0' stop-color='%23fff7d6' stop-opacity='.9'/><stop offset='1' stop-color='%23fff7d6' stop-opacity='0'/></radialGradient></defs><circle cx='16' cy='16' r='15' fill='url(%23g)' opacity='.45'/><path d='M16 3.5l3 8.6 9.1.3-7.2 5.6 2.6 8.8L16 21.6l-7.5 5.2 2.6-8.8-7.2-5.6 9.1-.3z' fill='%23f7d78a' stroke='%23fff9f1' stroke-width='1.2' stroke-linejoin='round'/></svg>") 16 16, crosshair; }
.footer-scene a, .footer-scene button { cursor: pointer; }
/* Next case study: horizontal card with mockup */
.next-case.nc-card { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: stretch; gap: 0; padding: 0; overflow: hidden; border-radius: 32px; }
.nc-media { position: relative; min-height: 340px; overflow: hidden; background: #222; }
.nc-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--spring); }
.next-case.nc-card:hover .nc-media img { transform: scale(1.05); }
.nc-body { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: clamp(28px, 4vw, 52px); }
.nc-body h2 { margin-top: 10px !important; }
.nc-line { color: var(--ink-2); font-size: 17px; line-height: 1.5; letter-spacing: -.02em; margin-top: 12px; max-width: 34ch; }
.nc-cta { display: inline-flex; align-items: center; gap: 14px; margin-top: 28px; font-weight: 500; font-size: 16px; }
.nc-cta .circle { width: 48px !important; height: 48px !important; font-size: 18px !important; }
@media (max-width: 760px) { .next-case.nc-card { grid-template-columns: 1fr; } .nc-media { min-height: 220px; } }
.nc-card .nc-body h2 { font-size: clamp(32px, 3.4vw, 50px) !important; white-space: nowrap; }
/* Footer cursor: glowing dot, like the old placed stars */
.footer-scene { cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><defs><radialGradient id='g' cx='50%' cy='50%' r='50%'><stop offset='0' stop-color='%23fff0be' stop-opacity='.95'/><stop offset='.35' stop-color='%23fff0be' stop-opacity='.55'/><stop offset='1' stop-color='%23fff0be' stop-opacity='0'/></radialGradient></defs><circle cx='16' cy='16' r='16' fill='url(%23g)'/><circle cx='16' cy='16' r='3.5' fill='%23fff7d6'/></svg>") 16 16, crosshair; }
/* Hero: tighter, more concise headline */
.hero h1.hero-title { font-size: clamp(44px, min(7vw, 11.5vh), 100px); line-height: 1.02; letter-spacing: 0; }
.hero-eyebrow { font-size: 13px; }
@media (max-width: 760px) { .hero h1.hero-title { font-size: clamp(38px, 11vw, 54px); line-height: 1.05; } }

/* ===== Contact drawer ===== */
html.cd-lock { overflow: hidden; }
.contact-drawer { position: fixed; inset: 0; z-index: 200; pointer-events: none; }
.contact-drawer.open { pointer-events: auto; }
.cd-backdrop { position: absolute; inset: 0; background: rgba(15, 20, 40, .18); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transition: opacity .45s var(--ease); }
.contact-drawer.open .cd-backdrop { opacity: 1; }
.cd-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%); overflow-y: auto; background: var(--bg); color: var(--ink); padding: clamp(28px, 5vw, 56px) clamp(24px, 4.5vw, 52px) 40px; box-shadow: -30px 0 80px -30px rgba(0, 0, 0, .35); transform: translateX(102%); transition: transform .6s var(--spring); display: flex; flex-direction: column; }
.contact-drawer.open .cd-panel { transform: none; }
.cd-close { position: absolute; top: 20px; right: 20px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; cursor: pointer; color: var(--ink); transition: transform .3s var(--spring); }
.cd-close:hover { transform: rotate(90deg); }
.cd-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.cd-eyebrow { display: flex; align-items: center; gap: 10px; margin: 8px 0 18px; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cd-dot { width: 9px; height: 9px; border-radius: 50%; background: #ffd23f; box-shadow: 0 0 0 4px rgba(255, 210, 63, .25); }
.cd-panel h2 { font-family: var(--sans); font-weight: 500; font-size: clamp(36px, 5vw, 52px); letter-spacing: -.045em; line-height: 1; margin: 0 0 16px; }
.cd-lede { margin: 0; color: var(--ink-2); font-size: 17px; line-height: 1.55; letter-spacing: -.01em; max-width: 40ch; }
.cd-form { display: grid; gap: 26px; margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--line); }
.cd-form label { display: grid; gap: 8px; }
.cd-form label span { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cd-form input, .cd-form textarea { font: inherit; font-size: 17px; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); padding: 8px 0 12px; border-radius: 0; outline: none; transition: border-color .25s; resize: vertical; }
.cd-form input::placeholder, .cd-form textarea::placeholder { color: color-mix(in srgb, var(--ink) 35%, transparent); }
.cd-form input:focus, .cd-form textarea:focus { border-bottom-color: var(--ink); }
.cd-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cd-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cd-send { display: inline-flex; align-items: center; gap: 10px; padding: 15px 24px; border-radius: 999px; border: 0; background: var(--ink); color: var(--bg); font: inherit; font-size: 16px; font-weight: 500; cursor: pointer; box-shadow: 0 12px 26px -14px rgba(0, 0, 0, .5); transition: transform .3s var(--spring), opacity .2s; }
.cd-send:hover { transform: translateY(-2px); }
.cd-send:disabled { opacity: .6; cursor: progress; transform: none; }
.cd-send svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.cd-status { margin: 0; font-size: 14px; color: var(--muted); }
.cd-status.err { color: #c2410c; }
.cd-status a { color: inherit; }
.cd-done { margin-top: 34px; padding-top: 30px; border-top: 1px solid var(--line); }
.cd-big { font-size: 28px; font-weight: 500; letter-spacing: -.03em; margin: 0 0 8px; }
.cd-alt { margin: auto 0 0; padding-top: 36px; font-size: 14px; color: var(--muted); }
.cd-alt a { color: var(--ink); }
html[data-theme="dark"] .cd-backdrop { background: rgba(0, 0, 0, .35); }
html[data-theme="dark"] .cd-status.err { color: #fdba74; }
@media (prefers-reduced-motion: reduce) { .cd-panel, .cd-backdrop { transition: none; } }

/* ==========================================================
   HERO · painted scene (day, dimmed to night with --night-amt)
   ========================================================== */
.hero-paint { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: url("../img/hero-day.webp") 72% bottom / cover no-repeat;
  filter: brightness(calc(1 - var(--night-amt) * .22)) saturate(calc(1 - var(--night-amt) * .35)); }
.hero-paint::before { content: ""; position: absolute; inset: 0; mix-blend-mode: multiply;
  background: linear-gradient(180deg, #1e2758 0%, #3a4a8c 55%, #6f7fb8 100%);
  opacity: calc(var(--night-amt) * .92); }
.hero-paint::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14%;
  background: linear-gradient(180deg, transparent, var(--bg)); }
.hero .stars { z-index: 2; -webkit-mask: linear-gradient(180deg, #000 45%, transparent 68%); mask: linear-gradient(180deg, #000 45%, transparent 68%); }
.hero .clouds, .hero .landscape { display: none; }
.hero .hero-glow { opacity: .35; }
@media (max-width: 760px) { .hero-paint { background-position: 54% bottom; } }
.hero:not(.is-night) .hero-foot { color: rgba(6, 6, 6, .6); text-shadow: none; }

/* HERO · Gambarino headline, tighter tracking (ref: Kai Marlow −.04em) */
.hero h1.hero-title { font-family: "Gambarino", var(--serif); font-weight: 400; letter-spacing: -.03em; line-height: 1.08; }

/* ABOUT · non-Figma cards (travel · food · music), modelled on 305×300 bento cards */
.ff-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; padding: 20px 0 10px; }
.ff-card { --ease: cubic-bezier(.22, 1, .36, 1); position: relative; flex: none; width: 305px; height: 300px; border-radius: 32px; overflow: hidden; background: #fff; box-shadow: 10px 10px 20px rgba(0, 0, 0, .15); font-family: "Space Grotesk", var(--sans); transition: scale .4s var(--ease), rotate .4s var(--ease), box-shadow .4s var(--ease); }
.ff-card.b1 { border: 1px solid rgba(0, 0, 0, .15); }
.ff-card * { box-sizing: border-box; }

/* travel */
.ff-trips-label { position: absolute; left: 28px; top: 30px; display: flex; flex-direction: column; gap: 8px; z-index: 3; }
.ff-trips-label .k { font-size: 16px; text-transform: uppercase; color: #6d6d6d; }
.ff-trips-label .y { font-family: "DM Serif Display", serif; font-size: 60px; letter-spacing: -2.4px; line-height: 1; color: #2b2b2b; }
.ff-photo { position: absolute; width: 211px; height: 253px; border: 6px solid #fff; border-radius: 27px; box-shadow: 0 0 16px 8px rgba(0, 0, 0, .15); overflow: hidden; transition: translate .45s var(--ease); }
.ff-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ff-photo.h1 { left: 140.6px; top: 370.8px; transform: translate(-50%, -50%) rotate(-8.86deg); }
.ff-photo.h2 { left: 218.2px; top: 299px; transform: translate(-50%, -50%) rotate(-5.54deg); z-index: 1; }
.ff-photo.h3 { left: 295.9px; top: 235.3px; transform: translate(-50%, -50%) rotate(-1.56deg); z-index: 2; }
.ff-photo.ph-a { background: linear-gradient(160deg, #cfe3d4, #7fa98a); }
.ff-photo.ph-b { background: linear-gradient(160deg, #f6d9b4, #d98f5c); }
.ff-photo.ph-c { background: linear-gradient(160deg, #bcd6f2, #5d86c4); }
.ff-trips:hover { scale: 1.12; rotate: 5deg; z-index: 5; box-shadow: 20px 24px 44px rgba(0, 0, 0, .26); }
.ff-trips:hover .ff-photo.h1 { translate: 0 -56px; }
.ff-trips:hover .ff-photo.h2 { translate: 0 -46px; }
.ff-trips:hover .ff-photo.h3 { translate: 0 -36px; }

/* food */
.ff-wk { background: #f4cd44; }
.ff-wk-day { position: absolute; left: 19px; top: 19px; font-size: 16px; text-transform: uppercase; color: #6d6d6d; }
.ff-wk-dots { position: absolute; right: 24px; top: 24px; display: flex; gap: 4px; }
.ff-wk-dots i { width: 5px; height: 5px; border-radius: 50%; background: #6d6d6d; }
.ff-wk-panel { position: absolute; left: -1px; right: -1px; top: 56px; bottom: -1px; background: #fff; border-radius: 22px; padding: 20px 21px 20px 20px; display: flex; flex-direction: column; gap: 16px; }
.ff-wk-title { margin: 0; font-family: "DM Serif Display", serif; font-size: 32px; letter-spacing: -1.28px; line-height: .97; color: #00315c; }
.ff-wk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.ff-wk-list li { display: flex; gap: 8px; align-items: center; }
.ff-wk-list .cb { position: relative; width: 16px; height: 16px; flex: none; border: 1px solid rgba(0, 0, 0, .25); border-radius: 4px; transition: background .3s var(--ease), border-color .3s var(--ease); }
.ff-wk-list .cb::after { content: ""; position: absolute; left: 5px; top: 1.5px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform .3s var(--ease); }
.ff-wk-list .t { position: relative; font-size: 16px; line-height: 1.15; color: #6d6d6d; white-space: nowrap; transition: color .3s var(--ease); }
.ff-wk-list .t::after { content: ""; position: absolute; left: 0; top: 52%; width: 100%; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: left center; transition: transform .35s var(--ease); }
.ff-wk:hover { scale: 1.07; rotate: -4deg; z-index: 5; box-shadow: -16px 24px 44px rgba(0, 0, 0, .24); }
.ff-wk:hover li:nth-child(odd) .cb { background: #00315c; border-color: #00315c; }
.ff-wk:hover li:nth-child(odd) .cb::after { transform: rotate(45deg) scale(1); }
.ff-wk:hover li:nth-child(odd) .t { color: #a2a2a2; }
.ff-wk:hover li:nth-child(odd) .t::after { transform: scaleX(1); }

/* music */
.ff-song { background: #111; cursor: pointer; }
.ff-song::after { content: ""; position: absolute; inset: 0; border: 11px solid #fff; border-radius: 32px; pointer-events: none; z-index: 6; }
.ff-media { position: absolute; inset: 0; overflow: hidden; border-radius: 32px; }
.ff-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform .6s var(--ease); }
.ff-song-grad { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(20, 20, 20, .78) 80%); }
.ff-song-pill { position: absolute; left: 20px; top: 22px; max-width: calc(100% - 40px); display: flex; gap: 6px; align-items: center; background: rgba(0, 0, 0, .55); border-radius: 999px; padding: 4px 12px 4px 4px; backdrop-filter: blur(2px); }
.ff-vinyl { position: relative; width: 28px; height: 28px; flex: none; border-radius: 50%; background: repeating-radial-gradient(circle, #121212 0 2px, #2a2a2a 2px 3px); border: .64px solid #373535; box-shadow: 0 0 0 .5px #62615e; }
.ff-vinyl::after { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; border-radius: 50%; background: #8a8a8a; transform: translate(-50%, -50%); }
.ff-song:hover .ff-vinyl { animation: ff-spin 2.4s linear infinite; }
@keyframes ff-spin { to { rotate: 360deg; } }
.ff-song-pill .meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ff-song-pill .a { font-family: Inter, sans-serif; font-size: 12px; color: #fff; white-space: nowrap; }
.ff-song-pill .b { font-family: Inter, sans-serif; font-size: 8px; color: rgba(255, 255, 255, .75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ff-song-player { position: absolute; left: 28px; right: 36px; top: 207px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.ff-song-time { width: 100%; display: flex; justify-content: space-between; font-family: Inter, sans-serif; font-size: 10px; color: #fff; }
.ff-song-bar { position: relative; width: 100%; height: 4px; border-radius: 99px; background: rgba(137, 137, 137, .35); overflow: hidden; }
.ff-song-bar span { position: absolute; inset: 0 auto 0 0; width: 0; background: #fff; border-radius: 99px; transition: width 3s linear; }
.ff-song-ctrls { display: flex; gap: 32px; margin-top: 4px; }
.ff-song-ctrls svg { width: 30px; height: 30px; fill: #fff; }
.ff-song-link { position: absolute; inset: 0; z-index: 7; border-radius: 32px; }
.ff-song-link:focus-visible { outline: 3px solid var(--sun); outline-offset: 4px; }
.ff-song:hover { scale: 1.07; rotate: 5deg; z-index: 6; box-shadow: 20px 24px 44px rgba(0, 0, 0, .3); }
.ff-song:hover .ff-media img { transform: scale(1); }

@media (max-width: 760px) { .ff-grid { gap: 28px; } }
@media (prefers-reduced-motion: reduce) { .ff-card, .ff-card * { transition: none !important; animation: none !important; } }

/* ABOUT · languages card (replaces the chat card) */
.ff-lang .ff-wk-panel { justify-content: space-between; }
.ff-lang-hello { position: relative; margin: 0; height: 74px; overflow: hidden; }
.ff-lang-hello .w { position: absolute; left: 0; top: 0; font-family: "DM Serif Display", serif; font-size: 56px; line-height: 74px; letter-spacing: -2px; color: #00315c; opacity: 0; translate: 0 100%; animation: ff-hello 7.5s var(--ease) infinite; }
.ff-lang-hello .ur { font-family: "Noto Nastaliq Urdu", serif; font-size: 40px; letter-spacing: 0; line-height: 90px; top: -14px; direction: rtl; }
.ff-lang-hello .en { animation-delay: 2.5s; }
.ff-lang-hello .de { animation-delay: 5s; }
@keyframes ff-hello { 0% { opacity: 0; translate: 0 100%; } 6%, 30% { opacity: 1; translate: 0 0; } 36%, 100% { opacity: 0; translate: 0 -100%; } }
.ff-lang:hover .ff-lang-hello .w { animation-duration: 3.6s; }
.ff-lang:hover .ff-lang-hello .en { animation-delay: 1.2s; }
.ff-lang:hover .ff-lang-hello .de { animation-delay: 2.4s; }
.ff-lang-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ff-lang-list li { display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto 4px; column-gap: 8px; row-gap: 6px; align-items: center; }
.ff-lang-list .code { grid-row: 1 / 3; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #f4cd44; font-size: 11px; font-weight: 500; color: #00315c; }
.ff-lang-list .name { font-size: 15px; line-height: 1; color: #2b2b2b; }
.ff-lang-list .name em { font-style: normal; font-size: 12px; color: #8a8a8a; }
.ff-lang-list .lvl { position: relative; height: 4px; border-radius: 99px; background: rgba(0, 49, 92, .1); overflow: hidden; }
.ff-lang-list .lvl i { position: absolute; inset: 0 auto 0 0; width: calc(var(--l) * 100%); border-radius: 99px; background: #00315c; transform: scaleX(.15); transform-origin: left; transition: transform .7s var(--ease); }
.ff-lang:hover .ff-lang-list .lvl i { transform: scaleX(1); }
.ff-lang-list li:nth-child(2) .lvl i { transition-delay: .08s; } .ff-lang-list li:nth-child(3) .lvl i { transition-delay: .16s; }
@media (hover: none) { .ff-lang-list .lvl i { transform: none; } }
.ff-lang-list .lvl i { transform: none; transition: none; }
.ff-lang:hover .ff-lang-list .lvl i { animation: ff-fill .8s var(--ease) both; }
.ff-lang:hover .ff-lang-list li:nth-child(2) .lvl i { animation-delay: .08s; }
.ff-lang:hover .ff-lang-list li:nth-child(3) .lvl i { animation-delay: .16s; }
@keyframes ff-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ABOUT · music card plays audio in place */
.ff-song-yt { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; left: 0; top: 0; }
.ff-song-player { z-index: 7; }
.ff-song-bar { cursor: pointer; height: 4px; overflow: visible; }
.ff-song-bar::before { content: ""; position: absolute; inset: -8px 0; }
.ff-song-bar span { transition: none; }
.ff-song-ctrls button { all: unset; cursor: pointer; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; transition: scale .2s var(--ease), background .2s; }
.ff-song-ctrls button:hover { scale: 1.12; }
.ff-song-ctrls button:focus-visible, .ff-song-bar:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.ff-song-ctrls [data-toggle] { width: 40px; height: 40px; margin: -5px 0; background: rgba(255, 255, 255, .16); }
.ff-song .i-pause { display: none; }
.ff-song.is-playing .i-pause { display: block; }
.ff-song.is-playing .i-play { display: none; }
.ff-song.is-loading [data-toggle] { animation: ff-pulse 1s ease-in-out infinite; }
@keyframes ff-pulse { 50% { background: rgba(255, 255, 255, .35); } }
.ff-song:hover .ff-vinyl { animation: none; }
.ff-song.is-playing .ff-vinyl { animation: ff-spin 2.4s linear infinite; }
.ff-song.is-playing .ff-media img { transform: scale(1); }

/* CASE STUDIES · lift cards off the cream background */
body.case { --card-line: rgba(60, 40, 20, .16); --card-shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 8px 24px -10px rgba(60, 40, 20, .18), 0 24px 48px -28px rgba(60, 40, 20, .22); }
html[data-theme="dark"] body.case { --card-line: rgba(244, 236, 221, .18); --card-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -12px rgba(0, 0, 0, .55); }
body.case :is(.tldr, .stat, .pillar, .learning, .viz-card, .gap, .persona, .hmw li, .next-case, .card) {
  border-color: var(--card-line); box-shadow: var(--card-shadow);
}
body.case .stat { transition: translate .35s var(--spring), box-shadow .35s var(--spring); }
body.case .stat:hover { translate: 0 -3px; box-shadow: 0 2px 4px rgba(60, 40, 20, .06), 0 16px 32px -12px rgba(60, 40, 20, .26); }

/* CASE STUDIES · persona avatars (AI-generated faces) */
.case .p-av:has(img) { overflow: hidden; background: var(--bg-2); box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--card-line, var(--line)); }
.case .p-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-head > span:last-child { display: flex; flex-direction: column; gap: 2px; line-height: 1.25; }
.p-head b { line-height: 1.25; }

/* HERO · bigger headline, smaller sun */
.hero h1.hero-title { font-size: clamp(52px, min(8.8vw, 14.5vh), 128px); }
@media (max-width: 760px) { .hero h1.hero-title { font-size: clamp(44px, 13vw, 66px); } }
.hero .orb { width: clamp(60px, 6.4vw, 96px); height: clamp(60px, 6.4vw, 96px); }
.hero .orb .sun { box-shadow: 0 0 0 10px rgba(255, 214, 120, .22), 0 0 44px 18px rgba(255, 200, 100, .42); }
@media (max-width: 760px) {
  .hero .orb { width: 50px; height: 50px; }
  .hero .orb .sun { box-shadow: 0 0 0 6px rgba(255, 214, 120, .2), 0 0 22px 8px rgba(255, 200, 100, .35); }
}

/* HERO · blend the bottom edge into the page (above the night filter and grain) */
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 26%; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--bg) 35%, transparent) 40%, color-mix(in srgb, var(--bg) 80%, transparent) 72%, var(--bg) 100%); }
.hero .hero-noise { -webkit-mask: linear-gradient(180deg, #000 70%, transparent 98%); mask: linear-gradient(180deg, #000 70%, transparent 98%); }
