/* Cinematic home preview */
.flight-hero {
  position: relative; isolation: isolate; display: grid; overflow: hidden;
  min-height: clamp(465px, 77svh, 800px); color: #f2f6ff; background: #070f25;
  --flight-play-state: paused;
}
.flight-hero[data-effects="playing"] { --flight-play-state: running; }
.flight-photo,.flight-vignette { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.flight-photo {
  background: linear-gradient(180deg,#070e23b8 0%,#0c1b365e 39%,#0a143757 63%,#080e22ed 100%), url('/assets/vuelo-medellin-noche-1920.jpg') center 46% / cover;
  transform: scale(1.02);
}
.flight-vignette {
  background: radial-gradient(ellipse at 50% 50%,transparent 20%,#050b19a0 100%);
  mask-image: linear-gradient(transparent 2%,#000 28% 85%,transparent);
}
.flight-hud,.flight-bottom {
  position: absolute; inset-inline: 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; z-index: 3;
}
.flight-hud { top: clamp(20px,4vw,52px); }
.flight-location {
  display: flex; gap: 9px; align-items: center; margin: 0; font-size: clamp(.68rem,1.1vw,.82rem);
  text-transform: uppercase; letter-spacing: .14em; font-weight: 730; color: #eff6ff;
}
.flight-location span { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-accent); box-shadow: 0 0 13px var(--brand-accent); }
.flight-explore {
  color: #eff6ff; background: #0b152caa; border: 1px solid #b5cafa68; border-radius: 999px;
  padding: 8px 14px; font-size: .82rem; font-weight: 660; white-space: nowrap;
}
.flight-sky,.flight-aircraft-layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.flight-aircraft-layer { z-index: 3; }
.flight-bottom { z-index: 4; }
.flight-sky path.flight-motion-path { fill: none; stroke: none; }
.flight-path-guide,.flight-trail,.flight-trail-halo { fill: none; }
.flight-path-guide { stroke: #b1c7ee4f; stroke-width: 1; stroke-dasharray: 2 7; }
.flight-trail,.flight-trail-halo { stroke: url(#flight-line); stroke-width: 2.1; stroke-linecap: round; }
.flight-trail-halo { opacity: .9; stroke-width: 9; }
.flight-plane { opacity: 0; }
.flight-hero:is([data-stage="entry"],[data-stage="loop"]) .flight-plane { opacity: 1; }
.flight-hero[data-stage="ready"] .flight-trail,.flight-hero[data-stage="ready"] .flight-trail-halo { opacity: .3; }
.flight-hero[data-stage="finale"] .flight-trail { opacity: .44; transition: opacity 1s; }
.flight-hero[data-stage="finale"] .flight-trail-halo { opacity: .5; transition: opacity 1s; }
.flight-sparks { position: absolute; z-index: 1; inset: 0; pointer-events: none; }
.firework-burst {
  position: absolute; left: var(--x); top: var(--y);
  width: clamp(74px,calc(var(--size) * .15 + 12vw),var(--size));
  height: auto; overflow: visible; transform: translate(-50%,-46%); color: var(--spark);
  filter: drop-shadow(0 0 3px var(--spark));
}
.firework-core,.firework-spark { fill: currentColor; opacity: 0; }
.firework-core { filter: blur(9px); }
.firework-spark path { fill: none; stroke: currentColor; stroke-width: .85; stroke-linecap: round; opacity: .68; }
.firework-spark circle { fill: #eef5ff; }
.firework-spark:nth-child(3n) circle { fill: currentColor; }
.flight-finale {
  position: absolute; z-index: 2; left: 50%; top: 47%; transform: translate(-50%,-50%);
  width: min(72vw,660px); display: grid; justify-items: center; text-align: center; pointer-events: none;
}
.flight-finale p { margin: 12px 0 0; font-size: clamp(.68rem,1.5vw,1.03rem); font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: #e7f2f6; }
.flight-lockup {
  display: block; width: 100%; aspect-ratio: 1018/225;
  background: linear-gradient(104deg,#84a6f4 0%,#f2f6ff 35%,#f2f6ff 47%,#84a6f4 76%,#e7f2f6 100%) 100% center/175% 100%;
  mask: url('/assets/logo.svg') center / contain no-repeat;
}
.flight-hero:not([data-stage="finale"]) .flight-finale { visibility: hidden; }
.flight-bottom { bottom: clamp(20px,4vw,48px); justify-content: flex-end; }
.flight-explore { display: inline-flex; align-items: center; gap: 10px; background: #b5cafa; color: #111c3a; border-color: #c8d9fc; }
.flight-explore:hover { background: #dce9ff; color: #111c3a; }
#buscador-tours { scroll-margin-top: 115px; }
.home .flight-header-brand { position: relative; }
.home .flight-header-brand.logo-sweep::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  mask: url('/assets/logo.svg') center / contain no-repeat;
  background: linear-gradient(106deg,transparent 34%,#577dd1 50%,transparent 66%) 170% center/250% 100% no-repeat;
  animation: flight-logo-shine 1.55s ease-out both;
}
@media (prefers-reduced-motion:no-preference) {
  .flight-hero[data-stage="finale"] .flight-finale { animation: flight-brand-in var(--flight-finale-duration,7200ms) ease-in-out both var(--flight-play-state); }
  .flight-hero[data-stage="finale"] .flight-lockup { animation: flight-logo-shine 3.15s ease-in-out both var(--flight-play-state); }
  .flight-hero[data-stage="finale"] .firework-core { animation: firework-core 1.2s var(--delay) ease-out both var(--flight-play-state); }
  .flight-hero[data-stage="finale"] .firework-spark {
    animation: firework-expand 2.85s cubic-bezier(.16,.59,.32,1) both;
    animation-delay: calc(var(--delay) + var(--lag));
    animation-play-state: var(--flight-play-state);
  }
  .flight-hero[data-stage="finale"] .firework-spark:nth-child(4n) circle {
    animation: firework-twinkle 460ms ease-in-out 4 alternate both;
    animation-delay: calc(var(--delay) + var(--lag) + 450ms);
    animation-play-state: var(--flight-play-state);
  }
  .flight-hero[data-stage="ready"] .flight-photo { transform: none; }
}
@keyframes flight-brand-in { 0%,3% { opacity: 0; } 23%,88% { opacity: 1; } 100% { opacity: 0; } }
@keyframes flight-logo-shine { from { background-position: 170% center; } to { background-position: -40% center; } }
@keyframes firework-core {
  0% { opacity: 0; transform: scale(.25); }
  19% { opacity: .5; }
  100% { opacity: 0; transform: scale(1.55); }
}
@keyframes firework-expand {
  0% { opacity: 0; transform: scale(.15); }
  15% { opacity: .98; transform: translate(calc(var(--dx) * .63),calc(var(--dy) * .63)) scale(1); }
  48% { opacity: .8; transform: translate(calc(var(--dx) * .9),calc(var(--dy) * .9 + 4px)) scale(.72); }
  76% { opacity: .38; }
  100% { opacity: 0; transform: translate(var(--dx),calc(var(--dy) + 22px)) scale(.32); }
}
@keyframes firework-twinkle { from { opacity: .55; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .flight-hero[data-stage="finale"] .firework-spark {
    transform: translate(var(--dx),var(--dy));
    animation: firework-glimmer 3.1s var(--delay) ease-in-out both var(--flight-play-state) !important;
  }
  .flight-hero[data-stage="finale"] .flight-finale { animation: flight-brand-in var(--flight-finale-duration,7200ms) ease-in-out both var(--flight-play-state) !important; }
  @keyframes firework-glimmer { 0%,100% { opacity: 0; } 33%,55% { opacity: .78; } }
}
@media (max-width:600px) {
  .flight-hero { min-height: clamp(420px,70svh,650px); }
  .flight-photo { background-image: linear-gradient(180deg,#070e23a8,#0c1b365a 45%,#080e22e6), url('/assets/vuelo-medellin-noche-880.jpg'); background-position: 52% center; }
  .flight-finale { width: 82vw; }
  .flight-finale p { letter-spacing: .17em; }
  .flight-sky,.flight-aircraft-layer { transform: scale(1.11); }
  .flight-explore { font-size: .75rem; padding: 7px 10px; }
}
