/* ==========================================================
   Case study pages — builds on styles.css tokens
   ========================================================== */

/* ---------- HERO ---------- */
.c-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.c-hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.c-hero-media img {
  width: 100%;
  height: 112%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08) brightness(0.62);
  transform: translate3d(0, var(--hy, 0px), 0) scale(1.06);
  animation: c-zoom 2.4s var(--ease) both;
}
.c-hero.dim .c-hero-media img { filter: grayscale(1) contrast(1.1) brightness(0.32) blur(1.5px); }
@keyframes c-zoom {
  from { opacity: 0; transform: scale(1.18); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1.06); }
}
.c-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, var(--bg) 0%, rgba(4, 5, 13, 0.72) 38%, rgba(4, 5, 13, 0.4) 68%, rgba(4, 5, 13, 0.9) 100%),
    linear-gradient(90deg, rgba(4, 5, 13, 0.82) 0%, rgba(4, 5, 13, 0.15) 75%);
}
.c-hero-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 96px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 96px 100%;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 60%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 60%, transparent);
  opacity: 0.55;
}
.c-scan {
  position: absolute;
  left: 0; right: 0;
  top: 0;
  height: 1px;
  background: var(--red);
  box-shadow: 0 0 18px 2px rgba(255, 59, 46, 0.45);
  z-index: -1;
  animation: c-scan 7s var(--ease-io) infinite;
  opacity: 0.8;
}
.c-scan::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 1px;
  height: 90px;
  background: linear-gradient(0deg, rgba(255, 59, 46, 0.12), transparent);
}
@keyframes c-scan {
  0% { transform: translateY(10vh); opacity: 0; }
  10% { opacity: 0.8; }
  80% { opacity: 0.8; }
  100% { transform: translateY(96vh); opacity: 0; }
}
.c-hero > .frame-corner { width: 22px; height: 22px; opacity: 0.45; }
.c-hero > .frame-corner.tl { top: calc(var(--nav-h) + 8px); left: var(--gut); }
.c-hero > .frame-corner.tr { top: calc(var(--nav-h) + 8px); right: var(--gut); }

.c-hero-inner {
  position: relative;
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: clamp(28px, 5vh, 56px);
}
.c-crumb {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: clamp(28px, 6vh, 64px);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.c-back { display: inline-flex; gap: 10px; align-items: center; transition: color 0.3s; }
.c-back i { font-style: normal; transition: transform 0.5s var(--ease); }
.c-back:hover { color: var(--red); }
.c-back:hover i { transform: translateX(-5px); }
.c-crumb .c-id { color: var(--muted); }
.c-crumb .c-id b { color: var(--fg); font-weight: 500; }

.c-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.c-tags span {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid var(--line-2);
  color: var(--fg-2);
  background: rgba(4, 5, 13, 0.4);
}

.c-title {
  font-family: var(--display);
  font-stretch: 118%;
  font-weight: 650;
  font-size: clamp(40px, min(6.6vw, 12vh), 120px); font-size: round(nearest, clamp(40px, min(6.6vw, 12vh), 120px), 8px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  max-width: 15ch;
}
.c-sub {
  margin-top: clamp(22px, 3.4vh, 36px);
  max-width: 56ch;
  font-size: clamp(17px, 1.4vw, 22px); font-size: round(nearest, clamp(17px, 1.4vw, 22px), 1px);
  line-height: 1.45;
  color: var(--fg-2);
}
.c-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(36px, 7vh, 80px);
  border-top: 1px solid var(--line-2);
}
.c-meta > div {
  padding: 18px 20px 4px 0;
  display: grid;
  gap: 6px;
  align-content: start;
}
.c-meta > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.c-meta dt {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.c-meta dd { margin: 0; font-size: 15px; line-height: 1.4; }

/* ---------- Section HUD (fixed indicator) ---------- */
.c-hud {
  position: fixed;
  left: var(--gut);
  bottom: 22px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  background: rgba(4, 5, 13, 0.78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  pointer-events: none;
}
.c-hud.on { opacity: 1; transform: none; }
.c-hud i { width: 6px; height: 6px; background: var(--red); }
.c-hud b { color: var(--fg); font-weight: 500; }
.c-hud .pct { color: var(--muted); min-width: 4ch; text-align: right; }

/* ---------- SECTIONS ---------- */
.c-sec {
  position: relative;
  padding-block: clamp(80px, 10vw, 160px);
  border-top: 1px solid var(--line);
}
.c-sec.tight { padding-top: clamp(40px, 5vw, 80px); border-top: 0; }
.c-sec.light {
  background: var(--paper);
  color: var(--ink);
  border-top: 0;
}
.c-sec.light .label { color: var(--ink-2); }
.c-sec.light .c-lead, .c-sec.light p { color: var(--ink-2); }

.c-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 32px);
  row-gap: 24px;
  margin-bottom: clamp(48px, 6vw, 96px);
}
.c-head > .label { grid-column: 1 / -1; }
.c-h2 {
  grid-column: 1 / span 9;
  font-family: var(--display);
  font-stretch: 116%;
  font-weight: 600;
  font-size: clamp(32px, 4.6vw, 80px); font-size: round(nearest, clamp(32px, 4.6vw, 80px), 8px);
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.c-lead {
  grid-column: 6 / -1;
  margin-top: clamp(8px, 2vw, 28px);
  font-size: clamp(17px, 1.35vw, 21px); font-size: round(nearest, clamp(17px, 1.35vw, 21px), 1px);
  line-height: 1.55;
  color: var(--fg-2);
}
.c-lead + .c-lead { margin-top: 0; }
.c-head .c-lead.full { grid-column: 1 / span 8; }

.c-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.c-badge b {
  background: var(--red);
  color: var(--ink);
  font-weight: 600;
  padding: 3px 7px;
  letter-spacing: 0.1em;
}

/* ---------- Quote ---------- */
.c-quote {
  position: relative;
  margin: 0 0 clamp(48px, 6vw, 96px);
  padding: clamp(28px, 4vw, 56px) 0 clamp(28px, 4vw, 56px) clamp(24px, 4vw, 64px);
  border-left: 2px solid var(--red);
  background: linear-gradient(90deg, rgba(255, 59, 46, 0.07), transparent 70%);
}
.c-quote p:first-child {
  font-family: var(--display);
  font-stretch: 108%;
  font-weight: 500;
  font-size: clamp(24px, 2.8vw, 48px); font-size: round(nearest, clamp(24px, 2.8vw, 48px), 8px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  max-width: 30ch;
  color: var(--fg);
}
.c-quote cite {
  display: block;
  margin-top: 20px;
  font-style: normal;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.c-lead-block {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 32px);
  margin-bottom: clamp(48px, 6vw, 96px);
}

/* ---------- Cards ---------- */
.c-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-2);
  column-gap: clamp(16px, 2vw, 32px);
}
.c-cards.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.c-cards.c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.c-cards.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.c-card {
  position: relative;
  padding: clamp(20px, 2.4vw, 32px) 0 clamp(24px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
}
.c-card::before {
  content: "";
  position: absolute;
  left: 0; top: -1px;
  height: 1px; width: 0;
  background: var(--red);
  transition: width 0.8s var(--ease);
}
.c-card:hover::before { width: 100%; }
.c-card .num {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--red);
  margin-bottom: clamp(18px, 3vw, 40px);
}
.c-card .big {
  display: block;
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 700;
  font-size: clamp(40px, 4vw, 72px); font-size: round(nearest, clamp(40px, 4vw, 72px), 8px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--fg);
  margin-bottom: clamp(18px, 2.4vw, 32px);
  transition: color 0.5s var(--ease);
}
.c-card:hover .big { color: var(--red); }
.c-card h3 {
  font-family: var(--display);
  font-stretch: 110%;
  font-weight: 600;
  font-size: clamp(19px, 1.5vw, 24px); font-size: round(nearest, clamp(19px, 1.5vw, 24px), 1px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.c-card p { color: var(--fg-2); font-size: 16px; line-height: 1.55; }
.c-cards + .c-cards { border-top: 0; }
.c-sec.light .c-cards { border-top-color: var(--ink); }
.c-sec.light .c-card { border-bottom-color: var(--ink-line); }
.c-sec.light .c-card p { color: var(--ink-2); }
.c-sec.light .c-card .big { color: var(--ink); } /* white would vanish on light sections */
.c-sec.light .c-card:hover .big { color: var(--red); }

/* ---------- Figures / images ---------- */
.c-fig {
  position: relative;
  margin: 0;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: clamp(10px, 1.6vw, 24px);
}
.c-fig::before, .c-fig::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 0 solid var(--red);
  z-index: 2;
  pointer-events: none;
  transition: width 0.6s var(--ease), height 0.6s var(--ease);
}
.c-fig::before { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.c-fig::after { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }
.c-fig:hover::before, .c-fig:hover::after { width: 36px; height: 36px; }
.c-fig img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 78vh;
  margin-inline: auto;
  cursor: zoom-in;
}
.c-fig figcaption, .c-cap {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  gap: 10px;
}
.c-fig figcaption::before, .c-cap::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--red);
  margin-top: 0.7em;
  flex: none;
}
.c-sec.light .c-fig { background: var(--paper-2); border-color: var(--ink-line); }
.c-sec.light .c-fig figcaption, .c-sec.light .c-cap { color: var(--ink-2); }

