/* The Virgin brand uplift (VA BRAND, built 25 Oct 2026 from his Wonderful preset, round 6 picks).
   Colours live in study/kit/assets/virgin-tokens.css. Loaded last on the page, after every section's sheet,
   so a tie goes to the brand. :not(#vb) adds one id's weight where a section's own rule would otherwise win
   (the mockup's review rail carried the same weight). The site header and Next footer keep the site look. */

/* the study's colours (virgin-tokens.css), picked per theme */
:root {
  --vb-ground-pink: var(--va-ground-pink);
  --vb-ground-lilac: var(--va-ground-lilac);
  --vb-ground-blush: var(--va-ground-blush);
  --vb-ground-white: var(--va-white);
  --vb-ground-plum: var(--va-purple);    /* G Dark purple */
  --vb-code: var(--va-purple-70);        /* the launch codes */
  --vb-route: var(--va-red);             /* the route line */
  --vb-dawn: linear-gradient(20deg, var(--va-red) 0%, var(--va-rose) 70%, var(--va-pink) 100%); /* DS Gradients/Primary/Dawn */
  --vb-coral: linear-gradient(180deg, var(--va-coral-1) 0%, var(--va-coral-2) 28%, var(--va-coral-3) 56%, var(--va-coral-4) 83%, var(--va-coral-5) 100%);
}
:root[data-theme="dark"] {
  --vb-ground-pink: var(--va-ground-pink-dark);
  --vb-ground-lilac: var(--va-ground-lilac-dark);
  --vb-ground-blush: var(--va-ground-blush-dark);
  --vb-ground-white: var(--va-ground-white-dark);
  --vb-ground-plum: var(--va-ground-plum-dark);
  --vb-code: var(--va-pink-brand);
  --vb-route: var(--va-pink-brand);      /* red all but vanishes on dark purple; G pairs Pink on Purple */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --vb-ground-pink: var(--va-ground-pink-dark);
    --vb-ground-lilac: var(--va-ground-lilac-dark);
    --vb-ground-blush: var(--va-ground-blush-dark);
    --vb-ground-white: var(--va-ground-white-dark);
    --vb-ground-plum: var(--va-ground-plum-dark);
    --vb-code: var(--va-pink-brand);
    --vb-route: var(--va-pink-brand);
  }
}

/* ---- Grounds: one pale Virgin ground per section, full bleed; My part in Virgin dark purple ---- */
.cs .cs-middle { background: var(--vb-ground-white); }
.cs .cs-middle #story { background: var(--vb-ground-pink); }
/* My part's resting carousel dots (the computer row and the tablet nav both read --color-dot-inactive): the home page's
   light dot grey is only 3.0:1 on this purple, so My part takes the grey the home page uses in dark mode, 6.6:1. It
   was white at 30%, 2.5:1 (WCAG 1.4.11; 8 Nov 2026, chat VIRGIN DOTS). */
.cs .cs-middle #mypart { background: var(--vb-ground-plum); --color-dot-inactive: var(--neutral-500); }
/* the focus ring takes the text colour of its ground (study/kit.css, his note 25 Oct): on the dark purple that is the
   white of the card arrows, so the ring round the cards, their dots and the arrows shows (8 Nov 2026, chat VIRGIN
   A11Y: the page ink ring measured 1.04:1 on the purple, WCAG 2.4.7 and 1.4.11). The cards inside keep the ink ring. */
.cs .cs-middle #mypart .vj2-ctrl :focus-visible, .cs .cs-middle #mypart .vj2-cards:focus-visible { outline-color: var(--color-on-ink-emphasis); }
.cs .cs-middle #turn, .cs .cs-middle #fix { background: var(--vb-ground-white); }
.cs .cs-middle #trip { background: var(--vb-ground-lilac); }
.cs .cs-middle #sizes { background: var(--vb-ground-blush); }
.cs .cs-middle #system { background: var(--vb-ground-white); }
.cs .cs-middle #android { background: var(--vb-ground-pink); }
.cs .cs-middle #launch { background: var(--vb-ground-white); }
.cs .cs-middle #states { background: var(--vb-ground-blush); }
.cs .cs-middle #states.vj-plate { --color-surface-sunken: transparent; }
/* light only: on Lilac the grey labels (4.28) and red stage tags (3.77) fail, so they step up to the darker grey
   and Virgin purple */
