/* === VARIABLES === */
:root {
    --bg: #FFFFFF;
    --bg-dark: #0F0F0F;
    --text: #0F0F0F;
    --text-muted: #6B6B6B;
    --text-light: #FFFFFF;
    --border: #E5E2DD;
    --font-body: 'Inter', sans-serif;
    --font-display: 'Cormorant Garant', serif;
    --max-width: 1200px;
    --nav-height: 72px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

/* === LAYOUT === */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 7rem 0;
}

.section--dark {
    background: var(--bg-dark);
    color: var(--text-light);
}

/* === TYPOGRAPHY === */
h2 {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    font-weight: 400;
    line-height: 1.05;
    margin-bottom: 2rem;
}

h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    line-height: 1.2;
}

.section-tag {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.section-tag::before {
    content: '';
    display: block;
    width: 2rem;
    height: 1px;
    background: currentColor;
    flex-shrink: 0;
}

.section--dark .section-tag {
    color: rgba(255,255,255,0.4);
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.85;
}

.section-bio {
    margin-bottom: 4.5rem;
}

.section-bio .section-desc {
    margin-bottom: 1.5rem;
}

.section-bio .section-desc:last-child {
    margin-bottom: 0;
}

/* === ANIMATIONS === */
.fade-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.musician-card:nth-child(2) { transition-delay: 0.1s; }
.musician-card:nth-child(3) { transition-delay: 0.2s; }
.musician-card:nth-child(4) { transition-delay: 0.3s; }

.gallery-item:nth-child(2) { transition-delay: 0.05s; }
.gallery-item:nth-child(3) { transition-delay: 0.1s; }
.gallery-item:nth-child(4) { transition-delay: 0.15s; }
.gallery-item:nth-child(5) { transition-delay: 0.2s; }
.gallery-item:nth-child(6) { transition-delay: 0.25s; }

.concert-item:nth-child(2) { transition-delay: 0.1s; }
.concert-item:nth-child(3) { transition-delay: 0.2s; }
.concert-item:nth-child(4) { transition-delay: 0.3s; }

/* === NAVIGATION === */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-light);
    transition: color 0.3s var(--ease);
    letter-spacing: 0.02em;
}

#navbar.scrolled .nav-logo {
    color: var(--text);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-menu a {
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    transition: color 0.25s var(--ease);
}

.nav-menu a:hover {
    color: var(--text-light);
}

#navbar.scrolled .nav-menu a {
    color: var(--text-muted);
}

#navbar.scrolled .nav-menu a:hover {
    color: var(--text);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 1px;
    background: var(--text-light);
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), background 0.3s var(--ease);
}

#navbar.scrolled .nav-toggle span {
    background: var(--text);
}

.nav-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* === HERO === */
.hero {
    min-height: 42vh;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Iframe de YouTube escalado para cubrir el hero */
.hero-video-wrapper {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-video-wrapper iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Truco para cubrir sin barras negras: el vídeo 16:9 debe ser
       al menos tan ancho como el contenedor y tan alto como el contenedor */
    width: 177.78vh;   /* 16/9 × 100vh */
    height: 56.25vw;   /* 9/16 × 100vw */
    min-width: 100%;
    min-height: 100%;
}

/* Oscurecido elegante sobre el vídeo */
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.83) 0%,
        rgba(0, 0, 0, 0.88) 60%,
        rgba(0, 0, 0, 0.95) 100%
    );
}

.hero-content {
    text-align: center;
    color: var(--text-light);
    padding: 0 2rem 2rem;
    margin-top: 0;
    position: relative;
    z-index: 2;
    animation: heroIn 1.2s var(--ease) both;
}

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

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 2rem;
}

.hero-tag::before,
.hero-tag::after {
    content: '';
    display: block;
    width: 2.5rem;
    height: 1px;
    background: rgba(255, 255, 255, 0.25);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(5rem, 14vw, 12rem);
    font-weight: 300;
    letter-spacing: -0.03em;
    line-height: 0.88;
    margin-bottom: 1.75rem;
    color: var(--text-light);
}

.hero-title-small {
    display: inline-block;
    font-size: 0.38em;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.5rem;
    padding-left: 0.6em;
}

.hero-title em {
    font-style: italic;
    font-weight: 300;
}

.hero-subtitle {
    font-size: 0.82rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 3.5rem;
}

.hero-scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 3.5rem;
    background: linear-gradient(to bottom, rgba(255,255,255,0.3), transparent);
    animation: scrollPulse 2.2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1); transform-origin: top; }
    50%       { opacity: 0.9; transform: scaleY(0.55); transform-origin: top; }
}

/* === BUTTONS === */
.btn-primary {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    background: var(--text-light);
    color: var(--bg-dark);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: background 0.25s var(--ease), transform 0.25s var(--ease);
    cursor: pointer;
    border: none;
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: translateY(-2px);
}

.contact-form .btn-primary {
    align-self: flex-start;
}

.btn-outline {
    display: inline-block;
    padding: 0.5rem 1.3rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--text-light);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
    white-space: nowrap;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.5);
}

/* === ABOUT === */
.section-intro {
    max-width: 680px;
    margin-bottom: 4.5rem;
}

.musicians-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.musician-photo {
    width: 100%;
    aspect-ratio: 3/4;
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.musician-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.musician-instrument {
    display: block;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.musician-info p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-top: 0.5rem;
}

/* === CONCERTS === */
.section--dark h2 {
    color: var(--text-light);
}

.concerts-list {
    margin-top: 3.5rem;
    border-top: 1px solid rgba(255,255,255,0.09);
}

.concert-item {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 2rem;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.09);
    transition: padding 0.25s var(--ease), background 0.25s var(--ease);
}

.concert-item:hover {
    background: rgba(255,255,255,0.03);
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    margin: 0 -1.25rem;
}

