/* Homepage, Sky Atlas (owner, 17 Nov 2026): (1) the value proposition and the flight search, (2) a few departures,
   (3) how Melion works, (4) a short membership introduction, (5) trust and support. Every explanation sits on a solid
   cloud plate over the sky. Shared parts (frame, type, plates, fields, sky) live in /atlas/atlas.css; the search in
   /flight/trip.css. */

.home main { position: relative; }
.home .on-sky { color: var(--atlas-on-sky); }
.home section { padding: 0 var(--atlas-gutter); }
.home section > * { max-width: var(--atlas-max); margin-left: auto; margin-right: auto; }

/* ---------- hero: the promise and the search ---------- */
.hero { position: relative; display: grid; align-content: end; min-height: min(100svh, 1000px);
  padding-top: calc(var(--atlas-bar-h) + clamp(28px, 9vh, 120px)) !important; padding-bottom: clamp(32px, 6vh, 72px) !important; }
.hero-inner { display: grid; width: 100%; gap: clamp(24px, 4vh, 44px); }
.hero-copy { width: 100%; position: relative; isolation: isolate; }
/* white type over the sun: a deep, feathered field of sky behind the title and lede (measured: lede at least 7:1) */
.hero-copy::before { content: ""; position: absolute; z-index: -1; inset: -18% 0 -22% calc(-1 * var(--atlas-gutter)); pointer-events: none;
  background: radial-gradient(farthest-side at 32% 50%, rgba(5, 26, 66, 0.78) 0%, rgba(5, 26, 66, 0.7) 58%, rgba(5, 26, 66, 0) 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--atlas-gutter));
  mask-image: linear-gradient(90deg, transparent, #000 var(--atlas-gutter)); }
@media (max-width: 899px) {
  .hero-copy::before { inset: -14% calc(-1 * var(--atlas-gutter)) -18%;
    background: linear-gradient(180deg, rgba(5, 26, 66, 0) 0%, rgba(5, 26, 66, 0.78) 14%, rgba(5, 26, 66, 0.78) 86%, rgba(5, 26, 66, 0) 100%);
    -webkit-mask-image: none;
    mask-image: none; }
}
.hero .atlas-hero-title { max-width: 12em; font-size: clamp(2.5rem, 5.4vw + 0.25rem, 5.25rem); }
.hero-lede { margin-top: clamp(16px, 2.4vh, 26px) !important; max-width: 31em; color: #fff; }
/* The lede is two short paragraphs (owner, 24 Nov 2026): what the visitor does, then what Melion does. One block, so
   the layouts that place the lede beside or under the title still move it as a whole. Where that block is narrower
   than the longer sentence (18.4em: the tablet column beside the title, phones under 350 px) the two run on as one
   paragraph, as they did before, instead of each breaking in two. */
.hero-lede { container-type: inline-size; }
.hero-lede > p { margin: 0; }
.hero-lede > p + p { margin-top: 0.45em; }
@container (max-width: 18.75em) { .hero-lede > p { display: inline; } }
.hero .trip { max-width: none; }
@media (max-width: 699px) { .hero { padding-top: calc(var(--atlas-bar-h) + 24px) !important; min-height: auto; } }
@media (max-width: 380px) { .hero .atlas-hero-title { font-size: 2.375rem; } }

@media (min-width: 740px) and (not (display-mode: standalone)) and (not ((max-height: 500px) and (pointer: coarse))) {
  html:not([data-app="installed"]) .home .hero {
    min-height: auto;
    padding-top: calc(var(--atlas-bar-h) + clamp(24px, 4.6vh, 52px)) !important;
    padding-bottom: clamp(24px, 4vh, 44px) !important;
  }
  html:not([data-app="installed"]) .home .hero-inner { gap: clamp(18px, 2.8vh, 28px); }
  html:not([data-app="installed"]) .home .hero .atlas-hero-title { max-width: 17em; }
  html:not([data-app="installed"]) .home .hero .trip-modes { padding: 18px 20px 0; }
  html:not([data-app="installed"]) .home .hero .trip-mode > span { padding-block: 11px; }
  html:not([data-app="installed"]) .home .hero .trip-mode > span::before { top: 13px; }
  html:not([data-app="installed"]) .home .hero .trip-type-row { min-height: 54px; padding: 8px 20px; }
  html:not([data-app="installed"]) .home .hero .trip-fields .atlas-field { padding: 8px 16px; }
  html:not([data-app="installed"]) .home .hero .trip-foot { gap: 10px 16px; padding: 12px 20px 14px; }
  html:not([data-app="installed"]) .home .hero .trip-tz { flex-basis: 13rem; }
  html:not([data-app="installed"]) .home .hero .trip-first { padding-top: 8px; }
}

@media (min-width: 740px) and (max-width: 899px) and (not (display-mode: standalone)) and (not ((max-height: 500px) and (pointer: coarse))) {
  html:not([data-app="installed"]) .home .hero-copy::before {
    inset: -40% calc(-1 * var(--atlas-gutter)) -32%;
    background: linear-gradient(90deg, rgba(5, 26, 66, 0.82) 12%, rgba(5, 26, 66, 0.72) 64%, rgba(5, 26, 66, 0.18));
    -webkit-mask-image: linear-gradient(transparent, #000 24%, #000 76%, transparent);
    mask-image: linear-gradient(transparent, #000 24%, #000 76%, transparent);
  }
}

@media (min-width: 900px) and (max-width: 1199px) and (not (display-mode: standalone)) {
  html:not([data-app="installed"]) .home .hero-copy {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    align-items: end;
    gap: clamp(20px, 3vw, 36px);
  }
  html:not([data-app="installed"]) .home .hero .atlas-hero-title {
    font-size: clamp(2.75rem, 4.9vw, 4rem);
  }
  html:not([data-app="installed"]) .home .hero-lede { margin-top: 0 !important; }
}

@media (min-width: 1024px) and (max-width: 1199px) and (max-height: 650px) and (not (display-mode: standalone)) {
  html:not([data-app="installed"]) .home .hero {
    padding-top: calc(var(--atlas-bar-h) + 16px) !important;
  }
  html:not([data-app="installed"]) .home .hero-inner { gap: 14px; }
  html:not([data-app="installed"]) .home .hero-lede { font-size: 1.125rem; line-height: 1.45; }
  html:not([data-app="installed"]) .home .hero .trip-go { order: -1; margin-inline-start: 0; }
}

@media (min-width: 1024px) and (max-width: 1099px) and (max-height: 650px) and (not (display-mode: standalone)) {
  html:not([data-app="installed"]) .home .hero .trip-fields:has(.trip-return:not([hidden])) {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr) minmax(10.5rem, 1fr) minmax(10.5rem, 1fr) minmax(7rem, 0.62fr);
  }
  html:not([data-app="installed"]) .home .hero .trip-fields:has(.trip-return:not([hidden])) > .atlas-field {
    grid-column: auto;
  }
}

@media (min-width: 1200px) and (not (display-mode: standalone)) {
  html:not([data-app="installed"]) .home .hero {
    min-height: min(88svh, 840px);
    align-content: center;
    padding-top: calc(var(--atlas-bar-h) + clamp(48px, 4.6vh, 56px)) !important;
  }
  html:not([data-app="installed"]) .home .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.27fr);
    grid-template-areas: "copy search";
    column-gap: clamp(32px, 4vw, 68px);
    align-items: start;
  }
  html:not([data-app="installed"]) .home .hero-copy {
    grid-area: copy;
    margin-top: clamp(30px, 8vh, 76px);
  }
  html:not([data-app="installed"]) .home .hero-copy::before {
    inset: -36% -12% -40% calc(-1 * var(--atlas-gutter));
  }
  html:not([data-app="installed"]) .home .hero .atlas-hero-title {
    font-size: clamp(3.25rem, 4.6vw, 4.125rem);
    text-wrap: wrap;
  }
  html:not([data-app="installed"]) .home .hero .trip { grid-area: search; }
  html:not([data-app="installed"]) .home .hero .trip-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html:not([data-app="installed"]) .home .hero .trip-fields:has(.trip-return:not([hidden])) {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  html:not([data-app="installed"]) .home .hero .trip-fields:has(.trip-return:not([hidden])) > .atlas-field {
    grid-column: span 2;
  }
  html:not([data-app="installed"]) .home .hero .trip-fields:has(.trip-return:not([hidden])) > :is(.trip-from, .trip-to) {
    grid-column: span 3;
  }
}

@media (min-width: 1024px) and (max-height: 650px) and (not (display-mode: standalone)) {
  html:not([data-app="installed"]) .home .atlas-bar[data-on="sky"]::before { height: calc(var(--atlas-bar-h) + 8px); }
}

/* Keep the booking action visible in short, wide desktop viewports without
   shrinking controls below 44px or changing the tablet and phone layouts. */
@media (min-width: 1200px) and (max-height: 650px) and (not (display-mode: standalone)) {
  html:not([data-app="installed"]) .home .hero {
    min-height: auto;
    padding-top: calc(var(--atlas-bar-h) + 8px) !important;
    padding-bottom: 12px !important;
  }
  html:not([data-app="installed"]) .home .hero-copy { margin-top: 12px; }
  html:not([data-app="installed"]) .home .hero-inner { row-gap: 12px; }
  html:not([data-app="installed"]) .home .hero .trip-modes { padding: 10px 14px 0; }
  html:not([data-app="installed"]) .home .hero .trip-legend { margin-bottom: 6px; font-size: 0.9375rem; }
  html:not([data-app="installed"]) .home .hero .trip-mode > span { padding-block: 8px; }
  html:not([data-app="installed"]) .home .hero .trip-mode > span::before { top: 11px; }
  html:not([data-app="installed"]) .home .hero .trip-type-row { min-height: 48px; padding: 4px 14px; }
  html:not([data-app="installed"]) .home .hero .trip-type span { min-height: 38px; }
  html:not([data-app="installed"]) .home .hero .trip-fields .atlas-field { padding: 6px 12px; }
  html:not([data-app="installed"]) .home .hero .trip-foot { gap: 6px 12px; padding: 8px 14px; }
  html:not([data-app="installed"]) .home .hero .trip-tz { flex-basis: 13rem; font-size: 0.875rem; line-height: 1.3; }
  html:not([data-app="installed"]) .home .hero .trip-first { padding-top: 4px; font-size: 0.875rem; line-height: 1.3; }
  html:not([data-app="installed"]) .home .hero .trip-first a { padding-block: 2px; }
  html:not([data-app="installed"]) .home .hero .trip-go { order: -1; min-height: 44px; margin-inline-start: 0; }
}

/* ---------- the bands below: one plate each ---------- */
.home-band { padding-top: clamp(28px, 4vw, 56px) !important; }
.home-band .atlas-h2 { font-size: clamp(1.875rem, 1.8vw + 1.2rem, 2.875rem); }

/* ---------- ledger: empty legs passing today ---------- */
.ledger-plate { display: grid; grid-template-columns: minmax(min(22rem, 100%), 0.8fr) 2fr; /* 22rem keeps "Departing soon" on one line at its largest size */ gap: clamp(28px, 4vw, 64px); padding: clamp(28px, 4vw, 56px); }
.ledger-head { position: sticky; top: calc(var(--atlas-bar-h) + 32px); align-self: start; display: grid; gap: 20px; justify-items: start; }
.ledger-head p { margin: 0; color: var(--atlas-ink-2); max-width: 34ch; }
.ledger-live { display: grid; justify-items: start; gap: 8px; min-width: 0; width: 100%; }
.ledger-live .atlas-figure { color: var(--atlas-zenith); font-size: clamp(2.5rem, calc(2rem + 2vw), 3.5rem); white-space: nowrap; font-variant-numeric: lining-nums proportional-nums; }
.ledger-live > span:last-child { color: var(--atlas-ink-2); font-size: var(--atlas-t-small); line-height: 1.5; overflow-wrap: anywhere; }
.ledger-live .atlas-label { color: var(--atlas-live); }
.ledger-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--atlas-rule); }
.ledger-rows li { border-bottom: 1px solid var(--atlas-rule); }
.ledger-rows a { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; grid-template-areas: "craft route price" "craft meta price"; align-items: center; column-gap: 24px; row-gap: 4px;
  padding: 16px 12px 16px 0; text-decoration: none; position: relative; transition: background-color 300ms var(--atlas-ease); }
