/* ===================================================================
   Arni Lochner — private case studies
   Tokens extracted from arnilochner.com (Framer site)
   =================================================================== */

:root {
  --ink: #0d1019;
  --ink-soft: rgba(13, 16, 25, 0.72);
  --ink-faint: rgba(13, 16, 25, 0.45);
  --paper: #ffffff;
  --paper-dim: #f5f6f9;
  --line: rgba(13, 16, 25, 0.10);
  --rust: #bf2200;
  --amber: #ffc700;
  --grad: linear-gradient(105deg, #bf2200 0%, #ffc700 100%);
  --grad-soft: linear-gradient(105deg, rgba(191, 34, 0, 0.08) 0%, rgba(255, 199, 0, 0.08) 100%);
  --dark-line: rgba(255, 255, 255, 0.12);
  --dark-soft: rgba(255, 255, 255, 0.68);
  --radius-pill: 100px;
  --radius-card: 18px;
  --maxw: 680px;
  --maxw-wide: 1140px;
  --pad-x: 24px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

body.theme-dark { background: var(--ink); color: #fff; }

img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- type ---------- */
h1 {
  font-size: clamp(34px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
}
h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.4;
}
h3 { font-size: 18px; font-weight: 700; line-height: 1.4; }

p { color: var(--ink-soft); }
/* stops single words being stranded on their own line */
p, h1, h2, h3, h4 { text-wrap: pretty; }
.theme-dark p, .band-dark p { color: var(--dark-soft); }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* on dark surfaces the gradient reads muddy, so section labels go plain white
   and tighter than the light-background kickers */
.band-dark .kicker.grad-text,
.screenflow .kicker.grad-text,
.stats-band .kicker.grad-text,
.theme-dark .kicker.grad-text {
  background: none;
  color: #fff;
  -webkit-text-fill-color: #fff;
  letter-spacing: 1.4px;
  font-weight: 800;
}

.kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* a proper heading for the dark bands, rather than a small eyebrow */
.band-title {
  display: block;
  font-size: clamp(21px, 2.4vw, 26px);
  font-weight: 800;
  letter-spacing: -0.4px;
  color: #fff;
  margin-bottom: 28px;
}

/* the problem sits on a tinted band so the white sections don't run together */
.problem-block { background: #f8f7f4; }

/* ---------- layout ---------- */
/* horizontal padding only — must not clobber section vertical padding */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad-x); padding-right: var(--pad-x); }
.wrap-wide { max-width: var(--maxw-wide); margin: 0 auto; padding-left: var(--pad-x); padding-right: var(--pad-x); }
/* the before/after panels run edge to edge, so the annotations get real width */
.wrap-bleed { max-width: 1520px; margin: 0 auto; padding-left: var(--pad-x); padding-right: var(--pad-x); }

section { padding: 48px 0; }

.section-num {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 18px;
}
.section-num:has(.dive-head) { align-items: flex-start; }
.section-num:has(.dive-head) .num { margin-top: 20px; }
.section-num .num {
  font-size: 15px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stack > * + * { margin-top: 18px; }

/* ---------- header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--pad-x);
  max-width: var(--maxw-wide);
  margin: 0 auto;
}
.site-header .avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  object-fit: cover;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 15px;
  font-weight: 600;
}
.site-header nav a { text-decoration: none; opacity: 0.85; }
.site-header nav a:hover { opacity: 1; }
.site-header .nav-links { display: flex; gap: 26px; align-items: center; }

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.4;
}
.btn-grad { background: var(--grad); color: #fff; }
.btn-grad:hover { filter: brightness(1.06); }
.btn-ghost {
  background: rgba(13, 16, 25, 0.04);
  border: 1px solid var(--line);
  color: var(--ink);
}
.theme-dark .btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--dark-line);
  color: #fff;
}

/* ---------- hero ---------- */
/* vertical longhands only — a `padding` shorthand here would wipe out the
   horizontal padding these elements inherit from .wrap / .wrap-wide */
.case-hero { padding-top: 56px; padding-bottom: 0; }
.case-hero .subtitle {
  font-size: 19px;
  line-height: 1.55;
  margin-top: 14px;
  max-width: 720px;
}

/* intro below the hero image: text left, free-floating pills + meta + CTA right
   (mirrors the public case studies) */
.intro-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 72px;
  align-items: start;
}
.intro-text p { font-size: 17px; line-height: 1.65; }
.intro-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 26px;
}
.intro-side .tags {
  justify-content: flex-end;
  margin-top: 4px;
}
.side-meta { display: grid; gap: 7px; text-align: right; }
.side-meta .gl {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-right: 8px;
}
.side-meta .gv { font-size: 14px; font-weight: 600; }
.side-meta .gv a { text-decoration: none; border-bottom: 1px solid var(--amber); }

@media (max-width: 900px) {
  .intro-cols { grid-template-columns: 1fr; gap: 40px; }
  .intro-side { align-items: flex-start; }
  .intro-side .tags { justify-content: flex-start; }
  .side-meta { text-align: left; }
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.meta-grid .label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 4px;
}
.meta-grid .value { font-size: 15px; font-weight: 600; color: var(--ink); }
.meta-grid .value a { text-decoration: none; border-bottom: 1px solid var(--amber); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.tag {
  font-size: 13px;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.theme-dark .tag { border-color: var(--dark-line); color: var(--dark-soft); }

/* ---------- placeholders (replace with real assets) ---------- */
.ph {
  position: relative;
  border-radius: var(--radius-card);
  border: 2px dashed rgba(191, 34, 0, 0.35);
  background:
    linear-gradient(135deg, rgba(191, 34, 0, 0.05), rgba(255, 199, 0, 0.07)),
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(13, 16, 25, 0.025) 14px 28px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 22px;
  gap: 6px;
  overflow: hidden;
}
.band-dark .ph, .theme-dark .ph {
  border-color: rgba(255, 199, 0, 0.4);
  background:
    linear-gradient(135deg, rgba(191, 34, 0, 0.12), rgba(255, 199, 0, 0.08)),
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(255, 255, 255, 0.03) 14px 28px);
}
.ph .ph-kind {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ph .ph-what { font-size: 14.5px; font-weight: 700; max-width: 380px; color: var(--ink); }
.band-dark .ph .ph-what, .theme-dark .ph .ph-what { color: #fff; }
.ph .ph-spec { font-size: 12.5px; color: var(--ink-faint); }
.band-dark .ph .ph-spec, .theme-dark .ph .ph-spec { color: rgba(255, 255, 255, 0.5); }

/* placeholder with a dummy image inside */
.ph.has-img {
  padding: 0;
  border: none;
  background: none;
  display: block;
}
.ph.has-img img,
.ph.has-img video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.ph.has-img figcaption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 1;
  max-width: calc(100% - 28px);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #fff;
  background: rgba(13, 16, 25, 0.72);
  backdrop-filter: blur(6px);
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ph.has-img figcaption strong {
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 10px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-right: 6px;
}
.hero-full .ph.has-img { border-radius: 0; }
/* a real hero shows in full at its own ratio, never cropped to a fixed height */
.hero-full .ph.has-img.is-final {
  border: none;
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
}
.hero-full .ph.has-img.is-final img,
.hero-full .ph.has-img.is-final video {
  position: static;
  height: auto;
  object-fit: contain;
}

/* a finished asset, not a stand-in: no replace chip */
.ph.has-img.is-final { border: 1px solid var(--dark-line); }

/* real image dropped into a messy-parts / retrospective card */
.card-shot.has-img {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.card-shot.has-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* an image and its caption stay together as one unit inside a grid */
.figblock { min-width: 0; }
.fig-caption {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--ink-faint);
}
.band-dark .fig-caption { color: rgba(255, 255, 255, 0.45); }

.ph-169 { aspect-ratio: 16 / 9; }
.ph-32 { aspect-ratio: 3 / 2; }
.ph-phone { aspect-ratio: 9 / 19; }
.ph-916 { aspect-ratio: 9 / 16; }
/* two phone screenshots sitting side by side in a text column */
.ph-phone-wide { aspect-ratio: 3 / 4; }

/* wall of DM screenshots: a masonry collage, since they share a width but
   vary a lot in height. CSS columns balances them and collapses to one
   column on a phone without any extra work. */
.dm-label {
  display: block;
  color: var(--ink-faint);
  letter-spacing: 2px;
  margin-bottom: 20px;
}
.dm-wall {
  columns: 3;
  column-gap: 18px;
}
.dm-wall img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  margin-bottom: 18px;
  break-inside: avoid;
  border: 1px solid rgba(13, 16, 25, 0.08);
  box-shadow: 0 14px 30px -16px rgba(36, 26, 77, 0.35);
}
@media (max-width: 900px) {
  .dm-wall { columns: 2; column-gap: 14px; }
  .dm-wall img { margin-bottom: 14px; border-radius: 12px; }
}
@media (max-width: 560px) {
  .dm-wall { columns: 1; }
}

/* the two problem screenshots, as phone mockups on a light background */
.problem-shots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.phone-fig { margin: 0; min-width: 0; }
.phone-fig .ss-phone {
  box-shadow:
    0 26px 54px -22px rgba(36, 26, 77, 0.42),
    0 4px 14px -4px rgba(36, 26, 77, 0.12);
  border-color: rgba(13, 16, 25, 0.12);
}
.phone-fig figcaption {
  margin-top: 15px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-faint);
}
@media (max-width: 620px) {
  .problem-shots { gap: 16px; }
  .phone-fig figcaption { font-size: 12.5px; margin-top: 11px; }
}
.ph-square { aspect-ratio: 1 / 1; }
.ph-flow { aspect-ratio: 2 / 1; }

/* full-bleed hero, matching the public case studies */
.hero-full { width: 100%; margin-top: 40px; }
.hero-full .ph {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  aspect-ratio: auto;
  width: 100%;
  height: min(78vh, 56.25vw);
  min-height: 320px;
}
.hero-full img, .hero-full video {
  width: 100%;
  height: auto;
  display: block;
}

/* full-bleed UI grid sitting between the intro and section 01 */
.hero-full.ui-grid { margin: 56px 0 8px; }

.media-row {
  display: grid;
  gap: 28px;
  margin-top: 40px;
}
.media-row.cols-2 { grid-template-columns: 1fr 1fr; }
.media-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.media-row.phones { grid-template-columns: repeat(3, 1fr); align-items: start; }
.media-row.phones > :nth-child(2) { margin-top: 44px; }

/* ---------- cards ---------- */
.challenge-card {
  margin-top: 30px;
  padding: 30px 32px;
  border-radius: var(--radius-card);
  background: var(--ink);
  color: #fff;
}
.challenge-card .label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.challenge-card .line { font-size: 21px; font-weight: 800; letter-spacing: -0.4px; line-height: 1.4; }

.card-grid {
  display: grid;
  gap: 22px;
  margin-top: 34px;
}
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 24px;
  background: var(--paper);
  overflow: hidden;
}
/* cards that lead with an edge-to-edge visual */
.card:has(.card-shot) { padding: 0; }
.card .card-body { padding: 22px 24px 26px; }
.card-shot.ph {
  aspect-ratio: 16 / 10;
  border: none;
  border-bottom: 1px dashed rgba(191, 34, 0, 0.3);
  border-radius: 0;
  padding: 16px;
  gap: 4px;
}
.card-shot.ph .ph-what { font-size: 13.5px; }
.card h3 { margin-bottom: 8px; }
.card p { font-size: 14.5px; line-height: 1.55; }
.card .why {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
}
/* only the leading label takes the gradient; emphasis inside the text stays ink */
.card .why > strong:first-child {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.card .why strong:not(:first-child) { color: var(--ink); font-weight: 700; }
.card .chip, .honest-card .chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--grad-soft);
  color: var(--rust);
  margin-bottom: 14px;
}
.card .chip.chip-adopt { background: var(--grad); color: #fff; }
.card .chip.chip-park {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-faint);
}

