/* ==========================================================================
   THEATER TEMPLATE - PREMIUM STYLESHEET
   A dramatic performing arts template with burgundy/gold aesthetic
   ========================================================================== */

/* ==========================================================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ========================================================================== */

:root {
    /* Color Palette - Dramatic Theater Theme */
    --color-primary: #8B1538;        /* Deep burgundy */
    --color-primary-light: #A6194A;
    --color-primary-dark: #6B0F2A;
    --color-secondary: #D4AF37;       /* Rich gold */
    --color-secondary-light: #E5C158;
    --color-secondary-dark: #B8941F;
    --color-accent: #DC143C;          /* Crimson for highlights */

    /* Neutral Scale - Light Mode */
    --color-neutral-50: #FAFAF9;
    --color-neutral-100: #F5F5F4;
    --color-neutral-200: #E7E5E4;
    --color-neutral-300: #D6D3D1;
    --color-neutral-400: #A8A29E;
    --color-neutral-500: #78716C;
    --color-neutral-600: #57534E;
    --color-neutral-700: #44403C;
    --color-neutral-800: #292524;
    --color-neutral-900: #1C1917;
    --color-neutral-950: #0C0A09;

    /* Semantic Colors */
    --color-bg-primary: #FFFFFF;
    --color-bg-secondary: var(--color-neutral-50);
    --color-bg-tertiary: var(--color-neutral-100);
    --color-text-primary: var(--color-neutral-900);
    --color-text-secondary: var(--color-neutral-600);
    --color-text-tertiary: var(--color-neutral-500);
    --color-border: var(--color-neutral-200);
    --color-border-dark: var(--color-neutral-300);

    /* Typography Scale - Responsive with clamp() */
    --text-hero: clamp(3rem, 8vw, 6rem);          /* 48-96px */
    --text-display: clamp(2.5rem, 5vw, 4rem);     /* 40-64px */
    --text-h1: clamp(2rem, 4vw, 3rem);            /* 32-48px */
    --text-h2: clamp(1.5rem, 3vw, 2.25rem);       /* 24-36px */
    --text-h3: clamp(1.25rem, 2vw, 1.5rem);       /* 20-24px */
    --text-h4: 1.125rem;                          /* 18px */
    --text-body: 1rem;                            /* 16px */
    --text-small: 0.875rem;                       /* 14px */
    --text-xs: 0.75rem;                           /* 12px */

    /* Font Families */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Serif Pro', Georgia, serif;
    --font-mono: 'SF Mono', Monaco, monospace;

    /* Font Weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-black: 900;

    /* Spacing Scale - 8px base unit */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */
    --space-24: 6rem;     /* 96px */
    --space-32: 8rem;     /* 128px */

    /* Border Radius Scale */
    --radius-sm: 0.25rem;   /* 4px */
    --radius-md: 0.5rem;    /* 8px */
    --radius-lg: 0.75rem;   /* 12px */
    --radius-xl: 1rem;      /* 16px */
    --radius-2xl: 1.5rem;   /* 24px */
    --radius-full: 9999px;

    /* Shadows - Elegant, subtle */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 40px rgba(212, 175, 55, 0.3);
    --shadow-glow-lg: 0 0 80px rgba(212, 175, 55, 0.4);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.8s cubic-bezier(0.16, 1, 0.3, 1);

    /* Z-index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-tooltip: 1070;
}

/* Dark Mode Overrides */
[data-theme="dark"],
.dark {
    --color-bg-primary: #0C0A09;
    --color-bg-secondary: #1C1917;
    --color-bg-tertiary: #292524;
    --color-text-primary: #FAFAF9;
    --color-text-secondary: #D6D3D1;
    --color-text-tertiary: #A8A29E;
    --color-border: #292524;
    --color-border-dark: #44403C;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-body);
    line-height: 1.7;
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    margin-bottom: var(--space-4);
    color: var(--color-text-primary);
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); }

p {
    margin-bottom: var(--space-4);
    color: var(--color-text-secondary);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--color-primary-light);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Selection */
::selection {
    background-color: var(--color-primary);
    color: white;
}

::-moz-selection {
    background-color: var(--color-primary);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-neutral-400);
    border-radius: var(--radius-full);
    border: 2px solid var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-neutral-500);
}

