/* ============================================================
   The Blueshounds Band — Custom Styles
   Brand palette: midnight #0a1322 · navy #162236 · cream #ece8dd · white accent
   ============================================================ */

:root {
    --night:       #0a1322;
    --deep:        #162236;
    --steel:       #243349;
    --accent:      #ffffff;
    --accent-soft: #d8d3c4;
    --cream:       #ece8dd;
    --muted:       #7a8aa1;
    --dark:        #1a1f29;
    --rust:        #b9866a;
}


/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 12px; }
::-webkit-scrollbar-track { background: var(--night); }
::-webkit-scrollbar-thumb {
    background: var(--steel);
    border: 3px solid var(--night);
    border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-soft); }

/* Firefox */
html { scrollbar-width: auto; scrollbar-color: var(--steel) var(--night); }

/* ── Grain Overlay ─────────────────────────────────────────── */
.grain-overlay {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.88' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='250' height='250' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.025;
    mix-blend-mode: overlay;
    animation: grain-drift 12s steps(8) infinite;
}

@keyframes grain-drift {
    0%   { transform: translate(0, 0); }
    20%  { transform: translate(-2%, -3%); }
    40%  { transform: translate(3%,  2%); }
    60%  { transform: translate(-1%,  4%); }
    80%  { transform: translate(2%, -1%); }
    100% { transform: translate(0, 0); }
}

/* ── Hero Video Background ─────────────────────────────────── */
#hero-video-bg {
    background: var(--night);
}

#hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width:  100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease;
}
#hero-video-bg.is-playing #hero-video {
    opacity: 1;
}

/* ── Shows: scroll offset for calendar date jump ──────────── */
/* Used by scrollIntoView() so the matched card lands below the sticky
   navbar with a small breathing gap, independent of nav height changes. */
.show-item { scroll-margin-top: 138px; }
section[id] { scroll-margin-top: 100px; }
@media (min-width: 768px) {
    .show-item { scroll-margin-top: 168px; }
    section[id] { scroll-margin-top: 140px; }
}

/* ── Pre-JS Initial State (prevents FOUC) ──────────────────── */
.js .hero-name,
.js .hero-divider,
.js .hero-ctas > *,
.js [data-reveal],
.js .member-card,
.js .show-row,
.js .video-card,
.js .music-track {
    opacity: 0;
}

/* ── Hero Vignette ─────────────────────────────────────────── */
/* Two-layer treatment:
   1. Whole-frame midnight wash (heavier at top/bottom for nav + CTAs).
   2. Wide horizontal ink band centered behind the wordmark — pulled
      from the page bg colour so it reads as "the design", not "a fix".  */
.hero-vignette {
    background:
        /* Center band — strong dark plate behind the headline */
        linear-gradient(to bottom,
            transparent 0%,
            transparent 22%,
            rgba(10, 19, 34, 0.55) 30%,
            rgba(10, 19, 34, 0.82) 50%,
            rgba(10, 19, 34, 0.55) 70%,
            transparent 78%,
            transparent 100%),
        /* Full-frame ambient darkening */
        linear-gradient(to bottom,
            rgba(10, 19, 34, 0.75) 0%,
            rgba(10, 19, 34, 0.35) 18%,
            rgba(10, 19, 34, 0.35) 82%,
            rgba(10, 19, 34, 0.85) 100%);
}

/* ── Hamburger bars ────────────────────────────────────────── */
/* GPU-rasterize so rotation tween doesn't shift apparent thickness */
.ham-bar {
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform, opacity;
}

/* ── Hero Typography ───────────────────────────────────────── */
.hero-name,
section > div > div > h2.font-display {
    color: rgb(157, 162, 189);
}

