/* Teenage Fever Dream release layer: hero badge + countdown, album popup, tracklist section,
   tour finder, lightbox arrows. Loaded after styles.css on every page. Tokens come from styles.css. */

/* ---------- hero ---------- */
.hero-content .hero-banner img.hero-logo {
    width: 38%;
    max-width: 520px;
    /* Matthew 10-19: lifted off her face into her hair, like a crown, for contrast. A transform so the
       title below keeps its measured place on her shirt. Phones already sit it in her hair. */
    transform: translateY(-14vh);
    position: relative;
}

.release-badge {
    margin-top: 10px;
    color: var(--surface);
    text-shadow: 0 1px 2px var(--ink-70), 0 0 18px var(--ink-50);
}

.release-badge .release-kicker,
.release-badge .release-status {
    display: inline-block;
    font-family: 'Satoshi Bold', Arial;
    font-size: 13px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 50px;
}

.release-badge .release-kicker {
    background-color: var(--surface);
    color: var(--ink);
    text-shadow: none;
}

.release-title {
    margin: 14px 0 12px;
    line-height: 0;
}

.release-title img {
    display: inline-block;
    width: min(92vw, 1100px);
    height: auto;
    filter: drop-shadow(0 10px 24px var(--ink-50));
}

.release-title-popup img {
    width: 100%;
    max-width: 420px;
    filter: none;
}

.release-title-list img {
    width: min(100%, 720px);
    filter: none;
}

/* Hero title (Matthew 10-19): the gap version, TEENAGE and DREAM either side of the FEVER on her shirt in
   the opener frame. The frame is height-fit, so everything is in vh from dev/hero-work/opener-report.json:
   desktop FEVER 294 px wide of 1080 and the gap word is 888 of the 3608 px image; phone FEVER 411 px wide
   of 1920 and the FEVER row is 1229 of the 1324 px stack (row top 345, height 327 of 1077). */
.release-title-hero img {
    width: min(110.6vh, 96vw);
}

/* Past the opener photo the shirt is gone, so the full title (FEVER in the title font, same layout) fades
   in over the gap one. js/app.js drawFrame toggles .past-opener on the h1 from the frame being drawn. */
.release-title-hero {
    position: relative;
}

