/* ============================================================
   LIBRA JET — universe "flight"
   Night-into-dawn sky, radar scope, flight routes, runway.
   Loaded after style-v2.css on /aviation/.
   ============================================================ */

/* ---------- Token remap ---------- */
.theme-jet {
  --bg: oklch(17% 0.03 257);
  --bg-raise: oklch(20.5% 0.034 257);
  --bg-sunk: oklch(12.5% 0.026 260);
  --ink: oklch(94% 0.01 88);
  --text: oklch(82% 0.016 245);
  --text-dim: oklch(70% 0.02 242);
  --text-faint: oklch(57% 0.022 240);
  --line: oklch(94% 0.01 88 / 0.12);
  --line-strong: oklch(94% 0.01 88 / 0.26);
  --gold-deep: oklch(72% 0.125 86);
  --shadow-soft: 0 1px 2px oklch(0% 0 0 / 0.3), 0 12px 40px -12px oklch(0% 0 0 / 0.5);
  --shadow-lift: 0 2px 4px oklch(0% 0 0 / 0.35), 0 24px 64px -16px oklch(0% 0 0 / 0.6);

  /* flight instruments */
  --jet-ice: oklch(78% 0.09 222);
  --jet-ice-line: oklch(78% 0.09 222 / 0.4);
  --jet-ice-faint: oklch(78% 0.09 222 / 0.16);
  --jet-dawn: oklch(74% 0.13 62);

  background: var(--bg);
  color: var(--text);
}
.theme-jet .lede { color: var(--text-dim); }
.theme-jet .lede strong { color: var(--ink); }

/* mono eyebrow variant — flight-plan typography */
.eyebrow--mono {
  font-family: ui-monospace, Menlo, monospace;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--jet-ice);
}
.eyebrow--mono::before { background: var(--jet-ice-line); }
.eyebrow--mono::after { background: var(--jet-ice-line); }

/* buttons on the night world */
.theme-jet .btn {
  border-color: var(--line-strong);
  color: var(--plate-text);
}
.theme-jet .btn:hover, .theme-jet .btn:focus-visible {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: oklch(16% 0.03 257);
}
.theme-jet .btn--solid {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: oklch(16% 0.03 257);
}
.theme-jet .btn--solid:hover, .theme-jet .btn--solid:focus-visible {
  background: oklch(84% 0.13 90);
  border-color: oklch(84% 0.13 90);
  color: oklch(16% 0.03 257);
}
.theme-jet .link-line { color: var(--gold-bright); }

/* header glass matches the sky, not the violet default */
.theme-jet .site-header.is-scrolled .nav {
  background: oklch(15% 0.028 258 / 0.78);
}
@media (max-width: 900px) {
  .theme-jet .nav-links { background: oklch(14% 0.026 258 / 0.97); }
}

/* ============================================================
   HERO — dawn departure
   ============================================================ */
.jet-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  overflow: clip;
}

/* sky: night above, dawn burning at the horizon */
.jet-sky {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(64rem 26rem at 62% 108%, oklch(58% 0.11 62 / 0.5), transparent 62%),
    radial-gradient(40rem 20rem at 30% 112%, oklch(48% 0.09 45 / 0.35), transparent 60%),
    radial-gradient(52rem 36rem at 85% -14%, oklch(34% 0.06 250 / 0.5), transparent 60%),
    linear-gradient(180deg, oklch(13% 0.026 262) 0%, oklch(17% 0.032 256) 52%, oklch(23% 0.045 250) 100%);
}

/* faint star field */
.jet-stars {
  position: absolute;
  inset: 0 0 34% 0;
  z-index: -2;
  pointer-events: none;
}
.jstar {
  fill: oklch(88% 0.05 230);
  opacity: 0.25;
  animation: jet-twinkle 4.2s ease-in-out var(--d, 0s) infinite;
}
@keyframes jet-twinkle {
  0%, 100% { opacity: 0.12; }
  50% { opacity: 0.85; }
}

/* cruising contrails, high and slow */
.jet-contrails {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}
.jet-contrails i {
  position: absolute;
  left: 0;
  width: 15rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, oklch(88% 0.03 230 / 0.55) 55%, oklch(88% 0.03 230 / 0.1));
  filter: blur(0.8px);
  transform: rotate(-4deg);
  animation: jet-contrail 46s linear infinite;
  will-change: translate;
}
.jet-contrails i:nth-child(1) { top: 14%; animation-delay: -6s; }
.jet-contrails i:nth-child(2) { top: 24%; width: 11rem; animation-delay: -27s; animation-duration: 54s; opacity: 0.7; }
.jet-contrails i:nth-child(3) { top: 8%; width: 19rem; animation-delay: -40s; animation-duration: 62s; opacity: 0.5; }
@keyframes jet-contrail {
  from { translate: -24rem 0; }
  to { translate: 130vw 0; }
}

