/* Multirin MX — grana cochinilla
   Palette anchored on Mexican cochineal carmine, the dye that gives the label
   its red. Signature device: la barra de 1000 mg — the serving drawn to scale.
   Class vocabulary is Spanish throughout, so it shares nothing with the HU/CZ/RO
   builds. */

:root {
  --grana:        #7E1B33;   /* cochineal, dominant */
  --grana-honda:  #5C1224;   /* pressed deeper, for dark grounds */
  --grana-viva:   #A81F45;   /* live carmine, accents on light only */
  --tinta:        #23303D;   /* ink, body text */
  --piedra:       #67615C;   /* stone, secondary text */
  --maiz:         #D99B2B;   /* corn, as a ground — carries dark ink at 5.55:1 */
  --maiz-tinta:   #96640F;   /* corn, as text — 4.81:1 on paper */
  --nopal:        #4A7358;   /* prickly pear, plant segments */
  --gris:         #6E6862;   /* auxiliaries — white on it clears 5.5:1 */
  --papel:        #FAF8F7;   /* paper */
  --papel-hondo:  #F1EAE6;   /* paper, pressed */
  --linea:        #C9BDB6;   /* rules */
  --blanco:       #FFFFFF;

  /* Rockwell ships with Office (most Windows), Bookman covers the rest.
     Noto Serif is the Android fallback — without it phones land on a generic
     serif that reads nothing like the slab this design is built on. */
  --display: Rockwell, "Bookman Old Style", "Roboto Slab", "Zilla Slab",
             "Noto Serif", "Droid Serif", serif;
  --texto: Corbel, "Gill Sans", "Gill Sans MT", "Segoe UI",
           Roboto, system-ui, sans-serif;

  --ancho: 68rem;
  --paso: clamp(3.5rem, 7vw, 6rem);
}

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

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

body {
  margin: 0;
  font-family: var(--texto);
  font-size: clamp(1.02rem, 0.98rem + 0.25vw, 1.14rem);
  line-height: 1.65;
  color: var(--tinta);
  background: var(--papel);
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.005em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(1.85rem, 1.25rem + 3vw, 3.7rem); }
h2 { font-size: clamp(1.65rem, 1.3rem + 1.7vw, 2.5rem); }
h3 { font-size: clamp(1.16rem, 1.05rem + 0.5vw, 1.4rem); }

p { margin: 0 0 1.05em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--grana); text-underline-offset: 0.18em; }
a:hover { color: var(--grana-viva); }

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

:focus-visible {
  outline: 3px solid var(--grana-viva);
  outline-offset: 3px;
  border-radius: 2px;
}

.salto {
  position: absolute; left: -9999px;
  background: var(--grana); color: var(--blanco);
  padding: 0.7rem 1.1rem; z-index: 100;
}
.salto:focus { left: 1rem; top: 1rem; }