.hero-name {
    font-family: 'Rye', 'Abril Fatface', serif;
    font-size: clamp(2.4rem, 7.6vw, 7rem);
    line-height: 1;
    letter-spacing: 0.015em;
    /* Vertical gradient — bright on top, dusty blue mid, deep at base */
    background: linear-gradient(
        180deg,
        #e8ecf5 0%,
        rgb(192, 198, 220) 35%,
        rgb(157, 162, 189) 65%,
        rgb(118, 126, 158) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    /* Hard 1px outline kept dark for contrast, warm amber halo for pop */
    filter:
        drop-shadow(0 1px 0 rgba(10, 19, 34, 0.95))
        drop-shadow(0 3px 6px rgba(10, 19, 34, 0.85))
        drop-shadow(0 0 28px rgba(255, 196, 130, 0.22))
        drop-shadow(0 14px 38px rgba(10, 19, 34, 0.55));
}

/* Inner spans (THE / BAND) opt out of the gradient — they stay flat cream */
.hero-name > span {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: rgba(236, 232, 221, 0.55);
}

.hero-eyebrow,
.hero-subtitle,
.hero-divider,
.hero-ctas {
    text-shadow: 0 1px 12px rgba(10, 19, 34, 0.95), 0 1px 2px rgba(10, 19, 34, 0.9);
}

/* ── Hero CTAs ─────────────────────────────────────────────── */
.cta-primary {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: #f4efe1;
    color: rgba(10, 19, 34, 0.78);
    border: 1px solid #f4efe1;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.cta-primary:hover {
    background: #ffffff;
    border-color: #ffffff;
    color: var(--night);
}
.cta-primary::before,
.cta-primary::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border: 1px solid var(--night);
    transition: width 0.35s ease, height 0.35s ease;
    pointer-events: none;
    opacity: 0.55;
}
.cta-primary::before {
    top: 6px;
    left: 6px;
    border-right: 0;
    border-bottom: 0;
}
.cta-primary::after {
    bottom: 6px;
    right: 6px;
    border-left: 0;
    border-top: 0;
}
.cta-primary:hover::before,
.cta-primary:hover::after {
    width: 18px;
    height: 18px;
    opacity: 1;
}
.cta-primary > span {
    position: relative;
    z-index: 1;
}

.cta-secondary {
    position: relative;
    padding: 0.6rem 1.25rem 0.6rem 0.5rem;
    background: rgba(10, 19, 34, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(236, 232, 221, 0.18);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.cta-secondary:hover {
    background: rgba(10, 19, 34, 0.75);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ── Hero Divider Hairlines ────────────────────────────────── */
.string-line {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent);
}

/* ── Member Card Bio Expansion ─────────────────────────────── */
.member-toggle {
    appearance: none;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}
.member-toggle:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.55);
    outline-offset: 2px;
}
.member-bio {
    max-height: 0;
    opacity: 0;
    transition: max-height 0.55s ease, opacity 0.35s ease;
}
.member-toggle[aria-expanded="true"] .member-bio {
    max-height: 900px;
    opacity: 1;
}
.member-toggle-icon {
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: box-shadow 0.45s ease, background-color 0.45s ease;
}
.member-toggle:hover .member-toggle-icon {
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7);
}
.member-toggle-icon::before,
.member-toggle-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.45s ease;
}
.member-toggle-icon::before {
    width: 11px;
    height: 1.5px;
    transform: translate(-50%, -50%);
}
.member-toggle-icon::after {
    width: 1.5px;
    height: 11px;
    transform: translate(-50%, -50%);
}
.member-toggle[aria-expanded="true"] .member-toggle-icon {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85);
}
.member-toggle[aria-expanded="true"] .member-toggle-icon::before {
    transform: translate(-50%, -50%) rotate(45deg);
}
.member-toggle[aria-expanded="true"] .member-toggle-icon::after {
    transform: translate(-50%, -50%) rotate(135deg);
}

/* ── Navbar Scroll State ───────────────────────────────────── */
#navbar {
    transition-property: background-color, backdrop-filter, -webkit-backdrop-filter, padding-top, padding-bottom;
}
#navbar.is-scrolled {
    background: rgba(10, 19, 34, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* ── Logo ──────────────────────────────────────────────────── */
.logo-img {
    height: 84px;
    width: auto;
    object-fit: contain;
    /* No filter — logo was designed for dark navy backgrounds */
    transition: opacity 0.3s ease;
}
.logo-img:hover { opacity: 0.85; }
@media (max-width: 640px) {
    .logo-img { height: 52px; }
}

/* ── About: Stat Cards ─────────────────────────────────────── */
.stat-card {
    transition: border-color 0.4s ease, background 0.4s ease;
}
.stat-card:hover {
    background: rgba(22, 34, 54, 0.85);
}

/* ── Member Cards ──────────────────────────────────────────── */
.member-card .member-accent {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
}

/* ── Shows Spotlight Background ────────────────────────────── */
/* Cool blue-white spotlight from top-center. Background-size pins the
   gradient to a fixed-pixel band at the top so the glow doesn't stretch
   when the section grows (expanded cards, calendar view, etc.). */
.shows-grid-bg {
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(200, 215, 240, 0.09), transparent 70%),
        radial-gradient(ellipse at 50% 10%, rgba(200, 215, 240, 0.035), transparent 75%);
    background-size: 100% 620px, 100% 900px;
    background-position: top center, top center;
    background-repeat: no-repeat, no-repeat;
}