/* route arcs — Dubai / Fujairah to the world */
.jet-routes {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 96%);
          mask-image: linear-gradient(180deg, #000 55%, transparent 96%);
}
.route-base {
  fill: none;
  stroke: var(--jet-ice-faint);
  stroke-width: 1.2;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: jet-draw 2.2s var(--ease-out) var(--d, 0.4s) forwards;
}
@keyframes jet-draw { to { stroke-dashoffset: 0; } }
.route-flowline {
  fill: none;
  stroke: var(--jet-ice-line);
  stroke-width: 1.2;
  stroke-dasharray: 3 11;
  animation: jet-flow 20s linear infinite;
}
@keyframes jet-flow { to { stroke-dashoffset: -560; } }
.route-node { fill: var(--jet-ice); }
.route-node--hub { fill: var(--gold-bright); }
.route-tag {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 2.5px;
  fill: oklch(78% 0.09 222 / 0.85);
}
.route-tag--hub { fill: var(--gold-bright); }
.jet-plane {
  fill: oklch(90% 0.06 222);
  filter: drop-shadow(0 0 5px oklch(78% 0.09 222 / 0.9));
  animation: jet-fly var(--t, 14s) linear infinite;
  animation-delay: var(--fd, 0s);
  will-change: offset-distance;
}
.jet-plane--a { offset-path: path('M1080 520 C 900 320, 640 200, 420 170'); }
.jet-plane--b { offset-path: path('M1150 545 C 1000 380, 700 300, 470 300'); --t: 18s; --fd: -8s; }
.jet-plane--c { offset-path: path('M1080 520 C 860 260, 520 120, 260 120'); --t: 21s; --fd: -13s; }
@keyframes jet-fly {
  from { offset-distance: 0%; opacity: 0; }
  6% { opacity: 1; }
  92% { opacity: 1; }
  to { offset-distance: 100%; opacity: 0; }
}

/* hero layout */
.jet-hero-inner {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 4vw, 5rem);
  align-items: center;
  padding-top: clamp(8.5rem, 7rem + 5vw, 11rem);
  padding-bottom: clamp(2rem, 4vh, 3.5rem);
}

.jet-hero-copy .eyebrow { margin-bottom: clamp(1.6rem, 3vh, 2.4rem); }
.jet-title {
  font-size: clamp(2.6rem, 1.5rem + 4.4vw, 4.9rem);
  line-height: 1.05;
  max-width: 15ch;
  color: var(--ink);
}
.jet-title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--gold-bright) 15%, oklch(85% 0.1 92) 55%, var(--gold) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.jet-title .line {
  display: block;
  overflow: clip;
  padding-bottom: 0.07em;
  margin-bottom: -0.07em;
}
.jet-title .line > span {
  display: block;
  transform: translateY(112%);
  animation: jet-line 1.1s var(--ease-out) forwards;
  animation-delay: calc(160ms + var(--i, 0) * 150ms);
}
@keyframes jet-line { to { transform: none; } }

.jet-hero-copy .lede {
  margin-top: clamp(1.6rem, 3vh, 2.3rem);
  max-width: 50ch;
  opacity: 0;
  animation: jet-fade 1.1s var(--ease-out) 780ms forwards;
}
.jet-hero-copy .lede strong { color: var(--ink); font-weight: 550; }
@keyframes jet-fade { to { opacity: 1; } }

.jet-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.8rem;
  opacity: 0;
  animation: jet-fade 1.1s var(--ease-out) 950ms forwards;
}
.chip {
  font-family: ui-monospace, Menlo, monospace;
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  padding: 0.55rem 0.9rem;
  transition: border-color var(--duration-fast) ease, background var(--duration-fast) ease;
}
.chip:hover { border-color: var(--jet-ice-line); background: oklch(94% 0.01 88 / 0.04); }
.chip strong { color: var(--jet-ice); font-weight: 600; }

.jet-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 1.6rem;
  align-items: center;
  margin-top: 1.9rem;
  opacity: 0;
  animation: jet-fade 1.1s var(--ease-out) 1100ms forwards;
}