.ledger-rows a::before { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--atlas-azure); transform: scaleX(0); transform-origin: left; transition: transform 500ms var(--atlas-ease); }
.ledger-rows a:hover { background: linear-gradient(90deg, var(--atlas-haze), rgba(228, 238, 249, 0)); }
.ledger-rows a:hover::before { transform: scaleX(1); }
.ledger-craft { grid-area: craft; width: 132px; height: 76px; object-fit: contain; transition: transform 700ms var(--atlas-ease); }
.ledger-rows a:hover .ledger-craft { transform: translateX(6px) rotate(-1.5deg); }
.ledger-route { grid-area: route; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; min-width: 0; }
.ledger-route b { font: 620 1.375rem/1.2 var(--atlas-display); letter-spacing: -0.01em; min-width: 0; overflow-wrap: anywhere; }
.ledger-route b i { font-style: normal; color: var(--atlas-azure); padding: 0 0.15em; }
.ledger-route small { font: 500 0.875rem/1 var(--atlas-text); letter-spacing: 0.02em; color: var(--atlas-ink-3); }
.ledger-meta { grid-area: meta; font-size: var(--atlas-t-small); color: var(--atlas-ink-2); }
.ledger-price { grid-area: price; display: grid; justify-items: end; gap: 3px; text-align: right; white-space: nowrap; }
.ledger-price b { font: 600 1.375rem/1 var(--atlas-num); font-variant-numeric: lining-nums proportional-nums; letter-spacing: -0.01em; }
.ledger-price small { font: 500 0.8125rem/1.2 var(--atlas-text); color: var(--atlas-ink-3); }
.ledger-price small:first-child { color: var(--atlas-sun-ink); font-weight: 600; }
.ledger-source, .ledger-location-note { display: block; margin-top: 5px; font-size: 0.8125rem; line-height: 1.35; }
.ledger-source { color: var(--atlas-azure); }
.ledger-location-note { color: var(--atlas-ink-3); }
.ledger-price.is-source { max-width: 240px; white-space: normal; overflow-wrap: anywhere; }
.ledger-price.is-source b { line-height: 1.2; }
.ledger-price .ledger-price-conditions { line-height: 1.4; }
@media (max-width: 899px) {
  .ledger-plate { grid-template-columns: 1fr; padding: 24px 18px; }
  .ledger-head { position: static; }
  .ledger-rows a { grid-template-columns: 84px minmax(0, 1fr) auto; column-gap: 14px; padding-right: 4px; }
  .ledger-craft { width: 84px; height: 52px; }
  .ledger-route b { font-size: 1.1875rem; }
  .ledger-price b { font-size: 1.1875rem; }
}
@media (min-width: 900px) and (max-width: 1199px) and (not (display-mode: standalone)) {
  html:not([data-app="installed"]) .home .ledger-rows a {
    grid-template-columns: 96px minmax(0, 1fr) minmax(0, 32%);
    column-gap: 14px;
  }
  html:not([data-app="installed"]) .home .ledger-craft { width: 96px; height: 60px; }
  html:not([data-app="installed"]) .home .ledger-wait {
    grid-template-columns: 96px minmax(0, 1fr) 72px;
    column-gap: 14px;
    min-height: 92px;
  }
}
/* phones: the route takes the row's width and the price reads under the meta, so names and dates are not split */
@media (max-width: 599px) {
  .ledger-rows a { grid-template-columns: 84px minmax(0, 1fr); grid-template-areas: "craft route" "craft meta" "craft price"; }
  .ledger-price { text-align: left; justify-items: start; margin-top: 4px; }
  .ledger-meta span:not(:first-child) { white-space: nowrap; }
}

