@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700;900&display=swap');

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

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --accent: #ff3333;
    --accent-glow: #ff333350;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    cursor: crosshair;
}

@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;
    }
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    background: radial-gradient(circle at center, #111 0%, #000 100%);
}

.glitch-container {
    position: relative;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: clamp(5rem, 15vw, 12rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    animation: glitch 3s infinite;
    position: relative;
}

.hero h1::before,
.hero h1::after {
    content: 'COPESTRY';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero h1::before {
    animation: glitch-1 0.5s infinite;
    color: var(--accent);
    z-index: -1;
}

.hero h1::after {
    animation: glitch-2 0.5s infinite;
    color: cyan;
    z-index: -1;
}

@keyframes glitch {
    0%, 90% { transform: translate(0); }
    91% { transform: translate(-2px, 2px); }
    92% { transform: translate(2px, -2px); }
    93% { transform: translate(-1px, 1px); }
    94% { transform: translate(1px, -1px); }
    95% { transform: translate(0); }
}

@keyframes glitch-1 {
    0%, 90% { clip: rect(0, 9999px, 9999px, 0); }
    10% { clip: rect(20px, 9999px, 40px, 0); }
    20% { clip: rect(60px, 9999px, 80px, 0); }
    30% { clip: rect(10px, 9999px, 30px, 0); }
    40% { clip: rect(70px, 9999px, 90px, 0); }
    50% { clip: rect(30px, 9999px, 50px, 0); }
    60% { clip: rect(90px, 9999px, 110px, 0); }
    100% { clip: rect(0, 9999px, 9999px, 0); }
}

@keyframes glitch-2 {
    0%, 90% { clip: rect(0, 9999px, 9999px, 0); }
    15% { clip: rect(25px, 9999px, 45px, 0); transform: translateX(2px); }
    25% { clip: rect(55px, 9999px, 75px, 0); transform: translateX(-2px); }
    35% { clip: rect(15px, 9999px, 35px, 0); transform: translateX(1px); }
    45% { clip: rect(65px, 9999px, 85px, 0); transform: translateX(-1px); }
    55% { clip: rect(35px, 9999px, 55px, 0); transform: translateX(2px); }
    65% { clip: rect(85px, 9999px, 105px, 0); transform: translateX(-2px); }
    100% { clip: rect(0, 9999px, 9999px, 0); }
}

.subheader {
    font-size: 1.25rem;
    color: var(--text-secondary);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeInUp 1s 0.4s forwards;
}

.tagline {
    font-size: 1.5rem;
    color: var(--text-secondary);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeInUp 1s 0.5s forwards;
}

.hero-audio {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
}

.audio-toggle {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 2px solid rgba(255, 51, 51, 0.6);
    background: radial-gradient(circle at center, rgba(255, 51, 51, 0.15) 0%, rgba(0, 0, 0, 0.6) 70%);
    color: var(--text-primary);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.audio-toggle.is-playing {
    border-color: var(--accent);
    background: radial-gradient(circle at center, rgba(255, 51, 51, 0.25) 0%, rgba(0, 0, 0, 0.5) 70%);
}

.audio-toggle::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: 0 0 35px rgba(255, 51, 51, 0.45);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.audio-toggle:hover {
    transform: scale(1.05);
}

.audio-toggle:hover::after,
.audio-toggle.is-playing::after {
    opacity: 1;
}

.audio-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.audio-icon-play {
    width: 0;
    height: 0;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-left: 26px solid #ffffff;
    margin-left: 6px;
    opacity: 1;
}

.audio-icon-pause {
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
}

.audio-icon-pause::before,
.audio-icon-pause::after {
    content: '';
    width: 6px;
    height: 30px;
    border-radius: 1px;
    background: #ffffff;
}

.audio-toggle.is-playing .audio-icon-play {
    opacity: 0;
}

.audio-toggle.is-playing .audio-icon-pause {
    opacity: 1;
}

.hero-audio audio {
    display: none;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
    from {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Focus styles for accessibility */
.audio-toggle:focus {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 1.5rem 1rem;
        text-align: center;
    }

    .hero h1 {
        font-size: clamp(4rem, 16vw, 6.5rem);
        line-height: 0.9;
        margin-bottom: 1.5rem;
        letter-spacing: -0.03em;
    }

    .subheader {
        font-size: 1.1rem;
        letter-spacing: 0.2em;
        margin-bottom: 1rem;
        opacity: 1;
    }

    .tagline {
        font-size: 1.3rem;
        letter-spacing: 0.18em;
        margin-bottom: 2rem;
        opacity: 1;
    }

    .hero-audio {
        margin-top: 2rem;
    }

    .audio-toggle {
        width: 72px;
        height: 72px;
    }

    .audio-icon-play {
        border-top: 14px solid transparent;
        border-bottom: 14px solid transparent;
        border-left: 20px solid #ffffff;
        margin-left: 4px;
    }

    .audio-icon-pause::before,
    .audio-icon-pause::after {
        height: 24px;
        width: 5px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: clamp(3.5rem, 18vw, 5.5rem);
        line-height: 0.85;
    }

    .subheader {
        font-size: 1rem;
    }

    .tagline {
        font-size: 1.1rem;
    }

    .audio-toggle {
        width: 64px;
        height: 64px;
    }

    .audio-icon-play {
        border-top: 12px solid transparent;
        border-bottom: 12px solid transparent;
        border-left: 18px solid #ffffff;
        margin-left: 3px;
    }

    .audio-icon-pause::before,
    .audio-icon-pause::after {
        height: 20px;
        width: 4px;
    }
}