/* Fondo crema off-white perlado + rosa frambuesa */
:root {
    --fondo: #f4f1ec;
    --texto: #243247;
    --texto-suave: #596779;
    --acento: #d63a7c;
    --acento-hover: #b92e68;
    --linea: #d4cfc6;
    --fuente-display: "Cormorant Garamond", Georgia, serif;
    --fuente-ui: "Syne", sans-serif;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--fuente-ui);
    background-color: var(--fondo);
    color: var(--texto);
    min-height: 100vh;
    line-height: 1.5;
}

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

/* Marco exterior tipo galería */
.marco {
    width: min(1120px, calc(100% - 40px));
    margin: 24px auto;
    padding: 1.5rem 2rem 2rem;
    border: none; /* Marco rosa oculto para probar */
    min-height: calc(100vh - 48px);
}

/* ---------- Header ---------- */
header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    animation: entrar-arriba 0.8s ease both;
}

.logo {
    font-family: var(--fuente-ui);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1.15;
    color: var(--texto);
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 1.75rem;
    justify-content: flex-end;
}

nav a {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--texto);
    transition: color 0.25s ease;
}

nav a:hover {
    color: var(--acento);
}

/* ---------- Hero ---------- */
.hero {
    display: grid;
    /* Columna central más ancha para una imagen cuadrada grande */
    grid-template-columns: 0.75fr 1.55fr 0.7fr;
    gap: 1.25rem 1.5rem;
    align-items: end;
    margin-bottom: 1rem;
}

.hero h1 {
    position: relative;
    z-index: 2;
    font-family: var(--fuente-display);
    font-weight: 500;
    font-size: clamp(3.5rem, 7vw, 7.2rem);
    line-height: 0.88;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    color: var(--acento);
    margin-right: -22%;
    padding-bottom: 0.15em;
    animation: entrar-izquierda 0.9s 0.15s ease both;
}

.hero h1 span {
    display: block;
}

.hero-media {
    position: relative;
    z-index: 1;
    width: 100%;
    /* Solo width + aspect-ratio = cuadrado perfecto */
    aspect-ratio: 1 / 1;
    overflow: hidden;
    animation: aparecer 1s 0.25s ease both;
}

.hero-media picture {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-media img {
    transition: opacity 0.45s ease, transform 0.7s ease;
}

.hero-media.cambiando img {
    opacity: 0.35;
    transform: scale(1.03);
}

.hero-aside {
    /* Alineado con la base de la imagen */
    align-self: end;
    padding-bottom: 0.35rem;
    max-width: 15rem;
    justify-self: start;
    animation: entrar-derecha 0.9s 0.35s ease both;
}

.hero-aside p {
    font-size: 1rem;
    line-height: 1.55;
    color: var(--texto-suave);
    margin-bottom: 1.25rem;
}

.cta {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--acento);
    text-decoration: none;
    transition: color 0.25s ease, letter-spacing 0.3s ease, transform 0.3s ease;
}

.cta:hover {
    color: var(--acento-hover);
    letter-spacing: 0.22em;
    transform: translateX(4px);
}

/* ---------- Carrusel ---------- */
.carousel {
    margin-bottom: 3rem;
    animation: entrar-arriba 0.8s 0.45s ease both;
}

.carousel-controles {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.carousel-btn {
    font-size: 1.1rem;
    line-height: 1;
    padding: 0.25rem;
    color: var(--texto);
    transition: color 0.2s ease, transform 0.2s ease;
}

.carousel-btn:hover {
    color: var(--acento);
    transform: scale(1.15);
}

.carousel-progreso {
    height: 1px;
    background-color: var(--linea);
    position: relative;
    overflow: hidden;
}

.carousel-progreso-barra {
    position: absolute;
    top: 50%;
    left: 0;
    height: 2px;
    width: 20%;
    background-color: var(--acento);
    transform: translateY(-50%);
    transition: left 0.4s ease, width 0.4s ease;
}

.carousel-contador {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--texto-suave);
    white-space: nowrap;
}

.carousel-pista {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
    overflow: hidden;
}

