/* =============================================================
   Relance Métabolique case study — conversion layout on NC tokens
   Loaded after styles.css; consumes the shared short names on
   :root (--ink, --paper, --ff-title, …) plus the page accents below.

   Page colour comes from the app itself: the orange of its active tab
   and its weight-trend line, the deep teal of every heading and icon,
   the green of the stabilisation phase. Three stops:
     --accent      the orange, for dots, rules, tinted fills, and any
                   accent text sitting on the dark panels
     --accent-ink  the deep teal, for accent text on the paper
                   background, where the orange cannot clear contrast
     --accent-soft the green, used sparingly for positive states
   Dark blocks are --ink (true black), same as every other case study;
   the orange/teal/green only show up as glow gradients and tinted accents.
   Namespace: .rm-*
   ============================================================= */

:root {
  --accent: #F08137;
  --accent-ink: #0E4B5F;
  --accent-soft: #6BC24A;
  --ink-70: #3A3C31;
  --ink-60: #4B4D40;
  --ink-45: #6E7062;
  --ink-35: #7C7E70;
  --ink-25: #9A9C8E;
  --border-ink: rgba(10,10,8,0.12);
  --border-ink-strong: rgba(10,10,8,0.22);
  --on-dark: #DDE6E9;
  --on-dark-muted: #A9BEC6;
}

body { color: var(--ink-60); }

/* ---------- Scroll reveal (progressive enhancement, js/reveal.js)
   Only applies once <html> gets .nc-reveal, so with JS off,
   reduced motion, or no IntersectionObserver everything shows. */
html.nc-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
html.nc-reveal [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Layout primitives ---------- */
.rm-section { padding: clamp(60px, 7.5vw, 116px) var(--gutter); }
.rm-section--tight { padding-top: clamp(20px, 3vw, 40px); }
.rm-section--flush { padding-bottom: clamp(24px, 3vw, 44px); }
/* Separators use the shared .nc-rule, which insets itself by the gutter and
   caps at --container-inner, so the line never reaches the viewport edge. */
.rm-prose { max-width: 62ch; }
.rm-prose--centre { margin-inline: auto; text-align: center; }

/* ---------- Shared type ---------- */
/* .kicker in styles.css owns the eyebrow type and colour; spacing only here. */
.rm-eyebrow { margin: 0 0 18px; }

.rm-h2 {
  font-family: var(--ff-title); font-weight: 700;
  font-size: var(--fs-h2);
  line-height: 0.95; letter-spacing: -0.035em;
  color: var(--ink); margin: 0; text-wrap: balance;
}
.rm-h2--dark { color: #fff; }
.rm-h3 {
  font-family: var(--ff-title); font-weight: 700; font-size: 20px;
  line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); margin: 0 0 10px;
}
.rm-lead {
  font-family: var(--ff-body); font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.6; color: var(--ink-60); margin: 22px 0 0;
}
.rm-body { font-family: var(--ff-body); font-size: 16.5px; line-height: 1.65; color: var(--ink-60); margin: 0; }
.rm-body + .rm-body { margin-top: 16px; }

/* ---------- Buttons ---------- */
.rm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--ff-title); font-size: 19px; font-weight: 600;
  padding: 15px 28px; border-radius: 999px; border: 1.5px solid transparent;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s, background-color 0.3s, border-color 0.3s, color 0.3s;
  white-space: nowrap;
}
.rm-btn__arrow { transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.rm-btn:hover .rm-btn__arrow { transform: translateX(3px); }

/* Black primary, neutral shadow. On dark panels use .rm-btn--light instead. */
.rm-btn--primary { background: var(--ink); color: #fff; box-shadow: 0 14px 30px -16px rgba(10, 10, 8, 0.7); }
.rm-btn--primary:hover { background: var(--ink-elevated); transform: translateY(-2px); box-shadow: 0 20px 38px -16px rgba(10, 10, 8, 0.8); }

.rm-btn--ghost { border-color: var(--border-ink-strong); color: var(--ink); }
.rm-btn--ghost:hover { border-color: var(--ink); background: rgba(10, 10, 8, 0.05); transform: translateY(-2px); }

.rm-btn--light { background: #fff; color: var(--ink); }
.rm-btn--light:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -18px rgba(0, 0, 0, 0.6); }

.rm-btn--ghost-dark { border-color: rgba(255, 255, 255, 0.3); color: var(--on-dark); }
.rm-btn--ghost-dark:hover { border-color: rgba(255, 255, 255, 0.72); color: #fff; transform: translateY(-2px); }

/* ---------- Status badges ---------- */
.rm-badges { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 24px; padding: 0; list-style: none; }
.rm-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--ff-mono); font-size: 12.5px; letter-spacing: 0.02em;
  color: var(--ink-60); background: var(--surface-light);
  border: 1px solid var(--border-ink); padding: 8px 14px; border-radius: 999px;
}
.rm-badge--live { color: var(--ink); border-color: rgba(240, 129, 55, 0.42); background: rgba(240, 129, 55, 0.14); }
.rm-badge--live::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: 0 0 auto;
}

