/**
 * Dracula Birthday Theme - Main Stylesheet
 * 
 * Table of Contents:
 * 1. Reset & Base
 * 2. Typography
 * 3. Layout
 * 4. Animations
 * 5. Disco Ball
 * 6. Smoke Effect
 * 7. Buttons & CTA
 * 8. Accessibility
 * 9. Responsive
 */

/* ============================================
   1. RESET & BASE
   ============================================ */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
    background: linear-gradient(180deg, #1a0030 0%, #0a0015 100%);
    background-attachment: fixed;
    color: #f5f0e8;
    font-family: Georgia, serif;
    font-size: 22px;
    line-height: 1.9;
    overflow-x: hidden;
    position: relative;
    
    /* Subtle animated hue-shift */
    animation: backgroundHueShift 120s ease-in-out infinite;
}

@keyframes backgroundHueShift {
    0%, 100% {
        filter: hue-rotate(0deg);
    }
    50% {
        filter: hue-rotate(5deg);
    }
}

/* ============================================
   2. TYPOGRAPHY
   ============================================ */

/* H1 - Cinzel with neon glow */
h1,
.wp-block-heading h1,
h1.wp-block-heading {
    font-family: 'Cinzel', serif;
    font-size: 50px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    margin-bottom: 48px;
    
    /* Multi-layer neon glow effect */
    text-shadow: 
        0 0 10px #ff006e,
        0 4px 8px rgba(255, 0, 110, 0.8),
        0 8px 16px rgba(255, 0, 110, 0.6),
        0 12px 24px rgba(139, 92, 246, 0.4);
    
    /* GPU acceleration for smooth animation */
    will-change: text-shadow;
}

/* H2 - Comic Sans with gradient text */
h2,
.wp-block-heading h2,
h2.wp-block-heading {
    font-family: 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 38px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    margin-bottom: 32px;
    
    /* Gradient text fill */
    background: linear-gradient(90deg, #ff006e 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* H3 - Cinzel with subtle glow */
h3,
.wp-block-heading h3,
h3.wp-block-heading {
    font-family: 'Cinzel', serif;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    margin-bottom: 24px;
    
    text-shadow: 
        0 0 8px rgba(255, 0, 110, 0.6),
        0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Body text */
p,
.wp-block-paragraph {
    margin-bottom: 24px;
    text-align: center;
}

/* Links */
a {
    color: #ff006e;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

a:hover,
a:focus {
    color: #8b5cf6;
    text-shadow: 0 0 12px rgba(255, 0, 110, 0.6);
}

a:focus {
    outline: 2px solid #ff006e;
    outline-offset: 4px;
}

/* ============================================
   3. LAYOUT
   ============================================ */

.site-content {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
}

.content-wrapper {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

/* Spacing between sections */
.wp-block-group,
.wp-block-cover {
    margin-bottom: 96px;
}

.wp-block-group:last-child,
.wp-block-cover:last-child {
    margin-bottom: 0;
}

/* ============================================
   4. ANIMATIONS
   ============================================ */

/* Pulsating glow animation for buttons/accents */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 0, 110, 0.6),
                    0 0 40px rgba(255, 0, 110, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 0, 110, 0.8),
                    0 0 60px rgba(255, 0, 110, 0.5);
    }
}

/* ============================================
   5. DISCO BALL
   ============================================ */

.disco-ball {
    position: fixed;
    top: 40px;
    right: 40px;
    width: 80px;
    height: 80px;
    z-index: 100;
    pointer-events: none;
}

.disco-ball-inner {
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 30%, #ffffff, transparent 50%),
        linear-gradient(135deg, #ffd700 0%, #ff006e 50%, #8b5cf6 100%);
    border-radius: 50%;
    box-shadow: 
        inset -10px -10px 30px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(255, 0, 110, 0.6),
        0 0 60px rgba(139, 92, 246, 0.4);
    
    /* Rotation animation */
    animation: discoRotate 4s linear infinite;
    will-change: transform;
    transform-origin: center;
}

@keyframes discoRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Light reflections that fly across the page */
.light-reflection {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 5;
}

.light-reflection::before,
.light-reflection::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 0, 110, 0.4) 50%, 
        transparent 100%);
    opacity: 0;
    animation: lightSweep 8s ease-in-out infinite;
    will-change: transform, opacity;
}

.light-reflection::after {
    animation-delay: 4s;
}