/* the ledger when no current listing is known: one line to the live board */
.ledger-empty a { display: block; padding-block: 18px; }
/* the rows while the live board answers: three soft bars in the row's own layout */
.ledger-wait { display: grid; grid-template-columns: 132px minmax(0, 1fr) 96px; align-items: center; column-gap: 24px; padding: 16px 12px 16px 0; min-height: 108px; }
.ledger-wait span { height: 14px; border-radius: 2px; background: linear-gradient(90deg, var(--atlas-haze) 0%, #fff 50%, var(--atlas-haze) 100%) 0 0 / 200% 100%; animation: ledger-wait 1.6s linear infinite; }
.ledger-wait span:first-child { height: 52px; }
@media (max-width: 899px) { .ledger-wait { grid-template-columns: 84px minmax(0, 1fr) 64px; column-gap: 14px; min-height: 84px; } .ledger-wait span:first-child { height: 40px; } }
@keyframes ledger-wait { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .ledger-wait span { animation: none; } }


.ledger-head .atlas-btn { margin-top: 4px; }

/* ---------- how Melion works, in five steps ---------- */
.how-plate { display: grid; gap: clamp(24px, 3vw, 40px); padding: clamp(28px, 4vw, 56px); }
.how-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px clamp(20px, 3vw, 48px); align-items: end; }
.how-head p { margin: 0; color: var(--atlas-ink-2); max-width: 46ch; }
.how-head .atlas-link, .ledger-head .atlas-link { min-height: 44px; }
@media (max-width: 899px) { .how-head { grid-template-columns: 1fr; justify-items: start; } }
/* The five steps as a route (owner, 24 Nov 2026): each stop is the "O" of the Melion wordmark, a navy ring with the
   sun setting in it, joined by a hairline; "Step 01" in sun ink above each title. Across on wide screens, down on phones. */
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 32px 24px; counter-reset: step; }
.how-steps li { counter-increment: step; position: relative; display: grid; align-content: start; gap: 8px; padding-top: 46px; }
.how-steps li::before { content: ""; position: absolute; z-index: 1; top: 0; left: 0; width: 28px; height: 28px; box-sizing: border-box; padding: 3px;
  border: 1.5px solid var(--atlas-zenith); border-radius: 50%; background: linear-gradient(transparent 50%, var(--atlas-sun) 50%) content-box; }
