/* ─── case studies ──────────────────────────────────────────────────────────
   One system, three worlds. Each project sets its own colours; the grid, the
   type scale and the frames stay the same, so the site still reads as one. */
.cs {
  --cs-bg: #0b0b0c; --cs-fg: #ededed; --cs-mute: #9a9a9a; --cs-line: rgba(237, 237, 237, 0.12);
  --cs-acc: var(--accent); --cs-card: rgba(255, 255, 255, 0.03); --cs-stage: #141416;
  --cs-display: var(--f-serif);
  position: relative;
  margin: clamp(80px, 12vh, 150px) calc(var(--pad) * -1) 0;
  padding: clamp(72px, 11vh, 140px) var(--pad) clamp(40px, 8vh, 100px);
  background: var(--cs-bg); color: var(--cs-fg);
  display: grid; gap: clamp(96px, 15vh, 190px);
}
.cs > * { width: 100%; max-width: 1380px; margin-inline: auto; }
.cs > .cmp { max-width: none; width: auto; margin: 0 calc(var(--pad) * -1); }
.cs em { font-style: italic; color: var(--cs-acc); }

/* reveal (shares the campaign behaviour) */
.cs [data-reveal] { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1.2s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.cs [data-reveal].is-in { opacity: 1; transform: none; }

/* overview */
.cs-overview { display: grid; gap: clamp(36px, 6vh, 64px); }
.cs-overview__intro { font-family: var(--cs-display); font-size: clamp(34px, 4.4vw, 76px); line-height: 1.04; letter-spacing: -0.02em; max-width: 22ch; text-wrap: balance; }
.cs-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--cs-line); }
.cs-facts div { padding: 20px 20px 0 0; display: grid; gap: 8px; align-content: start; }
.cs-facts dt { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cs-mute); }
.cs-facts dd { font-size: 16px; line-height: 1.4; }
.cs-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; }
.cs-chips li { padding: 9px 15px; border: 1px solid var(--cs-line); border-radius: 999px; font-size: 14px; }

/* section heads */
.cs-sec { display: grid; gap: clamp(40px, 7vh, 80px); }
.cs-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 18px clamp(24px, 4vw, 72px); align-items: start; }
.cs-label { display: flex; gap: 14px; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cs-mute); padding-top: 14px; }
.cs-label span { color: var(--cs-acc); }
.cs-title { margin: 0; font-family: var(--cs-display); font-weight: 400; font-size: clamp(40px, 5.4vw, 92px); line-height: 1; letter-spacing: -0.025em; text-wrap: balance; }
.cs-lede { grid-column: 2; font-size: var(--t-lead); line-height: 1.38; letter-spacing: -0.015em; color: var(--cs-mute); max-width: 40ch; }

/* cards */
.cs-cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--cs-line); border: 1px solid var(--cs-line); border-radius: 14px; overflow: hidden; }
.cs-cards li { background: var(--cs-bg); padding: clamp(22px, 2.6vw, 38px); display: grid; gap: 12px; align-content: start; min-height: 240px; }
.cs-cards__n { font-family: var(--f-mono); font-size: 12px; color: var(--cs-acc); }
.cs-cards h4 { font-family: var(--cs-display); font-weight: 400; font-size: clamp(26px, 2.4vw, 38px); line-height: 1.05; letter-spacing: -0.015em; }
.cs-cards p { font-size: 16px; line-height: 1.5; color: var(--cs-mute); }

