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

:root {
    --black: #0a0a0a;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --gray-mid: #888;
    --gray-dark: #333;
    --serif: 'Cormorant Garamond', serif;
    --sans: 'Inter', sans-serif;
    --ease: cubic-bezier(.16, 1, .3, 1);
}

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

body {
    font-family: var(--sans);
    background: var(--white);
    color: var(--black);
    line-height: 1.6;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* NAV */
nav.main-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color .4s;
}
nav.main-nav.scrolled { border-bottom-color: rgba(0,0,0,.06); }

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.nav-logo {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: .05em;
    cursor: pointer;
    color: var(--black);
    text-decoration: none;
    transition: opacity .3s;
}
.nav-logo:hover { opacity: .7; }

.nav-menu {
    display: flex;
    gap: 2.2rem;
    list-style: none;
    font-size: .82rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight: 400;
}
.nav-menu li { position: relative; }
.nav-menu a, .nav-menu span.has-sub {
    color: var(--black);
    text-decoration: none;
    cursor: pointer;
    transition: opacity .3s;
    display: inline-block;
    padding: .3rem 0;
}
.nav-menu a:hover, .nav-menu span.has-sub:hover { opacity: .5; }
.nav-menu a.active { opacity: .5; }

/* SUBMENU - CORREGIDO */
.nav-menu li { position: relative; }

.submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    padding: .8rem 1rem;
    border: 1px solid rgba(0,0,0,.08);
    border-top: 8px solid transparent;   /* ← Gap visual transparente */
    background-clip: padding-box;         /* ← El fondo NO cubre el border-top */
    box-shadow: 0 8px 32px rgba(0,0,0,.08);
    list-style: none;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    z-index: 110;
}

.nav-menu li:hover > .submenu {
    opacity: 1;
    visibility: visible;
}

.submenu li { position: static; }

.submenu a {
    font-size: .78rem;
    letter-spacing: .1em;
    white-space: nowrap;
    display: block;
    padding: .4rem 0;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 28px;
    height: 20px;
    position: relative;
}
.menu-toggle span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: var(--black);
    transition: all .3s;
}
.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.menu-toggle span:nth-child(3) { bottom: 0; }
.menu-toggle.open span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

main { padding-top: 80px; }

/* HERO FULL WIDTH */
.hero {
    width: 100%;
    margin-bottom: 4rem;
}

/* HERO SLIDER */
.hero-slider {
    position: relative;
    width: 100%;
    height: 75vh;
    max-height: 900px;
    min-height: 400px;
    overflow: hidden;
    background: var(--gray-light);
}
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s var(--ease);
}
.hero-slide.active { opacity: 1; }
.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(10%);
}

.hero-text {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 2rem;
    text-align: center;
}
.hero-text h1 {
    font-family: var(--serif);
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 2.5rem;
    letter-spacing: -.01em;
}
.hero-text h1 em { font-style: italic; font-weight: 300; }
.hero-bio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    text-align: left;
    margin-top: 2rem;
}
.hero-bio-grid p {
    font-size: .95rem;
    line-height: 1.85;
}
.hero-bio-grid .bio-en {
    font-style: italic;
    color: var(--gray-mid);
    border-left: 2px solid var(--black);
    padding-left: 1.5rem;
}

/* SECTIONS */
.section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 5rem 2rem;
}
.section + .section {
    border-top: 1px solid rgba(0,0,0,.06);
}
.section-header {
    margin-bottom: 3.5rem;
    text-align: center;
}
.section-header h2 {
    font-family: var(--serif);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 400;
    letter-spacing: -.01em;
    margin-bottom: 1rem;
}
.section-header h2 em { font-style: italic; font-weight: 300; }
.section-header p {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--gray-dark);
}
.section-header .description-en {
    font-size: .9rem;
    font-style: italic;
    color: var(--gray-mid);
    margin-top: 1.5rem;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}
.section-header .edition {
    margin-top: 2rem;
    padding: 1.2rem 1.5rem;
    background: var(--gray-light);
    display: inline-block;
    font-size: .85rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    font-weight: 500;
}

/* GALLERY */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.gallery-item {
    cursor: pointer;
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/5;
    background: var(--gray-light);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.gallery-item.visible { opacity: 1; transform: translateY(0); }
.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .6s var(--ease), filter .6s;
    filter: grayscale(10%);
}
.gallery-item:hover img { transform: scale(1.04); filter: grayscale(0%); }
.gallery-item .caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 2rem 1.2rem 1.2rem;
    background: linear-gradient(to top, rgba(0,0,0,.7), transparent);
    color: var(--white);
    font-size: .9rem;
    font-weight: 300;
    letter-spacing: .02em;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .4s, transform .4s;
}
.gallery-item:hover .caption { opacity: 1; transform: translateY(0); }

