/* ==========================================================================
   Bianca Serban — portfolio
   Layout: centered bordered column, stacked full-width "cells".
   ========================================================================== */

:root {
  --bg: #f8f8f8;
  --surface: #ffffff;
  --text: #131211;
  --muted: #717070;
  --line: rgba(19, 18, 17, 0.09);
  --line-strong: rgba(19, 18, 17, 0.2);
  --accent: #7c3aed;
  --accent-ink: #5b21b6;
  --accent-soft: rgba(124, 58, 237, 0.08);
  --accent-line: rgba(124, 58, 237, 0.3);
  --on-accent: #ffffff;
  --invert: #131211;
  --invert-text: #f8f8f8;
  --stripe: rgba(19, 18, 17, 0.08);
  --mark: rgba(19, 18, 17, 0.035);
  --shadow: 0 1px 2px rgba(19, 18, 17, 0.06);
  --shadow-lg: 0 24px 48px -28px rgba(19, 18, 17, 0.45);

  --font: "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shell: 1080px;
  --pad: 64px;
  --nav-h: 64px;
  --radius: 12px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121110;
    --surface: #1a1918;
    --text: #f4f3f2;
    --muted: #a3a1a0;
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.22);
    --accent: #a78bfa;
    --accent-ink: #c4b5fd;
    --accent-soft: rgba(167, 139, 250, 0.14);
    --accent-line: rgba(167, 139, 250, 0.4);
    --on-accent: #131211;
    --invert: #f4f3f2;
    --invert-text: #131211;
    --stripe: rgba(255, 255, 255, 0.07);
    --mark: rgba(255, 255, 255, 0.04);
    --shadow: none;
    --shadow-lg: 0 24px 48px -28px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #121110;
  --surface: #1a1918;
  --text: #f4f3f2;
  --muted: #a3a1a0;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.22);
  --accent: #a78bfa;
  --accent-ink: #c4b5fd;
  --accent-soft: rgba(167, 139, 250, 0.14);
  --accent-line: rgba(167, 139, 250, 0.4);
  --on-accent: #131211;
  --invert: #f4f3f2;
  --invert-text: #131211;
  --stripe: rgba(255, 255, 255, 0.07);
  --mark: rgba(255, 255, 255, 0.04);
  --shadow: none;
  --shadow-lg: 0 24px 48px -28px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--invert);
  color: var(--invert-text);
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: none;
}

/* ---------- Layout primitives ---------- */

.wrap {
  width: min(var(--shell), 100% - 32px);
  margin-inline: auto;
}

.shell {
  width: min(var(--shell), 100% - 32px);
  margin-inline: auto;
  border-inline: 1px solid var(--line);
}

.accent {
  color: var(--accent);
}

