/* ============================================
   NAPA — National Academy for the Performing Arts
   Base Stylesheet — v3 Design System
   ============================================ */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; max-width: 100%; }
body {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--color-text);
    background: var(--color-bg-cream);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--color-primary); text-decoration: none; transition: color .3s; }
a:hover { color: var(--color-primary-light); }
img { max-width: 100%; height: auto; display: block; }
h1,h2,h3,h4,h5 { font-family: var(--font-heading); font-weight: 500; line-height: 1.15; color: var(--color-ink); }
button { font-family: var(--font-body); }

/* --- CSS Custom Properties (non-theme constants) --- */
/* Color & font variables are set by the theme CSS files (napa-theme-classic.css / napa-theme-patriotic.css) */
:root {
    --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
    --container-max: 1200px;
    --container-padding: clamp(20px, 4vw, 40px);
}


/* --- Container / Wrap --- */
.wrap {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}


/* ==================== NAVIGATION ==================== */
.site-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: transparent;
    border-bottom: none;
    transition: all 0.5s var(--ease-smooth);
    padding: 14px 0;
}
.site-nav.scrolled {
    padding: 6px 0;
    background: color-mix(in srgb, var(--color-bg-cream) 92%, transparent);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border-bottom: 1px solid var(--color-warm-gray);
}
.nav-inner {
    display: flex; align-items: center; justify-content: space-between;
}

/* Logo */
.nav-logo {
    transition: transform 0.4s; transform-origin: left center;
    display: inline-flex; align-items: center;
    cursor: pointer; text-decoration: none; user-select: none;
}
.scrolled .nav-logo { transform: scale(0.85); }
.nav-logo-img {
    display: block;
    height: 40px; width: auto;
    /* Single-source PNG that's natively maroon; flipped to white via filter
       when the nav sits over a dark hero. The .scrolled rule below removes
       the filter so the natural maroon shows on the cream nav background. */
    filter: brightness(0) invert(1);
    transition: filter .25s ease, transform .25s ease;
}
@media (max-width: 600px) {
    .nav-logo-img { height: 32px; }
}

/* Desktop links — white by default (nav sits over dark headers on all pages) */
.d-nav { display: flex; align-items: center; gap: 28px; }
.d-nav a, .d-nav span {
    color: rgba(255,255,255,.85);
    font-size: 11.5px; font-family: var(--font-body); font-weight: 500;
    letter-spacing: 1.8px; text-transform: uppercase;
    cursor: pointer; transition: all .3s;
    padding-bottom: 4px; border-bottom: 2px solid transparent; text-decoration: none;
}
.d-nav a:hover, .d-nav span:hover { color: #fff; }
.d-nav a.active, .d-nav span.active {
    color: #fff; font-weight: 700;
    border-bottom-color: rgba(255,255,255,.6);
}
/* When scrolled past header onto cream content, switch to dark text */
.site-nav.scrolled .d-nav a,
.site-nav.scrolled .d-nav span { color: var(--color-text-mid); }
.site-nav.scrolled .d-nav a:hover,
.site-nav.scrolled .d-nav span:hover { color: var(--color-primary); }
.site-nav.scrolled .d-nav a.active,
.site-nav.scrolled .d-nav span.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }

/* Logo color states — drop the filter when scrolled so the native maroon shows. */
.site-nav.scrolled .nav-logo-img { filter: none; }

/* Cart icon + badge */
.nav-cart { cursor: pointer; position: relative; margin-left: 8px; display: flex; align-items: center; }
.nav-cart svg { width: 18px; height: 18px; stroke: rgba(255,255,255,.85); }
.nav-cart-badge {
    position: absolute; top: -6px; right: -8px;
    background: var(--color-primary); color: #fff;
    font-size: 9px; font-weight: 800; width: 17px; height: 17px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-family: var(--font-body);
}
.site-nav.scrolled .nav-cart svg { stroke: var(--color-ink); }

