/* ==== TIPOGRAFÍAS PROPIAS ==== */

@font-face {
    font-family: "Barlow Condensed";
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url("../fonts/barlow-condensed-300.woff2") format("woff2");
}

@font-face {
    font-family: "Barlow Condensed";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/barlow-condensed-400.woff2") format("woff2");
}

@font-face {
    font-family: "Barlow Condensed";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/barlow-condensed-500.woff2") format("woff2");
}

@font-face {
    font-family: "Barlow";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/barlow-400.woff2") format("woff2");
}

@font-face {
    font-family: "Barlow";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/barlow-500.woff2") format("woff2");
}

@font-face {
    font-family: "Barlow";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/barlow-600.woff2") format("woff2");
}

/* Reservas con métrica ajustada: el texto no salta al cambiar de fuente */
@font-face {
    font-family: "Barlow Condensed Fallback";
    src: local("Arial");
    size-adjust: 76.87%;
}

@font-face {
    font-family: "Barlow Fallback";
    src: local("Arial");
    size-adjust: 97.2%;
}

/* ==== VARIABLES DE LA MARCA ==== */

:root {
    --mj-fondo: #F3F4F7;
    --mj-superficie: #FFFFFF;
    --mj-hilo: #D5D9E0;
    --mj-hilo-suave: #E6E8EE;
    --mj-texto: #1B1E24;
    --mj-texto-suave: #5A606B;
    --mj-escena: #1E2229;
    --mj-escena-media: #2B3039;
    --mj-escena-texto: #EEF0F4;
    --mj-escena-suave: #A7ADB8;
    --mj-sombra-dura: #1B1E24;
    --mj-frambuesa: #C81F63;
    --mj-frambuesa-honda: #A3194F;
    --mj-aviso-fondo: #FBEFF4;

    --mj-letra-titulos: "Barlow Condensed", "Barlow Condensed Fallback", "Arial Narrow", sans-serif;
    --mj-letra-texto: "Barlow", "Barlow Fallback", Arial, sans-serif;

    --mj-desplazamiento: 6px;
    --mj-radio: 3px;
    --mj-ancho-maximo: 1240px;
    --mj-margen-lateral: 20px;
    --mj-alto-franja: 0px;
    --mj-alto-cabecera: 92px;
    --mj-sombra-suave: 0 10px 28px rgba(27, 30, 36, 0.08), 0 2px 6px rgba(27, 30, 36, 0.06);
    --mj-grano: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .075 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

@media (min-width: 700px) {
    :root {
        --mj-margen-lateral: 32px;
    }
}

@media (min-width: 1100px) {
    :root {
        --mj-alto-cabecera: 110px;
    }
}

/* ==== REINICIO ==== */

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

html {
    scroll-padding-top: calc(var(--mj-alto-cabecera) + 16px);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding-bottom: var(--mj-alto-franja);

    font-family: var(--mj-letra-texto);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--mj-texto);

    background: var(--mj-fondo);
}

img,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

html [hidden] {
    display: none;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote,
dl,
dd {
    margin: 0;
}

ul,
ol {
    padding: 0;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

address {
    font-style: normal;
}

table {
    border-collapse: collapse;
}

/* ==== TEXTO ==== */

h1,
h2,
h3 {
    font-family: var(--mj-letra-titulos);
    font-weight: 300;
    line-height: 1.05;
    color: var(--mj-texto);
}

h1 {
    font-size: clamp(2.6rem, 6vw, 4.4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3.1rem);
}

h3 {
    font-size: clamp(1.45rem, 2.2vw, 1.8rem);
    font-weight: 400;
}

p + p {
    margin-top: 0.9em;
}

a {
    color: var(--mj-frambuesa);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover,
a:focus-visible {
    color: var(--mj-frambuesa-honda);
}

strong {
    font-weight: 600;
}

:focus-visible {
    outline: 3px solid var(--mj-frambuesa);
    outline-offset: 3px;
}

.etiqueta-menor {
    font-family: var(--mj-letra-texto);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mj-texto-suave);
}

.texto-entrada {
    max-width: 62ch;

    font-size: 1.16rem;
    line-height: 1.55;
    color: var(--mj-texto-suave);
}

.solo-lectores {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;

    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ==== CONTENEDOR ==== */

.contenedor {
    width: 100%;
    max-width: calc(var(--mj-ancho-maximo) + var(--mj-margen-lateral) * 2);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--mj-margen-lateral);
    padding-right: var(--mj-margen-lateral);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .panel-cesta,
    .navegacion-principal,
    .cartel-fila-cuerpo,
    .franja-consentimiento {
        transition: none;
    }
}
