/* Fuentes alojadas en la página (media/fuentes/): los mismos .woff2 que servía Google Fonts. Licencia SIL OFL 1.1 (ver media/fuentes/). */
/* latin */
@font-face {
  font-family: 'Gabarito';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("media/fuentes/gabarito-800-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin */
@font-face {
  font-family: 'Rethink Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("media/fuentes/rethink-sans-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin */
@font-face {
  font-family: 'Rethink Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("media/fuentes/rethink-sans-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Carozo. La forma es la del video de @ascenta.studio (RECORRIDO.md); la identidad es propia (LANDING.md, sección 3):
   crema y verde hoja en la interfaz, la pulpa solo en la foto, Gabarito 800 + Rethink Sans.
   Movimiento: solo con el scroll (tramos sticky con --p), scroll nativo, nada automático, nada que siga al cursor.
   Sin JS o con movimiento reducido: todo apilado y quieto, con el texto entero. */

:root {
  --crema: #F4ECDF;
  --verde: #24301F;
  --verde-velo: 36, 48, 31;
  --disp: 'Gabarito', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --txt: 'Rethink Sans', system-ui, sans-serif;
  --borde: clamp(16px, 3.4vw, 48px);
  color-scheme: light;
}
@property --p { syntax: '<number>'; inherits: true; initial-value: 0; }

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--crema); color: var(--verde); font: 400 16px/1.5 var(--txt); }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
ul { list-style: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.js .sin-js { display: none !important; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
::selection { background: var(--verde); color: var(--crema); }
.banda ::selection, .pie ::selection, .barra ::selection { background: var(--crema); color: var(--verde); }
h1, h2 { text-wrap: balance; }
p, dd, li { text-wrap: pretty; }

.saltar { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--verde); color: var(--crema); padding: 10px 16px; border-radius: 999px; }
.saltar:focus { top: 12px; }

/* ---------- Botones ---------- */
.boton { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border-radius: 999px; font: 500 16px/1 var(--txt); text-decoration: none; border: 0; cursor: pointer; }
.boton-crema { background: var(--crema); color: var(--verde); }
.boton-verde { background: var(--verde); color: var(--crema); }
.boton-verde:focus-visible { outline-color: var(--verde); }
@media (hover: hover) {
  .boton-crema:hover { background: #fff8ee; }
  .boton-verde:hover { background: #33432c; }
}

/* ---------- 0. Barra: píldora verde hoja flotante, centrada ---------- */
.barra {
  position: fixed; z-index: 20; top: 14px; left: 50%; translate: -50% 0;
  display: flex; align-items: center; gap: 26px;
  background: var(--verde); color: var(--crema); border-radius: 999px;
  padding: 7px 7px 7px 22px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
  white-space: nowrap; max-width: calc(100vw - 24px);
}
.barra .logo { font: 800 21px/1 var(--disp); letter-spacing: -.01em; text-decoration: none; margin-right: 6px; }
.barra-enlaces { position: relative; display: flex; gap: 22px; font-size: 15px; }
.barra-enlaces a { text-decoration: none; padding: 12px 0; text-underline-offset: .4em; text-decoration-thickness: 1px; }
@media (hover: hover) { .barra-enlaces a:not([aria-current="true"]):hover { text-decoration-line: underline; } }
/* La parte de la historia que se está viendo: un solo indicador que se desliza y cambia de ancho hasta el enlace activo
   (lo ubica el JS solo cuando cambia la parte); sin parte activa (la portada), se desvanece. */
.barra-indicador {
  position: absolute; left: 0; bottom: 11px; height: 1px; width: var(--iw, 0px); background: currentColor;
  transform: translateX(var(--ix, 0px)); opacity: 0; pointer-events: none;
  transition: transform .3s cubic-bezier(.22, 1, .36, 1), width .3s cubic-bezier(.22, 1, .36, 1), opacity .3s ease-out;
}
.barra-indicador.visible { opacity: 1; }
.barra-indicador.sin-salto { transition: opacity .3s ease-out; }
@media (prefers-reduced-motion: reduce) { .barra-indicador, .barra-indicador.sin-salto { transition: none; } }
.barra-comprar {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--verde); color: var(--crema); box-shadow: inset 0 0 0 1px var(--crema);
  font-weight: 500; font-size: 15px; text-decoration: none;
}
.barra-comprar:focus-visible { outline-color: var(--crema); }
@media (hover: hover) { .barra-comprar:hover { background: #33432c; } }
@media (max-width: 899px) {
  .barra { gap: 0; padding-left: 20px; justify-content: space-between; width: min(360px, calc(100vw - 24px)); }
  .barra-enlaces { display: none; }
  .barra .logo { padding: 10px 0; }
}

/* ---------- Escenas: fotos a sangre ---------- */
.plano { position: relative; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden; background: #6b5a3e; color: #fff; }
.plano picture, .plano .foto { position: absolute; inset: 0; width: 100%; height: 100%; }
.foto { object-fit: cover; }
.video { display: none; }
.rotulo {
  position: absolute; left: var(--borde); top: 84px; z-index: 3;
  font: 500 12px/1.2 var(--txt); color: var(--crema); background: rgba(var(--verde-velo), .78);
  padding: 6px 10px; border-radius: 999px; max-width: calc(100% - 2 * var(--borde));
}

/* Velo del titular (decisión 3.3): local abajo a la derecha, teñido de verde hoja, más una sombra suave en el texto */
.velo { position: absolute; inset: 0; pointer-events: none; }
.velo-inicio {
  background:
    linear-gradient(rgba(0, 0, 0, .16), transparent 18%),
    radial-gradient(ellipse 65% 60% at 100% 100%, rgba(var(--verde-velo), .8), transparent 90%); /* medido sobre F01-v2 a 1440: bajada 4,76:1, titular 6,4:1 (percentil 90) */
}
.portada-texto {
  position: absolute; z-index: 2; right: var(--borde); bottom: clamp(36px, 7svh, 64px);
  width: min(520px, calc(100% - 2 * var(--borde))); text-align: right;
  display: grid; justify-items: end; gap: 14px; text-shadow: 0 1px 14px rgba(0, 0, 0, .35);
}
.portada-texto h1 { font: 800 clamp(40px, 4.1vw, 60px)/.98 var(--disp); letter-spacing: -.015em; }
.portada-texto .bajada { font-weight: 500; font-size: clamp(16px, 1.25vw, 18px); line-height: 1.4; max-width: 34ch; }
.portada-texto .boton { margin-top: 10px; text-shadow: none; }

/* Bandas "sobre la piedra": el texto de las escenas con la fruta abierta va abajo, sobre la piedra, con un velo verde */
.banda {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0;
  padding: 96px var(--borde) clamp(24px, 4svh, 40px);
  background: linear-gradient(to top, rgba(var(--verde-velo), .92) 0, rgba(var(--verde-velo), .86) 55%, transparent);
  color: var(--crema);
}
.banda h2 { font: 800 clamp(28px, 2.6vw, 38px)/1 var(--disp); letter-spacing: -.01em; margin-bottom: 14px; }
.notas dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 40px; max-width: 1100px; }
.notas dt { font: 800 15px/1.2 var(--disp); letter-spacing: .02em; margin-bottom: 4px; }
.notas dd { font-size: 16px; line-height: 1.4; }
.banda-muestra p { max-width: 56ch; font-size: 17px; line-height: 1.45; }
.banda-muestra .precio { display: block; margin-top: 6px; font-weight: 500; }
@media (max-width: 719px) {
  .notas dl { grid-template-columns: 1fr; gap: 10px; }
  .banda { padding-top: 72px; }
}

/* Celular en vertical: el texto de la portada va en el tercio de abajo, sobre la piedra */
@media (max-aspect-ratio: 4/5) {
  .velo-inicio { background: linear-gradient(rgba(0, 0, 0, .16), transparent 16%, transparent 50%, rgba(var(--verde-velo), .55) 72%, rgba(var(--verde-velo), .82)); }
  .portada-texto { left: var(--borde); width: auto; }
}

/* ---------- 3. La gota ---------- */
.lente, .fin { display: none; }

/* ---------- 4. Tamaños, el cierre ---------- */
.tamanos { background: var(--crema); }
/* La foto va detrás (z-index -1 dentro de su contexto) para que la tarjeta quede en el flujo, sin posicionar:
   así los botones de tamaño se ubican contra la foto, debajo de cada frasco, aunque estén dentro de la tarjeta. */
.tam-cuadro { position: relative; isolation: isolate; aspect-ratio: 16 / 9; overflow: hidden; color: var(--verde); display: grid; align-items: center; }
.tam-cuadro picture, .tam-cuadro .foto { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.tam-tarjeta {
  margin-left: var(--borde); width: min(400px, 34%);
  background: var(--crema); border-radius: 22px; padding: 28px 30px; display: grid; gap: 12px; justify-items: start;
}
.tam-tarjeta h2 { font: 800 clamp(30px, 3vw, 44px)/1 var(--disp); letter-spacing: -.01em; }
.tam-tarjeta > p { font-size: 17px; line-height: 1.45; }
.tam-opciones { border: 0; }
.op {
  position: absolute; z-index: 2; top: 88%; translate: -50% 0;
  display: grid; justify-items: center; gap: 2px; min-width: 96px; min-height: 48px; padding: 8px 14px;
  border-radius: 999px; background: rgba(244, 236, 223, .94); color: var(--verde);
  box-shadow: inset 0 0 0 1px rgba(var(--verde-velo), .35); cursor: pointer; text-align: center;
}
.op-15 { left: 48.8%; } .op-50 { left: 63.4%; } .op-100 { left: 80.9%; }
@media (hover: hover) { .op:hover { box-shadow: inset 0 0 0 2px var(--verde); } .pie li a:hover { text-decoration-thickness: 2px; } }
.op input { appearance: none; position: absolute; inset: 0; margin: 0; border-radius: inherit; background: none; cursor: pointer; }
.op input:focus-visible { outline: 2px solid var(--verde); outline-offset: 3px; }
.op .ml { font-weight: 500; font-size: 16px; line-height: 1.1; }
.op .precio { font-size: 12px; line-height: 1.2; }
.op:has(input:checked) { background: var(--verde); color: var(--crema); box-shadow: none; }
.tam-accion { display: grid; justify-items: start; gap: 10px; margin-top: 6px; }
.tam-nota { font-size: 14px; }
.tam-rotulo { white-space: nowrap; }
/* Pantallas horizontales bajas (celular acostado): la foto no entra a 16:9 con la tarjeta; la tarjeta va arriba, sobre crema */
@media (min-aspect-ratio: 4/5) and (max-height: 620px) {
  .tam-cuadro { aspect-ratio: auto; min-height: 100svh; align-items: start; padding-top: 76px; }
}
@media (max-aspect-ratio: 4/5) {
  /* La foto a su proporción y, debajo, una franja crema para "Comprar" (encima de la foto pisaba los tamaños) */
  .tamanos { container-type: inline-size; }
  .tam-cuadro { --alto-foto: calc(100cqw * 1934 / 1080); aspect-ratio: auto; min-height: calc(var(--alto-foto) + 112px); align-items: start; }
  .tam-cuadro picture, .tam-cuadro .foto { bottom: auto; height: var(--alto-foto); }
  .tam-tarjeta { margin: 86px var(--borde) 0; width: auto; padding: 20px 22px; gap: 8px; }
  .op { top: calc(var(--alto-foto) * .8); min-width: 0; width: 24%; padding: 8px 4px; }
  .op-15 { left: 22.7%; } .op-50 { left: 47.7%; } .op-100 { left: 77.3%; }
  .op .ml { font-size: 15px; }
  .tam-accion { position: absolute; bottom: 18px; left: var(--borde); right: var(--borde); margin: 0; justify-items: center; gap: 8px; }
  .tam-nota { font-size: 13px; text-align: center; }
}
@media (max-aspect-ratio: 4/5) and (max-width: 359px) {
  .op .precio { font-size: 11px; }
  .tam-tarjeta h2 { font-size: 28px; }
  .tam-tarjeta > p { font-size: 15px; }
}

/* ---------- 5. Pie ---------- */
.pie { background: var(--verde); color: var(--crema); padding: 56px var(--borde) 40px; display: grid; gap: 36px; }
.pie .logo { font: 800 34px/1 var(--disp); letter-spacing: -.01em; margin-bottom: 8px; }
.pie-columnas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.pie h2 { font: 800 16px/1.2 var(--disp); margin-bottom: 10px; }
.pie li { font-size: 15px; line-height: 1.5; }
.pie li a { display: inline-block; padding: 4px 0; text-underline-offset: .25em; }
.pie-aviso, .nota-sinjs { font-size: 14px; border-top: 1px solid rgba(244, 236, 223, .3); padding-top: 18px; }
@media (min-width: 900px) { .pie { grid-template-columns: 1fr 2fr; } .pie-aviso, .nota-sinjs { grid-column: 1 / -1; } }
@media (max-width: 719px) { .pie-columnas { grid-template-columns: 1fr; } }

/* ---------- Aviso de demo ---------- */
.aviso-demo {
  margin: auto; border: 0; border-radius: 22px; padding: 30px; width: min(440px, calc(100vw - 32px));
  background: var(--crema); color: var(--verde); display: none; gap: 14px;
}
.aviso-demo[open] { display: grid; }
.aviso-demo::backdrop { background: rgba(var(--verde-velo), .55); }
.aviso-demo h2 { font: 800 28px/1.05 var(--disp); }
.aviso-demo h2:focus { outline: none; }
.aviso-demo .boton { justify-self: start; }

/* =====================================================================================================
   Con movimiento (html.vivo: hay JS y no hay movimiento reducido): tramos sticky que avanzan con el scroll.
   Cada capa toma su tramo de --p con clamp(); el JS solo escribe --p (y, en la gota, la escala y el centro).
   ===================================================================================================== */
.vivo .apertura, .vivo .muestra { position: relative; }
.vivo .apertura { height: 400vh; height: 400svh; }
.vivo .muestra { height: 360vh; height: 360svh; }
/* En escritorio la gota es video y su cambio de foco pide más scroll (ver carozo.js, pesos): la sección crece un 17 % */
.vivo .muestra.con-video { height: 420vh; height: 420svh; }
.vivo .escena { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden; }
.vivo .escena .plano { position: absolute; inset: 0; height: auto; min-height: 0; }

/* El ancla de "Cómo huele" cae donde la tapa y las notas ya están a la vista (--p ≈ 0,9 del tramo de 300svh) */
.ancla { position: absolute; top: 100svh; left: 0; width: 1px; height: 1px; }
.vivo .ancla { top: 270svh; }

/* Apertura y destape: el texto se va al empezar; de 0,04 a 0,80 avanzan los dos videos encadenados (la apertura y, desde
   su último cuadro, F02, el destape de la tapa); las notas entran sobre el final del destape (0,76 → 0,86).
   Sin JS o con movimiento reducido no hay video: F01 en la portada y F05 (la tapa flotando) en "Cómo huele". */
.vivo .video { display: block; opacity: 0; }
.vivo .video-apertura.listo, .vivo .video-destape.listo.activo { opacity: 1; }
.vivo .plano-tapa picture, .vivo .plano-tapa .rotulo { display: none; }
/* Con movimiento, "Cómo huele" es solo la banda de las notas encima de los videos: sin el fondo de reserva de las escenas */
.vivo .plano-tapa { background: none; }
.vivo .portada-texto {
  --t: clamp(0, var(--p) / .06, 1);
  opacity: calc(1 - var(--t)); translate: 0 calc(var(--t) * 24px);
}
.vivo .portada-texto.fuera { visibility: hidden; }
.vivo .velo-inicio { opacity: calc(1 - clamp(0, var(--p) / .08, 1) * .85); }
.vivo .plano-tapa .banda { --t: clamp(0, (var(--p) - .76) / .1, 1); opacity: var(--t); translate: 0 calc((1 - var(--t)) * 24px); }

/* La gota: zoom hacia la gota (0,12 → 0,58), adentro la escena dada vuelta y curvada, se endereza (0,60 → 0,76) y vuelve (0,70 → 0,82) */
/* Rendimiento: todo lo que crece o gira lo hace con transform sobre capas propias (la placa de video lo escala sin volver
   a pintar). La lente se dibuja una sola vez a su tamaño final (--gdS = diámetro de la gota × escala final) y crece
   con scale(--s / --S); antes cambiaba de ancho y alto en cada cuadro y tenía un blur: 18 ms de rasterizado por cuadro. */
.vivo .hoja { transform-origin: var(--gx, 50%) var(--gy, 50%); transform: scale(var(--s, 1)); will-change: transform; }
.vivo .lente {
  display: block; position: absolute; z-index: 1; left: var(--gx, 50%); top: var(--gy, 50%);
  width: var(--gdS, 1200px); height: var(--gdS, 1200px);
  transform: translate(-50%, -50%) scale(calc(var(--s, 1) / var(--S, 20))); will-change: transform;
  border-radius: 50%; overflow: hidden;
  /* Fundido largo (0,10 → 0,46), mientras la cámara se acerca: el reflejo de la foto (F07, debajo) se va tapando
     y la escena dada vuelta aparece de a poco (solo opacidad). Atado a --p: también hacia atrás. */
  --f: clamp(0, (var(--p) - .1) / .36, 1);
}
.vivo .lente img {
  width: 100%; height: 100%; object-fit: cover; rotate: calc(clamp(0, (var(--p) - .6) / .16, 1) * 180deg);
  opacity: var(--f); will-change: transform, opacity;
}
.vivo .lente::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 34% 26%, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 14%),
              radial-gradient(circle at 50% 50%, transparent 58%, rgba(0, 0, 0, .28) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45);
  opacity: calc(var(--f) * (1 - clamp(0, (var(--p) - .42) / .14, 1)));
}
.vivo .fin { display: block; position: absolute; inset: 0; z-index: 1; opacity: clamp(0, (var(--p) - .7) / .12, 1); will-change: opacity; }
.vivo .banda-muestra { opacity: clamp(0, 1 - clamp(0, (var(--p) - .08) / .08, 1) + clamp(0, (var(--p) - .84) / .08, 1), 1); }
.vivo .plano-hoja .rotulo { z-index: 3; }

/* La gota en escritorio (.con-video, la pone el JS): dos videos encadenados con el scroll (el acercamiento y la salida a
   la escena, que termina en F05) en lugar del efecto armado con código; la foto de la hoja (F07) queda de póster.
   En celular sigue el efecto con la lente (V06 en pausa). */
.vivo .muestra.con-video .lente, .vivo .muestra.con-video .fin { display: none; }
.vivo .muestra.con-video .hoja { transform: none; will-change: auto; }
.vivo .muestra:not(.con-video) .video-gota-a, .vivo .muestra:not(.con-video) .video-gota-b { display: none; }
.vivo .muestra.con-video .video-gota-a.listo, .vivo .muestra.con-video .video-gota-b.listo.activo { opacity: 1; }