.how-steps li::after { content: ""; position: absolute; top: 13.5px; left: 38px; right: -14px; height: 1px; background: var(--atlas-rule-2); }
.how-steps li:last-child::after { display: none; }
.how-steps h3 { margin: 0; font: 650 1.125rem/1.3 var(--atlas-display); }
.how-steps h3::before { content: "Step " counter(step, decimal-leading-zero); display: block; margin-bottom: 8px; font: 650 0.75rem/1 var(--atlas-num);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--atlas-sun-ink); }
.how-steps p { margin: 0; color: var(--atlas-ink-2); font-size: 1rem; }
@media (max-width: 1099px) { .how-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } .how-steps li:nth-child(3n)::after { display: none; } }
@media (max-width: 699px) {
  .how-steps { grid-template-columns: 1fr; gap: 0; }
  .how-steps li { padding: 4px 0 30px 50px; }
  .how-steps li:last-child { padding-bottom: 0; }
  .how-steps li::after, .how-steps li:nth-child(3n)::after { display: block; top: 34px; bottom: 6px; left: 13.5px; right: auto; width: 1px; height: auto; }
  .how-steps li:last-child::after { display: none; }
}

/* ---------- membership, introduced ---------- */
.member-plate { display: grid; grid-template-columns: 1.1fr 1fr auto; gap: clamp(20px, 3vw, 48px); align-items: center; padding: clamp(28px, 4vw, 56px); }
@media screen {
  .member-plate { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, max-content); }
  .member-plate > * { min-inline-size: 0; overflow-wrap: anywhere; }
  .member-plate .atlas-btn { white-space: normal; overflow-wrap: anywhere; }
}
.member-copy { display: grid; gap: 14px; }
.member-copy p { margin: 0; color: var(--atlas-ink-2); max-width: 46ch; }
.member-points li { font-size: 1rem; }
@media (max-width: 1099px) { .member-plate { grid-template-columns: 1fr; align-items: start; } }
@media screen and (max-width: 1099px) { .member-plate { grid-template-columns: minmax(0, 1fr); } }

