/**
 * Imaging template — section styles.
 *
 * @package SmudgeChild
 */

/* ═══════════════════ SECTION 1 — HERO scroll-in frame ═══════════════════
 *
 * .hero-pin is taller than the screen, so the hero stays pinned while the
 * page scrolls through it; imaging.js moves .hero__border's inset in
 * (0 → 22px, 12px on phones) and rounds its corners (0 → 32px, 22px on
 * phones). The border's large box-shadow, in the page background colour,
 * paints everything outside that rounded box — and .hero's overflow:hidden
 * clips the shadow to the hero — so the video reads as shrinking into an
 * inset card.
 *
 * Scoped through .hero-pin, which only templates/imaging.php prints: the
 * shared .hero rules in hero.css (homepage, For Business) are unaffected.
 */
.hero-pin { height: 150svh; }
.hero-pin .hero { position: sticky; top: 0; height: 100svh; min-height: 0; overflow: hidden; }
.hero__border {
  position: absolute; inset: 0; z-index: 80; pointer-events: none;
  border-radius: 0; box-shadow: 0 0 0 200px var(--bg);
}
@media (max-width: 760px) {
  .hero-pin { height: 220svh; }
}

/* ═══════════════════ SECTION 2 — STATEMENT → iPad → stats reveal ═══════════════════
 *
 * The beat timings in imaging.js are fractions (0–1) of the pinned
 * scroll height, so changing the height here speeds up or slows down the
 * same choreography without JS changes.
 */
.statement { position: relative; background: var(--bg); height: 200vh; }
.statement__sticky {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.statement__text {
  position: absolute; z-index: 1; max-width: 660px; padding: 0 clamp(24px, 5vw, 64px);
  text-align: center; will-change: opacity;
}
.statement__title, .combined__title {
  font-family: var(--sans); font-weight: 500; font-size: clamp(30px, 3.4vw, 50px); line-height: 1.06;
  letter-spacing: -0.025em; margin: 0; text-wrap: balance;
}
.statement__title { color: var(--ink); }
.statement__sub {
  font-family: var(--sans); font-size: clamp(15px, 1.05vw, 18px); line-height: 1.55; color: var(--ink-soft);
  margin: clamp(16px, 2.4vh, 24px) auto 0; max-width: 52ch; text-wrap: pretty;
}
.statement__cta { margin-top: clamp(24px, 3.4vh, 34px); }

.statement__ipad {
  position: absolute; top: 50%; left: 50%; z-index: 2; transform: translate(-50%, 70vh); will-change: transform;
}
.statement__ipad img { width: 100%; height: auto; display: block; filter: drop-shadow(0 50px 90px rgba(12, 12, 13, 0.26)); transform: translateZ(0); backface-visibility: hidden; }

.statement__h2 {
  position: absolute; z-index: 4; top: clamp(100px, 12vh, 140px); left: 50%; transform: translateX(-50%);
  width: min(560px, 64vw); text-align: center; margin: 0;
  font-family: var(--sans); font-weight: 500; font-size: clamp(28px, 3vw, 44px); line-height: 1.1;
  letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; opacity: 0; will-change: opacity;
}

.statement__lines { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: visible; }
.statement__lines line { stroke: rgba(12, 12, 13, 0.42); stroke-width: 2.4; opacity: 0; }
.statement__lines rect { fill: var(--accent); opacity: 0; }

.stat-wrap { display: contents; }
.stat { position: absolute; z-index: 4; width: min(206px, 16vw); opacity: 0; will-change: opacity, transform; }
.stat--lt { left: clamp(48px, 8vw, 150px); text-align: right; }
.stat--lb { left: clamp(48px, 8vw, 150px); text-align: right; }
.stat--r  { right: clamp(48px, 8vw, 150px); text-align: left; }
.stat__num { font-family: var(--sans); font-weight: 300; font-size: clamp(34px, 3.4vw, 50px); line-height: 1; letter-spacing: -0.02em; color: var(--ink); }
.stat__num small { font-size: 0.34em; font-weight: 400; color: var(--ink-soft); margin-left: 5px; letter-spacing: 0; }
.stat__title { font-family: var(--sans); font-weight: 600; font-size: 18px; color: var(--accent); margin: 12px 0 6px; }
.stat__desc { font-family: var(--sans); font-size: 13px; line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }

/* Static fallback — used ONLY when JS can't run the pinned choreography
   (reduced-motion, or a viewport too short to pin nicely). JS adds
   `.is-anim-sm` to enable the mobile pinned animation, which opts the
   section out of these rules. */
@media (max-width: 1279px), (max-height: 640px) {
  .statement:not(.is-anim-sm):not(.is-anim-lg) { height: auto !important; }
  .statement:not(.is-anim-sm):not(.is-anim-lg) .statement__sticky { position: static; height: auto; min-height: 0; overflow: visible; display: flex; flex-direction: column; justify-content: center; gap: clamp(32px, 5vh, 52px); padding: clamp(72px, 11vh, 130px) clamp(20px, 5vw, 48px); }
  .statement:not(.is-anim-sm):not(.is-anim-lg) .statement__text { position: relative; opacity: 1 !important; max-width: 620px; margin: 0 auto; }
  .statement:not(.is-anim-sm):not(.is-anim-lg) .statement__h2 { position: relative; top: auto !important; left: auto; transform: none; opacity: 1 !important; width: auto; max-width: 600px; margin: 0 auto; }
  /*
   * width is 100% of the padded column; a vw width ran wider than the column
   * and scrolled the page sideways on phones
   */
  .statement:not(.is-anim-sm):not(.is-anim-lg) .statement__ipad { position: relative; top: auto; left: auto; transform: none !important; width: min(760px, 100%); margin: 0 auto; }
  .statement:not(.is-anim-sm):not(.is-anim-lg) .statement__lines { display: none; }
  .statement:not(.is-anim-sm):not(.is-anim-lg) .stat-wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(26px, 4vw, 38px) clamp(20px, 3vw, 30px); max-width: 880px; margin: 0 auto; width: 100%; }
  .statement:not(.is-anim-sm):not(.is-anim-lg) .stat { position: relative; inset: auto; top: auto !important; left: auto !important; right: auto !important; bottom: auto; width: auto; opacity: 1 !important; transform: none !important; text-align: center !important; }
  .statement:not(.is-anim-sm):not(.is-anim-lg) .stat__num { font-size: clamp(30px, 6vw, 46px); }
}
/* Phones / very narrow: a single readable column (static fallback only). */
@media (max-width: 640px) {
  .statement:not(.is-anim-sm):not(.is-anim-lg) .stat-wrap { grid-template-columns: 1fr; gap: clamp(28px, 7vw, 40px); max-width: 360px; }
  .statement:not(.is-anim-sm):not(.is-anim-lg) .statement__ipad { width: min(440px, 100%); }
}