.honest-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 30px 32px;
  margin-top: 8px;
  background: var(--grad-soft);
}
.honest-card p { font-size: 15px; line-height: 1.65; }

/* ---------- dark bands ---------- */
.band-dark {
  background: var(--ink);
  color: #fff;
  padding: 72px 0;
  margin: 48px 0;
}
/* the section below brings its own top padding, so the band must not stack
   a margin on top of it (that was double-spacing Learnings) */
.stats-band { margin-bottom: 0; }
.band-dark h2 { color: #fff; }

/* the numbers: full-bleed background image behind big figures */
.stats-band {
  position: relative;
  overflow: hidden;
  padding: 104px 0;
}
.stats-bg.ph {
  position: absolute;
  inset: 0;
  border-radius: 0;
  border: none;
  z-index: 0;
  /* label sits in the corner so it never collides with the figures */
  justify-content: flex-end;
  align-items: flex-end;
  text-align: right;
  padding: 18px 22px;
  gap: 2px;
}
/* a real background image behind the numbers, dimmed so text stays legible */
.stats-bg.is-real {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.stats-bg.is-real img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
}
.stats-bg.is-real::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(13, 16, 25, 0.9), rgba(13, 16, 25, 0.55));
}

/* When a real image is supplied it carries its own blur-and-fade at the foot,
   so show the artwork in full and sit the figures in that dead space. */