/* frames */
.dv { position: relative; overflow: hidden; background: #0e0f11; }
.dv img { display: block; width: 100%; height: auto; }
.dv__bar { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px; background: #1a1b1e; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.dv__bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a3b3f; }
.dv__bar i:nth-child(1) { background: #ff5f57; } .dv__bar i:nth-child(2) { background: #febc2e; } .dv__bar i:nth-child(3) { background: #28c840; }
.dv__bar span { margin-left: 10px; font-family: var(--f-mono); font-size: 11px; color: #8d8f94; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv--mac { border-radius: 12px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 50px 120px -50px rgba(0, 0, 0, 0.95), 0 20px 40px -20px rgba(0, 0, 0, 0.6); }
.dv--browser { border-radius: 12px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), 0 50px 110px -45px rgba(0, 0, 0, 0.45); background: #fff; }
.dv--browser .dv__bar { background: #f0efe9; border-bottom-color: rgba(0, 0, 0, 0.08); }
.dv__url { flex: 1; max-width: 420px; margin: 0 auto !important; text-align: center; padding: 5px 12px; border-radius: 7px; background: #fff; color: #555 !important; }
.dv--phone { width: 100%; max-width: 330px; aspect-ratio: 1170 / 2532; border-radius: 13% / 6%; padding: 3.2%; background: #111; box-shadow: 0 0 0 1.5px #2a2a2a, 0 50px 90px -40px rgba(0, 0, 0, 0.6); }
.dv--phone img { border-radius: 10.5% / 4.9%; height: 100%; object-fit: cover; }
.dv__island { position: absolute; z-index: 1; top: 4.4%; left: 50%; translate: -50% 0; width: 28%; height: 3.2%; border-radius: 99px; background: #000; }

/* steps */
.cs-step { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 5vw, 96px); align-items: center; }
.cs-step--flip { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.cs-step--flip .cs-step__text { order: 2; }
.cs-step__text { display: grid; gap: 14px; max-width: 34ch; }
.cs-step__n { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cs-acc); }
.cs-step h4 { font-family: var(--cs-display); font-weight: 400; font-size: clamp(30px, 3vw, 50px); line-height: 1.02; letter-spacing: -0.02em; }
.cs-step p { font-size: 17px; line-height: 1.55; color: var(--cs-mute); }

/* annotated hero screen */
.cs-annot { margin: 0; display: grid; gap: 34px; }
.cs-annot__stage { position: relative; }
/* --yf is the pin's height as a fraction of the screenshot, below the 32px bar */
.cs-pin { position: absolute; left: var(--x); top: calc(32px + (100% - 32px) * var(--yf)); translate: -50% -50%; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-mono); font-size: 13px; font-weight: 600; background: var(--cs-acc); color: #0b0b0c; box-shadow: 0 0 0 6px color-mix(in srgb, var(--cs-acc) 28%, transparent); animation: cs-pulse 2.6s var(--ease) infinite; }
@keyframes cs-pulse { 50% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--cs-acc) 0%, transparent); } }
.cs-legend { list-style: none; counter-reset: pin; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.cs-legend li { counter-increment: pin; display: grid; gap: 6px; font-size: 15px; line-height: 1.45; color: var(--cs-mute); }
.cs-legend li::before { content: counter(pin); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-mono); font-size: 11px; font-weight: 600; background: var(--cs-acc); color: #0b0b0c; }
.cs-legend b { color: var(--cs-fg); font-weight: 600; }

/* layers */
.cs-layers { display: grid; gap: 10px; }
.cs-layer { display: grid; grid-template-columns: 60px minmax(0, 1.2fr) minmax(0, 2fr); gap: 20px; align-items: baseline; padding: clamp(22px, 3vw, 36px); border-radius: 14px; border: 1px solid var(--cs-line); }
.cs-layer span { font-family: var(--f-mono); font-size: 12px; color: var(--cs-mute); }
.cs-layer h4 { font-family: var(--cs-display); font-weight: 400; font-size: clamp(24px, 2.4vw, 38px); line-height: 1.05; }
.cs-layer p { font-size: 16px; line-height: 1.5; color: var(--cs-mute); }
.cs-layer--3 { margin-inline: 12%; background: var(--cs-acc); color: #0b0b0c; border-color: transparent; }
.cs-layer--3 span, .cs-layer--3 p { color: rgba(11, 11, 12, 0.72); }
.cs-layer--2 { margin-inline: 6%; background: var(--cs-card); }

/* stats */
.cs-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--cs-line); border-bottom: 1px solid var(--cs-line); }
.cs-stats div { padding: clamp(26px, 4vh, 44px) 16px clamp(26px, 4vh, 44px) 0; display: grid; gap: 10px; }
.cs-stats div + div { padding-left: clamp(16px, 2vw, 28px); border-left: 1px solid var(--cs-line); }
.cs-stats b { font-family: var(--cs-display); font-weight: 400; font-size: clamp(64px, 8vw, 140px); line-height: 0.85; letter-spacing: -0.04em; color: var(--cs-acc); }
.cs-stats span { font-size: 15px; color: var(--cs-mute); max-width: 18ch; }

/* design system */
.cs-themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 36px); }
.cs-themes figure { margin: 0; display: grid; gap: 14px; }
.cs-themes figcaption { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cs-mute); }
.cs-system { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 72px); align-items: start; }
.cs-swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cs-swatches div { display: grid; gap: 6px; font-size: 14px; }
.cs-swatches i { aspect-ratio: 4 / 3; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.cs-swatches span { font-family: var(--f-mono); font-size: 11.5px; color: var(--cs-mute); }
.cs-type { display: grid; gap: 4px 0; }
.cs-type p { line-height: 1; padding-top: 18px; border-top: 1px solid var(--cs-line); }
.cs-type p:first-child { border-top: 0; padding-top: 0; }
.cs-type span { font-family: var(--f-mono); font-size: 11.5px; color: var(--cs-mute); margin-bottom: 14px; }
.cs-type__a { font-family: var(--f-serif); font-size: clamp(48px, 5vw, 84px); letter-spacing: -0.02em; }
.cs-type__b { font-family: "Geist", var(--f-sans); font-weight: 500; font-size: clamp(30px, 3vw, 46px); letter-spacing: -0.02em; }
.cs-type__c { font-family: "Geist Mono", var(--f-mono); font-size: clamp(15px, 1.4vw, 20px); letter-spacing: 0.04em; color: var(--cs-acc); }

.cs-solo { display: grid; }
.cs-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 36px); margin-top: clamp(16px, 2.4vw, 36px); }
.cs-film video { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; background: #000; box-shadow: 0 0 0 1px var(--cs-line); display: block; }

/* reflection */
.cs-reflect { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 5vw, 96px); padding-top: clamp(36px, 6vh, 64px); border-top: 1px solid var(--cs-line); }
.cs-reflect--one { grid-template-columns: minmax(0, 1fr); max-width: 980px; }
.cs-reflect__text { margin-top: 18px; font-family: var(--cs-display); font-size: clamp(24px, 2.3vw, 36px); line-height: 1.25; letter-spacing: -0.012em; }