/* ── Mobile pinned choreography (JS adds `.is-anim-sm`) ──
   Same scroll-driven beats as desktop, but the iPad sits in the upper
   half and the three stats stack underneath it (no side connector lines). */
.statement.is-anim-sm { height: 210vh; }
.statement.is-anim-sm .statement__sticky { position: sticky; top: 0; height: 100vh; min-height: 0; overflow: hidden; display: block; padding: 0; }
.statement.is-anim-sm .statement__text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(560px, 88vw); max-width: none; padding: 0; margin: 0; }
.statement.is-anim-sm .statement__sub { max-width: min(290px, 70vw); }
.statement.is-anim-sm .statement__h2 { position: absolute; left: 50%; transform: translateX(-50%); width: min(480px, 86vw); max-width: none; margin: 0; top: 100px; text-align: center; opacity: 0; }
.statement.is-anim-sm .statement__ipad { position: absolute; top: 50%; left: 50%; width: min(560px, 92vw); transform: translate(-50%, 70vh); margin: 0; }
.statement.is-anim-sm .statement__lines { display: none; }
.statement.is-anim-sm .stat-wrap { display: block; }
.statement.is-anim-sm .stat {
  position: absolute; left: 50%; right: auto; transform: translateX(-50%);
  width: min(420px, 86vw); text-align: center; opacity: 0; top: 0;
}
.statement.is-anim-sm .stat__num { font-size: clamp(30px, 8vw, 44px); }
.statement.is-anim-sm .stat__title { font-size: 15px; margin: 8px 0 5px; }
.statement.is-anim-sm .stat__desc { font-size: 13px; max-width: 40ch; margin-left: auto; margin-right: auto; }
/*
 * Shorter phones: the three stats stack under the iPad inside a
 * screen-height stage. Compact type here; imaging.js also tightens the gaps
 * and shrinks the iPad to fit, and falls back to the static layout if it
 * still can't.
 */
@media (max-height: 760px) {
  .statement.is-anim-sm .stat__num { font-size: clamp(26px, 7vw, 34px); }
  .statement.is-anim-sm .stat__title { font-size: 14px; margin: 6px 0 4px; }
  .statement.is-anim-sm .stat__desc { font-size: 12.5px; line-height: 1.4; }
}

/* ═══════════════════ SECTION 3 — CONDITIONS WHEEL ═══════════════════
 *
 * The background is a static theme image (images/wheel-bg.jpg), not an ACF
 * field. #1b2733 is the fallback colour while it loads.
 */
.cf { position: relative; background: #1b2733; color: #fff; height: 210vh; }
.cf__sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; z-index: 1; }
.cf__stage { position: relative; width: 100%; height: 100%; z-index: 2; }

/* stationary photographic background — stays locked to the viewport. */
.cf__bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: #1b2733 url("../images/wheel-bg.jpg") center center / cover no-repeat;
  background-attachment: fixed;
}

/* the rotating wheel — origin sits off the left edge so only the right arc shows */
.cf__wheel {
  position: absolute; top: 50%; left: clamp(-220px, -7vw, -90px);
  width: 0; height: 0; transform-origin: 0 0; transform: rotate(0deg); will-change: transform;
}
.cf__node {
  position: absolute; top: 0; left: 0; transform-origin: 0 0; white-space: nowrap;
  display: flex; align-items: center; gap: 11px; line-height: 1;
}
.cf__node--item {
  font-family: var(--sans); font-size: clamp(15px, 1.25vw, 19px); font-weight: 400;
  color: rgba(255, 255, 255, 0.74);
}
.cf__node--div {
  font-family: var(--sans); font-size: clamp(22px, 2vw, 30px); font-weight: 500; letter-spacing: -0.015em;
  color: var(--accent);
}
.cf__dia {
  flex: none; width: 13px; height: 13px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px rgba(239, 108, 35, 0.16);
}

/* right-side scrim only — keeps the copy legible. Top/bottom labels just fade in
   opacity (handled per-node in JS); no fade-to-black band. */
.cf__fade {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(90deg, rgba(16,23,32,0) 34%, rgba(14,20,28,0.5) 56%, rgba(12,17,24,0.78) 78%);
}

.cf__copy { position: absolute; right: clamp(40px, 15vw, 330px); top: 50%; transform: translateY(-50%); z-index: 5; max-width: 620px; }
.cf .badge, .combined .badge { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); color: #fff; }
.cf__title {
  font-family: var(--sans); font-weight: 500; font-size: clamp(34px, 3.9vw, 56px); line-height: 1.05;
  letter-spacing: -0.02em; color: #fff; margin: 0; text-wrap: balance;
}
.cf__sub, .combined__sub { font-family: var(--sans); font-size: clamp(16px, 1.4vw, 21px); line-height: 1.58; color: rgba(255,255,255,0.72); margin: 22px 0 0; max-width: 54ch; text-wrap: pretty; }

