/* Explo download section (#download): the closing payoff of the descent.
   A cream boarding pass prints out of a slot, its destination flips like the hero's split-flap pass,
   and a QR stub hands the app to the phone. Navy ink on cream, never pure white, nothing heavier than Medium (500).
   Flat on purpose: no glow, no sheen. Behaviour lives in download.js. */

.foot-cta .eyebrow { margin-bottom: 26px; }

.dl-feed {
  --ink: #020d1b;
  --ink-2: rgba(2, 13, 27, 0.58);
  --ink-line: rgba(2, 13, 27, 0.2);
  --stub: 272px;
  position: relative; z-index: 2;
  width: 100%; max-width: 984px; margin: 58px auto 0; padding: 0 24px;
}
/* The slot the pass comes out of: a lifted bezel with a dark mouth. The paper is tucked 14px up behind it, so it
   reads as fed through the slot instead of hanging off a bar. */
.dl-slot {
  position: relative; z-index: 3; height: 20px; margin: 0 -12px; border-radius: 999px;
  background: linear-gradient(180deg, #1b2f47, #0d1d31 52%, #081423);
  box-shadow: inset 0 1px 0 rgba(216, 216, 203, 0.24), inset 0 0 0 1px rgba(216, 216, 203, 0.09), 0 12px 22px -10px rgba(0, 0, 0, 0.85);
}
.dl-slot::after { content: ""; position: absolute; left: 20px; right: 20px; top: 10px; height: 4px; border-radius: 4px; background: #000; box-shadow: 0 1px 0 rgba(216, 216, 203, 0.14); }
/* The window the pass slides through: its top edge sits inside the slot, so the paper is clipped there and the bezel hides the join; the shadow spills out of the other three sides. */
.dl-window { position: relative; margin-top: -14px; clip-path: inset(0 -90px -110px -90px); }

.dl-pass {
  container-type: inline-size;
  position: relative; display: grid; grid-template-columns: 1fr; color: var(--ink);
  background: #f7f7f2; border-radius: 0 0 28px 28px;
  box-shadow: 0 46px 80px -44px rgba(0, 0, 0, 0.9), 0 14px 30px -18px rgba(0, 0, 0, 0.7);
  transform: perspective(1500px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.5s cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}
.dl-pass.has-qr {
  grid-template-columns: 1fr var(--stub);
  /* the perforation notch: only at the bottom, the top of the pass is inside the slot */
  -webkit-mask: radial-gradient(circle 15px at calc(100% - var(--stub)) 100%, #0000 97%, #000);
  mask: radial-gradient(circle 15px at calc(100% - var(--stub)) 100%, #0000 97%, #000);
}
.dl-pass.tilting { transition: transform 0.12s linear; }

/* print-out: the pass starts tucked behind the slot and feeds down */
.js .dl-pass:not(.printed) { transform: translateY(-101%); }
.js .dl-pass.printed { animation: dlFeed 1.5s cubic-bezier(.3, .7, .15, 1) backwards; }
@keyframes dlFeed { from { transform: translateY(-101%); } 60% { transform: translateY(-3%); } to { transform: translateY(0); } }

.dl-main { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 42px 34px 30px; border-radius: 0 0 28px 28px; overflow: hidden; }
/* contour rings printed on the paper, centred on the next stop and faded out toward the edges: the same language as the wordmark */
.dl-main::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: repeating-radial-gradient(circle at 84% 54%, transparent 0 15px, rgba(2, 13, 27, 0.075) 15px 16px, transparent 16px 31px);
  -webkit-mask-image: radial-gradient(ellipse 62% 78% at 84% 54%, #000 0, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
  mask-image: radial-gradient(ellipse 62% 78% at 84% 54%, #000 0, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
}
.dl-main > * { position: relative; z-index: 1; }
.dl-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; font-size: 11.5px; line-height: 1; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.dl-brand { display: inline-flex; align-items: center; gap: 9px; font-size: 19px; letter-spacing: -0.02em; text-transform: none; color: var(--ink); }
.dl-brand .logo { width: 22px; height: 22px; }
.dl-live { display: inline-flex; align-items: center; gap: 9px; }
.dl-live i { position: relative; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.dl-live i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid rgba(2, 13, 27, 0.5); animation: tripPing 2.4s ease-out infinite; }

/* route: YOU → next stop, split-flap tiles */
.dl-route { --tw: clamp(40px, 7.4cqi, 60px); display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 0; margin-top: 30px; }
.dl-end { min-width: 0; }
.dl-end.r { text-align: right; }
.dl-end b { display: block; margin-bottom: 12px; font-size: 11.5px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.dl-flap { display: flex; gap: 5px; }
.dl-end.r .dl-flap { justify-content: flex-end; }
.dl-flap span {
  display: grid; place-items: center; width: var(--tw); height: calc(var(--tw) * 1.38); border-radius: 9px;
  font-size: calc(var(--tw) * 0.78); font-weight: 500; line-height: 1; letter-spacing: 0; color: #d8d8cb; transform-origin: 50% 50%;
  background: linear-gradient(180deg, #092039 0 49%, #00050a 49% 51.5%, #06182c 51.5%);
  box-shadow: inset 0 1px 0 rgba(216, 216, 203, 0.14), 0 3px 8px -3px rgba(2, 13, 27, 0.6);
}
.dl-flap span.flip { animation: dlFlip 0.06s linear; }
@keyframes dlFlip { from { transform: scaleY(0.38); } }
.dl-end small { display: block; margin-top: 12px; min-height: 1.3em; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-end.r small.in { animation: tripSwap 0.45s cubic-bezier(.2, .8, .2, 1) both; }
.dl-path { position: relative; height: calc(var(--tw) * 1.38); margin: 0 clamp(12px, 3cqi, 28px); align-self: end; }
.dl-path::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed var(--ink-line); }
.dl-path svg { position: absolute; top: 50%; left: calc(var(--prog, 0) * (100% - 22px)); width: 22px; height: 22px; fill: var(--ink); transform: translateY(-50%) rotate(90deg); }

/* bottom row: the one action, then the facts */
.dl-act { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 28px; margin-top: auto; padding-top: 30px; }
.dl-main .dl-route + .dl-act { margin-top: 30px; border-top: 2px dashed var(--ink-line); }
.dl-act .btn { height: 56px; padding: 0 26px 0 28px; font-size: 17px; }
.dl-facts { display: flex; gap: 0; margin: 0; }
.dl-facts > div { padding: 0 22px; border-left: 1px solid var(--ink-line); }
.dl-facts > div:first-child { border-left: 0; padding-left: 0; }
.dl-facts > div:last-child { padding-right: 0; }
.dl-facts dt { font-size: 11.5px; line-height: 1; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.dl-facts dd { margin: 9px 0 0; font-size: 22px; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* the stub: scan to hand the app to the phone */
.dl-stub { display: none; position: relative; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 42px 26px 28px; border-left: 2px dashed var(--ink-line); text-align: center; }
.has-qr .dl-stub { display: flex; }
.dl-qr { width: 168px; height: 168px; padding: 12px; border-radius: 16px; border: 1px solid var(--ink-line); }
.dl-qr svg { width: 100%; height: 100%; }
.dl-stub p { max-width: 190px; font-size: 14.5px; line-height: 1.35; color: var(--ink-2); text-wrap: balance; }

@container (max-width: 640px) {
  .dl-act { flex-direction: column; align-items: stretch; }
  .dl-act .btn { width: 100%; }
  .dl-facts { justify-content: space-between; }
  .dl-facts > div { flex: 1; padding: 0 14px; }
  .dl-facts > div:first-child { padding-left: 0; }
  .dl-facts > div:last-child { padding-right: 0; }
}
@container (max-width: 470px) {
  .dl-main { padding: 36px 20px 22px; }
  .dl-route { margin-top: 22px; }
  .dl-flap { gap: 3px; }
  .dl-flap span { border-radius: 6px; }
  .dl-end b { margin-bottom: 9px; font-size: 10.5px; }
  .dl-end small { font-size: 12.5px; }
  .dl-facts dd { font-size: 18px; }
  .dl-facts > div { padding: 0 10px; }
}

/* the QR only makes sense on a big screen with a pointer: on a phone, the button is the way in */
@media (max-width: 860px), (hover: none) {
  .dl-pass.has-qr { grid-template-columns: 1fr; -webkit-mask: none; mask: none; }
  .has-qr .dl-stub { display: none; }
}
@media (max-width: 760px) {
  .dl-feed { margin-top: 44px; padding: 0 14px; }
  .dl-pass { border-radius: 0 0 24px 24px; }
  .dl-route { --tw: clamp(34px, 11.5cqi, 56px); }
}

@media (prefers-reduced-motion: reduce) {
  .js .dl-pass:not(.printed) { transform: none; }
  .js .dl-pass.printed { animation: none; }
  .dl-pass { transform: none !important; }
  .dl-live i::after { animation: none !important; }
}