/* User avatar — white on dark, burgundy on cream */
.nav-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(255,255,255,.15); border: 1.5px solid rgba(255,255,255,.3);
    display: flex; align-items: center; justify-content: center;
    transition: all .3s; cursor: pointer; margin-left: 4px;
}
.nav-avatar span { font-family: var(--font-body); font-size: 11px; font-weight: 700; color: #fff; }
.site-nav.scrolled .nav-avatar {
    background: color-mix(in srgb, var(--color-primary) 10%, transparent);
    border-color: color-mix(in srgb, var(--color-primary) 22%, transparent);
}
.site-nav.scrolled .nav-avatar span { color: var(--color-primary); }

/* Login link — white on dark, dark on cream */
.nav-login-link { color: rgba(255,255,255,.85) !important; transition: color .3s; }
.nav-login-link:hover { color: #fff !important; }
.nav-login-link svg { stroke: rgba(255,255,255,.85); }
.site-nav.scrolled .nav-login-link { color: var(--color-text-mid) !important; }
.site-nav.scrolled .nav-login-link:hover { color: var(--color-primary) !important; }
.site-nav.scrolled .nav-login-link svg { stroke: var(--color-text-mid); }

/* Mobile toggle */
.m-nav { display: none; cursor: pointer; padding: 8px; z-index: 10; }
.m-nav span {
    display: block; width: 22px; height: 2px;
    background: var(--color-ink); margin-bottom: 5px;
    transition: .3s;
}
.m-nav span:last-child { margin-bottom: 0; }
.site-nav.hero-nav:not(.scrolled) .m-nav span { background: var(--color-bg-ivory); }
.m-nav.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.m-nav.open span:nth-child(2) { transform: scaleX(0); opacity: 0; }
.m-nav.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Mobile menu */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.mobile-menu {
    position: absolute; top: 100%; left: 0; right: 0;
    background: color-mix(in srgb, var(--color-bg-cream) 97%, transparent);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-warm-gray);
    padding: 12px 0; display: none;
    animation: slideDown .35s var(--ease-smooth);
}
.mobile-menu.open { display: block; }
.mobile-menu a {
    display: block; padding: 16px 32px;
    color: var(--color-text); font-family: var(--font-body);
    font-size: 14px; font-weight: 500; letter-spacing: 1.5px;
    text-transform: uppercase; text-decoration: none;
    border-left: 3px solid transparent; transition: all .2s;
}
.mobile-menu a.active { color: var(--color-primary); font-weight: 700; border-left-color: var(--color-primary); }
.mobile-menu a:hover { color: var(--color-primary); }

@media (max-width: 900px) {
    .d-nav { display: none !important; }
    .m-nav { display: block !important; }
}


/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 16px 38px; font-size: 12px; font-family: var(--font-body); font-weight: 700;
    letter-spacing: 2.5px; text-transform: uppercase;
    border-radius: 3px; border: none; position: relative;
    cursor: pointer; transition: all .4s var(--ease-smooth);
    text-decoration: none; line-height: 1;
}
.btn:disabled { opacity: .4; cursor: not-allowed; }

.btn-primary {
    background: var(--color-primary); color: #fff;
    box-shadow: 0 2px 8px rgba(122,27,59,.22);
}
.btn-primary:hover {
    transform: translateY(-2px); color: #fff;
    box-shadow: 0 16px 32px rgba(122,27,59,.25);
}

.btn-outline {
    background: transparent; color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
}
.btn-outline:hover { background: color-mix(in srgb, var(--color-primary) 8%, transparent); color: var(--color-primary); }

.btn-ghost {
    background: transparent; color: var(--color-bg-ivory);
    border: 1.5px solid rgba(255,255,255,.4);
}
.btn-ghost:hover { background: rgba(255,255,255,.15); color: #fff; }

.btn-light {
    background: var(--color-bg-ivory); color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.btn-light:hover {
    background: #fff; color: var(--color-primary);
    box-shadow: 0 12px 32px rgba(0,0,0,.12);
}

.btn-block { width: 100%; }
.btn-sm { padding: 10px 22px; font-size: 11px; letter-spacing: 2px; }


/* ==================== SECTION HEAD (Title component) ==================== */
.section-head { text-align: center; margin-bottom: 56px; }
.section-head-left { text-align: left; }
.section-sub {
    color: var(--color-primary); font-size: 11px; font-family: var(--font-body);
    font-weight: 700; letter-spacing: 5px; text-transform: uppercase;
    margin: 0 0 14px;
}
.section-sub-light { color: var(--color-accent-light); }
.section-title {
    font-family: var(--font-heading); font-size: clamp(28px, 4.5vw, 50px);
    font-weight: 500; color: var(--color-ink); margin: 0; line-height: 1.15;
}
.section-title-light { color: var(--color-bg-ivory); }

/* Ornamental divider */
.orn {
    display: flex; align-items: center; justify-content: center; gap: 14px;
    margin: 28px 0;
}
.orn-line {
    height: 1px; width: 60px;
    background: linear-gradient(to right, transparent, color-mix(in srgb, var(--color-primary) 27%, transparent));
}
.orn-line-r { background: linear-gradient(to left, transparent, color-mix(in srgb, var(--color-primary) 27%, transparent)); }
.orn svg { width: 12px; height: 12px; }
.orn path { fill: var(--color-primary); opacity: .3; }

.section-action { text-align: center; margin-top: 56px; }


/* ==================== HERO ==================== */
.hero {
    min-height: 100vh; position: relative; overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0;
    background: linear-gradient(155deg, var(--color-primary-deep) 0%, var(--color-primary) 35%, var(--color-primary-light) 70%, var(--color-rosegold) 100%);
}

/* Parallax elements */
.hero-ellipses {
    position: absolute; inset: 0; opacity: .035; z-index: 1;
}
.hero-watermark {
    position: absolute; right: -2%; top: 18%; opacity: .03; z-index: 2;
}
.hero-glow {
    position: absolute; width: 50%; height: 50%; border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--color-accent) 7%, transparent), transparent 70%);
    top: 15%; left: 25%; z-index: 1;
}

