/* Mobile-first layout: The Cattledogs */

:root {
    --navy: #1c2d50;
    --navy-deep: #152238;
    --navy-soft: #2e4268;
    --cream: #faf6ec;
    --cream-muted: #efe6d4;
    --cream-warm: #f5ecd8;
    --text: #1c2d50;
    --text-muted: #4a5d7a;
    --accent: #c45a36;
    --accent-hover: #a84a2c;
    --nav-bg: rgba(28, 45, 80, 0.9);
    --nav-h: 3.5rem;
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --radius: 0.5rem;
    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --font-ui: "Syne", system-ui, sans-serif;
    --max-readable: 38rem;
    --ink-08: rgba(28, 45, 80, 0.08);
    --ink-12: rgba(28, 45, 80, 0.12);
    --ink-20: rgba(28, 45, 80, 0.2);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text);
    background: var(--cream);
}

body.nav-open {
    overflow: hidden;
}

/* Fixed hero image: later sections scroll over it */
.hero-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-color: var(--navy-deep);
    pointer-events: none;
}

.hero-bg__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    /* IMPORTANT (iOS/Safari): keep `backdrop-filter` off the fixed parent.
       `backdrop-filter` can create a containing/clipping context for fixed descendants,
       which makes the mobile flyout menu render as a tiny scrollable box. */
    background: transparent;
    border-bottom: none;
}

.site-nav__bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-xs);
    min-height: var(--nav-h);
    padding: var(--space-xs) var(--space-sm);
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ink-12);
}

.site-nav__brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    justify-self: start;
    grid-column: 1;
    border-radius: var(--radius);
    line-height: 0;
}

.cta-btn--nav {
    grid-column: 2;
    justify-self: center;
    min-height: 2.25rem;
    padding: 0.35rem 0.55rem;
    font-size: clamp(0.58rem, 2.5vw, 0.72rem);
    line-height: 1.2;
    letter-spacing: 0.03em;
    text-align: center;
    max-width: min(44vw, 11.5rem);
    box-sizing: border-box;
    color: rgba(250, 246, 236, 0.92);
    font-weight: 600;
}

.site-nav__brand img {
    display: block;
    height: 2.5rem;
    width: auto;
    max-width: 2.75rem;
    object-fit: contain;
}

.site-nav__brand:focus-visible {
    outline: 2px solid var(--cream);
    outline-offset: 3px;
}

.site-nav__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 3;
    justify-self: end;
    width: 2.75rem;
    height: 2.75rem;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: var(--radius);
    background: transparent;
    color: var(--cream);
    cursor: pointer;
}

.site-nav__toggle:hover,
.site-nav__toggle:focus-visible {
    background: var(--ink-12);
    outline: none;
}

.site-nav__toggle:focus-visible {
    box-shadow: 0 0 0 2px var(--cream);
}

.site-nav__toggle-bars,
.site-nav__toggle-bars::before,
.site-nav__toggle-bars::after {
    display: block;
    width: 1.35rem;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav__toggle-bars {
    position: relative;
}

.site-nav__toggle-bars::before,
.site-nav__toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
}

.site-nav__toggle-bars::before {
    top: -7px;
}

.site-nav__toggle-bars::after {
    top: 7px;
}

.site-nav.is-open .site-nav__toggle-bars {
    background: transparent;
}

.site-nav.is-open .site-nav__toggle-bars::before {
    top: 0;
    transform: rotate(45deg);
}

.site-nav.is-open .site-nav__toggle-bars::after {
    top: 0;
    transform: rotate(-45deg);
}

