/* ============================================================================
   passes.css — Boarding Passes, EDITORIAL direction (chosen 2026-08-03)

   One themed journey per pass, sold on its artwork. Full-bleed hero art, a
   bottom scrim, Archivo Black over the top. Direction C from
   /static/passes-directions.html.

   FLAG: everything is scoped under `body.passes-on`. With ?passes=off not one
   rule in this file can match. See js/passes.js.

   PALETTE WARNING (cost two rounds of rework, do not repeat)
   ---------------------------------------------------------
   This app is FULLY LIGHT. `modern.css` defines --surface-dark as
   oklch(0.91 0.02 80) and --surface-darker as oklch(0.87 0.02 80) — both warm
   near-whites. CLAUDE.md still documents them as #1a1a2e / #0f0f23 navy and is
   STALE. Never use those tokens for a dark treatment; use a literal.
   Also: --gold-deep is a GRADIENT, so `color: var(--gold-deep)` is an invalid
   declaration and is silently dropped. --font-mono is not defined at all.

   The only dark in here is the scrim over artwork, where dark is load-bearing:
   it's what makes white type legible on an unknown image.
   ========================================================================= */

body.passes-on #dpad-passes { display: block; }
#dpad-passes { display: none; }

/* ── section head — matches .dep5-sec ─────────────────────────────────── */
.pz-sect {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 17px 16px 10px;
    font-family: var(--font-display, 'Archivo Black', sans-serif);
    font-size: 11.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink, #1a1a1a);
}
.pz-sect i {
    margin-left: auto;
    font-style: normal;
    font-family: var(--font-ui, 'Figtree', sans-serif);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: rgba(26, 26, 26, 0.45);
}

/* ══ the card ═══════════════════════════════════════════════════════════
   Full-bleed art, 172px tall. Deliberately NOT a rounded floating card — it
   spans the sheet edge to edge so the artwork is the surface rather than a
   thumbnail sitting on one. */
.pz-pass {
    position: relative;
    display: flex;
    align-items: flex-end;
    width: 100%;
    height: 172px;
    margin-bottom: 3px;
    overflow: hidden;
    background: #2b2d42;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font-ui, 'Figtree', sans-serif);
}
.pz-pass:last-child { margin-bottom: 0; }
.pz-pass:active .pz-art { transform: scale(1.035); }
.pz-pass.pz-departed { filter: saturate(0.25); opacity: 0.72; }

.pz-art {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 260ms cubic-bezier(0.22, 0.9, 0.3, 1);
}
@media (prefers-reduced-motion: reduce) {
    .pz-art { transition: none; }
}

/* BORROWED art (a member stamp's image, used until the admin sets a real hero)
   is almost always a background-removed cutout. Stretched edge-to-edge those
   look broken — a floating subject on a flat void. So a borrowed hero gets the
   album-art treatment: a blown-up blurred copy fills the frame, the cutout sits
   centred and un-cropped on top. A purpose-made hero (`passes.image_url`) skips
   all of this and simply covers. */
.pz-art.pz-borrowed {
    background-size: cover;
    filter: blur(20px) saturate(1.35);
    transform: scale(1.25);
}
.pz-pass:active .pz-art.pz-borrowed { transform: scale(1.3); }
.pz-artfg {
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
    background-position: center 42%;
    background-size: auto 74%;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45));
}

/* Slug-derived gradients — the last-resort hero when a pass has no art and no
   member stamp art to borrow. Keyed in JS so the same pass always gets the
   same one; a pass whose art changes colour between loads reads as a bug. */
