/* ==========================================================================
   EVENTS PAGE - events.html, on top of site.css. Everything is .ev-

   FEATURE     full-height panel for the next event
   COUNTDOWN   ticks down to doors (js/site/events.js)
   VOLUNTEER   the sign-up form under the feature
   TEASER      full-height panel for the event after next
   RESIDENCY   Friday nights at the Grand View
   WEEK        the what's-on strip (slider from site.css, cards from gig-card.css)
   CARDS       grid of past events
   Each section carries its own phone rules.
   ========================================================================== */

/* Date and place line */

.ev-meta-date {
    color: var(--sg-gold);
    font-weight: bold;
}

.ev-meta-place {
    color: var(--sg-dim);
}

/* A band of the page */
.ev-section {
    max-width: var(--sg-max-width);
    margin: auto;
}

.ev-section h2 {
    text-align: left;
}

/* ==========================================================================
   FEATURE
   ========================================================================== */
.ev-feature {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    min-height: 100svh; /* phone address bar does not cut the bottom off */
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--sg-border);
}

/* Halloween look, scoped to this panel */
.ev-feature.is-halloween {
    background:
        radial-gradient(80% 90% at 88% 18%, var(--sg-purple-dark) 0%, transparent 58%),
        linear-gradient(150deg, var(--sg-poster-ink) 0%, var(--sg-night) 62%);
}

.ev-feature.is-halloween::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--sg-grain);
    opacity: 0.1;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.ev-feature-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--sg-max-width);
    margin: 0 auto;
    padding: calc(var(--sg-nav-height, 88px) + 40px) 6% 70px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: 40px;
}

/* Cobweb in the corner */
.ev-web {
    position: absolute;
    top: 0;
    right: 0;
    width: 220px;
    height: 220px;
    opacity: 0.2;
    transform: scaleX(-1);
    pointer-events: none;
}

.ev-web path {
    fill: none;
    stroke: var(--sg-white);
    stroke-width: 1.4;
}

.ev-feature-name {
    font-family: var(--sg-font-display);
    font-size: clamp(2.2rem, 6vw, 4.4rem);
    line-height: 0.98;
    letter-spacing: -1.5px;
    text-transform: uppercase;
    margin: 16px 0 16px;
}

.ev-feature-name span {
    display: block;
    color: var(--sg-orange);
    font-size: 0.5em;
    margin-top: 10px;
}

.ev-feature-desc {
    color: var(--sg-muted);
    font-size: 1.05rem;
    margin: 14px 0 0;
}

.ev-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

/* Poster on the right, tap to open full size */
.ev-feature-art {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
}

.ev-poster {
    display: block;
    width: min(100%, 475px);
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.55),
        0 0 60px rgba(255, 107, 0, 0.25);
    transform: rotate(1.5deg);
    transition: transform 0.25s ease;
}

.ev-poster:hover,
.ev-poster:focus-visible {
    transform: rotate(0) scale(1.02);
}

.ev-poster img {
    display: block;
    width: 100%;
    height: auto;
}

/* Tablet */
@media (max-width: 900px) {
    .ev-feature-inner {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-bottom: 56px;
    }
    .ev-poster {
        width: min(100%, 360px);
        transform: none;
    }
}

/* Phone */
@media (max-width: 600px) {
    .ev-actions .btn {
        width: 100%;
        text-align: center;
    }
    .ev-feature-inner {
        padding-bottom: 44px;
    }
}

/* ==========================================================================
   COUNTDOWN
   ========================================================================== */
.ev-countdown {
    margin-top: 34px;
}

.ev-countdown-label {
    font-family: var(--sg-font-accent);
    font-size: 0.72rem;
    font-weight: bold;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--sg-gold);
    margin-bottom: 14px;
}

.ev-countdown-units {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
}

.ev-countdown-units li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 74px;
    padding: 12px 10px;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid var(--sg-border);
    border-radius: 12px;
}

.ev-countdown-units b {
    font-family: var(--sg-font-display);
    font-size: clamp(1.5rem, 3.4vw, 2.2rem);
    line-height: 1;
    color: var(--sg-white);
    font-variant-numeric: tabular-nums; /* digits do not jog about */
}

.ev-countdown-units span {
    font-family: var(--sg-font-accent);
    font-size: 0.62rem;
    font-weight: bold;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--sg-dim);
}

.ev-countdown-when {
    color: var(--sg-muted);
    font-size: 0.9rem;
}

/* Doors open: nothing left to count */
.ev-countdown.is-open .ev-countdown-label {
    color: var(--sg-orange);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
}

