/* The trip media (VA FILM V2, his final picks 25 Oct 2026, round 6): the tail fin section after Launch, the clouds
   behind Launch and the trip, the clouds and logo ending on the trip film, the stop motion band after At a glance.
   Built by media.js; colours from study/kit/assets/virgin-tokens.css and brand.css. Silent everywhere; Reduce motion
   or the rail's Still shows stills. */

/* ---- the light behind the clouds: a white wash under dark words, Virgin's darkest purple under light words ---- */
:root { --vm-wash: color-mix(in srgb, var(--va-white) 30%, transparent); }
:root[data-theme="dark"] { --vm-wash: color-mix(in srgb, var(--va-ground-white-dark) 62%, transparent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --vm-wash: color-mix(in srgb, var(--va-ground-white-dark) 62%, transparent); }
}

/* one silent loop: its still under a muted video that fades in once it plays */
.vm-v { position: absolute; inset: 0; overflow: hidden; }
.vm-v img, .vm-v video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.vm-v video { opacity: 0; transition: opacity var(--duration-flourish) var(--ease-default); }
.vm-v.is-on video { opacity: 1; }

/* ---- Cloud background: the loop drifts behind the whole section, under its words and cards ---- */
.cs .cs-middle .vm-host { position: relative; isolation: isolate; }
.vm-bg { z-index: -1; pointer-events: none; }
.vm-bg::after { content: ""; position: absolute; inset: 0; background: var(--vm-wash); }
/* its pause (media.js vaPause): the section's toggle lies on the clouds, under every word, link and control, so a tap
   on a press link, the film or its replay still goes to them; media.js lets a tap on the words pause too (his pick,
   14 Nov 2026) */
.cs .cs-middle .vm-host > .strip-motion-toggle { z-index: -1; }

/* ---- Pause (WCAG 2.2.2): a paused region holds its CSS loops too; Still has no toggle ---- */
[data-motion-paused="1"] .vo-row { animation-play-state: paused; }
html[data-motion="still"] .strip-motion-toggle { display: none; }

/* ---- Film ending: the cloud loop fades in over the trip film's last frame, the Virgin logo on it ---- */
.vm-fend { z-index: 3; opacity: 0; transition: opacity var(--duration-expressive) var(--ease-default); cursor: pointer; display: grid; place-items: center; }
.vm-fend.is-in { opacity: 1; }
.vm-fend .vm-logo { position: relative; z-index: 2; width: 30%; height: auto; }

/* ---- Tail fin: its own section after Launch, the Landed stop motion inside Virgin's fin on the coral ground ---- */
.vm-tf {
  --fw: 68; --fx: 25; --fy: 50; --ck: 1.6; --cy: 50; --cs: 0.5; --sh: 115;
  position: relative; z-index: 5; isolation: isolate; height: calc(var(--sh) * 1vh); min-height: 460px; /* lint-ok: the section height he tuned, from the mockup */
  background: var(--vb-coral); overflow-x: clip; overflow-y: visible;
}
@media (max-width: 767px) {
  .vm-tf { --fw: 118; --fx: 56; --fy: 71; --ck: 0.5; --cy: 72; --cs: 1; --sh: 100; min-height: 680px; margin-block: var(--space-700); } /* lint-ok: his phone layout height, from the mockup; his 56px gaps snapped to the 48 step */
}
/* inside Every state (his review 26 Oct): full width under the heading, half the room above and below the fin */
.vm-tf.vm-tf--in { --fy: 50; --cy: 50; height: calc(var(--vm-need, 0px) + 2 * var(--vm-room, var(--space-700))); min-height: 0; margin-inline: calc(50% - 50vw); z-index: 1; } /* media.js sets the exact bleed to the section's edges */
.vm-tf[data-ground="none"], .vm-states-coral .vm-tf { background: none; }
:root .cs-middle #states.vm-states-coral {
  background: var(--vb-coral); /* over the plate and brand grounds */
  /* the light ground takes dark words, so the heading and board labels keep AA contrast */
  --color-text-primary: var(--va-ink); --color-text-secondary: var(--va-ink); --color-text-tertiary: color-mix(in srgb, var(--va-ink) 80%, transparent);
  color: var(--va-ink);
}
/* Virgin red reads at 2.2:1 on the light coral, under the 3:1 big type needs: the count goes dark too */
:root .cs-middle #states.vm-states-coral .tot b { color: var(--va-ink); }
@media (max-width: 1023px) {
  .vm-tf.vm-tf--in { --ck: 1; margin-block: 0; }
}
/* inside Every state (his note 27 Oct, chat EVERY STATE): on phones the fin sits centred, not pushed right;
   on tablets it is 20% bigger with the same cut on the left */
@media (max-width: 767px) { .vm-tf.vm-tf--in { --fx: 50; } }
@media (min-width: 768px) and (max-width: 1023px) { .vm-tf.vm-tf--in { --fw: 82; --fx: 32; } }
/* its id is for the review rail; the study's section pacing (frame.css) never pads it: no added space, his pick */
:root .cs-middle section.vm-tf.vm-tf[id] { padding-block: 0; }
/* At a glance's moving card rows, copied, running behind the fin; they keep their own cut so the page never scrolls sideways */
.vm-tf-cards { position: absolute; z-index: 1; left: 0; right: 0; top: calc(var(--cy) * 1%); transform: translateY(-50%); --vo-speed: var(--cs); pointer-events: none; overflow-x: clip; overflow-y: visible; } /* the card shadows run free top and bottom (his note 26 Oct) */
.vm-tf-ci { zoom: var(--ck); display: flex; flex-direction: column; gap: var(--space-500); }
.vm-tf-ci .vo-row { position: relative; left: auto; top: auto; }
.vm-tf-fin { position: absolute; z-index: 2; left: calc(var(--fx) * 1%); top: calc(var(--fy) * 1%); width: calc(var(--fw) * 1%); aspect-ratio: 515 / 395; transform: translate(-50%, -50%); -webkit-mask: url("../brand/tailfin.svg") center / 100% 100% no-repeat; mask: url("../brand/tailfin.svg") center / 100% 100% no-repeat; }
.vm-tf-fin img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.vm-tf-fin img.on { opacity: 1; }

@media (max-width: 767px) {
  .vm-fend .vm-logo { width: 40%; }
}

/* the tail fin tuner (review only): the opening tuner's look, pinned in the section's own corner, never over the panel */
.vm-tf .vo-tune.vm-tune { position: absolute; top: var(--space-400); right: var(--space-400); left: auto; bottom: auto; transform: none; z-index: 6; pointer-events: auto; }
.vm-tune .vm-tune-btns { display: flex; gap: var(--space-300); }