.site-nav__backdrop {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 98;
    background: rgba(21, 34, 56, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.site-nav.is-open .site-nav__backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.site-nav__menu {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    position: fixed;
    top: var(--nav-h);
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 99;
    padding: var(--space-md);
    background: var(--cream);
    border-bottom: 1px solid var(--ink-12);
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    height: calc(100dvh - var(--nav-h));
    max-height: calc(100dvh - var(--nav-h));
}

.site-nav.is-open .site-nav__menu {
    transform: translateX(0);
}

.site-nav__menu a {
    color: var(--navy);
    text-decoration: none;
    font-family: var(--font-ui);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 0.65rem 0.5rem;
    border-radius: var(--radius);
    border-bottom: 1px solid var(--ink-08);
}

.site-nav__menu a:last-child {
    border-bottom: none;
}

.site-nav__menu a:hover,
.site-nav__menu a:focus-visible {
    color: var(--accent);
    background: rgba(196, 90, 54, 0.08);
    outline: none;
}

.hero {
    scroll-margin-top: calc(var(--nav-h) + 0.5rem);
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: calc(var(--nav-h) + 14rem) var(--space-md) var(--space-xl);
    text-align: center;
    color: var(--cream);
}

.hero-inner {
    width: 100%;
    max-width: min(42rem, 100%);
    padding: var(--space-sm) 0 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.hero-wordmark {
    margin: 0 0 var(--space-sm);
    line-height: 0;
}

.hero-wordmark__img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 36rem;
    margin-inline: auto;
}

.tagline {
    margin: 0 0 var(--space-md);
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-style: italic;
    font-weight: 400;
    opacity: 0.96;
    line-height: 1.4;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.6rem 1.25rem;
    position: relative;
    z-index: 0;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cream);
    background: transparent;
    border-radius: 999px;
    text-decoration: none;
    transition: transform 0.15s ease;
}

.cta-btn::before {
    content: "";
    position: absolute;
    inset: -0.35rem -0.65rem;
    z-index: -1;
    background-image: url("src/icon/button.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    transition: filter 0.2s ease;
}

/* Nav CTA runs much smaller on mobile; give the SVG more breathing room */
.cta-btn--nav {
    line-height: 1.05;
}

.cta-btn--nav::before {
    inset: -0.55rem -0.9rem;
    opacity: 0.78;
    filter: saturate(0.9) contrast(0.95);
}

.cta-btn:hover,
.cta-btn:focus-visible {
    filter: none;
    outline: none;
}

.cta-btn:hover::before,
.cta-btn:focus-visible::before {
    filter: brightness(0.92) saturate(1.05);
}

.cta-btn--nav:hover::before,
.cta-btn--nav:focus-visible::before {
    opacity: 0.92;
    filter: brightness(0.96) saturate(1);
}

.cta-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(250, 246, 236, 0.45);
}

.cta-btn:active {
    transform: scale(0.98);
}

.section-panel {
    scroll-margin-top: calc(var(--nav-h) + 0.5rem);
    position: relative;
    z-index: 2;
    background: var(--cream);
    padding: var(--space-lg) var(--space-md);
    border-top: 1px solid var(--ink-08);
}

.section-panel h2 {
    margin: 0 0 var(--space-md);
    font-family: var(--font-display);
    font-size: clamp(1.65rem, 4vw, 2.15rem);
    font-weight: 600;
    font-optical-sizing: auto;
    letter-spacing: -0.02em;
    color: var(--navy);
}

.section-panel > p {
    margin: 0 0 var(--space-sm);
    max-width: var(--max-readable);
    color: var(--text-muted);
}

.show {
    display: grid;
    gap: var(--space-xs);
    padding: var(--space-md);
    background: var(--cream-muted);
    border-radius: var(--radius);
    max-width: 36rem;
    border: 1px solid var(--ink-08);
}

.shows-list {
    display: grid;
    gap: var(--space-sm);
}

.show--loading,
.show--empty,
.show--error {
    opacity: 0.9;
}

.show--error .show-date {
    color: #9b2c2c;
}

.show-date {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.show-venue {
    font-size: 1.05rem;
}

.ticket-link {
    justify-self: start;
    margin-top: var(--space-xs);
    font-family: var(--font-ui);
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

.ticket-link:hover,
.ticket-link:focus-visible {
    text-decoration: underline;
    outline: none;
}

.embed-slot {
    min-height: 8rem;
    padding: var(--space-md);
    border-radius: var(--radius);
    border: 1px dashed var(--ink-20);
    background: rgba(250, 246, 236, 0.85);
    max-width: 42rem;
}

.embed-slot--form {
    min-height: 10rem;
}

.embed-placeholder {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.signup-success {
    margin: 0 0 var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: calc(var(--radius) - 0.1rem);
    border: 1px solid rgba(34, 125, 74, 0.28);
    background: rgba(34, 125, 74, 0.08);
    color: var(--navy);
    font-weight: 600;
    max-width: var(--max-readable);
}

.kit-signup {
    max-width: 42rem;
}

.kit-signup__label {
    display: inline-block;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    margin-bottom: 0.4rem;
}

.kit-signup__row {
    display: grid;
    gap: var(--space-sm);
    align-items: center;
}

.kit-signup__input {
    width: 100%;
    min-height: 2.9rem;
    padding: 0.65rem 0.9rem;
    border-radius: 0.75rem;
    border: 1px solid var(--ink-20);
    background: rgba(250, 246, 236, 0.95);
    color: var(--text);
    font-family: var(--font-ui);
    font-size: 1rem;
}

.kit-signup__input::placeholder {
    color: rgba(74, 93, 122, 0.75);
}

.kit-signup__input:focus-visible {
    outline: none;
    border-color: rgba(196, 90, 54, 0.65);
    box-shadow: 0 0 0 3px rgba(196, 90, 54, 0.18);
}

button.cta-btn.kit-signup__button {
    border: 0;
    cursor: pointer;
}

.kit-signup__fineprint {
    margin: var(--space-xs) 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: var(--max-readable);
}

@media (min-width: 640px) {
    .kit-signup__row {
        grid-template-columns: 1fr auto;
    }

    button.cta-btn.kit-signup__button {
        white-space: nowrap;
    }
}

/* SoundCloud — full width, responsive height, Lenis-friendly */
.music-embed-wrap {
    max-width: 52rem;
    margin-top: var(--space-xs);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--ink-12);
    background: var(--cream-muted);
    box-shadow: 0 4px 24px var(--ink-08);
}

.music-embed__frame {
    display: block;
    width: 100%;
    height: clamp(300px, 65vw, 450px);
    border: 0;
}

html.lenis.lenis-smooth .music-embed-wrap .music-embed__frame {
    pointer-events: auto;
}

.music-embed__credit {
    margin: 0;
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    line-height: 1.5;
    word-break: break-word;
    border-top: 1px solid var(--ink-08);
    background: var(--cream);
}

.music-embed__credit a {
    color: var(--navy-soft);
    text-decoration: none;
    font-weight: 600;
}

.music-embed__credit a:hover,
.music-embed__credit a:focus-visible {
    color: var(--accent);
    text-decoration: underline;
    outline: none;
}

.music-embed__sep {
    margin: 0 0.25rem;
    color: var(--ink-20);
}

.merch-lead,
.merch-cta {
    max-width: var(--max-readable);
}

.merch-cta {
    margin-bottom: var(--space-md);
}

.merch-cta a {
    font-family: var(--font-ui);
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

.merch-cta a:hover,
.merch-cta a:focus-visible {
    text-decoration: underline;
    outline: none;
}

.merch-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: var(--space-sm);
    max-width: 48rem;
}

.merch-card {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--cream-muted);
    box-shadow: 0 4px 24px var(--ink-08);
    border: 1px solid var(--ink-08);
}

.merch-card img {
    display: block;
    width: 100%;
    height: auto;
}

.merch-grid--carousel {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100vw;
    max-width: 100vw;
    margin-inline: calc(50% - 50vw);
    padding-inline: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.merch-grid--carousel::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.merch-grid--carousel .merch-card {
    flex: 0 0 auto;
}

.merch-grid--carousel .merch-card img {
    width: auto;
    height: clamp(9.5rem, 42vw, 12.5rem);
}

.merch-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: 100%;
}

.site-footer {
    padding-bottom: var(--space-xl);
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.site-footer__copy {
    margin: 0;
}

.social-nav {
    margin-bottom: var(--space-md);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs) var(--space-sm);
    list-style: none;
    margin: 0;
    padding: 0;
}

.social-links__a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius);
    color: var(--text-muted);
    transition: color 0.2s ease, background-color 0.2s ease;
}

