/* Tirqo home, section one only (round H1): the car on stage. The poster is what loads first and what stays when the
   live scene cannot run (reduced motion, Save-Data, no WebGL2); the canvas fades in over it once its first frame is
   drawn (Scripts/hero/tq.home.hero.js). The stage's own rules (tq.carbon.css: .tqc-stage__scene, the veil, the room
   and its pin) stay as they are. */
[data-tq-hero] .tqh-poster,
[data-tq-hero] .tqh-poster img {
  position: absolute;
  inset: 0;
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: 70% 62%;
}
[data-tq-hero] .tqh-gl {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  inline-size: 100%;
  block-size: 100%;
  opacity: 0;
  transition: opacity 900ms var(--tq-ease, ease);
}
[data-tq-hero].is-live .tqh-gl { opacity: 1; }
/* the car brings its own light: the old wheel's ember stays off */
[data-tq-hero] .tqc-stage__ember { display: none; }
/* a phone or a tablet: the scene is the band above the words, the car in its middle */
@container tqc-stage (max-width: 1099px) {
  [data-tq-hero] .tqh-poster img { object-position: 50% 60%; }
}
@media (prefers-reduced-motion: reduce) {
  [data-tq-hero] .tqh-gl { transition: none; }
}
@media (forced-colors: active) {
  [data-tq-hero] .tqh-gl { display: none; }
}

/* ── Round H2b · the first second ─────────────────────────────────────────
   Nothing on the stage waits for a script. The rain light blinks on the
   poster from the first paint (it sits on the picture's own rain light, by
   the poster's cover maths, the way the room pins its pin), and the rev
   line under the header revs up on its own; once the script is reading the
   car file it shows the real download (--tqh-load), and when the car is
   drawn the canvas covers the blink and the line runs out. */