/* locations list — unbounded repeater, always wraps so any number of cities stays readable */
.cf__locations { list-style: none; margin: clamp(26px, 3.8vh, 38px) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 13px 28px; }
.cf__locations li { display: flex; align-items: center; gap: 10px; font-family: var(--sans); font-size: clamp(16px, 1.35vw, 21px); font-weight: 500; color: #fff; }
.cf__loc-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.cf__loc-note { font-family: var(--sans); font-size: 15px; color: rgba(255,255,255,0.55); margin: 17px 0 0; }
.cf__ctas { margin-top: clamp(26px, 4vh, 38px); }

.cf__btn {
  margin-top: clamp(26px, 4vh, 38px); font-family: var(--sans); font-size: 16px; font-weight: 600; color: #fff;
  background: var(--accent); border: 0; border-radius: 999px; padding: 16px 32px; cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}
.cf__btn:hover { transform: translateY(-1px); background: #e2611c; }

/* horizontal pill rows — only shown on mobile (built in JS) */
.cf__rows { display: none; }

@media (max-width: 860px) {
  /* drop the rotating wheel; lay the section out as heading + 4 pill rows */
  .cf { height: 230vh; }
  .cf__wheel, .cf__fade { display: none; }
  .cf__stage { display: flex; flex-direction: column; }
  /* Phones: the copy sits lower and the pill rows stack from just under it. */
  .cf__copy {
    position: static; transform: none; right: auto; left: auto; top: auto;
    max-width: none; width: 100%; flex: none; text-align: center; margin: 0 auto;
    padding: clamp(110px, 18vh, 190px) clamp(22px, 6vw, 40px) 0;
  }
  .cf__title { font-size: clamp(28px, 8.4vw, 40px); }
  .cf__sub { margin: 14px auto 0; max-width: min(330px, 82vw); font-size: 16.5px; line-height: 1.5; }
  /* wrap (not nowrap) so adding more locations never overflows the screen */
  .cf__locations { flex-wrap: wrap; justify-content: center; gap: clamp(8px, 2.2vw, 11px) clamp(14px, 3.6vw, 20px); margin: clamp(18px, 3vh, 30px) auto 0; }
  .cf__locations li { white-space: nowrap; }
  .cf__loc-note { text-align: center; margin: 10px auto 0; }
  .cf__ctas { flex-direction: column; align-items: stretch; width: min(260px, 100%); margin: clamp(20px, 3vh, 28px) auto 0; gap: 10px; }
  .cf__ctas .hero__member { text-align: center; padding: 14px 26px; font-size: 15px; }
  /* rotate the photo 90° on mobile, full-bleed cover; stays pinned via the sticky parent */
  .cf__bg {
    inset: auto; top: 50%; left: 50%;
    width: 100vh; height: 100vw;
    transform: translate(-50%, -50%) rotate(90deg); transform-origin: center;
    background-size: cover; background-position: center; background-attachment: scroll;
  }

  .cf__rows {
    display: flex; flex-direction: column; justify-content: flex-start; gap: clamp(10px, 1.6vh, 16px);
    flex: 1; overflow: hidden; padding-top: clamp(44px, 7vh, 66px); padding-bottom: 0;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
  }
  .cf__rowtrack { display: flex; gap: clamp(10px, 2.4vw, 14px); white-space: nowrap; will-change: transform; }
  .cf__pill {
    flex: none; padding: clamp(8px, 1.05vh, 11px) clamp(13px, 3.4vw, 17px); border-radius: 999px;
    background: rgba(255, 255, 255, 0.13); border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--sans); font-size: clamp(12.5px, 3vw, 14.5px); font-weight: 400; color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  }
}

/* narrower phones — tighten copy + keep locations wrapping (not nowrap) */
@media (max-width: 600px) {
  .cf__copy { top: auto; max-width: none; margin-left: auto; margin-right: auto; }
  .cf__title { font-size: clamp(26px, 8.4vw, 36px); }
  .cf__sub { font-size: 14.5px; }
  .cf__locations { flex-wrap: wrap; gap: clamp(6px, 2.2vw, 11px) clamp(10px, 2.8vw, 16px); }
  .cf__locations li { font-size: clamp(12.5px, 3.5vw, 14px); gap: 5px; white-space: nowrap; }
  /* Dylan: the cities read smaller than the note under them. Note now sits a step below. */
  .cf__loc-note { font-size: 12.5px; }
  .cf__loc-dot { width: 6px; height: 6px; }
}

/* ═══════════════════ SECTION 3.5 — MODALITIES (pinned card) ═══════════════════
 *
 *  - Section height scales with the panel count: --modx-n is set inline by
 *    PHP (110vh per panel).
 *  - Buttons are the shared .btn .btn-ghost / .btn-primary from custom.css.
 *  - Copy top padding never goes below 110px, so the tabs clear the fixed
 *    site header once the card reaches full height.
 *  - Image panels get .modx-panel__shade (a tint); per-panel mobile crop
 *    comes from --mob-pos (ACF mobile_crop).
 * Card width/height/radius and the media slide are driven inline by
 * imaging.js; the values below are the starting state.
 */
.modx { position: relative; background: var(--bg); height: calc(var(--modx-n, 4) * 110vh); padding-top: clamp(72px, 12vh, 150px); }
.modx__sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: flex-start; justify-content: center; }
.modx__card { position: relative; width: min(1300px, 92vw); height: 78vh; border-radius: 30px; background: #fff; overflow: hidden; box-shadow: 0 60px 120px -60px rgba(12, 12, 13, 0.35); will-change: width, height, border-radius; }

.modx-panel { position: absolute; inset: 0; display: grid; grid-template-columns: 40% 1fr; pointer-events: none; }
.modx-panel__media { position: relative; overflow: hidden; border-radius: 0 26px 26px 0; background: #101317; transform: translateY(103%); will-change: transform; }
.modx-panel__media video,
.modx-panel__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.modx-panel__shade { position: absolute; inset: 0; background: rgba(12, 12, 13, 0.18); pointer-events: none; }
.modx-panel.is-active .modx-panel__media { transform: none; }

.modx-panel__copy { grid-column: 2; align-self: stretch; display: flex; flex-direction: column; justify-content: flex-start; padding: max(110px, calc(50vh - 240px)) clamp(30px, 4.6vw, 84px) 0; opacity: 0; }
.modx-panel.is-active .modx-panel__copy { opacity: 1; pointer-events: auto; }

.modx__tabs { display: flex; flex-wrap: wrap; gap: clamp(16px, 2.2vw, 30px); margin: 0 0 clamp(28px, 4.6vh, 44px); }
.modx-tab { background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); transition: color 0.2s ease; white-space: nowrap; }
.modx-tab:hover { color: var(--ink-soft); }
.modx-tab.is-on { color: var(--ink); }

.modx__h { font-family: var(--sans); font-weight: 400; font-size: clamp(36px, 3.9vw, 62px); line-height: 1.1; letter-spacing: -0.025em; color: var(--ink); margin: 0 0 clamp(18px, 3vh, 26px); max-width: 20ch; min-height: 2.2em; text-wrap: balance; }
.modx__p { font-family: var(--sans); font-size: clamp(17.5px, 1.45vw, 21px); line-height: 1.6; color: var(--ink-soft); margin: 0; max-width: 56ch; min-height: 8em; text-wrap: pretty; }

/* word-by-word heading reveal — imaging.js wraps each word in .w > span with --d */
.modx__h .w { display: inline-block; overflow: hidden; vertical-align: bottom; }
.modx__h .w > span { display: inline-block; transform: translateY(112%); transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); transition-delay: 0s; }
.modx-panel.is-active .w > span { transform: none; transition-delay: var(--d, 0s); }
.modx__p, .modx__offer { opacity: 0; transform: translateY(26px); transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1); transition-delay: 0s; }
.modx-panel.is-active .modx__p, .modx-panel.is-active .modx__offer { opacity: 1; transform: none; transition-delay: var(--rd, 0.5s); }
.modx-panel.no-anim .modx-panel__copy, .modx-panel.no-anim .w > span, .modx-panel.no-anim .modx__p, .modx-panel.no-anim .modx__offer { transition: none; transition-delay: 0s; }