/* ── Rellane: graphite night, lime signal ── */
.cs--rellane { --cs-bg: #0c0d0f; --cs-acc: #c6f432; --cs-card: rgba(198, 244, 50, 0.05); }

/* ── Urban Monkey: concrete, ink, neon ── */
.cs--um { --cs-bg: #ececE6; --cs-fg: #111; --cs-mute: #55554f; --cs-line: rgba(17, 17, 17, 0.14); --cs-acc: #111; --cs-card: #fff; }
.cs--um em { color: #111; background: linear-gradient(transparent 58%, #d4ff2a 58%, #d4ff2a 92%, transparent 92%); font-style: normal; }
.cs--um .cs-title { font-family: "Anybody", var(--f-sans); font-weight: 800; font-stretch: 70%; text-transform: uppercase; letter-spacing: -0.02em; line-height: 0.92; }
.cs--um .cs-overview__intro { font-family: var(--f-sans); font-weight: 500; font-size: clamp(28px, 3.2vw, 52px); line-height: 1.12; letter-spacing: -0.03em; max-width: 26ch; }
.cs--um .cs-stats b { font-family: "Anybody", var(--f-sans); font-weight: 900; font-stretch: 60%; color: #111; }
.cs--um .cs-cards__n, .cs--um .cs-label span, .cs--um .cs-step__n { color: #111; background: #d4ff2a; padding: 1px 6px; border-radius: 3px; }
.cs--um .cs-cards--grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cs--um .cs-cards h4 { font-family: "Anybody", var(--f-sans); font-weight: 800; font-stretch: 75%; text-transform: uppercase; font-size: clamp(22px, 2vw, 30px); }
.cs-ia { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); }
.cs-ia__item { display: grid; gap: 10px; align-content: start; }
.cs-ia__thumb { aspect-ratio: 16 / 10; overflow: hidden; border-radius: 8px; box-shadow: 0 0 0 1px var(--cs-line), 0 20px 40px -24px rgba(0, 0, 0, 0.35); }
.cs-ia__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.cs-ia h4 { font-family: "Anybody", var(--f-sans); font-weight: 800; font-stretch: 75%; text-transform: uppercase; font-size: 22px; margin-top: 6px; }
.cs-ia p { font-size: 15px; color: var(--cs-mute); }
.cs-phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); justify-items: center; gap: clamp(16px, 3vw, 48px); padding: clamp(36px, 6vw, 90px) clamp(16px, 4vw, 60px); border-radius: 24px; background: #d4ff2a; }
.cs--um .cs-phones .dv--phone:nth-child(2) { translate: 0 -28px; }

/* ── Watercolor World: paper, pigment, a slow serif ── */
.cs--ww { --cs-bg: #f4efe6; --cs-fg: #2b2622; --cs-mute: #6f6359; --cs-line: rgba(43, 38, 34, 0.14); --cs-acc: #8a5a44; --cs-card: #fbf8f2; }
.cs--ww::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5; background: radial-gradient(40vw 30vw at 8% 6%, rgba(201, 169, 166, 0.45), transparent 70%), radial-gradient(36vw 28vw at 92% 40%, rgba(155, 181, 154, 0.35), transparent 70%), radial-gradient(30vw 24vw at 20% 92%, rgba(169, 191, 211, 0.35), transparent 70%); }
.cs--ww > * { position: relative; }
.cs-quote { margin: 0; font-family: var(--f-serif); font-size: clamp(40px, 5.6vw, 96px); line-height: 1.02; letter-spacing: -0.025em; max-width: 18ch; text-wrap: balance; }
.cs-art { margin: 0; display: grid; gap: 14px; }
.cs-art img { width: 100%; height: auto; display: block; border-radius: 2px; box-shadow: 0 30px 60px -36px rgba(80, 55, 40, 0.5); }
.cs-art figcaption { font-family: var(--f-serif); font-style: italic; font-size: 20px; color: var(--cs-mute); }
.cs-art--hero img { max-height: 86vh; object-fit: contain; background: #fbf8f2; padding: clamp(16px, 3vw, 48px); }
.cs-artgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(16px, 2.6vw, 40px); margin-top: clamp(40px, 7vh, 90px); align-items: start; }
.cs-artgrid .cs-art:nth-child(1) { grid-column: 1 / span 5; }
.cs-artgrid .cs-art:nth-child(2) { grid-column: 7 / span 3; margin-top: 22%; }
.cs-artgrid .cs-art:nth-child(3) { grid-column: 10 / span 3; margin-top: 6%; }

/* the site header over light case studies */
html.view-project .brand { padding: 8px 14px; margin: -8px -14px; border-radius: 14px; background: rgba(10, 10, 11, 0.62); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
html.view-project .veil { opacity: 0 !important; }

@media (max-width: 900px) {
  .cs-facts, .cs-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-stats div:nth-child(3) { border-left: 0; padding-left: 0; }
  .cs-head, .cs-step, .cs-step--flip, .cs-system, .cs-themes, .cs-pair, .cs-reflect { grid-template-columns: minmax(0, 1fr); }
  .cs-step--flip .cs-step__text { order: 0; }
  .cs-lede { grid-column: 1; }
  .cs-cards, .cs--um .cs-cards--grid { grid-template-columns: minmax(0, 1fr); }
  .cs-legend { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cs-ia { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-layer { grid-template-columns: 40px minmax(0, 1fr); }
  .cs-layer p { grid-column: 2; }
  .cs-layer--3, .cs-layer--2 { margin-inline: 0; }
  .cs-pin { width: 22px; height: 22px; font-size: 11px; }
}
@media (max-width: 560px) {
  .cs-phones { grid-template-columns: minmax(0, 1fr); }
  .cs--um .cs-phones .dv--phone:nth-child(2) { translate: none; }
  .cs-artgrid .cs-art { grid-column: 1 / -1 !important; margin-top: 0 !important; }
  .cs-legend, .cs-swatches { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .cs [data-reveal] { opacity: 1; transform: none; transition: none; }
  .cs-pin { animation: none; }
}

/* Watercolor: Alex gets a spread of his own */
.cs-alex { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 96px); align-items: center; }
.cs-alex .cs-art img { max-height: 82vh; width: auto; max-width: 100%; margin-inline: auto; }
.cs-alex .cs-head { grid-template-columns: minmax(0, 1fr); }
.cs-alex .cs-lede { grid-column: 1; }
@media (max-width: 900px) { .cs-alex { grid-template-columns: minmax(0, 1fr); } }
