/* ---- Home hero (#top) ---- */
/* Light hero: copy, the radar map of nine flights (home-hero.js moves them on the shared clock) and the boarding-pass strip.
   The markup is the finished state that reduced motion, low fps and no JS keep. Layout applies in both themes;
   [data-theme="dark"] rules change colours and surfaces only; animations run only under html.motion. */
html.da-home #top {
  position: relative;
  z-index: 1;
  padding-block-start: 78px;
  color: var(--text);
  background: transparent;
}
html.da-home #top .hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 13fr) minmax(0, 12fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "copy vis" "facts vis";
  column-gap: 48px;
  align-items: start;
  padding-block: 36px 56px;
}
html.da-home #top .hero-copy {
  grid-area: copy;
  padding-block-start: 8px;
}
html.da-home #top .hero-vis {
  grid-area: vis;
  align-self: center;
}
html.da-home #top .hero-facts {
  grid-area: facts;
  align-self: start;
  position: relative;
  isolation: isolate;
}

/* copy */
html.da-home #top .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  padding: 8px 16px;
  border: 1px solid var(--rim);
  border-radius: var(--r-pill);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-hi), 0 10px 24px -16px rgba(31, 111, 209, 0.35);
  font: 500 14px/1.2 var(--body);
  letter-spacing: 0;
  color: var(--ink);
}
html.da-home #top .eyebrow i {
  width: 40px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}
html.da-home #top h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(32px, calc(24px + 24 * (100vw - 320px) / 880), 48px);
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--ink);
}
html.da-home #top h1 .l2 {
  display: block;
}
html.da-home #top .lede {
  max-width: 31em;
  margin: 22px 0 0;
  font-size: 18.5px;
  line-height: 1.6;
  color: var(--text);
}
html.da-home #top .cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  margin-block-start: 30px;
}

/* radar map */
html.da-home #top .console {
  overflow: hidden;
  border: 1px solid var(--i-line-2);
  border-radius: 14px;
  background: var(--i-panel);
  box-shadow: var(--sh-3);
}
html.da-home #top .map {
  display: block;
  width: 100%;
  height: auto;
  direction: ltr;
  background: var(--i-bg);
}
html.da-home #top .map text {
  font-family: var(--body);
  font-size: 13px;
  fill: var(--i-muted);
}
html.da-home #top .map .lbl {
  font-size: 14px;
  fill: var(--i-text);
}
html.da-home #top .map .hd {
  font-weight: 500;
  fill: var(--i-text);
}
/* Centred labels mixing Arabic and Latin read right to left on the Arabic page; the map itself stays left to right. */
html.da-home[dir="rtl"] #top .map .hd,
html.da-home[dir="rtl"] #top .hub text {
  direction: rtl;
}
html.da-home #top .map .ring {
  fill: none;
  stroke: var(--i-line);
  stroke-width: 1;
}
html.da-home #top .map .tick {
  stroke: var(--i-line-2);
  stroke-width: 1;
}
html.da-home #top .map .sweep {
  transform-box: view-box;
  transform-origin: 360px 200px;
}
html.da-home.motion #top .map .sweep {
  animation: hero-sweep 9s linear infinite;
}
html.da-home #top .map .route {
  fill: none;
  stroke: var(--i-line-2);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}
html.da-home #top .map .trail {
  fill: none;
  stroke: var(--i-blue);
  stroke-width: 1.6;
  stroke-linecap: round;
}
html.da-home #top .hub circle {
  fill: var(--i-panel);
  stroke: var(--i-blue);
}
html.da-home #top .mn rect {
  fill: var(--i-panel);
  stroke: var(--i-line-2);
  stroke-width: 1;
}
html.da-home #top .mn.active rect {
  stroke: var(--i-blue);
  stroke-width: 1.8;
}
html.da-home #top .arv {
  opacity: 0;
  transition: opacity 0.25s;
}
html.da-home #top .arv.on {
  opacity: 1;
}
html.da-home #top .arv rect {
  fill: none;
  stroke: var(--i-green);
  stroke-width: 1.6;
}
html.da-home #top .map .arv text {
  font: 500 12px var(--body);
  fill: var(--i-green);
}
html.da-home #top .flight .ac {
  fill: var(--i-blue);
  color: var(--i-blue);
}
html.da-home #top .flight.hold .ac {
  display: none;
}
html.da-home #top .flight.landed .ac {
  fill: var(--i-green);
  color: var(--i-green);
}
html.da-home #top .flight .tag rect {
  fill: var(--i-tag);
  stroke: var(--i-line-2);
}
html.da-home #top .map .flight .tag text {
  font-family: var(--mono);
  font-size: 10px;
  fill: var(--i-text);
}
html.da-home #top .flight .halo {
  fill: none;
  stroke-width: 1.4;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