/* ---------- Outcome band (dark facts) ---------- */
.rm-band {
  position: relative; overflow: hidden;
  background: var(--ink); border-radius: 28px;
  padding: clamp(26px, 2.8vw, 38px) clamp(24px, 3.6vw, 48px);
}
.rm-band::before,
.rm-band::after {
  content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%;
  pointer-events: none;
}
.rm-band::before { top: -46%; left: -6%; background: radial-gradient(circle, rgba(240, 129, 55, 0.26), transparent 68%); }
.rm-band::after { bottom: -50%; right: -6%; background: radial-gradient(circle, rgba(107, 194, 74, 0.18), transparent 68%); }

.rm-metrics {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 40px);
}
.rm-metric { position: relative; padding-left: clamp(20px, 2.4vw, 34px); }
.rm-metric:first-child { padding-left: 0; }
.rm-metric::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 1px;
  background: rgba(255, 255, 255, 0.16);
}
.rm-metric:first-child::before { display: none; }
/* Label above, value below: these hold short facts, not numerals. */
.rm-metric__label {
  display: block; margin: 0 0 9px;
  font-family: var(--ff-title); font-size: var(--fs-label); font-weight: 600;
  letter-spacing: 0.11em; text-transform: uppercase; color: var(--on-dark-muted);
}
.rm-metric__value {
  font-family: var(--ff-title); font-weight: 700;
  font-size: clamp(1.25rem, 2vw, 1.65rem); line-height: 1.2; letter-spacing: -0.022em;
  color: #fff; display: block;
}

/* ---------- Two-column intro ---------- */
.rm-split {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px); align-items: start;
}
.rm-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }
.rm-chip {
  display: inline-flex; align-items: center;
  font-family: var(--ff-title); font-size: 14px; font-weight: 600; color: var(--ink);
  background: var(--surface-light); border: 1px solid var(--border-ink);
  padding: 9px 16px; border-radius: 999px;
}

.rm-quotepanel {
  position: relative; background: var(--surface-light);
  border: 1px solid var(--border-ink); border-radius: 24px;
  padding: clamp(26px, 3vw, 38px);
}
.rm-quotepanel__kicker {
  font-family: var(--ff-title); font-size: var(--fs-label); font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-45); margin: 0;
}
.rm-quotepanel__mark {
  font-family: var(--ff-title); font-size: 56px; font-weight: 800; line-height: 0.7;
  color: var(--accent-ink);
}
.rm-quotepanel__text {
  font-family: var(--ff-title); font-weight: 600;
  font-size: clamp(18px, 2vw, 22px); line-height: 1.4; letter-spacing: -0.02em;
  color: var(--ink); margin: 14px 0 0;
}
.rm-quotepanel__meta {
  font-family: var(--ff-body); font-size: 14px; line-height: 1.5; color: var(--ink-45);
  margin: 18px 0 0; padding-top: 18px; border-top: 1px solid var(--border-ink);
}