.obra {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.obra:hover,
.obra.activa {
    opacity: 1;
}

/* Sin borde rosa en miniaturas: solo opacidad y un leve zoom */
.obra.activa {
    transform: translateY(-2px);
}

.obra picture {
    display: block;
    width: 100%;
    height: 100%;
}

.obra img {
    transition: transform 0.5s ease;
}

.obra:hover img {
    transform: scale(1.04);
}

/* Miniaturas fuera de la ventana visible del carrusel */
.obra.oculta {
    display: none;
}

.obra[hidden] {
    display: none !important;
}

/* ---------- Obras (galería) ---------- */
.obras-seccion {
    margin: 1rem 0 0;
    padding-top: 0.75rem;
    scroll-margin-top: 1.5rem;
}

.obras-cabecera {
    margin-bottom: 1.5rem;
}

.obras-cabecera h2 {
    font-family: var(--fuente-display);
    font-weight: 500;
    font-size: clamp(2rem, 4vw, 2.75rem);
    letter-spacing: -0.02em;
    color: var(--acento);
}

/* ---------- Sobre mí ---------- */
.sobre {
    margin: 3.5rem 0 0;
    padding: 3rem 0 1rem;
    border-top: 1px solid var(--linea);
    display: grid;
    grid-template-columns: 0.8fr 1.4fr;
    gap: 2rem 3rem;
    align-items: start;
    /* Al pulsar "Sobre mí" en el menú, deja margen arriba */
    scroll-margin-top: 1.5rem;
}

.sobre-intro h2 {
    font-family: var(--fuente-display);
    font-weight: 500;
    font-size: clamp(2.4rem, 5vw, 3.25rem);
    letter-spacing: -0.02em;
    color: var(--acento);
    line-height: 1;
}

.sobre-contenido {
    max-width: 36rem;
}

.sobre-contenido p {
    color: var(--texto);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.1rem;
}

.sobre-contenido p:last-child {
    margin-bottom: 0;
    color: var(--texto-suave);
}

@media (max-width: 700px) {
    .sobre {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* ---------- Contacto ---------- */
.contacto {
    margin: 3rem 0 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--linea);
    scroll-margin-top: 1.5rem;
}

.contacto-intro {
    margin-bottom: 1.75rem;
    max-width: 28rem;
}

.contacto-intro h2 {
    font-family: var(--fuente-display);
    font-weight: 500;
    font-size: clamp(2rem, 4vw, 2.75rem);
    letter-spacing: -0.02em;
    color: var(--acento);
    margin-bottom: 0.5rem;
}

.contacto-intro p {
    color: var(--texto-suave);
    font-size: 0.95rem;
    line-height: 1.55;
}

.contacto-ok {
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--acento);
    color: var(--texto);
    font-size: 0.9rem;
}

.contacto-error {
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    border: 1px solid #b92e68;
    color: #8a1f4a;
    font-size: 0.9rem;
}

.obligatorio {
    color: var(--acento);
}

.contacto-form {
    display: grid;
    gap: 1.15rem;
    max-width: 36rem;
}

.campo {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.campo label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--texto);
}

.campo input,
.campo textarea {
    font: inherit;
    color: var(--texto);
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--linea);
    padding: 0.65rem 0;
    outline: none;
    resize: vertical;
    transition: border-color 0.25s ease;
}

.campo input::placeholder,
.campo textarea::placeholder {
    color: #9aa3ad;
}

.campo input:focus,
.campo textarea:focus {
    border-bottom-color: var(--acento);
}

.campo-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    max-width: 36rem;
}

.campo-check input[type="checkbox"] {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    margin-top: 0.2rem;
    accent-color: var(--acento);
    cursor: pointer;
}

.campo-check label {
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--texto-suave);
    cursor: pointer;
}