/* Phone */
@media (max-width: 600px) {
    .ev-countdown-units li {
        flex: 1 1 calc(50% - 5px); /* two by two */
        min-width: 0;
    }
}

/* ==========================================================================
   VOLUNTEER
   ========================================================================== */
.ev-vol {
    background: var(--sg-night);
}

.ev-vol-panel {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
    background: var(--sg-panel);
    border: 1px solid var(--sg-border);
    border-radius: 22px;
    padding: 40px;
}

.ev-vol-name {
    font-size: clamp(2.4rem, 6vw, 4rem);
    line-height: 0.95;
    text-transform: uppercase;
    font-weight: 900;
    color: var(--sg-white);
    margin: 0 0 18px;
}

.ev-vol-name span {
    color: var(--sg-orange-bright);
}

.ev-vol-strap {
    color: var(--sg-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 40ch;
}

.ev-vol-form label {
    display: block;
    margin: 0 0 14px;
}

.ev-vol-form input,
.ev-vol-form textarea {
    display: block;
    margin-top: 6px;
}

.ev-vol-form .pill input {
    display: none;
}

.ev-vol-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Role chips */
.ev-vol-roles {
    border: 0;
    padding: 0;
    margin: 0 0 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ev-vol-roles legend {
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--sg-paper-soft);
    margin-bottom: 8px;
}

.ev-vol-form .btn-ticket {
    font-size: 1rem;
    padding: 14px 34px;
    cursor: pointer;
}

.ev-vol-msg {
    margin: 12px 0 0;
    font-weight: bold;
    color: var(--sg-gold);
}

@media (max-width: 760px) {
    .ev-vol-panel {
        grid-template-columns: 1fr;
        padding: 26px 20px;
    }
    .ev-vol-2 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   TEASER
   ========================================================================== */
.ev-teaser-wrap {
    padding: 0;
    margin: 0;
    max-width: none;
}

.ev-teaser {
    position: relative;
    overflow: hidden;
    border: 0;
    border-bottom: 1px solid var(--sg-border);
    border-radius: 0;
    text-align: center;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
}

/* Blurred artwork behind, dimmed hard */
.ev-teaser::before {
    content: '';
    position: absolute;
    inset: -8%;
    background-image: var(--ev-art);
    background-size: cover;
    background-position: center;
    filter: blur(34px) saturate(1.25) brightness(0.5);
    z-index: -2;
}

.ev-teaser::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(70% 90% at 50% 42%, rgba(255, 107, 0, 0.18) 0%, transparent 62%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.9) 100%);
    z-index: -1;
}

.ev-teaser-body {
    position: relative;
    padding: calc(var(--sg-nav-height, 88px) + 40px) 24px 70px;
    max-width: 860px;
    margin: auto;
}

/* SOUNDZGOOD never wraps - it shrinks to fit */
.ev-teaser-word {
    font-family: var(--sg-font-display);
    font-size: min(5.6rem, 11vw);
    line-height: 0.94;
    letter-spacing: -2px;
    text-transform: uppercase;
    margin: 22px 0 4px;
    color: var(--sg-white);
    text-shadow: 0 0 60px rgba(255, 107, 0, 0.45);
    white-space: nowrap;
}

.ev-teaser-chapter {
    font-family: var(--sg-font-display);
    font-size: clamp(1.1rem, 3.6vw, 2rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sg-gold);
    margin-bottom: 20px;
}

.ev-teaser-meta {
    display: flex;
    justify-content: center;
    gap: 8px 20px;
    flex-wrap: wrap;
    font-family: var(--sg-font-accent);
    font-size: 0.82rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--sg-muted);
    margin-bottom: 22px;
}

.ev-teaser-copy {
    color: var(--sg-muted);
    line-height: 1.8;
    margin-bottom: 26px;
}

.ev-teaser-status {
    display: inline-block;
    padding: 12px 24px;
    border: 1px solid var(--sg-orange);
    border-radius: 50px;
    font-family: var(--sg-font-accent);
    font-size: 0.76rem;
    font-weight: bold;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--sg-orange);
}

/* Phone */
@media (max-width: 600px) {
    .ev-teaser-body {
        padding: calc(var(--sg-nav-height, 78px) + 26px) 18px 46px;
    }
}

/* ==========================================================================
   RESIDENCY - Friday nights at the Grand View (hidden with the `hidden` attribute)
   ========================================================================== */

.ev-residency {
    border-top: 1px solid var(--sg-border);
}