/* ---------- trust and support ---------- */
.trust-plate { display: grid; grid-template-columns: 2fr minmax(280px, 1fr); gap: clamp(24px, 4vw, 64px); padding: clamp(28px, 4vw, 56px); }
.trust-copy { display: grid; gap: 24px; align-content: start; }
.trust-points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.trust-points li { display: grid; gap: 10px; align-content: start; padding-top: 16px; border-top: 1px solid var(--atlas-rule-2); }
.trust-points h3 { margin: 0; font: 650 1.125rem/1.3 var(--atlas-display); }
.trust-points p { margin: 0; color: var(--atlas-ink-2); font-size: 1rem; }
.trust-points .atlas-link { min-height: 44px; }
.support-card { display: grid; gap: 14px; align-content: start; padding: clamp(20px, 2.4vw, 32px); background: var(--atlas-zenith); color: #fff; border-radius: var(--atlas-radius); }
.support-card h3 { margin: 0; font: 650 1.375rem/1.25 var(--atlas-display); }
.support-card p { margin: 0; color: #fff; }
.support-card :focus-visible { outline-color: #fff; }
.support-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.support-card .atlas-btn { --bg: #fff; --fg: var(--atlas-ink); }
.support-card .atlas-btn-line { --bg: transparent; --fg: #fff; border-color: rgba(255, 255, 255, 0.7); }
.support-card .atlas-btn-line:hover { --bg: rgba(255, 255, 255, 0.12); }
.support-med { font-size: 0.9375rem; }
.support-med .atlas-link { color: #fff; text-decoration: underline; text-underline-offset: 0.2em; margin-right: 6px; }
@media (max-width: 1099px) { .trust-plate { grid-template-columns: 1fr; } }
@media (max-width: 799px) { .trust-points { grid-template-columns: 1fr; } }
.home .atlas-foot { padding-top: clamp(96px, 12vw, 180px); }