.hero-content {
    position: relative; z-index: 2;
    height: 100vh; min-height: 720px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center; padding: 0 24px;
}

/* Location badge */
.hero-badge {
    display: inline-flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,.07); border-radius: 40px;
    padding: 10px 26px; margin-bottom: 48px;
    border: 1px solid rgba(255,255,255,.1);
    backdrop-filter: blur(10px);
}
.hero-badge svg { width: 11px; height: 11px; stroke: rgba(255,255,255,.6); stroke-width: 2; fill: none; }
.hero-badge span {
    color: rgba(255,255,255,.7); font-size: 10.5px;
    font-family: var(--font-body); letter-spacing: 4px;
    text-transform: uppercase; font-weight: 500;
}

/* Headline */
.hero-slide {
    transition: all .6s var(--ease-smooth);
}
.hero-slide.fade-out { opacity: 0; transform: translateY(16px) scale(.98); }
.hero-slide.fade-in { opacity: 1; transform: translateY(0) scale(1); }

.hero h1 {
    font-family: var(--font-heading); font-size: clamp(38px, 7.5vw, 84px);
    font-weight: 500; color: #fff; line-height: 1.05;
    margin: 0; max-width: 850px;
}
.hero-subtitle {
    color: rgba(255,255,255,.6); font-size: clamp(15px, 1.8vw, 18px);
    font-family: var(--font-body); font-weight: 400;
    margin-top: 28px; max-width: 480px; line-height: 1.7;
    margin-left: auto; margin-right: auto;
}
.hero-cta { display: flex; gap: 16px; margin-top: 52px; flex-wrap: wrap; justify-content: center; }

/* Slide indicators */
.hero-dots { display: flex; gap: 8px; margin-top: 72px; }
.hero-dot {
    height: 4px; border-radius: 2px; cursor: pointer;
    background: rgba(255,255,255,.25); width: 10px;
    transition: all .5s var(--ease-smooth);
}
.hero-dot.active { width: 44px; background: #fff; }

/* Wave transition */
.hero-wave {
    position: absolute; bottom: -2px; left: 0; right: 0; z-index: 3;
}
.hero-wave path { fill: var(--color-bg-cream); }


/* ==================== SHOW CARDS ==================== */
.shows-section { background: var(--color-bg-cream); padding: 100px 0 120px; }
.shows-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 24px;
}

.show-card {
    background: #fff; border-radius: 6px; overflow: hidden;
    transition: all .5s var(--ease-smooth);
    border: 1px solid color-mix(in srgb, var(--color-warm-gray) 53%, transparent);
    box-shadow: 0 1px 4px rgba(0,0,0,.03), 0 4px 12px rgba(0,0,0,.02);
    text-decoration: none; color: inherit; display: block; cursor: pointer;
}
.show-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 28px 68px rgba(0,0,0,.10), 0 10px 24px rgba(0,0,0,.04);
}

/* Card image area */
.show-card-img {
    height: 210px; position: relative; overflow: hidden;
    transition: background .5s;
}
.show-card-img img { width: 100%; height: 100%; object-fit: cover; }

