/* Permite animar --mood como color (con fallback silencioso en navegadores sin soporte) */
@property --mood {
    syntax: '<color>';
    inherits: true;
    initial-value: #0b1026;
}

:root {
    --mood: #0b1026;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    background-color: #000;
    color: white;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

section, footer {
    position: relative;
    z-index: 10;
}

section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    padding: 4rem 1.5rem;
}

/* Fondo unificado: cada sección de contenido usa el mismo degradado radial,
   coloreado con el --section-mood propio de su data-mood (fijado en JS). */
section[data-mood]:not(.hero) {
    background: radial-gradient(ellipse at center, var(--section-mood, #1a1440) 0%, #05040d 75%);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 0.75rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 10px;
}
.social-icon {
    color: #ffffff;
    transition: all 0.3s ease;
}
.social-icon:hover {
    color: #ff00ff;
    transform: translateY(-5px);
}
.counters h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}
.counters p {
    margin: 0;
    font-size: 1rem;
}

/* ===== REDES SOCIALES ===== */
.redes-section {
    position: relative;
    overflow: hidden;
}
.redes-photo-bg {
    position: absolute;
    inset: 0;
    display: flex;
    opacity: 0.65;
}
.redes-photo-bg img {
    flex: 1;
    height: 100%;
    min-width: 0;
    object-fit: cover;
    object-position: top center;
}
.redes-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5,4,13,0.55) 0%, rgba(5,4,13,0.8) 100%);
}
.redes-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}
@media (max-width: 768px) {
    .redes-photo-bg { flex-wrap: wrap; }
    .redes-photo-bg img { flex: 1 1 50%; height: 50%; }
}

/* ===== CAPA DE "NOCHE" (progreso de ambiente por sección) ===== */
#moodLayer {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.55;
    background: radial-gradient(circle at 50% 50%, transparent 35%, var(--mood) 140%);
    transition: --mood 1.4s ease;
}

/* ===== FOCO DE ESCENARIO (sigue al cursor, solo con ratón) ===== */
#spotlight {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    background: radial-gradient(circle 260px at var(--x, 50%) var(--y, 50%), rgba(255,255,255,0.10), rgba(255,255,255,0) 70%);
}
#spotlight.is-active { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    #moodLayer { transition: none; }
    #spotlight { display: none; }
}

/* HERO */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}
.hero-overlay {
    position: relative;
    z-index: 1;
    text-align: center;
}
.hero-logo {
    max-width: 300px;
    animation: fadeIn 2s ease-in-out;
}
.hero-tagline {
    margin-top: 1rem;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.85);
}
.scroll-cue {
    margin-top: 3rem;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    animation: bounce 2.2s infinite;
}
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(8px); opacity: 1; }
}

/* ===== BIO ===== */
.bio-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3.5rem;
    width: 100%;
    max-width: 980px;
}
.bio-photos {
    position: relative;
    flex: 0 0 260px;
    width: 260px;
}
.bio-photo-main {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 18px;
    display: block;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 40px rgba(255,0,255,0.18);
}
.bio-photo-accent {
    position: absolute;
    right: -12%;
    bottom: -12%;
    width: 46%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    border: 4px solid #05040d;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}
.bio-text {
    flex: 1;
    min-width: 0;
    text-align: left;
}
.bio-text p {
    max-width: 520px;
    line-height: 1.6;
}
@media (max-width: 900px) {
    .bio-content {
        flex-direction: column;
        text-align: center;
    }
    .bio-photos {
        width: 220px;
        flex: none;
        margin-bottom: 1.5rem;
    }
    .bio-text {
        text-align: center;
    }
    .bio-text p {
        margin-left: auto;
        margin-right: auto;
    }
}

/* ===== TIMELINE / RUTA ===== */
.timeline-section {
    min-height: 170vh;
    overflow: hidden;
}
.timeline-section p.lede {
    max-width: 560px;
    color: rgba(255,255,255,0.75);
}
.map-wrap {
    position: relative;
    width: 100%;
    max-width: 640px;
    aspect-ratio: 100 / 85.3;
    margin: 2.5rem 0 1rem;
}
.map-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}
.map-landmass {
    fill: rgba(255,255,255,0.05);
    stroke: rgba(255,255,255,0.35);
    stroke-width: 0.5;
    stroke-linejoin: round;
}
.map-andalucia {
    fill: rgba(255,0,255,0.28);
    stroke: #ff00ff;
    stroke-width: 0.5;
    stroke-linejoin: round;
}
.flight-track {
    fill: none;
    stroke: rgba(255,255,255,0.25);
    stroke-width: 0.5;
    stroke-linecap: round;
    stroke-dasharray: 1.4 2.2;
}
.flight-progress {
    fill: none;
    stroke: #ff00ff;
    stroke-width: 0.5;
    stroke-linecap: round;
    filter: drop-shadow(0 0 3px rgba(255,0,255,0.7));
}
.plane-marker {
    position: absolute;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    filter: drop-shadow(0 0 6px rgba(255,0,255,0.9));
    transform: translate(-50%, -50%) rotate(0deg);
    transition: left 0.05s linear, top 0.05s linear;
}
.map-mark {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    white-space: nowrap;
}
.map-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff00ff;
    margin-bottom: 0.5rem;
    box-shadow: 0 0 0 0 rgba(255,0,255,0.6);
}
.map-mark--region {
    transform: translate(-50%, -50%);
}
.map-mark--region .map-tag {
    font-size: 0.7rem;
}
.map-mark--visited h3 {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.85);
}
.map-tag {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.75);
}
.map-mark h3 {
    margin: 0.15rem 0 0;
    font-size: 1.1rem;
}
.map-mark--waypoint {
    opacity: 0;
    transition: opacity 0.5s ease;
}
.map-mark--waypoint.is-visible {
    opacity: 1;
}
.map-mark--waypoint.is-visible .map-dot {
    animation: mapPing 1.6s ease-out 1;
}
@keyframes mapPing {
    0% { box-shadow: 0 0 0 0 rgba(255,0,255,0.6); }
    100% { box-shadow: 0 0 0 16px rgba(255,0,255,0); }
}
.route-hint {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
    margin-top: 1rem;
}
@media (max-width: 768px) {
    .timeline-section { min-height: 150vh; }
    .map-mark h3 { font-size: 0.9rem; }
    .map-tag { font-size: 0.55rem; }
    .map-dot { width: 8px; height: 8px; }
    .plane-marker { width: 18px; height: 18px; font-size: 0.9rem; }
}
@media (prefers-reduced-motion: reduce) {
    .plane-marker { transition: none; }
    .map-mark--waypoint { transition: none; }
}