.modx__offer { margin-top: clamp(24px, 3.8vh, 34px); }
.modx__ctas { display: flex; gap: 12px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  .modx__h .w > span { transform: none; transition: none; }
  .modx__p, .modx__offer { transition: none; }
}

@media (max-width: 900px) {
  /*
   * Phones/tablets: media fills the top of the card with rounded bottom
   * corners, then the tab bar, then left-aligned copy. The slide happens
   * inside the media slot (its content rises within it), not from the
   * bottom of the screen.
   *
   * The copy row takes the height it needs and the media gets the rest.
   * imaging.js measures the tallest panel's copy and sets --modx-copy-h, so
   * every panel splits the card at the same line and the image doesn't jump
   * as panels change.
   */
  .modx { padding-top: clamp(48px, 8vh, 90px); }
  .modx-panel { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .modx-panel__media { grid-row: 1; border-radius: 0 0 22px 22px; transform: none; background: transparent; }
  .modx-panel__media > * { transform: translateY(var(--mty, 118%)); will-change: transform; }
  .modx-panel__media video,
  .modx-panel__media img { object-position: center var(--mob-pos, 50%); }
  .modx-panel__copy { grid-column: 1; grid-row: 2; min-height: var(--modx-copy-h, 0px); padding: 18px 22px calc(20px + env(safe-area-inset-bottom)); }
  .modx__tabs { flex-wrap: nowrap; justify-content: space-around; gap: 8px; margin: 0 0 clamp(14px, 2.2vh, 20px); padding-bottom: 12px; border-bottom: 1px solid rgba(12, 12, 13, 0.14); overflow-x: auto; scrollbar-width: none; }
  .modx__tabs::-webkit-scrollbar { display: none; }
  /* scroll-progress: a fine ink line fills the grey rule as the section scrolls (--prog from imaging.js) */
  .modx__tabs { background: linear-gradient(var(--ink), var(--ink)) 0 100% / calc(var(--prog, 0) * 100%) 2px no-repeat, linear-gradient(rgba(12,12,13,0.14), rgba(12,12,13,0.14)) 0 100% / 100% 1px no-repeat; border-bottom: 0; }
  .modx-tab { font-size: 12px; letter-spacing: 0.06em; color: rgba(12, 12, 13, 0.34); }
  .modx-tab.is-on { color: var(--ink); font-weight: 700; }
  .modx__h { font-size: clamp(31px, 8.6vw, 41px); max-width: none; min-height: 0; margin-bottom: clamp(14px, 2.2vh, 20px); }
  .modx__p { font-size: 18px; line-height: 1.58; min-height: 0; max-width: none; }
  .modx__offer { margin-top: clamp(22px, 3.6vh, 36px); margin-bottom: 0; }
  /*
   * Buttons stay on one line: side by side when both fit, otherwise each
   * takes its own full-width row.
   */
  .modx__ctas { gap: 10px; }
  .modx__ctas .btn { flex: 1 1 auto; min-width: 0; white-space: nowrap; padding: 13px 22px; min-height: 48px; box-sizing: border-box; }
}
/* Shorter phones: tighten the copy so the image keeps a usable share of the card. */
@media (max-width: 900px) and (max-height: 760px) {
  .modx__h { font-size: clamp(26px, 7.4vw, 34px); margin-bottom: 12px; }
  .modx__p { font-size: 16px; line-height: 1.5; }
  .modx__tabs { margin-bottom: 12px; padding-bottom: 10px; }
  .modx__offer { margin-top: 20px; }
}
@media (max-width: 900px) and (max-height: 560px) {
  .modx__p { font-size: 14px; }
}

/* ═══════════════════ SECTION 4 — SCAN CATALOGUE ═══════════════════ */
.catalogue { position: relative; background: #ffffff; }
.catalogue__inner { position: relative; z-index: 1; width: min(1240px, 92vw); margin: 0 auto; padding: clamp(72px, 11vh, 132px) 0 clamp(64px, 9vh, 110px); }
.catalogue__head { max-width: 760px; margin: 0 auto clamp(40px, 5vh, 60px); text-align: center; }

/*
 * reveal-in animation — same .reveal/.in convention as final-cta.css/hiw.css;
 * driven by imaging.js
 */
.catalogue .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.catalogue .reveal.in { opacity: 1; transform: none; }

.scan-grid { display: block; }
.scan-group { margin-top: clamp(44px, 6vh, 72px); }
.scan-group:first-child { margin-top: 0; }
.scan-group__head { display: flex; align-items: center; gap: clamp(16px, 2vw, 26px); margin-bottom: clamp(32px, 4.5vh, 52px); }
.scan-group__line { flex: 1; height: 2px; background: rgba(12, 12, 13, 0.14); }
.scan-group__label { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 15px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
.scan-group__label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* Row layout: flexbox rather than a fixed equal-columns grid, so blocks can
   take DIFFERENT widths in the same row (image blocks wider, text-only
   blocks narrower — see .scan / .scan--with-image below) for any mix of
   1–4 blocks, without PHP needing to know which combination it is. */
.scan-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; justify-content: center; }

/* ── Block (card) — single consistent dark style ── */
.scan {
  position: relative; display: flex; flex-direction: column; padding: 30px 28px 28px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(40, 55, 71, 0.96) 0%, rgba(30, 42, 55, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 26px 60px -40px rgba(8, 12, 18, 0.55);
  max-width: 1000px;
  flex: 1 1 260px; /* text-only blocks: standard share of the row */
}
.scan__body { display: flex; flex-direction: column; flex: 1; min-width: 0; }

/*
 * Two-column layout for any block with an image — image left, content
 * right. flex-grow is higher than a plain .scan, so image blocks claim more
 * of the row's width.
 */
.scan--with-image {
  flex: 1.6 1 380px; /* wider minimum + grows faster than text-only blocks */
  flex-direction: row; align-items: stretch; gap: clamp(24px, 3vw, 40px);
  padding: clamp(22px, 2.6vw, 30px);
  background: linear-gradient(90deg, rgba(62, 81, 101, 0.92) 0%, rgba(56, 73, 91, 0.9) 44%, rgba(62, 81, 101, 0.88) 100%);
}
.scan--with-image .scan__media {
  position: relative; display: flex; align-items: center; justify-content: center;
}
.scan--with-image .scan__body { justify-content: center; }

/* Image + animated scan-line beam */
.scan__frame { position: relative; width: 100%; z-index: 1; border-radius: 12px; overflow: hidden; }
.scan__img { display: block; width: 100%; height: auto; }
.scan__beam {
  position: absolute; left: 6%; right: 6%; height: 2px; top: 4%;
  background: rgba(255, 138, 61, 0.45);
  box-shadow: 0 0 12px 2px rgba(239, 108, 35, 0.45), 0 0 34px 8px rgba(239, 108, 35, 0.22);
  border-radius: 2px; pointer-events: none; opacity: 0.9;
  animation: scanBeam 8s ease-in-out infinite;
}
@keyframes scanBeam {
  0%   { top: 4%; opacity: 0; }
  8%   { opacity: 0.85; }
  48%  { top: 96%; opacity: 0.85; }
  56%  { top: 96%; opacity: 0.85; }
  96%  { top: 4%; opacity: 0.85; }
  100% { top: 4%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .scan__beam { animation: none; top: 50%; } }

.scan__head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin: 0 0 4px; }
.scan__name { font-family: var(--sans); font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin: 0; color: #fff; }
.scan__dot { color: var(--accent); margin: 0 3px; }
.scan__variant { color: var(--accent); font-weight: 700; }
.scan__time { font-family: var(--mono); font-size: 12.5px; color: rgb(255, 255, 255); white-space: nowrap; }

.scan__desc { font-family: var(--sans); font-size: 13px; line-height: 1.6; color: rgb(255, 255, 255); margin: 14px 0 0; text-wrap: pretty; }

.scan__bestfor { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.scan__bestfor-label { display: block; font-family: var(--sans); font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.scan__bestfor-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.scan__bestfor-list li { display: flex; gap: 10px; align-items: flex-start; font-family: var(--sans); font-size: 13.5px; line-height: 1.45; color: rgba(255, 255, 255, 0.92); text-wrap: pretty; }
.scan__tick { flex: 0 0 16px; width: 16px; height: 16px; margin-top: 1px; color: var(--accent); }

.scan__price { display: flex; align-items: baseline; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.scan__price-was { font-family: var(--sans); font-size: clamp(20px, 1.9vw, 26px); font-weight: 400; color: rgb(255, 255, 255); }
.scan__price-was s { text-decoration-color: rgb(255, 255, 255); }
.scan__price-now { font-family: var(--sans); font-size: clamp(24px, 2.2vw, 30px); font-weight: 700; letter-spacing: -0.02em; color: var(--accent); line-height: 1; }
.scan__note { font-family: var(--sans); font-size: 12px; line-height: 1.45; color: rgba(255, 255, 255, 0.65); margin: 8px 0 0; }

.scan__actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 22px; }
.sbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-family: var(--sans); font-size: 14px; font-weight: 600;
  padding: 13px 18px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; width: 100%; text-decoration: none;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.sbtn--primary { background: #fff; color: var(--accent); }
.sbtn--primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(0,0,0,0.4); }
.sbtn--ghost { background: transparent; border-color: rgba(255, 255, 255, 0.25); color: #fff; }
.sbtn--ghost:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.08); }

/* "What's included" — plain dot-joined line, toggled by imaging.js */
.scan__toggles { display: flex; flex-direction: column; margin-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.disc {
  width: 100%; text-align: left; cursor: pointer; background: none; border: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 2px;
  font-family: var(--sans); font-size: 13.5px; font-weight: 600; color: #fff;
}
button.disc.is-open {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.disc__chev { width: 8px; height: 8px; border-right: 1.6px solid rgba(255, 255, 255, 0.7); border-bottom: 1.6px solid rgba(255, 255, 255, 0.7); transform: rotate(45deg); transition: transform 0.3s ease; }
.disc.is-open .disc__chev { transform: rotate(225deg); }
.disc__panel { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.disc__panel-inner { padding: 10px 2px 18px; }
.inc-line {
    display: flex;
    gap: 8px;
    font-size: 13px;
    letter-spacing: 0.03em;
    line-height: 1.6;
    color: rgb(255, 255, 255);
}
.inc-line .ic-yes { flex: none; color: var(--accent); font-family: var(--sans); }

@media (max-width: 760px) {
  .scan-row { flex-direction: column; }
  .scan, .scan--with-image { flex: 1 1 auto; width: 100%; max-width: none; }
  .scan--with-image { flex-direction: column; gap: 20px; }
  .scan--with-image .scan__media { flex: none; }
}
@media (max-width: 480px) {
  .scan { padding: 24px 22px 22px; }
}
.catalogue__foot { text-align: center; margin-top: clamp(34px, 5vh, 52px); font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.catalogue__foot-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  background: var(--accent); color: #fff; font-family: var(--sans); font-size: 14px; font-weight: 600;
  text-decoration: none; cursor: pointer; transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
  box-shadow: 0 12px 28px -14px rgba(239, 108, 35, 0.7);
}
.catalogue__foot-btn:hover { transform: translateY(-1px); background: #e2611c; box-shadow: 0 16px 32px -14px rgba(239, 108, 35, 0.8); }

/* ── 5–6 block groups + members-only button ──
   PHP splits a group of 5–6 blocks into rows of 3 (5 → 3 + 2, 6 → 3 + 3)
   and marks those rows .scan-row--split. Each card there is a fixed third
   of the row, so a 2-card second row keeps the same card width as the 3
   above and stays centred. Phones fall back to the single-column stack. */
.scan-row + .scan-row { margin-top: 20px; }
.scan-row--split > .scan { flex: 0 1 calc((100% - 40px) / 3); max-width: none; }
@media (max-width: 760px) {
  .scan-row--split > .scan { flex: 1 1 auto; }
}

/* Members-only block: disabled stand-in for "Book directly". */
.sbtn--reserved { line-height: inherit; background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.14); color: rgba(255, 255, 255, 0.42); cursor: not-allowed; }
.sbtn--reserved:hover { transform: none; }

/* ═══════════════════ SECTION 5 — COMBINED VALUE ═══════════════════ */
/* combined_bg_image is a wide banner — editors upload at 1920×730.
   --combined-bg-image is set inline from PHP only when the field is
   filled; the url() below is the static fallback.

   Shared rules defined above rather than here:
     .badge   → `.cf .badge, .combined .badge`
     __title  → `.statement__title, .combined__title` (colour set below)
     __sub    → `.cf__sub, .combined__sub` */
.combined { position: relative; overflow: hidden; background: #1a1a1a; color: #fff; isolation: isolate; }
.combined__bg {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(90deg, rgba(10,14,10,0.64) 0%, rgba(10,14,10,0.44) 36%, rgba(10,14,10,0.1) 62%, rgba(10,14,10,0.02) 100%),
    var(--combined-bg-image, url("../images/combined-bg-cool.png"));
  background-size: cover; background-position: center right;
}
.combined__inner { position: relative; z-index: 1; width: min(1320px, 94vw); margin: 0 auto; padding: clamp(96px, 16vh, 200px) 0; }
.combined__inner > .reveal { max-width: 560px; }
.combined__title { color: #fff; }
.combined__list { list-style: none; margin: clamp(28px, 4vh, 40px) 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.combined__list li { display: flex; align-items: center; gap: 14px; font-family: var(--sans); font-size: 16px; color: rgba(255,255,255,0.92); }
.combined__list .check {
  flex: none; width: 23px; height: 23px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff;
}
/* Layout/placement only — the button's own look comes entirely from
   .btn/.btn-primary in custom.css, nothing re-declared here. */
.combined__cta { margin-top: clamp(28px, 4vh, 40px); }

/* reveal-in animation — same .reveal/.in convention as every other Imaging section */
.combined .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.combined .reveal.in { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .combined__inner { padding: clamp(64px, 10vh, 100px) 0; }
  .combined__inner > .reveal { max-width: none; }
  /* Dylan: the model was cut in half on phones. Centre the man (≈61% across the
     1920×730 banner) and darken evenly, since the copy covers the whole width here. */
  .combined__bg {
    background-image:
      linear-gradient(180deg, rgba(10,14,10,0.58) 0%, rgba(10,14,10,0.5) 55%, rgba(10,14,10,0.62) 100%),
      var(--combined-bg-image, url("../images/combined-bg-cool.png"));
    background-position: 61% 20%;
  }
}
@media (max-width: 480px) {
  .combined__title { font-size: clamp(28px, 8vw, 34px); }
  .combined__cta { width: 100%; text-align: center; }
}
/* Lumart, 12 Nov: each scan type a shade lighter than the one before it
   (MRI → CT → Ultrasound). Classes come from the group title. */
.scan-group--ct-scans .scan { background: linear-gradient(180deg, rgba(48, 64, 81, 0.96) 0%, rgba(37, 50, 64, 0.98) 100%); }
.scan-group--ultrasound .scan { background: linear-gradient(180deg, rgba(56, 73, 91, 0.96) 0%, rgba(44, 58, 73, 0.98) 100%); }

/* Lumart, 12 Nov: pure white body copy on the "combined" photo band, for contrast. */
.combined__sub { color: #fff; }

/* Lumart, 12 Nov: the cities sit 3 on the top line and the rest below (on
   desktop too, so a fifth city never sits alone). The ::after is a full-width
   break after the 3rd city; row-gap is 0 so the break line adds no space. */
.cf__locations { row-gap: 0; }
.cf__locations li { order: 1; }
.cf__locations li:nth-child(n+4) { order: 3; margin-top: 13px; }
.cf__locations::after { content: ""; order: 2; flex-basis: 100%; height: 0; }
@media (max-width: 860px) {
  .cf__locations { row-gap: 0; }
  .cf__locations li:nth-child(n+4) { margin-top: 10px; }
}

/* Shehwar, 12 Nov: on desktop "Abdominal & pelvic" swung into the paragraph.
   The copy sits further right (15vw → 10vw from the edge) to clear the wheel. */
@media (min-width: 861px) { .cf__copy { right: clamp(40px, 10vw, 300px); } }

/* Shehwar, 12 Nov: orange on white was ~3:1. A deeper orange passes AA (≈4.9:1). */
.sbtn--primary { color: #b8480c; }

/* Shehwar, 12 Nov: scan tabs had a 16px tap target. 14px padding top and
   bottom, taken back with negative margin, gives 44px without moving anything. */
.modx-tab { padding-top: 14px; padding-bottom: 14px; margin-top: -14px; margin-bottom: -14px; }

/* Lumart, 12 Nov (phones).
   - Statement → iPad → stats: more scroll (300vh, was 210vh), so it moves slower
     and holds on the last stat before scrolling on (beats in imaging.js).
   - Scan tabs: the next image slides fully in on its own (imaging.js sets --mty
     to 0 or 118%), so it never rests half over the previous one. */
.statement.is-anim-sm { height: 300vh; }
@media (max-width: 900px) {
  .modx-panel__media > * { transition: transform 0.7s cubic-bezier(0.65, 0, 0.35, 1); }
}
@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .modx-panel__media > * { transition: none; }
}

/* Shehwar's audit (12 Nov): prices sat at different heights in neighbouring
   cards. The price block now sits at the foot of each card's text, so prices
   and buttons line up across a row. */
@media (min-width: 761px) {
  .scan:not(.scan--with-image) .scan__body .scan__price { margin-top: auto; padding-top: 26px; }
}

/* Lumart, 12 Nov: full-bleed pin (see --barpad in style.css). */
@media (max-width: 960px) {
  .hero-pin .hero { height: 100vh; height: 100lvh; padding-bottom: var(--barpad, 0px); box-sizing: border-box; }
}
/* Lumart, 12 Nov (phones): no white frame scrolling in over the hero video,
   and smaller body text on the scan cards. */
@media (max-width: 760px) {
  .hero-pin .hero__border { display: none; }
  .modx__p { font-size: 15.5px; line-height: 1.5; }
}
/* Lumart, 12 Nov (follow-up): with no frame animation on phones the pinned
   run only held the page still; the hero now scrolls away normally. */
@media (max-width: 760px) {
  .hero-pin { height: auto; }
  .hero-pin .hero { position: relative; }
}
/* Lumart, 13 Nov (iPhone): the pinned scan card's frame is the full screen
   (behind Safari's bar); imaging.js grows the card to it. */
@media (max-width: 900px) {
  .modx__sticky { height: 100vh; height: 100lvh; }
  /* Lumart, 15 Nov (Safari): the buttons sat under Safari's bottom bar. */
  .modx-panel__copy { padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px) + var(--barpad, 0px)); }
}

/* Lumart, 13 Nov: numbered source under the Scans stats. */
.statement__source {
  width: min(900px, 88vw); margin: 0 auto; padding: 8px 0 28px;
  font-size: 11.5px; line-height: 1.5; color: var(--ink-soft, rgba(12,12,13,0.55)); text-align: center; text-wrap: pretty;
}
.statement__source a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.statement__source sup { font-size: 0.8em; }

/* Lumart, 13 Nov (desktop): no white frame closing in over the hero and no
   pinned hold, the same as phones; the hero scrolls away straight away. */
.hero-pin { height: auto; }
.hero-pin .hero { position: relative; }
.hero-pin .hero__border { display: none; }

/* Lumart, 13 Nov: the scan headings reveal letter by letter, more quietly
   (a short lift and fade, not words sliding up from a mask). */
.modx__h .w { overflow: visible; white-space: nowrap; vertical-align: baseline; }
.modx__h .w > span { transform: translateY(0.28em); opacity: 0; transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease; }
.modx-panel.is-active .w > span { transform: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .modx__h .w > span { opacity: 1; }
}

/* Lumart, 13 Nov (desktop): each scan picture slides fully in or out on its
   own once its trigger point is passed (imaging.js), like phones. */
@media (min-width: 901px) {
  .modx-panel__media { transition: transform 0.75s cubic-bezier(0.65, 0, 0.35, 1); }
}
@media (min-width: 901px) and (prefers-reduced-motion: reduce) {
  .modx-panel__media { transition: none; }
}

/* Lumart, 13 Nov (desktop):
   - the scan picture slides in a little slower (1s, was 0.75s);
   - each card's copy waits until its picture has slid up (--cd; imaging.js
     sets 0s on the first panel, which has no slide), on phones too;
   - the scroll-progress line under the tabs, as on phones. */
@media (min-width: 901px) {
  .modx-panel__media { transition: transform 1s cubic-bezier(0.65, 0, 0.35, 1); }
  .modx-panel { --cd: 0.7s; }
  .modx__tabs {
    align-self: flex-start; padding-bottom: 16px;
    background: linear-gradient(var(--ink), var(--ink)) 0 100% / calc(var(--prog, 0) * 100%) 2px no-repeat,
                linear-gradient(rgba(12,12,13,0.14), rgba(12,12,13,0.14)) 0 100% / 100% 1px no-repeat;
  }
}
@media (max-width: 900px) {
  .modx-panel { --cd: 0.45s; }
}
.modx-panel.is-active .w > span { transition-delay: calc(var(--d, 0s) + var(--cd, 0s)); }
.modx-panel.is-active .modx__p, .modx-panel.is-active .modx__offer { transition-delay: calc(var(--rd, 0.5s) + var(--cd, 0s)); }
@media (prefers-reduced-motion: reduce) {
  .modx-panel { --cd: 0s; }
}

/* Lumart, 13 Nov: each Scans stat has its own scroll point (imaging.js), so
   the pinned run is longer, with a hold after the last stat (desktop 300vh,
   was 200vh; phones 320vh, was 300vh), and a little more room above the
   source note. */
.statement { height: 300vh; }
.statement.is-anim-sm { height: 320vh; }
.statement__source { padding-top: 28px; }
/* Lumart, 13 Nov (later): more scroll between the stats (triggers in
   imaging.js), so the run is longer again: about 57vh between stats and
   ~70–90vh of hold after the last. */
.statement { height: 360vh; }
.statement.is-anim-sm { height: 380vh; }
/* Lumart, 13 Nov (later still): about a screen of scroll between stats. */
.statement { height: 460vh; }
.statement.is-anim-sm { height: 460vh; }
/* Lumart, 13 Nov (09:55): stats closer together, about half a screen apart. */
.statement { height: 300vh; }
.statement.is-anim-sm { height: 300vh; }
/* Lumart, 3 Dec (desktop): about half a screen more on the statement before the iPad comes up (triggers in imaging.js). */
.statement { height: 350vh; }
.statement.is-anim-sm { height: 300vh; }

/* Scan catalogue filter pills (13 Nov): one group at a time, MRI first. */
.scan-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 auto clamp(34px, 4.6vh, 52px); }
.scan-tab {
  font-family: var(--sans); font-size: 15px; font-weight: 500; color: var(--ink-soft, rgba(12,12,13,0.7));
  padding: 11px 22px; border-radius: 999px; border: 1px solid rgba(12, 12, 13, 0.14); background: rgba(255, 255, 255, 0.6);
  cursor: pointer; white-space: nowrap; transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.scan-tab:hover { color: var(--ink); border-color: rgba(12, 12, 13, 0.28); }
.scan-tab.is-active { color: #fff; background: var(--accent); border-color: var(--accent); }
.scan-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.scan-grid--tabs .scan-group { margin-top: 0; }
.scan-grid--tabs .scan-group[hidden] { display: none; }
.scan-grid--tabs .scan-group__head { display: none; }
.scan-grid--tabs .scan-group:not([hidden]) { animation: scanTabIn 0.35s ease both; }
@keyframes scanTabIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) {
  .scan-tabs { gap: 8px; }
  .scan-tab { font-size: 14px; padding: 9px 16px; }
}
@media (prefers-reduced-motion: reduce) { .scan-grid--tabs .scan-group:not([hidden]) { animation: none; } }

/* Lumart, 13 Nov 10:21: eyebrow pill above every scan card. */
.scan__tag {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--sans); font-size: 12.5px; font-weight: 500; letter-spacing: 0.01em; color: #fff;
  padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.16);
  margin: 0 0 14px;
}
.scan__tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* Lumart, 15 Nov (phones): "Hundreds of conditions" is no longer pinned. It
   scrolls like a normal section, and the four condition pill rows drift on
   their own (imaging.js), not with the scroll. Desktop keeps the wheel. */
@media (max-width: 860px) {
  .cf { height: auto; }
  .cf__sticky { position: relative; top: auto; height: auto; }
  .cf__stage { height: auto; }
  .cf__copy { padding-top: clamp(76px, 11vh, 104px); }
  .cf__rows { flex: none; padding-top: clamp(36px, 5vh, 52px); padding-bottom: clamp(64px, 9vh, 88px); }
  .cf__bg { width: max(160vh, 1400px); }
}

/* Lumart, 15 Nov (phones): the iPad rising in was jerky on iPhone. Safari
   re-rendered the big drop-shadow filter on every frame of the move. On
   phones the image has no filter; the shadow is a soft blurred ellipse
   behind it, and the iPad moves as its own GPU layer. */
@media (max-width: 860px) {
  .statement__ipad { will-change: transform; }
  .statement__ipad img { filter: none; }
  .statement__ipad::after {
    content: ""; position: absolute; left: 6%; right: 6%; bottom: -7%; height: 16%; z-index: -1;
    background: radial-gradient(closest-side, rgba(12, 12, 13, 0.24), rgba(12, 12, 13, 0)); pointer-events: none;
  }
}

/* Lumart, 15 Nov 12:35 (phones, Scans): the "full picture" band: a lighter
   overlay, framed on both people, and solid white text with a soft shadow. */
@media (max-width: 760px) {
  .combined__bg {
    background-image:
      linear-gradient(180deg, rgba(10,14,10,0.36) 0%, rgba(10,14,10,0.28) 55%, rgba(10,14,10,0.42) 100%),
      var(--combined-bg-image, url("../images/combined-bg-cool.png"));
    background-position: 74% 20%;
  }
  .combined__title, .combined__sub, .combined__list li { color: #fff; text-shadow: 0 1px 14px rgba(0, 0, 0, 0.35); }
}
/* Lumart, 15 Nov 12:36 (phones, Scans): the closing photo framed on the MRI. */
@media (max-width: 860px) {
  .final-cta .final-cta__bg { object-position: 82% center; }
}

/* Lumart, 15 Nov (phones and tablets): a longer hold on "Engineered for peace
   of mind" before the iPad rises. The run is 40vh longer (340vh, was 300vh)
   and the triggers in imaging.js move by the same amount, so the gaps
   between the stats and the hold after the last one are unchanged. */
.statement.is-anim-sm { height: 340vh; }

/* Lumart, 15 Nov (iPhone, Chrome and Safari): after the scan cards let go, the
   bottom-bar room in the last card (--barpad) was left as empty space above
   "Know your body from the inside out", and more of it in Chrome (taller bars)
   than in Safari. The next section now overlaps exactly that room, so the gap
   is the same in both browsers. Nothing moves while pinned: that strip is
   behind the browser bar. */
@media (max-width: 900px) {
  .modx { margin-bottom: calc(-1 * var(--barpad, 0px)); }
  /* and a fixed, slightly tighter top on the next section (was 11vh, which
     also differs between the two browsers). */
  .catalogue__inner { padding-top: 56px; }
}

/* Dylan, 25 Nov (Scans "full picture"): the beach photo has its own phone version.
   The light sand needs a slightly stronger veil behind the white copy. */
@media (min-width: 761px) {
  .combined__bg {
    background-image:
      linear-gradient(90deg, rgba(10,14,10,0.62) 0%, rgba(10,14,10,0.46) 36%, rgba(10,14,10,0.12) 62%, rgba(10,14,10,0.02) 100%),
      var(--combined-bg-image, url("../images/combined-bg-cool.png"));
    background-position: center center;
  }
}
@media (max-width: 760px) {
  .combined__bg {
    background-image:
      linear-gradient(180deg, rgba(10,14,10,0.5) 0%, rgba(10,14,10,0.4) 55%, rgba(10,14,10,0.5) 100%),
      var(--combined-bg-mobile, var(--combined-bg-image, url("../images/combined-bg-cool.png")));
    background-position: right bottom;
  }
}

/* Lumart, 3 Dec: iPads and in-between windows use the desktop layout; slightly
   smaller stat type so the stats sit beside a narrower iPad. */
@media (max-width: 1279px) {
  .statement.is-anim-lg .stat__title { font-size: 16px; margin: 8px 0 4px; }
  .statement.is-anim-lg .stat__desc { font-size: 12.5px; line-height: 1.4; }
}