/* ---------- Radar scope — the instrument panel ---------- */
.jet-scope {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1.4rem, 2.5vw, 2.4rem);
  align-items: center;
  padding: clamp(1.4rem, 2.4vw, 2.2rem);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: oklch(14% 0.026 258 / 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lift);
  opacity: 0;
  animation: jet-fade 1.2s var(--ease-out) 620ms forwards;
}
.scope-dial {
  position: relative;
  width: clamp(9rem, 13vw, 12rem);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: clip;
  border: 1px solid var(--jet-ice-line);
  background:
    radial-gradient(circle at 50% 50%, oklch(20% 0.045 240 / 0.6), oklch(13% 0.03 255 / 0.9) 78%);
}
.scope-dial svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scope-ring { fill: none; stroke: var(--jet-ice-faint); stroke-width: 1; }
.scope-axis { stroke: oklch(78% 0.09 222 / 0.12); stroke-width: 1; }
.scope-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, oklch(78% 0.09 222 / 0.5), oklch(78% 0.09 222 / 0.12) 12%, transparent 22%);
  animation: jet-sweep 6.5s linear infinite;
  will-change: transform;
}
@keyframes jet-sweep { to { transform: rotate(360deg); } }
.scope-blip {
  fill: var(--jet-ice);
  animation: jet-blip 6.5s ease-out var(--bd, 0s) infinite;
}
@keyframes jet-blip {
  0%, 8% { opacity: 1; }
  45% { opacity: 0.12; }
  92% { opacity: 0.12; }
  100% { opacity: 1; }
}
.scope-hub { fill: var(--gold-bright); }
.scope-tag {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 9px;
  letter-spacing: 2px;
  fill: oklch(78% 0.09 222 / 0.75);
}

/* flight-data readouts */
.scope-data {
  margin: 0;
  display: grid;
  gap: 0.5rem;
  font-family: ui-monospace, Menlo, monospace;
  min-width: 0;
}
.scope-data > div {
  display: grid;
  grid-template-columns: 3.6rem minmax(0, 1fr);
  gap: 0.8rem;
  align-items: baseline;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed oklch(94% 0.01 88 / 0.09);
}
.scope-data > div:last-child { border-bottom: none; padding-bottom: 0; }
.scope-data dt {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.scope-data dd {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--jet-ice);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scope-data dd em { font-style: normal; color: var(--gold-bright); }

/* ---------- Runway threshold — hero base ---------- */
.jet-runway {
  position: relative;
  border-top: 1px solid var(--plate-line);
  padding-block: 1.15rem;
  opacity: 0;
  animation: jet-fade 1s var(--ease-out) 1300ms forwards;
}
.jet-runway .container-wide {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
}
.rwy-label {
  flex: none;
  font-family: ui-monospace, Menlo, monospace;
  font-size: var(--text-xs);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--plate-faint);
}
.rwy-lights {
  flex: 1;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.rwy-lights i {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--jet-ice);
  opacity: 0.18;
  animation: jet-beacon 2.4s var(--ease-soft) infinite;
  animation-delay: calc(var(--i, 0) * 0.16s);
}
.rwy-lights i.rwy-end { background: var(--gold-bright); }
@keyframes jet-beacon {
  0%, 100% { opacity: 0.18; transform: scale(0.8); }
  8% { opacity: 1; transform: scale(1.35); }
  22% { opacity: 0.35; transform: scale(1); }
}
@media (max-width: 640px) {
  .rwy-label--r { display: none; }
}

/* ============================================================
   FLIGHT PLAN — the services, filed as legs
   ============================================================ */
.theme-jet .section-head::after { background: var(--line); }

.flight-plan {
  list-style: none;
  position: relative;
  max-width: 62rem;
}
.flight-plan::before {
  content: '';
  position: absolute;
  top: 1.2rem;
  bottom: 1.2rem;
  left: calc(1.5rem - 0.5px);
  width: 1px;
  background: linear-gradient(180deg, var(--jet-ice-line), oklch(78% 0.09 222 / 0.08));
}
.leg {
  position: relative;
  display: grid;
  grid-template-columns: 3rem 8.5rem minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: baseline;
  padding-block: clamp(1.5rem, 2.6vw, 2.2rem);
  border-bottom: 1px solid var(--line);
  transition: background var(--duration-fast) ease, padding-left var(--duration) var(--ease-out);
}
.leg:hover { background: var(--bg-raise); padding-left: 0.9rem; }
.leg-beacon {
  position: relative;
  justify-self: center;
  width: 0.7rem;
  height: 0.7rem;
  translate: 0 0.1em;
  transform: rotate(45deg);
  background: var(--jet-ice);
  flex: none;
}
.leg-beacon::after {
  content: '';
  position: absolute;
  inset: -0.45rem;
  border: 1px solid var(--jet-ice-line);
  animation: jet-ping 3.2s var(--ease-out) infinite;
  animation-delay: calc(var(--i, 0) * 0.45s);
}
@keyframes jet-ping {
  0% { transform: scale(0.5); opacity: 0.9; }
  70%, 100% { transform: scale(1.5); opacity: 0; }
}
.leg-code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--jet-ice);
}
.leg h3 { font-size: var(--text-h3); }
.leg p { margin-top: 0.5rem; color: var(--text-dim); font-size: var(--text-sm); }
.leg:hover h3 { color: var(--ink); }
@media (max-width: 700px) {
  .flight-plan::before { left: calc(1.15rem - 0.5px); }
  .leg { grid-template-columns: 2.3rem minmax(0, 1fr); }
  .leg-code { grid-column: 2; margin-bottom: 0.4rem; }
  .leg-body { grid-column: 2; }
}

