/* ==========================================================================
   NUTRITANA — globals.css
   Punto único de estilos. Todo el sitio hereda de aquí.
   Colores muestreados del logo original y del DOM del prototipo (21-set-2026).
   Ver style_guide.md antes de agregar cualquier valor nuevo.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Marca */
  --verde-marca:      #446936;
  --verde-lima:       #A2DF3A;
  --verde-medio:      #9AC454;
  --marron:           #6C4316;
  --marron-texto:     #63411E;
  --marron-footer:    #291E13;
  --crema:            #FDF6EA;
  --blanco:           #FFFFFF;

  /* Secundarios: uso restringido, ver style_guide.md */
  --precio:           #FF3131;
  --whatsapp:         #39AD40;
  --verde-logo-hoja:  #7C8E2B;
  --marron-logo:      #382C1E;

  /* Tipografía — Nunito para títulos, Source Sans 3 para texto.
     Las dos son variables y se cargan desde Google Fonts. */
  --fuente-titulo: "Nunito", system-ui, sans-serif;
  --fuente-texto:  "Source Sans 3", system-ui, sans-serif;

  /* Escala tipográfica: fluida entre móvil y escritorio */
  --t-portada:  clamp(2.25rem, 1.30rem + 4.2vw, 4rem);      /* 36 → 64 px */
  --t-seccion:  clamp(1.75rem, 1.30rem + 2.0vw, 2.5625rem); /* 28 → 41 px */
  --t-subtitulo:clamp(1.5rem, 1.30rem + 0.9vw, 2rem);       /* 24 → 32 px */
  --t-producto: clamp(1.1875rem, 1.15rem + 0.2vw, 1.3125rem);
  --t-base:     1rem;
  --t-chica:    0.8125rem;

  /* Forma */
  --radio-boton:   999px;
  --radio-tarjeta: 24px;
  --radio-imagen:  16px;
  --sombra-tarjeta: 0 4px 20px rgba(41, 30, 19, .08);
  --sombra-flotante: 0 6px 24px rgba(41, 30, 19, .22);

  /* Espacio */
  --espacio-seccion: clamp(3rem, 1.5rem + 6vw, 5rem); /* 48 → 80 px */
  --ancho-max: 1200px;
  --gutter: 16px;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--crema);
  color: var(--marron-texto);
  font-family: var(--fuente-texto);
  font-size: var(--t-base);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 {
  font-family: var(--fuente-titulo);
  color: var(--marron);
  line-height: 1.15;
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-size: var(--t-portada); }
h2 { font-size: var(--t-seccion); }
h3 { font-size: var(--t-subtitulo); }

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

.contenedor {
  width: 100%;
  max-width: var(--ancho-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.seccion { padding-block: var(--espacio-seccion); }

/* Foco visible: obligatorio para navegación por teclado */
:focus-visible {
  outline: 3px solid var(--marron);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   3. Botones
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;              /* objetivo táctil cómodo */
  padding: .75rem 1.75rem;
  border: 0;
  border-radius: var(--radio-boton);
  font-family: var(--fuente-titulo);
  font-size: 1.0625rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, transform .18s ease;
}

.btn--primario { background: var(--marron); color: var(--blanco); }
.btn--primario:hover { background: #7d4f1a; }

.btn--verde { background: var(--verde-marca); color: var(--blanco); }
.btn--verde:hover { background: #4f7a3e; }

.btn:active { transform: translateY(1px); }

/* --------------------------------------------------------------------------
   4. Barra promocional (texto en movimiento)
   -------------------------------------------------------------------------- */
.promo {
  background: var(--verde-lima);
  color: var(--marron-footer);   /* 10.2:1 — nunca blanco sobre lima */
  font-weight: 700;
  font-size: .9375rem;
  padding-block: .5rem;
  overflow: hidden;
  white-space: nowrap;
}

.promo__pista {
  display: inline-flex;
  gap: 3rem;
  padding-left: 100%;
  animation: promo-desplazar 28s linear infinite;
}

@keyframes promo-desplazar {
  to { transform: translateX(-100%); }
}

/* Si el visitante pidió menos movimiento, la barra se queda quieta */
@media (prefers-reduced-motion: reduce) {
  .promo__pista {
    animation: none;
    padding-left: 0;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   5. Franjas de ancho completo
   -------------------------------------------------------------------------- */
.franja { padding-block: 1rem; }
.franja--sellos    { background: var(--verde-lima);  color: var(--marron-footer); }
.franja--garantias { background: var(--verde-lima);  color: var(--marron-footer); }
.franja--verde     { background: var(--verde-medio); color: var(--marron-footer); }

.franja__lista {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 600;
}

.franja__item { display: flex; align-items: center; gap: .625rem; }

/* --------------------------------------------------------------------------
   6. Tarjeta de producto
   -------------------------------------------------------------------------- */
.grilla-productos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.producto {
  background: var(--blanco);
  border-radius: var(--radio-tarjeta);
  box-shadow: var(--sombra-tarjeta);
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.producto__img { border-radius: var(--radio-imagen); margin-inline: auto; }

.producto__nombre {
  font-family: var(--fuente-texto);
  font-size: var(--t-producto);
  color: var(--marron-texto);
  margin: 0;
}

.producto__precio {
  font-family: var(--fuente-titulo);
  font-size: 1.5rem;      /* ≥24 px: el rojo solo se admite en grande */
  font-weight: 700;
  color: var(--precio);
}

.producto__accion { margin-top: auto; }

/* --------------------------------------------------------------------------
   7. Bloque de argumento ("Los conejos también merecen...")
   -------------------------------------------------------------------------- */
.argumento {
  background: var(--marron);
  color: var(--blanco);
  border-radius: var(--radio-tarjeta);
  padding: clamp(1.5rem, 1rem + 2vw, 3rem);
}

.argumento h2, .argumento h3 { color: var(--blanco); }

.argumento__lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.argumento__item  { display: flex; align-items: flex-start; gap: .75rem; }

/* --------------------------------------------------------------------------
   8. Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--marron-footer);
  color: var(--blanco);          /* 16.3:1 */
  padding-block: 2.5rem;
}

.footer a {
  color: var(--blanco);
  text-decoration: none;
  opacity: .88;
}
.footer a:hover { opacity: 1; text-decoration: underline; }

.footer__columnas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
}

.footer__titulo {
  font-family: var(--fuente-titulo);
  font-size: .875rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blanco);
  margin-bottom: .75rem;
}

/* --------------------------------------------------------------------------
   9. Botón flotante de WhatsApp
   -------------------------------------------------------------------------- */
.whatsapp {
  position: fixed;
  right: clamp(1rem, 2vw, 2rem);
  bottom: clamp(1rem, 2vw, 2rem);
  z-index: 60;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--whatsapp);
  color: var(--blanco);
  box-shadow: var(--sombra-flotante);
}

/* --------------------------------------------------------------------------
   10. Utilidades
   -------------------------------------------------------------------------- */
.solo-lectores {                 /* visible únicamente para lectores de pantalla */
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.centrado { text-align: center; }
