/* TBF motion layer, release 1 (6 Nov 2026): every page is a flight. The logo's plane takes off from the first T in the
   header and lands on the last T in the footer; a small plane follows the menu; the search card gets a runway marker
   under the trip type, a boarding-pass Search button and airport codes that turn over. js/tbf-motion.js drives it.
   Decoration only: with animations switched off nothing here moves, and nothing is hidden. */

/* the logos: while one animates, a drawing of it (same shapes, same place) lies over the image, cross-faded in and out */
svg.tbm-live { overflow: visible; }
svg.tbm-live .tbm-trail { fill: none; stroke: #8ea2b7; stroke-width: 1.1; stroke-linecap: round; opacity: 0; }
svg.tbm-live .tbm-jet path, svg.tbm-live .tbm-jet ellipse { fill: #14243a; }
svg.tbm-live .tbm-jet .tbm-gear { fill: #536176; }
svg.tbm-live .tbm-lamp { fill: #f0a020; opacity: 0; }

/* menu: a small plane flies to the link you point at and leaves a contrail that fades */
.tbm-navwrap { position: relative; }
.tbm-navplane { position: absolute; left: 0; bottom: -14px; width: 14px; height: 13px; pointer-events: none; opacity: 0; }
.tbm-navtrail { position: absolute; left: 0; bottom: -8px; height: 2px; width: 0; border-radius: 2px; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, rgba(142, 162, 183, 0), #8ea2b7 50%, rgba(142, 162, 183, 0)); }

/* search card: a strip of runway under the chosen trip type */
.tbf-journey .se5-tabs__track { position: relative; }
.tbf-journey .tbm-runway { position: absolute; left: 0; bottom: 3px; width: 0; height: 4px; border-radius: 2px; pointer-events: none;
  background: repeating-linear-gradient(90deg, #ffffff 0 6px, transparent 6px 12px) 0 50% / 100% 1px no-repeat, #14243a; }

/* the Search button as a boarding pass: a perforated stub with a plane that takes off when you press */
.tbf-journey .se5-cta { position: relative; }
.tbf-journey .se5-cta .se5-cta__icon { position: static; align-self: stretch; display: flex !important; align-items: center;
  width: 36px !important; margin: -14px 0; padding-left: 14px; border-left: 2px dashed rgba(255, 255, 255, .6);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 40'%3E%3Cpath fill='%23fff' d='M42 20C41 18.6 39 18 36 18L27 18 19 4 15.5 4 20 18 9 18 5.5 12.5 3 12.5 4.8 18.5 4 20 4.8 21.5 3 27.5 5.5 27.5 9 22 20 22 15.5 36 19 36 27 22 36 22C39 22 41 21.4 42 20Z'/%3E%3C/svg%3E") calc(50% + 7px + var(--tbm-px, 0px)) calc(50% + var(--tbm-py, 0px)) / 20px 18px no-repeat !important; }
.tbf-journey .se5-cta .se5-cta__icon i { visibility: hidden; }
.tbf-journey .se5-cta .se5-cta__icon::before, .tbf-journey .se5-cta .se5-cta__icon::after { content: ""; position: absolute;
  width: 12px; height: 12px; margin-left: -21px; border-radius: 50%; background: #ffffff; }
.tbf-journey .se5-cta .se5-cta__icon::before { top: -6px; }
.tbf-journey .se5-cta .se5-cta__icon::after { bottom: -6px; }
.tbf-journey .se5-cta .se5-cta__text { position: relative; }
.tbf-journey .se5-cta .se5-cta__text::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px;
  background: rgba(255, 255, 255, .8); transform: scaleX(0); transform-origin: left center; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.tbf-journey .se5-cta:hover .se5-cta__text::after, .tbf-journey .se5-cta:focus-visible .se5-cta__text::after { transform: scaleX(1); }

/* airport codes turn over like departure-board tiles when they change */
.tbm-flap { display: inline-block; perspective: 300px; }
.tbm-flap > span { display: inline-block; transform-origin: 50% 55%; backface-visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  .tbf-journey .se5-cta .se5-cta__text::after { transition: none; }
  .tbm-navplane, .tbm-navtrail, .tbf-journey .tbm-runway { display: none; }
}

/* release 2 (7 Nov 2026), the page scenes */
/* route pages: the route ribbon beside the heading on wide screens (1280 px and up). Below that, and above a long
   heading at every width (tbm-route--above), it sits above the heading, which then keeps today's full width: beside it,
   a heading that wraps in the fallback font before the web font arrives would jump. js/tbf-scene-route.js flies it. */
.tbm-route { flex: 0 0 auto; width: clamp(300px, 30vw, 440px); margin: 0; }
.tbm-route svg { display: block; width: 100%; height: auto; overflow: visible; }
.tbm-route .tbm-arc { fill: none; stroke: #b4c0cf; stroke-width: 1.3; stroke-dasharray: 1.5 4.5; stroke-linecap: round; }
.tbm-route .tbm-trail { fill: none; stroke: #c8102e; stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: 100; }
.tbm-route .tbm-c rect { fill: #14243a; }
.tbm-route .tbm-c path { stroke: rgba(0, 0, 0, .38); stroke-width: 1; }
.tbm-route .tbm-c text { fill: #ffffff; font: 700 19px 'TBF Manrope', Arial, sans-serif; text-anchor: middle; dominant-baseline: central; }
.tbm-route .tbm-km { fill: #14243a; font: 700 16px 'TBF Manrope', Arial, sans-serif; text-anchor: middle; dominant-baseline: central; font-variant-numeric: tabular-nums; }
.tbm-route .tbm-note { fill: #536176; font: 400 10.5px 'TBF DM Sans', Arial, sans-serif; text-anchor: middle; dominant-baseline: central; }
.tbm-route .tbm-jet { fill: #14243a; }
/* above the heading the ribbon takes a line of its own (wrapping alone would put it beside a heading that fits), drawn
   at most 400 px wide; flex-shrink 1 keeps a browser without :has() from running past the page edge */
@media (max-width: 1279px) {
  .tbf-journey .tl-route .jh-heading { flex-wrap: wrap; row-gap: 14px; }
  .tbm-route { order: -1; flex: 0 1 100%; width: 100%; }
  .tbm-route svg { max-width: 400px; }
}
.tbf-journey .tl-route .jh-heading:has(> .tbm-route--above) { flex-wrap: wrap; row-gap: 14px; }
.tbm-route--above { order: -1; flex: 0 1 100%; width: 100%; }
.tbm-route--above svg { max-width: 400px; }
/* airport guides: the airport orbit in the hero's empty top space (js/tbf-scene-airport.js draws it) */
.tbm-orbit { position: absolute; pointer-events: none; overflow: visible; }
.tbm-orbit .tbm-o-ring { fill: none; stroke: rgba(255, 255, 255, .24); stroke-width: 1.2; stroke-dasharray: 2 6; stroke-linecap: round; }
.tbm-orbit .tbm-o-trail { fill: none; stroke: rgba(255, 255, 255, .42); stroke-width: 1.6; stroke-linecap: round; }
.tbm-orbit .tbm-o-tiles rect { fill: #141e35; stroke: rgba(255, 255, 255, .16); stroke-width: 1; }
.tbm-orbit .tbm-o-tiles path { stroke: rgba(0, 0, 0, .45); stroke-width: 1; }
.tbm-orbit .tbm-o-tiles text { fill: #ffffff; font: 800 24px 'Outfit', 'Inter', Arial, sans-serif; text-anchor: middle; dominant-baseline: central; }
.tbm-orbit .tbm-o-jet { fill: #ffffff; }
.tbm-orbit .tbm-o-runway rect { fill: rgba(255, 255, 255, .07); }
.tbm-orbit .tbm-o-runway path { stroke: rgba(255, 255, 255, .22); stroke-width: .8; stroke-dasharray: 5 5; }
.tbm-orbit .tbm-o-runway circle { fill: #ff2d4f; opacity: .18; }
