/* IBA — "Aviation" styling for the home page (loaded after home.css, home page only). */

/* ------------------------------------------------------------- Nav logo -- */
/* The home page now uses the same bar height as the
   Services / Team / Contact pages (home.css, --nav-height: 100px). */

/* Once scrolled (white bar), the nav becomes slightly translucent. */
.nav.is-scrolled {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Home page footer logo; the other pages now use the same 64px height via pages.css. */
.footer-logo {
  height: 64px;
}

/* ------------------------------------------------ Sky: dotted plane -- */
/* Fixed layer behind the content: placed before the hero in the DOM, it sits
   beneath any positioned element that follows it (hero, sections below). */
.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}

.sky-svg {
  width: 100%;
  height: 100%;
}

.sky-route {
  fill: none;
  stroke: rgba(0, 36, 88, 0.26);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 0 16;
  animation: skyDots 1.6s linear infinite;
}

.sky-route--alt {
  stroke: rgba(237, 143, 11, 0.3);
  stroke-width: 2.5;
  stroke-dasharray: 0 13;
  animation-duration: 2.2s;
}

.sky-plane {
  fill: var(--navy);
  opacity: 0.55;
}

.sky-plane--small {
  fill: var(--orange);
  opacity: 0.6;
}

/* The sections sit above the sky; the colored bands become
   translucent so the flight paths show through. */
.services,
.destinations,
.guarantees,
.pay,
.testimonials,
.footer {
  position: relative;
}

.destinations,
.pay {
  background: rgba(237, 241, 247, 0.55);
}

/* ---------------------------------------------------------- Hero: image -- */
/* Shifts the background image/video to the left and enlarges it, without touching
   the navigation bar or the footer logo. */
.hero video.hero-video {
  object-position: 25% center;
  transform: scale(1.22);
  transform-origin: 25% 50%;
}

/* ----------------------------------------------------------- Hero: text -- */
.hero h1 {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.55), 0 6px 30px rgba(0, 0, 0, 0.6);
}

.hero-badge {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.hero-slogan {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  color: var(--gold-light);
  font: 700 clamp(20px, 2.8vw, 30px)/1.3 var(--font-head);
  letter-spacing: 0.01em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.75), 0 4px 24px rgba(0, 0, 0, 0.65);
}

.hero-slogan::before,
.hero-slogan::after {
  content: "";
  flex: 0 0 clamp(24px, 5vw, 64px);
  border-top: 2px dashed rgba(255, 209, 102, 0.85);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

.scroll-cue {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

/* ---------------------------------------------- Section headings (eyebrow) -- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: "flight_takeoff";
  font-family: "Material Symbols Rounded";
  font-size: 18px;
  font-weight: normal;
  letter-spacing: normal;
  text-transform: none;
  line-height: 1;
}

.eyebrow::after {
  content: "";
  width: 34px;
  border-top: 2px dashed currentColor;
  opacity: 0.55;
}

/* --------------------------------------------- Stats: departures board -- */
.board {
  background: linear-gradient(180deg, #0b1a33 0%, #071226 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 50px rgba(0, 20, 48, 0.35);
  overflow: hidden;
}

.board-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font: 700 11px var(--font-body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.board-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-light);
}

.board-title .material-symbols-rounded {
  font-size: 18px;
}

.board-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6fe3a1;
}

.board-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
  animation: boardBlink 1.4s ease-in-out infinite;
}