.stats-band.has-bg { padding: 0; }
.stats-band.has-bg .stats-bg.is-real { position: static; }
.stats-band.has-bg .stats-bg.is-real img {
  position: static;
  width: 100%;
  height: auto;
  opacity: 1;
  object-fit: contain;
}
.stats-band.has-bg .stats-bg.is-real::after { content: none; }
/* the figures sit over the artwork, so they carry their own scrim: the image's
   own fade is not deep enough once there are six of them */
.stats-band.has-bg::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 68%;
  background: linear-gradient(
    to top,
    rgba(13, 16, 25, 0.97) 42%,
    rgba(13, 16, 25, 0.82) 66%,
    rgba(13, 16, 25, 0) 100%
  );
  z-index: 0;
  pointer-events: none;
}
.stats-band.has-bg .stats-inner { z-index: 1; }
.stats-band.has-bg .stats-inner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding-bottom: 44px;
}
.stats-band.has-bg .kicker { margin-bottom: 16px; }
.stats-band.has-bg .stats-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  margin-top: 0;
}
/* six figures read better as two rows of three than four plus a stray two */
.stats-band.has-bg .stats-grid:has(> :nth-child(5)) { grid-template-columns: repeat(3, 1fr); gap: 34px 26px; }
.stats-band.has-bg .stat-num { font-size: clamp(28px, 2.9vw, 40px); letter-spacing: -1.2px; }
.stats-band.has-bg .stats-grid h3 {
  font-size: 15.5px;
  margin: 4px 0 11px;
  padding-bottom: 11px;
}
.stats-band.has-bg .stats-grid p { font-size: 13.5px; line-height: 1.45; }

@media (max-width: 860px) {
  /* image on top, figures below it, so neither gets squeezed */
  .stats-band.has-bg .stats-inner {
    position: static;
    padding-top: 28px;
    padding-bottom: 38px;
  }
  .stats-band.has-bg .stats-grid,
  .stats-band.has-bg .stats-grid:has(> :nth-child(5)) { grid-template-columns: 1fr 1fr; gap: 26px 18px; }
  /* the scrim is only needed while the figures sit over the artwork */
  .stats-band.has-bg::after { content: none; }
}
@media (max-width: 560px) {
  .stats-band.has-bg .stats-grid,
  .stats-band.has-bg .stats-grid:has(> :nth-child(5)) { grid-template-columns: 1fr; }
}

.stats-bg.ph .ph-kind { font-size: 10px; opacity: 0.75; }
.stats-bg.ph .ph-what,
.stats-bg.ph .ph-spec {
  color: rgba(255, 255, 255, 0.3);
  font-size: 11.5px;
  font-weight: 500;
}
.stats-band .stats-inner { position: relative; z-index: 1; }
.stats-band .kicker { margin-bottom: 30px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 48px 40px;
  margin-top: 8px;
}
/* figures follow the public case studies: white, large, with a hairline
   between the label and the explanation */
.stats-grid .stat-num {
  font-size: clamp(44px, 4.8vw, 60px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.24;
  color: #fff;
}
.stats-grid h3 {
  margin: 6px 0 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}
.stats-grid p { font-size: 15.5px; line-height: 1.55; color: rgba(255, 255, 255, 0.72); }

/* ---------- screen flow (product screens, in order) ---------- */
.screenflow {
  /* deep Feather purple, so the light app screens sit forward off it */
  --sf-bg-1: #241553;
  --sf-bg-2: #140c2c;
  --sf-glow: #7c5cff;
  position: relative;
  background:
    radial-gradient(130% 90% at 12% -10%, rgba(124, 92, 255, 0.42), transparent 62%),
    radial-gradient(90% 80% at 100% 110%, rgba(196, 178, 255, 0.16), transparent 60%),
    linear-gradient(165deg, var(--sf-bg-1), var(--sf-bg-2));
  /* runs edge to edge; the grid inside stays on the content column */
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  padding: 58px 0 54px;
  margin-top: 44px;
  overflow: hidden;
}
/* matches the flow band above it, rather than its own purple */
.screenflow-ink {
  background: var(--ink);
  border-top-color: rgba(255, 255, 255, 0.07);
  border-bottom-color: rgba(255, 255, 255, 0.07);
  --sf-bg-2: var(--ink);
}

.screenflow-head { padding: 0 0 34px; }
.screenflow-head .section-num { margin-bottom: 14px; }
.screenflow-head h2 { color: #fff; }
.screenflow-intro {
  font-size: 17px;
  line-height: 1.65;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.68);
}
.screenflow-head .kicker { margin-bottom: 0; }
.screenflow-hint {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
}
/* the title art is on black, so screen-blend it onto the panel */
.screenflow-logo {
  width: auto;
  height: 78px;
  mix-blend-mode: screen;
  margin: -8px 0;
}
@media (max-width: 620px) {
  .screenflow-logo { height: 56px; margin: -6px 0; }
}

/* every screen visible at once: no scrolling, no snap points */
.screengrid {
  --ss-gap: 30px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 34px var(--ss-gap);
}

.screenshot { margin: 0; min-width: 0; position: relative; }

/* ticker: the screens loop past instead of sitting in a grid */
.screenflow-ticker .ticker-viewport { overflow: hidden; }
.ticker-track {
  /* a wider gap between the two copies, so the loop restart reads as a break
     rather than another item. The keyframe uses the same value, which is what
     keeps the wrap seamless. */
  --ss-lead: 130px;
  display: flex;
  gap: var(--ss-lead);
  width: max-content;
  animation: ss-ticker 42s linear infinite;
}
.ticker-set {
  display: flex;
  gap: var(--ss-gap, 30px);
}
/* sized by height, so screenshots of different aspect ratios still line up */
.ticker-set .screenshot { width: auto; flex: 0 0 auto; }
.ticker-set .ss-phone { height: 498px; width: fit-content; }
.ticker-set .ss-phone img { height: 100%; width: auto; }
.ticker-set .screenshot::after { content: none; }
@media (max-width: 620px) {
  .ticker-set .ss-phone { height: 400px; }
}
@keyframes ss-ticker {
  to { transform: translateX(calc(-50% - (var(--ss-lead, 130px) / 2))); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .screenflow-ticker .ticker-viewport { overflow-x: auto; }
}
.screenflow-ticker .screenshot figcaption { grid-template-columns: auto 1fr; }

/* arrow travelling between screens, centred on the phone rather than the card */
.screenshot::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 0;
  width: var(--ss-gap);
  padding-bottom: var(--ss-ratio, 176.6%);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none"><path d="M3 9h10M9.5 5 13.5 9l-4 4" stroke="white" stroke-opacity="0.6" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  animation: ss-nudge 2.6s ease-in-out infinite;
}
@keyframes ss-nudge {
  0%, 100% { transform: translateX(-3px); }
  50% { transform: translateX(3px); }
}
@media (prefers-reduced-motion: reduce) {
  .screenshot::after { animation: none; }
}
/* no arrow at the end of a row, or after the last screen */
.screenshot:nth-child(4n)::after,
.screenshot:last-child::after { content: none; }
/* dark device bezel, matching the mockups in the UI grid above */
.ss-phone {
  border-radius: 30px;
  overflow: hidden;
  background: #0d0918;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  /* wide, soft falloff so the screens float rather than sit on a hard edge */
  box-shadow:
    0 48px 90px -30px rgba(8, 4, 26, 0.85),
    0 24px 60px -24px rgba(60, 40, 140, 0.55),
    0 6px 18px -8px rgba(8, 4, 26, 0.4);
}
.ss-phone img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 23px;
}