/* Banner: video behind, scrim on top, words on the left */
.ev-res-hero {
    position: relative;
    overflow: hidden;
    min-height: min(56vh, 420px);
    display: flex;
    align-items: center;
    background: linear-gradient(120deg, var(--sg-purple-dark), var(--sg-night) 70%);
}

.ev-res-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ev-res-hero-media {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(6, 6, 6, 0.95) 26%, rgba(6, 6, 6, 0.4) 78%);
}

.ev-res-hero-inner {
    position: relative;
    width: 100%;
    max-width: var(--sg-max-width);
    margin: auto;
    padding: 26px 6%;
}

.ev-res-name {
    font-family: var(--sg-font-display);
    font-size: clamp(1.9rem, 4.4vw, 3.1rem);
    line-height: 0.94;
    letter-spacing: -1.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.ev-res-venue {
    font-family: var(--sg-font-accent);
    font-size: clamp(0.72rem, 1.7vw, 0.92rem);
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--sg-white);
    margin-bottom: 14px;
}

/* The three facts with icons */
.ev-res-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, max-content));
    gap: 12px 30px;
    list-style: none;
    margin: 0 0 18px;
}

.ev-res-facts li {
    display: flex;
    align-items: center;
    gap: 11px;
}

.ev-res-facts svg {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    fill: currentColor;
    color: var(--sg-gold);
}

.ev-res-facts span {
    display: grid;
    font-family: var(--sg-font-accent);
    font-size: 0.66rem;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--sg-dim);
    line-height: 1.7;
}

.ev-res-facts b {
    color: var(--sg-white);
    font-weight: bold;
}

/* Handwritten line in the corner (decorative) */
.ev-res-script {
    position: absolute;
    right: 5%;
    bottom: 14%;
    margin: 0;
    font-family: var(--sg-font-script);
    font-size: clamp(1.2rem, 2.4vw, 2rem);
    line-height: 1.25;
    text-align: center;
    color: var(--sg-white);
    opacity: 0.9;
    pointer-events: none;
}

/* Line-up left, venue card right */
.ev-res-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 26px;
    align-items: start;
    width: 100%;
    max-width: var(--sg-max-width);
    margin: auto;
    padding: 18px 6%;
}

/* DJ cards: four across on a computer, two on a phone */
.ev-fri-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 12px;
}

/* The photo is the card */
.ev-fri {
    position: relative;
    aspect-ratio: 3 / 4;
    background: var(--ev-art, none), linear-gradient(140deg, var(--sg-purple-dark), var(--sg-night) 72%);
    background-size: cover;
    background-position: center 18%;
    border: 1px solid var(--sg-border);
    border-radius: 12px;
    overflow: hidden;
    transition:
        border-color 0.25s,
        transform 0.25s;
}

.ev-fri:hover {
    border-color: var(--sg-gold);
    transform: translateY(-3px);
}

.ev-fri-art {
    position: absolute;
    inset: 0;
}

.ev-fri-date {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 9px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid var(--sg-gold);
    color: var(--sg-gold);
    font-family: var(--sg-font-accent);
    font-size: 0.6rem;
    font-weight: bold;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.ev-fri-body {
    position: absolute;
    inset: auto 0 0 0;
    padding: 26px 14px 14px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.72) 45%, rgba(0, 0, 0, 0) 100%);
}

.ev-fri-body h3 {
    font-family: var(--sg-font-display);
    font-size: 1rem;
    letter-spacing: -0.4px;
    text-transform: uppercase;
    margin: 0;
}

.ev-res-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--sg-dim);
    color: var(--sg-white);
    font-family: var(--sg-font-accent);
    font-size: 0.66rem;
    font-weight: bold;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.ev-res-link:hover {
    color: var(--sg-gold);
    border-bottom-color: var(--sg-gold);
}

/* Venue card */
.ev-venue {
    background: var(--sg-panel);
    border: 1px solid var(--sg-border);
    border-radius: 12px;
    padding: 0 0 16px;
    overflow: hidden;
}

.ev-venue-art {
    height: 120px;
    background: url('../../data/images/venues/grand-view-hotel.jpg'), linear-gradient(140deg, #33184a, #0d0d0d 72%);
    background-size: cover;
    background-position: center 62%;
    margin-bottom: 12px;
}

.ev-venue h3 {
    font-family: var(--sg-font-display);
    font-size: 1.05rem;
    letter-spacing: -0.4px;
    text-transform: uppercase;
    margin: 0 16px 8px;
}

.ev-venue > p {
    margin: 0 16px 12px;
    color: var(--sg-muted);
    font-size: 0.88rem;
    line-height: 1.65;
}

.ev-venue-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 16px 16px;
    color: var(--sg-gold);
    font-family: var(--sg-font-accent);
    font-size: 0.66rem;
    font-weight: bold;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 183, 0, 0.4);
    padding-bottom: 3px;
    transition:
        color 0.2s ease,
        border-color 0.2s ease;
}