.release-title-hero .title-full {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.release-title-hero .title-gap {
    transition: opacity 0.25s ease;
}

.release-title-hero.past-opener .title-full {
    opacity: 1;
}

.release-title-hero.past-opener .title-gap {
    opacity: 0;
}

/* The whole hero block slides so the gap lands on her shirt (measured by dev/title-measure.js, which
   prints the remaining offset per viewport; both fits were within 1 px). */
.hero-banner > div {
    transform: translateY(calc(87.4px + 1.7vh));
}

/* Phones (Matthew 10-19): her alone on the cream, no crosses, the shirt FEVER at 998 of 1920 so her face is
   clear. Less on top of her: no NEW ALBUM pill, the logo up in her hair, a slim countdown, the two buttons on
   one row. The title stack still lands its FEVER row on the shirt (dev/title-measure.js). */
@media (max-width: 640px) {
    .release-title-hero img {
        width: min(23.1vh, 70vw);
    }

    .hero-banner > div {
        transform: translateY(calc(27.8px + 2.51vh - 0.12vw));
    }

    .hero-content .hero-banner .release-badge .release-kicker {
        display: none;
    }

    .hero-content .hero-banner > div img.hero-logo {   /* outranks the 768px rule below */
        width: 46%;
        transform: translateY(-16vh);
    }

    .release-badge {
        margin-top: 0;
    }

    .release-title {
        margin: 0 0 8px;
    }

    .hero-content .hero-banner .countdown {
        gap: 4px;
        padding: 4px 8px;
        background: none;
        box-shadow: none;
        border: 0;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .hero-banner .countdown > div {
        min-width: 46px;
    }

    .hero-banner .countdown b {
        font-size: 1.25rem;
        text-shadow: 0 1px 3px var(--surface), 0 0 10px var(--surface);
    }

    .hero-banner .countdown small {
        font-size: 9px;
    }

    .hero-banner > div {
        max-width: 100vw;
    }

    .hero-banner .cta-buttons {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        margin-top: 0.6rem;
        padding: 0 16px;
    }

    .hero-banner .cta-buttons a {
        flex: 0 1 auto;
        min-width: 0;
        font-size: 13px;
        margin-top: 0;
        padding: 11px 12px;
        border-radius: 12px;
        white-space: nowrap;
        text-align: center;
    }
}

.release-badge .release-status {
    background-color: var(--red);
    color: var(--surface);
    text-shadow: none;
}

.countdown {
    display: inline-flex;
    gap: 10px;
    margin-top: 18px;
    padding: 10px 14px;
    border-radius: 12px;
    background-color: var(--bg-90);
    border: 1px solid var(--surface-2);
    box-shadow: 0 10px 30px var(--ink-20);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.countdown.is-out {
    display: none;
}

.countdown > div {
    min-width: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown b {
    font-family: 'Helvetica', sans-serif;
    font-size: 2rem;
    line-height: 1;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.countdown small {
    font-family: 'Satoshi Bold', Arial;
    font-size: 11px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 4px;
}

.cta-buttons a[data-label]::after {
    content: attr(data-label);
}

.cta-buttons a.hidden,
[data-when-out].hidden,
[data-when-pre].hidden {
    display: none !important;
}

/* ---------- album popup ---------- */
#albumPopup {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    background-color: var(--surface);
    color: var(--ink);
    text-align: center;
}

#albumPopup .album-popup-cover {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: var(--surface-2);
}

#albumPopup .album-popup-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#albumPopup .album-popup-cover .release-kicker {
    position: absolute;
    top: 14px;
    left: 14px;
    background-color: var(--red);
    color: var(--surface);
    font-family: 'Satoshi Bold', Arial;
    font-size: 12px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 50px;
}

#albumPopup .album-popup-body {
    padding: 22px 22px 26px;
}

#albumPopup .album-popup-body h1 {
    font-family: 'Helvetica', sans-serif;
    text-transform: uppercase;
    color: var(--red);
    font-size: 1.9rem;
    line-height: 1.05;
    margin: 0 0 6px;
    padding: 0;
}

#albumPopup .album-popup-body .release-status {
    font-family: 'Satoshi Bold', Arial;
    font-size: 12px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--ink);
}

#albumPopup .countdown {
    margin-top: 14px;
    background-color: var(--bg);
    box-shadow: none;
}

#albumPopup .countdown b {
    font-size: 1.5rem;
}

#albumPopup .album-popup-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

#albumPopup .album-popup-actions a,
#albumPopup .album-popup-actions button {
    font-family: 'Helvetica', sans-serif;
    font-size: 14px;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

#albumPopup .album-popup-actions .primary {
    background-color: var(--red);
    color: var(--surface);
}

#albumPopup .album-popup-actions .primary:hover {
    background-color: var(--red-dark);
    transform: translateY(-2px);
}

#albumPopup .album-popup-actions .secondary {
    background-color: var(--ink);
    color: var(--surface);
}

#albumPopup .album-popup-actions .secondary:hover {
    background-color: var(--red);
    transform: translateY(-2px);
}

#albumPopup #closePopup {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    color: var(--surface);
    background-color: var(--ink-70);
    border-radius: 50%;
    padding: 4px;
    line-height: 0;
}

#albumPopup #closePopup:hover {
    background-color: var(--red);
}

@media (min-width: 768px) {
    #albumPopup {
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }

    #albumPopup .album-popup-body {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 28px 26px;
    }

    #albumPopup .album-popup-actions {
        justify-content: flex-start;
    }

    .popup-content:has(#albumPopup) {
        max-width: 820px;
    }
}

