/* ASHEN:MOTH Website - Refined Cinematic Layout */

:root {
    --obsidian: #0a0a0a;
    --obsidian-light: #1a1a1a;
    --stone: #2a2a2a;
    --gold: #c9b077;
    --gold-light: #dfce9f;
    --gold-dark: #a49362;
    --teal: #5ec5c5;
    --teal-dark: #3a9999;
    --pink: #ff6b9d;
    --pink-dark: #d14a7a;
    --bg-y-position: 0%;
    --font-display: 'Cinzel', serif;
    --font-body: 'Cormorant', serif;
    /* Tight spacing within sections, large gaps between */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 3rem;
    --spacing-xl: 8rem;
}

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

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--obsidian);
    color: var(--gold);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
}

/* Noise texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: -1;
}

/* Background image overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('background.jpg');
    background-size: cover;
    background-position: center var(--bg-y-position);
    background-repeat: no-repeat;
    opacity: 0.45;
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: screen;
    will-change: background-position;
}

/* Skip link for keyboard accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--gold);
    color: var(--obsidian);
    font-family: var(--font-body);
    font-size: 1rem;
    text-decoration: none;
    z-index: 2000;
    border-radius: 2px;
}

.skip-link:focus {
    top: 0.5rem;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    backdrop-filter: none;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--gold);
    transition: opacity 0.3s ease;
    text-shadow: 1px 1px 2px rgba(63, 20, 35, 0.6);
}

.nav-logo:hover {
    opacity: 0.7;
}

.logo-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--gold);
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: opacity 0.3s ease;
    position: relative;
    text-shadow: 1px 1px 2px rgba(63, 20, 35, 0.6);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--teal), var(--gold));
    transition: width 0.3s ease;
}

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

/* Focus styles for interactive elements */
.nav-links a:focus-visible,
.nav-logo:focus-visible,
.social-link:focus-visible,
.donate-button:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 4px;
}

/* Hero Section - Cinematic Flow */
.hero {
    position: relative;
    z-index: 10;
    padding-top: 5rem;
    padding-bottom: var(--spacing-xl);
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 15;
}

/* Full screen logo - stays locked in center while fading */
.logo-decoration {
    width: min(90vw, 700px);
    height: 150vh;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
}

.logo-decoration img {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: min(90vw, 700px);
    max-height: 90vh;
    object-fit: contain;
    z-index: 5;
    pointer-events: none;
    opacity: 0.9;
    will-change: opacity;
}

/* Title + Subtitle + EP Cover (tight spacing) */
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 400;
    letter-spacing: 0.2em;
    margin: 3rem auto 1rem;
    text-shadow: 1px 1px 2px rgba(63, 20, 35, 0.6);
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--gold-light);
    opacity: 0.6;
    margin-bottom: 2rem;
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(63, 20, 35, 0.6);
}

/* EP Cover + Player */
.album-art-container {
    max-width: 600px;
    margin: 0 auto var(--spacing-lg);
}

.album-art {
    aspect-ratio: 1;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 2px;
    overflow: hidden;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    cursor: pointer;
    position: relative;
}

.album-art:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* Focus style for keyboard users on EP cover */
.album-art:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 4px;
}

.album-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Player Overlay */
.player-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 10;
}

/* Desktop: show on hover */
@media (hover: hover) {
    .album-art:hover .player-overlay {
        opacity: 1;
        pointer-events: auto;
    }
}

/* Mobile: show when active class is added via JS */
.album-art.player-active .player-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Keyboard: show on focus-within */
.album-art:focus-within .player-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Music Player */
.music-player {
    width: 90%;
    max-width: 500px;
}

.player-placeholder {
    background: var(--stone);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 4px;
    padding: var(--spacing-lg);
    text-align: center;
    color: var(--gold);
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(63, 20, 35, 0.6);
}

.player-note {
    font-size: 0.9rem;
    margin-top: var(--spacing-sm);
    opacity: 0.7;
    text-shadow: 1px 1px 2px rgba(63, 20, 35, 0.6);
}

/* Hero glow */
.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(94, 197, 197, 0.06) 0%, rgba(212, 175, 55, 0.05) 30%, rgba(255, 107, 157, 0.03) 60%, transparent 80%);
    pointer-events: none;
    animation: breathe 8s ease-in-out infinite;
    z-index: 5;
}

@keyframes breathe {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

/* Sections */
.section {
    padding: var(--spacing-md) var(--spacing-md);
    position: relative;
    z-index: 10;
    background: transparent;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 400;
    letter-spacing: 0.1em;
    text-align: center;
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(63, 20, 35, 0.6);
}

/* About Section */
.about-logo-container {
    text-align: center;
    margin-bottom: var(--spacing-sm);
}

.about-logo {
    width: 275px;
    height: 250px;
    opacity: 0.8;
    margin-left: -4px;
}

.about-section .section-title {
    display: none;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    font-size: 1.3rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-sm);
    color: var(--gold-light);
    opacity: 0.8;
    text-shadow: 1px 1px 2px rgba(63, 20, 35, 0.6);
    text-align: center;
}

