/* ========================================
   OFFLINE Córdoba - Festival Cultural
   ======================================== */

/* Variables */
:root {
    --color-bg: #1a1612;
    --color-bg-alt: #2d2520;
    --color-text: #f5efe6;
    --color-text-muted: #b8a890;
    --color-accent: #c9a962;
    --color-muted: #8b7355;
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    background: linear-gradient(
        to bottom,
        rgba(26, 22, 18, 0.9) 0%,
        rgba(26, 22, 18, 0.7) 60%,
        transparent 100%
    );
    transition: background 0.3s ease;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-logo:hover {
    color: var(--color-accent);
}

.nav-tagline {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(26, 22, 18, 0.8) 100%
    );
    z-index: 2;
    pointer-events: none;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-indicator span {
    display: block;
    width: 24px;
    height: 40px;
    border: 2px solid var(--color-text-muted);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 2px;
    animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateX(-50%) translateY(12px);
        opacity: 0.3;
    }
}

/* Sound Toggle Button */
.sound-toggle {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: rgba(26, 22, 18, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(201, 169, 98, 0.3);
    border-radius: 50px;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.sound-toggle:hover {
    background: rgba(26, 22, 18, 0.9);
    border-color: var(--color-accent);
}

.sound-toggle:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.sound-toggle svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sound-toggle .icon-unmuted {
    display: none;
}

.sound-toggle .icon-muted {
    display: block;
}

.sound-toggle.active .icon-unmuted {
    display: block;
}

.sound-toggle.active .icon-muted {
    display: none;
}

.sound-toggle.active {
    border-color: var(--color-accent);
    background: rgba(201, 169, 98, 0.15);
}

.sound-label {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.sound-toggle.active::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50px;
    border: 2px solid var(--color-accent);
    animation: pulse-ring 1.5s ease-out infinite;
}

/* ========================================
   HERO CREDIT
   ======================================== */
.hero-credit {
    text-align: center;
    padding: 2rem 1rem;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.1em;
    color: var(--color-accent);
}

/* ========================================
   GALLERY SECTION
   ======================================== */
.gallery-section {
    padding: 6rem 2rem;
    max-width: 1800px;
    margin: 0 auto;
}

.gallery-header {
    text-align: center;
    margin-bottom: 4rem;
}

.gallery-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.gallery-header p {
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-muted);
}

/* Masonry Grid using CSS Columns */
.masonry-grid {
    column-count: 4;
    column-gap: 1.5rem;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: var(--color-bg-alt);
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease, filter 0.5s ease;
    filter: brightness(0.95);
}

.masonry-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 70%,
        rgba(26, 22, 18, 0.4) 100%
    );
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.masonry-item:hover::before {
    opacity: 1;
}

.masonry-item:hover img {
    transform: scale(1.03);
    filter: brightness(1);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid var(--color-bg-alt);
}

.footer-credit {
    font-family: var(--font-display);
    font-size: 1.25rem;
    letter-spacing: 0.2em;
    color: var(--color-muted);
}

/* Sponsors */
.sponsors {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-bg-alt);
}

.sponsors-text {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.sponsors-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.sponsors-logos img {
    height: 80px;
    width: auto;
    opacity: 0.7;
    filter: grayscale(20%);
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.sponsors-logos img:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Large Desktop */
@media (max-width: 1400px) {
    .masonry-grid {
        column-count: 3;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .masonry-grid {
        column-count: 2;
        column-gap: 1rem;
    }

    .masonry-item {
        margin-bottom: 1rem;
    }

    .gallery-section {
        padding: 4rem 1.5rem;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .navbar {
        padding: 1rem 1rem;
        flex-direction: column;
        gap: 0.25rem;
        align-items: flex-start;
    }

    .nav-logo {
        font-size: 1.4rem;
        letter-spacing: 0.15em;
    }

    .nav-tagline {
        font-size: 0.65rem;
    }

    .masonry-grid {
        column-count: 1;
    }

    .gallery-section {
        padding: 3rem 1rem;
    }

    .gallery-header {
        margin-bottom: 2rem;
    }

    .sound-toggle {
        bottom: 1.5rem;
        right: 1rem;
        padding: 0.6rem 1rem;
    }

    .sound-label {
        font-size: 0.7rem;
    }

    .sponsors-logos {
        gap: 1.5rem;
    }

    .sponsors-logos img {
        height: 56px;
    }

    .sponsors-text {
        font-size: 0.75rem;
        padding: 0 1rem;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .scroll-indicator span::before {
        animation: none;
    }

    .masonry-item img {
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }
}