/* ===== SONIDO ===== */
.sonido-section {
    position: relative;
    overflow: hidden;
}
.sonido-video-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    pointer-events: none;
}
.sonido-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== PRESSKIT ===== */
.press-clippings {
    display: block;
    width: 100%;
    max-width: 850px;
    margin: 1.5rem 0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 40px rgba(15,90,90,0.3);
}
.press-clippings img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== GALERÍA ===== */
.gallery-grid {
    display: grid;
    grid-auto-flow: dense;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 130px;
    gap: 10px;
    width: 100%;
    max-width: 1100px;
    margin-top: 2rem;
}
.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    transition: transform 0.4s ease, filter 0.4s ease;
}
.gallery-item {
    margin: 0;
    overflow: hidden;
    border-radius: 10px;
    grid-column: span 2;
    grid-row: span 2;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    cursor: pointer;
}
.gallery-item picture {
    display: block;
    width: 100%;
    height: 100%;
}
.gallery-item:hover img {
    transform: scale(1.06);
}
.gallery-item.g-tall {
    grid-column: span 1;
    grid-row: span 3;
}
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 110px;
        gap: 8px;
    }
    .gallery-item,
    .gallery-item.g-tall {
        grid-column: span 1;
        grid-row: span 2;
    }
}

/* ===== GALERÍA: MODAL DE VISOR ===== */
.galeria-modal-open {
    overflow: hidden;
}
.galeria-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.galeria-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.9);
}
.galeria-modal-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.galeria-modal-content img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    display: block;
}
.galeria-modal-close,
.galeria-modal-nav {
    position: fixed;
    z-index: 2;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    border-radius: 50%;
    width: 2.6rem;
    height: 2.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
}
.galeria-modal-close:hover,
.galeria-modal-nav:hover {
    background-color: #ff0000;
    border-color: #ff0000;
}
.galeria-modal-close {
    top: 1rem;
    right: 1rem;
}
.galeria-modal-prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}
.galeria-modal-next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}
@media (max-width: 600px) {
    .galeria-modal-close,
    .galeria-modal-nav {
        width: 2.2rem;
        height: 2.2rem;
        font-size: 1rem;
    }
    .galeria-modal-prev { left: 0.4rem; }
    .galeria-modal-next { right: 0.4rem; }
}

/* Tipografía responsive */
h1 { font-size: 3rem; }
p  { font-size: 1.2rem; }

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    p  { font-size: 1rem; }
    .hero-logo { max-width: 200px; }
    section { padding: 3rem 1.25rem; }
    .vinyl { width: 100px; height: 100px; }
}

/* Contadores */
.counters { gap: 3rem; }
@media (max-width: 768px) {
    .counters { flex-direction: column; gap: 1rem; }
}

/* Botones */
.btn-custom {
    background-color: transparent;
    color: white;
    border: 1px solid white;
    transition: all 0.3s ease;
}
.btn-custom:hover {
    background-color: transparent;
    color: #ff0000;
    border-color: #ff0000;
    transform: scale(1.05);
}
@media (max-width: 768px) {
    .btn { width: 80%; font-size: 1.1rem; }
}

/* Footer */
.footer .social-links a {
    color: white;
    font-size: 1.5rem;
    margin: 0 10px;
    transition: transform 0.3s, color 0.3s;
}
.footer .social-links a:hover {
    transform: scale(1.2);
    color: #ff0;
}
.logo-fresca {
    height: 40px;
    vertical-align: middle;
    margin-left: 8px;
    transition: transform 0.3s ease, filter 0.3s ease;
}
.fresca-link:hover .logo-fresca {
    transform: scale(1.1);
    filter: drop-shadow(0 0 6px #fff);
}
