/* ==========================================================================
   Wapaela | Landing page
   Paleta tomada del folleto: verde hoja, naranja, amarillo y marrón cálido.
   Sin JavaScript, sin fuentes ni recursos externos.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  /* Marca (no cambian con el tema) */
  --leaf: #2e7d2b;
  --leaf-strong: #256a23;
  --sun: #f68712;
  --honey: #dfad1d;
  --forest: #143e21;
  --header-bg: #ffffff; /* blanco fijo: el logo JPEG trae fondo blanco */

  /* Tema claro */
  --paper: #fbfcf6;
  --mist: #eef4e6;
  --ink: #143e21;
  --text: #5b3215;
  --muted: #7a5236;
  --accent-text: #b35700;
  --icon: #c96300;
  --line: rgba(20, 62, 33, 0.16);
  --glow: rgba(249, 249, 174, 0.95);
  --tint-natural: #fbe6c8;
  --tint-limon: #e0efd0;
  --tint-bolsa: #f8ecb8;

  /* Medidas */
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --max: 72rem;
  --radius: 1.75rem;
  --font: "Ubuntu", "Trebuchet MS", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0f2318;
    --mist: #15301f;
    --ink: #f3f7e9;
    --text: #dbe4d0;
    --muted: #b6c4ab;
    --accent-text: #f9a64a;
    --icon: #f68712;
    --line: rgba(255, 255, 255, 0.16);
    --glow: rgba(246, 135, 18, 0.18);
    --tint-natural: #3b2a15;
    --tint-limon: #1e3a22;
    --tint-bolsa: #39331a;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0f2318;
  --mist: #15301f;
  --ink: #f3f7e9;
  --text: #dbe4d0;
  --muted: #b6c4ab;
  --accent-text: #f9a64a;
  --icon: #f68712;
  --line: rgba(255, 255, 255, 0.16);
  --glow: rgba(246, 135, 18, 0.18);
  --tint-natural: #3b2a15;
  --tint-limon: #1e3a22;
  --tint-bolsa: #39331a;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.75rem, 3.2vw + 0.6rem, 2.6rem);
  line-height: 1.12;
}

h3 {
  font-size: 1.15rem;
  line-height: 1.3;
}

section[id] {
  scroll-margin-top: 5rem;
}

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

:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  background: var(--forest);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.6rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--leaf);
  color: #fff;
}

.btn-primary:hover {
  background: var(--leaf-strong);
}

.btn-ghost {
  border-color: var(--ink);
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--mist);
}

.btn-sm {
  min-height: 2.5rem;
  padding: 0.45rem 1.15rem;
  font-size: 0.95rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid rgba(20, 62, 33, 0.12);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
  padding-block: 0.5rem;
}

.logo-slot {
  display: block;
  text-decoration: none;
}

.logo-slot img {
  height: 3.5rem;
  width: auto;
}

.logo-slot__hint {
  display: grid;
  place-items: center;
  min-width: 9rem;
  height: 3.25rem;
  padding-inline: 0.75rem;
  border: 1.5px dashed #8a9a86;
  border-radius: 0.75rem;
  color: #56634f;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

.nav {
  display: none;
}

.nav ul {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
}

.nav a {
  display: inline-block;
  padding-block: 0.7rem;
  color: var(--forest);
  font-weight: 600;
  text-decoration: none;
}

.nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--sun);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

@media (min-width: 60rem) {
  .nav {
    display: block;
    margin-left: auto;
  }
}

/* ---------- Inicio ---------- */
.hero {
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem);
  background: radial-gradient(48rem 34rem at 82% 40%, var(--glow), transparent 70%), var(--paper);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.4rem 1rem 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--leaf);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}

.badge svg {
  color: #b9e38a;
}