.pz-art.pz-g0 { background-image: linear-gradient(150deg, #3d5a80, #98c1d9 55%, #e0fbfc); }
.pz-art.pz-g1 { background-image: linear-gradient(150deg, #7f4f24, #dda15e 55%, #fefae0); }
.pz-art.pz-g2 { background-image: linear-gradient(150deg, #2b2d42, #5c677d 55%, #a9b4c2); }
.pz-art.pz-g3 { background-image: linear-gradient(150deg, #386641, #6a994e 55%, #a7c957); }
.pz-art.pz-g4 { background-image: linear-gradient(150deg, #6d213c, #ba5370 55%, #f4b393); }
.pz-art.pz-g5 { background-image: linear-gradient(150deg, #22223b, #4a4e69 55%, #9a8c98); }

/* The scrim is what makes white type survive an unknown image. Three stops,
   not two — a linear fade leaves the midtones muddy exactly where the name sits. */
.pz-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg,
        rgba(0, 0, 0, 0.84) 0%,
        rgba(0, 0, 0, 0.55) 26%,
        rgba(0, 0, 0, 0.16) 52%,
        rgba(0, 0, 0, 0) 78%);
}

.pz-in {
    position: relative;
    width: 100%;
    padding: 14px 15px 15px;
    color: #fff;
}

/* kicker — status left, clock right */
.pz-kick {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.19em;
    text-transform: uppercase;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.86);
}
.pz-kick .pz-when { margin-left: auto; color: rgba(255, 255, 255, 0.68); }
.pz-kick .pz-fc { color: var(--accent-gold, #FFD93D); }
.pz-kick .pz-urgent { color: #ff9d5c; }

.pz-name {
    font-family: var(--font-display, 'Archivo Black', sans-serif);
    font-size: 23px;
    line-height: 1.02;
    letter-spacing: -0.022em;
    margin-bottom: 8px;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

/* progress pips — one per stamp. A bar would imply a percentage; pips say
   "there are exactly this many things and you have this many". */
.pz-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
}
.pz-pips { display: flex; gap: 3px; }
.pz-pip {
    width: 15px;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.34);
}
.pz-pip.pz-on { background: var(--accent-gold, #FFD93D); }

/* an unboarded pass gets the one call to action on the card */
.pz-go {
    margin-left: auto;
    background: #fff;
    color: #1a1a1a;
    border-radius: 100px;
    padding: 6px 13px;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* ══ detail ═════════════════════════════════════════════════════════════
   Light body under a full-bleed hero — the app's own world, not a dark island. */
#pz-detail {
    position: fixed;
    inset: 0;
    z-index: 4200;
    background: #fff;
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: var(--font-ui, 'Figtree', sans-serif);
    color: var(--ink, #1a1a1a);
}
#pz-detail.open { display: flex; }
.pz-d-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(30px + var(--safe-bottom, 0px));
}

/* hero */
.pz-hero {
    position: relative;
    min-height: 268px;
    display: flex;
    align-items: flex-end;
    background: #2b2d42;
}
.pz-d-back {
    position: absolute;
    top: calc(12px + var(--safe-top, 0px));
    left: 12px;
    z-index: 3;
    width: 36px; height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
}
.pz-hero-in {
    position: relative;
    width: 100%;
    padding: 18px 17px 19px;
    color: #fff;
}
.pz-hero-kick {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 7px;
}
.pz-hero-kick .pz-fc { color: var(--accent-gold, #FFD93D); }
.pz-hero-name {
    font-family: var(--font-display, 'Archivo Black', sans-serif);
    font-size: 32px;
    line-height: 0.98;
    letter-spacing: -0.026em;
    margin-bottom: 9px;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}
.pz-hero-sub {
    font-size: 12.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    max-width: 94%;
}

/* backfill banner — sits directly under the hero, where the eye lands after
   the name. Green on white, not green on dark. */
.pz-backfill {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    margin: 14px 17px 0;
    padding: 12px 13px;
    background: rgba(39, 174, 96, 0.09);
    border: 1px solid rgba(39, 174, 96, 0.32);
    border-radius: 12px;
    animation: pzPop 380ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes pzPop {
    from { opacity: 0; transform: translateY(-6px) scale(0.97); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .pz-backfill { animation: none; } }
.pz-backfill .pz-bi { font-size: 17px; line-height: 1.15; flex: 0 0 auto; }
.pz-backfill .pz-bt {
    font-family: var(--font-display, 'Archivo Black', sans-serif);
    font-size: 12.5px;
    color: #1e7a44;
    margin-bottom: 3px;
}
.pz-backfill .pz-bd {
    font-size: 11.5px;
    line-height: 1.45;
    color: rgba(26, 26, 26, 0.62);
}

/* stat strip */
.pz-strip {
    display: flex;
    padding: 16px 17px;
    border-bottom: 1px solid rgba(26, 26, 26, 0.1);
}
.pz-s { flex: 1; text-align: center; }
.pz-sv {
    font-family: var(--font-display, 'Archivo Black', sans-serif);
    font-size: 19px;
    line-height: 1;
    color: var(--ink, #1a1a1a);
}
.pz-sv small { font-size: 12px; color: rgba(26, 26, 26, 0.34); }
.pz-sl {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 7.5px;
    font-weight: 700;
    letter-spacing: 0.13em;
    color: rgba(26, 26, 26, 0.45);
    margin-top: 4px;
}

.pz-d-sect {
    font-family: var(--font-display, 'Archivo Black', sans-serif);
    font-size: 11px;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    padding: 18px 17px 10px;
    color: var(--ink, #1a1a1a);
}

/* the collection — stamp art as tiles, the second place art does work */
.pz-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
    padding: 0 17px;
}
.pz-tiles.pz-n4 { grid-template-columns: repeat(4, 1fr); }
.pz-tile {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 7px;
    font-size: 8.5px;
    font-weight: 700;
    line-height: 1.2;
}
.pz-tile img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.pz-tile .pz-tscrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0) 62%);
}
.pz-tile span { position: relative; color: #fff; text-shadow: 0 1px 5px rgba(0, 0, 0, .6); }
.pz-tile.pz-no {
    background: rgba(26, 26, 26, 0.05);
    border: 1.5px dashed rgba(26, 26, 26, 0.2);
    color: rgba(26, 26, 26, 0.3);
    align-items: center;
    justify-content: center;
    font-size: 15px;
}
.pz-tile.pz-yes::after {
    content: '✓';
    position: absolute;
    top: 6px; right: 6px;
    width: 16px; height: 16px;
    background: var(--accent-green, #27ae60);
    color: #fff;
    border-radius: 50%;
    font-size: 9.5px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pz-tile.pz-locked { border-style: solid; border-color: rgba(179, 135, 40, 0.45); }

/* tasks */
.pz-tasks { padding: 0 17px; }
.pz-tk {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(26, 26, 26, 0.09);
    font-size: 13px;
    color: var(--ink, #1a1a1a);
}
.pz-tk:last-child { border-bottom: none; }
.pz-box {
    flex: 0 0 19px;
    height: 19px;
    border-radius: 6px;
    border: 2px solid rgba(26, 26, 26, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
}
.pz-box.pz-done {
    background: var(--accent-green, #27ae60);
    border-color: var(--accent-green, #27ae60);
    color: #fff;
}
.pz-tx { flex: 1 1 auto; line-height: 1.35; }
.pz-tk.pz-done .pz-tx { color: rgba(26, 26, 26, 0.42); text-decoration: line-through; }
.pz-src {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    color: rgba(26, 26, 26, 0.38);
    white-space: nowrap;
}

/* board CTA */
.pz-board-btn {
    display: block;
    width: calc(100% - 34px);
    margin: 20px 17px 0;
    border: 0;
    background: #1a1a1a;
    color: #fff;
    font-family: var(--font-display, 'Archivo Black', sans-serif);
    font-size: 13.5px;
    letter-spacing: 0.03em;
    padding: 16px;
    border-radius: 100px;
    cursor: pointer;
}
.pz-board-btn:disabled { opacity: 0.5; cursor: default; }
.pz-board-note {
    text-align: center;
    font-size: 10.5px;
    line-height: 1.45;
    color: rgba(26, 26, 26, 0.45);
    margin: 10px 17px 0;
}
.pz-unboard {
    display: block;
    margin: 20px auto 0;
    background: none;
    border: 0;
    color: rgba(26, 26, 26, 0.34);
    font-size: 11px;
    text-decoration: underline;
    cursor: pointer;
}

/* empty / loading */
.pz-empty {
    padding: 32px 22px;
    text-align: center;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(26, 26, 26, 0.45);
}
.pz-empty code {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 11.5px;
    background: rgba(26, 26, 26, 0.06);
    padding: 2px 5px;
    border-radius: 4px;
}

/* Skeleton — art-led surfaces look most broken while loading, because the
   thing that carries them is the slowest thing to arrive. */
.pz-skel {
    height: 172px;
    margin-bottom: 3px;
    background: linear-gradient(100deg,
        rgba(26, 26, 26, 0.06) 30%,
        rgba(26, 26, 26, 0.11) 50%,
        rgba(26, 26, 26, 0.06) 70%);
    background-size: 220% 100%;
    animation: pzShim 1.25s ease-in-out infinite;
}
@keyframes pzShim {
    from { background-position: 130% 0; }
    to   { background-position: -30% 0; }
}
@media (prefers-reduced-motion: reduce) {
    .pz-skel { animation: none; }
}