.screenshot figcaption {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  margin-top: 16px;
}
.ss-num {
  grid-row: span 2;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  /* solid white disc reads cleaner on the purple panel than a gradient pill */
  background: #fff;
  color: #17102e;
  font-size: 12px;
  font-weight: 800;
  margin-top: 1px;
}
.screenshot figcaption b {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: #fff;
}
.ss-note { font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, 0.5); }

@media (max-width: 1000px) {
  .screengrid { grid-template-columns: repeat(3, 1fr); }
  .screenshot:nth-child(4n)::after { content: ""; }
  .screenshot:nth-child(3n)::after,
  .screenshot:last-child::after { content: none; }
}
@media (max-width: 620px) {
  .screenflow { padding: 40px 0 38px; margin-top: 32px; }
  .screenflow-head { padding: 0 0 20px; flex-wrap: wrap; gap: 6px; }
  .screengrid { --ss-gap: 20px; grid-template-columns: repeat(2, 1fr); gap: 24px var(--ss-gap); }
  .screenshot:nth-child(3n)::after,
  .screenshot:nth-child(4n)::after { content: ""; }
  .screenshot:nth-child(2n)::after,
  .screenshot:last-child::after { content: none; }
  .screenshot::after { background-size: 14px; }
  .ss-phone { border-radius: 22px; padding: 5px; }
  .ss-phone img { border-radius: 17px; }
  .screenshot figcaption { gap: 2px 8px; margin-top: 12px; }
  .ss-num { width: 21px; height: 21px; font-size: 11px; }
  .screenshot figcaption b { font-size: 13.5px; }
  .ss-note { font-size: 12px; line-height: 1.4; }
}

/* ---------- modular-format diagram (blocks + chains) ---------- */
.modflow {
  --mf-video: #ff2d78;
  --mf-choice: #00e5ff;
  --mf-chat: #9b7dff;
  margin-top: 6px;
}
.mf-heading {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 20px;
}
.mf-heading-2 { margin-top: 48px; }

.mf-blocks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.mf-block {
  border: 2px solid;
  border-radius: 22px;
  padding: 22px 24px 24px;
  background: rgba(255, 255, 255, 0.04);
}
.mf-block h4 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #fff;
  margin: 16px 0 5px;
}
.mf-block p { font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, 0.5); }
.mf-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
}
.mf-icon svg { width: 24px; height: 24px; }

.mf-video { border-color: color-mix(in srgb, var(--mf-video) 45%, transparent); }
.mf-choice { border-color: color-mix(in srgb, var(--mf-choice) 45%, transparent); }
.mf-chat { border-color: color-mix(in srgb, var(--mf-chat) 45%, transparent); }
.mf-block.mf-video .mf-icon { background: color-mix(in srgb, var(--mf-video) 16%, transparent); color: var(--mf-video); }
.mf-block.mf-choice .mf-icon { background: color-mix(in srgb, var(--mf-choice) 16%, transparent); color: var(--mf-choice); }
.mf-block.mf-chat .mf-icon { background: color-mix(in srgb, var(--mf-chat) 16%, transparent); color: var(--mf-chat); }

.mf-comps { display: grid; gap: 16px; }
.mf-comp {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  gap: 20px;
}
.mf-comp-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}
.mf-chain {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 0;
}
.mf-pill {
  border: 2px solid;
  border-radius: 12px;
  padding: 9px 16px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #fff;
}
/* same coloured border as the blocks above; the `border` shorthand on
   .mf-pill resets border-color, so it has to be restated here */
.mf-pill.mf-video {
  background: color-mix(in srgb, var(--mf-video) 15%, transparent);
  border-color: color-mix(in srgb, var(--mf-video) 45%, transparent);
}
.mf-pill.mf-choice {
  background: color-mix(in srgb, var(--mf-choice) 15%, transparent);
  border-color: color-mix(in srgb, var(--mf-choice) 45%, transparent);
}
.mf-pill.mf-chat {
  background: color-mix(in srgb, var(--mf-chat) 15%, transparent);
  border-color: color-mix(in srgb, var(--mf-chat) 45%, transparent);
}
/* arrow sits in the gap between pills, never over their borders */
.mf-pill { position: relative; }
.mf-pill + .mf-pill { margin-left: 34px; }
.mf-pill + .mf-pill::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 10px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="26" height="10" viewBox="0 0 26 10" fill="none"><path d="M2 5h20M18.5 1.5 22 5l-3.5 3.5" stroke="white" stroke-opacity="0.42" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat center;
}

@media (max-width: 860px) {
  .mf-blocks { grid-template-columns: 1fr; gap: 14px; }
  .mf-block { display: grid; grid-template-columns: 44px 1fr; gap: 4px 16px; padding: 18px 20px; }
  .mf-block .mf-icon { grid-row: span 2; }
  .mf-block h4 { margin: 0 0 3px; align-self: end; }
  .mf-heading-2 { margin-top: 36px; }
  .mf-comp { grid-template-columns: 1fr; gap: 10px; }
  .mf-pill { padding: 8px 13px; font-size: 11.5px; letter-spacing: 1px; }
  .mf-pill + .mf-pill { margin-left: 26px; }
  .mf-pill + .mf-pill::before { width: 26px; background-size: 20px 10px; }
}

/* ---------- coded flow diagram ---------- */
/* wider than the text column so five columns still breathe */
.wrap-flow {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.flow { --flow-gap: 68px; margin-top: 6px; }

.flow-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-bottom: 30px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.flow-legend .fl {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.72);
}
.flow-legend .fl::before {
  content: "";
  width: 26px;
  height: 15px;
  border-radius: 5px;
  border: 2px solid var(--flow-accent);
  background: rgba(255, 255, 255, 0.06);
  flex: 0 0 auto;
}
.flow-legend .fl-sys { color: var(--flow-accent-2); }
.flow-legend .fl-sys::before {
  border-style: dashed;
  border-color: var(--flow-accent-2);
  opacity: 0.65;
  background: none;
}
.flow-legend em {
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.3px;
  text-transform: none;
  color: rgba(255, 255, 255, 0.35);
  margin-left: 9px;
}