/* ---------- Lists ---------- */
.rm-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 9px; }
.rm-list--two { grid-template-columns: 1fr 1fr; column-gap: 26px; }
.rm-list li {
  display: flex; gap: 10px; align-items: flex-start;
  font-family: var(--ff-body); font-size: 15px; line-height: 1.5; color: var(--ink-60);
}
.rm-list li::before {
  content: ""; flex: 0 0 auto; width: 6px; height: 6px; margin-top: 8px;
  border-radius: 50%; background: var(--accent-ink);
}

/* ---------- Feature display: copy beside a row of phones ---------- */
.rm-display {
  display: grid;
  grid-template-columns: minmax(280px, 0.62fr) minmax(0, 1.38fr);
  gap: clamp(40px, 5vw, 64px);
  align-items: start;
  margin-top: clamp(40px, 5vw, 70px);
}
.rm-display--flip { grid-template-columns: minmax(0, 1.38fr) minmax(280px, 0.62fr); }
.rm-display--flip .rm-display__copy { order: 2; }

.rm-display__copy { padding-top: 4px; }
.rm-display__copy .rm-h3 {
  max-width: 14ch; margin: 0;
  font-size: clamp(24px, 2.2vw, 30px); line-height: 1.08;
}
.rm-display__copy .rm-list {
  gap: 0; margin-top: clamp(24px, 3vw, 34px);
  border-top: 1px solid var(--border-ink);
}
.rm-display__copy .rm-list li {
  gap: 14px; padding: 14px 0;
  border-bottom: 1px solid var(--border-ink);
  font-size: 15.5px; line-height: 1.4; color: var(--ink);
}
.rm-display__copy .rm-list li::before {
  width: 8px; height: 8px; margin-top: 7px; background: var(--accent);
}

/* ---------- Phone showcase ---------- */
.rm-showcase {
  display: grid;
  grid-template-columns: repeat(var(--rm-shots, 3), minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 30px);
  align-items: start;
}
.rm-showcase__item { min-width: 0; margin: 0; }
.rm-showcase__media { display: flex; align-items: center; justify-content: center; }
.rm-showcase__media .rm-phone { width: min(230px, 90%); }
.rm-showcase__caption {
  font-family: var(--ff-body); font-size: 13.5px; line-height: 1.45;
  color: var(--ink-45); text-align: center; margin: 16px auto 0; max-width: 26ch;
}
/* Prev/next + dots for the mobile showcase carousel below — desktop
   already shows every phone at once, so these stay hidden until the
   640px breakpoint turns .rm-showcase into a one-at-a-time track.
   min-width: 0 overrides the grid item's default auto min-size: without
   it, .rm-showcase__item's flex-basis:100% falls back to content size
   during intrinsic sizing (each item ~240px), so the grid track — and
   the whole carousel — gets pushed to 3× that instead of the column's
   actual width. */
.rm-carousel { min-width: 0; }
.rm-carousel__controls { display: none; }

/* ---------- Single phone figure ---------- */
.rm-phone {
  border-radius: 30px; overflow: hidden;
  background: #0A0A08; border: 7px solid #0A0A08;
  box-shadow: 0 34px 60px -28px rgba(10, 10, 8, 0.5);
}
.rm-phone img { display: block; width: 100%; height: auto; border-radius: 23px; }

/* ---------- Hero pair: one phone in front, one stepped back ----------
   Both phones are the same width. The back one is scaled down and pushed
   right, so the front screen stays fully readable and the pair still says
   "this is a phone app" at a glance. */
.rm-heroshot { position: relative; padding: 4% 0 4% 6%; }
.rm-heroshot__front { position: relative; z-index: 2; width: min(268px, 62%); }
.rm-heroshot__back {
  position: absolute; z-index: 1; right: 0; top: 50%;
  width: min(228px, 53%); transform: translateY(-50%);
  opacity: 0.94;
}