/* ---------- tracklist section ---------- */
.tracklist-wrap {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 1040px;
    margin: 0 auto;
    padding: 16px;
    align-items: center;
    position: relative;
    background-color: var(--bg);      /* solid, so the sticker field never shows through the song list */
    border-radius: 16px;
}

.tracklist-cover {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px var(--ink-20);
    background-color: var(--surface-2);
}

.tracklist-cover img {
    width: 100%;
    display: block;
}

.tracklist-cover .release-status {
    position: absolute;
    left: 14px;
    bottom: 14px;
    background-color: var(--red);
    color: var(--surface);
    font-family: 'Satoshi Bold', Arial;
    font-size: 12px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    padding: 7px 14px;
    border-radius: 50px;
}

.tracklist {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--surface-2);
}

.tracklist li {
    display: grid;
    grid-template-columns: 2.2em 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 6px;
    border-bottom: 1px solid var(--surface-2);
    font-family: 'Satoshi Bold', Arial;
    color: var(--ink);
    transition: all 0.25s ease-in-out;
}

.tracklist li:hover {
    background-color: var(--surface);
    padding-left: 12px;
}

.tracklist .n {
    font-family: 'Helvetica', sans-serif;
    color: var(--red);
    font-size: 14px;
}

.tracklist .t {
    font-family: 'Helvetica', sans-serif;
    text-transform: uppercase;
    font-size: 15px;
    letter-spacing: 0.02em;
}

.tracklist .s {
    font-family: 'Satoshi Bold', Arial;
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
}

.tracklist .s a {
    color: var(--red);
    text-decoration: none;
    border: 1px solid var(--red);
    border-radius: 50px;
    padding: 4px 12px;
    transition: all 0.25s ease-in-out;
}

.tracklist .s a:hover {
    background-color: var(--red);
    color: var(--surface);
}

.tracklist-cta {
    text-align: center;
}

@media (min-width: 768px) {
    .tracklist-wrap {
        grid-template-columns: 5fr 7fr;
    }
}

/* phones: the title spans the screen, so the whole section goes solid and the stickers stay out of it */
@media (max-width: 991px) {
    .tracklist-section {
        position: relative;
        background-image: linear-gradient(to bottom, var(--bg-0), var(--bg) 56px, var(--bg) calc(100% - 56px), var(--bg-0));
        padding-top: 56px;
        padding-bottom: 40px;
    }
}

/* ---------- music tiles ---------- */
.main-album-title .tile-badge {
    display: inline-block;
    font-family: 'Satoshi Bold', Arial;
    font-size: 10px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--surface);
    background-color: var(--red);
    padding: 3px 10px;
    border-radius: 50px;
    margin-bottom: 4px;
}

/* ---------- tour finder ---------- */
.tour-tools {
    max-width: 760px;
    margin: 0 auto 18px;
    padding: 0 10px;
}

.tour-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--surface);
    border: 1px solid var(--surface-2);
    border-radius: 50px;
    padding: 6px 8px 6px 18px;
    box-shadow: 0 6px 20px var(--ink-20);
}

.tour-search i {
    color: var(--red);
}

.tour-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-family: 'Satoshi Regular', Arial;
    font-size: 16px;
    color: var(--ink);
    padding: 8px 0;
}

.tour-search input::placeholder {
    color: var(--muted);
}

.tour-search button {
    font-family: 'Satoshi Bold', Arial;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    background-color: var(--ink);
    color: var(--surface);
    border: 0;
    border-radius: 50px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
}

/* Red means "sorting by distance". Phones keep :hover stuck after a tap, so hover red is desktop only. */
.tour-search button.active {
    background-color: var(--red);
}

@media (hover: hover) {
    .tour-search button:hover {
        background-color: var(--red);
    }
}

.tour-search button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.tour-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.tour-chips button {
    font-family: 'Satoshi Bold', Arial;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background-color: transparent;
    color: var(--ink);
    border: 1px solid var(--ink-50);
    border-radius: 50px;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
}