@keyframes lightSweep {
    0% {
        transform: translate(-200px, 20vh) rotate(-45deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translate(calc(100vw + 200px), 80vh) rotate(-45deg);
        opacity: 0;
    }
}

/* ============================================
   6. SMOKE EFFECT
   ============================================ */

.smoke-effect {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 300px;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.smoke-effect::before {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50%;
    right: -50%;
    height: 400px;
    background: 
        radial-gradient(ellipse at center, 
            rgba(139, 92, 246, 0.15) 0%, 
            transparent 70%);
    filter: blur(40px);
    animation: smokeFloat 20s ease-in-out infinite;
    will-change: transform;
}

@keyframes smokeFloat {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(10%) translateY(-10px);
    }
    50% {
        transform: translateX(-5%) translateY(-20px);
    }
    75% {
        transform: translateX(-10%) translateY(-10px);
    }
}

/* ============================================
   7. BUTTONS & CTA
   ============================================ */

.wp-block-button {
    text-align: center;
    margin: 48px 0;
}

.wp-block-button__link,
.wp-block-button .wp-block-button__link {
    display: inline-block;
    padding: 16px 32px;
    min-height: 48px;
    background: transparent;
    border: 2px solid #ff006e;
    border-radius: 8px;
    color: #f5f0e8 !important;
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.3);
    will-change: transform, box-shadow;
}

.wp-block-button__link:hover,
.wp-block-button__link:focus,
.wp-block-button .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:focus {
    background: linear-gradient(90deg, #ff006e 0%, #8b5cf6 100%);
    border-color: transparent;
    transform: scale(1.05) rotate(-1deg);
    box-shadow: 
        0 0 30px rgba(255, 0, 110, 0.8),
        0 0 40px rgba(139, 92, 246, 0.6);
    animation: glowPulse 2s ease-in-out infinite;
}

.wp-block-button__link:focus,
.wp-block-button .wp-block-button__link:focus {
    outline: 2px solid #ffd700;
    outline-offset: 4px;
}

/* ============================================
   8. ACCESSIBILITY
   ============================================ */

/* Focus states */
*:focus-visible {
    outline: 2px solid #ff006e;
    outline-offset: 4px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -9999px;
    left: -9999px;
}

.skip-link:focus {
    top: 0;
    left: 0;
    z-index: 999;
    padding: 16px;
    background: #0a0015;
    color: #f5f0e8;
    text-decoration: none;
}

/* Screen reader only text */
.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;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    body {
        animation: none;
    }
    
    .disco-ball-inner {
        animation: none;
    }
    
    .light-reflection::before,
    .light-reflection::after {
        display: none;
    }
    
    .smoke-effect::before {
        animation: none;
    }
}

/* ============================================
   9. RESPONSIVE
   ============================================ */

/* Tablet: 768px - 1023px */
@media (max-width: 1023px) {
    body {
        font-size: 20px;
    }
    
    h1,
    h1.wp-block-heading {
        font-size: 42px;
        margin-bottom: 32px;
    }
    
    h2,
    h2.wp-block-heading {
        font-size: 32px;
        margin-bottom: 24px;
    }
    
    h3,
    h3.wp-block-heading {
        font-size: 26px;
    }
    
    .site-content {
        padding: 32px 24px;
    }
    
    .wp-block-group,
    .wp-block-cover {
        margin-bottom: 64px;
    }
    
    .disco-ball {
        width: 60px;
        height: 60px;
        top: 30px;
        right: 30px;
    }
}

/* Mobile: < 768px */
@media (max-width: 767px) {
    body {
        font-size: 19px;
        line-height: 1.8;
    }
    
    h1,
    h1.wp-block-heading {
        font-size: 35px;
        margin-bottom: 24px;
        
        /* Reduced glow for mobile performance */
        text-shadow: 
            0 0 8px #ff006e,
            0 4px 12px rgba(255, 0, 110, 0.6);
    }
    
    h2,
    h2.wp-block-heading {
        font-size: 27px;
        margin-bottom: 20px;
    }
    
    h3,
    h3.wp-block-heading {
        font-size: 22px;
        margin-bottom: 16px;
        
        text-shadow: 0 0 6px rgba(255, 0, 110, 0.5);
    }
    
    .site-content {
        padding: 24px 16px;
    }
    
    .wp-block-group,
    .wp-block-cover {
        margin-bottom: 48px;
    }
    
    .disco-ball {
        width: 50px;
        height: 50px;
        top: 20px;
        right: 20px;
    }
    
    /* Disable smoke effect on mobile for performance */
    .smoke-effect {
        display: none;
    }
    
    /* Simpler button effects on mobile */
    .wp-block-button__link:hover,
    .wp-block-button .wp-block-button__link:hover {
        animation: none;
    }
}

/* Very small mobile: < 480px */
@media (max-width: 479px) {
    h1,
    h1.wp-block-heading {
        font-size: 30px;
    }
    
    h2,
    h2.wp-block-heading {
        font-size: 24px;
    }
    
    /* Full width buttons on small screens */
    .wp-block-button__link,
    .wp-block-button .wp-block-button__link {
        display: block;
        width: 100%;
        padding: 14px 24px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    body {
        background: #000;
        color: #fff;
    }
    
    a {
        text-decoration: underline;
    }
    
    .wp-block-button__link,
    .wp-block-button .wp-block-button__link {
        border-width: 3px;
    }
}