/* ---------- Cards ---------- */
.rm-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.2vw, 24px); margin-top: clamp(34px, 4vw, 52px); }
.rm-card {
  background: var(--surface-light); border: 1px solid var(--border-ink); border-radius: 22px;
  padding: clamp(24px, 2.6vw, 32px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s, box-shadow 0.35s;
}
.rm-card:hover { transform: translateY(-4px); border-color: var(--border-ink-strong); box-shadow: 0 22px 40px -26px rgba(10, 10, 8, 0.4); }
.rm-card__icon {
  width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
  background: rgba(240, 129, 55, 0.16); border: 1px solid rgba(240, 129, 55, 0.34); color: var(--accent-ink);
  margin-bottom: 18px;
}

/* ---------- Decision panel (why we built it) ---------- */
.rm-decision {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 3vw, 40px); align-items: start;
  background: var(--surface-light); border: 1px solid var(--border-ink);
  border-radius: 26px; padding: clamp(26px, 3.4vw, 44px);
  margin-top: clamp(34px, 4vw, 52px);
}
.rm-decision--single {
  grid-template-columns: 1fr;
  background: var(--ink); border: none;
}
.rm-decision--single .rm-decision__label { color: var(--on-dark-muted); }
.rm-decision--single .rm-body { color: var(--on-dark); }
.rm-decision__label {
  font-family: var(--ff-title); font-size: var(--fs-label); font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-45); margin: 0 0 12px;
}

/* ---------- Process steps ---------- */
.rm-timeline { position: relative; margin-top: clamp(36px, 4vw, 56px); padding-left: 0; list-style: none; }
.rm-timeline::before {
  content: ""; position: absolute; left: 15px; top: 14px; bottom: 14px; width: 2px;
  background: linear-gradient(180deg, var(--accent-ink), var(--accent) 55%, rgba(240, 129, 55, 0.18));
}
.rm-step { position: relative; display: grid; grid-template-columns: 32px 1fr; gap: clamp(18px, 2.6vw, 34px); }
.rm-step + .rm-step { margin-top: clamp(20px, 2.4vw, 30px); }
.rm-step__node {
  position: relative; z-index: 1; margin-top: 6px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 6px var(--paper);
}
.rm-step__card {
  background: var(--surface-light); border: 1px solid var(--border-ink);
  border-radius: 22px; padding: clamp(22px, 2.6vw, 30px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s;
}
.rm-step__card:hover { transform: translateY(-3px); border-color: var(--border-ink-strong); }
.rm-step__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.rm-step__when {
  font-family: var(--font-tag); font-size: var(--fs-tag); font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink-45); white-space: nowrap;
}

/* ---------- Result panel ---------- */
.rm-result { position: relative; overflow: hidden; background: var(--ink); border-radius: 32px; padding: clamp(30px, 4.4vw, 60px); }
.rm-result::before {
  content: ""; position: absolute; top: -34%; right: -8%; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 129, 55, 0.3), rgba(107, 194, 74, 0.14) 42%, transparent 70%);
  pointer-events: none;
}
.rm-result__inner { position: relative; z-index: 1; }
.rm-result__statement {
  font-family: var(--ff-title); font-weight: 600;
  font-size: clamp(1.4rem, 2.8vw, 2.1rem); line-height: 1.28; letter-spacing: -0.03em;
  color: #fff; margin: 0; max-width: 34ch; text-wrap: balance;
}
.rm-result__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.4vw, 32px); margin-top: clamp(30px, 3.6vw, 46px);
  padding-top: clamp(26px, 3vw, 38px); border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.rm-result__label { font-family: var(--ff-title); font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-dark-muted); margin: 0 0 10px; }
.rm-result__text { font-family: var(--ff-body); font-size: 15px; line-height: 1.6; color: var(--on-dark); margin: 0; }

/* ---------- Stack line ---------- */
.rm-stack {
  font-family: var(--ff-mono); font-size: 13.5px; line-height: 1.9; color: var(--ink-45);
  max-width: 74ch; margin: clamp(30px, 3.4vw, 44px) 0 0;
}