.c-gallery { display: grid; gap: clamp(14px, 2vw, 28px); }
.c-gallery.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.c-gallery.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.c-gallery.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.c-gallery.mixed { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
.c-gallery.mixed .c-fig img { max-height: 560px; width: auto; max-width: 100%; margin-inline: auto; }
.c-gallery + .c-gallery, .c-fig + .c-gallery, .c-gallery + .c-fig { margin-top: clamp(14px, 2vw, 28px); }
.c-block { margin-top: clamp(48px, 6vw, 96px); }
.c-block-sm { margin-top: clamp(28px, 3vw, 48px); }

/* phone screenshots: consistent height, contained */
.c-phone {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.c-phone .ph {
  --pp: clamp(10px, 1.4vw, 22px);
  position: relative;
  background:
    radial-gradient(60% 60% at 50% 40%, rgba(238, 240, 246, 0.05), transparent 70%),
    var(--bg-3);
  aspect-ratio: 9 / 15;
  overflow: hidden;
}
.c-phone .ph img {
  position: absolute;
  top: var(--pp); left: var(--pp);
  width: calc(100% - 2 * var(--pp));
  height: calc(100% - 2 * var(--pp));
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.8s var(--ease), clip-path 1.3s var(--ease);
}
.c-phone:hover .ph img { transform: translateY(-6px); }

/* ---------- Rows (insights / methods) ---------- */
.c-rows { border-top: 1px solid var(--line-2); }
.c-rows li {
  display: grid;
  grid-template-columns: minmax(160px, 3fr) 9fr;
  gap: clamp(16px, 3vw, 48px);
  padding: clamp(20px, 2.6vw, 34px) 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.c-rows li:hover { background: linear-gradient(90deg, rgba(255, 59, 46, 0.06), transparent 60%); }
.c-rows .k {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
}
.c-rows .v {
  font-family: var(--display);
  font-stretch: 104%;
  font-weight: 450;
  font-size: clamp(19px, 1.7vw, 28px); font-size: round(nearest, clamp(19px, 1.7vw, 28px), 1px);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.c-rows.methods .v { font-size: inherit; font-family: inherit; display: grid; gap: 6px; }
.c-rows.methods .v strong {
  font-family: var(--display);
  font-stretch: 110%;
  font-weight: 600;
  font-size: clamp(20px, 1.8vw, 28px); font-size: round(nearest, clamp(20px, 1.8vw, 28px), 1px);
  letter-spacing: -0.015em;
}
.c-rows.methods .v span { color: var(--fg-2); max-width: 64ch; }
.c-rows.methods .k {
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 700;
  font-size: clamp(32px, 3vw, 56px); font-size: round(nearest, clamp(32px, 3vw, 56px), 8px);
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--fg);
}
.c-rows.methods li:hover .k { color: var(--red); }

.c-subhead {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 32px;
  margin: clamp(56px, 7vw, 110px) 0 clamp(24px, 3vw, 40px);
}
.c-subhead h3 {
  font-family: var(--display);
  font-stretch: 116%;
  font-weight: 600;
  font-size: clamp(24px, 2.6vw, 48px); font-size: round(nearest, clamp(24px, 2.6vw, 48px), 8px);
  letter-spacing: -0.025em;
  line-height: 1;
}
.c-subhead p { color: var(--fg-2); }

/* ---------- Process ---------- */
.c-process {
  position: relative;
  --p: 0;
}
.c-process-rail {
  position: absolute;
  left: 0; right: 0;
  top: 22px;
  height: 1px;
  background: var(--line-2);
}
.c-process-rail span {
  position: absolute;
  inset: 0;
  background: var(--red);
  transform-origin: 0 50%;
  transform: scaleX(var(--p));
}
.c-process ol {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 32px);
}
.c-process li { position: relative; display: grid; gap: 8px; align-content: start; }
.c-step {
  width: 45px; height: 45px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  background: var(--bg);
  font-family: var(--mono);
  font-size: 14px;
  margin-bottom: 18px;
  transition: background 0.5s, border-color 0.5s, color 0.5s;
  position: relative;
}
.c-process li.on .c-step { background: var(--red); border-color: var(--red); color: var(--ink); }
.c-process .phase {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
}
.c-process h3 {
  font-family: var(--display);
  font-stretch: 110%;
  font-weight: 600;
  font-size: clamp(18px, 1.45vw, 22px); font-size: round(nearest, clamp(18px, 1.45vw, 22px), 1px);
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.c-process p { color: var(--fg-2); font-size: 15px; line-height: 1.5; }

/* ---------- Screen feature blocks ---------- */
.c-screen {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 96px);
  align-items: start;
}
.c-screen.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.c-screen.flip .c-screen-text { order: 2; }
.c-screen-text { position: sticky; top: calc(var(--nav-h) + 40px); display: grid; gap: 18px; }
.c-h3 {
  font-family: var(--display);
  font-stretch: 114%;
  font-weight: 600;
  font-size: clamp(24px, 3vw, 48px); font-size: round(nearest, clamp(24px, 3vw, 48px), 8px);
  line-height: 1;
  letter-spacing: -0.03em;
}
.c-screen-text p { color: var(--fg-2); font-size: clamp(16px, 1.15vw, 18px); font-size: round(nearest, clamp(16px, 1.15vw, 18px), 1px); line-height: 1.6; }
.c-checks { margin-top: 10px; border-top: 1px solid var(--line); }
.c-checks li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.45;
}
.c-checks li i {
  font-style: normal;
  width: 24px; height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 59, 46, 0.5);
  color: var(--red);
  font-family: var(--mono);
  font-size: 12px;
}

/* spec cards */
.c-spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.c-spec > div { background: var(--bg); padding: clamp(18px, 2vw, 28px); display: grid; gap: 8px; align-content: start; }
.c-spec .k { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--red); }
.c-spec p:not(.k) { color: var(--fg-2); font-size: 15px; line-height: 1.5; }

/* ---------- Before / After ---------- */
.c-ba { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 48px); }
.c-ba-item { display: grid; gap: 14px; }
.c-ba-imgs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.c-ba-imgs > div {
  position: relative;
  background: var(--bg-3);
  aspect-ratio: 9 / 16;
  overflow: hidden;
}
.c-ba-imgs img {
  position: absolute;
  top: 46px; left: 12px;
  width: calc(100% - 24px);
  height: calc(100% - 58px);
  object-fit: contain;
  cursor: zoom-in;
}
.c-ba-imgs .tag {
  position: absolute;
  top: 12px; left: 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid var(--line-2);
  color: var(--muted);
}
.c-ba-imgs > div:last-child .tag { background: var(--red); color: var(--ink); border-color: var(--red); }
.c-ba-imgs > div:first-child img { filter: grayscale(0.7) brightness(0.85); transition: filter 0.6s; }
.c-ba-item:hover .c-ba-imgs > div:first-child img { filter: none; }