.board .stats-bar {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.board .stat {
  border-right-color: rgba(255, 255, 255, 0.08);
}

/* Numbers styled like a split-flap display. */
.board .stat-num {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 8px;
  background: linear-gradient(180deg, #17294a 0 50%, #112240 50% 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 10px rgba(0, 0, 0, 0.3);
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
}

.board .stat-num::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(0, 0, 0, 0.6);
}

.board .stat-label {
  margin-top: 12px;
  color: var(--text-on-navy);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ------------------------------------------- Services: boarding pass cards -- */
/* These sections are also .container elements, but home.css gives them "padding: Xpx 0",
   which removed the side margins (content stuck to the edges on mobile). */
.services,
.guarantees,
.testimonials {
  padding-inline: 24px;
}

.tickets-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 28px;
}

/* --tx/--ty/--tr/--ts: "messy pile" offset driven by scroll (home.js),
   all at 0 once the tickets are tidied up. */
.ticket {
  --stub: 150px;
  --notch: 13px;
  --tx: 0px;
  --ty: 0px;
  --tr: 0deg;
  --ts: 1;
  position: relative;
  filter: drop-shadow(0 10px 18px rgba(0, 36, 88, 0.1));
  transform: translate(var(--tx), var(--ty)) rotate(var(--tr)) scale(var(--ts));
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s ease;
}

.ticket:hover {
  transform: translate(var(--tx), calc(var(--ty) - 4px)) rotate(calc(var(--tr) - 0.4deg)) scale(var(--ts));
  filter: drop-shadow(0 18px 28px rgba(0, 36, 88, 0.18));
}

/* While tidying up, the transform follows the scroll directly (no delay). */
.tickets-grid.is-shuffling .ticket {
  transition: filter 0.25s ease;
}

/* Round notches at the top and bottom of the perforation line.
   (mask on the child, drop-shadow on the parent, otherwise the mask would clip it) */
.ticket-inner {
  --cut: calc(100% - var(--stub));
  display: flex;
  min-height: 200px;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  -webkit-mask:
    radial-gradient(circle var(--notch) at var(--cut) 0, #0000 98%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle var(--notch) at var(--cut) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  mask:
    radial-gradient(circle var(--notch) at var(--cut) 0, #0000 98%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle var(--notch) at var(--cut) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
}

.ticket-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 22px 20px;
}

.ticket-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font: 700 10px var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ticket-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ticket-brand .material-symbols-rounded {
  font-size: 16px;
  color: var(--orange);
  transform: rotate(45deg);
}

.ticket-gate {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--bg-alt);
  color: var(--navy);
}

.ticket-route {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ticket-code {
  font: 800 24px/1 var(--font-head);
  letter-spacing: 0.02em;
  color: var(--navy);
}

.ticket-code:last-child {
  color: var(--orange);
}

.ticket-path {
  position: relative;
  flex: 1;
  height: 22px;
}

.ticket-path::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 2px dashed #c9d3e1;
}

.ticket-path .material-symbols-rounded {
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 0 4px;
  background: #fff;
  font-size: 20px;
  color: var(--navy);
  transform: translate(-50%, -50%) rotate(90deg);
}

.ticket:hover .ticket-path .material-symbols-rounded {
  animation: ticketFly 1.6s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}

.ticket h3 {
  font-size: 18px;
  font-weight: 700;
}

.ticket p {
  margin: 0;
  font: 500 13px/1.6 var(--font-body);
  color: var(--text-muted);
}

.ticket-stub {
  flex: 0 0 var(--stub);
  display: flex;
  flex-direction: column;
  border-left: 2px dashed #d5dde8;
}

.ticket-stub img {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: cover;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.ticket:hover .ticket-stub img {
  transform: scale(1.05);
}

.ticket-stub-foot {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 10px 14px 16px;
  background: #fff;
}

.ticket-barcode {
  display: block;
  height: 30px;
  background: repeating-linear-gradient(
    90deg,
    var(--navy) 0 2px, transparent 2px 4px,
    var(--navy) 4px 5px, transparent 5px 8px,
    var(--navy) 8px 11px, transparent 11px 12px,
    var(--navy) 12px 13px, transparent 13px 16px
  );
}

.ticket-no {
  font: 700 9.5px var(--font-body);
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-align: center;
}

/* -------------------------------------------------------- Destinations -- */
.dest-plane {
  margin: 0 4px;
  font-size: 20px;
  color: var(--gold-light);
  transform: rotate(90deg);
}

/* ---------------------------------------------------------- Keyframes -- */
@keyframes skyDots {
  to { stroke-dashoffset: -32; }
}

@keyframes boardBlink {
  50% { opacity: 0.25; }
}

@keyframes ticketFly {
  0% { left: 0; opacity: 0; }
  15%, 85% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* -------------------------------------------------- Booking: mobile -- */
/* Button, dimmed backdrop and panel header: mobile only. */
.bk-launch,
.bk-backdrop,
.bk-sheet-head {
  display: none;
}

/* -------------------------------------------------------- Ticket carousel -- */
.tickets-dots {
  display: none;
}

/* ============================================================ Responsive ==
   ≥ 1025 px: desktop · 761–1024 px: tablet · ≤ 760 px: mobile */

/* ---------------------------------------------------------------- Tablet -- */
@media (max-width: 1024px) {
  .ticket {
    --stub: 116px;
  }

  .ticket-brand {
    display: none;
  }

  .ticket-main {
    padding: 16px 18px 18px;
  }

  .ticket-code {
    font-size: 21px;
  }

  /* 3 destinations on 2 columns: the last one takes the full width. */
  .dest-card:last-child {
    grid-column: 1 / -1;
    height: 280px;
  }

  .testi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .testi-card:last-child {
    grid-column: 1 / -1;
  }
}

/* --------------------------------------------------------------- Mobile -- */
@media (max-width: 760px) {
  /* Lighter sky: one flight path, one plane, static dots. */
  .sky-route--alt,
  .sky-plane--small {
    display: none;
  }

  .sky-route {
    animation: none;
  }

  /* Hero: title, slogan and booking button, without the long form. */
  .hero {
    min-height: 100vh;
    min-height: 100svh;
  }

  .hero-inner {
    gap: 16px;
    padding-bottom: 110px;
  }

  .hero h1 {
    font-size: clamp(30px, 9vw, 40px);
  }

  .hero-badge {
    font-size: 11px;
    padding: 8px 14px;
  }

  .bk-launch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding: 16px 28px;
    border: 0;
    border-radius: 14px;
    background: var(--gold-gradient);
    color: var(--ink);
    font: 700 16px var(--font-head);
    box-shadow: 0 14px 30px rgba(248, 151, 12, 0.4);
    cursor: pointer;
  }

  .bk-launch .material-symbols-rounded {
    font-size: 22px;
  }

  .bk-launch:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
  }

  .bk-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1;
    background: rgba(0, 12, 30, 0.55);
    opacity: 0;
    pointer-events: none !important;
    transition: opacity 0.3s ease;
  }

  /* The panel: fixed to the bottom, hidden below the screen until opened.
     (selector strengthened to sit above .reveal / .reveal.is-visible) */
  .hero-inner > .bk.reveal {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    width: auto;
    max-height: calc(100dvh - 40px);
    margin: 0;
    padding: 0 16px calc(20px + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.35);
    opacity: 1;
    visibility: hidden;
    transform: translateY(105%);
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.38s;
  }

  .hero-inner > .bk.reveal.is-open {
    visibility: visible;
    transform: none;
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  }

  body.bk-sheet-open {
    overflow: hidden;
  }

  /* Raises the hero (and therefore the panel) above the fixed navigation. */
  body.bk-sheet-open .hero-inner {
    z-index: 200;
  }

  body.bk-sheet-open .bk-backdrop {
    opacity: 1;
    pointer-events: auto !important;
  }

  .bk-sheet-head {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 3;
    align-items: center;
    justify-content: space-between;
    padding: 22px 2px 12px;
    background: #fff;
  }

  .bk-sheet-grip {
    position: absolute;
    top: 9px;
    left: 50%;
    width: 44px;
    height: 5px;
    margin-left: -22px;
    border-radius: 3px;
    background: #d5dde8;
  }

  .bk-sheet-title {
    font: 700 19px var(--font-head);
    color: var(--navy);
  }

  .bk-sheet-close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: var(--bg-alt);
    color: var(--navy);
    font-size: 22px;
    cursor: pointer;
  }

  .bk .bk-tab {
    background: var(--bg-alt);
  }

  .bk .bk-card {
    padding: 20px 2px 6px;
    border-radius: 0;
    box-shadow: none;
  }

  /* Departures board */
  .board-head {
    padding: 12px 18px;
    letter-spacing: 0.12em;
  }

  .board .stats-bar {
    padding: 22px 6px;
  }

  .board .stat-num {
    font-size: 26px;
    padding: 8px 12px;
  }

  /* Sections: less vertical space, headings closer together. */
  .services {
    padding-top: 72px;
    padding-bottom: 48px;
  }

  .destinations,
  .pay {
    padding: 64px 0;
  }

  .guarantees,
  .testimonials {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .section-head {
    margin-bottom: 30px;
  }

  .guarantees-grid {
    gap: 36px;
  }

  .pay-card {
    padding: 22px;
  }

  /* Tickets: swipeable carousel (native scrolling, no JS calculation on scroll). */
  .tickets-grid {
    display: flex;
    gap: 14px;
    margin: 0 -24px;
    padding: 12px 24px 24px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 24px;
    scrollbar-width: none;
  }

  .tickets-grid::-webkit-scrollbar {
    display: none;
  }

  .ticket {
    --stub: 108px;
    flex: 0 0 86%;
    scroll-snap-align: center;
  }

  .ticket-code {
    font-size: 20px;
  }

  /* "Fan" effect: neighboring tickets are tilted and scaled down.
     Driven by the browser (scroll-linked animation), without JavaScript. */
  @supports (animation-timeline: view()) {
    .ticket {
      animation: ticketFan linear both;
      animation-timeline: view(inline);
    }
  }

  .tickets-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
  }

  .tickets-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: #c3cddb;
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
  }

  .tickets-dots button[aria-current="true"] {
    width: 24px;
    background: var(--orange);
  }

  /* Destinations and reviews: swipeable rows instead of one long column. */
  .destinations-grid,
  .testi-grid {
    display: flex;
    gap: 14px;
    margin: 0 -24px;
    padding: 4px 24px 18px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 24px;
    scrollbar-width: none;
  }

  .destinations-grid::-webkit-scrollbar,
  .testi-grid::-webkit-scrollbar {
    display: none;
  }

  .dest-card,
  .dest-card:last-child {
    flex: 0 0 80%;
    height: 300px;
    scroll-snap-align: center;
  }

  .testi-card {
    flex: 0 0 85%;
    scroll-snap-align: center;
  }

  /* Footer: full-width logo, links in 2 columns. */
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
  }

  .footer-grid > :first-child {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column-reverse;
    text-align: center;
  }
}

@media (max-width: 560px) {
  .hero-slogan::before,
  .hero-slogan::after {
    display: none;
  }
}

@media (max-width: 380px) {
  .board .stat-num {
    font-size: 22px;
  }

  .board-status {
    display: none;
  }
}

@keyframes ticketFan {
  0% { transform: translateY(14px) rotate(7deg) scale(0.9); opacity: 0.55; }
  50% { transform: none; opacity: 1; }
  100% { transform: translateY(14px) rotate(-7deg) scale(0.9); opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
  .sky-route,
  .board-status::before,
  .ticket,
  .ticket:hover .ticket-path .material-symbols-rounded {
    animation: none;
  }
}