html.da-home #top .flight.hold .halo {
  stroke: #00c5e8;
  opacity: 1;
}
html.da-home #top .flight.landed .halo {
  stroke: var(--i-green);
  opacity: 1;
}
html.da-home.motion #top .flight.hold .halo,
html.da-home.motion #top .flight.landed .halo {
  animation: hero-halo 1.4s ease-out infinite;
}

/* partner badges under the map */
html.da-home #top .hero-badge {
  margin: 16px auto 0;
  background: linear-gradient(120deg, #1a4b9c, #0f2a6e 60%, #0c2259);
}
html.da-home #top a.hb-row {
  text-decoration: none;
}

/* boarding-pass strip; the plane glides the dotted route on its top edge */
html.da-home #top .hero-facts::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -30% 0 -20% 6%;
  pointer-events: none;
  background:
    radial-gradient(40% 50% at 28% 55%, var(--hp-g1), transparent 70%),
    radial-gradient(35% 45% at 76% 45%, var(--hp-g2), transparent 70%);
  filter: blur(20px);
}
html.da-home #top .hpass {
  position: relative;
  margin-block-start: 34px;
  padding-block-start: 22px;
  border: 1px solid var(--rim);
  border-radius: 16px;
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-hi), var(--glass-sh);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html.da-home #top .hpass,
  html.da-home #top .eyebrow {
    background: var(--glass-fb);
  }
}
html.da-home #top .hp-route {
  position: absolute;
  inset-block-start: 0;
  inset-inline: 20px;
  height: 22px;
  color: var(--brand);
}
html.da-home #top .hp-line {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
html.da-home #top .hp-plane {
  position: absolute;
  inset-block-start: 3px;
  inset-inline-start: 62%;
  width: 16px;
  height: 16px;
  fill: currentColor;
}
html.da-home[dir="rtl"] #top .hp-plane {
  transform: scaleX(-1);
}
html.da-home #top .hp-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}
html.da-home #top .hp-facts > div {
  padding: 12px 20px 18px;
}
html.da-home #top .hp-facts > div:nth-child(even) {
  border-inline-start: 1px dashed var(--line-2);
}
html.da-home #top .hp-facts > div:nth-child(n + 3) {
  border-block-start: 1px dashed var(--line-2);
}
html.da-home #top .hp-facts small {
  display: block;
  font: 600 10.5px/1 var(--body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
/* Arabic letters must stay joined: no tracking */
html.da-home[dir="rtl"] #top .hp-facts small {
  letter-spacing: 0;
}
html.da-home #top .hp-facts b {
  display: block;
  margin-block-start: 9px;
  font: 600 26px/1 var(--display);
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--ink);
}
html.da-home #top .hp-facts .gt b {
  color: var(--gate-ink);
}
html.da-home #top .hp-facts span {
  display: block;
  margin-block-start: 7px;
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--muted);
}

html.da-home #top .rwy-rule {
  position: relative;
  z-index: 2;
  height: 3px;
  margin-block: 16px -1.5px;
  background: repeating-linear-gradient(90deg, var(--brand-line) 0 36px, transparent 36px 64px);
  background-clip: content-box;
  opacity: 0.9;
}