/* Company-colored placeholders */
.show-card-img.bg-npo { background: #F8EEF2; }
.show-card:hover .show-card-img.bg-npo { background: #F2E4EA; }
.show-card-img.bg-ntac { background: #EEF2F6; }
.show-card:hover .show-card-img.bg-ntac { background: #E4EAF0; }
.show-card-img.bg-nsso { background: #EDF5F3; }
.show-card:hover .show-card-img.bg-nsso { background: #E0EFEC; }
.show-card-img.bg-guest { background: #F9F5EA; }
.show-card:hover .show-card-img.bg-guest { background: #F3EDD8; }

/* Card icon placeholder */
.show-card-icon {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 56px; opacity: .15;
    transition: transform .6s var(--ease-smooth);
}
.show-card:hover .show-card-icon { transform: scale(1.15) rotate(6deg); }

/* Season badge */
.badge-season {
    position: absolute; top: 16px; left: 16px;
    color: #fff; padding: 6px 16px; border-radius: 3px;
    font-size: 10px; font-family: var(--font-body);
    font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
}
.badge-season.accent-npo { background: var(--color-npo); }
.badge-season.accent-ntac { background: var(--color-ntac); }
.badge-season.accent-nsso { background: var(--color-nsso); }
.badge-season.accent-guest { background: var(--color-guest); }

/* Selling fast badge */
.badge-selling-fast {
    position: absolute; top: 16px; right: 16px;
    background: rgba(210,55,45,.9); color: #fff;
    padding: 5px 12px; border-radius: 3px;
    font-size: 10px; font-family: var(--font-body);
    font-weight: 700; letter-spacing: 1px;
}

/* Progress bar */
.card-progress { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; }
.card-progress-fill { height: 100%; border-radius: 0 2px 0 0; transition: width 1.5s var(--ease-smooth); }

/* Card content */
.show-card-body { padding: 24px 28px 28px; }
.company-tag {
    font-size: 10px; font-family: var(--font-body); font-weight: 700;
    letter-spacing: 2.5px; text-transform: uppercase; margin: 0 0 10px;
}
.company-tag.tag-npo { color: var(--color-npo); }
.company-tag.tag-ntac { color: var(--color-ntac); }
.company-tag.tag-nsso { color: var(--color-nsso); }
.company-tag.tag-guest { color: var(--color-guest); }

.show-card-body h3 {
    font-family: var(--font-heading); font-size: 21px; font-weight: 500;
    color: var(--color-ink); margin: 0 0 10px; line-height: 1.3;
}
.show-card-desc {
    color: var(--color-text-mid); font-family: var(--font-body);
    font-size: 14px; line-height: 1.65; margin: 0 0 22px;
}

/* Card footer */
.show-card-footer {
    display: flex; justify-content: space-between; align-items: flex-end;
    padding-top: 18px; border-top: 1px solid var(--color-warm-gray);
}
.show-card-date {
    color: var(--color-text); font-family: var(--font-body);
    font-size: 13px; font-weight: 600; margin: 0;
}
.show-card-venue {
    color: var(--color-text-light); font-family: var(--font-body);
    font-size: 12px; margin: 4px 0 0;
}
.show-card-price {
    color: var(--color-primary); font-family: var(--font-heading);
    font-size: 22px; font-weight: 500; margin: 0; text-align: right;
}
.show-card-price-label {
    color: var(--color-text-light); font-family: var(--font-body);
    font-size: 10px; font-weight: 600; letter-spacing: 1px; margin: 2px 0 0;
}


/* ==================== COMPANY CARDS ==================== */
.companies-section { background: var(--color-bg-sand); padding: 120px 0; position: relative; }
.companies-section::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(to right, transparent, color-mix(in srgb, var(--color-primary) 9%, transparent), transparent);
}
.companies-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px; }

.company-card {
    background: #fff; border-radius: 6px; padding: 44px 36px;
    cursor: pointer; position: relative; overflow: hidden;
    transition: all .5s var(--ease-smooth);
    border: 1px solid color-mix(in srgb, var(--color-warm-gray) 40%, transparent);
    box-shadow: 0 1px 6px rgba(0,0,0,.02);
}
.company-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 28px 68px rgba(0,0,0,.08);
}
.company-card-accent {
    position: absolute; top: 0; left: 0; right: 0; height: 4px;
    transition: height .4s;
}
.company-card:hover .company-card-accent { height: 6px; }
.company-card-watermark {
    position: absolute; bottom: -20px; right: -20px;
    font-size: 140px; opacity: .03; transition: transform .6s var(--ease-smooth);
}
.company-card:hover .company-card-watermark { transform: rotate(8deg) scale(1.08); }

.company-card-header { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; position: relative; z-index: 1; }
.company-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.company-abbr {
    font-family: var(--font-body); font-size: 11px; font-weight: 800;
    letter-spacing: 2.5px; margin: 0;
}
.company-est { color: var(--color-text-light); font-family: var(--font-body); font-size: 11px; margin: 2px 0 0; }

.company-card-content { position: relative; z-index: 1; }
.company-card h3 {
    font-family: var(--font-heading); font-size: 23px; font-weight: 500;
    color: var(--color-ink); margin: 0 0 6px;
}
.company-tagline {
    font-family: var(--font-heading); font-style: italic;
    font-size: 14px; margin: 0 0 16px;
}
.company-card p.company-desc {
    color: var(--color-text-mid); font-family: var(--font-body);
    font-size: 14px; line-height: 1.75;
}
.company-meta {
    display: flex; gap: 32px; margin-top: 28px; padding-top: 18px;
    border-top: 1px solid var(--color-warm-gray);
}
.company-meta-val {
    font-family: var(--font-heading); font-size: 24px; margin: 0;
}
.company-meta-label {
    color: var(--color-text-light); font-family: var(--font-body);
    font-size: 10px; font-weight: 600; letter-spacing: 1.5px; margin: 3px 0 0;
}


/* ==================== STATS / BUILDING SECTION ==================== */
.stats-section {
    background: var(--color-primary-deep); position: relative; overflow: hidden;
    padding: 130px 0;
}
.stats-section::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(160deg, var(--color-primary-deep), var(--color-primary-dark) 50%, color-mix(in srgb, var(--color-primary) 20%, transparent) 100%);
}
.stats-section .wrap { position: relative; z-index: 1; }
.stats-section .section-desc {
    color: rgba(255,255,255,.65); font-size: 17px; line-height: 2.1;
    font-family: var(--font-heading); max-width: 720px;
    margin: -32px auto 72px; text-align: center;
}
.stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.stat-card {
    padding: 36px 16px; text-align: center;
    background: rgba(255,255,255,.04); border-radius: 4px;
    border: 1px solid rgba(255,255,255,.06); transition: background .4s;
}
.stat-card:hover { background: rgba(255,255,255,.07); }
.stat-number {
    color: var(--color-accent-light); font-family: var(--font-heading);
    font-size: clamp(36px, 5vw, 40px); font-weight: 400; margin: 0;
}
.stat-label {
    color: rgba(255,255,255,.4); font-family: var(--font-body);
    font-size: 10px; font-weight: 600; letter-spacing: 2px;
    text-transform: uppercase; margin: 12px 0 0;
}
@media (max-width: 600px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }


/* ==================== NEWSLETTER ==================== */
.newsletter-section { background: var(--color-bg-cream); padding: 80px 0; }
.newsletter-inner { max-width: 600px; margin: 0 auto; text-align: center; }
.newsletter-form { display: flex; gap: 12px; margin: 32px 0; flex-wrap: wrap; }
.newsletter-form input {
    flex: 1; padding: 14px 20px; font-size: 14px; font-family: var(--font-body);
    background: #fff; border: 1.5px solid var(--color-warm-gray);
    border-radius: 3px; color: var(--color-text); transition: all .3s;
    min-width: 200px;
}
.newsletter-form input::placeholder { color: var(--color-text-light); }
.newsletter-form input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 10%, transparent);
    outline: none;
}
.newsletter-form button {
    padding: 14px 32px; font-size: 12px; font-weight: 700;
    background: var(--color-primary); color: #fff; border: none;
    border-radius: 3px; cursor: pointer; font-family: var(--font-body);
    letter-spacing: 2px; text-transform: uppercase;
    transition: all .4s var(--ease-smooth); white-space: nowrap;
}
.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px color-mix(in srgb, var(--color-primary) 20%, transparent);
}
.newsletter-consent {
    font-size: 11px; color: var(--color-text-light); margin-top: 16px; line-height: 1.6;
}


/* ==================== FILTER PILLS ==================== */
.filter-pills { display: flex; gap: 12px; margin: 32px 0; flex-wrap: wrap; }
.filter-pill {
    padding: 8px 16px; border-radius: 20px;
    border: 1.5px solid var(--color-warm-gray); background: #fff;
    color: var(--color-text); font-size: 12px; font-family: var(--font-body);
    font-weight: 600; cursor: pointer; transition: all .3s;
    white-space: nowrap; text-decoration: none;
}
.filter-pill:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--color-primary) 10%, transparent);
    color: var(--color-primary);
}
.filter-pill.active {
    background: var(--color-primary); color: #fff;
    border-color: var(--color-primary);
}