.flow-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* four across, so seven steps land as 4 + 3 with room for the copy */
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, auto);
  gap: var(--flow-gap) 18px;
}
/* subgrid keeps both lanes aligned no matter how the copy wraps */
.flow-step {
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
  gap: var(--flow-gap);
}

.fstep {
  position: relative;
  border-radius: 20px;
  padding: 20px 20px 22px;
  border: 2px solid transparent;
}
.fstep-user {
  background: rgba(255, 255, 255, 0.06);
  border-color: color-mix(in srgb, var(--flow-accent) 55%, transparent);
}
.fstep-sys {
  background: rgba(255, 255, 255, 0.028);
  border-color: color-mix(in srgb, var(--flow-accent-2) 32%, transparent);
  border-style: dashed;
}
.fnum {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 14px;
}
.fstep-user .fnum { background: var(--flow-accent); color: #fff; }
.fstep-sys .fnum {
  background: color-mix(in srgb, var(--flow-accent-2) 18%, transparent);
  color: var(--flow-accent-2);
}
/* the hidden lane carries an icon rather than repeating the step number */
.fnum-icon {
  background: none !important;
  width: auto;
  height: 30px;
  font-size: 22px;
  place-items: center start;
}
.fstep h4 {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.2px;
  line-height: 1.3;
  color: #fff;
  margin-bottom: 7px;
}
.fstep p { font-size: 13.5px; line-height: 1.5; color: rgba(255, 255, 255, 0.5); }

/* dashed tie from a visible step down to what it triggers */
.fstep-sys::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  height: var(--flow-gap);
  border-left: 2px dashed var(--flow-accent-2);
  opacity: 0.35;
}
/* connector to the next step along the lane */
.flow-step:not(:last-child) .fstep::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  width: 18px;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
}
/* no arrow at the end of a row (declared after the rule it overrides) */
.flow-step:nth-child(4n) .fstep::after { content: none; }
.sys-tag { display: none; }

@media (max-width: 1040px) {
  .flow-steps { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(6, auto); }
  .flow-step:nth-child(4n) .fstep::after { content: ""; }
  .flow-step:nth-child(3n) .fstep::after { content: none; }
}
@media (max-width: 900px) {
  .flow { --flow-gap: 14px; }
  .flow-legend { flex-direction: column; align-items: flex-start; gap: 12px; }
  .flow-legend .fl { flex-wrap: wrap; }
  .flow-legend em { flex-basis: 100%; margin-left: 0; padding-left: 36px; }
  .flow-steps { grid-template-columns: 1fr; grid-template-rows: none; gap: 30px; }
  .flow-step { grid-row: auto; grid-template-rows: auto; gap: var(--flow-gap); }
  .flow-step .fstep::after { content: none; }
  .sys-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--flow-accent-2);
    opacity: 0.75;
    margin-bottom: 10px;
  }
  .fstep-sys .fnum { display: none; }
}

/* ---------- coded app mockups ---------- */
.mk-phone {
  --mk-ink: #241a4d;
  --mk-brand: #7c5cff;
  --mk-line: rgba(36, 26, 77, 0.12);
  background: #0d0918;
  border: 1px solid rgba(13, 16, 25, 0.14);
  border-radius: 22px;
  padding: 5px;
  box-shadow: 0 22px 44px -20px rgba(36, 26, 77, 0.4), 0 3px 10px -3px rgba(36, 26, 77, 0.12);
  overflow: hidden;
}
.mk-screen {
  position: relative;
  background: #f6f3fe;
  border-radius: 17px;
  padding: 11px;
  display: grid;
  gap: 8px;
  align-content: start;
  /* a real handset, not a square */
  aspect-ratio: 9 / 19;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.35;
  color: var(--mk-ink);
}
.mk-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-radius: 10px;
  padding: 9px 11px;
  font-weight: 800;
  font-size: 11.5px;
}
.mk-bar i { font-style: normal; opacity: 0.4; }
.mk-h { font-size: 16px; font-weight: 800; letter-spacing: -0.2px; }
.mk-sub { font-size: 10.5px; color: rgba(36, 26, 77, 0.55); }

.mk-tiles { display: grid; gap: 6px; }
.mk-cols-2 { grid-template-columns: 1fr 1fr; }
.mk-cols-3 { grid-template-columns: repeat(3, 1fr); }
.mk-tile {
  position: relative;
  background: #fff;
  border: 1px solid var(--mk-line);
  border-radius: 9px;
  padding: 7px 4px;
  display: grid;
  justify-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  min-height: 64px;
  align-content: center;
}
.mk-tile.is-dashed { border-style: dashed; border-color: rgba(124, 92, 255, 0.5); color: var(--mk-brand); }
.mk-tile.is-on { background: var(--mk-brand); color: #fff; border-color: transparent; }
.mk-emoji { font-size: 21px; line-height: 1; }
.mk-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: #16a34a;
  color: #fff;
  font-size: 7.5px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 20px;
}
.mk-tile.is-dashed .mk-badge { background: var(--mk-brand); }