[data-tq-hero] .tqh-blink {
  --iw: 1920; --ih: 1080; --ox: .7; --oy: .62;     /* the poster on show and its object-position */
  --bx: .9247; --by: .5282; --bw: .022;              /* the rain light, in fractions of that poster */
  --s: max(100cqw / var(--iw), 100cqh / var(--ih));
  position: absolute;
  z-index: 0;
  left: calc((100cqw - var(--iw) * var(--s)) * var(--ox) + var(--bx) * var(--iw) * var(--s));
  top: calc((100cqh - var(--ih) * var(--s)) * var(--oy) + var(--by) * var(--ih) * var(--s));
  inline-size: calc(var(--bw) * var(--iw) * var(--s));
  aspect-ratio: 2 / 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(255 70 46 / .95), rgb(255 36 20 / .5) 42%, rgb(255 24 12 / 0));
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  animation: tqh-blink 400ms steps(1, end) 450ms infinite;
}
@keyframes tqh-blink { 0% { opacity: 1; } 50% { opacity: .06; } }
[data-tq-hero] .tqh-rev {
  position: absolute;
  z-index: 3;
  inset-inline: 0;
  top: var(--tqc-head-h, 76px);
  block-size: 2px;
  background: linear-gradient(90deg, rgb(231 82 53 / 0), rgb(231 82 53 / .9) 38%, #ff9b6e);
  transform-origin: 0 50%;
  transform: scaleX(var(--tqh-load, 0));
  pointer-events: none;
  animation: tqh-rev-idle 9s cubic-bezier(.2, .8, .2, 1) 250ms both;
  transition: transform 240ms ease-out, opacity 600ms ease;
}
@keyframes tqh-rev-idle {
  0% { transform: scaleX(0); opacity: 1; }
  70% { transform: scaleX(.3); opacity: 1; }
  100% { transform: scaleX(.32); opacity: 0; }
}
[data-tq-hero].has-load .tqh-rev { animation: none; }
[data-tq-hero].is-live .tqh-rev { transform: scaleX(1); opacity: 0; transition: transform 200ms ease-out, opacity 700ms ease 200ms; }
[data-tq-hero][data-state="still"] .tqh-blink,
[data-tq-hero][data-state="still"] .tqh-rev { display: none; }
@container tqc-stage (max-width: 1099px) {
  [data-tq-hero] .tqh-blink { --iw: 1080; --ih: 700; --ox: .5; --oy: .6; --bx: .7474; --by: .512; --bw: .03; }
}
@media (prefers-reduced-motion: reduce) {
  [data-tq-hero] .tqh-blink,
  [data-tq-hero] .tqh-rev { display: none; }
}
@media (forced-colors: active) {
  [data-tq-hero] .tqh-blink,
  [data-tq-hero] .tqh-rev { display: none; }
}

/* ── Round H2b · a phone held upright: the scene is the first screen ──────
   Seen low from behind, the car fills the width above the words (the
   script frames it there); the words sit over the scene's lower part on a
   dark fade, and the rest of the section follows on the ground. */
.tqh-stage { --tqh-ph: max(100svh, 560px); }
@media (orientation: portrait) {
  @container tqc-stage (max-width: 640px) {
    .tqh-stage .tqc-stage__frame { padding-block-start: calc(var(--tqh-ph) * .42); }
    .tqh-stage .tqc-stage__scene {
      position: absolute;
      inset: 0 0 auto;
      z-index: 0;
      order: 0;
      block-size: var(--tqh-ph);
      margin: 0;
    }
    .tqh-stage .tqc-stage__veil {
      background: linear-gradient(180deg,
        color-mix(in srgb, var(--tqc-ground) 70%, transparent) 0%,
        color-mix(in srgb, var(--tqc-ground) 0%, transparent) 14%,
        color-mix(in srgb, var(--tqc-ground) 0%, transparent) 38%,
        color-mix(in srgb, var(--tqc-ground) 80%, transparent) 56%,
        var(--tqc-ground) 96%);
    }
    .tqh-stage .tqc-stage__room { left: 0; top: 0; inline-size: 100cqw; block-size: 100cqh; }
    .tqh-stage .tqc-stage__pin { left: 16px; top: calc(var(--tqc-head-h) + 12px); }
    [data-tq-hero] .tqh-poster img { object-position: 43% 24.8%; }
    [data-tq-hero] .tqh-blink { --iw: 1080; --ih: 2340; --ox: .43; --oy: .248; --bx: .6729; --by: .1979; --bw: .1; }
    .tqh-title { --tqh-gx: 0em; --tqh-gy: -.06em; }
  }
}

/* ── Round H2b · the headline acts out its sentence ───────────────────────
   Its letters are written in the page (Home.aspx), so this needs no script
   and starts with the first paint. Born from the smoke: each letter
   condenses out of a blur into place. With the live scene (classes the
   script puts on the stage): every flash of the rain lights throws red on
   the letters' side that faces the car; while the tyres are hot "smoke"
   smoulders from below (--tqh-heat) and wisps rise off it; when the smoke
   has cleared a light runs through "clears." and the full stop lands.
   Reduced motion: the plain headline. */
.tqh-title { --tqh-gx: .06em; --tqh-gy: 0em; }
.tqh-title .tqh-w { display: inline-block; white-space: nowrap; }
.tqh-title .tqh-l {
  display: inline-block;
  animation: tqh-condense 1150ms cubic-bezier(.16, .84, .24, 1) calc(var(--d, 0) * 1ms) backwards;
  transition: text-shadow 120ms linear;
}
.tqh-title .tqh-w--smoke .tqh-l { animation-name: tqh-condense-deep; animation-duration: 1500ms; }
@keyframes tqh-condense {
  0% { opacity: 0; filter: blur(.22em); transform: translate3d(calc(var(--x, 0) * 1em), calc(var(--y, .2) * 1em), 0) scale(1.12); }
  45% { opacity: .72; filter: blur(.05em); }
  100% { opacity: 1; filter: blur(0); transform: none; }
}
@keyframes tqh-condense-deep {
  0% { opacity: 0; filter: blur(.34em); transform: translate3d(calc(var(--x, 0) * 1.6em), calc(var(--y, .2) * 1.6em), 0) scale(1.3); }
  50% { opacity: .62; filter: blur(.08em); }
  100% { opacity: 1; filter: blur(0); transform: none; }
}
/* once settled (the script marks it) the letters keep no animation, so a later moment never replays the entrance */
.tqh-title.tqh-settled .tqh-l { animation: none; }

.tqh-flash .tqh-title .tqh-l {
  text-shadow:
    calc(var(--tqh-gx) * .5) calc(var(--tqh-gy) * .5) .015em rgb(255 64 36 / .6),
    var(--tqh-gx) var(--tqh-gy) .26em rgb(255 32 16 / .2);
}

.tqh-burn .tqh-title .tqh-w--smoke .tqh-l {
  color: transparent;
  background-image: linear-gradient(0deg, #ff4d14 0%, #ff9a4d calc(var(--tqh-heat, 0) * 42%), var(--tqc-ink-1) calc(var(--tqh-heat, 0) * 78% + 6%));
  -webkit-background-clip: text;
  background-clip: text;
}
.tqh-title .tqh-w--smoke { position: relative; }
.tqh-title .tqh-w--smoke::before,
.tqh-title .tqh-w--smoke::after {
  content: "";
  position: absolute;
  left: 4%;
  bottom: 42%;
  inline-size: 62%;
  block-size: .9em;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(214 218 228 / .32), rgb(214 218 228 / 0));
  filter: blur(.12em);
  opacity: 0;
  pointer-events: none;
}
.tqh-title .tqh-w--smoke::after { left: 36%; }
.tqh-burn .tqh-title .tqh-w--smoke::before { animation: tqh-wisp 2.4s ease-out infinite; }
.tqh-burn .tqh-title .tqh-w--smoke::after { animation: tqh-wisp 2.4s ease-out 1.2s infinite; }
@keyframes tqh-wisp {
  0% { opacity: 0; transform: translate3d(0, .25em, 0) scale(.5); }
  30% { opacity: calc(.4 + var(--tqh-heat, 0) * .6); }
  100% { opacity: 0; transform: translate3d(.35em, -1em, 0) scale(1.6, 1.3); }
}

.tqh-title .tqh-stop { display: inline-block; color: rgb(var(--tqc-signal-rgb, 231 82 53)); }
.tqh-clear .tqh-title.tqh-settled .tqh-w--clears .tqh-l {
  color: transparent;
  background: linear-gradient(100deg, var(--tqc-ink-1) 0 35%, #fff 46%, #ffc9ae 50%, #fff 54%, var(--tqc-ink-1) 65% 100%) 100% 0 / 300% 100% no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  animation: tqh-glint 900ms cubic-bezier(.3, .6, .2, 1) calc(var(--i, 0) * 55ms) both;
}
.tqh-clear .tqh-title.tqh-settled .tqh-stop .tqh-l { color: inherit; background: none; animation: none; }
.tqh-clear .tqh-title .tqh-stop { animation: tqh-stamp 820ms cubic-bezier(.2, 1.5, .35, 1) 420ms both; }
@keyframes tqh-glint { from { background-position: 100% 0; } to { background-position: 0% 0; } }
@keyframes tqh-stamp {
  0% { transform: scale(1); }
  24% { transform: scale(1.9); text-shadow: 0 0 .4em rgb(231 82 53 / .8); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .tqh-title .tqh-l,
  .tqh-title .tqh-w,
  .tqh-title .tqh-stop { animation: none !important; transition: none !important; }
  .tqh-title .tqh-w--smoke::before,
  .tqh-title .tqh-w--smoke::after { display: none; }
}
@media (forced-colors: active) {
  .tqh-title .tqh-l { background: none !important; color: CanvasText !important; text-shadow: none !important; }
  .tqh-title .tqh-w--smoke::before,
  .tqh-title .tqh-w--smoke::after { display: none; }
}

/* ── Round H3 · the smoke becomes the bookings ────────────────────────────
   Four of a morning's moments, in the stage's own glass cards. The script
   gathers the burnout's smoke into each card's shape and the card condenses
   in where the smoke was; the newest is lit; the deck dissolves like smoke
   before the next burnout. On a desk it is a stack pinned in the world above
   the car's tail (the script moves it with the camera); on a tablet or a
   phone, the first two cards sit side by side under the header. The still
   quote pin is kept for whenever the live scene cannot run. */
[data-tq-hero] .tqh-deck { display: none; }
[data-tq-hero].is-live .tqh-deck {
  position: absolute;
  z-index: 3;
  left: 0;
  top: 0;
  display: grid;
  gap: 10px;
  inline-size: 300px;
  pointer-events: none;
}
[data-tq-hero].tqh-deal:not([data-state="still"]) .tqc-stage__pin { display: none; }
[data-tq-hero] .tqh-deck .tqc-live { inline-size: auto; max-inline-size: none; }
.tqh-card {
  opacity: 0;
  filter: blur(14px);
  transform: translate3d(22px, -10px, 0) scale(1.05);
  transition: opacity 700ms ease, filter 800ms ease, transform 1000ms cubic-bezier(.16, .84, .24, 1);
}
.tqh-card.is-in { opacity: 1; filter: blur(0); transform: none; }
.tqh-card.is-out {
  opacity: 0;
  filter: blur(16px);
  transform: translate3d(-8px, -26px, 0) scale(1.06);
  transition-duration: 900ms, 900ms, 1100ms;
}
@container tqc-stage (max-width: 1099px) {
  [data-tq-hero].is-live .tqh-deck {
    top: calc(var(--tqc-head-h) + 10px);
    left: 12px;
    right: 12px;
    inline-size: auto;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  [data-tq-hero] .tqh-deck .tqh-card:nth-child(n + 3) { display: none; }
}
@container tqc-stage (max-width: 640px) {
  [data-tq-hero] .tqh-deck .tqc-live { grid-template-columns: minmax(0, 1fr); gap: 1px; padding: 8px 10px; }
  [data-tq-hero] .tqh-deck .tqc-live__icon { display: none; }
  [data-tq-hero] .tqh-deck .tqc-live__name,
  [data-tq-hero] .tqh-deck .tqc-live__line { grid-column: 1; overflow: hidden; text-overflow: ellipsis; }
  [data-tq-hero] .tqh-deck .tqc-live__name { font-size: 13px; }
  [data-tq-hero] .tqh-deck .tqc-live__line { font-size: 12px; }
  [data-tq-hero] .tqh-deck .tqc-live__time { display: none; }
}
/* the headline's "Booked" lights up as the booked card lands */
.tqh-booked .tqh-title.tqh-settled .tqh-w:first-child { animation: tqh-lit 1500ms cubic-bezier(.3, .6, .2, 1) both; }
@keyframes tqh-lit {
  0% { text-shadow: 0 0 0 rgb(255 255 255 / 0); }
  30% { color: #fff; text-shadow: 0 0 .22em rgb(255 255 255 / .45), 0 0 .6em rgb(255 150 110 / .4); }
  100% { text-shadow: 0 0 0 rgb(255 255 255 / 0); }
}
@media (prefers-reduced-motion: reduce) {
  .tqh-card { transition: none; }
  .tqh-booked .tqh-title .tqh-w:first-child { animation: none; }
}

/* ── Round H4 · the crewless pit stop ─────────────────────────────────────
   The pit board times the stop: it lives in the deck (so it is pinned over
   the car on a desk, and under the header on a tablet or a phone) and
   condenses in as the bookings dissolve; its clock runs from the lift to
   the landing, each corner lights as its wheel locks, and the time turns
   signal orange when the car is down. The stock tag points at a tire: a dot
   on it, a line to its card; the script places the dot and the line (and
   the card beside the tire, .is-pinned), the card otherwise sits under the
   header on a tablet or a phone. Neither shows without the live scene. */
[data-tq-hero] .tqh-pit,
[data-tq-hero] .tqh-tag { display: none; }
[data-tq-hero].is-live .tqh-pit { display: grid; }
[data-tq-hero].is-live .tqh-tag { display: block; }
.tqh-pit {
  position: absolute;
  left: 0;
  top: 0;
  inline-size: 100%;
  box-sizing: border-box;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "head head" "time tires";
  align-items: end;
  gap: 8px 14px;
  padding: 12px 14px 14px 16px;
  border-radius: var(--tqc-r-md);
  background: linear-gradient(180deg, var(--tqc-raised), var(--tqc-ground) 82%);
  box-shadow: inset 0 0 0 1px var(--tqc-line-2), inset 0 1px 0 rgb(var(--tq-white-rgb) / .05), var(--tqc-lift);
  opacity: 0;
  filter: blur(14px);
  transform: translate3d(22px, -10px, 0) scale(1.05);
  transition: opacity 700ms ease, filter 800ms ease, transform 1000ms cubic-bezier(.16, .84, .24, 1);
}
.tqh-pit.is-in { opacity: 1; filter: blur(0); transform: none; }
.tqh-pit.is-out {
  opacity: 0;
  filter: blur(16px);
  transform: translate3d(-8px, -26px, 0) scale(1.06);
  transition-duration: 900ms, 900ms, 1100ms;
}
.tqh-pit__head {
  grid-area: head;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--tqc-ink-5);
  font-family: var(--tqc-read);
  font-size: 13px;
  font-weight: var(--tq-fw-semibold);
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
}
.tqh-pit__time {
  grid-area: time;
  color: var(--tqc-ink-1);
  font-family: var(--tqc-read);
  font-size: 46px;
  font-weight: var(--tq-fw-bold);
  line-height: .9;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tqh-pit__time b { font-weight: inherit; }
.tqh-pit__time small { margin-inline-start: 4px; color: var(--tqc-ink-4); font-size: .42em; letter-spacing: .08em; }
.tqh-pit.is-done .tqh-pit__time b { color: var(--tqc-lit); animation: tqh-pit-done 1200ms cubic-bezier(.3, .6, .2, 1) both; }
@keyframes tqh-pit-done {
  0% { text-shadow: 0 0 0 rgb(var(--tqc-lit-rgb) / 0); }
  25% { text-shadow: 0 0 .32em rgb(var(--tqc-lit-rgb) / .75); }
  100% { text-shadow: 0 0 0 rgb(var(--tqc-lit-rgb) / 0); }
}
.tqh-pit__tires { grid-area: tires; display: grid; grid-template-columns: repeat(2, auto); gap: 4px; }
.tqh-pit__w {
  display: grid;
  place-items: center;
  min-inline-size: 30px;
  padding: 3px 0 2px;
  border-radius: 6px;
  background: rgb(var(--tq-black-rgb) / .5);
  box-shadow: inset 0 0 0 1px var(--tqc-line-2);
  color: var(--tqc-ink-5);
  font-family: var(--tqc-read);
  font-size: 12px;
  font-style: normal;
  font-weight: var(--tq-fw-semibold);
  letter-spacing: .06em;
  line-height: 1.1;
  transition: color 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
}
.tqh-pit__w.is-on {
  color: #fff;
  background: rgb(var(--tqc-signal-rgb) / .85);
  box-shadow: inset 0 0 0 1px rgb(var(--tqc-lit-rgb) / .6), 0 0 14px rgb(var(--tqc-signal-rgb) / .55);
}

.tqh-tag { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.tqh-tag__dot {
  position: absolute;
  left: 0;
  top: 0;
  inline-size: 16px;
  block-size: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  translate: var(--dx, -40px) var(--dy, -40px);
  background: radial-gradient(circle, #fff 0 2px, rgb(var(--tqc-lit-rgb) / .95) 3px 4px, rgb(var(--tqc-signal-rgb) / .25) 5px, rgb(var(--tqc-signal-rgb) / 0) 8px);
  box-shadow: 0 0 0 1.5px rgb(var(--tqc-lit-rgb) / .9), 0 0 18px 4px rgb(var(--tqc-signal-rgb) / .45);
  opacity: 0;
  scale: .4;
  transition: opacity 300ms ease, scale 520ms cubic-bezier(.2, 1.5, .35, 1);
}
.tqh-tag__line {
  position: absolute;
  left: 0;
  top: 0;
  inline-size: var(--ll, 0px);
  block-size: 1.5px;
  margin-block-start: -.75px;
  transform-origin: 0 50%;
  translate: var(--lx, 0px) var(--ly, 0px);
  rotate: var(--la, 0deg);
  background: linear-gradient(90deg, rgb(var(--tqc-lit-rgb) / .2), rgb(var(--tqc-lit-rgb) / .9));
  opacity: 0;
  transition: opacity 300ms ease 140ms;
}
.tqh-tag__card {
  position: absolute;
  left: 0;
  top: 0;
  translate: var(--cx, 0px) var(--cy, 0px);
  opacity: 0;
  filter: blur(14px);
  transform: translate3d(0, 12px, 0) scale(1.04);
  transition: opacity 600ms ease, filter 700ms ease, transform 900ms cubic-bezier(.16, .84, .24, 1);
}
.tqh-tag.is-in .tqh-tag__dot { opacity: 1; scale: 1; }
.tqh-tag.is-in .tqh-tag__line { opacity: 1; }
.tqh-tag.is-in .tqh-tag__card { opacity: 1; filter: blur(0); transform: none; }
.tqh-tag.is-out .tqh-tag__card { filter: blur(16px); transform: translate3d(0, -18px, 0) scale(1.05); transition-duration: 800ms, 800ms, 1000ms; }
.tqh-tag.is-out .tqh-tag__line { transition-delay: 0ms; }
/* a tablet or a phone: the board and (by itself) the tag's card take the strip under the header in turn */
@container tqc-stage (max-width: 1099px) {
  [data-tq-hero] .tqh-pit { inline-size: min(100%, 420px); }
  [data-tq-hero] .tqh-tag:not(.is-pinned) .tqh-tag__card { translate: none; left: 12px; top: calc(var(--tqc-head-h) + 10px); }
}
@container tqc-stage (max-width: 640px) {
  [data-tq-hero] .tqh-pit {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "head time tires";
    align-items: center;
    padding: 10px 12px;
  }
  [data-tq-hero] .tqh-pit__head { flex-direction: column; gap: 2px; font-size: 12px; }
  [data-tq-hero] .tqh-pit__time { font-size: 36px; text-align: center; }
  [data-tq-hero] .tqh-pit__w { min-inline-size: 28px; font-size: 11px; }
  [data-tq-hero] .tqh-tag:not(.is-pinned) .tqh-tag__card { right: 12px; inline-size: auto; max-inline-size: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tqh-pit, .tqh-tag__dot, .tqh-tag__line, .tqh-tag__card { transition: none; }
  .tqh-pit.is-done .tqh-pit__time b { animation: none; }
}
@media (forced-colors: active) {
  [data-tq-hero] .tqh-pit,
  [data-tq-hero] .tqh-tag { display: none !important; }
}