/* Focus States */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Skip Link */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.sr-only:focus {
    position: fixed;
    top: var(--space-4);
    left: var(--space-4);
    width: auto;
    height: auto;
    padding: var(--space-4);
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: var(--color-bg-primary);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-md);
    z-index: var(--z-tooltip);
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-smooth),
                transform var(--transition-smooth);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all var(--transition-smooth);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all var(--transition-smooth);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all var(--transition-smooth);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

.reveal-blur {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(20px);
    transition: all var(--transition-smooth);
}

.reveal-blur.active {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Stagger delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* ==========================================================================
   HOVER ANIMATIONS
   ========================================================================== */

.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.hover-zoom {
    overflow: hidden;
}

.hover-zoom img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-zoom:hover img {
    transform: scale(1.05);
}

.hover-shine {
    position: relative;
    overflow: hidden;
}

.hover-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.hover-shine:hover::before {
    left: 100%;
}

/* ==========================================================================
   CONTINUOUS ANIMATIONS
   ========================================================================== */

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

.pulse-ring {
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

@keyframes subtle-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.animate-bounce-subtle {
    animation: subtle-bounce 2s ease-in-out infinite;
}

@keyframes curtain-reveal {
    0% { transform: scaleY(1); transform-origin: top; }
    100% { transform: scaleY(0); transform-origin: top; }
}

.animate-curtain {
    animation: curtain-reveal 1.5s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

/* ==========================================================================
   LAYOUT UTILITIES
   ========================================================================== */

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.section {
    padding: var(--space-20) 0;
}

.section-lg {
    padding: var(--space-32) 0;
}

/* ==========================================================================
   SIGNATURE THEATER COMPONENTS
   ========================================================================== */

/* Spotlight Glow Effect */
.spotlight {
    position: relative;
}

.spotlight::after {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    transform: translateX(-50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.spotlight:hover::after {
    opacity: 1;
}

/* Theater Curtain Border */
.curtain-border {
    position: relative;
    border: 2px solid var(--color-secondary);
    border-image: linear-gradient(135deg,
        var(--color-secondary-dark) 0%,
        var(--color-secondary) 25%,
        var(--color-secondary-light) 50%,
        var(--color-secondary) 75%,
        var(--color-secondary-dark) 100%
    ) 1;
}

.curtain-border::before,
.curtain-border::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-secondary);
}

.curtain-border::before {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.curtain-border::after {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

/* Show Badge */
.show-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    font-size: var(--text-xs);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
}

/* Ticket Card */
.ticket-card {
    position: relative;
    background: var(--color-bg-primary);
    border: 2px dashed var(--color-border-dark);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: all var(--transition-base);
}

.ticket-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -10px;
    width: 20px;
    height: 20px;
    background: var(--color-bg-secondary);
    border-radius: 50%;
    transform: translateY(-50%);
}

.ticket-card::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -10px;
    width: 20px;
    height: 20px;
    background: var(--color-bg-secondary);
    border-radius: 50%;
    transform: translateY(-50%);
}

.ticket-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Gold Accent Line */
.gold-accent {
    position: relative;
    padding-bottom: var(--space-4);
}

.gold-accent::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-secondary) 0%, transparent 100%);
}

/* ==========================================================================
   DECORATIVE ELEMENTS
   ========================================================================== */

.bg-mesh {
    background:
        radial-gradient(at 20% 30%, rgba(139, 21, 56, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 70%, rgba(212, 175, 55, 0.15) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(220, 20, 60, 0.1) 0px, transparent 50%);
}

.bg-grid {
    background-image:
        linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

.dark .bg-grid {
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow {
    box-shadow: var(--shadow-glow);
}

.glow-lg {
    box-shadow: var(--shadow-glow-lg);
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal, .reveal-left, .reveal-right, .reveal-scale, .reveal-blur {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

/* ==========================================================================
   PERFORMANCE OPTIMIZATIONS
   ========================================================================== */

section {
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
}

.animated {
    transform: translateZ(0);
    will-change: transform, opacity;
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }

    img {
        page-break-inside: avoid;
        max-width: 100% !important;
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }
}