:root[data-theme="light"] .cs .cs-middle #trip { --color-text-tertiary: var(--color-text-secondary); --client-text: var(--va-purple-70); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .cs .cs-middle #trip { --color-text-tertiary: var(--color-text-secondary); --client-text: var(--va-purple-70); }
}

/* ---- Headlines: Virgin sets headlines with no full stop. His words stay; brand.js wraps the last stop ---- */
.vb-stop { display: none; }
.cs .cs-middle > section.vj h2:not(#vb) { text-wrap: balance !important; }

/* ---- Hero card: holds on the film as the page scrolls, stops level with the last line of the words, then a
   small gap and the facts row (brand.js sets --vb-hy and --vb-room) ---- */
:root[data-vpz="card"] .vs-hside:not(#vb) { transform: translateY(var(--vb-hy, 0px)); }
:root[data-vsh][data-vpz="card"] .cs .cs-intro .cs-facts:not(#vb) { margin-top: var(--vb-room, 0px); }

/* ---- At a glance band: one Dawn gradient from under the phones to the numbers, sized to the two together
   (brand.js sets --vb-band-h), the red layer its top, At a glance its foot ---- */
html:root .cs .cs-part.cs-numbers[data-part="numbers"]:not(#vb) {
  --cs-num-bg: var(--vb-dawn);
  background: var(--vb-dawn) 0 100% / 100% var(--vb-band-h, 100%) no-repeat;
}
html:root .cs-intro > .vo-red:not(#vb) {
  background: var(--vb-dawn) 0 0 / 100% var(--vb-band-h, 100%) no-repeat !important;
}
/* the numbers count up as the band arrives (brand.js, his note 27 Oct), so each label and tag follows its number
   straight away instead of waiting out the frame's reveal delay */
@media (prefers-reduced-motion: no-preference) {
  .cs .cs-numbers .cs-stat:not(#vb) :is(.cs-after, .cs-stat-label, .cs-tag) { transition-delay: var(--t0, 0ms); }
}

/* ---- Trip stages, staggered: one stage per row, a big tailfin window, its coded card beside it, the words under
   the card; sides alternate. The fin is the DS tailfin as a mask. His note 26 Oct 2026 (chat VA TRIP CARDS): the card
   and the words hug the fin (no column gap; the words reach into the fin's empty corner, Landed and At the airport
   right aligned toward it), and the card fills its column, bleeding out of the coral band (film.css) ---- */
:root .cs .cs-middle #trip:not(#vb) { overflow-x: clip; }
:root .cs #trip .vs-tiles:not(#vb) { grid-template-columns: minmax(0, 1fr); gap: var(--space-900); }
/* the first fin sat 16px under the heading (his note 25 Oct, VA FIXES: "way too close"): the same room as between stages */
:root .cs #trip .vs-steps:not(#vb) { margin-top: var(--space-900); }
:root .cs #trip .vs-tile:not(#vb) {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "fin card" "fin words";
  gap: var(--space-500) 0; align-content: center;
}
:root .cs #trip .vs-tile:nth-child(even):not(#vb) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "card fin" "words fin"; }
:root .cs #trip .vs-tile .vs-pic:not(#vb) {
  grid-area: fin; align-self: center; z-index: 1;
  -webkit-mask: url(tailfin.svg) center / 100% 100% no-repeat; mask: url(tailfin.svg) center / 100% 100% no-repeat;
  aspect-ratio: 515 / 395; border-radius: 0;
}
:root .cs #trip .vs-tile .vf-cards:not(#vb) { grid-area: card; align-self: end; margin-top: 0; }
/* the band: the clips' old lilac to coral ground, edge to edge (border-image outset paints past the box, never into layout) */
:root .cs #trip .vs-tile .vf-band:not(#vb) { border-image: var(--vb-coral) fill 0 / 0 / 0 100vw; }
/* fin on the left: the card starts at the fin's tip; fin on the right: the card tucks into the fin's empty top corner */
:root .cs #trip .vs-tile:nth-child(odd) .vf-cc:not(#vb) { margin-left: calc(-1 * var(--space-700)); } /* round 2: over the fin's corner */
:root .cs #trip .vs-tile:nth-child(even) .vf-cc:not(#vb) { margin-left: auto; margin-right: calc(-1 * var(--space-800)); }
/* round 2: the stage words read as a heading (the type ladder sets its rungs inline, so the rungs change here) */
:root .cs #trip .vs-tile .vs-words:not(#vb) { grid-area: words; align-self: start; position: relative; z-index: 2; --cs-rung-label: var(--size-sm); --cs-rung-body: var(--size-2xl); }
:root .cs #trip .vs-tile .vs-t:not(#vb) { margin-top: var(--space-100); }
:root:not([data-vsbd="tall"], [data-vsbd="thin"]) .cs #trip .vs-tile .vf-band:not(#vb) { display: none; } /* his pick 26 Oct: no band unless a band option is on */
:root .cs #trip .vs-tile:nth-child(odd) .vs-words:not(#vb) { margin-left: calc(-14% - var(--vf-reach, 0px)); } /* lint-ok: a share of the column, so the reach into the fin's empty corner scales with the fin */
:root .cs #trip .vs-tile:nth-child(even) .vs-words:not(#vb) { text-align: right; margin-right: calc(-28% - var(--vf-reach, 0px)); } /* lint-ok: a share of the column, as above */
:root .cs #trip .vs-tile:nth-child(even) .vs-t:not(#vb) { margin-left: auto; }
/* At the airport: the traveller sits right of centre in the photo, so the fin crops to him */
:root .cs #trip .vs-tile:nth-child(2) .vs-pic :is(img, video):not(#vb) { object-position: 100% 50%; }
@media (max-width: 767px) {
  :root .cs #trip .vs-tiles:not(#vb) { gap: var(--card-stack-gap); } /* the phone stack's room to read (his pick, 9 Nov 2026) */
  :root .cs #trip .vs-tile:not(#vb), :root .cs #trip .vs-tile:nth-child(even):not(#vb) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "fin" "card" "words"; row-gap: var(--space-400); }
  :root .cs #trip .vs-tile:nth-child(n) :is(.vf-cc, .vs-words, .vs-t):not(#vb) { margin-inline: 0; text-align: left; }
  :root .cs #trip .vs-tile .vs-words:not(#vb) { --cs-rung-body: var(--size-xl); }
}

/* ---- Stage marks: the Journey Tracker's own state icons from the kit in place of the red dot, in the tag's purple ---- */
:root .cs #trip .vs-tag:not(#vb)::before {
  width: var(--space-400); height: var(--space-400); border-radius: 0; background: currentColor;
  -webkit-mask: var(--vb-mark) center / contain no-repeat; mask: var(--vb-mark) center / contain no-repeat;
}
:root .cs #trip .vs-tile:nth-child(1) .vs-tag { --vb-mark: url(../study/kit/assets/di/checkin-ticket.svg); }
:root .cs #trip .vs-tile:nth-child(2) .vs-tag { --vb-mark: url(../study/kit/assets/di/door.svg); }
:root .cs #trip .vs-tile:nth-child(3) .vs-tag { --vb-mark: url(../study/kit/assets/di/inflight-purple.svg); }
:root .cs #trip .vs-tile:nth-child(4) .vs-tag { --vb-mark: url(../study/kit/assets/di/landed-white.svg); }

/* ---- Route line: the DS pathfinder, line and plane in one drawing (DS 2194:2849). Out the side: pathfinder 9
   runs flat from The trip label, passes behind the film's bottom right corner and comes out beside it ---- */
.vb-pf { position: absolute; z-index: 3; pointer-events: none; color: var(--va-red); }
.vb-pf svg { display: block; width: 100%; height: auto; overflow: visible; }
.cs #trip .vf-place.vf-film .vf-in { position: relative; }
.cs #trip .vf-in:has(.vb-pf-film) .vf-frame { position: relative; z-index: 1; }
.vb-pf.vb-pf-film { z-index: 0; color: var(--vb-route); }

/* ---- Launch cities: Brisbane, Melbourne and Sydney as airport codes, pathfinder 6 climbing behind them and in front
   of one letter it crosses. Since 2 Nov 2026 they run under the words of his tail fin card (09-launch section.css,
   .vj9f-codes), which sets their size, fill and the plane's place ---- */
.vb-codes-in { position: relative; }
.vb-codes-word { margin: 0; display: grid; font: 400 clamp(4rem, 8.6vw, 8.25rem) / 0.86 var(--font-display, "Anton", sans-serif); color: var(--vb-code); letter-spacing: 0; } /* lint-ok: display size from the mockup he picked */
.vb-codes-word i { font-style: normal; }
.vb-codes-top { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.vb-codes-top i.on { color: transparent; }
.vb-codes .vb-pf { z-index: 3; }