/* ==================== PAGE HEADER (inner pages) ==================== */
.page-header {
    background: linear-gradient(155deg, var(--color-primary-deep), var(--color-primary));
    padding: 130px 0 60px; text-align: center;
}
.page-header h1 { color: #fff; font-size: clamp(32px, 5vw, 50px); margin-bottom: 12px; }
.page-header p { color: rgba(255,255,255,.6); font-size: 16px; max-width: 540px; margin: 0 auto; line-height: 1.7; }
.page-header .section-sub { color: var(--color-accent-light); }


/* ==================== FORMS (Auth) ==================== */
.auth-wrap {
    max-width: 440px; margin: 0 auto;
    background: #fff; padding: 48px; border-radius: 6px;
    border: 1px solid var(--color-warm-gray);
}
.auth-wrap h2 {
    font-size: 28px; font-family: var(--font-heading); font-weight: 600;
    color: var(--color-ink); margin-bottom: 32px;
}
.form-group { margin-bottom: 24px; display: flex; flex-direction: column; }
.form-group label {
    font-size: 13px; font-weight: 600; color: var(--color-text);
    letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 8px;
    font-family: var(--font-body);
}
.form-group input, .form-input {
    width: 100%; padding: 12px 16px; font-size: 14px;
    font-family: var(--font-body); border: 1.5px solid var(--color-warm-gray);
    border-radius: 3px; background: #fff; color: var(--color-text);
    transition: all .3s;
}
.form-group input:focus, .form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 10%, transparent);
    outline: none;
}
.auth-alt {
    text-align: center; margin-top: 24px; font-size: 14px; color: var(--color-text-mid);
}
.alert { padding: 14px 18px; border-radius: 4px; font-size: 14px; margin-bottom: 24px; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }


/* ==================== VENUE TABS ==================== */
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--color-warm-gray); margin-bottom: 40px; padding-bottom: 0; }
.tab-btn {
    padding: 16px 0; background: transparent; border: none;
    border-bottom: 2px solid transparent; color: var(--color-text-mid);
    font-family: var(--font-body); font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all .3s;
}
.tab-btn.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.tab-btn:hover { color: var(--color-primary); }