.tour-chips button:hover {
    border-color: var(--red);
    color: var(--red);
}

.tour-chips button.active {
    background-color: var(--red);
    border-color: var(--red);
    color: var(--surface);
}

.tour-status {
    text-align: center;
    font-family: 'Satoshi Regular', Arial;
    font-size: 13px;
    color: var(--muted);
    margin-top: 10px;
    min-height: 1.2em;
}

.next-show {
    display: none;
    max-width: 760px;
    margin: 0 auto 16px;
    padding: 0 10px;
}

.next-show.show {
    display: block;
}

.next-show a {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: var(--surface);
    background-color: var(--red);
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 10px 30px var(--ink-20);
    transition: all 0.25s ease-in-out;
}

.next-show a:hover {
    background-color: var(--red-dark);
    transform: translateY(-2px);
    color: var(--surface);
}

.next-show .next-label {
    font-family: 'Satoshi Bold', Arial;
    font-size: 11px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    white-space: nowrap;
}

.next-show .next-city {
    font-family: 'Helvetica', sans-serif;
    font-size: 18px;
    text-transform: uppercase;
    line-height: 1.1;
}

.next-show .next-meta {
    font-family: 'Satoshi Regular', Arial;
    font-size: 13px;
    opacity: 0.9;
}

.next-show .next-in {
    margin-left: auto;
    font-family: 'Satoshi Bold', Arial;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    background-color: var(--ink);
    padding: 6px 12px;
    border-radius: 50px;
}

.tour-item .details .distance {
    font-family: 'Satoshi Regular', Arial;
    font-size: 12px;
    color: var(--muted);
}

.tour-item.filtered-out,
.timeline-item.filtered-out {
    display: none !important;
}

.tour-empty {
    display: none;
    text-align: center;
    font-family: 'Satoshi Regular', Arial;
    color: var(--muted);
    padding: 40px 10px;
}

.tour-empty.show {
    display: block;
}

@media (max-width: 600px) {
    .next-show a {
        flex-wrap: wrap;
    }

    .next-show .next-in {
        margin-left: 0;
    }

    .tour-search button {
        padding: 10px 12px;
    }

    .tour-search input::placeholder {
        font-size: 14px;
    }
}

/* ---------- lightbox ---------- */
#fullscreenView .lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background-color: var(--bg-90);
    color: var(--ink);
    border: 1px solid var(--surface-2);
    border-radius: 50%;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.25s ease-in-out;
}

#fullscreenView .lightbox-nav:hover {
    background-color: var(--red);
    color: var(--surface);
}

#fullscreenView .lightbox-prev {
    left: 16px;
}

#fullscreenView .lightbox-next {
    right: 16px;
}

#fullscreenView .lightbox-count {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Satoshi Bold', Arial;
    font-size: 12px;
    letter-spacing: 0.2em;
    color: var(--ink);
    background-color: var(--bg-90);
    padding: 6px 14px;
    border-radius: 50px;
}

@media (max-width: 768px) {
    .hero-content .hero-banner img.hero-logo {
        width: 62%;
        transform: none;
    }

    .countdown {
        gap: 6px;
        padding: 8px 10px;
    }

    .countdown > div {
        min-width: 54px;
    }

    .countdown b {
        font-size: 1.5rem;
    }

    .release-badge .release-kicker,
    .release-badge .release-status {
        font-size: 11px;
        letter-spacing: 0.25em;
    }
}

/* Near me feedback: the status line reads as a result, not fine print */
.tour-status.on {
    color: var(--ink);
    font-family: 'Satoshi Bold', Arial;
}

.tour-status.error {
    color: var(--red);
    font-family: 'Satoshi Bold', Arial;
    font-size: 14px;
}

.timeline-item .card-distance small {
    color: var(--red);
    font-family: 'Satoshi Bold', Arial;
}
