/* ==========================================================================
   pass.css — 2027's own look. "New year, new me."
   2026 was a parcel in the post: centred, bunting, balloons, Instrument
   Serif. 2027 is a boarding pass: left-aligned, glass, a departure board,
   Fraunces and IBM Plex Mono, and a calmer sky. Loads after styles.css and
   party.css, so everything here wins.
   ========================================================================== */

:root {
  --font-disp: 'Fraunces', ui-serif, Georgia, 'Times New Roman', serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* a calmer sky this year: no bunting, no balloons */
#garland, #balloons { display: none !important; }

.gate-2027 .gate-inner { width: min(760px, 100%); text-align: left; }
@media (max-height: 700px) { .gate-2027 { padding-top: 36px; } }

/* ---------------------------------------------------------------- hello */
.pass-eyebrow {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 18px;
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-faint);
  animation: pass-in .8s var(--ease) both;
}
.pass-eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--gold); opacity: .75; flex: none; }

.pass-hello { margin: 0 0 clamp(24px, 4vw, 36px); font-weight: 400; }
.pass-hello-small {
  display: block;
  font-family: var(--font-disp); font-style: italic; font-weight: 300;
  font-size: clamp(1.3rem, 4.6vw, 1.9rem); color: var(--text-dim);
  animation: pass-in .8s var(--ease) .05s both;
}
/* the animation lives on the wrapper: iPhone Safari draws gradient-clipped
   text as nothing when the same element is also animated or filtered */
.pass-name-wrap { display: block; animation: pass-in .9s var(--ease) .1s both; }
.gate-2027 .pass-name {
  display: inline-block; padding: 0 .04em .08em 0;
  font-family: var(--font-disp); font-weight: 600;
  font-size: clamp(3.4rem, 15vw, 7.4rem); line-height: .95; letter-spacing: -.025em;
  background: linear-gradient(100deg, var(--gold) 0%, #fff6d6 32%, var(--mint) 68%, var(--cyan) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
@keyframes pass-in { from { opacity: 0; transform: translateY(14px); } }

/* ---------------------------------------------------------------- the pass */
.pass {
  position: relative; display: flex; align-items: stretch;
  border-radius: 22px;
  background: linear-gradient(150deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .02) 62%);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 40px 80px -40px rgba(0, 0, 0, .95);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  animation: pass-in .9s var(--ease) .18s both;
}
.pass-main { flex: 1 1 auto; min-width: 0; padding: clamp(20px, 3.4vw, 30px); }

.pass-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding-bottom: 12px; margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
}
.pass-brand { color: var(--gold); font-weight: 600; }
.pass-class { color: var(--text-faint); }

.pass-label {
  display: block;
  font-family: var(--font-mono); font-size: .6rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-faint);
}

.pass-route {
  display: grid; align-items: end; gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(84px, 1.1fr) minmax(0, 1fr);
}
.pass-end { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pass-end-to { align-items: flex-end; text-align: right; }
.pass-city {
  font-family: var(--font-disp); font-weight: 500;
  font-size: clamp(1.5rem, 5.6vw, 2.4rem); line-height: 1.05; color: var(--cream);
  overflow-wrap: anywhere;
}
.pass-time { font-family: var(--font-mono); font-size: .86rem; color: var(--text-dim); }

.pass-path { text-align: center; color: var(--gold); padding-bottom: 4px; }
.pass-arc { display: block; width: 100%; height: auto; overflow: visible; }
.pass-plane path { transform-box: fill-box; transform-origin: center; animation: plane-bob 4s ease-in-out infinite; }
@keyframes plane-bob { 50% { transform: translateY(-2.5px); } }
.pass-gap {
  display: block; margin-top: 2px;
  font-family: var(--font-mono); font-size: .58rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold);
}

.pass-fields {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
  margin: 22px 0 0; padding-top: 16px;
  border-top: 1px dashed rgba(255, 255, 255, .12);
}
.pass-fields dt {
  font-family: var(--font-mono); font-size: .6rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-faint);
}
.pass-fields dd {
  margin: 3px 0 0; font-family: var(--font-mono); font-size: .88rem; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------------------------------------------------------------- the departure board */
.board {
  margin-top: 22px; padding: 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, .38);
  border: 1px solid rgba(255, 255, 255, .06);
}
.board-title {
  display: flex; align-items: center; gap: 9px;
  margin: 0 0 12px;
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold);
}
.board-title::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--mint); box-shadow: 0 0 0 3px rgba(74, 222, 128, .16);
  animation: live 1.6s ease-in-out infinite;
}
@keyframes live { 50% { opacity: .35; } }