/* ---------- Closing CTA ---------- */
.rm-cta {
  position: relative; overflow: hidden; background: var(--ink);
  border-radius: 36px; padding: clamp(38px, 5.6vw, 84px) clamp(26px, 4vw, 72px);
  text-align: center;
}
.rm-cta::before, .rm-cta::after {
  content: ""; position: absolute; width: 480px; height: 480px; border-radius: 50%; pointer-events: none;
}
.rm-cta::before { top: -30%; left: -8%; background: radial-gradient(circle, rgba(240, 129, 55, 0.24), transparent 70%); }
.rm-cta::after { bottom: -34%; right: -6%; background: radial-gradient(circle, rgba(107, 194, 74, 0.2), transparent 70%); }
.rm-cta__inner { position: relative; z-index: 1; }
.rm-cta__lead { font-family: var(--ff-body); font-size: clamp(16.5px, 1.8vw, 19px); line-height: 1.6; color: var(--on-dark-muted); max-width: 58ch; margin: 22px auto 0; }
.rm-cta__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }

/* ---------- Next case study ---------- */
.rm-next {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: var(--surface-light); border: 1px solid var(--border-ink); border-radius: 24px;
  padding: clamp(24px, 3vw, 34px) clamp(24px, 3vw, 38px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s;
}
.rm-next:hover { transform: translateY(-3px); border-color: var(--border-ink-strong); }
.rm-next__label { font-family: var(--ff-title); font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-45); margin: 0 0 8px; }
.rm-next__title { font-family: var(--ff-title); font-weight: 700; font-size: clamp(1.25rem, 2.4vw, 1.7rem); letter-spacing: -0.03em; color: var(--ink); margin: 0; }
.rm-next__go { display: inline-flex; align-items: center; gap: 10px; font-family: var(--ff-title); font-size: var(--fs-card-link); font-weight: 600; color: var(--ink); }
.rm-next:hover .rm-next__go span { transform: translateX(4px); }
.rm-next__go span { transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }

/* ---------- Sticky mobile CTA ---------- */
.rm-sticky {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
  display: none; align-items: center; justify-content: space-between; gap: 14px;
  background: rgba(10, 10, 8, 0.94); backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 18px;
  padding: 12px 12px 12px 18px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateY(140%); opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
}
.rm-sticky.is-in { transform: none; opacity: 1; }
.rm-sticky__text { font-family: var(--ff-title); font-size: 14px; font-weight: 600; color: #fff; line-height: 1.3; }
.rm-sticky__text span { display: block; font-family: var(--ff-body); font-size: 12.5px; font-weight: 400; color: var(--on-dark-muted); margin-top: 2px; }
.rm-sticky .rm-btn { padding: 12px 20px; font-size: 18px; }

/* ---------- Editorial caveat ----------
   Separated by space and a lighter colour, not by a rule on one edge. */
.rm-note {
  font-family: var(--ff-body); font-size: 14.5px; line-height: 1.6; color: var(--ink-45);
  max-width: 68ch; margin: clamp(30px, 3.4vw, 44px) 0 0;
}

/* =============================================================
   Hero
   ============================================================= */
.rm-hero {
  position: relative; overflow-x: clip;
  overflow-clip-margin: 420px;
  padding: clamp(120px, 14vw, 168px) var(--gutter) clamp(48px, 6vw, 88px);
}
/* Literal copy of home's hero glow recipe (css/styles.css .hero__glow /
   --lime / --violet), per the "Background glow gradient" rule — position,
   size, timing, keyframe percentage steps, hue-drift deltas, alphas and
   stop percentages are all identical to home's; only the two hues (225deg
   teal, 51deg orange, from docs/_as/colors.html) and the pastel oklch
   register (L 0.9, C ~0.1-0.12) are page-specific — see css/resources.css
   for the confirmed-working reference. */
.rm-hero__glow {
  position: absolute; z-index: 0; pointer-events: none;
  top: -24%; right: -42%; width: 100vw; height: 100vh;
  background: radial-gradient(
    var(--g-w, 50%) var(--g-h, 50%) at var(--g-x, 50%) var(--g-y, 50%),
    oklch(0.9 0.12 var(--g-h1, 225deg) / 0.85),
    oklch(0.9 0.1 var(--g-h2, 51deg) / 0.4) 46%,
    transparent 72%
  );
  animation:
    rm-glow-morph 11s ease-in-out infinite,
    rm-glow-float 17s ease-in-out infinite;
}
@keyframes rm-glow-morph {
  0%, 100% { --g-h1: 225deg; --g-h2: 51deg; --g-w: 44%; --g-h: 54%; --g-x: 46%; --g-y: 54%; }
  30%      { --g-h1: 261deg; --g-h2: 73deg; --g-w: 66%; --g-h: 42%; --g-x: 60%; --g-y: 40%; }
  62%      { --g-h1: 199deg; --g-h2: 25deg; --g-w: 42%; --g-h: 64%; --g-x: 40%; --g-y: 60%; }
}
@keyframes rm-glow-float {
  0%, 100% { transform: scale(1)    translate3d(0, 0, 0);    filter: hue-rotate(0deg)  saturate(1); }
  50%      { transform: scale(1.22) translate3d(-8%, 6%, 0); filter: hue-rotate(14deg) saturate(1.1); }
}

/* Bottom-left blob: teal on its own, home's lime formula and delta shape. */
.rm-hero__glow--b {
  position: absolute; z-index: 0; pointer-events: none;
  top: auto; right: auto;
  bottom: -20%; left: -22%; width: 60vw; height: 60vh;
  background: radial-gradient(
    var(--g-w, 50%) var(--g-h, 50%) at var(--g-x, 50%) var(--g-y, 50%),
    oklch(0.9 0.12 var(--g-h1, 225deg) / 0.4),
    transparent 66%
  );
  animation:
    rm-glow-morph-b 14s ease-in-out -5s infinite,
    rm-glow-float-b 21s ease-in-out -9s infinite;
}
@keyframes rm-glow-morph-b {
  0%, 100% { --g-h1: 225deg; --g-w: 46%; --g-h: 46%; --g-x: 50%; --g-y: 50%; }
  40%      { --g-h1: 257deg; --g-w: 68%; --g-h: 56%; --g-x: 60%; --g-y: 42%; }
  72%      { --g-h1: 203deg; --g-w: 42%; --g-h: 66%; --g-x: 40%; --g-y: 58%; }
}
@keyframes rm-glow-float-b {
  0%, 100% { transform: scale(1.06) translate3d(0, 0, 0);    filter: hue-rotate(0deg)   saturate(1); }
  50%      { transform: scale(0.84) translate3d(9%, -7%, 0); filter: hue-rotate(-12deg) saturate(1.12); }
}

/* Top-centre blob: orange on its own, home's violet slot (position +
   timing) carrying a single-hue fade instead of a blend. */
.rm-hero__glow--c {
  position: absolute; z-index: 0; pointer-events: none;
  top: -26%; left: 52%; right: auto; bottom: auto;
  width: 44vw; height: 44vh;
  background: radial-gradient(
    var(--g-w, 50%) var(--g-h, 50%) at var(--g-x, 50%) var(--g-y, 50%),
    oklch(0.9 0.1 var(--g-h1, 51deg) / 0.28),
    transparent 64%
  );
  animation:
    rm-glow-morph-c 18s ease-in-out -7s infinite,
    rm-glow-float-c 26s ease-in-out -13s infinite;
}
@keyframes rm-glow-morph-c {
  0%, 100% { --g-h1: 51deg; --g-w: 48%; --g-h: 48%; --g-x: 50%; --g-y: 50%; }
  38%      { --g-h1: 27deg; --g-w: 70%; --g-h: 42%; --g-x: 40%; --g-y: 58%; }
  70%      { --g-h1: 71deg; --g-w: 42%; --g-h: 60%; --g-x: 60%; --g-y: 44%; }
}
@keyframes rm-glow-float-c {
  0%, 100% { transform: scale(1)    translate3d(0, 0, 0);     filter: hue-rotate(0deg)   saturate(1);   opacity: 1; }
  45%      { transform: scale(1.28) translate3d(-9%, 5%, 0);   filter: hue-rotate(-10deg) saturate(1.1); opacity: 0.7; }
}

/* Mandatory corner-seam accent, centred exactly on the hero's bottom-right
   corner, a quiet echo of the teal wash. */
.rm-hero__glow--corner {
  position: absolute; z-index: 0; pointer-events: none;
  top: auto; left: auto;
  bottom: -37vw; right: -37vw; width: 74vw; height: 74vw;
  background: radial-gradient(
    var(--g-w, 50%) var(--g-h, 50%) at var(--g-x, 50%) var(--g-y, 50%),
    oklch(0.9 0.12 var(--g-h1, 225deg) / 0.15),
    transparent 60%
  );
  animation:
    rm-glow-morph-corner 8s ease-in-out -4s infinite,
    rm-glow-float-corner 11s ease-in-out -8s infinite;
}
@keyframes rm-glow-morph-corner {
  0%, 100% { --g-h1: 225deg; --g-w: 46%; --g-h: 46%; --g-x: 50%; --g-y: 50%; }
  50%      { --g-h1: 247deg; --g-w: 55%; --g-h: 37%; --g-x: 40%; --g-y: 60%; }
}
@keyframes rm-glow-float-corner {
  0%, 100% { transform: scale(1)    translate3d(0, 0, 0);    filter: saturate(1); }
  50%      { transform: scale(1.15) translate3d(9%, -6%, 0); filter: saturate(1.05); }
}

/* Mandatory mobile override: desktop's percentage-based blob positions
   clip away on a narrow screen. */
@media (max-width: 900px) {
  .rm-hero {
    background:
      radial-gradient(120% 70% at 85% 0%, oklch(0.9 0.12 225 / 0.28), transparent 62%),
      radial-gradient(90% 55% at 10% 35%, oklch(0.9 0.1 51 / 0.19), transparent 58%),
      radial-gradient(80% 50% at 70% 18%, oklch(0.9 0.12 225 / 0.08), transparent 55%),
      var(--color-paper);
  }
  .rm-hero__glow {
    top: -8%; right: -28%; width: 100vh; height: 100vh; opacity: 1;
    background: radial-gradient(
      var(--g-w, 50%) var(--g-h, 50%) at var(--g-x, 50%) var(--g-y, 50%),
      oklch(0.9 0.12 var(--g-h1, 225deg) / 0.45),
      oklch(0.9 0.1 var(--g-h2, 51deg) / 0.22) 42%,
      transparent 70%
    );
  }
  .rm-hero__glow--b {
    top: auto; right: auto;
    bottom: 18%; left: -35%; width: 85vh; height: 85vh;
    background: radial-gradient(
      var(--g-w, 50%) var(--g-h, 50%) at var(--g-x, 50%) var(--g-y, 50%),
      oklch(0.9 0.12 var(--g-h1, 225deg) / 0.28),
      transparent 68%
    );
  }
  .rm-hero__glow--c {
    top: 4%; left: 42%; width: 65vh; height: 65vh;
    background: radial-gradient(
      var(--g-w, 50%) var(--g-h, 50%) at var(--g-x, 50%) var(--g-y, 50%),
      oklch(0.9 0.1 var(--g-h1, 51deg) / 0.16),
      transparent 66%
    );
  }
}

@media (prefers-reduced-motion: reduce) {
  .rm-hero__glow, .rm-hero__glow--b, .rm-hero__glow--c, .rm-hero__glow--corner { animation: none; }
}
.rm-hero__inner { position: relative; z-index: 1; max-width: var(--container-inner); margin-inline: auto; }
.rm-hero__grid {
  display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(32px, 4.6vw, 72px); align-items: center;
}
.rm-h1 {
  font-family: var(--ff-title); font-weight: 700;
  font-size: clamp(2.15rem, 3.5vw, 3.15rem); line-height: 0.96; letter-spacing: -0.036em;
  color: var(--ink); margin: 0; text-wrap: balance;
}
.rm-hero__meta .rm-badges { margin: clamp(24px, 2.6vw, 32px) 0 0; }
.rm-hero__lead {
  font-family: var(--ff-body); font-size: clamp(16.5px, 1.6vw, 18px);
  line-height: 1.55; color: var(--ink-60); margin: 18px 0 0; max-width: 52ch;
}
.rm-hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }

/* =============================================================
   Responsive
   ============================================================= */
@media (max-width: 1040px) {
  .rm-metrics { grid-template-columns: repeat(2, 1fr); gap: clamp(22px, 4vw, 34px); }
  .rm-metric:nth-child(3) { padding-left: 0; }
  .rm-metric:nth-child(3)::before { display: none; }
  .rm-result__grid { grid-template-columns: 1fr; gap: 22px; }
  .rm-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .rm-hero__grid { grid-template-columns: 1fr; gap: clamp(30px, 5vw, 44px); }
  /* screenshot sits right below the back link on mobile, above the title */
  .rm-hero__media { order: -1; }
  .rm-split { grid-template-columns: 1fr; }
  .rm-display, .rm-display--flip { grid-template-columns: 1fr; }
  .rm-display--flip .rm-display__copy { order: 0; }
  .rm-decision { grid-template-columns: 1fr; }
  .rm-sticky { display: flex; }
}
@media (max-width: 640px) {
  .rm-section { padding-top: var(--space-6); padding-bottom: var(--space-4); }
  .rm-metrics { gap: 20px 22px; }
  .rm-cards { grid-template-columns: 1fr; }
  /* One phone per screen, swiped horizontally, instead of stacked and
     scrolled vertically — the track itself is the scroller. Bottom
     padding is reserved room for .rm-phone's box-shadow: overflow-x:auto
     forces overflow-y to compute as auto too, so without it the shadow
     gets clipped at the track's own edge. */
  .rm-showcase {
    display: flex;
    width: 100%;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0;
    padding: 4px 0 22px;
  }
  .rm-showcase::-webkit-scrollbar { display: none; }
  .rm-showcase__item { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; }
  .rm-showcase__media .rm-phone { width: min(240px, 64vw); }
  .rm-carousel__controls {
    display: flex; align-items: center; justify-content: center;
    gap: 16px; margin-top: 6px;
  }
  .rm-carousel__nav {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; padding: 0; flex: 0 0 auto;
    color: var(--ink); background: var(--paper);
    border: 1.5px solid var(--border-ink-strong); border-radius: 50%;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
  }
  .rm-carousel__nav svg { width: 17px; height: 17px; }
  .rm-carousel__nav:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .rm-carousel__nav:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
  .rm-carousel__dots { display: flex; align-items: center; gap: 8px; }
  .rm-carousel__dot {
    width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px;
    background: var(--ink-25); cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
  }
  .rm-carousel__dot.is-active { width: 26px; background: var(--ink); }
  .rm-carousel__dot:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
  .rm-list--two { grid-template-columns: 1fr; }
  .rm-step { grid-template-columns: 26px 1fr; gap: 16px; }
  .rm-step__node { width: 26px; height: 26px; box-shadow: 0 0 0 5px var(--paper); }
  .rm-timeline::before { left: 12px; }
  /* The stepped-back phone stops earning its place at this width: it is
     mostly off-screen and the front phone is already small. */
  .rm-heroshot { padding: 0; }
  .rm-heroshot__front { width: min(240px, 72%); margin-inline: auto; }
  .rm-heroshot__back { display: none; }
  .rm-btn { width: 100%; }
  .rm-sticky .rm-btn { width: auto; }
  .rm-card { padding: var(--space-3); }
  .rm-quotepanel { padding: var(--space-4); }
}
@media (max-width: 460px) {
  .rm-metrics { grid-template-columns: 1fr; }
  .rm-metric { padding-left: 0; padding-top: 16px; }
  /* Stacked, every divider is a horizontal rule above the item, so the
     ones hidden for the two-column layout have to come back. */
  .rm-metric::before,
  .rm-metric:nth-child(3)::before { display: block; left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 1px; }
  .rm-metric:first-child::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rm-card, .rm-step__card, .rm-next, .rm-btn, .rm-sticky { transition: none; }
  .rm-card:hover, .rm-step__card:hover, .rm-next:hover, .rm-btn:hover { transform: none; }
}