.oculto {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.centro { width: min(100% - 2.5rem, var(--ancho)); margin-inline: auto; }

section { padding-block: var(--paso); }

/* ---------- eyebrow ---------- */

.rotulo {
  font-family: var(--texto);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--grana);
  margin: 0 0 1rem;
}
.oscuro .rotulo { color: #E8A9B8; }

/* ---------- header ---------- */

.tira {
  background: var(--grana-honda);
  color: var(--blanco);
  font-size: 0.85rem;
  padding-block: 0.55rem;
}
.tira p { margin: 0; text-align: center; opacity: 0.94; }

.cabecera {
  border-bottom: 1px solid var(--linea);
  background: var(--papel);
  padding-block: 1rem;
}
.cabecera .centro {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.marca {
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: 0.03em;
  color: var(--grana);
  text-decoration: none;
}
.marca span { color: var(--tinta); font-size: 0.68rem; display: block;
  letter-spacing: 0.16em; text-transform: uppercase; margin-top: 0.1rem; }

/* ---------- hero ---------- */

.portada { padding-top: clamp(2.5rem, 5vw, 4rem); padding-bottom: 0; }

.portada-reja {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

/* Grid and flex children default to min-width:auto, so a wide child (a long
   CTA label, an image) sets the track's floor and widens the page. */
.portada-reja > *, .hilera > *, .plantas > *, .paquetes > * { min-width: 0; }

.portada h1 { margin-bottom: 0.5em; }

.entrada {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  line-height: 1.45;
  color: var(--piedra);
  max-width: 34ch;
}

.portada-foto {
  border-radius: 3px;
  box-shadow: 0 1.4rem 3rem rgba(35, 48, 61, 0.16);
}

/* ---------- la barra de 1000 mg — signature ---------- */

.barra-mg {
  display: flex;
  width: 100%;
  height: 3.1rem;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--linea);
}

.tramo {
  display: grid;
  place-items: center;
  min-width: 0;              /* the 50 mg slivers must be allowed to shrink */
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--blanco);
  text-transform: uppercase;
  overflow: hidden;
  white-space: nowrap;
}

.tramo--oregano   { background: var(--nopal); }
.tramo--ajo       { background: #B8A98F; color: var(--tinta); }
.tramo--jengibre  { background: var(--maiz); color: var(--tinta); }
.tramo--vitc      { background: var(--grana-viva); }
.tramo--auxiliar  { background: var(--gris); }
.tramo--menta     { background: #7CA88C; color: var(--tinta); }

.barra-pie {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem;
  margin-top: 0.9rem;
  font-size: 0.85rem;
  color: var(--piedra);
}
.barra-pie span { display: inline-flex; align-items: center; gap: 0.4rem; }
.barra-pie i {
  width: 0.85rem; height: 0.85rem; border-radius: 2px; flex: none;
}

.barra-marco {
  padding-block: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--linea);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

/* ---------- CTA ---------- */

.boton {
  display: inline-block;
  font-family: var(--texto);
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--blanco);
  background: var(--grana);
  border: 0;
  border-radius: 3px;
  padding: 1rem 2rem;
  min-height: 3rem;
  max-width: 100%;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition: background 140ms ease, transform 140ms ease;
}
.boton:hover { background: var(--grana-viva); color: var(--blanco); }
.boton:active { transform: translateY(1px); }
.boton--ancho { width: 100%; }

.bajo-boton {
  font-size: 0.92rem;
  color: var(--piedra);
  margin-top: 0.85rem;
  max-width: 40ch;
}

/* ---------- dark sections ---------- */

.oscuro {
  background: var(--grana-honda);
  color: #F6E9EC;
}
.oscuro h2, .oscuro h3 { color: var(--blanco); }
.oscuro a { color: #F0C3CD; }

/* ---------- composition table ---------- */

.ficha {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.ficha caption {
  text-align: left;
  color: var(--piedra);
  font-size: 0.9rem;
  padding-bottom: 0.8rem;
}
.ficha th, .ficha td {
  text-align: left;
  padding: 0.78rem 0.6rem;
  border-bottom: 1px solid var(--linea);
}
.ficha thead th {
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--piedra);
  font-weight: 700;
}
.ficha td:last-child, .ficha th:last-child { text-align: right; white-space: nowrap; }
.ficha tbody tr:last-child td { border-bottom: 2px solid var(--tinta); font-weight: 700; }
.ficha em { font-style: italic; color: var(--piedra); }

.ficha-envoltura { overflow-x: auto; }

/* ---------- vitamin C block ---------- */

.vitamina {
  background: var(--papel-hondo);
  border-left: 5px solid var(--grana);
  padding: clamp(1.6rem, 3.5vw, 2.6rem);
  border-radius: 2px;
}
.vitamina ul { margin: 0 0 1.4rem; padding-left: 1.15rem; }
.vitamina li { margin-bottom: 0.55rem; }
.vitamina li:last-child { margin-bottom: 0; }

.cifra {
  font-family: var(--display);
  font-size: clamp(2.6rem, 2rem + 3vw, 4.2rem);
  line-height: 1;
  color: var(--grana);
  display: block;
}
.cifra-pie {
  font-size: 0.88rem;
  color: var(--piedra);
  letter-spacing: 0.02em;
}

/* ---------- plants ---------- */

.plantas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.6rem;
}
.planta {
  border-top: 3px solid var(--linea);
  padding-top: 1.1rem;
}
.planta:nth-child(1) { border-top-color: var(--nopal); }
.planta:nth-child(2) { border-top-color: #B8A98F; }
.planta:nth-child(3) { border-top-color: var(--maiz); }
.planta:nth-child(4) { border-top-color: #7CA88C; }
.planta h3 { margin-bottom: 0.35rem; }
.planta .peso {
  font-family: var(--display);
  color: var(--grana);
  font-size: 1.05rem;
  display: block;
  margin-bottom: 0.5rem;
}
.planta p { font-size: 0.97rem; color: var(--piedra); }

/* ---------- two-column media rows ---------- */

.hilera {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 3.6rem);
  align-items: center;
}
.hilera--vuelta > figure { order: -1; }
.hilera figure { margin: 0; }
.hilera img { border-radius: 3px; }

/* ---------- yield ---------- */

.rinde {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1.3rem;
  margin-top: 2rem;
}
.rinde div {
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: 2px;
  padding: 1.3rem;
}
.oscuro .rinde div { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.2); }
.rinde b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.9rem;
  display: block;
  line-height: 1;
  margin-bottom: 0.35rem;
}
.rinde span { font-size: 0.9rem; opacity: 0.86; }

/* ---------- prices ---------- */

.paquetes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}
.paquete {
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: 3px;
  padding: 1.8rem 1.5rem;
  display: flex;
  flex-direction: column;
}
.paquete--elegido {
  border: 2px solid var(--grana);
  box-shadow: 0 0.8rem 2rem rgba(126, 27, 51, 0.12);
}
.paquete-nota {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--grana);
  margin-bottom: 0.7rem;
  min-height: 1.1rem;
}
.paquete h3 { margin-bottom: 0.25rem; }
.paquete .precio {
  font-family: var(--display);
  font-size: 2.5rem;
  line-height: 1;
  color: var(--tinta);
  margin: 0.6rem 0 0.2rem;
}
.paquete .precio small { font-size: 0.95rem; color: var(--piedra); }
.paquete .dura { color: var(--piedra); font-size: 0.94rem; margin-bottom: 1.3rem; }
.paquete .boton { margin-top: auto; text-align: center; }

