/**
 * Sunset Sessions Theme
 *
 * Warm and organic design with sunset gradients, groovy typography, and chill vibes.
 * Perfect for folk artists, indie bands, acoustic performers, singer-songwriters,
 * and festival performers.
 *
 * Design Philosophy:
 * - Warm sunset colors (oranges, purples, warm browns)
 * - Organic shapes and natural movement
 * - Parallax layers for depth
 * - Soft glows and natural shadows
 * - Friendly, approachable aesthetic
 */

/* ============================================
   Theme Variables & Enhancements
   ============================================ */

:root {
    /* Sunset gradient colors */
    --sunset-orange: #FF6B35;
    --sunset-peach: #FFD4A3;
    --sunset-purple: #9B59B6;
    --sunset-lavender: #E8D5E8;
    --warm-brown: #3D2817;

    /* Organic glow effects */
    --warm-glow: 0 4px 20px rgba(255, 107, 53, 0.2);
    --soft-shadow: 0 6px 24px rgba(61, 40, 23, 0.15);

    /* Parallax layers */
    --parallax-speed-slow: 0.5;
    --parallax-speed-medium: 0.3;
    --parallax-speed-fast: 0.15;
}

/* ============================================
   Body & Background Enhancements
   ============================================ */

body {
    position: relative;
    /* Subtle texture overlay WITH dynamic background color from CSS variable */
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 107, 53, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(155, 89, 182, 0.08) 0%, transparent 50%),
        var(--page-background);  /* CRITICAL: Reference CSS variable so PostMessage changes are visible */
    background-attachment: fixed;
}

/* Warm atmospheric layer */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at top,
        rgba(255, 212, 163, 0.1) 0%,
        transparent 60%
    );
    pointer-events: none;
    z-index: -1;
    animation: atmosphericBreath 8s ease-in-out infinite;
}

@keyframes atmosphericBreath {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Floating organic shapes */
body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 30% 40%, rgba(255, 107, 53, 0.03) 0%, transparent 30%),
        radial-gradient(circle at 70% 70%, rgba(155, 89, 182, 0.03) 0%, transparent 30%);
    pointer-events: none;
    z-index: -2;
    animation: organicFloat 20s ease-in-out infinite;
}

@keyframes organicFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(5%, 5%) rotate(2deg); }
    66% { transform: translate(-5%, 10%) rotate(-2deg); }
}

/* ============================================
   Typography Enhancements
   ============================================ */

h1, h2, h3 {
    position: relative;
    letter-spacing: 0.02em;
}

/* Warm gradient text for h1 */
h1 {
    background: linear-gradient(135deg,
        var(--sunset-orange) 0%,
        var(--sunset-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Organic underline for h2 */
h2::after {
    content: '';
    display: block;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg,
        var(--sunset-orange) 0%,
        var(--sunset-purple) 100%);
    margin: 1rem auto 0;
    border-radius: 3px;
    box-shadow: var(--warm-glow);
    animation: sunsetGlow 3s ease-in-out infinite;
}

section h2::after {
    margin-left: 0;
    margin-right: auto;
}

@keyframes sunsetGlow {
    0%, 100% { opacity: 0.8; filter: blur(0px); }
    50% { opacity: 1; filter: blur(1px); }
}

/* Subtle text shadow for readability */
h1, h2, h3 {
    text-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}

/* ============================================
   Button Enhancements
   ============================================ */

button, .btn, a.button {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    letter-spacing: 0.03em;
    border-radius: 24px;
}

/* Warm gradient overlay */
button::before, .btn::before, a.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%);
    transition: left 0.6s ease;
}

button:hover::before,
.btn:hover::before,
a.button:hover::before {
    left: 100%;
}

button:hover, .btn:hover, a.button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--warm-glow), var(--soft-shadow);
}

/* Sunset gradient buttons */
button[style*="background"],
.btn-primary {
    background: linear-gradient(135deg,
        var(--sunset-orange) 0%,
        var(--sunset-purple) 100%) !important;
    box-shadow: var(--warm-glow);
}

/* ============================================
   Card & Content Block Enhancements
   ============================================ */

.card, .content-block {
    background: var(--color-surface, #FFFFFF);
    border: 1px solid rgba(255, 212, 163, 0.3);
    transition: all 0.4s ease;
    box-shadow: var(--soft-shadow);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

/* Warm corner accent */
.card::before,
.content-block::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: radial-gradient(
        circle at top right,
        rgba(255, 107, 53, 0.1) 0%,
        transparent 70%
    );
    pointer-events: none;
    transition: all 0.4s ease;
}

.card:hover::before,
.content-block:hover::before {
    width: 120px;
    height: 120px;
    background: radial-gradient(
        circle at top right,
        rgba(255, 107, 53, 0.2) 0%,
        transparent 70%
    );
}

.card:hover, .content-block:hover {
    border-color: rgba(255, 107, 53, 0.5);
    box-shadow: var(--warm-glow), 0 12px 40px rgba(61, 40, 23, 0.2);
    transform: translateY(-6px);
}

/* ============================================
   Navigation Enhancements
   ============================================ */

nav, .header {
    background: var(--header-background);
    border-bottom: 2px solid rgba(255, 212, 163, 0.3);
    box-shadow: 0 2px 16px rgba(255, 107, 53, 0.1);
}

nav a, .menu-item {
    position: relative;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Warm underline on hover */
nav a::after, .menu-item::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg,
        var(--sunset-orange) 0%,
        var(--sunset-purple) 100%);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
    transition: width 0.3s ease;
}