.eyebrow {
  font-size: 12px;
  line-height: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.display {
  font-size: 48px;
  line-height: 56px;
  letter-spacing: -2px;
  font-weight: 700;
  text-wrap: balance;
}

.title-lg {
  font-size: 32px;
  line-height: 40px;
  letter-spacing: -1.4px;
  font-weight: 700;
  text-wrap: balance;
}

.muted {
  color: var(--muted);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav__inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: "Outfit", var(--font);
  font-size: 16px;
  line-height: 0.95;
  font-weight: 300;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: color 0.2s ease;
}

/* The B mark is painted with currentColor, so it follows the theme and hover colour. */
.logo__mark {
  width: 28px;
  aspect-ratio: 152 / 193;
  background: currentColor;
  -webkit-mask: url("../img/brand/mark.svg?v=2") center / contain no-repeat;
  mask: url("../img/brand/mark.svg?v=2") center / contain no-repeat;
  transition: transform 0.5s var(--ease);
}

.logo__text {
  display: grid;
}

.logo:hover {
  color: var(--accent);
}

.logo:hover .logo__mark {
  transform: rotate(-4deg) scale(1.04);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 15px;
  font-weight: 700;
  transition: border-color 0.2s ease, transform 0.15s ease, color 0.2s ease;
}

.chip:hover {
  border-color: var(--line-strong);
}

.chip:active {
  transform: translateY(1px);
}

.chip[aria-current="true"] {
  color: var(--accent-ink);
  border-color: var(--accent-line);
}

.chip--accent {
  background: var(--accent);
  border-color: transparent;
  color: var(--on-accent);
}

.chip--accent:hover {
  border-color: transparent;
  filter: brightness(1.08);
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.icon-btn:hover {
  background: var(--surface);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-moon,
:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.3s ease, background-color 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--dark {
  min-height: 56px;
  padding: 8px 20px 8px 8px;
  background: var(--invert);
  color: var(--invert-text);
  box-shadow: var(--shadow-lg);
}

.btn--dark:hover .btn__icon {
  transform: rotate(-8deg);
}

.btn__icon {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
  transition: transform 0.3s var(--ease);
}

.btn__icon svg {
  width: 20px;
  height: 20px;
}

.btn__label {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.btn__sub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.78;
}

.live-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3ccf6e;
}

.live-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid #3ccf6e;
  animation: ping 2.4s var(--ease) infinite;
}

@keyframes ping {
  0% {
    transform: scale(0.6);
    opacity: 1;
  }
  80%,
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

.btn--light {
  min-height: 56px;
  min-width: 220px;
  justify-content: center;
  padding: 0 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.btn--light:hover {
  border-color: var(--line-strong);
}

.btn--sm {
  min-height: 44px;
  min-width: 0;
  padding: 0 16px;
  font-size: 15px;
}

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

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__bg::before,
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
}

.hero__bg::before {
  background: repeating-linear-gradient(90deg, var(--stripe) 0 1px, transparent 1px 9px);
  -webkit-mask-image: linear-gradient(270deg, transparent 30%, #000 72%), linear-gradient(#000 40%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(270deg, transparent 30%, #000 72%), linear-gradient(#000 40%, transparent 100%);
  mask-composite: intersect;
}

.hero__bg::after {
  background: repeating-linear-gradient(90deg, var(--accent) 0 1px, transparent 1px 9px);
  opacity: 0.4;
  -webkit-mask-image: radial-gradient(42% 70% at 0% 0%, #000 0%, transparent 100%);
  mask-image: radial-gradient(42% 70% at 0% 0%, #000 0%, transparent 100%);
  animation: glow 9s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    opacity: 0.22;
  }
  to {
    opacity: 0.5;
  }
}

.hero__inner {
  position: relative;
  min-height: clamp(600px, calc(100svh - var(--nav-h) - 96px), 820px);
  display: flex;
  flex-direction: column;
}

.hero__main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 88px 0 64px;
}

.hero__photo {
  width: 232px;
  flex: none;
  aspect-ratio: 248 / 300;
  border-radius: 8px;
  object-fit: cover;
}

/* Selection frame (Figma-style) around the intro */
.frame-wrap {
  position: relative;
}

.frame {
  position: relative;
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 20px 44px 20px 20px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

/* Selection outline drawn on top of the intro (the cursor "drags" it out) */
.frame__select {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 1px solid var(--accent);
  pointer-events: none;
}

.frame__label {
  position: absolute;
  bottom: calc(100% + 6px);
  left: -1px;
  color: var(--accent-ink);
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
}

.frame__label--end {
  left: auto;
  right: -1px;
  color: var(--muted);
  font-weight: 500;
}

.handle {
  position: absolute;
  z-index: 1;
  width: 9px;
  height: 9px;
  background: var(--surface);
  border: 1px solid var(--accent);
}

.handle--tl {
  top: -5px;
  left: -5px;
}

.handle--tr {
  top: -5px;
  right: -5px;
}

.handle--bl {
  bottom: -5px;
  left: -5px;
}

.handle--br {
  bottom: -5px;
  right: -5px;
}

/* Gradient ribbons drawn behind the hero */
.ribbons {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ribbon {
  fill: none;
  stroke-width: 42;
  stroke-linecap: round;
}

.ribbon--warm {
  stroke: url(#ribbon-warm);
}

.ribbon--cool {
  stroke: url(#ribbon-cool);
}

/* Sticker icons */
.sticker {
  position: absolute;
  z-index: 2;
  width: 84px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.sticker.is-dragging {
  cursor: grabbing;
}

.sticker img,
.offer-card img {
  width: 100%;
  height: auto;
  filter: drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff)
    drop-shadow(0 10px 14px rgba(19, 18, 17, 0.2));
}

.sticker img {
  animation: float 6s ease-in-out infinite;
}

.sticker--pen {
  top: -30px;
  right: -88px;
  --rot: 14deg;
}

.sticker--whisk {
  bottom: -58px;
  left: -50px;
  width: 76px;
  --rot: -18deg;
}

.sticker--whisk img {
  animation-delay: -2s;
}

.sticker--sparkle {
  top: -46px;
  left: 34%;
  width: 52px;
  --rot: 0deg;
}

.sticker--sparkle img {
  animation-delay: -4s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(var(--rot, 0deg));
  }
  50% {
    transform: translateY(-8px) rotate(calc(var(--rot, 0deg) + 4deg));
  }
}

/* Multiplayer cursor */
.mp-cursor {
  --cursor: #0e9f6e;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
}

.mp-cursor svg {
  width: 20px;
  height: 22px;
  fill: var(--cursor);
  stroke: #fff;
  stroke-width: 1.5;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(19, 18, 17, 0.25));
}

.mp-cursor span {
  margin: 16px 0 0 -2px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--cursor);
  color: #fff;
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 10px -4px rgba(19, 18, 17, 0.35);
}

.hero__copy .display .w {
  display: inline-block;
}

.hero__copy {
  max-width: 500px;
}

.hero__copy .eyebrow {
  color: var(--muted);
  margin-bottom: 16px;
}

.hero__lead {
  margin-top: 16px;
  max-width: 440px;
  color: var(--muted);
  font-size: 18px;
  line-height: 28px;
  text-wrap: pretty;
}

/* What I do, up front: a short row of pills under the hero line */
.hero__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.hero__skills li {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
}

.hero__tools {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

/* Taste-test strip (sits at the bottom of the hero) */

.band {
  padding-bottom: 28px;
  text-align: center;
}

.band__label {
  color: var(--muted);
  margin-bottom: 14px;
}

.logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 56px;
}

/* Client logos: flattened to grey; each logo is flipped per theme by its ink color */
.client-logo {
  display: block;
  width: auto;
  opacity: 0.5;
  transition: opacity 0.25s ease;
}

.client-logo--dark-ink {
  filter: grayscale(1) contrast(1.2);
}

.client-logo--light-ink {
  filter: grayscale(1) invert(1) contrast(1.2);
}

:root[data-theme="dark"] .client-logo--dark-ink {
  filter: grayscale(1) invert(1) contrast(1.2);
}

:root[data-theme="dark"] .client-logo--light-ink {
  filter: grayscale(1) contrast(1.2);
}

/* Single-colour silhouette for logos without inner cut-outs */
.client-logo--silhouette {
  filter: brightness(0);
  opacity: 0.45;
}

:root[data-theme="dark"] .client-logo--silhouette {
  filter: brightness(0) invert(1);
}

.logos li:hover .client-logo {
  opacity: 0.85;
}

.client-logo-group {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  opacity: 0.9;
}

/* ---------- Cells (three-up quote-style row) ---------- */

.cells {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.cell {
  min-height: 320px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}

.cell + .cell {
  border-left: 1px solid var(--line);
}

.cell__text {
  color: var(--muted);
  line-height: 24px;
}

.cell__text p + p {
  margin-top: 16px;
}

.person {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  line-height: 20px;
}

.person img {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial {
  margin: 0;
}

.testimonial blockquote {
  margin: 0;
}

.avatar-initials {
  position: relative;
  overflow: hidden;
  width: 48px;
  height: 48px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
  color: var(--accent-ink);
  font-weight: 700;
}

.avatar-initials img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.person strong {
  display: block;
  font-weight: 700;
}

/* ---------- Skills ("What I bring to the table") ---------- */

.known {
  padding: 72px var(--pad);
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.known__title {
  color: var(--muted);
}

.known__title .accent {
  color: var(--accent-ink);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 760px;
  margin: 16px auto 0;
}

.pill {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
  line-height: 20px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.pill:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.pill--accent {
  color: var(--accent-ink);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.known__note {
  max-width: 460px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

/* ---------- What I offer ---------- */

.offer {
  border-bottom: 1px solid var(--line);
}

.offer__pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 72px var(--pad);
  text-align: center;
}

.offer__head {
  display: grid;
  justify-items: center;
  gap: 18px;
}

/* Typed label inside a little selection box */
.typed {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 24px;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid var(--accent);
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  color: var(--text);
}

.typed.is-typing .typed__text::after,
.typed.is-typed .typed__text::after {
  content: "_";
  margin-left: 1px;
  color: var(--accent);
  animation: caret 1s steps(1) infinite;
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

.typed .handle {
  width: 7px;
  height: 7px;
}

.typed .handle--tl,
.typed .handle--tr {
  top: -4px;
}

.typed .handle--bl,
.typed .handle--br {
  bottom: -4px;
}

.typed .handle--tl,
.typed .handle--bl {
  left: -4px;
}

.typed .handle--tr,
.typed .handle--br {
  right: -4px;
}

.offer__deck {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.offer-card {
  --lift: 0px;
  --rotk: 1;
  position: relative;
  width: clamp(150px, 17vw, 196px);
  aspect-ratio: 196 / 252;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 26px 18px 20px;
  border-radius: 6px;
  background: var(--card);
  color: #131211;
  box-shadow: 0 22px 40px -22px rgba(19, 18, 17, 0.45), inset 0 0 0 1px rgba(19, 18, 17, 0.06);
  transform: translateY(var(--lift)) rotate(calc(var(--tilt) * var(--rotk)));
  transition: transform 0.35s var(--ease), box-shadow 0.35s ease;
}

.offer-card:hover {
  --lift: -14px;
  --rotk: 0;
  z-index: 10;
  box-shadow: 0 30px 50px -24px rgba(19, 18, 17, 0.55), inset 0 0 0 1px rgba(19, 18, 17, 0.06);
}

.offer-card img {
  width: 58%;
  margin-top: 4px;
  transition: transform 0.5s var(--ease);
}

.offer-card:hover img {
  transform: scale(1.08) rotate(-6deg);
}

.offer-card h3 {
  font-size: 20px;
  line-height: 24px;
  letter-spacing: -0.5px;
  font-weight: 700;
  text-wrap: balance;
}

.offer-card p {
  margin-top: 6px;
  font-size: 13px;
  line-height: 17px;
  color: rgba(19, 18, 17, 0.72);
  text-wrap: balance;
}

.offer .known__note {
  margin: 0 auto;
}

/* Desktop: cards overlap into a fanned deck */
@media (min-width: 721px) {
  .offer__deck {
    flex-wrap: nowrap;
    gap: 0;
    padding-top: 12px;
  }

  .offer-card + .offer-card {
    margin-left: -4px;
  }
}

/* Before the storyboard plays (JS adds .is-waiting until the section is in view) */
.offer.is-waiting .offer__head h2,
.offer.is-waiting .offer-card,
.offer.is-waiting .known__note {
  opacity: 0;
}

/* ---------- Big section watermark ---------- */

.mark {
  position: relative;
  height: clamp(88px, 14vw, 152px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.mark span {
  font-size: clamp(88px, 17vw, 188px);
  line-height: 0.74;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--mark);
  -webkit-text-stroke: 1px var(--line);
  user-select: none;
  transform: translateY(14%);
  transition: transform 1.1s var(--ease);
}

.js .mark:not(.is-in) span {
  transform: translateY(70%);
}

/* ---------- Work rows ---------- */

.case {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  padding: 112px var(--pad);
  border-bottom: 1px solid var(--line);
}

/* Accent line that slides in along the bottom border on hover */
.case::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 84%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.6s var(--ease);
  pointer-events: none;
}

.case:hover::after,
.case:focus-visible::after {
  transform: none;
}

.case__title {
  margin-top: 10px;
}

.arrows {
  display: grid;
  gap: 2px;
  margin-top: 12px;
}

.arrows li {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 18px;
  line-height: 26px;
}

.arrows li::before {
  content: "→";
  color: var(--accent);
}

.case__text {
  margin-top: 12px;
  color: var(--muted);
  font-size: 18px;
  line-height: 26px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  line-height: 14px;
}

.tag--live {
  color: var(--accent-ink);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.tag--live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.case__cta {
  margin-top: 28px;
}

.case:hover .case__cta {
  border-color: var(--line-strong);
}

.case__cta .arrow {
  transition: transform 0.3s var(--ease);
}

.case:hover .case__cta .arrow {
  transform: translateX(3px);
}

.case__media {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.case__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}

/* Layered scene: gradient backdrop, ribbon, UI layers bleeding off the edges */
.scene {
  container-type: inline-size;
  aspect-ratio: 4 / 3;
  border-color: transparent;
  background:
    radial-gradient(70% 90% at 8% 0%, var(--scene-a), transparent 70%),
    radial-gradient(60% 80% at 0% 100%, var(--scene-b), transparent 70%),
    radial-gradient(70% 90% at 100% 30%, var(--scene-c), transparent 70%),
    var(--scene-base);
}

.scene--lime {
  --scene-base: #e4f2c4;
  --scene-a: #f4ef94;
  --scene-b: #a6e9c9;
  --scene-c: #c7ec9f;
}

.scene--peach {
  --scene-base: #fde6d4;
  --scene-a: #ffd7a1;
  --scene-b: #f9c4dd;
  --scene-c: #ffe3b8;
}

.scene--lilac {
  --scene-base: #ece4fd;
  --scene-a: #d9c9ff;
  --scene-b: #c6f0dd;
  --scene-c: #f6d3ec;
}

.scene--rose {
  --scene-base: #f6e6f4;
  --scene-a: #e3d1ff;
  --scene-b: #ffd9c4;
  --scene-c: #f9cfe2;
}

.scene__ribbon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--accent);
  stroke-width: 20;
  stroke-linecap: round;
  opacity: 0.9;
}

.scene__ribbon--mint {
  stroke: #3ccf8e;
}

.scene .scene__layer {
  position: absolute;
  transition: translate 0.7s var(--ease), rotate 0.7s var(--ease);
}

.scene img.scene__layer {
  width: auto;
  height: auto;
  object-fit: contain;
}

.scene__phones {
  right: -12%;
  bottom: -18%;
  width: 92% !important;
  rotate: -3deg;
  filter: drop-shadow(0 24px 30px rgba(19, 18, 17, 0.25));
}

.scene__post,
.scene__phone {
  rotate: var(--rot, 0deg);
  border-radius: 3cqw;
  box-shadow: 0 2cqw 5cqw -1.5cqw rgba(19, 18, 17, 0.35);
}

.scene__phone {
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 18px 22px rgba(19, 18, 17, 0.25));
}

.scene__card {
  display: grid;
  gap: 0.6cqw;
  padding: 3.4cqw 3.6cqw;
  border-radius: 3cqw;
  background: #fff;
  color: #131211;
  box-shadow: 0 2.4cqw 6cqw -2cqw rgba(19, 18, 17, 0.35);
}

.scene__eyebrow {
  color: #8a8888;
  font-size: 2.6cqw;
  font-weight: 700;
  letter-spacing: 0.2cqw;
  text-transform: uppercase;
}

.scene__big {
  font-size: 8cqw;
  line-height: 1;
  letter-spacing: -0.3cqw;
  font-weight: 700;
}

.scene__big--sm {
  font-size: 4.6cqw;
  line-height: 1.15;
}

.scene__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6cqw 2.4cqw;
  margin-top: 0.8cqw;
  color: #717070;
  font-size: 2.8cqw;
}

.scene__tip {
  padding: 1.8cqw 3cqw;
  border-radius: 1.6cqw;
  background: #131211;
  color: #fff;
  font-size: 3.2cqw;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 1.6cqw 4cqw -1.6cqw rgba(19, 18, 17, 0.5);
}

.scene__tip::before {
  content: "";
  position: absolute;
  top: -1.2cqw;
  left: 4cqw;
  width: 2.6cqw;
  height: 2.6cqw;
  background: inherit;
  rotate: 45deg;
  border-radius: 0.4cqw;
}

.scene__hat {
  left: 6%;
  top: 14%;
  width: 46%;
  aspect-ratio: 1;
  background: var(--accent);
  -webkit-mask: url("../img/doodles/chef-hat.png") center / contain no-repeat;
  mask: url("../img/doodles/chef-hat.png") center / contain no-repeat;
  rotate: -8deg;
}

/* Hover: layers drift by depth for a gentle parallax */
.case:hover .depth-1 {
  translate: -1.5% -2%;
}

.case:hover .depth-2 {
  translate: 2% -4%;
}

.case:hover .depth-3 {
  translate: -3% -6%;
}

.case:hover .scene__post,
.case:hover .scene__phone {
  rotate: calc(var(--rot, 0deg) * 0.4);
}

/* ---------- Process rows ---------- */

.step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  padding: 40px var(--pad);
  border-bottom: 1px solid var(--line);
}

.process__intro {
  padding: 28px var(--pad);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 18px;
  line-height: 28px;
  text-wrap: pretty;
}

.step__meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 18px;
  line-height: 26px;
}

.step__desc {
  max-width: 620px;
  margin-top: 12px;
  color: var(--muted);
}

.step__art {
  width: 92px;
  height: 92px;
  background: var(--muted);
  opacity: 0.45;
  -webkit-mask: var(--art) center / contain no-repeat;
  mask: var(--art) center / contain no-repeat;
  transition: background-color 0.3s ease, opacity 0.3s ease, transform 0.6s var(--ease);
}

.step__art--salt {
  --art: url("../img/doodles/salt-pepper.svg");
}

.step__art--plate {
  --art: url("../img/doodles/plate.png");
}

.step__art--utensils {
  --art: url("../img/doodles/utensils.png");
}

.step__art--hat {
  --art: url("../img/doodles/chef-hat.png");
}

.step__art--table {
  --art: url("../img/doodles/table.png");
}

.step:hover .step__art {
  background: var(--accent);
  opacity: 1;
  transform: rotate(-6deg) scale(1.05);
}

/* ---------- About ("Meet the chef") ---------- */

.todo {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr) minmax(0, 1fr);
}

.todo__intro {
  padding: 32px;
  border-right: 1px solid var(--line);
}

.todo__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  margin: 20px 0;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line);
  transform: rotate(2deg);
  transition: transform 0.6s var(--ease);
}

.todo__photo:hover {
  transform: rotate(0deg);
}

.todo__col {
  padding: 32px;
}

.todo__col + .todo__col {
  border-left: 1px solid var(--line);
}

.todo__col .eyebrow {
  color: var(--muted);
  margin-bottom: 14px;
}

.checks {
  display: grid;
  gap: 4px;
}

.check {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  padding: 4px 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 26px;
}

.check__icon {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 4px 10px -6px rgba(19, 18, 17, 0.3);
  font-size: 18px;
  line-height: 1;
  transform: rotate(-4deg);
  transition: transform 0.4s var(--ease), box-shadow 0.3s ease;
}

.check:nth-child(even) .check__icon {
  transform: rotate(4deg);
}

.check:hover .check__icon {
  transform: rotate(0deg) scale(1.12);
  box-shadow: 0 0 0 1px var(--accent-line), 0 8px 16px -8px rgba(19, 18, 17, 0.35);
}

.check--open .check__icon {
  background: transparent;
  box-shadow: none;
  outline: 1.5px dashed var(--accent-line);
  outline-offset: -1.5px;
}

.check[data-tip] {
  cursor: default;
}

.check[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 46px;
  bottom: calc(100% - 2px);
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--invert);
  color: var(--invert-text);
  font-size: 13px;
  line-height: 18px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.check[data-tip]:hover::after,
.check[data-tip]:focus-visible::after {
  opacity: 1;
  transform: none;
}

a.check:hover {
  color: var(--text);
}

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

.footer {
  padding: 56px 0 32px;
}

.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  padding-inline: 32px;
}

.footer__links {
  display: grid;
  gap: 2px;
  margin-top: 20px;
}

.footer__links a {
  width: fit-content;
  padding-block: 1px;
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 15px;
  line-height: 22px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.footer__links a:hover {
  color: var(--accent);
}

.footer__cta {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.collab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 320px;
  height: 104px;
  border-radius: var(--radius);
  background: var(--invert);
  color: var(--invert-text);
  font-size: 36px;
  line-height: 44px;
  letter-spacing: -1.5px;
  font-weight: 700;
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease;
}

.collab .arrow {
  transition: transform 0.4s var(--ease);
}

.collab:hover .arrow {
  transform: translateX(6px);
}

.collab:active {
  transform: translateY(1px);
}

.footer__cta p {
  max-width: 420px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  text-align: right;
}

.copy-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.copy-email:hover {
  border-color: var(--line-strong);
}

.copy-email__action {
  min-width: 64px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 700;
  text-align: center;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.copy-email.is-copied .copy-email__action {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 56px 32px 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

/* ---------- Case study pages ---------- */

/* Stage: soft mesh-gradient panel that product images float on */
:root {
  --stage-base: #f3f1ee;
  --stage-a: rgba(124, 58, 237, 0.16);
  --stage-b: rgba(110, 231, 183, 0.32);
  --stage-c: rgba(255, 209, 102, 0.3);
}

:root[data-theme="dark"] {
  --stage-base: #1d1b22;
  --stage-a: rgba(167, 139, 250, 0.22);
  --stage-b: rgba(110, 231, 183, 0.14);
  --stage-c: rgba(255, 209, 102, 0.12);
}

.stage {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 20px;
  background:
    radial-gradient(60% 80% at 12% 18%, var(--stage-a), transparent 70%),
    radial-gradient(55% 75% at 88% 26%, var(--stage-b), transparent 70%),
    radial-gradient(70% 70% at 55% 100%, var(--stage-c), transparent 70%),
    var(--stage-base);
}

.stage--mint {
  --stage-a: rgba(110, 231, 183, 0.4);
  --stage-b: rgba(124, 196, 250, 0.3);
  --stage-c: rgba(255, 209, 102, 0.22);
}

.stage--lilac {
  --stage-a: rgba(196, 181, 253, 0.55);
  --stage-b: rgba(249, 168, 212, 0.32);
  --stage-c: rgba(124, 196, 250, 0.22);
}

.stage--peach {
  --stage-a: rgba(255, 196, 140, 0.45);
  --stage-b: rgba(249, 168, 212, 0.3);
  --stage-c: rgba(255, 209, 102, 0.32);
}

:root[data-theme="dark"] .stage--mint,
:root[data-theme="dark"] .stage--lilac,
:root[data-theme="dark"] .stage--peach {
  --stage-base: #1d1b22;
}

.stage img,
.stage video {
  border-radius: 12px;
  box-shadow: 0 30px 60px -30px rgba(19, 18, 17, 0.45), 0 0 0 1px rgba(19, 18, 17, 0.05);
}

/* Pause / play for looping videos (added by main.js) */
.video-toggle {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(19, 18, 17, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.stage:hover .video-toggle,
.video-toggle:focus-visible,
.video-toggle.is-paused {
  opacity: 1;
}

.video-toggle:hover {
  transform: scale(1.06);
}

.video-toggle svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.video-toggle .icon-play,
.video-toggle.is-paused .icon-pause {
  display: none;
}

.video-toggle.is-paused .icon-play {
  display: block;
}

.stage .is-bare {
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 30px 40px rgba(19, 18, 17, 0.25));
}

/* Inside case studies only the cover keeps the gradient; screenshots sit on a flat panel */
.shot .stage,
.more-card .stage {
  background: var(--panel);
}

:root {
  --panel: #f1f0ee;
}

:root[data-theme="dark"] {
  --panel: #1f1e1d;
}

/* Case-study header */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  margin-bottom: 24px;
  padding: 0 16px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.back-link:hover {
  border-color: var(--line-strong);
}

.back-link:active {
  transform: translateY(1px);
}

.back-link .arrow {
  transition: transform 0.3s var(--ease);
}

.back-link:hover .arrow {
  transform: translateX(-3px);
}

.cs-top {
  padding-top: 40px;
}

.cs-stage {
  min-height: 300px;
  padding: 0;
}

/* Full-bleed cover: the image fills the rounded panel edge to edge */
.cs-stage img:not(.is-bare) {
  width: 100%;
  height: auto;
  border-radius: 0;
  box-shadow: none;
}

/* Transparent artwork (e.g. the template's phones) keeps some breathing room */
.cs-stage .is-bare {
  max-height: 560px;
  width: auto;
  margin: clamp(24px, 5vw, 56px);
}

.cs-intro {
  padding: 56px var(--pad) 48px;
  border-bottom: 1px solid var(--line);
}

.cs-intro .cs-summary {
  max-width: 720px;
}

/* Facts strip: key results / role & timeline / methods */
.cs-facts {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.cs-facts > div {
  padding: 28px 32px 32px;
}

.cs-facts > div + div {
  border-left: 1px solid var(--line);
}

.cs-facts .eyebrow {
  margin-bottom: 14px;
  color: var(--muted);
}

.cs-facts dl {
  display: grid;
  gap: 12px;
}

.cs-facts dt {
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}

.cs-facts dd {
  color: var(--muted);
  font-size: 15px;
  line-height: 22px;
}

.cs-facts .arrows li {
  font-size: 16px;
  line-height: 24px;
}

.method-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Body: sticky contents sidebar + content column */
.cs-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 56px;
  padding: 72px var(--pad) 96px;
  border-bottom: 1px solid var(--line);
}

.cs-toc {
  position: sticky;
  top: calc(var(--nav-h) + 32px);
  align-self: start;
}

.cs-toc .eyebrow {
  margin-bottom: 14px;
  color: var(--muted);
}

.cs-toc ol {
  display: grid;
  gap: 2px;
  border-left: 1px solid var(--line);
}

.cs-toc a {
  display: block;
  margin-left: -1px;
  padding: 6px 0 6px 14px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 18px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.cs-toc a:hover {
  color: var(--text);
}

.cs-toc a[aria-current="true"] {
  color: var(--text);
  font-weight: 700;
  border-left-color: var(--accent);
}

.cs-content {
  min-width: 0;
  max-width: 720px;
}

.cs-block {
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

.cs-block + .cs-block {
  margin-top: 96px;
}

.cs-block > .eyebrow {
  margin-bottom: 10px;
  color: var(--accent-ink);
}

.cs-block > h2 {
  margin-bottom: 20px;
}

/* Framed screenshots on tinted panels */
.prose .shot {
  margin-top: 32px;
}

.shot .stage {
  padding: clamp(20px, 4vw, 44px);
}

.shot figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  text-align: center;
}

.shot-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.shot-row .shot {
  margin-top: 0;
}

/* Metric cards */
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.metric strong {
  display: block;
  color: var(--accent);
  font-size: 38px;
  line-height: 44px;
  letter-spacing: -1.4px;
  font-weight: 700;
}

.prose .metric p {
  margin-top: 6px;
  font-size: 14px;
  line-height: 20px;
}

/* Insight cards */
.insights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.insight {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

.insight .num {
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}

.prose .insight h3 {
  margin-top: 6px;
  font-size: 17px;
  line-height: 24px;
}

.prose .insight p {
  margin-top: 6px;
  font-size: 15px;
  line-height: 23px;
}

/* Simple data table (competitive analysis, findings) */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 20px;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table thead th {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.data-table tbody tr:last-child > * {
  border-bottom: 0;
}

.data-table td {
  color: var(--muted);
}

.data-table .yes {
  color: var(--accent-ink);
  font-weight: 700;
}

.sev {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.sev--high {
  background: rgba(239, 68, 68, 0.12);
  color: #c2410c;
}

.sev--med {
  background: rgba(245, 158, 11, 0.15);
  color: #a16207;
}

.sev--low {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

/* Funnel bars */
.funnel {
  display: grid;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.funnel__row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.funnel__row span:first-child {
  color: var(--muted);
}

.funnel__bar {
  height: 12px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}

.funnel__bar i {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: inherit;
  background: var(--accent);
}

.funnel__row--drop .funnel__bar i {
  background: #f59e0b;
}

.funnel__row b {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Options considered */
.options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.option {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.option--chosen {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.option .tag {
  margin-bottom: 10px;
}

.prose .option h3 {
  font-size: 16px;
  line-height: 22px;
}

.prose .option p {
  margin-top: 6px;
  font-size: 14px;
  line-height: 21px;
}

/* Two-column lists (went well / do differently) */
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.prose .two-col h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.prose .two-col .arrows li {
  font-size: 16px;
  line-height: 24px;
}

/* More case studies */
.cs-more {
  padding: 72px var(--pad) 80px;
  border-bottom: 1px solid var(--line);
}

.cs-more > h2 {
  margin-bottom: 28px;
}

.more-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.more-card .stage {
  aspect-ratio: 16 / 10;
  padding: 24px;
}

.more-card .stage img {
  max-height: 100%;
  width: auto;
  transition: transform 0.7s var(--ease);
}

.more-card:hover .stage img {
  transform: scale(1.04) translateY(-4px);
}

.more-card .eyebrow {
  margin-top: 18px;
  color: var(--muted);
}

.more-card h3 {
  margin-top: 8px;
  font-size: 22px;
  line-height: 28px;
  letter-spacing: -0.6px;
  font-weight: 700;
}

.more-card .read {
  display: inline-flex;
  gap: 6px;
  margin-top: 10px;
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 15px;
}

.more-card:hover .read span {
  transform: translateX(3px);
}

.more-card .read span {
  transition: transform 0.3s var(--ease);
}

.more-card--cta .stage {
  color: var(--accent);
}

.more-card--cta .stage::before {
  content: "";
  width: 88px;
  height: 88px;
  background: currentColor;
  -webkit-mask: url("../img/doodles/chef-hat.png") center / contain no-repeat;
  mask: url("../img/doodles/chef-hat.png") center / contain no-repeat;
}

.prose > * + * {
  margin-top: 16px;
}

.prose p,
.prose li {
  color: var(--muted);
  font-size: 17px;
  line-height: 27px;
}

.prose strong {
  color: var(--text);
  font-weight: 700;
}

.prose .lead {
  color: var(--text);
  font-size: 24px;
  line-height: 32px;
  letter-spacing: -0.8px;
  font-weight: 700;
  text-wrap: balance;
}

.prose * + .lead {
  margin-top: 40px;
}

.prose h3 {
  font-size: 20px;
  line-height: 28px;
  letter-spacing: -0.4px;
  font-weight: 700;
}

.prose * + h3 {
  margin-top: 32px;
}

.outcomes h3 {
  display: flex;
  gap: 8px;
}

.outcomes h3::before {
  content: "→";
  color: var(--accent);
}

.outcomes h3 + p {
  margin-top: 6px;
}

.callout {
  padding: 20px 24px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.prose .eyebrow {
  font-size: 12px;
  line-height: 12px;
}

.callout .eyebrow {
  color: var(--accent-ink);
}

.prose .callout p {
  margin-top: 8px;
  color: var(--text);
  font-size: 18px;
  line-height: 27px;
}

.quote {
  padding: 4px 0 4px 20px;
  border-left: 2px solid var(--accent);
}

.prose .quote p {
  color: var(--text);
  font-size: 20px;
  line-height: 30px;
  letter-spacing: -0.3px;
}

.numbered li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.numbered li:last-child {
  border-bottom: 1px solid var(--line);
}

.numbered .num {
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.numbered strong {
  display: block;
  margin-bottom: 2px;
}

.flowline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.flowline span {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  line-height: 18px;
}

.flowline i {
  color: var(--accent);
  font-style: normal;
}

.figure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.prose .figure,
.prose .figure-row,
.prose .gallery {
  margin-top: 32px;
}

.figure img,
.figure video {
  width: 100%;
}

.figure--pad {
  padding: 24px;
}

.figure--tint {
  background: #eafbf3;
}

.figure figcaption,
.figure-note {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  background: var(--surface);
}

.figure-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

[data-zoom] {
  cursor: zoom-in;
}

.gallery {
  columns: 3 180px;
  column-gap: 12px;
}

.gallery img {
  width: 100%;
  margin-bottom: 12px;
  break-inside: avoid;
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--line);
  transition: transform 0.4s var(--ease);
}

.gallery img:hover {
  transform: translateY(-3px);
}

.next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 64px var(--pad);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.next .eyebrow {
  color: var(--muted);
}

.next .title-lg {
  margin-top: 10px;
}

.next__arrow {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--invert);
  color: var(--invert-text);
  font-size: 24px;
  transition: transform 0.4s var(--ease);
}

.next:hover .next__arrow {
  transform: translateX(6px) rotate(-8deg);
}

/* Section progress dock (case studies) */

.dock {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 40;
  width: min(520px, 100% - 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, 140%);
  visibility: hidden; /* keeps the off-screen dock out of the tab order */
  transition: transform 0.5s var(--ease), visibility 0s linear 0.5s;
}

.dock.is-visible {
  transform: translate(-50%, 0);
  visibility: visible;
  transition: transform 0.5s var(--ease);
}

.dock__toggle {
  width: 100%;
  display: block;
  padding: 12px 16px 14px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.dock__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dock__label {
  font-weight: 700;
}

.dock__count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.dock__count svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s var(--ease);
}

.dock__toggle[aria-expanded="true"] .dock__count svg {
  transform: rotate(180deg);
}

.dock__bar {
  height: 4px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--line);
}

.dock__fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--accent);
}

.dock__menu {
  display: grid;
  padding: 0 8px 8px;
  border-top: 1px solid var(--line);
}

.dock__menu[hidden] {
  display: none;
}

.dock__menu a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 15px;
}

.dock__menu a:hover {
  background: var(--bg);
  color: var(--text);
}

.dock__menu a[aria-current="true"] {
  color: var(--accent-ink);
}

.dock__menu a:first-child {
  margin-top: 8px;
}

/* Lightbox */

.lightbox {
  width: min(1400px, 100vw - 32px);
  max-width: none;
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(10, 10, 10, 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.lightbox img {
  width: 100%;
  max-height: calc(100vh - 32px);
  object-fit: contain;
  border-radius: var(--radius);
  background: #fff;
}

.lightbox__close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #131211;
  font-size: 22px;
  cursor: pointer;
}

/* ---------- Reveal on scroll ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

.js .hero .reveal {
  transition-duration: 1s;
}

.js .reveal[data-delay="1"] {
  transition-delay: 0.08s;
}

.js .reveal[data-delay="2"] {
  transition-delay: 0.16s;
}

.js .reveal[data-delay="3"] {
  transition-delay: 0.24s;
}

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

@media (max-width: 960px) {
  :root {
    --pad: 40px;
  }

  .hero__main {
    gap: 40px;
  }

  .display {
    font-size: 40px;
    line-height: 48px;
    letter-spacing: -1.6px;
  }

  .cells,
  .todo {
    grid-template-columns: minmax(0, 1fr);
  }

  .cell {
    min-height: 0;
  }

  .cell + .cell,
  .todo__col + .todo__col {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .todo__intro {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    grid-template-areas: "photo title" "photo cta";
    align-content: center;
    column-gap: 24px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .todo__intro .title-lg {
    grid-area: title;
    align-self: end;
  }

  .todo__photo {
    grid-area: photo;
    margin: 0;
  }

  .todo__intro .btn {
    grid-area: cta;
    justify-self: start;
    align-self: start;
    margin-top: 16px;
  }

  .case {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding: 72px var(--pad);
  }

  .case__media {
    order: -1;
  }

  .cs-layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 56px var(--pad) 72px;
  }

  .cs-toc {
    display: none;
  }

  .cs-facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .cs-facts > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .options {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The section dock is the mobile/tablet stand-in for the sticky contents sidebar */
@media (min-width: 961px) {
  .dock {
    display: none;
  }
}

@media (max-width: 720px) {
  .hero__main {
    flex-direction: column;
    align-items: flex-start;
    padding: 48px 4px 40px;
  }

  .hero__photo {
    width: 140px;
  }

  .frame-wrap {
    width: 100%;
  }

  .frame {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 16px 16px 24px;
  }

  .sticker {
    width: 56px;
  }

  .sticker--pen {
    top: 36px;
    right: 22px;
    width: 64px;
  }

  .sticker--whisk {
    bottom: -40px;
    left: auto;
    right: 18px;
    width: 52px;
  }

  .sticker--sparkle {
    top: -36px;
    left: 58%;
    width: 38px;
  }

  .offer__deck {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 14px;
    width: 100%;
  }

  .offer-card {
    width: 100%;
    --tilt: 0deg !important;
  }

  .offer-card:nth-child(odd) {
    rotate: -2deg;
  }

  .offer-card:nth-child(even) {
    rotate: 2deg;
  }

  .offer-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 7px);
  }

  .offer-card h3 {
    font-size: 18px;
    line-height: 22px;
  }

  .hero__ctas {
    width: 100%;
  }

  .hero__ctas .btn {
    flex: 1 1 220px;
  }

  .footer__top {
    flex-direction: column;
  }

  .footer__cta {
    justify-items: start;
    width: 100%;
  }

  .footer__cta p {
    text-align: left;
  }
}

@media (max-width: 640px) {
  :root {
    --pad: 20px;
    --nav-h: 60px;
  }

  .shell {
    width: 100%;
    border-inline: 0;
  }

  .display {
    font-size: 34px;
    line-height: 40px;
    letter-spacing: -1.4px;
  }

  .title-lg,
  .cs-title {
    font-size: 28px;
    line-height: 34px;
    letter-spacing: -1.1px;
  }

  .cell,
  .todo__intro,
  .todo__col {
    padding: 24px var(--pad);
  }

  .todo__intro {
    grid-template-columns: 104px minmax(0, 1fr);
    column-gap: 20px;
  }

  .known {
    padding: 56px var(--pad);
  }

  .case {
    padding: 56px var(--pad);
  }

  .arrows li,
  .case__text,
  .step__meta,
  .check {
    font-size: 16px;
    line-height: 24px;
  }

  .step {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 32px var(--pad);
  }

  .step__art {
    grid-row: 1;
    width: 56px;
    height: 56px;
  }

  .figure-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer .wrap {
    width: 100%;
  }

  .footer__top {
    padding-inline: var(--pad);
  }

  .footer__bottom {
    margin-inline: var(--pad);
  }

  .collab {
    width: 100%;
    height: 88px;
    font-size: 32px;
  }

  .footer__bottom {
    flex-direction: column;
  }

  .cs-top {
    padding-top: 20px;
  }

  .cs-stage {
    min-height: 0;
    border-radius: 14px;
  }

  .cs-intro {
    padding: 36px var(--pad) 32px;
  }

  .cs-facts > div {
    padding: 22px var(--pad);
  }

  .metrics,
  .insights,
  .two-col,
  .shot-row,
  .more-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .funnel__row {
    grid-template-columns: 110px minmax(0, 1fr) 40px;
  }

  .cs-block + .cs-block {
    margin-top: 72px;
  }

  .cs-more {
    padding: 56px var(--pad);
  }
}

@media (max-width: 480px) {
  .nav__actions {
    gap: 6px;
  }

  .chip {
    padding: 0 10px;
    font-size: 14px;
  }

  .chip[data-nav="process"],
  .chip[href$="#process"] {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- 404 ---------- */

.notfound {
  border-bottom: 1px solid var(--line);
}

.notfound__inner {
  min-height: calc(100svh - var(--nav-h) - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 80px 0;
  text-align: center;
}

.notfound__hat {
  width: 96px;
  height: 96px;
  margin-bottom: 8px;
  background: var(--accent);
  -webkit-mask: url("../img/doodles/chef-hat.png") center / contain no-repeat;
  mask: url("../img/doodles/chef-hat.png") center / contain no-repeat;
  animation: float 6s ease-in-out infinite;
}

.notfound .eyebrow {
  color: var(--accent-ink);
}

.notfound__text {
  max-width: 420px;
  color: var(--muted);
  font-size: 18px;
  line-height: 26px;
}

.notfound .hero__ctas {
  justify-content: center;
  margin-top: 12px;
}