.ev-venue-link:hover {
    color: var(--sg-white);
    border-color: var(--sg-white);
}

/* Book a DJ strip */
.ev-res-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 6%;
    background: var(--sg-night);
    border-top: 1px solid var(--sg-border);
}

.ev-res-cta > div {
    max-width: 560px;
}

.ev-res-cta h3 {
    font-family: var(--sg-font-display);
    font-size: clamp(1.25rem, 2.6vw, 1.6rem);
    letter-spacing: -0.8px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.ev-res-cta-copy {
    margin: 0;
    color: var(--sg-muted);
}

/* Computer: four DJ cards across, residency fits one screen */
@media (min-width: 901px) {
    .ev-fri-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .ev-residency {
        display: flex;
        flex-direction: column;
        height: 100vh;
        height: 100dvh;
        min-height: 600px;
    }
    .ev-res-hero {
        flex: 1 1 auto;
        min-height: 250px;
    }
    .ev-res-body,
    .ev-res-cta {
        flex: 0 0 auto;
    }
}

/* Short laptop screens: tighter so it still fits one screen */
@media (min-width: 901px) and (max-height: 840px) {
    .ev-res-hero-inner {
        padding: 16px 6%;
    }
    .ev-res-name {
        font-size: clamp(1.7rem, 3.2vw, 2.3rem);
    }
    .ev-res-venue {
        margin-bottom: 10px;
    }
    .ev-res-facts {
        margin-bottom: 0;
    }
    .ev-res-body {
        padding: 12px 6%;
    }
    .ev-fri-body {
        padding: 22px 12px 12px;
    }
    .ev-venue-art {
        height: 92px;
        margin-bottom: 10px;
    }
    .ev-venue > p {
        margin-bottom: 10px;
    }
    .ev-res-cta {
        padding: 12px 6%;
    }
}

/* Tablet */
@media (max-width: 900px) {
    .ev-res-body {
        grid-template-columns: 1fr;
    }
    .ev-res-script {
        display: none;
    }
}

/* ==========================================================================
   WEEK - heading, arrows and the window the cards slide across
   ========================================================================== */
.ev-weekend {
    margin-top: clamp(40px, 6vw, 72px);
}

.ev-weekend-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

/* Tighter card gap on a phone */
@media (max-width: 560px) {
    .ev-weekend .slide-view {
        --gap: 16px;
    }
}

/* ==========================================================================
   CARDS - past events. .is-nolink = no archive page yet
   ========================================================================== */
.ev-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 26px;
}

/* One stretched link makes the whole card clickable */
.ev-card-link {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.ev-card-art {
    aspect-ratio: 16 / 9;
    background-image: var(--ev-art);
    background-size: cover;
    background-position: center;
    filter: brightness(0.62) saturate(0.72); /* past events sit back */
    transition:
        filter 0.25s ease,
        transform 0.45s ease;
}

/* Logo instead of artwork: contained on a dark tile */
.ev-card-art.is-logo {
    background-size: min(56%, 190px);
    background-repeat: no-repeat;
    background-color: var(--sg-panel);
    filter: brightness(0.75);
}

.ev-card-artists {
    color: var(--sg-dim);
    font-size: 0.92rem;
    line-height: 1.65;
}

.ev-card-btn {
    margin-top: auto; /* buttons line up across cards */
    pointer-events: none; /* the stretched link does the clicking */
    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}

.ev-card:hover .ev-card-art {
    filter: brightness(0.86) saturate(0.95);
    transform: scale(1.04);
}

.ev-card:hover .ev-card-btn {
    background: var(--sg-orange);
    border-color: var(--sg-orange);
    color: var(--sg-night);
}

.ev-card.is-nolink .ev-card-link {
    display: none;
}

.ev-card.is-nolink {
    cursor: default;
}

.ev-card.is-nolink:hover {
    transform: none;
    box-shadow: none;
}

.ev-card.is-nolink .ev-card-btn {
    opacity: 0.45;
}

.ev-card.is-nolink:hover .ev-card-btn {
    background: transparent;
    color: var(--sg-orange);
    border-color: var(--sg-orange);
}

/* Phone */
@media (max-width: 600px) {
    .ev-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ev-card-art,
    .ev-card-btn {
        transition: none;
    }
    .ev-card:hover .ev-card-art {
        transform: none;
    }
}