/* ---------- Metrics ---------- */
.c-metrics {
  display: grid;
  grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr));
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
}
.c-metric {
  padding: clamp(24px, 3vw, 44px) clamp(14px, 2vw, 28px) clamp(24px, 3vw, 40px);
  display: grid;
  gap: 14px;
  align-content: space-between;
  min-height: clamp(180px, 18vw, 280px);
}
.c-metric + .c-metric { border-left: 1px solid var(--line); }
.c-metric:first-child { padding-left: 0; }
.c-metric .val {
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 700;
  font-size: clamp(56px, 6.4vw, 120px); font-size: round(nearest, clamp(56px, 6.4vw, 120px), 8px);
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--fg);
}
.c-metric .lbl {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-2);
  max-width: 24ch;
  line-height: 1.5;
}

/* ---------- Next steps ---------- */
.c-next-steps { border-top: 1px solid var(--line-2); }
.c-next-steps li {
  display: grid;
  grid-template-columns: 60px minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(14px, 2.4vw, 40px);
  padding: clamp(22px, 2.6vw, 34px) 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.c-next-steps .n { font-family: var(--mono); font-size: 12px; color: var(--red); }
.c-next-steps strong {
  font-family: var(--display);
  font-stretch: 110%;
  font-weight: 600;
  font-size: clamp(19px, 1.6vw, 26px); font-size: round(nearest, clamp(19px, 1.6vw, 26px), 1px);
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.c-next-steps p { color: var(--fg-2); }

/* ---------- Next project ---------- */
.c-next {
  position: relative;
  border-top: 1px solid var(--line);
  padding-block: clamp(80px, 10vw, 150px) clamp(60px, 8vw, 120px);
  overflow: hidden;
}
.c-next-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px 48px;
  margin-bottom: clamp(36px, 5vw, 72px);
}
.c-next-top .h1 { margin-top: 18px; }
.c-next-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  min-height: clamp(280px, 32vw, 460px);
  border: 1px solid var(--line-2);
  overflow: hidden;
  isolation: isolate;
}
.c-next-card .txt {
  padding: clamp(24px, 3.4vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  z-index: 1;
}
.c-next-card .mono { color: var(--muted); }
.c-next-card .mono b { color: var(--red); font-weight: 500; }
.c-next-card h3 {
  font-family: var(--display);
  font-stretch: 122%;
  font-weight: 700;
  font-size: clamp(32px, 3.9vw, 72px); font-size: round(nearest, clamp(32px, 3.9vw, 72px), 8px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  transition: color 0.5s var(--ease);
}
.c-next-card p { color: var(--fg-2); max-width: 46ch; }
.c-next-card .img { position: relative; overflow: hidden; border-left: 1px solid var(--line-2); }
.c-next-card .img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(0.7);
  transform: scale(1.04);
  transition: transform 1.2s var(--ease), filter 0.8s var(--ease);
}
.c-next-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--red);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform 0.8s var(--ease);
  z-index: 0;
  opacity: 0.08;
}
.c-next-card:hover::before { transform: none; }
.c-next-card:hover h3 { color: var(--red); }
.c-next-card:hover .img img { transform: scale(1.1); filter: grayscale(0) brightness(0.85); }
.c-next-card .go {
  display: inline-flex;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.c-next-card .go i { font-style: normal; transition: transform 0.5s var(--ease); }
.c-next-card:hover .go i { transform: translateX(8px); }

/* ---------- Image reveal + lightbox ---------- */
.js .c-reveal-img img {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.3s var(--ease);
}
.js .c-reveal-img.in img { clip-path: inset(0 0 0 0); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 64px);
  background: rgba(4, 5, 13, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0s 0.4s;
  cursor: zoom-out;
}
.lightbox.open { opacity: 1; visibility: visible; transition: opacity 0.4s var(--ease); }
.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  max-height: calc(100svh - 140px);
  width: auto;
  height: auto;
  object-fit: contain;
  transform: scale(0.96);
  transition: transform 0.5s var(--ease);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.lightbox.open img { transform: none; }
.lightbox p {
  position: absolute;
  left: var(--gut); right: 80px; bottom: 22px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-2);
  max-width: 100ch;
  line-height: 1.5;
}
.lightbox button {
  position: absolute;
  top: 18px; right: var(--gut);
  width: 44px; height: 44px;
  border: 1px solid var(--line-2);
  font-size: 18px;
  display: grid;
  place-items: center;
}
.lightbox button:hover { background: var(--fg); color: var(--ink); }

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1100px) {
  .c-cards.c4, .c-cards.c5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c-process ol { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; }
  .c-process-rail { display: none; }
  .c-gallery.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c-ba { grid-template-columns: 1fr; max-width: 760px; }
  .c-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c-metric:nth-child(3) { border-left: 0; padding-left: 0; }
  .c-metric:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

@media (max-width: 900px) {
  .c-hero { align-items: flex-end; }
  .c-hero > .frame-corner { display: none; }
  .c-meta { grid-template-columns: 1fr 1fr; }
  .c-meta > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .c-meta > div:nth-child(n + 3) { border-top: 1px solid var(--line); margin-top: 14px; }
  .c-h2 { grid-column: 1 / -1; }
  .c-lead, .c-head .c-lead.full { grid-column: 1 / -1; }
  .c-cards, .c-cards.c2 { grid-template-columns: 1fr; }
  .c-cards.c4, .c-cards.c5 { grid-template-columns: 1fr; }
  .c-gallery.g2, .c-gallery.g3, .c-gallery.mixed { grid-template-columns: 1fr; }
  .c-gallery.phones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c-screen, .c-screen.flip { grid-template-columns: 1fr; }
  .c-screen.flip .c-screen-text { order: 0; }
  .c-screen-text { position: static; }
  .c-spec { grid-template-columns: 1fr; }
  .c-rows li { grid-template-columns: 1fr; gap: 8px; }
  .c-process ol { grid-template-columns: 1fr; }
  .c-process li { grid-template-columns: 45px 1fr; column-gap: 18px; }
  .c-step { grid-row: span 3; margin-bottom: 0; }
  .c-next-steps li { grid-template-columns: 40px 1fr; }
  .c-next-steps p { grid-column: 2; }
  .c-next-card { grid-template-columns: 1fr; }
  .c-next-card .img { min-height: 220px; border-left: 0; border-top: 1px solid var(--line-2); }
  .c-hud { display: none; }
}

@media (max-width: 560px) {
  .c-metrics { grid-template-columns: 1fr; }
  .c-metric + .c-metric { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .c-metric { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .c-scan { display: none; }
  .js .c-reveal-img img { clip-path: none; }
}

/* ==========================================================
   BLUE SKIES — background colours from v2
   ========================================================== */
.c-hero-media::after {
  background:
    radial-gradient(90% 70% at 85% 110%, rgba(47, 70, 214, 0.45), transparent 65%),
    linear-gradient(0deg, var(--bg) 0%, rgba(4, 5, 13, 0.72) 38%, rgba(4, 5, 13, 0.4) 68%, rgba(4, 5, 13, 0.9) 100%),
    linear-gradient(90deg, rgba(4, 5, 13, 0.82) 0%, rgba(4, 5, 13, 0.15) 75%);
}
.c-next { background: linear-gradient(180deg, #1a2468 0%, #0b0f2c 40%, var(--bg) 100%); }

/* ==========================================================
   TASUKETE — page-specific elements (Figma "Tasukete 2026")
   Built on the shared case tokens so the page stays consistent.
   ========================================================== */
.tk-tag {
  display: inline-flex; align-items: center; gap: 7px;
  margin-left: 10px; padding: 4px 9px;
  border: 1px solid var(--line-2);
  font: 500 12px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-2); white-space: nowrap; vertical-align: middle;
}
.tk-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--tc, var(--muted)); }
.t-hist { --tc: #9aa3b5; }
.t-sec  { --tc: #7d95ff; }
.t-int  { --tc: #ffb547; }
.t-hyp  { --tc: #b48cff; }
.t-con  { --tc: var(--red); }
.t-val  { --tc: #3dd6a0; }
.c-head .label .tk-tag { margin-left: 14px; }

.tk-k { display: block; font: 500 12px/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }
.tk-small { color: var(--muted); font-size: 14px; line-height: 1.5; }
.tk-mt { margin-top: 28px; }

/* How to read */
.tk-read { padding-block: clamp(40px, 5vw, 72px); }
.tk-legend { display: grid; gap: 22px; }
.tk-legend ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 28px; }
.tk-legend li { display: grid; gap: 8px; justify-items: start; color: var(--fg-2); font-size: 15px; }
.tk-legend li .tk-tag { margin-left: 0; color: var(--fg); }
.tk-note { color: var(--muted); font-size: 15px; max-width: 80ch; border-left: 2px solid var(--red); padding-left: 14px; }

/* Ecosystem */
.tk-eco { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tk-eco > div { background: var(--bg); padding: clamp(18px, 2vw, 28px); display: grid; gap: 6px; align-content: start; }
.tk-eco p { color: var(--fg-2); font-size: 16px; line-height: 1.45; }

/* Problem diagram */
.tk-steps { display: grid; grid-template-columns: 0.8fr repeat(5, minmax(0, 1fr)) 0.8fr; border: 1px solid var(--line); }
.tk-steps li { position: relative; padding: 22px 18px 24px; display: grid; gap: 10px; align-content: start; border-right: 1px solid var(--line); }
.tk-steps li:last-child { border-right: 0; }
.tk-steps li::after { content: "→"; position: absolute; right: -9px; top: 22px; z-index: 1; font: 13px var(--mono); color: var(--muted); background: var(--bg); padding: 0 2px; }
.tk-steps li:last-child::after { display: none; }
.tk-steps .n { font: 500 12px var(--mono); color: var(--fg-2); }
.tk-steps strong { font-family: var(--display); font-weight: 500; font-size: 16px; line-height: 1.25; letter-spacing: -0.02em; }
.tk-steps em { font-family: var(--sans); font-style: normal; font-size: 16px; line-height: 1.35; color: var(--fg-2); }
.tk-steps li:nth-child(2), .tk-steps li:nth-child(3) { background: rgba(238, 240, 246, 0.04); }
.tk-steps li.gap { background: repeating-linear-gradient(135deg, rgba(255, 59, 46, 0.07) 0 8px, transparent 8px 16px); }
.tk-steps li.gap .n { color: var(--red); }
.tk-steps .tk-end { background: transparent; }
.tk-steps .goal strong { color: var(--red); }
.tk-legend-inline { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--muted); font-size: 14px; }
.tk-legend-inline .sw { width: 22px; height: 12px; border: 1px solid var(--line-2); display: inline-block; }
.tk-legend-inline .sw.on { background: rgba(238, 240, 246, 0.08); }
.tk-legend-inline .sw.gap { background: repeating-linear-gradient(135deg, rgba(255, 59, 46, 0.35) 0 3px, transparent 3px 6px); margin-left: 12px; }

/* Friction themes */
.tk-friction ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 18px; }
.tk-friction li { background: var(--bg); padding: 20px; display: grid; gap: 8px; }
.tk-friction strong { font-family: var(--display); font-weight: 500; font-size: 16px; letter-spacing: -0.02em; }
.tk-friction span { color: var(--fg-2); font-size: 15px; line-height: 1.45; }

/* Process: seven steps */
.tk-process ol { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tk-process h3 { font-size: clamp(16px, 1.2vw, 19px); font-size: round(nearest, clamp(16px, 1.2vw, 19px), 1px); }
.tk-process p { font-size: 14px; }

/* Before / proposed flows */
.tk-flows { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(16px, 2vw, 28px); }
.tk-flow { border: 1px solid var(--line); padding: clamp(20px, 2.4vw, 32px); display: grid; gap: 18px; align-content: start; }
.tk-flow ol { display: flex; flex-wrap: wrap; gap: 8px; }
.tk-flow li { padding: 9px 13px; border: 1px solid var(--line-2); font-size: 15px; position: relative; }
.tk-flow li:not(:last-child)::after { content: "→"; margin-left: 10px; color: var(--muted); }
.tk-flow p { color: var(--muted); font-size: 15px; }
.tk-flow.before { opacity: 0.75; }
.tk-flow.before li.exit { border-style: dashed; color: var(--muted); }
.tk-flow.after { border-color: rgba(255, 59, 46, 0.5); background: linear-gradient(135deg, rgba(255, 59, 46, 0.06), transparent 60%); }
.tk-flow.after li.goal { background: var(--red); border-color: var(--red); color: var(--ink); }
.tk-flow.after li.goal::after { display: none; }

/* Persona + hypotheses */
.tk-persona { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 3vw, 48px); align-items: start; }
.tk-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 20px; border: 1px solid var(--line); padding: clamp(20px, 2.4vw, 32px); }
.tk-card h3 { font-family: var(--display); font-weight: 500; font-size: 26px; letter-spacing: -0.03em; margin: 10px 0 8px; }
.tk-card p { color: var(--fg-2); font-size: 16px; line-height: 1.5; }
.tk-card .tk-small { margin-top: 12px; }
.tk-avatar { width: 64px; height: 64px; display: grid; place-items: center; background: var(--red); color: var(--ink); font: 500 26px var(--display); }
.tk-hyps { border-top: 1px solid var(--line-2); }
.tk-hyps li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--fg-2); font-size: 16px; line-height: 1.5; }
.tk-hyps b { font: 500 13px var(--mono); color: #b48cff; padding-top: 2px; }

/* Future-state journey */
.tk-journey { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); }
.tk-journey > div { padding: 20px 18px 22px; display: grid; gap: 10px; align-content: start; border-right: 1px solid var(--line); position: relative; }
.tk-journey > div:last-child { border-right: 0; }
.tk-journey .n { font: 500 12px var(--mono); color: var(--red); }
.tk-journey strong { font-family: var(--display); font-weight: 500; font-size: 18px; letter-spacing: -0.02em; }
.tk-journey p { color: var(--fg-2); font-size: 15px; line-height: 1.45; }
.tk-scr { margin-top: 6px; justify-self: start; padding: 5px 9px; border: 1px solid var(--line-2); font: 500 12px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-2); }

/* Prototype */
.tk-proto { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 90px); align-items: center; }
.tk-proto-text { display: grid; gap: 18px; }
.tk-proto-text > p:not(.label) { color: var(--fg-2); font-size: 17px; line-height: 1.55; max-width: 46ch; }
.tk-open { justify-self: start; font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 6px; }
.tk-device {
  justify-self: center; width: min(100%, 390px); aspect-ratio: 390 / 844; position: relative;
  border: 1px solid var(--line-2); background: #000;
  box-shadow: 0 40px 80px -40px rgba(47, 70, 214, 0.55);
}
.tk-device::before, .tk-device::after { content: ""; position: absolute; width: 18px; height: 18px; border: 0 solid var(--red); z-index: 2; pointer-events: none; }
.tk-device::before { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.tk-device::after { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }
.tk-device iframe, .tk-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tk-embed { position: relative; aspect-ratio: 16 / 9; border: 1px solid var(--line); background: var(--bg-2); }

/* Trust model */
.tk-trust { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(24px, 4vw, 72px); align-items: start; }
.tk-trust .c-rows.methods .v span { font-family: var(--mono); font-size: 13px; color: var(--fg-2); }
.tk-side { position: sticky; top: calc(var(--nav-h) + 40px); border: 1px solid var(--line); padding: clamp(20px, 2.2vw, 30px); }
.tk-src { display: grid; gap: 14px; margin-top: 14px; }
.tk-src li { display: grid; gap: 6px; color: var(--fg-2); font-size: 15px; }
.tk-src li span { justify-self: start; padding: 4px 9px; font: 500 12px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid; }
.s-off { color: #9fd3ff; border-color: rgba(159, 211, 255, 0.5); }
.s-pro { color: #3dd6a0; border-color: rgba(61, 214, 160, 0.5); }
.s-com { color: #ffb547; border-color: rgba(255, 181, 71, 0.5); }
.s-not { color: var(--red); border-color: rgba(255, 59, 46, 0.55); border-style: dashed !important; }

/* Phases */
.tk-phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tk-phases > div { background: var(--bg); padding: clamp(20px, 2.4vw, 32px); display: grid; gap: 10px; align-content: start; }
.tk-phases h3 { font-family: var(--display); font-weight: 500; font-size: 21px; letter-spacing: -0.03em; }
.tk-phases p { color: var(--fg-2); font-size: 15px; line-height: 1.5; }
.tk-phases .risk { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.tk-phases > div:first-child { background: linear-gradient(180deg, rgba(255, 59, 46, 0.07), transparent 70%), var(--bg); }

/* Measures + validation plan */
.tk-measure { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 72px); align-items: start; }
.tk-primary { border: 1px solid rgba(61, 214, 160, 0.45); padding: clamp(22px, 2.6vw, 36px); display: grid; gap: 14px; }
.tk-primary h3 { font-family: var(--display); font-weight: 500; font-size: clamp(24px, 2.4vw, 36px); font-size: round(nearest, clamp(24px, 2.4vw, 36px), 1px); line-height: 1.05; letter-spacing: -0.04em; }
.tk-primary p:not(.label) { color: var(--fg-2); font-size: 16px; line-height: 1.55; }
.tk-tests { border-top: 1px solid var(--line-2); }
.tk-tests li { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.tk-tests b { font: 500 12px var(--mono); color: #3dd6a0; padding-top: 3px; grid-row: span 2; }
.tk-tests span { color: var(--muted); font-size: 14px; font-family: var(--mono); margin-top: 4px; }

/* Gamification */
.tk-levels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 28px; align-items: end; }
.tk-levels li { border: 1px solid var(--line); padding: 16px 14px 18px; display: grid; gap: 6px; background: linear-gradient(0deg, rgba(180, 140, 255, var(--a, 0.04)), transparent); }
.tk-levels li:nth-child(1) { --a: 0.03; min-height: 130px; }
.tk-levels li:nth-child(2) { --a: 0.06; min-height: 150px; }
.tk-levels li:nth-child(3) { --a: 0.09; min-height: 170px; }
.tk-levels li:nth-child(4) { --a: 0.12; min-height: 190px; }
.tk-levels li:nth-child(5) { --a: 0.16; min-height: 210px; }
.tk-levels span { font: 500 12px var(--mono); color: #b48cff; letter-spacing: 0.06em; text-transform: uppercase; }
.tk-levels strong { font-family: var(--display); font-weight: 500; font-size: 17px; letter-spacing: -0.02em; }
.tk-levels em { font-style: normal; color: var(--fg-2); font-size: 14px; line-height: 1.4; }
.tk-nope { margin-top: 18px; color: var(--fg-2); font-size: 15px; }
.tk-nope b { color: var(--fg); font-weight: 600; }
.tk-game .c-subhead h3 .tk-tag { margin-left: 12px; }

/* From → to */
.tk-shift { border-top: 1px solid var(--line-2); }
.tk-shift li { display: grid; grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1.3fr); align-items: center; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.tk-shift span { color: var(--muted); font-size: clamp(16px, 1.4vw, 20px); font-size: round(nearest, clamp(16px, 1.4vw, 20px), 1px); text-decoration: line-through; text-decoration-color: rgba(255, 59, 46, 0.5); }
.tk-shift i { font-style: normal; color: var(--red); font-family: var(--mono); text-align: center; }
.tk-shift strong { font-family: var(--display); font-weight: 500; font-size: clamp(18px, 1.8vw, 26px); font-size: round(nearest, clamp(18px, 1.8vw, 26px), 1px); letter-spacing: -0.03em; }

/* Tasukete — responsive */
@media (max-width: 1100px) {
  .tk-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tk-steps li { border-bottom: 1px solid var(--line); }
  .tk-steps li::after { display: none; }
  .tk-journey { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tk-journey > div { border-bottom: 1px solid var(--line); }
  .tk-process ol { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 32px; }
  .tk-friction ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tk-levels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .tk-legend ul, .tk-eco, .tk-phases, .tk-flows, .tk-persona, .tk-proto, .tk-trust, .tk-measure { grid-template-columns: minmax(0, 1fr); }
  .tk-side { position: static; }
  .tk-embed { aspect-ratio: 4 / 5; }
  .tk-shift li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .tk-shift i { text-align: left; }
}
@media (max-width: 600px) {
  .tk-steps, .tk-journey, .tk-friction ul { grid-template-columns: minmax(0, 1fr); }
  .tk-process ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tk-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tk-levels li { min-height: 0 !important; }
  .tk-legend ul { grid-template-columns: minmax(0, 1fr); }
  .tk-tag { margin-left: 0; margin-top: 6px; }
  .c-head .label .tk-tag { margin-left: 0; }
  .c-head .label { flex-wrap: wrap; }
}
.tk-labelrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.c-head > .tk-labelrow { grid-column: 1 / -1; }
.tk-labelrow .tk-tag { margin-left: 0; }
/* Tasukete — task path + source row */
.tk-path { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); }
.tk-path li { position: relative; padding: 18px 20px; font-family: var(--display); font-weight: 500; font-size: clamp(16px, 1.4vw, 20px); font-size: round(nearest, clamp(16px, 1.4vw, 20px), 1px); letter-spacing: -0.02em; border-right: 1px solid var(--line); display: grid; gap: 8px; }
.tk-path li:last-child { border-right: 0; }
.tk-path li span { font: 500 12px var(--mono); color: var(--red); letter-spacing: 0.06em; }
.tk-path li:not(:last-child)::after { content: "→"; position: absolute; right: -9px; top: 50%; transform: translateY(-50%); z-index: 1; font: 13px var(--mono); color: var(--muted); background: var(--bg); padding: 0 2px; }
.tk-path li.goal { background: var(--red); color: var(--ink); }
.tk-path li.goal span { color: var(--ink); }
.tk-trust:has(.tk-src-row) { grid-template-columns: minmax(0, 1fr); }
.tk-src-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 0; }
.tk-src-row li { background: var(--bg); padding: clamp(18px, 2vw, 26px); gap: 12px; }
@media (max-width: 900px) {
  .tk-path { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tk-path li { border-bottom: 1px solid var(--line); }
  .tk-src-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .tk-path, .tk-src-row { grid-template-columns: minmax(0, 1fr); }
  .tk-path li::after { display: none; }
}

/* Tasukete — three phone screens stay on one row on small screens */
@media (max-width: 700px) {
  .c-gallery.g3.phones { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .c-gallery.g3.phones .c-phone .ph { --pp: 6px; }
}

/* Tasukete — desktop web screens in a minimal browser frame */
.tk-desk-head { max-width: 62ch; margin-bottom: clamp(22px, 3vw, 40px); }
.tk-desk-head .c-h3 { margin: 10px 0 14px; }
.tk-desk > .tk-browser { margin-bottom: clamp(14px, 2vw, 28px); }
.c-fig.tk-browser { padding: 0; overflow: hidden; }
.tk-browser .tk-bar {
  display: flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--line);
}
.tk-browser .tk-bar i {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(238, 240, 246, 0.18);
}
.tk-browser .tk-bar span {
  margin-left: 10px; padding: 3px 12px;
  font: 500 12px/1 var(--mono, "JetBrains Mono", monospace);
  letter-spacing: 0.06em; color: #a4abc0;
  background: rgba(238, 240, 246, 0.06); border-radius: 999px;
}
.c-fig.tk-browser img { display: block; width: 100%; max-height: none; }
.c-fig.tk-browser figcaption { padding: 12px 16px 14px; margin: 0; }
@media (max-width: 700px) {
  .tk-desk .c-gallery.g2 { grid-template-columns: 1fr; }
  .tk-browser .tk-bar { height: 24px; }
}

/* Tasukete — prototype switch (mobile / desktop) */
.tk-switch {
  justify-self: start; display: inline-flex; padding: 3px;
  border: 1px solid var(--line-2); background: rgba(238, 240, 246, 0.03);
}
.tk-switch button {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  padding: 9px 18px; color: var(--muted);
  font: 500 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.tk-switch button:hover { color: var(--fg); }
.tk-switch button[aria-selected="true"] { background: var(--fg); color: var(--bg); }
.tk-switch button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.tk-proto[data-mode="desktop"] { grid-template-columns: minmax(0, 1fr); align-items: start; }
.tk-proto[data-mode="desktop"] .tk-proto-text { grid-template-columns: minmax(0, 1fr) auto; column-gap: clamp(28px, 5vw, 90px); }
.tk-proto[data-mode="desktop"] .tk-proto-text > * { grid-column: 1; }
.tk-proto[data-mode="desktop"] .tk-proto-text > .c-checks { grid-column: 2; grid-row: 1 / span 4; align-self: end; min-width: 320px; }
.tk-desk-proto {
  position: relative; width: 100%;
  border: 1px solid var(--line-2); background: #000;
  box-shadow: 0 40px 80px -40px rgba(47, 70, 214, 0.55);
}
.tk-desk-proto::before, .tk-desk-proto::after { content: ""; position: absolute; width: 18px; height: 18px; border: 0 solid var(--red); z-index: 2; pointer-events: none; }
.tk-desk-proto::before { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.tk-desk-proto::after { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }
.tk-desk-screen { position: relative; aspect-ratio: 16 / 10; }
.tk-desk-screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tk-proto [hidden] { display: none !important; }
@media (max-width: 900px) {
  .tk-proto[data-mode="desktop"] .tk-proto-text { grid-template-columns: minmax(0, 1fr); }
  .tk-proto[data-mode="desktop"] .tk-proto-text > .c-checks { grid-column: 1; grid-row: auto; min-width: 0; }
}
@media (max-width: 700px) {
  .tk-desk-screen { aspect-ratio: 4 / 3; }
}

/* Tasukete — journey map beside the pain points */
.tk-problem {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: center;
}
.tk-problem > .c-fig img { width: 100%; max-height: none; }
.tk-problem > .c-cards { grid-template-columns: minmax(0, 1fr); margin-top: 0; }
.tk-problem .c-card { padding: clamp(16px, 1.6vw, 24px) 0; }
@media (max-width: 1100px) {
  .tk-problem { grid-template-columns: minmax(0, 1fr); }
  .tk-problem > .c-fig { max-width: 620px; width: 100%; justify-self: center; }
  .tk-problem > .c-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .tk-problem > .c-cards { grid-template-columns: minmax(0, 1fr); }
}

/* Tasukete — section 01 intro aligned with the pain-point cards */
.c-head.tk-problem-head {
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  column-gap: clamp(28px, 4vw, 72px);
}
.tk-problem-head > .c-h2 { grid-column: 1 / -1; max-width: 75%; }
.tk-problem-head > .c-lead {
  grid-column: 2;
  margin-top: 0;
}
@media (max-width: 1100px) {
  .c-head.tk-problem-head { grid-template-columns: minmax(0, 1fr); }
  .tk-problem-head > .c-h2 { max-width: none; }
  .tk-problem-head > .c-lead { grid-column: 1; }
}

/* Tasukete — design challenge quote spans the full box */

/* ==========================================================
   IMAGE STAGES — neutral graphite backdrop instead of blue,
   so both light and dark screens read clearly
   ========================================================== */
.c-phone .ph,
.c-ba-imgs > div {
  --stage-glow: rgba(255, 255, 255, 0.075);
  background:
    radial-gradient(70% 55% at 50% 42%, var(--stage-glow), transparent 72%),
    linear-gradient(180deg, #24252c 0%, #1a1b20 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.c-phone .ph {
  display: flex;
  align-items: center;
  justify-content: center;
}
.c-phone .ph img {
  position: static;
  width: auto;
  height: auto;
  max-width: calc(100% - 2 * var(--pp));
  max-height: calc(100% - 2 * var(--pp));
  object-fit: contain;
  border-radius: clamp(8px, 1.2vw, 16px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 4px 10px rgba(0, 0, 0, 0.35),
    0 22px 44px -14px rgba(0, 0, 0, 0.8);
}
.c-ba-imgs img { filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.6)); }

.c-fig {
  background:
    radial-gradient(80% 70% at 50% 45%, rgba(255, 255, 255, 0.05), transparent 75%),
    linear-gradient(180deg, #1b1c22 0%, #141519 100%);
  border-color: rgba(255, 255, 255, 0.08);
}
.c-fig:not(.tk-browser) img {
  border-radius: 6px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 18px 40px -16px rgba(0, 0, 0, 0.75);
}
.c-fig.tk-browser { background: #16171c; }
.tk-browser .tk-bar { background: #24252c; border-bottom-color: rgba(255, 255, 255, 0.07); }
.c-sec.light .c-fig { background: var(--paper-2); }
.c-sec.light .c-fig img { box-shadow: 0 0 0 1px var(--ink-line), 0 18px 40px -18px rgba(10, 13, 28, 0.35); }

/* ==========================================================
   SPACING — quotes follow the standard block rhythm
   ========================================================== */
.c-sec .wrap > .c-quote { margin-top: clamp(48px, 6vw, 96px); margin-bottom: clamp(48px, 6vw, 96px); }
.c-sec .wrap > .c-quote:last-child { margin-bottom: 0; }

/* Tasukete — mobile prototype frame sized so the Figma screen has the same 60px padding on all sides
   (Figma's embed keeps at least 60px above/below; the frame height matches the 390 × 844 screen
   at (width − 120px), plus 120px) */
.tk-device {
  --tk-w: min(100vw - 2 * var(--gut, 16px), 390px);
  width: min(100%, 390px);
  aspect-ratio: auto;
  height: calc((var(--tk-w) - 120px) * 2.16410 + 120px);
}

/* Tasukete — prototype intro: two balanced columns in desktop mode (same rhythm as section 01) */
.tk-proto[data-mode="desktop"] .tk-proto-text {
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  column-gap: clamp(28px, 4vw, 72px);
}
.tk-proto[data-mode="desktop"] .tk-proto-text > .c-checks {
  grid-row: 1 / span 5;
  align-self: center;
  min-width: 0;
  margin: 0;
}
@media (max-width: 900px) {
  .tk-proto[data-mode="desktop"] .tk-proto-text { grid-template-columns: minmax(0, 1fr); }
  .tk-proto[data-mode="desktop"] .tk-proto-text > .c-checks { grid-row: auto; }
}
.tk-proto[data-mode="desktop"] .tk-proto-text > p:not(.label) { max-width: none; }

/* ==========================================================
   IMAGE CORNERS
   ========================================================== */
/* Images that already have their own rounded, transparent corners (UI cards):
   no box outline, the shadow and hairline follow the image's own shape */
.c-fig img.cutout {
  border-radius: 0;
  box-shadow: none;
  filter:
    drop-shadow(0 0 0.75px rgba(255, 255, 255, 0.35))
    drop-shadow(0 18px 30px rgba(0, 0, 0, 0.6));
}

/* Before / after screens: size the image to its content box so the rounded
   corners clip the screenshot itself (removes white or square corners) */
.c-ba-imgs > div {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 46px 12px 12px;
}
.c-ba-imgs img {
  position: static;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: clamp(8px, 1.2vw, 16px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 4px 10px rgba(0, 0, 0, 0.35),
    0 22px 44px -14px rgba(0, 0, 0, 0.8);
}
.c-ba-imgs > div:last-child img { filter: none; }

/* ==========================================================
   ROUNDED CORNERS — every image surface in the case studies
   ========================================================== */
:root { --img-r: clamp(12px, 1.4vw, 20px); --img-r-in: clamp(8px, 1vw, 14px); }

/* panels */
.c-fig,
.c-phone .ph,
.c-ba-imgs,
.tk-device,
.tk-desk-proto { border-radius: var(--img-r); }
.c-phone .ph,
.c-ba-imgs { overflow: hidden; }
.c-ba-imgs > div:first-child { border-radius: var(--img-r) 0 0 var(--img-r); }
.c-ba-imgs > div:last-child { border-radius: 0 var(--img-r) var(--img-r) 0; }

/* images inside panels */
.c-fig:not(.tk-browser) img:not(.cutout) { border-radius: var(--img-r-in); }

/* browser frames: rounded window, bar follows the top corners */
.tk-browser .tk-bar { border-radius: calc(var(--img-r) - 1px) calc(var(--img-r) - 1px) 0 0; }
.tk-desk-proto .tk-desk-screen,
.tk-desk-proto .tk-desk-screen iframe { border-radius: 0 0 calc(var(--img-r) - 1px) calc(var(--img-r) - 1px); }
.c-fig.tk-browser figcaption { border-radius: 0 0 calc(var(--img-r) - 1px) calc(var(--img-r) - 1px); }
.tk-device iframe { border-radius: calc(var(--img-r) - 1px); }

/* red corner accents follow the curve */
.c-fig::before, .tk-device::before, .tk-desk-proto::before {
  border-top-left-radius: var(--img-r);
}
.c-fig::after, .tk-device::after, .tk-desk-proto::after {
  border-bottom-right-radius: var(--img-r);
}
.c-fig::before, .c-fig::after,
.tk-device::before, .tk-device::after,
.tk-desk-proto::before, .tk-desk-proto::after {
  width: calc(var(--img-r) + 12px);
  height: calc(var(--img-r) + 12px);
}
.c-fig:hover::before, .c-fig:hover::after {
  width: calc(var(--img-r) + 30px);
  height: calc(var(--img-r) + 30px);
}

/* Reveal clip extends past the image edges, so its rounded shadow and outline
   aren't cut into a square corner */
.js .c-reveal-img img { clip-path: inset(-80px -80px calc(100% + 80px) -80px); }
.js .c-reveal-img.in img { clip-path: inset(-80px); }

/* ==========================================================
   ANNOTATED SCREENS — pain points highlighted on the image
   ========================================================== */
.c-annot .ph .ann {
  position: relative;
  flex: none;
  height: calc(100% - 2 * var(--pp));
  max-width: calc(100% - 2 * var(--pp));
  aspect-ratio: 1179 / 2556;
}
.c-annot .ph .ann img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
}
.c-annot .hl {
  position: absolute;
  left: var(--x); top: var(--y);
  width: var(--w); height: var(--h);
  border: 2px solid var(--red);
  border-radius: clamp(6px, 0.8vw, 12px);
  background: rgba(255, 59, 46, 0.1);
  box-shadow: 0 0 0 4px rgba(255, 59, 46, 0.18), 0 0 0 999px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.6s var(--ease) 1s, transform 0.6s var(--ease) 1s;
}
.c-annot .ph.in .hl, html:not(.js) .c-annot .hl { opacity: 1; transform: none; }
.c-annot .hl b {
  position: absolute;
  left: -2px;
  bottom: calc(100% + 8px);
  max-width: calc(100% + 4px);
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--red);
  color: var(--ink, #0a0d1c);
  font: 600 12px/1.25 var(--mono, "JetBrains Mono", monospace);
  letter-spacing: 0.03em;
  box-shadow: 0 8px 18px -6px rgba(0, 0, 0, 0.6);
}
.c-annot .hl b em { font-style: normal; opacity: 1; font-weight: 400; }
@media (max-width: 700px) {
  .c-annot .hl b { font-size: 12px; padding: 4px 6px; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { .c-annot .hl { transition: none; } }
/* keep the dimming inside the screenshot: the wrapper clips to the rounded screen
   and carries the outline/shadow instead of the image */
.c-annot .ph .ann {
  overflow: hidden;
  border-radius: clamp(8px, 1.2vw, 16px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 4px 10px rgba(0, 0, 0, 0.35),
    0 22px 44px -14px rgba(0, 0, 0, 0.8);
}
.c-annot .ph .ann img { border-radius: 0; box-shadow: none; }
.c-annot .hl b em { color: inherit; font-family: inherit; font-size: inherit; letter-spacing: inherit; opacity: 1; }
.c-annot .hl b { display: block; width: max-content; text-align: left; }
.c-annot .hl b em { margin-right: 6px; }
@media (max-width: 700px) { .c-annot .hl b em { margin-right: 4px; } }

/* Caption marker: small red circle instead of the short red line */
.c-fig figcaption::before, .c-cap::before {
  width: 5px; height: 5px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 59, 46, 0.16);
  margin: calc(0.7em - 2px) 3px 0 3px;
}

/* Next-case titles marked .nobreak never split mid-word: the title stays on one line
   and the font size is capped to the card's text width (word ≈ 9.9 × font-size) */
.c-next-card .txt { container-type: inline-size; }
.c-next-card h3.nobreak {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
  font-size: min(clamp(32px, 3.9vw, 72px), 9.6cqi); font-size: round(nearest, min(clamp(32px, 3.9vw, 72px), 9.6cqi), 8px);
}

/* Heading that needs the full row to keep its requested line breaks */
.c-h2.c-h2-wide { grid-column: 1 / -1; }

/* AI Money Coach — button spec under the full-width component image */
.c-spec.amc-spec { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .c-spec.amc-spec { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .c-spec.amc-spec { grid-template-columns: minmax(0, 1fr); } }


/* AI Money Coach outcomes — checks */
.c-checks.amc-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 64px); margin-top: 0; }
.c-checks.amc-checks li i { color: var(--red); }
@media (max-width: 760px) { .c-checks.amc-checks { grid-template-columns: minmax(0, 1fr); } }

/* AI Money Coach hero — night-sky background like the app, light fades only for the nav, text, and page edge */
.c-hero.amc-hero .c-hero-media img { filter: none; }
.c-hero.amc-hero .c-hero-media::after {
  background:
    linear-gradient(180deg, rgba(4, 5, 13, 0.45) 0%, rgba(4, 5, 13, 0) 16%),
    linear-gradient(0deg, var(--bg) 0%, rgba(4, 5, 13, 0.35) 16%, rgba(4, 5, 13, 0) 34%),
    linear-gradient(90deg, rgba(8, 6, 26, 0.55) 0%, rgba(8, 6, 26, 0.25) 40%, rgba(8, 6, 26, 0) 60%);
}
@media (max-width: 900px) {
  .c-hero.amc-hero .c-hero-media::after {
    background: linear-gradient(0deg, var(--bg) 0%, rgba(4, 5, 13, 0.55) 40%, rgba(4, 5, 13, 0.2) 100%);
  }
}
@media (max-width: 700px) { .c-title br.amc-br { display: none; } }

/* AI Money Coach hero — animated coin dropping into the savings jar */
.amc-jar {
  position: absolute; z-index: -1;
  --jar-w: clamp(200px, 19vw, 320px);
  /* the jar's right edge sits 28px left of the "CS 01 / 05" label, which ends at the content edge */
  right: calc(max(0px, (100vw - 1680px) / 2) + var(--gut) + 168px - 0.124 * var(--jar-w)); top: 50%;
  width: var(--jar-w);
  transform: translateY(-50%);
  pointer-events: none;
}
.amc-jar svg { display: block; width: 100%; height: auto; overflow: visible; }
.amc-jar .st { fill: #fff; opacity: .5; animation: amc-tw 3.2s ease-in-out infinite; }
.amc-jar .sp { fill: #FFD45C; opacity: .7; animation: amc-tw 2.6s ease-in-out infinite; }
@keyframes amc-tw { 0%, 100% { opacity: .2; } 50% { opacity: .9; } }
.amc-jar .lay { opacity: 0; transform-box: fill-box; transform-origin: 50% 100%; transition: opacity .12s ease, transform .3s cubic-bezier(.3, 1.6, .5, 1); transform: translateY(-6px); }
.amc-jar .lay.on { opacity: 1; transform: none; }
.amc-jar .glow { opacity: .35; transition: opacity .6s ease; }
.amc-jar.pulse .glow { opacity: 1; transition-duration: .15s; }
.amc-jar .coin, .amc-jar .coin-in { transform-origin: 281px 80px; opacity: 0; }
.amc-jar .plus { opacity: 0; }
/* Phones and tablets: the jar sits inside the hero text, after the intro paragraph and before the role/scope details
   (case.js moves it there below 1181px and back on wider screens) */
@media (max-width: 1180px) {
  .c-hero-inner .amc-jar {
    position: relative; z-index: 0; inset: auto; transform: none;
    width: clamp(128px, 30vw, 200px);
    margin: 32px 0 8px;
  }
}

/* All case study quotes: the AI Money Coach style — full width, larger text */
.c-quote { container-type: inline-size; }
.c-quote p:first-child { max-width: none; font-size: min(clamp(28px, 2.7vw, 48px), 3.3cqi); font-size: round(nearest, min(clamp(28px, 2.7vw, 48px), 3.3cqi), 4px); }
@media (max-width: 900px) {
  .c-quote p:first-child { font-size: clamp(20px, 5vw, 28px); font-size: round(nearest, clamp(20px, 5vw, 28px), 1px); }
}
@media (max-width: 700px) { .c-h2 br.amc-br { display: none; } }

/* hero meta: keep each item (e.g. "UX/UI Design") on one line; wrap only between items */
.c-meta dd .nw { white-space: nowrap; }

/* Crably hero — the website on desktop and tablet, in colour, above the text; dark fade behind the title */
.c-hero.crably-hero .c-hero-media img { filter: saturate(0.9) brightness(0.92); }
.c-hero.crably-hero .c-hero-media::after {
  background:
    linear-gradient(180deg, rgba(4, 5, 13, 0.5) 0%, rgba(4, 5, 13, 0) 16%),
    linear-gradient(0deg, var(--bg) 0%, rgba(4, 5, 13, 0.82) 30%, rgba(4, 5, 13, 0.25) 58%, rgba(4, 5, 13, 0) 72%),
    linear-gradient(90deg, rgba(4, 5, 13, 0.7) 0%, rgba(4, 5, 13, 0.2) 45%, rgba(4, 5, 13, 0) 65%);
}
@media (max-width: 900px) {
  .c-hero.crably-hero .c-hero-media::after {
    background: linear-gradient(0deg, var(--bg) 0%, rgba(4, 5, 13, 0.9) 45%, rgba(4, 5, 13, 0.62) 72%, rgba(4, 5, 13, 0.55) 100%);
  }
}
.c-hero.crably-hero .c-crumb { text-shadow: 0 1px 10px rgba(4, 5, 13, 0.9), 0 0 2px rgba(4, 5, 13, 0.8); }

/* Crably solution images in a 2×2 grid: each image centred in its cell */
.c-gallery.cr-grid .c-fig { display: flex; align-items: center; justify-content: center; }

/* KnoWaterleak before/after: wide maps, one comparison per row */
.c-ba.kw-ba { grid-template-columns: minmax(0, 1fr); }
.c-ba.kw-ba .c-ba-imgs > div { aspect-ratio: 3 / 2; }
.c-ba.kw-ba { max-width: none; } /* use the full width at every size */
@media (max-width: 900px) {
  .c-ba.kw-ba .c-ba-imgs { grid-template-columns: 1fr; }
  .c-ba.kw-ba .c-ba-imgs > div:first-child { border-radius: var(--img-r) var(--img-r) 0 0; }
  .c-ba.kw-ba .c-ba-imgs > div:last-child { border-radius: 0 0 var(--img-r) var(--img-r); }
}

/* Case heroes on narrower screens: the title and labels sit over the image, so the overlay is stronger and more even */
@media (max-width: 1200px) {
  .c-hero:not(.amc-hero):not(.crably-hero) .c-hero-media::after {
    background:
      radial-gradient(90% 70% at 85% 110%, rgba(47, 70, 214, 0.4), transparent 65%),
      linear-gradient(0deg, var(--bg) 0%, rgba(4, 5, 13, 0.86) 40%, rgba(4, 5, 13, 0.76) 100%);
  }
  .c-hero.crably-hero .c-hero-media::after {
    background: linear-gradient(0deg, var(--bg) 0%, rgba(4, 5, 13, 0.9) 45%, rgba(4, 5, 13, 0.72) 75%, rgba(4, 5, 13, 0.7) 100%);
  }
}

/* Captions never spill out of narrow columns (e.g. three phones side by side on a small phone) */
.c-cap { overflow-wrap: anywhere; }
@media (max-width: 360px) {
  .c-gallery.g3.phones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================
   Phones: case study images in one column, at a readable size
   ========================================================== */
@media (max-width: 760px) {
  .c-gallery.phones.g2, .c-gallery.phones.g3, .c-gallery.phones.g4 { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .c-gallery.phones > * { width: 100%; max-width: 320px; justify-self: center; }
  .c-gallery.g3.phones .c-phone .ph { --pp: 10px; }
  /* before / after pairs (Garmin): stacked, Before above After */
  .c-ba:not(.kw-ba) .c-ba-imgs { grid-template-columns: minmax(0, 1fr); max-width: 340px; margin-inline: auto; }
  .c-ba:not(.kw-ba) .c-ba-imgs > div:first-child { border-radius: var(--img-r) var(--img-r) 0 0; }
  .c-ba:not(.kw-ba) .c-ba-imgs > div:last-child { border-radius: 0 0 var(--img-r) var(--img-r); }
}

/* "Tap to enlarge" badge on every image that opens full size */
.zoom-hint {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(4, 5, 13, 0.78);
  border: 1px solid rgba(238, 240, 246, 0.35);
  color: #fff; cursor: zoom-in;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.7);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.zoom-hint svg { width: 16px; height: 16px; }
/* desktop with a mouse: appears on hover or keyboard focus */
@media (hover: hover) and (pointer: fine) and (min-width: 761px) {
  .zoom-hint { opacity: 0; transform: scale(0.85); }
  .zoom-host:hover .zoom-hint, .zoom-host:focus-within .zoom-hint { opacity: 1; transform: none; }
}

/* TEST — AI Money Coach: jar as the hero background on phones and tablets (remove "jar-bg" from the hero to undo) */
@media (max-width: 1180px) {
  .c-hero.amc-hero.jar-bg .amc-jar {
    position: absolute; z-index: -1; transform: none; left: auto; bottom: auto;
    top: calc(var(--nav-h) + 8px);
    right: -24vw;
    width: min(92vw, 480px);
    opacity: 0.28;
  }
}
@media (min-width: 600px) and (max-width: 1180px) {
  .c-hero.amc-hero.jar-bg .amc-jar { right: -40px; top: calc(var(--nav-h) + 24px); width: min(52vw, 480px); }
}

/* Garmin hero on phones and tablets: crop on the runner (left third of the photo) and let it show above the text */
@media (max-width: 900px) {
  .c-hero.garmin-hero .c-hero-media img { object-position: 22% 30%; filter: grayscale(1) contrast(1.1) brightness(0.72); }
  .c-hero.garmin-hero .c-hero-media::after {
    background:
      radial-gradient(90% 60% at 85% 110%, rgba(47, 70, 214, 0.4), transparent 65%),
      linear-gradient(0deg, var(--bg) 0%, rgba(4, 5, 13, 0.9) 40%, rgba(4, 5, 13, 0.62) 62%, rgba(4, 5, 13, 0.3) 82%, rgba(4, 5, 13, 0.55) 100%);
  }
}

/* Outcome metrics on phones: centred figures and labels */
@media (max-width: 760px) {
  .c-metric, .c-metric:first-child, .c-metric:nth-child(3), .c-metric + .c-metric { padding-inline: 16px; }
  .c-metric { justify-items: center; text-align: center; }
  .c-metric .lbl { margin-inline: auto; }
}

/* Method rows: no motion (no reveal on scroll, no slide or fade on hover) */
.c-rows li, .c-rows .k { transition: none !important; animation: none !important; }
.c-rows li[data-reveal] { opacity: 1 !important; transform: none !important; }

/* Garmin: rows indented 10px from the left */
.c-rows.garmin-rows li { padding-left: 10px; }

/* WCAG: AI Money Coach headline stops before the jar on desktop (no text over the illustration) */
@media (min-width: 1181px) {
  .amc-hero .c-title { font-size: min(5.6vw, 12vh, 96px); font-size: round(down, min(5.6vw, 12vh, 96px), 8px); }
}

/* WCAG contrast: "Before" label gets a solid backing so it stays readable over screenshots */
.c-ba-imgs .tag { background: var(--bg); z-index: 1; }
/* WCAG contrast: hero detail labels keep their grey but get a soft dark halo over the hero imagery */
.c-hero .c-meta dt { text-shadow: 0 0 2px var(--bg), 0 0 10px var(--bg), 0 0 18px var(--bg); }

/* 1.4.12: the next-case title stays on one line, but breaks rather than being cut off if a reader enlarges letter spacing */
.c-next-card h3.nobreak { white-space: normal; overflow-wrap: anywhere; word-break: normal; }
/* 2.5.8 Target size: small text links get a 24px-tall hit area without moving anything */
.c-back { padding-block: 4px; margin-block: -4px; }
.tk-open { padding-top: 2px; margin-top: 4px; }
/* Alignment on wide screens: hero frame corners and the section indicator line up with the content column */
.c-hero > .frame-corner.tl { left: max(var(--gut), calc((100% - 1680px) / 2 + var(--gut))); }
.c-hero > .frame-corner.tr { right: max(var(--gut), calc((100% - 1680px) / 2 + var(--gut))); }
.c-hud { left: max(var(--gut), calc((100% - 1680px) / 2 + var(--gut))); }