.campo-check a {
    color: var(--acento);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.campo-check a:hover {
    color: var(--acento-hover);
}

/* Campo trampa para bots: oculto fuera de pantalla */
.campo-honeypot {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.campo-ayuda {
    margin-top: 0.35rem;
    font-size: 0.72rem;
    color: var(--texto-suave);
    letter-spacing: 0.04em;
}

.contacto-enviar {
    justify-self: start;
    margin-top: 0.5rem;
    padding: 0.85rem 1.5rem;
    border: 1px solid var(--acento);
    color: var(--acento);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.contacto-enviar:hover {
    background-color: var(--acento);
    color: var(--fondo);
}

/* ---------- Footer ---------- */
footer {
    border-top: 1px solid var(--linea);
    padding-top: 2rem;
}

.footer-arriba {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.footer-logo {
    font-family: var(--fuente-ui);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1.15;
    color: var(--texto);
}

.footer-social {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
}

.footer-social a {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--texto-suave);
    transition: color 0.2s ease;
}

.footer-social a:hover {
    color: var(--acento);
}

.footer-abajo {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 1.25rem;
    border-top: 1px solid var(--linea);
    font-size: 0.72rem;
    color: var(--texto-suave);
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.footer-legal a:hover {
    color: var(--acento);
}

/* ---------- Página legal (Privacy & Terms) ---------- */
.legal {
    max-width: 42rem;
    margin: 0 auto 3rem;
    padding-top: 0.5rem;
}

.legal-fecha {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--texto-suave);
    margin-bottom: 0.75rem;
}

.legal h1 {
    font-family: var(--fuente-display);
    font-weight: 500;
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: -0.02em;
    color: var(--acento);
    line-height: 1.1;
    margin-bottom: 2.5rem;
}

.legal section {
    margin-bottom: 3rem;
    scroll-margin-top: 1.5rem;
}

.legal h2 {
    font-family: var(--fuente-display);
    font-weight: 500;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    color: var(--texto);
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--linea);
}

.legal h3 {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--texto);
    margin: 1.75rem 0 0.6rem;
}

.legal p {
    color: var(--texto-suave);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0.85rem;
}

.legal-contacto {
    color: var(--texto) !important;
    font-weight: 500;
}

.legal-volver {
    margin-top: 1rem;
}

.legal-volver a {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--acento);
    transition: color 0.2s ease;
}

.legal-volver a:hover {
    color: var(--acento-hover);
}

/* ---------- Animaciones ---------- */
@keyframes entrar-arriba {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes entrar-izquierda {
    from {
        opacity: 0;
        transform: translateX(-24px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes entrar-derecha {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes aparecer {
    from {
        opacity: 0;
        transform: scale(0.97);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    /* Sin forzar altura de pantalla: evita el hueco crema vacío al final */
    body {
        min-height: 0;
    }

    .marco {
        margin: 0.75rem 0.75rem 0;
        padding: 1.25rem 1.25rem 1rem;
        min-height: 0;
    }

    footer {
        padding-top: 1.5rem;
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .footer-arriba {
        flex-direction: column;
        text-align: left;
        margin-bottom: 1.25rem;
    }

    .footer-abajo {
        padding-top: 1rem;
        padding-bottom: 0;
    }

    .footer-social {
        align-items: flex-start;
    }

    .contacto {
        margin-bottom: 1.5rem;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: left;
    }

    .hero h1 {
        margin-right: 0;
        font-size: clamp(2.8rem, 14vw, 4.5rem);
        order: 1;
    }

    .hero-media {
        order: 2;
        max-width: 420px;
    }

    .hero-aside {
        order: 3;
        justify-self: start;
        max-width: none;
    }

    .carousel-pista {
        grid-template-columns: repeat(2, 1fr);
    }

    .obra.oculta {
        display: block;
    }
}

@media (max-width: 560px) {
    header {
        flex-direction: column;
    }

    nav {
        justify-content: flex-start;
        gap: 0.85rem 1.1rem;
    }

    .carousel-controles {
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "prev progreso next"
            "contador contador contador";
    }

    #btn-prev { grid-area: prev; }
    .carousel-progreso { grid-area: progreso; }
    #btn-next { grid-area: next; }
    .carousel-contador {
        grid-area: contador;
        text-align: center;
        margin-top: 0.35rem;
    }
}

/* ---------- Banner de cookies ---------- */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    padding: 1rem;
    background: rgba(36, 50, 71, 0.96);
    color: #f7f5f2;
    box-shadow: 0 -8px 24px rgba(36, 50, 71, 0.18);
}

.cookie-banner[hidden] {
    display: none;
}

.cookie-banner-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.cookie-banner p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #e8e4df;
}

.cookie-textos {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.cookie-textos p[lang="es"] {
    opacity: 0.9;
    font-size: 0.82rem;
}

.cookie-banner a {
    color: #f7a8cb;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-banner a:hover {
    color: #fff;
}

.cookie-aceptar {
    flex-shrink: 0;
    padding: 0.7rem 1.35rem;
    border: 1px solid var(--acento);
    background: var(--acento);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.cookie-aceptar:hover {
    background: var(--acento-hover);
    border-color: var(--acento-hover);
}

@media (max-width: 700px) {
    .cookie-banner-inner {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
    }

    .cookie-aceptar {
        width: 100%;
    }
}