.social-links__a:hover {
    color: var(--accent);
    background-color: var(--ink-08);
}

.social-links__a:focus-visible {
    color: var(--accent);
    background-color: var(--ink-08);
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.social-links__icon {
    width: 1.35rem;
    height: 1.35rem;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .site-nav {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        column-gap: var(--space-md);
        min-height: var(--nav-h);
        height: var(--nav-h);
        padding: 0 var(--space-md);
        background: var(--nav-bg);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--ink-12);
    }

    .site-nav__bar {
        display: contents;
    }

    .site-nav__brand {
        grid-column: 1;
        justify-self: start;
    }

    .cta-btn--nav {
        grid-column: 2;
        justify-self: center;
        max-width: none;
        font-size: 0.72rem;
        padding: 0.4rem 0.75rem;
        white-space: nowrap;
        color: rgba(250, 246, 236, 0.92);
        font-weight: 600;
    }

    .cta-btn--nav::before {
        inset: -0.45rem -0.8rem;
        opacity: 0.82;
        filter: saturate(0.92) contrast(0.96);
    }

    .site-nav__toggle {
        display: none;
    }

    .site-nav__backdrop {
        display: none !important;
    }

    .site-nav__menu {
        position: static;
        grid-column: 3;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-end;
        justify-self: end;
        gap: var(--space-xs) var(--space-sm);
        padding: 0;
        margin: 0;
        background: transparent;
        border: none;
        transform: none !important;
        overflow: visible;
        height: auto;
        max-height: none;
    }

    .site-nav__menu a {
        color: var(--cream);
        font-size: 0.8125rem;
        font-weight: 600;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        padding: 0.4rem 0.55rem;
        border: none;
    }

    .site-nav__menu a:hover,
    .site-nav__menu a:focus-visible {
        color: var(--cream-warm);
        background: transparent;
        text-decoration: underline;
        text-underline-offset: 3px;
    }

    .site-nav__menu a:focus-visible {
        outline: 2px solid var(--cream);
        outline-offset: 2px;
        text-decoration: none;
    }

    .site-nav.is-open .site-nav__menu {
        transform: none;
    }

    .merch-grid {
        display: flex;
        flex-wrap: nowrap;
        align-items: flex-start;
        justify-content: flex-start;
        gap: var(--space-md);
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .merch-grid.merch-grid--carousel {
        overflow-x: auto;
    }

    .merch-grid .merch-card {
        flex: 0 0 auto;
    }

    .merch-card img {
        width: auto;
        height: clamp(14rem, 24vw, 18rem);
    }

    .merch-grid--carousel .merch-card img {
        width: auto;
        height: clamp(12rem, 20vw, 16rem);
    }

    .section-panel {
        padding-inline: var(--space-lg);
    }
}

/* Wider viewports: center column so lower sections sit in the middle of the page */
@media (min-width: 768px) {
    .section-panel {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .section-panel h2 {
        width: 100%;
        text-align: center;
    }

    .section-panel > p {
        width: 100%;
        max-width: var(--max-readable);
        text-align: center;
    }

    .show {
        width: 100%;
        max-width: 36rem;
        text-align: center;
    }

    .ticket-link {
        justify-self: center;
    }

    .music-embed-wrap {
        width: 100%;
        max-width: 52rem;
    }

    .music-embed__credit {
        text-align: center;
    }

    .merch-grid:not(.merch-grid--carousel) {
        width: 100%;
        max-width: 48rem;
    }

    .merch-grid--carousel {
        width: 100vw;
        max-width: 100vw;
        margin-inline: calc(50% - 50vw);
    }

    .embed-slot {
        width: 100%;
        max-width: 42rem;
    }

    .embed-placeholder {
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .site-nav__toggle-bars,
    .site-nav__toggle-bars::before,
    .site-nav__toggle-bars::after,
    .site-nav__menu,
    .site-nav__backdrop {
        transition: none;
    }

    .cta-btn {
        transition: none;
    }

    .cta-btn:active {
        transform: none;
    }
}