.gate-2027 .board-row { justify-content: flex-start; gap: clamp(6px, 2vw, 12px); margin: 0; }
/* undo 2026's glass countdown boxes */
.gate-2027 .cd-unit {
  min-width: 0; padding: 0; align-items: flex-start;
  background: none; border: 0; box-shadow: none; border-radius: 0;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  animation: none;
}
.gate-2027 .cd-unit::before { display: none; }
/* split-flap tiles */
.gate-2027 .cd-num {
  position: relative;
  padding: .32em .42em; border-radius: 8px;
  font-family: var(--font-mono); font-weight: 600; letter-spacing: .06em;
  font-size: clamp(1.45rem, 6.2vw, 2.25rem); line-height: 1;
  color: var(--gold); text-shadow: none;
  background: linear-gradient(180deg, #18241f 0 50%, #0f1814 50% 100%);
  border: 1px solid rgba(255, 255, 255, .07);
}
.gate-2027 .cd-num::after {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px;
  background: rgba(0, 0, 0, .6);
}
.gate-2027 .cd-num.pop { animation: flap .5s var(--ease); }
@keyframes flap {
  0% { transform: perspective(300px) rotateX(-75deg); opacity: .35; }
  100% { transform: none; opacity: 1; }
}
.gate-2027 .cd-lbl {
  margin-top: 7px;
  font-family: var(--font-mono); font-size: .58rem; letter-spacing: .16em;
  color: var(--text-faint);
}
.gate-2027 .countdown.is-close .cd-num { color: var(--mint); }
.gate-2027 .countdown.is-close .cd-unit { border: 0; box-shadow: none; }

/* ---------------------------------------------------------------- the stub */
.pass-stub {
  position: relative; flex: 0 0 clamp(150px, 26%, 196px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  padding: clamp(20px, 3.4vw, 30px) 20px;
  border-left: 2px dashed rgba(255, 255, 255, .14);
}
/* the two notches either end of the tear line */
.pass-stub::before, .pass-stub::after {
  content: ''; position: absolute; left: -12px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg-0); border: 1px solid rgba(255, 255, 255, .12);
}
.pass-stub::before { top: -12px; }
.pass-stub::after { bottom: -12px; }
.stub-seat b {
  display: block; margin-top: 2px;
  font-family: var(--font-disp); font-weight: 600; font-size: 2.6rem; line-height: 1;
  color: var(--gold);
}
.stub-barcode {
  display: block; width: 100%; max-width: 150px; height: 50px; border-radius: 2px; opacity: .72;
  background: repeating-linear-gradient(90deg,
    var(--text) 0 2px, transparent 2px 4px, var(--text) 4px 5px, transparent 5px 8px,
    var(--text) 8px 11px, transparent 11px 12px, var(--text) 12px 13px, transparent 13px 17px);
}
.stub-note { margin: auto 0 0; font-size: .8rem; line-height: 1.5; color: var(--text-dim); }
.stub-note strong { color: var(--gold); font-weight: 600; }

.gate-2027 .tz-note {
  margin: 16px 0 0; max-width: none; text-align: left;
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .02em;
}

/* midnight: the stub tears off and the pass flies */
.pass.is-bursting .pass-stub { animation: stub-tear .9s var(--ease) forwards; }
.pass.is-bursting .pass-main { animation: pass-go .9s var(--ease) forwards; }
@keyframes stub-tear { to { transform: translate(34px, 46px) rotate(14deg); opacity: 0; } }
@keyframes pass-go { to { transform: translateY(-12px); opacity: 0; } }

/* ---------------------------------------------------------------- now boarding */
.gate-2027 .reveal-box { text-align: left; }
.board-now {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 16px;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--mint);
}
.board-now::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--mint); box-shadow: 0 0 0 4px rgba(74, 222, 128, .15);
  animation: live 1.6s ease-in-out infinite;
}
.gate-2027 .reveal-message, .gate-2027 .reveal-media { margin-left: 0; }
.gate-2027 .btn-primary {
  background: linear-gradient(120deg, var(--gold), #fff2b8 45%, var(--mint));
  background-size: 180% 100%;
  color: #0b2219;
}
.gate-2027 .reveal-skip { margin-left: 0; text-align: left; }

/* ---------------------------------------------------------------- phones */
@media (max-width: 640px) {
  .pass { flex-direction: column; }
  .pass-fields { grid-template-columns: 1fr 1fr; }
  .pass-route { grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr); }
  .pass-stub {
    flex: none; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 18px;
    border-left: 0; border-top: 2px dashed rgba(255, 255, 255, .14);
    padding: 18px 20px 20px;
  }
  .pass-stub::before { left: -12px; top: -12px; }
  .pass-stub::after { left: auto; right: -12px; top: -12px; bottom: auto; }
  .stub-barcode { width: 130px; height: 40px; }
  .stub-note { flex: 1 1 100%; margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pass, .pass-eyebrow, .pass-hello-small, .pass-name-wrap,
  .pass-plane path, .board-title::before, .board-now::before { animation: none !important; }
}

/* ambient falling confetti off too: nothing drifting across the pass */
#drift { display: none !important; }
