/* ==========================================================================
   Intro reel for the B+C homepage (labs/home/bc.html) — Option A, "Calm editorial story", integrated in Round 2.2
   (2026-10-26). Forked from the Round 2.1 prototype stylesheet (labs/reel/reel-a.css, kept with the archived prototype).
   Loaded after labs-bc.css; css/reel.css stays for the hero's "Watch intro" button only; js/reel.js is not loaded.
   One message (left) and one supporting visual (right) behave as one scene — they enter slowly together, hold long
   enough to read, and fade away together; on phones they stack into one calm centred composition. No lateral movement,
   no typing, no flashing, no parallax, no busy loops; nothing runs on CSS animations — every value is read from the
   clock in bc-reel.js through custom properties (--f fade, --rise entry, --p in-scene progress).
   The closing scene is the real DBV brand lockup; its orange full stop then becomes the hero's "View case studies"
   button (.rl-morph) while the backdrop (.rl__bg) and the controls dissolve, so the ending resolves into the page's
   first action with no jump.
   Visible controls: Play/Pause (icon), Skip intro, music toggle (icon only). While music is off the toggle carries a
   static, soft orange glow — a quiet reminder that optional sound exists; it goes once music is on. Semantic tokens
   only (the glow is the brand orange through color-mix), no new colour values.
   ========================================================================== */
.rl {
  --rl-ink: var(--color-text);
  --rl-muted: var(--color-text-muted);
  --rl-line: var(--color-border-strong);
  --rl-surface: var(--color-surface);
  --rl-chip: var(--color-surface-2);
  --rl-orange: var(--brand-orange);
  --rl-primary: var(--color-primary);
  --rl-paper: var(--color-bg);
  position: absolute;
  inset: 0 0 auto 0;
  height: calc(100svh - var(--header-h));
  min-height: 480px;
  z-index: 30; /* under the header (50) and VEMA (55, 56), as the production reel */
  background: none; /* the backdrop is its own layer so the closing can dissolve it while the full stop travels */
  color: var(--color-text);
  overflow: hidden;
}
.rl__bg {
  position: absolute;
  inset: 0;
  background: var(--color-bg);
  opacity: var(--bgf, 1);
}
.rl[hidden] {
  display: none;
}
.rl__frame {
  position: relative;
  height: 100%;
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}
@media (min-width: 720px) {
  .rl__frame {
    width: min(100% - 4rem, var(--container));
  }
}

/* ---- Scenes: text and visual as one unit ---- */
.rl__scenes {
  position: absolute;
  inset: 0 0 6rem 0; /* the control row sits in the bottom 6rem */
  margin: 0;
  padding: 0;
  list-style: none;
}
.rl-scene {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  align-content: center;
  gap: 1.75rem 4rem;
  opacity: var(--f, 0);
  transform: translateY(calc((1 - var(--rise, 1)) * 10px));
  will-change: opacity, transform;
}
.rl-scene[hidden] {
  display: none;
}
.rl-scene__text {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 1.2rem + 3vw, 3.9rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--color-text);
  text-wrap: balance;
}
.rl-scene__copy {
  min-width: 0;
}
/* One secondary keyword line under the headline (scenes 1–5): smaller, muted, no bullets, no motion of its own */
.rl-scene__kicker {
  margin: 0.9rem 0 0;
  color: var(--color-text-muted);
  font: 600 clamp(0.9rem, 0.82rem + 0.35vw, 1.05rem) / 1.4 var(--font-body);
  letter-spacing: 0.01em;
}
.rl-scene__kicker .sep {
  margin: 0 0.5rem;
  vertical-align: 0.14em;
  opacity: 0.8;
}
.rl-scene__visual {
  margin: 0;
  min-width: 0;
}
.rl-art {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
}
.rl--a .rl-scene:not(.rl-scene--closing) {
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
}
@media (max-width: 719px) {
  .rl--a .rl-scene:not(.rl-scene--closing) {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-content: center; /* the pair sits mid-screen, text above its visual */
    gap: 1.75rem;
  }
  .rl--a .rl-scene__visual {
    max-width: 30rem;
  }
}
@media (max-height: 560px) {
  .rl-scene__text {
    font-size: clamp(1.6rem, 1rem + 2.4vw, 2.6rem);
  }
}

/* The closing scene: the real DBV brand lockup — Direction A, "designedbyvenu." — built exactly as the header logo
   (css/style.css .site-header .brand): the approved wordmark masks in the text colours and the orange full stop at the
   master geometry (letters 679.33 × 125 units, full stop 22 units, 6 after the letters, bottom on the baseline), only
   larger. Centred on every screen; the lockup never crops (its width stays under the frame on phones). */
.rl-scene--closing {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}
.rl-brand {
  --logo-fs: clamp(44px, 3.2vw + 20px, 72px); /* 52 px on a 390 phone (357 px wide), 66 px at 1440 */
  --logo-u: calc(var(--logo-fs) / 100);
  display: flex;
  align-items: flex-start;
  line-height: 0;
  white-space: nowrap;
}
.rl-brand__word {
  position: relative;
  display: block;
  width: calc(var(--logo-u) * 679.33);
  height: calc(var(--logo-u) * 125);
  overflow: hidden;
  opacity: var(--wf, 1);
}
.rl-brand__word::before,
.rl-brand__word::after {
  content: "";
  position: absolute;
  inset: 0;
}
.rl-brand__word::before {
  background-color: var(--color-text);
  -webkit-mask: url("../assets/brand/dbv-a-wordmark-letters.svg") no-repeat 0 0 / 100% 100%;
  mask: url("../assets/brand/dbv-a-wordmark-letters.svg") no-repeat 0 0 / 100% 100%;
}
.rl-brand__word::after {
  background-color: var(--color-text-muted); /* the Direction A grey "by" */
  -webkit-mask: url("../assets/brand/dbv-a-wordmark-by.svg") no-repeat 0 0 / 100% 100%;
  mask: url("../assets/brand/dbv-a-wordmark-by.svg") no-repeat 0 0 / 100% 100%;
}
.rl-brand__dot { /* the full stop, static (governance v1.1 EX-05); on exit the morph below takes its place */
  display: block;
  flex: none;
  width: calc(var(--logo-u) * 22);
  height: calc(var(--logo-u) * 22);
  margin: calc(var(--logo-u) * 80.5) 0 0 calc(var(--logo-u) * 6);
  border-radius: 50%;
  background: var(--brand-orange);
}
/* The dot-to-button morph: one orange shape, positioned each frame by bc-reel.js in root coordinates — from the full
   stop's place and size, to a circle of the button's height on the button's left cap, to the button itself (its radius,
   colour and label); the real button is hidden underneath until the handoff. */