/* dark: colours only */
html.da-home[data-theme="dark"] #top .inv {
  filter: invert(1);
}
html.da-home[data-theme="dark"] #top .hp-facts .gt b {
  color: var(--gate);
}

@media (max-width: 1080px) {
  html.da-home #top .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "vis" "facts";
    row-gap: 40px;
    padding-block: 28px 56px;
  }
  html.da-home #top .hero-copy {
    padding: 0;
  }
  html.da-home #top .hpass {
    margin-block-start: 0;
  }
}
@media (min-width: 801px) and (max-width: 1080px) {
  html.da-home #top .hp-facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  html.da-home #top .hp-facts > div:nth-child(n + 3) {
    border-block-start: 0;
  }
  html.da-home #top .hp-facts > div + div {
    border-inline-start: 1px dashed var(--line-2);
  }
}
@media (max-width: 767px) {
  html.da-home #top h1 .l2 {
    display: inline;
  }
}
@media (max-width: 640px) {
  html.da-home #top {
    padding-block-start: 64px;
  }
  html.da-home #top .hero-grid {
    row-gap: 28px;
    padding-block: 20px 44px;
  }
  html.da-home #top .eyebrow {
    gap: 10px;
    margin-block-end: 18px;
    padding: 7px 14px;
    font-size: 13px;
  }
  html.da-home #top .eyebrow i {
    width: 24px;
  }
  html.da-home #top .lede {
    margin-block-start: 16px;
    font-size: 16.5px;
  }
  html.da-home #top .cta-row {
    margin-block-start: 22px;
  }
  html.da-home #top .console {
    margin-inline: -4px;
    border-radius: 12px;
    background: var(--i-bg);
  }
  /* phone map: crop the 720x420 viewBox to 102..698 x 2..443 so the destination column and its two group labels (the legend)
     have equal space above and below; the other labels hide and the nodes, hub and planes grow so the radar fills the card */
  html.da-home #top .map {
    width: calc(100% * 720 / 596);
    max-width: none;
    margin-inline-start: calc(-100% * 102 / 596);
    margin-block: calc(-100% * 2 / 596) calc(100% * 23 / 596);
  }
  html.da-home #top .map .lbl,
  html.da-home #top .map .src-t,
  html.da-home #top .flight .tag {
    display: none;
  }
  html.da-home #top .map .src-t.grp {
    display: inline;
    font-size: 15px;
    font-weight: 500;
    fill: var(--i-muted);
    transform: translate(-6px, -8px);
  }
  html.da-home #top .mn rect,
  html.da-home #top .mn image {
    transform-box: fill-box;
    transform-origin: center;
  }
  html.da-home #top .mn rect {
    transform: scale(1.4);
  }
  html.da-home #top .mn image {
    transform: scale(1.45);
  }
  html.da-home #top .arv rect {
    transform: scale(1.25);
    transform-box: fill-box;
    transform-origin: center;
  }
  html.da-home #top .map .arv text {
    font-size: 16px;
    font-weight: 600;
    transform: translate(5px, -11px);
  }
  html.da-home #top .hub {
    transform: scale(1.5);
    transform-box: view-box;
    transform-origin: 360px 200px;
  }
  html.da-home #top .hub circle {
    filter: drop-shadow(0 0 5px rgba(62, 111, 244, 0.55));
  }
  html.da-home #top .flight .ac {
    transform: scale(1.4);
    transform-box: fill-box;
    transform-origin: center;
  }
}
@media (max-width: 600px) {
  html.da-home #top .hp-facts > div {
    padding: 12px 14px 16px;
  }
  html.da-home #top .hp-facts b {
    font-size: 24px;
  }
  html.da-home #top .hp-facts span {
    font-size: 13px;
  }
}
@media (max-width: 520px) {
  html.da-home #top .hero-badge {
    margin-block-start: 16px;
  }
}
@keyframes hero-sweep {
  to {
    transform: rotate(360deg);
  }
}
@keyframes hero-halo {
  from {
    transform: scale(0.6);
    opacity: 1;
  }
  to {
    transform: scale(2.1);
    opacity: 0;
  }
}