nav a:hover::after, .menu-item:hover::after {
    width: 100%;
}

nav a:hover, .menu-item:hover {
    color: var(--sunset-orange);
}

/* ============================================
   Hero Section Enhancements
   ============================================ */

.hero, section[class*="hero"] {
    position: relative;
    overflow: hidden;
}

/* Sunset gradient overlay */
.hero:not(:has(> div[class*="absolute"][class*="inset-0"]))::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at center bottom,
        rgba(255, 107, 53, 0.15) 0%,
        rgba(155, 89, 182, 0.1) 50%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 0;
    animation: sunsetShift 12s ease-in-out infinite;
}

@keyframes sunsetShift {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* Only target content container, not background image */
.hero > .relative {
    z-index: 10;
}

/* Parallax hero content */
.hero-content {
    transition: transform 0.3s ease-out;
}

/* ============================================
   Section Enhancements
   ============================================ */

section {
    position: relative;
}

/* Warm divider between sections */
section + section {
    border-top: 1px solid rgba(255, 212, 163, 0.2);
}

/* Organic section transitions */
section {
    transition: all 0.5s ease;
}

/* ============================================
   Music Player Integration
   ============================================ */

.music-player,
#amplitude-player {
    background: var(--card-background);
    border: 2px solid rgba(255, 212, 163, 0.4);
    box-shadow: var(--warm-glow), var(--soft-shadow);
    border-radius: 20px;
}

/* Album art with warm border */
.album-art img,
[data-amplitude-song-info="cover_art_url"] {
    border: 3px solid rgba(255, 107, 53, 0.3);
    box-shadow: var(--warm-glow);
    transition: all 0.4s ease;
    border-radius: 12px;
}

.album-art:hover img {
    border-color: var(--sunset-orange);
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.4);
    transform: scale(1.02);
}

/* Play button sunset gradient */
.amplitude-play-pause,
button[class*="play"] {
    background: linear-gradient(135deg,
        var(--sunset-orange) 0%,
        var(--sunset-purple) 100%);
    border: none;
    box-shadow: var(--warm-glow);
    transition: all 0.3s ease;
}

.amplitude-play-pause:hover {
    box-shadow: 0 6px 30px rgba(255, 107, 53, 0.4);
    transform: scale(1.1);
}

/* ============================================
   Form Elements
   ============================================ */

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    border: 2px solid rgba(255, 212, 163, 0.3);
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    border-radius: 12px;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--sunset-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1), var(--warm-glow);
    background: rgba(255, 255, 255, 1);
    outline: none;
}

/* ============================================
   Footer Enhancements
   ============================================ */

footer {
    background: var(--footer-background);
    border-top: 2px solid rgba(255, 212, 163, 0.3);
    box-shadow: 0 -4px 20px rgba(255, 107, 53, 0.1);
}

/* Warm top accent */
footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        var(--sunset-orange) 0%,
        var(--sunset-purple) 50%,
        var(--sunset-orange) 100%);
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

footer .social-links a {
    transition: all 0.3s ease;
}

footer .social-links a:hover {
    color: var(--sunset-orange);
    transform: translateY(-3px) scale(1.1);
}

/* ============================================
   Image Treatments
   ============================================ */

img {
    transition: all 0.4s ease;
}

/* Warm vintage filter */
img:not([class*="logo"]):not([class*="icon"]) {
    filter: brightness(1.02) contrast(1.05) saturate(1.1);
}

img:hover {
    filter: brightness(1.05) contrast(1.08) saturate(1.15);
}

/* Gallery images with organic borders */
.gallery img,
[class*="gallery"] img {
    border: 3px solid rgba(255, 212, 163, 0.4);
    box-shadow: var(--soft-shadow);
    border-radius: 16px;
}

.gallery img:hover {
    border-color: var(--sunset-orange);
    box-shadow: var(--warm-glow), 0 12px 40px rgba(61, 40, 23, 0.2);
}

/* ============================================
   Decorative Elements
   ============================================ */

/* Organic dividers */
.divider {
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--sunset-orange) 25%,
        var(--sunset-purple) 50%,
        var(--sunset-orange) 75%,
        transparent 100%);
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.3);
    margin: 2rem 0;
    border-radius: 2px;
}

/* Blockquote styling */
blockquote {
    position: relative;
    padding-left: 2rem;
    border-left: 4px solid var(--sunset-orange);
    font-style: italic;
}

blockquote::before {
    content: '\201C';
    position: absolute;
    left: -0.5rem;
    top: -1rem;
    font-size: 5rem;
    color: var(--sunset-orange);
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

/* ============================================
   Scroll Indicators
   ============================================ */

.scroll-indicator {
    animation: gentleBounce 2s ease-in-out infinite;
}

@keyframes gentleBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

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

@media (max-width: 768px) {
    /* Simplify effects on mobile */
    body::before,
    body::after {
        opacity: 0.5;
    }

    .card::before,
    .content-block::before {
        display: none;
    }

    /* Reduce parallax on mobile */
    :root {
        --parallax-speed-slow: 0.1;
        --parallax-speed-medium: 0.05;
        --parallax-speed-fast: 0.02;
    }

    .card:hover, .content-block:hover {
        transform: translateY(-2px);
    }
}

@media (prefers-reduced-motion: reduce) {
    /* Disable all animations for accessibility */
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    body::before,
    body::after {
        animation: none;
    }
}
