/* ==========================================================================
   Quesos Julián Díaz — base
   Tokens de marca, reset y tipografía editorial.

   Dirección: "La pleita" — la banda de hoja de palma que ciñe cada queso
   majorero y le deja su dibujo trenzado. El contenido no se separa con líneas
   neutras: se ciñe con bandas. Papel cálido, tinta verde, una sola serif con
   presencia y una sans de interfaz que no compite.
   ========================================================================== */

:root {
    /* Paleta de identidad */
    --verde:          #1A6427;
    --verde-claro:    #0A872D;
    --verde-oscuro:   #18311A;
    --marron:         #8A4F1D;
    --crema:          #F4F1EA;
    --carbon:         #252522;
    --blanco:         #FFFFFF;

    /* Palma seca: el color del material de la pleita. NO es un color de
       interfaz — sólo aparece en el filete trenzado de corte de capítulo. */
    --palma:          #B08B4F;

    /* Superficies y texto */
    --fondo:          #F8F5EE;
    --fondo-alt:      #F1ECE0;
    --tinta:          #24231F;
    --tinta-suave:    #6E6A5F;
    --tinta-inversa:  #F6F3EC;
    --linea:          rgba(36, 35, 31, 0.26);
    --linea-suave:    rgba(36, 35, 31, 0.11);
    --linea-inversa:  rgba(246, 243, 236, 0.25);

    /* Tipografía */
    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --font-ui:      "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Ritmo: la respiración va entre secciones, no dentro de ellas */
    --space-section: clamp(6rem, 4rem + 8vw, 12rem);
    --space-tight:   clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
    --gutter:        clamp(1.25rem, 4vw, 3.5rem);
    --container:     84rem;
    --container-narrow: 44rem;

    --radius-btn:  2px;
    --radius-pill: 999px; /* sólo el panel táctil */
    --transition: 180ms cubic-bezier(0.32, 0.72, 0.35, 1);
}

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

/* Cualquier regla de autor que fije "display" (p. ej. .btn) pesa más que
   la hoja de estilos del navegador y puede anular el [hidden] nativo. Sin
   esto, un botón oculto por JS (o[hidden] servido por PHP) puede quedar
   visible y aun así enfocable — un fallo de accesibilidad real, no
   cosmético. */
[hidden] { display: none !important; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--fondo);
    color: var(--tinta);
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.68;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, picture, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; }

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

:focus-visible {
    outline: 2px solid var(--verde);
    outline-offset: 3px;
}

::selection { background: rgba(24, 49, 26, 0.14); }

/* Tipografía editorial ---------------------------------------------------
   Fraunces en registro sobrio: sin WONK, sin SOFT. Los ejes se fijan
   explícitamente para que la serif no derive hacia lo juguetón. */
.display,
.site-footer__signature,
.index__title,
.catalog__title,
.pick__name,
.faq__question,
.detail__item-name {
    font-variation-settings: "SOFT" 0, "WONK" 0;
    font-optical-sizing: auto;
}

.display {
    font-family: var(--font-display);
    font-weight: 300;
    /* En 360–430px esto ronda 2.15–2.45rem: un titular con presencia sin
       ocupar la pantalla entera ni forzar demasiados saltos de línea. */
    font-size: clamp(2.1rem, 1rem + 5.2vw, 6.5rem);
    line-height: 1.03;
    letter-spacing: -0.022em;
    color: var(--verde-oscuro);
    text-wrap: balance;
}

.display em {
    font-style: italic;
    font-weight: 300;
    letter-spacing: -0.012em;
}

.display--md {
    font-weight: 400;
    font-size: clamp(2rem, 1.35rem + 2.6vw, 3.5rem);
    line-height: 1.06;
    letter-spacing: -0.018em;
}

.display--sm {
    font-weight: 400;
    font-size: clamp(1.45rem, 1.2rem + 1vw, 2rem);
    line-height: 1.15;
    letter-spacing: -0.012em;
}

.lead {
    font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
    line-height: 1.75;
    color: var(--tinta-suave);
    max-width: 44ch;
    text-wrap: pretty;
}

/* Folio editorial: sustituye al "eyebrow" repetido de landing */
.eyebrow {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--marron);
}

.eyebrow--light { color: rgba(246, 243, 236, 0.65); }

.note {
    font-size: 0.82rem;
    line-height: 1.7;
    color: var(--tinta-suave);
    max-width: 52ch;
}

/* Enlace editorial (CTA secundario: nunca un segundo botón) --------------- */
.link-line {
    display: inline-block;
    /* El subrayado se mide desde la línea base, así que este relleno agranda
       el área táctil sin separar el filete del texto. */
    padding-block: 0.3rem;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--verde-oscuro);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 6px;
    text-decoration-color: var(--linea);
    transition: text-decoration-color var(--transition), color var(--transition);
}

.link-line:hover {
    color: var(--verde);
    text-decoration-color: var(--verde);
}

.band--dark .link-line {
    color: var(--tinta-inversa);
    text-decoration-color: var(--linea-inversa);
}

.band--dark .link-line:hover { text-decoration-color: var(--tinta-inversa); }

/* Utilidades ------------------------------------------------------------- */
.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -120%);
    z-index: 100;
    padding: 0.7rem 1.25rem;
    background: var(--verde-oscuro);
    color: var(--tinta-inversa);
    font-size: 0.82rem;
    transition: transform var(--transition);
}

.skip-link:focus-visible { transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}
