/* ==========================================================================
   Alun Gluten Free — Reset, tipografía base y utilidades
   ========================================================================== */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--s-4));
}

body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-variation-settings: var(--vf-body);
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
picture,
video,
svg,
iframe {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

/* <picture> solo elige la fuente: no debe formar caja propia, o las alturas
   en porcentaje de la <img> se resolverían contra él (que mide auto) en vez
   de contra su contenedor real. */
picture {
  display: contents;
}

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

p,
li {
  text-wrap: pretty;
}

h1,
h2,
h3,
h4 {
  text-wrap: balance;
  line-height: var(--lh-tight);
  font-weight: 400;
}

/* Cifras de ancho fijo: precios y datos no bailan al cambiar de valor. */
.tnum {
  font-variant-numeric: tabular-nums;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-hover);
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

/* Foco visible y consistente en toda la interfaz. ------------------------- */
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   Tipografía de marca
   -------------------------------------------------------------------------- */

/* Voz editorial: Fraunces con los ejes SOFT/WONK abiertos. Se usa en caja
   mixta a propósito — las mayúsculas continuas le quitan calidez. */
.display {
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: var(--vf-display);
  letter-spacing: var(--tracking-display);
  line-height: var(--lh-tight);
}

/* Voz de packaging: grotesca comprimida y pesada, siempre en mayúsculas.
   Es la que imita los títulos de las cajas (VEGGIE, PROTEÍNA, SACOS). */
.cond {
  font-family: var(--font-cond);
  font-weight: 800;
  font-variation-settings: var(--vf-cond);
  letter-spacing: var(--tracking-cond);
  text-transform: uppercase;
  line-height: var(--lh-tight);
}

.script {
  font-family: var(--font-script);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.eyebrow {
  font-family: var(--font-cond);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--accent-warm-text);
}

.eyebrow--on-dark {
  color: var(--c-leaf);
}

/* --------------------------------------------------------------------------
   Utilidades
   -------------------------------------------------------------------------- */

.container {
  width: min(100% - var(--gutter) * 2, var(--container));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - var(--gutter) * 2, var(--container-narrow));
}

.section {
  padding-block: var(--section-y);
}

.section--dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.section--alt {
  background: var(--bg-alt);
}

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

.skip-link {
  position: absolute;
  inset-inline-start: var(--s-4);
  inset-block-start: var(--s-4);
  z-index: 200;
  padding: var(--s-3) var(--s-5);
  background: var(--c-amber);
  color: var(--c-ink-900);
  font-weight: 800;
  border-radius: var(--radius-pill);
  transform: translateY(-160%);
  transition: transform var(--dur) var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}
