/* ===== Fuentes ===== */
@font-face {
    font-family: "Cormorant Garamond";
    src: url("fonts/CormorantGaramond-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Cormorant Garamond";
    src: url("fonts/CormorantGaramond-Italic.ttf") format("truetype");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Cormorant Garamond";
    src: url("fonts/CormorantGaramond-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Montserrat";
    src: url("fonts/Montserrat-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ===== Base y tipografía ===== */
:root {
    --azul: #012442;
    --dorado: #c18725;
    --crema: #faf6ee;
    --borde-dorado: rgba(193, 135, 37, 0.35);
    --fuente-texto: "Montserrat", Arial, sans-serif;
    --fuente-titulo: "Cormorant Garamond", Georgia, serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: var(--crema);
    color: var(--azul);
    font-family: var(--fuente-texto);
    font-weight: 400;
}

a {
    color: inherit;
}

a:focus-visible {
    outline: 2px solid var(--azul);
    outline-offset: 5px;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

section {
    scroll-margin-top: 24px;
}

h1,
h2,
h3,
.etiqueta-seccion {
    font-family: var(--fuente-titulo);
    font-weight: 400;
}

h2 {
    margin: 0 0 24px;
    font-size: clamp(32px, 4vw, 48px);
}

/* ===== Contenedores compartidos ===== */
.encabezado,
.hero-contenido,
#sobre-mi,
#barras,
#contacto {
    width: min(1200px, 90%);
    margin: 0 auto;
}

/* ===== Encabezado ===== */
.encabezado {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 10;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    padding: 24px 0;
}

.logo {
    width: 300px;
    flex-shrink: 0;
}

.encabezado nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 32px;
}

.encabezado nav a {
    padding: 8px 0;
    border-bottom: 1px solid transparent;
    text-decoration: none;
    font-family: var(--fuente-titulo);
    font-size: 21px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.encabezado nav a:hover {
    border-bottom-color: var(--dorado);
}

/* ===== Inicio ===== */
.hero {
    display: block;
    width: 100%;
    margin: 0;
    min-height: clamp(700px, 50vw, 960px);
    padding: 190px 0 160px;
    background-image:
        linear-gradient(
            to right,
            rgba(250, 246, 238, 0.85) 0%,
            rgba(250, 246, 238, 0.65) 35%,
            rgba(250, 246, 238, 0) 65%
        ),
        url("img/Fondo-Hero.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center bottom;
}

.hero h1 {
    margin: 0 0 28px;
    font-size: clamp(44px, 6vw, 80px);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.hero p {
    margin: 0 0 32px;
    font-size: clamp(18px, 1.6vw, 23px);
    line-height: 1.5;
}

/* ===== Botones ===== */
.boton {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 14px 30px;
    border: 1px solid var(--azul);
    border-radius: 30px;
    background-color: var(--azul);
    color: white;
    text-decoration: none;
    font-family: var(--fuente-texto);
    font-size: 16px;
    transition: background-color 0.2s, color 0.2s;
}

.boton:hover {
    background-color: var(--crema);
    color: var(--azul);
}

.boton-contorno {
    background-color: transparent;
    color: var(--azul);
}

.boton-contorno:hover {
    background-color: var(--azul);
    color: var(--crema);
}

/* ===== Etiquetas y textos de sección ===== */
.etiqueta-seccion {
    display: block;
    margin-bottom: 24px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.25em;
}

.etiqueta-seccion::after {
    content: "";
    display: block;
    width: 90px;
    height: 1px;
    margin-top: 18px;
    background-color: var(--dorado);
}

.sobre-mi-contenido p,
.barras-contenido > p,
.contacto-descripcion {
    font-size: 18px;
    line-height: 1.7;
}

.sobre-mi-contenido .firma,
.barras-contenido .barras-frase {
    margin: 32px 0 0;
    color: var(--dorado);
    font-family: var(--fuente-titulo);
    font-weight: 400;
    font-style: italic;
}

/* ===== Sobre mí ===== */
#sobre-mi {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
    gap: clamp(32px, 6vw, 80px);
    padding: 48px 0 80px;
}

.sobre-mi-foto img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
    border-radius: 24px;
}

.sobre-mi-contenido p {
    max-width: 48ch;
    margin: 0 0 22px;
}

.sobre-mi-contenido .firma {
    font-size: 28px;
    line-height: 1.4;
}

/* ===== Barras de Access ===== */
#barras {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    align-items: center;
    gap: clamp(32px, 5vw, 72px);
    padding: 64px 0 80px;
}

.barras-contenido,
.barras-foto {
    min-width: 0;
}

.barras-contenido > p {
    max-width: 32ch;
    margin: 0 0 28px;
}

.barras-contenido .barras-frase {
    font-size: 25px;
    line-height: 1.5;
}

.barras-foto {
    width: 100%;
    max-width: 420px;
    justify-self: center;
    align-self: start;
}

.barras-foto img {
    width: 100%;
    height: auto;
    border-radius: 24px;
}

/* ===== Explicación desplegable ===== */
.barras-desplegable {
    margin: 0 0 28px;
    border-top: 1px solid var(--borde-dorado);
    border-bottom: 1px solid var(--borde-dorado);
}

.barras-desplegable summary {
    padding: 18px 0;
    color: var(--azul);
    font-size: 20px;
    line-height: 1.4;
    cursor: pointer;
}

.barras-desplegable summary::marker {
    color: var(--dorado);
}

.barras-desplegable summary:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.barras-desplegable summary:focus-visible {
    outline: 2px solid var(--azul);
    outline-offset: 4px;
}

.barras-explicacion {
    padding: 4px 0 20px;
}

.barras-explicacion p {
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.8;
}

.barras-explicacion p:last-child {
    margin-bottom: 0;
}

/* ===== Precios ===== */
.barras-precios {
    width: 100%;
    max-width: 360px;
    margin-bottom: 28px;
}

.precio-fila {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid var(--borde-dorado);
    font-size: 18px;
}

.precio-fila strong {
    font-size: 22px;
    font-weight: 400;
    white-space: nowrap;
}

.precio-aclaracion {
    margin: 12px 0 0;
    font-family: var(--fuente-texto);
    font-size: 13px;
    line-height: 1.5;
}

/* ===== Contacto ===== */
#contacto {
    padding: 72px 0 80px;
    text-align: center;
}

#contacto .etiqueta-seccion::after {
    margin-left: auto;
    margin-right: auto;
}

.contacto-descripcion {
    max-width: 48ch;
    margin: 0 auto 32px;
}

.contacto-acciones {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

/* ===== Pie de página y redes ===== */
footer {
    padding: 32px 5%;
    text-align: center;
    font-size: 14px;
}

.pie-pagina {
    padding: 32px 5% 40px;
    text-align: center;
}

.pie-pagina > p {
    margin: 0 0 20px;
    line-height: 1.5;
}

.redes-sociales {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 24px;
}

.redes-sociales a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px;
    color: var(--azul);
    text-decoration: none;
    font-family: var(--fuente-texto);
    font-size: 14px;
}

.redes-sociales svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.redes-sociales a:hover span {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ===== Celular: hasta 700 px ===== */
@media (max-width: 700px) {
    .encabezado {
        flex-direction: column;
        padding: 20px 0;
        gap: 16px;
    }

    .logo {
        width: 220px;
    }

    .encabezado nav {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        justify-content: center;
        gap: 4px 20px;
        width: 100%;
        max-width: 340px;
        text-align: center;
    }

    .encabezado nav a {
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 44px;
        font-size: 19px;
    }

    .hero {
        min-height: 680px;
        padding: 230px 0 110px;
        background-image:
            linear-gradient(
                to bottom,
                rgba(250, 246, 238, 0.9) 0%,
                rgba(250, 246, 238, 0.85) 55%,
                rgba(250, 246, 238, 0) 80%
            ),
            url("img/Fondo-Hero.png");
        background-position: center, 35% bottom;
    }

    .hero h1 {
        font-size: clamp(36px, 8vw, 52px);
        margin-bottom: 24px;
    }

    .hero p {
        margin-bottom: 28px;
    }

    .hero p br,
    .barras-frase br {
        display: none;
    }

    #sobre-mi {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 40px 0 32px;
    }

    .sobre-mi-foto {
        width: 100%;
        max-width: 420px;
        margin: 0 auto;
    }

    .sobre-mi-contenido .firma {
        font-size: 26px;
    }

    #barras {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 32px 0 64px;
    }

    .barras-contenido .barras-frase {
        font-size: 23px;
    }

    .barras-foto {
        max-width: 340px;
    }

    #contacto {
        padding: 48px 0 64px;
    }

    .contacto-acciones {
        flex-direction: column;
        align-items: center;
    }

    .contacto-acciones .boton {
        width: 100%;
        max-width: 320px;
    }
}

/* ===== Preferencias de movimiento ===== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .boton {
        transition: none;
    }
}

.pie-pagina .credito-desarrollador {
    margin: 24px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--azul);
}

.credito-desarrollador a {
    display: inline-block;
    padding: 8px 0;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.credito-desarrollador a:hover {
    text-decoration-thickness: 2px;
}

/* Grupo de preguntas de Barras de Access */
.barras-preguntas {
    margin-bottom: 28px;
}

.barras-preguntas .barras-desplegable {
    margin: 0;
    border-top: 0;
}

.barras-preguntas .barras-desplegable:first-child {
    border-top: 1px solid var(--borde-dorado);
}

.barras-invitacion {
    margin: 24px 0 16px;
    color: var(--dorado);
    font-family: var(--fuente-titulo);
    font-size: 26px;
    font-style: italic;
    line-height: 1.4;
}

.barras-aclaracion {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
}