/* =============================================================
   ESTILOS DEL SITIO
   Colores y tipografías principales en :root
   ============================================================= */

:root {
    --fondo: #0b0b0b;
    --fondo-2: #161616;
    --texto: #ececec;
    --texto-suave: #8f8f8f;
    --linea: #262626;
    --titulos: 'Cormorant Garamond', Georgia, serif;
    --cuerpo: 'Inter', system-ui, sans-serif;
    --margen: clamp(1rem, 4vw, 3rem);
}

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

body {
    background: var(--fondo);
    color: var(--texto);
    font-family: var(--cuerpo);
    font-weight: 300;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- Encabezado y menú ---------- */

.encabezado {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem var(--margen);
    background: rgba(11, 11, 11, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--linea);
}

.logo {
    font-family: var(--titulos);
    font-size: 1.5rem;
    letter-spacing: 0.04em;
}
.logo img { height: 48px; width: auto; }

.menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.menu a, .submenu > span {
    color: var(--texto-suave);
    transition: color 0.2s;
    cursor: pointer;
}
.menu a:hover, .submenu:hover > span, .menu .activo { color: var(--texto); }

.submenu { position: relative; }
.submenu-lista {
    position: absolute;
    top: 100%;
    left: -1rem;
    display: none;
    flex-direction: column;
    gap: 0.8rem;
    min-width: 240px;
    padding: 1.2rem 1rem 1rem;
    background: var(--fondo-2);
    border: 1px solid var(--linea);
}
.submenu:hover .submenu-lista,
.submenu:focus-within .submenu-lista { display: flex; }

.icono-instagram { display: flex; }

.boton-menu {
    display: none;
    width: 32px;
    height: 32px;
    background: none;
    border: 0;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
}
.boton-menu span { display: block; height: 1px; background: var(--texto); transition: transform 0.3s; }
.menu-abierto .boton-menu span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-abierto .boton-menu span:last-child  { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Portada de inicio ---------- */

.portada {
    position: relative;
    height: 88vh;
    min-height: 420px;
    display: flex;
    align-items: flex-end;
    padding: var(--margen);
    background: var(--fondo-2) center 30% / cover no-repeat;
}
.portada::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0) 60%);
}
.portada-texto { position: relative; }
.portada h1 {
    font-family: var(--titulos);
    font-weight: 400;
    font-size: clamp(2.8rem, 8vw, 6.5rem);
    line-height: 1;
}
.portada p {
    margin-top: 0.8rem;
    color: #cfcfcf;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* ---------- Contenido general ---------- */

.contenido { padding: 3rem var(--margen) 5rem; }

.titulo-pagina {
    font-family: var(--titulos);
    font-weight: 400;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    line-height: 1.1;
    margin-bottom: 2rem;
}
.titulo-seccion {
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--texto-suave);
    margin-bottom: 1.5rem;
}

.vacio { color: var(--texto-suave); }
.vacio-pagina { text-align: center; padding-top: 8rem; padding-bottom: 8rem; }

.boton {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border: 1px solid var(--texto);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: background 0.2s, color 0.2s;
}
.boton:hover { background: var(--texto); color: var(--fondo); }

/* ---------- Tarjetas de sesiones ---------- */

.tarjetas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem 1.5rem;
}

.tarjeta-imagen {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--fondo-2);
}
.tarjeta-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease, opacity 0.3s;
}
.tarjeta:hover .tarjeta-imagen img { transform: scale(1.04); }

.etiqueta-video {
    position: absolute;
    right: 0.8rem;
    bottom: 0.8rem;
    width: 2.4rem;
    height: 2.4rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    font-size: 0.8rem;
}

.tarjeta-texto { padding-top: 0.9rem; }
.tarjeta-texto h3 {
    font-family: var(--titulos);
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1.2;
}
.tarjeta-categoria, .tarjeta-fecha {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--texto-suave);
}

/* ---------- Página de sesión ---------- */

.volver {
    display: inline-block;
    margin-bottom: 1.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--texto-suave);
}
.volver:hover { color: var(--texto); }

.sesion-encabezado { max-width: 760px; margin-bottom: 2.5rem; }
.sesion-encabezado .titulo-pagina { margin-bottom: 0.6rem; }
.sesion-datos { display: flex; gap: 1.5rem; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--texto-suave); }
.sesion-descripcion { margin-top: 1.2rem; color: #c4c4c4; }

/* Galería tipo "mosaico": respeta el formato vertical/horizontal de cada foto */
.galeria { columns: 3 320px; column-gap: 1rem; }
.galeria-foto { display: block; margin-bottom: 1rem; break-inside: avoid; cursor: zoom-in; background: var(--fondo-2); }
.galeria-foto img { width: 100%; height: auto; transition: opacity 0.3s; }
.galeria-foto:hover img { opacity: 0.85; }

/* Los videos horizontales ocupan todo el ancho; los verticales (reels) se acomodan lado a lado */
.videos { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 2rem; }
.video {
    position: relative;
    flex: 1 1 100%;
    aspect-ratio: 16 / 9;
    max-width: 1200px;
    background: #000;
}
.video-vertical { flex: 0 1 320px; aspect-ratio: 9 / 16; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Visor a pantalla completa ---------- */

.visor {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #050505;
}
.visor[hidden] { display: none; }
.visor img { max-width: 92vw; max-height: 90vh; object-fit: contain; user-select: none; }
.visor button {
    position: absolute;
    background: none;
    border: 0;
    color: var(--texto);
    font-size: 2.6rem;
    font-weight: 200;
    cursor: pointer;
    padding: 1rem;
    opacity: 0.7;
}
.visor button:hover { opacity: 1; }
.visor-cerrar { top: 0.5rem; right: 1rem; }
.visor-anterior { left: 0.5rem; }
.visor-siguiente { right: 0.5rem; }
.visor-contador {
    position: absolute;
    bottom: 1.2rem;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--texto-suave);
}

/* ---------- Sobre mí ---------- */

.sobre-mi {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 4rem;
    align-items: start;
    max-width: 1200px;
}
.sobre-mi-texto p { margin-bottom: 1rem; color: #c4c4c4; max-width: 60ch; }
.sobre-mi-texto .titulo-seccion { margin-top: 3rem; }
.botones-contacto { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- Pie ---------- */

.pie {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 2rem var(--margen);
    border-top: 1px solid var(--linea);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--texto-suave);
}
.pie-enlaces { display: flex; gap: 1.5rem; }
.pie-enlaces a:hover { color: var(--texto); }

/* ---------- Celular ---------- */

@media (max-width: 900px) {
    .boton-menu { display: flex; }

    /* backdrop-filter impediría que el menú cubra toda la pantalla */
    .encabezado { backdrop-filter: none; background: var(--fondo); }

    .menu {
        position: fixed;
        inset: 0;
        top: 0;
        z-index: -1;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.4rem;
        padding: 6rem var(--margen) 2rem;
        background: var(--fondo);
        overflow-y: auto;
        font-size: 0.95rem;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
    }
    .menu-abierto .menu { opacity: 1; visibility: visible; }

    .submenu-lista {
        position: static;
        display: flex;
        min-width: 0;
        padding: 0.8rem 0 0 1rem;
        background: none;
        border: 0;
        text-transform: none;
        letter-spacing: 0.04em;
    }
    .submenu > span { color: var(--texto); }

    .sobre-mi { grid-template-columns: 1fr; gap: 2rem; }
    .galeria { columns: 2 160px; column-gap: 0.5rem; }
    .galeria-foto { margin-bottom: 0.5rem; }
}