.about-tagline {
    font-family: var(--font-display);
    font-size: 1.8rem;
    text-align: center;
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    color: var(--gold);
    font-style: normal;
    opacity: 1;
    text-shadow: 1px 1px 2px rgba(63, 20, 35, 0.6);
}

/* Connect Section */
.connect-section {
    background: transparent;
}

.social-links-wrapper {
    margin-bottom: var(--spacing-lg);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.social-links:last-child {
    margin-bottom: 0;
}

.social-link {
    padding: 1rem 2rem;
    background: transparent;
    border: 1px solid var(--gold);
    border-radius: 2px;
    color: var(--gold);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 1rem;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(63, 20, 35, 0.6);
}

.social-link:hover,
.social-link:focus-visible {
    background: var(--gold);
    color: var(--obsidian);
    text-shadow: none;
}

/* Donation */
.donation-section {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.donation-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: var(--spacing-sm);
    letter-spacing: 0.1em;
    text-shadow: 1px 1px 2px rgba(63, 20, 35, 0.6);
}

.donation-text {
    font-size: 1.1rem;
    opacity: 0.7;
    margin-bottom: var(--spacing-md);
    text-shadow: 1px 1px 2px rgba(63, 20, 35, 0.6);
}

.donate-button {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: transparent;
    border: 2px solid var(--gold);
    border-radius: 2px;
    color: var(--gold);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(63, 20, 35, 0.6);
}

.donate-button:hover,
.donate-button:focus-visible {
    background: var(--gold);
    color: var(--obsidian);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
    text-shadow: none;
}

.donation-note {
    font-size: 0.9rem;
    opacity: 0.5;
    margin-top: var(--spacing-md);
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(63, 20, 35, 0.6);
}

/* Footer */
.footer {
    padding: var(--spacing-lg) var(--spacing-md);
    background: var(--obsidian);
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.footer-content {
    text-align: center;
}

.footer-text {
    font-size: 0.9rem;
    opacity: 0.5;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(63, 20, 35, 0.6);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    :root {
        --spacing-xl: 5rem;
        --spacing-lg: 2.5rem;
    }

    html {
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
    }

    body {
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
        position: relative;
    }

    /* Nav */
    .nav {
        width: 100vw;
        max-width: 100vw;
        left: 0;
        right: 0;
    }

    .nav-container {
        width: 100%;
        max-width: 100%;
        padding: 0.75rem 1rem;
        margin: 0;
    }

    .logo-icon {
        width: 30px;
        height: 30px;
    }

    .logo-text {
        font-size: 1rem;
    }

    .nav-links {
        gap: 0.75rem;
        display: flex;
    }

    .nav-links a {
        font-size: 0.75rem;
        white-space: nowrap;
    }

    /* Hero section */
    .hero {
        width: 100vw;
        max-width: 100vw;
        padding-top: 4rem;
        overflow: hidden;
    }

    .hero-content {
        width: 100%;
        max-width: 100%;
    }

    /* Logo - use absolute positioning on mobile */
    .logo-decoration {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        margin: 0;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }

    .logo-decoration img {
        position: absolute;
        top: 38%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 80vw;
        max-width: 80vw;
        height: auto;
        max-height: 60vh;
        object-fit: contain;
        margin: 0;
    }

    /* Title */
    .hero-title {
        font-size: clamp(2rem, 10vw, 3rem);
        margin: 1.5rem 0 1rem;
        width: 100%;
        text-align: center;
        padding: 0 1rem;
    }

    .hero-subtitle {
        font-size: clamp(0.9rem, 4vw, 1.2rem);
        margin: 0 0 2rem;
        width: 100%;
        text-align: center;
        padding: 0 1rem;
    }

    /* Album art */
    .album-art-container {
        width: 90vw;
        max-width: 90vw;
        margin: 0 auto var(--spacing-lg);
        padding: 0;
    }

    /* Sections */
    .section {
        width: 100vw;
        max-width: 100vw;
        padding: var(--spacing-xl) 0;
        overflow: hidden;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
    }

    .about-logo {
        width: 200px;
        height: auto;
    }

    .social-links {
        flex-direction: column;
        gap: var(--spacing-sm);
        margin-bottom: var(--spacing-sm);
    }

    .social-links:last-child {
        margin-bottom: 0;
    }

    .social-link {
        width: 100%;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-xl: 4rem;
    }

    .logo-text {
        font-size: 0.9rem;
        letter-spacing: 0.1em;
    }

    .nav-links a {
        font-size: 0.7rem;
        padding: 0.25rem 0.4rem;
    }

    .logo-decoration img {
        width: 85vw;
        max-width: 85vw;
        max-height: 50vh;
    }

    .hero-title {
        font-size: clamp(1.75rem, 12vw, 2.5rem);
        letter-spacing: 0.15em;
    }

    .about-logo {
        width: 160px;
    }
}