.rl-morph {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
  background: var(--brand-orange);
  pointer-events: none;
  will-change: left, top, width, height, border-radius;
}
.rl-morph__label {
  white-space: nowrap;
  opacity: 0;
}
.rl__bar {
  opacity: var(--bgf, 1); /* the controls leave with the backdrop at the very end */
}
@media (forced-colors: active) {
  .rl-brand__word::before,
  .rl-brand__word::after,
  .rl-brand__dot {
    forced-color-adjust: none;
    background: CanvasText;
  }
}

/* ---- Visual micro-motion, all read from --p (0 → 1 over the entry and most of the hold) ---- */
.f-ink { fill: var(--rl-ink); }
.f-muted { fill: var(--rl-muted); }
.f-surface { fill: var(--rl-surface); }
.f-chip { fill: var(--rl-chip); }
.f-orange { fill: var(--rl-orange); }
.f-primary { fill: var(--rl-primary); }
.f-paper { fill: var(--rl-paper); }
.f-none { fill: none; }
.s-ink { stroke: var(--rl-ink); }
.s-muted { stroke: var(--rl-muted); }
.s-line { stroke: var(--rl-line); }
.s-orange { stroke: var(--rl-orange); }
.a2-dim { opacity: 0.55; }
.a1-tangle { opacity: calc(1 - var(--p, 1) * 0.72); }
.a1-line { stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p, 1)); }
.a1-node { opacity: clamp(0, calc((var(--p, 1) - var(--k) * 0.22) * 6), 1); }
.a1-arrow { opacity: clamp(0, calc(var(--p, 1) * 3), 1); }
.a2-bar { opacity: clamp(0, calc((var(--p, 1) - var(--k) * 0.18) * 5), 1); }
.a2-quote { font-family: var(--font-display); font-size: 72px; font-weight: 700; }
.a2-focus { opacity: clamp(0, calc((var(--p, 1) - 0.55) * 4), 1); }
.a3-comp { opacity: clamp(0, calc((var(--p, 1) - var(--k) * 0.16) * 4), 1); transform: scale(calc(0.96 + 0.04 * clamp(0, calc((var(--p, 1) - var(--k) * 0.16) * 4), 1))); transform-origin: center; transform-box: fill-box; }
.a3-slot { opacity: calc(1 - var(--p, 1)); }
.a4-check { opacity: clamp(0, calc((var(--p, 1) - 0.25 - var(--k) * 0.18) * 6), 1); }
.a4-approve { opacity: clamp(0.35, calc(0.35 + (var(--p, 1) - 0.75) * 3), 1); }
.a5-pin { opacity: clamp(0, calc((var(--p, 1) - 0.3) * 5), 1); }
.a5-ring { opacity: 0.55; }
.a5-note { opacity: clamp(0, calc((var(--p, 1) - 0.5) * 4), 1); }
.a5-label { font: 600 13px/1 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7; }
.a5-text { font: 500 16px/1 var(--font-body); }

/* ---- Controls: one quiet row at the bottom of the frame — Play/Pause, Skip intro, Music ---- */
.rl__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.6rem;
}
.rl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0 1.1rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text);
  font: 600 0.85rem/1 var(--font-body);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.rl-btn:hover {
  border-color: var(--color-text-muted);
}
.rl-btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.rl-btn[data-rl-toggle] .i-play,
.rl[data-state="paused"] .rl-btn[data-rl-toggle] .i-pause {
  display: none;
}
.rl[data-state="paused"] .rl-btn[data-rl-toggle] .i-play {
  display: block;
}
.rl-btn--icon {
  padding: 0;
  width: 44px;
}
.rl-btn--icon svg {
  width: 18px;
  height: 18px;
}
/* Music off (default): a static, soft orange reminder glow — "there is optional sound here" */
.rl-btn--music[aria-pressed="false"] {
  border-color: color-mix(in srgb, var(--brand-orange) 55%, var(--color-border-strong));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-orange) 22%, transparent), 0 0 16px 2px color-mix(in srgb, var(--brand-orange) 38%, transparent);
}
/* Music on: the glow goes; the pressed state reads through the border */
.rl-btn--music[aria-pressed="true"] {
  border-color: var(--color-text);
  box-shadow: none;
}
.rl-btn[data-rl-music] .i-on,
.rl-btn[data-rl-music][aria-pressed="true"] .i-off {
  display: none;
}
.rl-btn[data-rl-music][aria-pressed="true"] .i-on {
  display: block;
}
.rl__status {
  flex-basis: 100%;
  margin: 0;
  color: var(--color-text-muted);
  font: 600 0.8rem/1.3 var(--font-body);
  letter-spacing: 0.02em;
}
.rl__status:empty {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  .rl-scene {
    transform: none;
  }
  .rl-btn {
    transition: none;
  }
}
