/* ==========================================================================
   PIANOMODE HOME HERO — title + CTA redesign (2026)
   --------------------------------------------------------------------------
   Loaded after concert-hall-3d.css so these rules take precedence for the
   #pm-header-overlay section on the Home page only.

   Layout contract:
     • Title grid is VERTICALLY CENTERED on the viewport (not top-anchored).
     • CTA row is pinned at the bottom of the hero, buttons side-by-side,
       EQUAL width + EQUAL height (without altering their visual design).
     • Title words are clickable anchors → respective section pages.
     • Descriptions stay as <span> (non-clickable, per spec).
   ========================================================================== */

/* --- Overlay layout: center titles, CTAs follow closely on desktop -------
   The header is now NON-STICKY and sits ABOVE this section in normal flow,
   so the overlay no longer needs to reserve room for a fixed header. These
   paddings win over every responsive rule in concert-hall-3d.css. */
.pm-concert-hall-section #pm-header-overlay,
#pm-header-overlay.pm-header-overlay,
#pm-header-overlay {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    /* Anchor titles in the upper-third; CTAs get breathing room below */
    justify-content: flex-start !important;
    padding-top: clamp(28px, 9vh, 90px) !important;
    padding-bottom: clamp(24px, 5vh, 60px) !important;
    gap: clamp(18px, 3vh, 36px) !important;
}

/* The title grid sits centered horizontally; the whole block (title + CTA
   row) is vertically centered together by the overlay's justify-content. */
#pm-header-overlay .pm-main-title-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: clamp(12px, 2.5vw, 32px);
    letter-spacing: var(--pm-tracking-tight);
    font-feature-settings: "ss01" on, "liga" on, "calt" on;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

#pm-header-overlay .pm-title-block {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    max-width: 180px;
    text-align: center;
}

/* Each title word is a full-width clickable anchor. Modern hover: a gold
   hairline grows from the center, plus a subtle weight shift. */
#pm-header-overlay a.pm-title-word {
    position: relative;
    display: inline-block;
    color: var(--pm-white);
    font-family: var(--pm-font);
    font-weight: var(--pm-fw-extrabold);
    font-size: clamp(2rem, 5.2vw, 4rem);
    line-height: 1;
    letter-spacing: var(--pm-tracking-tight);
    text-decoration: none;
    padding: 4px 2px 10px;
    transition:
        color var(--pm-dur) var(--pm-ease-smooth),
        transform var(--pm-dur) var(--pm-ease-smooth),
        text-shadow var(--pm-dur) var(--pm-ease-smooth);
    background: linear-gradient(180deg,
        var(--pm-white) 0%,
        var(--pm-white) 62%,
        var(--pm-gold-pale) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    will-change: transform;
}

/* Hairline underline — grows from the middle on hover, signature move */
#pm-header-overlay a.pm-title-word::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--pm-gold) 20%,
        var(--pm-gold-bright) 50%,
        var(--pm-gold) 80%,
        transparent 100%);
    transition: width var(--pm-dur-slow) var(--pm-ease-smooth);
    border-radius: 2px;
    pointer-events: none;
}

#pm-header-overlay a.pm-title-word:hover,
#pm-header-overlay a.pm-title-word:focus-visible {
    transform: translateY(-2px);
    text-shadow: 0 0 40px var(--pm-gold-a35);
    background: linear-gradient(180deg,
        var(--pm-gold-bright) 0%,
        var(--pm-gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    outline: none;
}

#pm-header-overlay a.pm-title-word:hover::after,
#pm-header-overlay a.pm-title-word:focus-visible::after {
    width: 100%;
}

/* Descriptions: refined, muted, modern — not clickable per spec */
#pm-header-overlay .pm-title-sub {
    display: block;
    font-family: var(--pm-font);
    font-size: clamp(.7rem, .9vw + .4rem, .85rem);
    font-weight: var(--pm-fw-medium);
    line-height: 1.35;
    letter-spacing: var(--pm-tracking-wide);
    color: rgba(255, 255, 255, .68);
    max-width: 180px;
    text-wrap: balance;
    cursor: default;
}

/* Dot separators — lighter, refined */
#pm-header-overlay .pm-title-dot {
    color: var(--pm-gold);
    opacity: .5;
    font-weight: var(--pm-fw-bold);
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    align-self: center;
    transform: translateY(-14%);
    user-select: none;
}

/* --- CTA row: side-by-side, equal size, TIGHT to the titles on desktop --- */
#pm-header-overlay .pm-hero-cta {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: stretch;
    gap: clamp(12px, 2vw, 24px);
    /* CTAs breathe slightly below titles, not crammed against them */
    margin-top: clamp(10px, 2vh, 22px);
    width: 100%;
    max-width: 720px;
}

/* Force EQUAL width + EQUAL height on both CTAs without touching their
   visual design (colors, borders, shadows come from concert-hall-3d.css). */
#pm-header-overlay .pm-hero-cta > .pm-cta-btn {
    flex: 1 1 0;
    /* Equal widths via flex-basis 0 + grow 1 */
    min-width: 0;
    /* Shared minimum height — buttons with less content stretch to match */
    min-height: 56px;
    height: auto;
    margin: 0;
    box-sizing: border-box;
    /* Center content vertically regardless of intrinsic padding differences */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Tablet: preserve side-by-side (still roomy) */
@media (max-width: 768px) {
    #pm-header-overlay .pm-hero-cta {
        max-width: 560px;
    }
    #pm-header-overlay .pm-hero-cta > .pm-cta-btn {
        min-height: 52px;
    }
}

/* Mobile (<=600px): CTAs stack vertically, one on top of the other, equal width.
   Centered horizontally + reduced height so both buttons fit inside the
   shortened mobile hero without the second one being clipped. */
@media (max-width: 600px) {
    #pm-header-overlay .pm-hero-cta {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: center;       /* center each pill, stretch was misaligning explore */
        justify-content: center;
        gap: 12px;
        width: min(86%, 320px);    /* matches mobile menu / staff width feel */
        max-width: 320px;
        padding: 0;
        margin-left: auto;
        margin-right: auto;
    }
    #pm-header-overlay .pm-hero-cta > .pm-cta-btn {
        width: 100%;
        flex: 0 0 auto;
        min-height: 46px;          /* compact, premium, not chunky */
        padding-top: 0.7rem;
        padding-bottom: 0.7rem;
        font-size: .82rem;
        letter-spacing: 2px;       /* override the heavy 3.5px from desktop */
    }
    /* Override the desktop 5px letter-spacing on Explore — too cramped on mobile */
    #pm-header-overlay .pm-cta-secondary .pm-cta-explore-text {
        font-size: .78rem;
        letter-spacing: 3px;
    }
    #pm-header-overlay .pm-cta-secondary .pm-cta-explore-chevrons svg {
        width: 26px;
        height: 12px;
    }
}

/* Very narrow mobiles: tighten padding + type */
@media (max-width: 380px) {
    #pm-header-overlay .pm-hero-cta {
        width: 88%;
        max-width: 300px;
        gap: 10px;
    }
    #pm-header-overlay .pm-hero-cta > .pm-cta-btn {
        min-height: 42px;
        font-size: .78rem;
        padding-left: 14px;
        padding-right: 14px;
        letter-spacing: 1.5px;
    }
}

/* Reduced motion: no hover lift */
@media (prefers-reduced-motion: reduce) {
    #pm-header-overlay a.pm-title-word:hover,
    #pm-header-overlay a.pm-title-word:focus-visible {
        transform: none;
    }
}