/* LIGHTBOX */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(255,255,255,.98);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity .4s;
}
.lightbox.active { display: flex; opacity: 1; }
.lightbox-content { position: relative; max-width: 90vw; max-height: 90vh; }
.lightbox-content img {
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
    display: block;
}
.lightbox-caption {
    text-align: center;
    color: var(--black);
    margin-top: 1.5rem;
    font-family: var(--serif);
    font-size: 1.8rem;
    font-weight: 500;
    letter-spacing: .01em;
    line-height: 1.3;
}
.lightbox-close {
    position: absolute;
    top: 1rem; right: 1rem;
    background: none;
    border: none;
    color: var(--black);
    font-size: 2.5rem;
    cursor: pointer;
    width: 50px; height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    transition: transform .3s, opacity .3s;
    z-index: 10;
}
.lightbox-close:hover { transform: rotate(90deg); opacity: .5; }
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--black);
    font-size: 3.5rem;
    cursor: pointer;
    padding: 1rem;
    font-family: var(--serif);
    font-weight: 400;
    transition: opacity .3s;
    z-index: 10;
}
.lightbox-nav:hover { opacity: .5; }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* CONTACT */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.form-group { display: flex; flex-direction: column; gap: .5rem; }
.form-group label {
    font-size: .8rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight: 500;
}
.form-group input, .form-group textarea {
    border: none;
    border-bottom: 1px solid var(--black);
    background: transparent;
    padding: .8rem 0;
    font-family: var(--sans);
    font-size: 1rem;
    color: var(--black);
    outline: none;
    transition: border-color .3s;
}
.form-group input:focus, .form-group textarea:focus { border-bottom-color: var(--gray-mid); }
.form-group textarea { min-height: 140px; resize: vertical; font-family: var(--sans); }
.submit-btn {
    background: var(--black);
    color: var(--white);
    border: none;
    padding: 1.1rem 2.5rem;
    font-family: var(--sans);
    font-size: .85rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    cursor: pointer;
    align-self: flex-start;
    transition: background .3s, transform .3s;
    font-weight: 400;
    margin-top: 1rem;
}
.submit-btn:hover { background: var(--gray-dark); transform: translateY(-2px); }

footer {
    border-top: 1px solid rgba(0,0,0,.08);
    padding: 2.5rem 2rem;
    text-align: center;
    font-size: .82rem;
    color: var(--gray-mid);
    letter-spacing: .03em;
    line-height: 1.6;
}
footer a {
    color: var(--black);
    text-decoration: none;
    border-bottom: 1px solid var(--black);
    transition: opacity .3s;
}
footer a:hover { opacity: .5; }

.back-to-top {
    position: fixed;
    bottom: 2rem; right: 2rem;
    width: 45px; height: 45px;
    background: var(--black);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s, transform .3s;
    z-index: 50;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-3px); }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 1s var(--ease) forwards; }

/* RESPONSIVE */
@media (max-width: 900px) {
    .hero-slider { height: 55vh; }
    .hero-bio-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .section { padding: 3rem 1.5rem; }
    .section-header { margin-bottom: 2.5rem; }
    .gallery { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .8rem; }
    .gallery-item .caption {
        opacity: 1; transform: translateY(0);
        font-size: .75rem; padding: 1rem .8rem .8rem;
    }
}
@media (max-width: 768px) {
    .nav-container { padding: 1rem 1.5rem; }
    .nav-menu {
        position: fixed;
        top: 70px; left: 0; right: 0;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        padding: 0 1.5rem;
        border-bottom: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height .4s, padding .4s;
    }
    .nav-menu > li:first-child { display: none; }   /* ← NUEVA LÍNEA */
    .nav-menu.open {
        max-height: 80vh;
        overflow-y: auto;
        padding: 1.5rem 1.5rem 2.5rem;
        border-bottom: 1px solid rgba(0,0,0,.08);
    }
    .nav-menu li { padding: .6rem 0; border-bottom: 1px solid rgba(0,0,0,.05); }
    .nav-menu li:last-child { border-bottom: none; }
    .submenu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        box-shadow: none;
        border: none;
        padding: .4rem 0 .4rem 1rem;
        min-width: auto;
        background: transparent;
    }
    .menu-toggle { display: block; }
    .lightbox-nav { font-size: 2rem; padding: .5rem; }
    .lightbox-prev { left: 0; }
    .lightbox-next { right: 0; }
}
@media (max-width: 480px) {
    .gallery { grid-template-columns: repeat(2, 1fr); }
    .nav-logo { font-size: 1.1rem; }
    .hero-slider { height: 45vh; min-height: 280px; }
}