.envio-nota {
  margin-top: 1.6rem;
  font-size: 0.94rem;
  color: var(--piedra);
}

/* ---------- form ---------- */

.pedido {
  background: var(--papel-hondo);
  border-radius: 3px;
  padding: clamp(1.7rem, 4vw, 2.8rem);
  max-width: 34rem;
}
.oscuro .pedido { background: rgba(255,255,255,0.08); }

.campo { margin-bottom: 1.15rem; }
.campo label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}
.campo input, .campo select {
  width: 100%;
  font-family: var(--texto);
  font-size: 1.02rem;
  color: var(--tinta);
  background: var(--blanco);
  border: 1px solid var(--piedra);
  border-radius: 3px;
  padding: 0.85rem 0.9rem;
  min-height: 3rem;
}
.campo input:focus-visible, .campo select:focus-visible { border-color: var(--grana); }
.campo .ayuda { font-size: 0.86rem; color: var(--piedra); margin-top: 0.35rem; }

.trampa { position: absolute; left: -9999px; }

.aviso-form { font-size: 0.88rem; color: var(--piedra); margin-top: 1rem; }
.oscuro .aviso-form { color: #E3CDD3; }

/* ---------- FAQ ---------- */

.preguntas details {
  border-bottom: 1px solid var(--linea);
  padding: 1.05rem 0;
}
.preguntas summary {
  font-family: var(--display);
  font-size: 1.1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  min-height: 1.6rem;
}
.preguntas summary::-webkit-details-marker { display: none; }
.preguntas summary::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--grana);
  line-height: 1;
  flex: none;
}
.preguntas details[open] summary::after { content: "–"; }
.preguntas p { margin-top: 0.8rem; color: var(--piedra); }

/* ---------- mandatory legends ---------- */

.leyenda {
  background: var(--papel-hondo);
  border: 1px solid var(--linea);
  border-radius: 2px;
  padding: 1.3rem 1.5rem;
  font-size: 0.92rem;
  color: var(--tinta);
}
.leyenda strong { display: block; margin-bottom: 0.5rem; }
.leyenda ul { margin: 0.7rem 0 0; padding-left: 1.15rem; color: var(--piedra); }
.leyenda li { margin-bottom: 0.3rem; }

/* ---------- footer ---------- */

.pie {
  background: var(--tinta);
  color: #C9D0D7;
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  font-size: 0.93rem;
}
.pie a { color: var(--blanco); }
.pie h4 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1rem;
  color: var(--blanco);
  margin: 0 0 0.7rem;
}
.pie-reja {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 2rem;
}
.pie ul { list-style: none; margin: 0; padding: 0; }
/* Footer links are navigation, not inline prose, so WCAG 2.5.8's inline-link
   exemption does not cover them — give each one a 24px tap target. */
.pie li { margin-bottom: 0.2rem; }
.pie li a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding-block: 0.15rem;
}
.pie-abajo {
  border-top: 1px solid rgba(255,255,255,0.16);
  margin-top: 2rem;
  padding-top: 1.4rem;
  font-size: 0.86rem;
  opacity: 0.82;
}

/* ---------- legal pages ---------- */

.documento { max-width: 46rem; }
.documento h2 { margin-top: 2.2rem; }
.documento h2:first-of-type { margin-top: 0; }
.documento ul, .documento ol { padding-left: 1.3rem; }
.documento li { margin-bottom: 0.45rem; }
.tabla-envoltura { overflow-x: auto; margin-bottom: 1.2rem; }
.documento table { width: 100%; border-collapse: collapse; }
.documento table th, .documento table td { white-space: nowrap; }
.documento table td:first-child, .documento table th:first-child { white-space: normal; }
.documento th, .documento td {
  text-align: left; padding: 0.6rem; border-bottom: 1px solid var(--linea);
  vertical-align: top;
}

.pendiente {
  background: #FDF7EC;
  border-left: 4px solid var(--maiz-tinta);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.2rem;
  font-size: 0.92rem;
}

/* ---------- responsive ---------- */

@media (max-width: 60rem) {
  .portada-reja, .hilera { grid-template-columns: 1fr; }
  .hilera--vuelta > figure { order: 0; }
  /* min() so this never beats the global img max-width on a narrow phone —
     a bare 26rem is 416px and stretches a 320px viewport. */
  .portada-foto { max-width: min(26rem, 100%); margin-inline: auto; }
  .entrada { max-width: none; }
}

@media (max-width: 34rem) {
  .barra-mg { height: 2.5rem; }
  .tramo { font-size: 0.6rem; }
  /* Keep the header on one line: a stacked full-width CTA eats the fold. */
  .cabecera .centro { gap: 0.75rem; }
  .cabecera .boton {
    padding: 0.6rem 1rem;
    min-height: 2.6rem;
    font-size: 0.92rem;
    flex: none;
  }
  .marca { font-size: 1.25rem; }
  .tira { font-size: 0.78rem; }
}

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