/* ========================================
   PACHA PRESENTS - MODERN STYLES
   ======================================== */

/* -----------------------------
   1. CSS CUSTOM PROPERTIES
----------------------------- */
:root {
    /* Brand Colors */
    --primary: #9333EA;
    --primary-light: #B366F8;
    --primary-dark: #7C3AED;
    --secondary: #F59E0B;
    --accent: #EC4899;
    
    /* Neutral Colors */
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --text-dim: rgba(255, 255, 255, 0.5);
    --black: #000000;
    --dark-bg: #0a0a0a;
    --dark-surface: rgba(0, 0, 0, 0.8);
    
    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    --space-3xl: 8rem;
    
    /* Typography Scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;
    
    /* Layout */
    --container-width: 1400px;
    --container-padding: 2rem;
    --border-radius: 20px;
    --border-radius-sm: 12px;
    --border-radius-lg: 28px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.25);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-bounce: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Z-Index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    
    /* Breakpoints (for JS) */
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;
}

/* -----------------------------
   2. RESET & BASE STYLES
----------------------------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--black);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: opacity var(--transition-base);
}

/* Loading state */
body.loading {
    opacity: 0;
}

body.loaded {
    opacity: 1;
}

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

/* Media elements */
img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Lazy loading */
img.lazy,
video.lazy {
    opacity: 0;
    transition: opacity var(--transition-base);
}

img.lazy.loaded,
video.lazy.loaded {
    opacity: 1;
}

/* Focus styles for accessibility */
.keyboard-navigation *:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

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

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

/* -----------------------------
   3. LAYOUT SYSTEM
----------------------------- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    width: 100%;
}

section {
    padding: var(--space-xl) 0;
    position: relative;
    width: 100%;
}

/* Utility classes for spacing */
.section-padding-sm { padding: var(--space-md) 0; }
.section-padding-lg { padding: var(--space-2xl) 0; }
.section-padding-xl { padding: var(--space-3xl) 0; }

/* Container variations */
.container-sm { max-width: 640px; }
.container-md { max-width: 768px; }
.container-lg { max-width: 1024px; }
.container-xl { max-width: 1280px; }
.container-2xl { max-width: 1536px; }

/* -----------------------------
   4. HERO SECTION
----------------------------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 0 var(--space-md);
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    color: var(--text);
    text-shadow: 
        0 0 20px rgba(147, 51, 234, 0.5),
        2px 2px 4px rgba(0, 0, 0, 0.5);
    -webkit-text-stroke: 2px rgba(147, 51, 234, 0.3);
    font-size: clamp(2.5rem, 12vw, 6rem);
    letter-spacing: 0.05em;
    margin-bottom: var(--space-lg);
    line-height: 1.1;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    padding: 0 var(--space-md);
    animation: slideUp 1.2s ease-out 0.3s both;
}

.hero-subtitle {
    font-size: clamp(1rem, 4vw, 1.5rem);
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.4;
    animation: fadeIn 1.5s ease-out 0.6s both;
}

/* Hero animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media screen and (max-width: 768px) {
    .hero-content {
        padding: 0 var(--space-sm);
    }

    .hero-title {
        font-size: clamp(2rem, 10vw, 3rem);
        letter-spacing: 0.02em;
        -webkit-text-stroke: 1px rgba(147, 51, 234, 0.3);
        padding: 0 var(--space-sm);
        margin-bottom: var(--space-md);
    }
}

@media screen and (max-width: 480px) {
    .hero-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        padding: 0;
        margin: 0 auto var(--space-md);
        max-width: 90%;
    }
}

/* -----------------------------
   4. CLAIM SECTION
----------------------------- */
.claim-section {
    padding: var(--space-xl) 0;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}

.neon-claim {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.neon-text {
    font-family: 'Mrs Saint Delafield', cursive;
    font-size: clamp(3.5rem, 10vw, 6.5rem);
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0.5px 0.5px 0 rgba(255, 255, 255, 0.6);
    transform: rotate(-2deg);
    text-align: center;
    line-height: 1.2;
    animation: handwriting 0.5s ease-out forwards;
}

@keyframes handwriting {
    from { opacity: 0; transform: translateY(20px) rotate(-2deg); }
    to { opacity: 0.9; transform: translateY(0) rotate(-2deg); }
}

/* -----------------------------
   5. CONTENT SECTIONS
----------------------------- */
/* Content Sections Base */
.content-section,
.visual-references,
.entrance-design {
    padding: var(--space-xl) 0;
    background: var(--black);
    width: 100%;
}

/* Section Title and Intro */
.section-title,
.visual-references h2 {
    text-align: center;
    font-size: var(--text-2xl);
    margin-bottom: var(--space-lg);
}

.section-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-xl);
    font-size: var(--text-lg);
}

/* Grid System */
.grid,
.video-stories,
.entrance-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
    width: 100%;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* Media Containers */
.media-container,
.story-video {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 4/5;
}

.media-container img,
.media-container video,
.story-video img,
.story-video video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Single Image Layout */
.single-media-container {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
}

/* Mobile Styles */
@media screen and (max-width: 768px) {
    /* Section Spacing */
    .content-section,
    .visual-references,
    .entrance-design,
    .single-media-section {
        padding: var(--space-lg) 0;
    }

    /* Container Padding */
    .container {
        padding: 0 var(--space-md);
    }

    /* Single Image Layout */
    .single-media-container {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    .single-media-container .media-container {
        aspect-ratio: 4/5;
        margin: 0;
    }

    /* Typography */
    .section-title,
    .visual-references h2 {
        font-size: var(--text-xl);
        margin-bottom: var(--space-lg);
        padding: 0;
    }

    .section-intro {
        font-size: var(--text-base);
        margin-bottom: var(--space-xl);
        padding: 0;
    }

    /* Grid System */
    .grid,
    .grid-2,
    .grid-3,
    .video-stories,
    .entrance-images {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        margin: var(--space-xl) 0;
    }

    /* Media Containers */
    .media-container,
    .story-video,
    .single-media-container .media-container {
        aspect-ratio: 4/5;
    }

    /* Single Image Layout */
    .single-media-container {
        padding: 0;
        max-width: 100%;
    }
}

/* External Mapping Section */
.mapping-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.mapping-container .media-container {
    aspect-ratio: auto;
    padding-bottom: 18%;
}

@media screen and (max-width: 768px) {
    .mapping-container .media-container {
        padding-bottom: 36%;
    }
}

/* Remove border radius for specific sections */
.mapping-video img,
.visual-references .story-video img,
.corridor .story-video img {
    border-radius: 0;
}

.mapping-video,
.visual-references .story-video,
.corridor .story-video {
    border-radius: 0;
}

@media screen and (max-width: 768px) {
    .grid,
    .video-stories {
        grid-template-columns: 1fr;
        gap: var(--space-md);
        margin: var(--space-lg) 0;
    }

    .story-video {
        aspect-ratio: 4/5;
    }
}

.no-stretch {
    object-fit: contain;
    max-width: 100%;
    height: auto;
}