/* ============================================================
   FLEET ACCESS — cabin classes as a range scale
   ============================================================ */
.fleet-scale {
  list-style: none;
  border-top: 1px solid var(--line);
}
.scale-row {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(1.2rem, 3vw, 3rem);
  align-items: center;
  padding-block: 1.05rem;
  border-bottom: 1px solid var(--line);
}
.scale-name {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color var(--duration-fast) ease;
}
.scale-row:hover .scale-name { color: var(--jet-ice); }
.scale-sub {
  display: block;
  margin-top: 0.15rem;
  color: var(--text-faint);
  letter-spacing: 0.14em;
}
.scale-track {
  position: relative;
  height: 1.35rem;
}
.scale-track::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: var(--line);
}
.scale-fill {
  position: absolute;
  left: 0; top: 50%;
  translate: 0 -50%;
  width: 100%;
  height: 0.55rem;
  border-radius: 999px;
  background: linear-gradient(90deg, oklch(78% 0.09 222 / 0.25), var(--jet-ice-line) 60%, var(--jet-ice));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.5s var(--ease-out);
  transition-delay: calc(150ms + var(--i, 0) * 90ms);
}
.scale-fill::after {
  content: '';
  position: absolute;
  right: -0.25rem;
  top: 50%;
  translate: 50% -50%;
  width: 0.55rem;
  height: 0.55rem;
  transform: rotate(45deg);
  background: var(--gold-bright);
}
.reveal.is-visible .scale-fill { transform: scaleX(var(--f, 0.5)); }
@media (max-width: 640px) {
  .scale-row { grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr); gap: 1rem; }
  .scale-name { font-size: 0.66rem; letter-spacing: 0.1em; }
}

/* ============================================================
   THE DESK — pull quote over the dawn
   ============================================================ */
.theme-jet .band-atmo {
  background:
    radial-gradient(56rem 26rem at 50% 120%, oklch(56% 0.11 62 / 0.42), transparent 65%),
    radial-gradient(40rem 22rem at 50% -32%, oklch(38% 0.07 245 / 0.4), transparent 60%);
}
.theme-jet .pull-quote { color: var(--ink); }
.theme-jet .pull-quote em { color: var(--gold-bright); }
.desk-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.4rem 2.2rem;
  align-items: center;
  margin-top: 2.6rem;
}

/* ============================================================
   QA mode (?qa=1) — static final states for screenshots
   ============================================================ */
.qa .jet-hero { min-height: 0; }
.qa .jet-title .line > span { transform: none; animation: none; }
.qa .jet-hero-copy .lede,
.qa .jet-hero-meta,
.qa .jet-hero-actions,
.qa .jet-scope,
.qa .jet-runway { opacity: 1; animation: none; }
.qa .route-base { stroke-dashoffset: 0; animation: none; }
.qa .scale-fill { transform: scaleX(var(--f, 0.5)); transition: none; }
.qa .jet-plane, .qa .scope-sweep, .qa .scope-blip, .qa .jstar,
.qa .jet-contrails i, .qa .rwy-lights i, .qa .leg-beacon::after,
.qa .route-flowline { animation: none; }
.qa .rwy-lights i { opacity: 0.85; transform: none; }
.qa .scope-blip { opacity: 1; }
.qa .jstar { opacity: 0.6; }

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .jet-title .line > span { transform: none; animation: none; }
  .jet-hero-copy .lede,
  .jet-hero-meta,
  .jet-hero-actions,
  .jet-scope,
  .jet-runway { opacity: 1; animation: none; }
  .route-base { stroke-dashoffset: 0; animation: none; }
  .route-flowline, .jet-plane, .scope-sweep, .scope-blip,
  .jstar, .jet-contrails i, .rwy-lights i, .leg-beacon::after { animation: none; }
  .scope-blip { opacity: 1; }
  .jstar { opacity: 0.6; }
  .rwy-lights i { opacity: 0.85; transform: none; }
  .scale-fill { transform: scaleX(var(--f, 0.5)); transition: none; }
  .leg:hover { padding-left: 0; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .jet-hero-inner { grid-template-columns: 1fr; align-content: center; gap: clamp(2.2rem, 6vh, 3.5rem); }
  .jet-scope { max-width: 34rem; }
}
@media (max-width: 640px) {
  .jet-title { font-size: clamp(2.1rem, 9.6vw, 2.7rem); }
  .jet-scope { grid-template-columns: 1fr; justify-items: center; }
  .scope-data { width: 100%; }
  .scope-data dd { white-space: normal; }
  .jet-hero-actions .btn { width: 100%; justify-content: center; }
  .jet-contrails i:nth-child(3) { display: none; }
}