.concert-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-shrink: 0;
}

.date-day {
    font-family: var(--font-display);
    font-size: 2.75rem;
    font-weight: 300;
    line-height: 1;
    color: var(--text-light);
}

.date-month {
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin-top: 0.1rem;
}

.concert-info h3 {
    font-size: 1.45rem;
    font-weight: 400;
    color: var(--text-light);
    margin-bottom: 0.3rem;
}

.concert-venue {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.45);
}

.concert-program {
    font-size: 0.8rem;
    font-family: var(--font-display);
    font-style: italic;
    color: rgba(255,255,255,0.3);
    margin-top: 0.3rem;
}

.concert-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.8rem;
    flex-shrink: 0;
}

.concert-time {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.38);
    letter-spacing: 0.04em;
}

/* === GALLERY === */
.gallery-video {
    display: flex;
    justify-content: center;
    margin-top: 3.5rem;
}

.gallery-video-frame {
    position: relative;
    width: 100%;
    max-width: 820px;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.gallery-video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 3.5rem;
    padding-top: 3.5rem;
    border-top: 1px solid var(--border);
}

/* La 7ª foto ocupa el ancho de 2 columnas para centrar la fila */
.gallery-item:last-child:nth-child(3n + 1) {
    grid-column: 1 / -1;
    aspect-ratio: 16/5;
}

.gallery-item {
    cursor: pointer;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s var(--ease), filter 0.4s var(--ease);
}

.gallery-item:hover img {
    transform: scale(1.04);
    filter: brightness(0.88);
}

/* === CONTACT === */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: start;
}

.contact-info h2 {
    color: var(--text-light);
}

.contact-info > p {
    color: rgba(255,255,255,0.55);
    margin-bottom: 3rem;
    line-height: 1.85;
    font-size: 0.95rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-detail {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.detail-label {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
}

.contact-detail a {
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
    transition: color 0.25s var(--ease);
}

.contact-detail a:hover {
    color: var(--text-light);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 3rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.18);
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.25s var(--ease);
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255,255,255,0.28);
}

.form-group input:focus,
.form-group textarea:focus {
    border-bottom-color: rgba(255,255,255,0.65);
}

.form-note {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.45);
    min-height: 1.2em;
}

/* === FOOTER === */
.footer {
    background: var(--bg-dark);
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-light);
}

.footer p {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.25);
}

/* Si el logo y los links del footer están comentados, centra el copyright */
.footer-content p:only-child {
    margin: 0 auto;
}

.footer-links {
    display: flex;
    gap: 1.75rem;
}

.footer-links a {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    transition: color 0.25s var(--ease);
}

.footer-links a:hover {
    color: rgba(255,255,255,0.7);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .musicians-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem 2rem;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: fixed;
        inset: var(--nav-height) 0 0 0;
        background: var(--bg-dark);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2.5rem;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-menu a {
        font-size: 1.1rem;
        color: rgba(255,255,255,0.75);
    }

    .section {
        padding: 5rem 0;
    }

    .concert-item {
        grid-template-columns: 56px 1fr;
        grid-template-rows: auto auto;
        row-gap: 0.75rem;
    }

    .concert-action {
        grid-column: 2;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

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

    .gallery-item:last-child:nth-child(3n + 1) {
        grid-column: span 2;
        aspect-ratio: 4/3;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }
}

@media (max-width: 540px) {
    .container {
        padding: 0 1.25rem;
    }

    .musicians-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .concert-item {
        grid-template-columns: 1fr;
    }

    .concert-date {
        flex-direction: row;
        align-items: baseline;
        gap: 0.5rem;
    }

    .date-day {
        font-size: 1.75rem;
    }

    .concert-action {
        grid-column: 1;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* === LIGHTBOX === */
/* === CONCERT MODAL === */
.concert-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
}

.concert-modal.open {
    opacity: 1;
    pointer-events: all;
}

.concert-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    cursor: pointer;
}

.concert-modal-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-dark);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 3rem;
    color: var(--text-light);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s var(--ease);
}

.concert-modal.open .concert-modal-content {
    transform: scale(1) translateY(0);
}

.concert-modal-content h3 {
    font-size: 1.9rem;
    font-weight: 400;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.concert-modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    z-index: 2;
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.concert-modal-close:hover {
    color: #fff;
    transform: rotate(90deg);
}

.concert-modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.concert-modal-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.concert-modal-row .detail-label {
    display: block;
    margin-bottom: 0.35rem;
}

.concert-modal-row p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.6;
}

.concert-modal-details .btn-primary {
    align-self: flex-start;
    margin-top: 0.5rem;
}

.concert-modal-map {
    min-height: 220px;
}

.concert-modal-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 220px;
    border: 0;
    filter: grayscale(0.25) contrast(1.05);
}

@media (max-width: 640px) {
    .concert-modal-content {
        padding: 2.25rem 1.5rem;
    }

    .concert-modal-body {
        grid-template-columns: 1fr;
    }

    .concert-modal-map {
        order: -1;
        height: 200px;
    }
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
}

.lightbox.open {
    opacity: 1;
    pointer-events: all;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    cursor: zoom-out;
}

.lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    transform: scale(0.93);
    transition: transform 0.3s var(--ease);
}

.lightbox.open .lightbox-content {
    transform: scale(1);
}

.lightbox-content img {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}

.lightbox-close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    z-index: 2;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s var(--ease), transform 0.2s var(--ease);
    padding: 0.25rem 0.5rem;
}

.lightbox-close:hover {
    color: #fff;
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.8);
    font-size: 1.25rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.18);
    color: #fff;
}

.lightbox-prev:disabled,
.lightbox-next:disabled {
    opacity: 0.2;
    cursor: default;
}