/* stand-in character art, tinted per subject */
.mk-art { display: block; width: 100%; height: 56px; border-radius: 7px; object-fit: cover; }
.mk-art-1 { background: linear-gradient(135deg, #f6b48f, #ef8f6b); }
.mk-art-2 { background: linear-gradient(135deg, #a8c8f0, #7f9fd8); }
.mk-art-3 { background: linear-gradient(135deg, #b9b2c6, #8f8799); }
.mk-art-4 { background: linear-gradient(135deg, #ffb46b, #f28a3c); }
.mk-art-5 { background: linear-gradient(135deg, #cfe0f5, #9db9dd); }
.mk-art-6 { background: linear-gradient(135deg, #d8b48c, #b98a5e); }

.mk-field {
  background: #fff;
  border: 1px solid var(--mk-line);
  border-radius: 9px;
  padding: 7px 8px;
  display: grid;
  gap: 3px;
}
.mk-field.is-warn { border-color: rgba(191, 34, 0, 0.5); }
.mk-fl { font-size: 8.5px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: rgba(36, 26, 77, 0.45); }
.mk-fv { font-size: 10.5px; }
.mk-caret { display: inline-block; width: 1px; height: 9px; background: var(--mk-brand); margin-left: 1px; vertical-align: -1px; }

.mk-media {
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 10px;
  font-weight: 700;
  position: relative;
  overflow: hidden;
}
.mk-media-1 { background: linear-gradient(135deg, #f6b48f, #ef8f6b); }
.mk-media-3 { background: linear-gradient(135deg, #b9b2c6, #8f8799); }
.mk-media-4 { background: linear-gradient(135deg, #ffb46b, #f28a3c); }
.mk-media.is-bad { position: relative; filter: saturate(0.55); }
.mk-media.is-bad::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9px;
  border: 1.5px solid rgba(191, 34, 0, 0.6);
}

.mk-sheet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.mk-sheet .mk-art { height: 44px; }
.mk-cell {
  display: grid;
  place-items: center;
  height: 44px;
  border-radius: 7px;
  font-size: 20px;
  background: linear-gradient(135deg, #ded9e6, #c3bccd);
}
.mk-sheet.is-bad .mk-cell:nth-child(2) { transform: scaleX(-1); filter: hue-rotate(25deg); }
.mk-sheet.is-bad .mk-cell:nth-child(4) { font-size: 15px; opacity: 0.75; }
.mk-sheet.is-bad .mk-cell:nth-child(5) { font-size: 26px; }
.mk-sheet.is-bad .mk-cell:nth-child(6) { transform: rotate(-8deg); opacity: 0.6; }
.mk-bigemoji {
  font-size: 46px;
  line-height: 1;
  filter: grayscale(0.35);
}

.mk-prompt {
  background: #fff;
  border: 1px solid var(--mk-line);
  border-radius: 9px;
  padding: 8px;
  display: grid;
  gap: 3px;
  font-size: 10px;
}
.mk-prompt .mk-hl { color: var(--mk-brand); font-weight: 700; }
.mk-prompt .mk-dim { color: rgba(36, 26, 77, 0.5); }

.mk-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--mk-line);
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 10.5px;
}
.mk-row span { color: rgba(36, 26, 77, 0.55); }

.mk-btn {
  background: var(--mk-brand);
  color: #fff;
  border-radius: 20px;
  padding: 7px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}
.mk-btn.is-ghost { background: #fff; color: var(--mk-ink); border: 1px solid var(--mk-line); }

.mk-alert {
  background: rgba(191, 34, 0, 0.08);
  border: 1px solid rgba(191, 34, 0, 0.25);
  color: #8c2400;
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 10px;
  font-weight: 600;
}
.mk-toast {
  background: #fff;
  border-radius: 10px;
  padding: 9px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  gap: 4px;
  justify-items: center;
}
.mk-toast-e { font-size: 20px; }
/* subtle inline affordance, the way the old Custom link actually looked */
.mk-link {
  justify-self: end;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--mk-brand);
  opacity: 0.75;
}
.mk-bigemoji {
  position: relative;
  z-index: 1;
  font-size: 40px;
  line-height: 1;
  filter: saturate(0.45) opacity(0.85);
}


.mk-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mk-sheetimg {
  width: 100%;
  height: auto;
  border-radius: 9px;
  border: 1px solid var(--mk-line);
  background: #fff;
}

/* ---------- deep dive: two flows, step by step, side by side ---------- */
.dive-head { display: block; }
.dive-eyebrow {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 4px;
}
.section-num .dive-head h2 { margin: 0; }
/* the two flows stack as full-width rows, so each screen can be large */
.cmp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
.cmp-col {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 30px 34px 34px;
}
/* flush with the heading below it: no pill, no left padding */
.cmp-col .ba-label {
  background: none;
  padding: 0;
  margin-bottom: 10px;
  color: var(--ink-faint);
}
.cmp-after .ba-label {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cmp-col h3 { font-size: 22px; }
.cmp-col > p { font-size: 15.5px; max-width: 90ch; }
.cmp-before { background: #faf8f7; }
.cmp-after { background: linear-gradient(180deg, rgba(255, 199, 0, 0.06), transparent 30%); }
.cmp-col h3 { font-size: 19px; margin-bottom: 8px; }
.cmp-col > p { font-size: 14.5px; line-height: 1.6; }

.cmp-steps {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 30px 28px;
}
.cmp-step {
  display: grid;
  grid-template-rows: auto auto;
  gap: 14px;
  align-content: start;
  min-width: 0;
}
.cmp-shot { min-width: 0; }
.cmp-shot .ph { border-radius: 12px; padding: 10px; }
.cmp-shot .ph .ph-kind { display: none; }
.cmp-shot .ph .ph-what { font-size: 10.5px; line-height: 1.3; }
.cmp-shot .ph .ph-spec { display: none; }
.cmp-shot .ss-phone,
.cmp-shot img { border-radius: 12px; }

.cmp-text { min-width: 0; }
.cmp-text {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 4px 10px;
  align-items: start;
}
.cmp-n {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  /* nudge onto the title's cap height */
  margin-top: 1px;
}
.cmp-before .cmp-n { background: rgba(13, 16, 25, 0.35); }
.cmp-text b {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.2px;
  line-height: 1.35;
}
.cmp-note {
  grid-column: 2;
  display: block;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-faint);
  text-wrap: pretty;
}
.cmp-note strong { color: var(--ink); }

.cmp-caveat {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-faint);
  font-style: italic;
}
/* the hypothesis can lead the evidence instead of closing it */
.cmp-grid + .ba-result, .ba-result + .cmp-grid { margin-top: 22px; }
.wrap-bleed > .ba-result:first-child { margin-top: 0; margin-bottom: 22px; }

/* ---------- flow variant: screens joined by arrows ---------- */
.cmp-flow {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: flex;
  align-items: flex-start;
  gap: 56px;
}
.cmp-flow .cmp-step { flex: 1 1 0; min-width: 0; }
/* the connector hangs in the gutter, centred on the screen it points into */
.cmp-flow .cmp-shot { position: relative; }
.cmp-link {
  position: absolute;
  top: 50%;
  left: -56px;
  width: 56px;
  transform: translateY(-50%);
  display: grid;
  justify-items: center;
  gap: 6px;
  pointer-events: none;
}
.cmp-arrow {
  position: relative;
  font-size: 24px;
  line-height: 1;
  color: rgba(13, 16, 25, 0.32);
}
.cmp-link.is-broken .cmp-arrow { color: var(--rust); }
/* the flow physically breaks here */
.cmp-link.is-broken .cmp-arrow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -13px;
  width: 2.5px;
  height: 40px;
  border-radius: 2px;
  background: var(--rust);
  transform: translateX(-50%) rotate(16deg);
}
.cmp-breaklabel {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--rust);
  text-align: center;
  line-height: 1.25;
}
/* flow shots show the whole frame rather than a crop */
.cmp-flow .cmp-shot .ph.has-img { background: rgba(13, 16, 25, 0.05); }
.cmp-flow .cmp-shot .ph.has-img img { object-fit: contain; }

@media (max-width: 1000px) {
  .cmp-flow { gap: 40px; }
  .cmp-link { left: -40px; width: 40px; }
  .cmp-arrow { font-size: 19px; }
}
@media (max-width: 760px) {
  .cmp-flow { flex-wrap: wrap; gap: 26px 34px; }
  .cmp-flow .cmp-step { flex: 1 1 40%; }
  .cmp-link { left: -34px; width: 34px; }
}

/* the dive intro shares the panels' left edge, capped for reading */
.dive-lede { max-width: none; }
.dive-lede p { font-size: 17px; line-height: 1.65; }
.dive-lede p + p { margin-top: 12px; }

@media (max-width: 1000px) {
  .cmp-steps { grid-template-columns: repeat(3, 1fr); gap: 28px 16px; }
}
@media (max-width: 700px) {
  .cmp-steps { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
  .cmp-col { padding: 22px 18px 24px; }
  .mk-screen { padding: 8px; gap: 6px; font-size: 8.5px; }
  .mk-h { font-size: 13px; }
  .mk-bar { font-size: 9.5px; padding: 7px 8px; }
}

/* ---------- before / after deep dive ---------- */
.ba-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.ba-col {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 26px 26px 28px;
  background: var(--paper);
}
.ba-before { background: #faf8f7; }
.ba-after { background: linear-gradient(180deg, rgba(255, 199, 0, 0.05), transparent 40%); }
.ba-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}
.ba-before .ba-label {
  background: rgba(13, 16, 25, 0.06);
  color: var(--ink-faint);
}
.ba-after .ba-label { background: var(--grad); color: #fff; }
.ba-col h3 { font-size: 19px; margin-bottom: 9px; }
.ba-col p { font-size: 14.5px; line-height: 1.6; }

.ba-shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 22px;
}
.ba-shots > * { min-width: 0; }

.ba-result {
  margin-top: 26px;
  padding: 24px 28px;
  border-radius: var(--radius-card);
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  line-height: 1.6;
}
.ba-result strong { color: #fff; }

/* placeholder captions need room, so they get their own row on small screens */
.ba-shots .ph-what { font-size: 13px; }
.ba-shots .ph-kind { font-size: 10px; }
.ba-shots .ph-spec { display: none; }

@media (max-width: 860px) {
  .ba-grid { grid-template-columns: 1fr; gap: 18px; }
  .ba-col { padding: 22px 20px 24px; }
  .ba-shots { gap: 12px; margin-top: 18px; }
  .ba-result { padding: 20px 22px; font-size: 15px; }
}
@media (max-width: 620px) {
  .ba-shots { grid-template-columns: 1fr; }
}

/* ---------- role list ---------- */
.role-list { list-style: none; margin-top: 22px; }
.role-list li {
  position: relative;
  padding: 14px 0 14px 34px;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
  font-weight: 500;
  color: var(--ink-soft);
}
.role-list li::before {
  content: "✓";
  position: absolute;
  left: 1px;
  top: 14px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- hindsight ---------- */
.hindsight-card {
  display: flex;
  gap: 22px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.hindsight-card .hnum {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}
.hindsight-card h3 { margin-bottom: 6px; }
.hindsight-card p { font-size: 14.5px; }

/* ---------- next / footer ---------- */
/* text sits above the image, so the artwork needs no darkening overlay */
.next-case {
  position: relative;
  display: block;
  text-decoration: none;
  color: var(--ink);
  margin-top: 56px;
  overflow: hidden;
}
.next-inner {
  padding-top: 6px;
  padding-bottom: 30px;
  display: flex;
  flex-direction: column;
}
.next-bg {
  position: relative;
  width: 100%;
  height: clamp(420px, 52vw, 660px);
  overflow: hidden;
  background: var(--ink);
}
.next-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.next-case:hover .next-bg img { transform: scale(1.03); }
.next-case .label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}
.next-case .name {
  font-size: clamp(34px, 5.2vw, 52px);
  font-weight: 800;
  letter-spacing: -1.8px;
  line-height: 1.05;
  display: flex;
  align-items: center;
  gap: 16px;
}
.next-arrow {
  font-weight: 500;
  transition: transform 0.3s ease;
}
.next-case:hover .next-arrow { transform: translateX(8px); }
.next-desc {
  margin-top: 12px;
  max-width: 52ch;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
}

@media (max-width: 620px) {
  .next-bg { height: 300px; }
  .next-desc { font-size: 14.5px; margin-top: 10px; }
  /* the image runs edge to edge here, so the text needs a bigger gutter than
     the page default to stay clear of it */
  .next-inner {
    padding-top: 10px;
    padding-bottom: 24px;
    padding-left: 26px;
    padding-right: 26px;
  }
}

.site-footer {
  padding: 44px var(--pad-x) 60px;
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-faint);
}
.theme-dark .site-footer, .footer-on-dark { color: rgba(255, 255, 255, 0.45); }
.site-footer a { font-weight: 600; }

/* ---------- index (dark) ---------- */
.index-hero {
  padding-top: 72px;
  padding-bottom: 30px;
  text-align: center;
}
.index-hero .kicker { display: block; }
/* inline-block so the gradient spans the words, not the whole line box,
   which is what lets the full red-to-amber range actually show */
.index-hero h1 {
  display: inline-block;
  background: linear-gradient(100deg, #bf2200 0%, #ff7a12 48%, #ffc700 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.index-hero .lede {
  font-size: 18px;
  max-width: 720px;
  margin: 16px auto 0;
}

.case-index-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 30px;
  padding-bottom: 70px;
}
.case-card {
  display: block;
  text-decoration: none;
  border: 1px solid var(--dark-line);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.case-card:hover { transform: translateY(-4px); border-color: rgba(255, 199, 0, 0.55); }
.case-card .thumb { border-radius: 0; border-left: 0; border-right: 0; border-top: 0; }
.case-card .body {
  padding: 22px 24px 26px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
}
/* one arrow on the right says the whole card is the link */
.case-go {
  font-size: 22px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.35);
  transition: transform 0.2s ease, color 0.2s ease;
}
.case-card:hover .case-go { color: #fff; transform: translateX(4px); }
.case-client {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 7px;
}
.case-card .body h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.4px; }
.case-card .body p { font-size: 14px; margin-top: 6px; }
.case-card .meta {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 14px;
}

/* ---------- unlock ---------- */
.unlock-wrap {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.unlock-card {
  width: 100%;
  max-width: 420px;
  text-align: center;
  padding: 48px 36px;
  border: 1px solid var(--dark-line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
}
.unlock-card .avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 22px;
  background: var(--grad);
  padding: 3px;
}
.unlock-card h1 { font-size: 26px; letter-spacing: -0.8px; }
.unlock-card p { margin: 12px 0 26px; font-size: 15px; }
.unlock-card input[type="password"] {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--dark-line);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 16px;
  font-family: inherit;
  margin-bottom: 14px;
  outline: none;
}
.unlock-card input[type="password"]:focus { border-color: var(--amber); }
.unlock-card .btn { width: 100%; }
.unlock-error {
  display: none;
  margin-top: 16px;
  font-size: 14px;
  color: #ff8b6b;
  font-weight: 600;
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .card-grid.cols-3, .media-row.cols-3, .media-row.phones { grid-template-columns: 1fr 1fr; }
  .media-row.phones > :nth-child(2) { margin-top: 0; }
  .stats-grid { grid-template-columns: 1fr; gap: 28px; }
  .case-index-grid { grid-template-columns: 1fr; }
}
/* Wide diagrams stay legible on phones: scroll them instead of shrinking
   them to unreadable. */
@media (max-width: 760px) {
  /* only wide diagrams scroll; photographic assets must never do this */
  .ph-flow.has-img.is-final {
    aspect-ratio: auto;
    height: auto;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
  .ph-flow.has-img.is-final img {
    position: static;
    width: 1100px;
    max-width: none;
    height: auto;
    object-fit: contain;
  }
  .ph-flow.has-img.is-final + .fig-caption::after {
    content: " · scroll to see it all";
    opacity: 0.75;
  }
}

@media (max-width: 620px) {
  :root { --pad-x: 20px; }
  .site-header .nav-links { display: none; }
  .card-grid.cols-3, .card-grid.cols-2, .media-row.cols-2, .media-row.cols-3 { grid-template-columns: 1fr; }
  .media-row.phones { grid-template-columns: 1fr 1fr; }
  section { padding: 36px 0; }
  .case-hero { padding-top: 36px; padding-bottom: 0; }
}

/* Modular chain: open-ended tail */
.mf-arrow {
  color: rgba(255, 255, 255, 0.5);
  font-size: 16px;
  line-height: 1;
  padding: 0 4px;
  align-self: center;
}
.mf-pill.mf-more {
  border: 2px dashed rgba(255, 255, 255, 0.32);
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
}

/* Learnings grid */
.learn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px 30px;
  margin-top: 34px;
}
.learn-grid:has(.learn:nth-child(4)) { grid-template-columns: repeat(2, 1fr); }
.learn {
  border-top: 2px solid var(--line);
  padding-top: 18px;
}
.learn-n {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin-bottom: 8px;
}
.learn h3 {
  font-size: 19px;
  margin: 0 0 8px;
  text-wrap: pretty;
}
.learn p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.62;
  color: var(--ink-soft);
  text-wrap: pretty;
}
@media (max-width: 900px) {
  .learn-grid,
  .learn-grid:has(.learn:nth-child(4)) { grid-template-columns: 1fr; gap: 22px; }
}

/* ---------- mock: studio screen parts ---------- */
.mk-bar.is-plain { justify-content: flex-start; }
.mk-bar.is-plain span { word-spacing: 3px; }

.mk-rail { display: grid; gap: 5px; }
.mk-rl {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: rgba(36, 26, 77, 0.45);
}
.mk-rail-row { display: flex; gap: 8px; }
.mk-av { display: grid; justify-items: center; gap: 3px; width: 34px; }
.mk-avc {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #ded9e6;
  font-size: 15px;
}
.mk-avc img { width: 100%; height: 100%; object-fit: cover; }
.mk-avc.is-add {
  background: none;
  border: 1.5px dashed var(--mk-brand);
  color: var(--mk-brand);
  font-size: 13px;
  font-weight: 800;
}
.mk-avl {
  font-size: 7.5px;
  font-weight: 700;
  color: rgba(36, 26, 77, 0.6);
  max-width: 34px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mk-seg { display: grid; gap: 4px; }
.mk-seg-track {
  display: flex;
  gap: 2px;
  background: #ece8f4;
  border-radius: 8px;
  padding: 2px;
}
.mk-seg-pill {
  flex: 1 1 0;
  text-align: center;
  font-size: 8.5px;
  font-weight: 700;
  padding: 4px 2px;
  border-radius: 6px;
  color: rgba(36, 26, 77, 0.5);
  line-height: 1.25;
}
.mk-seg-pill i {
  display: block;
  font-style: normal;
  font-size: 7px;
  font-weight: 600;
  opacity: 0.75;
}
.mk-seg-pill.is-on {
  background: #fff;
  color: var(--mk-brand);
  box-shadow: 0 1px 2px rgba(36, 26, 77, 0.12);
}
.mk-step {
  display: grid;
  grid-template-columns: 22px 1fr 22px;
  align-items: center;
  background: #ece8f4;
  border-radius: 8px;
  padding: 2px;
  font-size: 10px;
}
.mk-step b { text-align: center; color: var(--mk-ink); }
.mk-step-b {
  display: grid;
  place-items: center;
  height: 18px;
  border-radius: 6px;
  background: #fff;
  color: var(--mk-brand);
  font-weight: 800;
}

/* the ideas sheet: slides up over a blurred screen */
.mk-screen.has-modal > *:not(.mk-modal) { filter: blur(1.6px); opacity: 0.72; }
.mk-modal { position: absolute; inset: 0; z-index: 2; }
.mk-modal-scrim { position: absolute; inset: 0; background: rgba(36, 26, 77, 0.32); }
.mk-modal-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-radius: 14px 14px 0 0;
  padding: 6px 8px 10px;
  display: grid;
  gap: 6px;
  box-shadow: 0 -8px 24px rgba(36, 26, 77, 0.18);
}
.mk-grab {
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: rgba(36, 26, 77, 0.18);
  justify-self: center;
  margin-bottom: 1px;
}
.mk-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--mk-ink);
}
.mk-modal-head i { font-style: normal; opacity: 0.4; }
.mk-idea {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 6px;
  border: 1px solid var(--mk-line);
  border-radius: 9px;
  padding: 6px 7px;
}
.mk-idea-t { font-size: 8.5px; font-weight: 800; color: var(--mk-ink); }
.mk-idea-d {
  grid-column: 1;
  font-size: 7.5px;
  line-height: 1.35;
  color: rgba(36, 26, 77, 0.5);
}
.mk-idea-cta {
  grid-column: 2;
  grid-row: 1 / 3;
  background: var(--mk-brand);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 100px;
  white-space: nowrap;
}
.mk-more {
  border: 1.5px dashed rgba(124, 92, 255, 0.4);
  border-radius: 9px;
  text-align: center;
  font-size: 8.5px;
  font-weight: 700;
  color: var(--mk-brand);
  padding: 5px;
}
