/* dr.media v6 — overrides on top of v5.css (and after the design system's bundle.css).
   1) The logo dot's blue gradient on highlighted words and every button.
   2) A red → yellow → green funnel.
   3) The client-logo strip. */

/* ---------- The dot's gradient, made readable ---------- */
:root {
  --grad-btn: linear-gradient(100deg, #6f63ff 0%, #22d3ff 100%);   /* ink text: 4.5:1 on the dark end, 10.9:1 on the light end */
  --grad-text: linear-gradient(100deg, #3b2eff 0%, #0891d1 100%);  /* on Bone: 6.3:1 → 3.2:1, display sizes only */
}
[data-theme="ink"] { --grad-text: linear-gradient(100deg, #6f63ff 0%, #22d3ff 100%); } /* on Ink: 4.5:1 → 10.9:1 */
.hl { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; padding-bottom: 0.08em; }

.send, .mbar a, .dr-btn--signal, .dr-btn--primary { background: var(--grad-btn); color: var(--brand-ink); border-color: transparent; }
.send:hover, .mbar a:hover, .dr-btn--signal:hover, .dr-btn--primary:hover { background: var(--grad-btn); color: var(--brand-ink); filter: brightness(1.1); }
.mbar a:focus-visible { outline-color: var(--brand-bone); }

/* ---------- Cold open: a one-line promise under the last line ---------- */
.op-sub { margin: 0; max-width: 30ch; font-size: 18px; line-height: 1.4; font-weight: 500; color: var(--text-muted); }
.op-say { font-size: clamp(48px, 15.4vw, 150px); }

/* ---------- Teleprompter: 16 words ---------- */
.t0 { --i: 0.320; } .t1 { --i: 0.343; } .t2 { --i: 0.365; } .t3 { --i: 0.388; } .t4 { --i: 0.410; }
.t5 { --i: 0.433; } .t6 { --i: 0.455; } .t7 { --i: 0.478; } .t8 { --i: 0.500; } .t9 { --i: 0.523; }
.t10 { --i: 0.545; } .t11 { --i: 0.568; } .t12 { --i: 0.590; } .t13 { --i: 0.613; } .t14 { --i: 0.635; } .t15 { --i: 0.658; }
.tp-text { max-width: 15ch; }

/* ---------- Funnel: unlit = dark, lit = red / yellow / green ---------- */
.fx-slice { fill: var(--surface-raised); }
.fx-glow { --on: clamp(0, calc((var(--a) - var(--n)) * 9 + 1), 1); opacity: var(--on); stroke: var(--surface); stroke-width: 4px; vector-effect: non-scaling-stroke; transition: opacity 260ms linear; }
.fx-tags { font-size: 12px; letter-spacing: 0.08em; }

/* ---------- Clients: logos passing by ---------- */
.logos { display: flex; flex-direction: column; gap: 12px; overflow: hidden;
  -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%); }
.logo-row { display: flex; gap: 12px; width: max-content; }
.logo-tile { flex: none; width: 220px; height: 104px; box-sizing: border-box; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface-raised); }
.logo-tile img { max-width: 70%; max-height: 52%; object-fit: contain; display: block; }
@keyframes logos-l { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes logos-r { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.dr-motion .logo-row.l { animation: logos-l 48s linear infinite; }
.dr-motion .logo-row.r { animation: logos-r 56s linear infinite; }
.logos:hover .logo-row { animation-play-state: paused; }

@media (max-width: 760px) {
  .logo-tile { width: 148px; height: 76px; }
  .op-sub { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .dr-motion .logo-row { animation: none; }
}

/* Line 04's promise line only shows with its line; timecode never wraps. */
.dr-motion .op-line .op-sub { opacity: var(--on); transform: translateY(calc((1 - var(--on)) * -12px)); transition: opacity 200ms linear 250ms, transform 500ms cubic-bezier(0.2, 0.8, 0.2, 1) 250ms; }
.tc { white-space: nowrap; }

/* Two-line cold open: shorter scroll, one beat per line. */
.dr-motion .op-track { height: calc(var(--stage-h) + 900px); }

/* Line 01 literally gets scrolled past: its words slide off to the left as Line 02 drops in. */
.dr-motion .op-line.n0 .drop > span { transform: translateX(calc((1 - var(--on)) * -115%)); opacity: var(--on); transition: transform 520ms cubic-bezier(0.6, 0, 0.8, 0.4), opacity 260ms linear; transition-delay: calc(var(--d, 0) * 60ms); }
/* Header: the wordmark (one dot) a touch larger. */
.dr-nav__logo { height: 24px; }

/* ---------- Founder: an Instagram-style profile card ---------- */
.ig { display: flex; flex-direction: column; gap: 20px; max-width: 520px; padding: 24px; box-sizing: border-box; border: 1px solid var(--line-strong); border-radius: var(--radius-2); background: var(--surface-raised); }
.ig-top { display: flex; align-items: center; gap: 16px; }
.ig-ring { flex: none; display: block; padding: 3px; border-radius: 50%; background: var(--grad-btn); }
.ig-avatar { display: block; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: 50% 22%; border: 3px solid var(--surface-raised); box-sizing: content-box; }
.ig-id { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ig-handle { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 20px; letter-spacing: -0.01em; color: var(--text); }
.ig-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ig-stats > div { display: flex; flex-direction: column; gap: 6px; }
.ig-bio { margin: 0; font-size: 16px; line-height: 1.5; color: var(--text); }
.ig .dr-btn { width: 100%; }
@media (max-width: 760px) { .ig { padding: 18px; } .ig-avatar { width: 60px; height: 60px; } }

/* ---------- Cold open, scrubbed: the headline follows the scroll instead of firing timed transitions.
   The page script eases two values onto .op-track: --o (line 01 leaving) and --i (line 02 arriving), 0 → 1. ---------- */
.dr-motion .op-track { height: calc(var(--stage-h) + 1100px); }
.dr-motion .op-line .drop > span,
.dr-motion .op-line .op-label,
.dr-motion .op-line .op-sub { transition: none; will-change: transform, opacity; }
.dr-motion .op-line.n0 .drop > span {
  --t: clamp(0, calc((var(--o, 0) - var(--d, 0) * 0.14) / 0.86), 1);
  transform: translate3d(calc(var(--t) * -70%), 0, 0); opacity: calc(1 - var(--t) * 1.25); transition: none;
}
.dr-motion .op-line.n0 .op-label { opacity: calc(1 - var(--o, 0) * 2.5); }
.dr-motion .op-line.n1 .drop > span {
  --t: clamp(0, calc((var(--i, 0) - var(--d, 0) * 0.16) / 0.84), 1);
  transform: translate3d(0, calc((1 - var(--t)) * -118%), 0); opacity: 1; transition: none;
}
.dr-motion .op-line.n1 .op-label { opacity: clamp(0, calc(var(--i, 0) * 2.5), 1); }
.dr-motion .op-line.n1 .op-sub { opacity: clamp(0, calc(var(--i, 0) * 3 - 2), 1); transform: translate3d(0, calc((1 - var(--i, 0)) * 18px), 0); transition: none; }
/* The page scrubber grows by transform, not width, so it never triggers layout. */
.dr-motion .prog { width: 100%; transform-origin: 0 50%; transform: scaleX(var(--page-p, 0)); }

/* The header sits on Ink inside a Bone page: show only the logo drawn for Ink (the other one's dot was showing above it). */
[data-theme="ink"] .dr-nav .dr-on-bone { display: none; }
[data-theme="bone"] .dr-nav .dr-on-ink { display: none; }
[data-theme="ink"] .dr-nav .dr-on-ink, [data-theme="bone"] [data-theme="bone"] .dr-nav .dr-on-bone { display: block; }

/* Founder: the profile card is the centerpiece, so the portrait appears once, large, as its avatar. */
.ig { max-width: none; padding: 36px; gap: 28px; }
.ig-top { gap: 24px; }
.ig-ring { padding: 4px; }
.ig-avatar { width: 148px; height: 148px; border-width: 4px; object-position: 50% 24%; }
.ig-id { gap: 8px; }
.ig-handle { font-size: 30px; letter-spacing: -0.02em; gap: 8px; }
.ig-stats { padding: 24px 0; }
.ig-num { font-size: 48px; }
.ig-bio { font-size: 18px; }
@media (max-width: 760px) {
  .ig { padding: 20px; gap: 22px; }
  .ig-top { gap: 16px; }
  .ig-avatar { width: 104px; height: 104px; border-width: 3px; }
  .ig-handle { font-size: 21px; }
  .ig-badge { width: 18px; height: 18px; }
  .ig-stats { padding: 18px 0; }
  .ig-num { font-size: 32px; }
  .ig-bio { font-size: 16px; }
}

/* The process playhead moves by transform, so scrolling it never triggers layout. */
.steps-fill { top: 8px; bottom: 8px; height: auto; transform-origin: 50% 0; transform: scaleY(var(--p-steps, 1)); }
.steps-head { top: 8px; bottom: 8px; height: auto; background: none; box-shadow: none; pointer-events: none; transform: translate3d(0, calc(var(--p-steps, 1) * 100%), 0); }
.steps-head::after { content: ""; position: absolute; left: 0; top: -6px; width: 13px; height: 13px; background: linear-gradient(135deg, var(--signal-indigo), var(--signal-cyan)); box-shadow: var(--glow-dot); }

/* The header sits above the pinned cold open: take its height off the stage so the first screen
   shows the whole stage, button and scroll cue included, instead of pushing them under the fold. */
:root { --nav-h: 69px; }
@media (max-width: 720px) { :root { --nav-h: 61px; } }
.dr-motion .op-stage { height: calc(var(--stage-h) - var(--nav-h)); min-height: 520px; }

/* ---------- SC 06 — who it's for: a wheel of businesses, scrubbed by the scroll ---------- */
.wh-track { position: relative; }
.wh-stage { display: flex; flex-direction: column; gap: 40px; padding: 96px 0; box-sizing: border-box; }
.wh-body { position: relative; display: flex; flex-direction: column; gap: 4px; }
.wh-line { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 4.4vw, 64px); line-height: 1; letter-spacing: -0.04em; color: var(--text); }
.wh-window {
  --pw: clamp(0, calc((var(--p-who, 1) - 0.04) / 0.84), 1);
  height: 3.12em; overflow: hidden;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, calc((100vw - 34px) / 7.9), 148px); line-height: 1.04; letter-spacing: -0.055em; color: var(--text);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.14) 28%, #000 35%, #000 65%, rgba(0, 0, 0, 0.14) 72%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.14) 28%, #000 35%, #000 65%, rgba(0, 0, 0, 0.14) 72%, transparent 100%);
}
.wh-list { display: flex; flex-direction: column; padding-top: 1.04em; transform: translate3d(0, calc(var(--pw) * -10.4em), 0); will-change: transform; }
.wh-list > span { display: block; height: 1.04em; white-space: nowrap; }
.wh-list > .hl { padding-bottom: 0; }
.dr-motion .wh-track { height: calc(var(--stage-h) + 1500px); }
.dr-motion .wh-stage { position: sticky; top: 0; height: var(--stage-h); justify-content: center; padding: 24px 0; }
@media (max-width: 760px) { .wh-stage { gap: 28px; padding: 72px 0; } }
/* Each word rests in the centre for most of its share of the scroll, then rolls to the next: the wheel
   is still positioned by the scroll alone, it just never stops between two words. */
@supports (width: calc(1px * round(down, 1.5, 1))) {
  .wh-window {
    --x: calc(var(--pw) * 10);
    --fl: round(down, var(--x), 1);
    --g: clamp(0, calc((var(--x) - var(--fl) - 0.28) / 0.44), 1);
    --pos: calc(var(--fl) + var(--g) * var(--g) * (3 - 2 * var(--g)));
  }
  .wh-list { transform: translate3d(0, calc(var(--pos) * -1.04em), 0); }
}

/* =====================================================================
   Cold open, staged: a feed of generic posts flies past behind line 01, brakes, and one post
   lights up and takes over the screen for line 02. The page script sets, on .op-track, 0 → 1:
   --f feed travel · --o line 01 leaving · --l the post lighting · --k it filling the screen · --i line 02 landing.
   ===================================================================== */
.op-stage { --cw: clamp(112px, 17vw, 220px); --ch: calc(var(--cw) * 1.5); --pitch: calc(var(--ch) + 14px); --hero-m: 4; overflow: hidden; }
.op-top, .op-lines, .op-bottom { position: relative; z-index: 1; }
.fd { position: absolute; inset: 0; z-index: 0; overflow: hidden; display: flex; justify-content: center; gap: 14px; pointer-events: none; opacity: 0.55; }
.fd-col { flex: none; width: var(--cw); margin-top: calc(var(--ch) * -0.35); }
.fd-col.c2, .fd-col.c4 { margin-top: calc(var(--ch) * -0.8); }
.fd-col.c1 { --m: 3.4; } .fd-col.c2 { --m: 4.6; } .fd-col.c3 { --m: 4; } .fd-col.c4 { --m: 4.8; } .fd-col.c5 { --m: 3.2; }
.fd-roll { display: flex; flex-direction: column; gap: 14px; }
.fd-card {
  flex: none; height: var(--ch); box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--radius-1);
  background:
    radial-gradient(circle at 20px 20px, #33322e 8px, transparent 9px),
    linear-gradient(#33322e, #33322e) 36px 16px / 38% 6px no-repeat,
    linear-gradient(#242421, #242421) 12px 40px / calc(100% - 24px) 58% no-repeat,
    linear-gradient(#33322e, #33322e) 12px calc(100% - 30px) / 72% 6px no-repeat,
    linear-gradient(#33322e, #33322e) 12px calc(100% - 16px) / 44% 6px no-repeat,
    #181816;
}
.fd-roll > .fd-card:nth-child(even) {
  background:
    radial-gradient(circle at 20px 20px, #33322e 8px, transparent 9px),
    linear-gradient(#33322e, #33322e) 36px 16px / 52% 6px no-repeat,
    linear-gradient(#33322e, #33322e) 12px 42px / 80% 6px no-repeat,
    linear-gradient(#33322e, #33322e) 12px 56px / 60% 6px no-repeat,
    linear-gradient(#242421, #242421) 12px 76px / calc(100% - 24px) calc(100% - 92px) no-repeat,
    #181816;
}
.fd-hero { display: none; }
@media (max-width: 760px) { .op-stage { --hero-m: 4.6; } .fd-col.c4, .fd-col.c5 { display: none; } }

@keyframes fd-drift { to { transform: translate3d(0, calc(var(--pitch) * -2), 0); } }
.dr-motion .fd { opacity: calc(0.9 - var(--l, 0) * 0.4); }
.dr-motion .fd-col { transform: translate3d(0, calc(var(--f, 0) * var(--m) * var(--pitch) * -1), 0); will-change: transform; }
.dr-motion .fd-roll { animation: fd-drift 9s linear infinite; }
.dr-motion .op-track.is-held .fd-roll { animation-play-state: paused; }
.dr-motion .fd-hero { display: block; position: absolute; inset: 0; z-index: 0; pointer-events: none; transform: translate3d(0, calc((1 - var(--f, 0)) * var(--hero-m) * var(--pitch)), 0); will-change: transform; }
.fd-clip { position: absolute; inset: 0; clip-path: inset(calc((1 - var(--k, 0)) * (50% - var(--ch) / 2)) calc((1 - var(--k, 0)) * (50% - var(--cw) / 2))); }
.fd-own { position: absolute; left: 50%; top: 50%; width: var(--cw); margin: calc(var(--ch) / -2) 0 0 calc(var(--cw) / -2); }
.fd-fill { position: absolute; inset: 0; background: var(--grad-btn); opacity: var(--l, 0); }

/* Line 01 holds while the feed flies; line 02 is Ink on the lit screen. */
.dr-motion .op-track { height: calc(var(--stage-h) + 1500px); }
.dr-motion .op-line.n1 .hl { background: none; -webkit-text-fill-color: var(--brand-ink); color: var(--brand-ink); }
.dr-motion .op-stage { --ink-k: calc(var(--k, 0) * 100%); }
.dr-motion .op-stage .mono, .dr-motion .op-stage .dr-slate, .dr-motion .op-line.n1 .op-sub { color: color-mix(in srgb, var(--brand-ink) var(--ink-k), var(--text-muted)) !important; }
.dr-motion .op-stage .tc { color: color-mix(in srgb, var(--brand-ink) var(--ink-k), var(--brand-bone)) !important; }
.dr-motion .op-bottom .send { position: relative; z-index: 0; color: color-mix(in srgb, var(--brand-bone) var(--ink-k), var(--brand-ink)); }
.dr-motion .op-bottom .send::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--brand-ink); opacity: var(--k, 0); }
@media (prefers-reduced-motion: reduce) { .dr-motion .fd-roll { animation: none; } }

/* The stage fills the whole screen, header included: the header floats over the feed, and the stage is as
   tall as the screen with the phone's browser bar hidden, so the lit post never leaves a dark strip. */
:root { --stage-h: 100vh; }
@supports (height: 100svh) { :root { --stage-h: 100svh; } }
.dr-motion .dr-nav { position: relative; z-index: 3; background: transparent; }
.dr-motion .op-track { margin-top: calc(var(--nav-h) * -1); height: calc(100vh + 1500px); }
.dr-motion .op-stage { height: 100vh; min-height: 560px; padding-top: calc(var(--nav-h) + 24px); }
@supports (height: 100lvh) {
  .dr-motion .op-track { height: calc(100lvh + 1500px); }
  .dr-motion .op-stage { height: 100lvh; padding-bottom: calc(100lvh - 100svh + 40px); }
}
@media (max-width: 760px) {
  .dr-motion .op-stage { padding-top: calc(var(--nav-h) + 14px); }
  @supports (height: 100lvh) { .dr-motion .op-stage { padding-bottom: calc(100lvh - 100svh + 20px); } }
}