/* ── Music Tracks ──────────────────────────────────────────── */
.music-track {
    overflow: hidden;
}
.music-track.is-playing {
    border-color: rgba(157, 162, 189, 0.55);
    background-color: rgba(10, 19, 34, 0.6);
}
.music-track.is-playing .track-play {
    background-color: rgb(157, 162, 189);
    color: var(--cream);
}
.track-waveform {
    background:
        linear-gradient(to bottom, rgba(255,255,255,0.02), rgba(255,255,255,0.04));
}

/* ── Gallery Grid ───────────────────────────────────────────── */
.masonry-grid {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.masonry-col {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.gallery-item {
    cursor: zoom-in;
}

.gallery-item img {
    will-change: opacity;
}

/* ── Contact Atmosphere ────────────────────────────────────── */
.contact-atmosphere {
    background:
        radial-gradient(ellipse at 5%  90%, rgba(255, 255, 255, 0.04) 0%, transparent 45%),
        radial-gradient(ellipse at 95% 10%, rgba(125, 153, 181, 0.05) 0%, transparent 45%);
}

/* ── Form Inputs ───────────────────────────────────────────── */
.form-input {
    caret-color: var(--accent);
}

.form-input:focus {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

input[type="date"].form-input::-webkit-calendar-picker-indicator {
    filter: invert(0.5) sepia(1) saturate(3) hue-rotate(180deg);
    cursor: pointer;
    opacity: 0.6;
}
input[type="date"].form-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* ── Submit Button Shimmer ─────────────────────────────────── */
.submit-btn {
    position: relative;
    overflow: hidden;
}

.submit-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
    transform: translateX(-100%);
    transition: transform 0s;
}

.submit-btn:hover::after {
    transform: translateX(100%);
    transition: transform 0.55s ease;
}

/* ── Nav Link Underline Hover ──────────────────────────────── */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after { width: 100%; }

/* ── Social Links ──────────────────────────────────────────── */
.social-link:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 2px;
}

/* ── Back to Top ───────────────────────────────────────────── */
/* Fixed bottom-right; hidden until the page is scrolled. Same dark-glass
   treatment as .cta-secondary so it reads as part of the design. The
   navbar (z-9990) and grain overlay (z-9998) sit above most content, so
   keep this just under the grain but above page sections. */
.back-to-top {
    position: fixed;
    bottom: 1.75rem;
    right: 1.75rem;
    z-index: 9997;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    color: var(--cream);
    background: rgba(10, 19, 34, 0.55);
    border: 1px solid rgba(236, 232, 221, 0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    /* Hidden state — nudged down and faded, non-interactive */
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.35s ease, transform 0.35s ease,
                visibility 0.35s ease, background-color 0.3s ease,
                border-color 0.3s ease;
}
.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background: rgba(10, 19, 34, 0.75);
    border-color: rgba(255, 255, 255, 0.5);
}
.back-to-top:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 2px;
}
.back-to-top svg {
    display: block;
}
@media (max-width: 640px) {
    .back-to-top {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 2.75rem;
        height: 2.75rem;
    }
}
@media (prefers-reduced-motion: reduce) {
    .back-to-top { transition: opacity 0.2s ease, visibility 0.2s ease; }
}

/* ── Video aspect ratio ────────────────────────────────────── */
.aspect-video { aspect-ratio: 16 / 9; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
    .hero-name {
        font-size: clamp(1.75rem, 9.5vw, 3rem);
        letter-spacing: 0;
    }
    .hero-name > span:first-child {
        letter-spacing: 0.45em !important;
        font-size: 0.85rem !important;
        margin-bottom: 1.25rem !important;
    }
    .hero-name > span:last-child {
        letter-spacing: 0.4em !important;
        font-size: 0.85rem !important;
        margin-top: 1.25rem !important;
    }
    .hero-divider {
        gap: 0.75rem !important;
    }
    .hero-divider .string-line {
        display: none;
    }
    .hero-divider span {
        font-size: 1.05rem !important;
        line-height: 1.4;
    }
    section[id] {
        padding-top: 5rem !important;
        padding-bottom: 5rem !important;
    }
}