.venue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.venue-card {
    background: #fff; border: 1px solid var(--color-warm-gray); border-radius: 6px;
    padding: 24px; transition: all .5s var(--ease-smooth);
}
.venue-card:hover { box-shadow: 0 12px 32px rgba(0,0,0,.1); transform: translateY(-4px); }
.venue-card-img {
    height: 200px; border-radius: 4px; margin-bottom: 16px;
    overflow: hidden; background: var(--color-bg-sand);
}
.venue-card-img img { width: 100%; height: 100%; object-fit: cover; }
.venue-card h3 { font-size: 18px; font-weight: 600; font-family: var(--font-heading); color: var(--color-ink); margin: 0; }
.venue-card-details { font-size: 13px; color: var(--color-text-mid); margin-top: 8px; line-height: 1.6; }
.venue-features { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.venue-features li {
    font-size: 11px; padding: 4px 12px; background: var(--color-bg-cream);
    border-radius: 20px; color: var(--color-text-mid); font-weight: 500;
}


/* ==================== VENUE CAMPUS TABS (shows filter) ==================== */
.venue-tabs {
    display: flex;
    gap: 8px;
    padding: 6px;
    background: color-mix(in srgb, var(--color-bg-cream) 70%, #fff);
    border: 1px solid var(--color-warm-gray);
    border-radius: 14px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.venue-tab {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 12px 18px;
    border-radius: 10px;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    color: var(--color-text-mid);
    font-family: var(--font-body);
    transition: background .2s, color .2s, box-shadow .2s, transform .15s;
    position: relative;
}
.venue-tab:hover {
    color: var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 5%, #fff);
}
.venue-tab.is-active {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 6px 18px color-mix(in srgb, var(--color-primary) 22%, transparent);
}
.venue-tab.is-active:hover {
    color: #fff;
    background: var(--color-primary);
}
.venue-tab-label {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .2px;
    line-height: 1.2;
}
.venue-tab-sub {
    font-size: 11px;
    font-weight: 500;
    opacity: .72;
    letter-spacing: .3px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.venue-tab.is-active .venue-tab-sub { opacity: .88; }
.venue-tab-count {
    position: absolute;
    top: 10px; right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--color-primary) 12%, transparent);
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 700;
}
.venue-tab.is-active .venue-tab-count {
    background: rgba(255,255,255,.22);
    color: #fff;
}

@media (prefers-reduced-motion: no-preference) {
    .venue-tab { transition: background .25s ease, color .25s ease, box-shadow .25s ease, transform .15s ease; }
    .venue-tab:active:not(.is-active) { transform: scale(.98); }
}

@media (max-width: 640px) {
    .venue-tabs { flex-direction: column; gap: 6px; border-radius: 12px; padding: 5px; }
    .venue-tab { flex: 1 1 auto; padding: 12px 16px 14px; }
    .venue-tab-sub { white-space: normal; }
    .venue-tab-count { top: 50%; transform: translateY(-50%); }
}


/* ==================== ENSEMBLE CARDS (Hire page) ==================== */
.ensembles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px; }
.ensemble-card {
    background: #fff; border-radius: 6px; padding: 32px 28px;
    border: 1px solid color-mix(in srgb, var(--color-warm-gray) 53%, transparent);
    position: relative; overflow: hidden; transition: all .5s var(--ease-smooth);
}
.ensemble-card:hover { box-shadow: 0 20px 48px rgba(0,0,0,.08); transform: translateY(-4px); }
.ensemble-card-accent { position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.ensemble-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.ensemble-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-heading); font-size: 16px; font-weight: 700;
}
.ensemble-meta .company-tag { margin: 0; }
.ensemble-meta span { font-family: var(--font-body); font-size: 11px; color: var(--color-text-light); }
.ensemble-card h4 { font-family: var(--font-heading); font-size: 18px; font-weight: 500; color: var(--color-ink); margin: 0 0 8px; }
.ensemble-card > p { font-family: var(--font-body); font-size: 13px; color: var(--color-text-mid); line-height: 1.65; margin: 0 0 16px; }
.ensemble-price { font-family: var(--font-heading); font-size: 18px; font-weight: 500; margin: 0; }
.ensemble-ideal { margin-bottom: 16px; }
.ensemble-ideal strong { font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--color-text-light); display: block; margin-bottom: 6px; }
.ideal-tag {
    display: inline-block; font-size: 11px; padding: 4px 12px;
    background: var(--color-bg-cream); border-radius: 20px;
    color: var(--color-text-mid); margin: 2px 4px 2px 0;
}