.hero-copy h1 {
  max-width: 17em;
  font-size: clamp(2.1rem, 4.6vw + 0.5rem, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 30rem;
  margin-top: 1.25rem;
  font-size: clamp(1.1rem, 1vw + 0.9rem, 1.3rem);
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* Escenario de producto */
.stage {
  position: relative;
  width: min(100%, 30rem);
  aspect-ratio: 1 / 1.04;
  margin-inline: auto;
}

.stage-blob {
  position: absolute;
  inset: 6% 0 0 4%;
  border-radius: 58% 42% 46% 54% / 52% 44% 56% 48%;
  background: linear-gradient(160deg, #fbbd45 0%, var(--sun) 48%, #c9622a 100%);
}

.leaf {
  position: absolute;
  width: 11%;
  height: auto;
}

.leaf-a {
  top: 0;
  right: 14%;
  fill: #73b440;
  transform: rotate(18deg);
}

.leaf-b {
  top: 15%;
  left: 0;
  width: 8%;
  fill: var(--leaf);
  transform: rotate(-24deg) scaleX(-1);
}

.stage-item {
  position: absolute;
  height: auto;
  filter: drop-shadow(0 14px 16px rgba(70, 30, 5, 0.3));
}

.stage-pouch {
  left: 3%;
  bottom: 9%;
  width: 46%;
  transform: rotate(-7deg);
}

.stage-bottle-a {
  left: 41%;
  bottom: 3%;
  width: 24%;
}

.stage-bottle-b {
  left: 65%;
  bottom: 7%;
  width: 24%;
  transform: rotate(4deg);
}

/* Un solo momento de movimiento: los productos suben a su lugar al cargar */
@keyframes rise {
  from {
    opacity: 0;
    translate: 0 1.75rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .stage-item {
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .stage-bottle-a {
    animation-delay: 0.12s;
  }

  .stage-bottle-b {
    animation-delay: 0.24s;
  }
}

@media (min-width: 60rem) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
  }
}

/* ---------- Cómo se usa ---------- */
.how {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  background: var(--mist);
}

.how-grid {
  display: grid;
  gap: 2.25rem;
}

.how-copy p {
  max-width: 30rem;
  margin-top: 1rem;
  font-size: 1.15rem;
}

.facts li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem;
  padding-block: 1.25rem;
  border-top: 1px solid var(--line);
}

.facts li:last-child {
  border-bottom: 1px solid var(--line);
}

.facts svg {
  width: 2.5rem;
  height: 2.5rem;
  fill: none;
  stroke: var(--icon);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.facts p {
  margin-top: 0.15rem;
  color: var(--muted);
}

.uses {
  margin-top: clamp(2.25rem, 5vw, 3.5rem);
}

.uses > p {
  font-weight: 600;
  color: var(--ink);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.chips li {
  padding: 0.4rem 1.1rem;
  border: 2px solid var(--icon);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 700;
}

@media (min-width: 60rem) {
  .how-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4.5rem;
    align-items: start;
  }
}

/* ---------- Beneficios ---------- */
.benefits {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  background: var(--mist);
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2.25rem;
}

.benefit-grid li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  padding: 1.1rem 1rem;
  border-radius: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
}

.benefit-grid svg {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  fill: none;
  stroke: var(--icon);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.benefit-grid h3 {
  min-width: 0;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.benefit-highlights {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.highlight {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--leaf);
  color: #fff;
}

.highlight svg {
  width: 2.5rem;
  height: 2.5rem;
  fill: none;
  stroke: #d7ecc3;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.highlight h3 {
  color: #fff;
}

.highlight p {
  margin-top: 0.35rem;
  color: #e5f0da;
}

.benefit-extra {
  display: grid;
  gap: 0.85rem;
  max-width: 46rem;
  margin-top: 2rem;
  color: var(--muted);
}

.benefit-extra strong {
  color: var(--ink);
}

@media (min-width: 40rem) {
  .benefit-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 56rem) {
  .benefit-highlights {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Presentaciones ---------- */
.products {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.section-lead {
  margin-top: 0.75rem;
  font-size: 1.15rem;
}

.product-scroll {
  margin-top: 2.5rem;
  /* En móvil la lista se desliza de lado; el borde sale hasta la pantalla */
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding-bottom: 1rem;
}

.product-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(75%, 17.5rem);
  gap: 1.25rem;
}

.product {
  scroll-snap-align: start;
}

.product-media {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  aspect-ratio: 4 / 5;
  padding: 2.25rem 1.5rem 0;
  border-radius: 999px 999px var(--radius) var(--radius);
  background: var(--tint-natural);
}

.product-limon .product-media {
  background: var(--tint-limon);
}

.product-bolsa .product-media {
  background: var(--tint-bolsa);
}

.product-media img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 12px rgba(70, 30, 5, 0.25));
}

.product-bolsa .product-media img {
  height: auto;
  width: 82%;
  margin-bottom: 1.25rem;
}

.product h3 {
  margin-top: 1.25rem;
}

.product-flavor {
  color: var(--accent-text);
  font-weight: 700;
}

.product-specs {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.98rem;
}

@media (min-width: 46rem) {
  .product-scroll {
    margin-inline: 0;
    padding-inline: 0;
    overflow: visible;
    scroll-snap-type: none;
    padding-bottom: 0;
  }

  .product-list {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-columns: auto;
    gap: 2rem;
  }
}

/* ---------- Contacto ---------- */
.contact {
  padding-block: clamp(3.5rem, 8vw, 6rem);
  background:
    radial-gradient(36rem 20rem at 8% 0%, rgba(223, 173, 29, 0.22), transparent 70%),
    var(--forest);
  color: #eaf1e2;
}

.contact h2 {
  color: #fff;
}

.contact-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.contact-copy p {
  max-width: 24rem;
  margin-top: 1rem;
  font-size: 1.15rem;
}

.contact-list {
  display: grid;
  gap: 1.5rem;
}

.contact-list a {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #fff;
  font-size: clamp(1.15rem, 2.2vw + 0.6rem, 1.7rem);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-list a:hover span {
  text-decoration: underline;
  text-decoration-color: var(--sun);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.contact-list svg {
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  fill: none;
  stroke: var(--sun);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 48rem) {
  .contact-grid {
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 2rem;
  background: var(--paper);
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-logo {
  display: block;
  padding: 0.4rem 0.75rem;
  border-radius: 0.75rem;
  background: #fff;
}

.footer-logo img {
  width: 9.5rem;
  height: auto;
}

.legal {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Preferencias del usuario ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }
}