/* ==================== TIER BADGES ==================== */
.tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 32px; }
.tier-badge {
    padding: 16px; border-radius: 6px; text-align: center;
    border: 2px solid; cursor: pointer; transition: all .3s;
}
.tier-badge-title { font-size: 14px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.tier-badge-desc { font-size: 12px; color: var(--color-text-mid); margin-top: 4px; }

.tier-bronze { border-color: #CD7F32; background: #FFF5EB; }
.tier-bronze.active { background: #CD7F32; color: #fff; box-shadow: 0 0 0 4px rgba(205,127,50,.1); border-width: 3px; }
.tier-silver { border-color: #C0C0C0; background: #F5F5F5; }
.tier-silver.active { background: #C0C0C0; color: #fff; box-shadow: 0 0 0 4px rgba(192,192,192,.1); border-width: 3px; }
.tier-gold { border-color: var(--color-accent); background: #FFFAF0; }
.tier-gold.active { background: var(--color-accent); color: #fff; box-shadow: 0 0 0 4px rgba(201,168,76,.1); border-width: 3px; }
.tier-platinum { border-color: #E5E7EB; background: #F9FAFB; }
.tier-platinum.active { background: #E5E7EB; color: var(--color-ink); box-shadow: 0 0 0 4px rgba(229,231,235,.1); border-width: 3px; }


/* ==================== DATA TABLE ==================== */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
    text-align: left; padding: 12px 16px; font-size: 10px; font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase; color: var(--color-text-light);
    border-bottom: 1px solid var(--color-warm-gray);
}
.data-table td { padding: 14px 16px; border-bottom: 1px solid color-mix(in srgb, var(--color-warm-gray) 50%, transparent); color: var(--color-text); }
.data-table tr:hover td { background: var(--color-bg-cream); }


/* ==================== TICKET CARDS ==================== */
.tickets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.ticket-card {
    background: #fff; padding: 24px; border-radius: 6px;
    border: 1px solid var(--color-warm-gray); text-decoration: none; color: inherit;
    display: block; border-left: 4px solid var(--color-accent);
    transition: all .4s var(--ease-smooth);
}
.ticket-card:hover { box-shadow: 0 12px 32px rgba(0,0,0,.08); transform: translateY(-4px); color: inherit; }
.ticket-card h4 { font-size: 16px; margin-bottom: 6px; }
.ticket-card p { font-size: 13px; color: var(--color-text-mid); margin-bottom: 8px; }
.ticket-status { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 3px 10px; border-radius: 20px; }
.status-valid { background: #d1fae5; color: #065f46; }
.status-used { background: var(--color-bg-sand); color: var(--color-text-light); }
.status-cancelled { background: #fef2f2; color: #991b1b; }


/* ==================== CART ==================== */
.cart-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; }
.cart-items { background: #fff; padding: 32px; border-radius: 6px; border: 1px solid var(--color-warm-gray); }
.cart-item-row {
    display: grid; grid-template-columns: 100px 1fr 80px 80px 40px;
    gap: 16px; align-items: center; padding: 16px 0;
    border-bottom: 1px solid var(--color-warm-gray);
}
.order-summary {
    background: #fff; padding: 24px; border-radius: 6px;
    border: 1px solid var(--color-warm-gray); position: sticky; top: 80px;
}
.summary-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--color-warm-gray); }
.summary-total { font-size: 18px; font-weight: 700; color: var(--color-primary); padding: 16px 0; border-bottom: 2px solid var(--color-primary); }


/* ==================== EMPTY STATE ==================== */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-state h3 { font-size: 24px; color: var(--color-text-mid); margin-bottom: 12px; }
.empty-state p { color: var(--color-text-light); margin-bottom: 28px; font-size: 15px; }


/* ==================== FOOTER ==================== */
.site-footer {
    background: var(--color-primary-deep); color: #fff;
    padding: 60px 0; position: relative; z-index: 10;
}
.footer-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 48px;
}
.footer-col { display: flex; flex-direction: column; gap: 16px; }
.footer-col h4 {
    font-size: 14px; font-weight: 700; letter-spacing: 2.5px;
    text-transform: uppercase; color: #fff; margin-bottom: 8px;
    font-family: var(--font-body);
}
.footer-col a {
    color: rgba(255,255,255,.7); font-size: 13px;
    text-decoration: none; transition: color .3s;
}
.footer-col a:hover { color: #fff; }

/* Theme switcher */
.theme-switcher { display: flex; gap: 8px; margin: 16px 0; }
.theme-btn {
    padding: 8px 14px; font-size: 11px; font-weight: 600;
    border: 1.5px solid rgba(255,255,255,.3); background: transparent;
    color: rgba(255,255,255,.7); border-radius: 3px;
    cursor: pointer; transition: all .3s; font-family: var(--font-body);
}
.theme-btn.active {
    background: #fff; color: var(--color-primary-deep);
    border-color: #fff;
}
.theme-btn:hover:not(.active) { border-color: rgba(255,255,255,.6); color: #fff; }

.footer-bottom {
    font-size: 11px; color: rgba(255,255,255,.5); text-align: center;
    padding-top: 32px; border-top: 1px solid rgba(255,255,255,.1);
    margin-top: 32px;
}
.footer-logo { font-family: var(--font-heading); font-size: 18px; letter-spacing: 4px; color: var(--color-accent); margin-bottom: 8px; }


/* ==================== SCROLL REVEAL ==================== */
.reveal {
    opacity: 0; transform: translateY(40px);
    transition: opacity .9s var(--ease-smooth), transform .9s var(--ease-smooth);
    will-change: opacity, transform;
}
.reveal.revealed { opacity: 1; transform: translateY(0) translateX(0); }
.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.reveal-left.revealed, .reveal-right.revealed { transform: translateX(0); }

/* Stagger children */
.reveal[data-delay="1"] { transition-delay: .12s; }
.reveal[data-delay="2"] { transition-delay: .24s; }
.reveal[data-delay="3"] { transition-delay: .36s; }
.reveal[data-delay="4"] { transition-delay: .48s; }


/* ==================== UTILITY ==================== */
.section { padding: 80px 0; }
.section-cream { background: var(--color-bg-cream); }
.section-ivory { background: var(--color-bg-ivory); }
.section-sand { background: var(--color-bg-sand); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }


/* ════════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE — site-wide overrides
   Single source of truth for stacking multi-column layouts and keeping
   pages from horizontally overflowing on phones. Inline grid styles in
   views are overridden here with !important media queries (deliberate;
   it's the cleanest way to fix legacy inline styles without rewriting
   every view).
   ════════════════════════════════════════════════════════════════════ */

/* ─── Tablet & below ─── */
@media (max-width: 900px) {
    /* Account dashboard: sidebar+main → stacked */
    .auth-wrap { padding: 32px 24px; }

    /* Two-column registration form fields → stacked */
    form .form-group + .form-group { margin-top: 0; }
}

/* ─── Phone (≤ 768px) ─── */
@media (max-width: 768px) {
    /* Container padding tighter on phones */
    .wrap { padding: 0 16px; }

    /* Page header (hero) — keep title from clipping when text is long */
    .page-header { padding: 100px 0 48px; }
    .page-header h1 { font-size: clamp(26px, 6vw, 36px); word-break: break-word; }
    .page-header p { font-size: 14px; }

    /* ── Account dashboard ── */
    /* /account uses inline `grid-template-columns:280px 1fr` with no fallback */
    section.section-cream > .wrap[style*="grid-template-columns:280px 1fr"],
    section.section-cream > .wrap[style*="grid-template-columns: 280px 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    /* ── Cart ── */
    /* /booking/cart uses `1fr 360px` — stack the items + summary */
    section > .wrap > div[style*="grid-template-columns:1fr 360px"],
    section > .wrap > div[style*="grid-template-columns: 1fr 360px"] {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    /* ── Checkout ── */
    /* /booking/checkout uses `1fr 380px` */
    div[style*="grid-template-columns:1fr 380px"],
    div[style*="grid-template-columns: 1fr 380px"] {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    /* ── Notifications ── */
    div[style*="grid-template-columns:1fr 320px"],
    div[style*="grid-template-columns: 1fr 320px"] {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    /* ── Generic 1fr 1fr inline grids (form rows, recipient/email pairs)
          stack so labels stay readable. Spans 2-col layouts still applied
          via class definitions remain unaffected. ── */
    div[style*="grid-template-columns:1fr 1fr"],
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Order summary card (cart + checkout) — full-width, sticky-off */
    .order-summary { position: static !important; max-width: 100% !important; }

    /* Tickets grid: 1 column on phones */
    .tickets-grid { grid-template-columns: 1fr !important; }

    /* My Tickets cards have inline `1fr auto` — keep QR thumb but compress */
    a.ticket-card[style*="grid-template-columns:1fr auto"] {
        grid-template-columns: 1fr !important;
    }

    /* Footer 4-col grid → 2-col */
    .footer-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 24px !important; }

    /* Tab pills: scroll horizontally instead of wrapping ugly */
    .tabs, .filter-pills {
        overflow-x: auto;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .tabs::-webkit-scrollbar, .filter-pills::-webkit-scrollbar { display: none; }

    /* Buttons inside tight spaces: full-width is friendlier on phones */
    .btn-block, .auth-wrap .btn { width: 100%; }

    /* Loyalty perks list: less padding */
    .perks-card { padding: 24px 20px !important; }
}

/* ─── Small phone (≤ 480px) ─── */
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr !important; }
    .page-header { padding: 90px 0 40px; }
    .page-header h1 { font-size: 24px; }
    .section { padding: 50px 0; }

    /* Inline 1fr 1fr 1fr (3-col grids — e.g. stats strips) → stack */
    div[style*="grid-template-columns:1fr 1fr 1fr"],
    div[style*="grid-template-columns: 1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

