/* Huella Verde · página de muestra (Nexia Social)
   Mobile first. El inicio usa el mismo gris que el fondo del video
   para que el perro viva en la página, sin recuadro. */

:root {
  --gris-video: #C4C3BF; /* mismo gris que el fondo de la imagen de la mascota */
  --hueso: #F3F3F1;
  --gris: #E4E3E0;
  --gris-osc: #CFCECA;
  --verde: #24513A;
  --verde-osc: #1A3B2A;
  --acento: #6E9A63;
  --acento-claro: #A9C79F;
  --tinta: #1F2A22;
  --tinta-suave: #4E5A51;
  --blanco: #FDFDFC;

  --f-display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --f-italica: "Fraunces", Georgia, serif;
  --f-texto: "Bricolage Grotesque", system-ui, sans-serif;

  --gutter: 16px;
  --radio: 14px;
  --header-h: 60px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--hueso);
  color: var(--tinta);
  font-family: var(--f-texto);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.1; }

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

.icon {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}

.eyebrow {
  font-size: .76rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--acento);
}

:focus-visible { outline: 2px solid var(--acento); outline-offset: 3px; }

/* ---------- Títulos grandes (como la referencia) ---------- */
.mega, .giant, .section-head h2, .night h2, .closing h2 {
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 78%;
  font-variation-settings: "wdth" 78;
  text-transform: uppercase;
  line-height: .92;
  letter-spacing: -0.01em;
  text-wrap: balance;
  color: var(--verde);
}
.mega em, .giant em, .section-head h2 em, .closing h2 em {
  font-family: var(--f-italica); font-style: italic; font-weight: 400;
  text-transform: none; letter-spacing: -0.02em;
  font-stretch: 100%; font-variation-settings: normal;
  color: var(--acento);
}
.mega { font-size: clamp(2.6rem, 11vw, 3.6rem); max-width: 12ch; }
.giant { font-size: clamp(3.4rem, 16vw, 5rem); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 50px; padding: 0 1.5rem;
  border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--verde); color: var(--blanco); }
.btn-primary:hover { background: var(--verde-osc); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-ghost { border-color: var(--verde); color: var(--verde); }
.btn-ghost:hover { background: var(--verde); color: var(--blanco); }
.btn-light { background: var(--hueso); color: var(--verde); }
.btn-light:hover { background: var(--blanco); }
.btn-block { width: 100%; }

/* ---------- 1. Barra de muestra ---------- */
.demo-bar {
  background: var(--verde-osc); color: var(--gris);
  font-size: .8rem; text-align: center;
  padding: .55rem var(--gutter);
}
.demo-bar a { color: var(--blanco); font-weight: 600; text-underline-offset: 3px; }

.motion-note {
  background: var(--acento-claro); color: var(--verde-osc);
  font-size: .82rem; font-weight: 600; text-align: center;
  padding: .55rem var(--gutter);
}

/* ---------- 2. Menú ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--hueso); /* sin desenfoque de fondo: cuesta mucho al bajar */
  border-bottom: 1px solid rgba(36, 81, 58, .1);
  transition: transform .45s var(--ease);
}
.site-header.is-hidden { transform: translateY(-100%); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 1rem; }

.logo {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--f-italica); font-size: 1.3rem; font-weight: 500;
  color: var(--verde); text-decoration: none;
}
.logo-mark { width: 24px; height: 24px; color: var(--acento); stroke-width: 1.6; }

.main-nav { display: none; }
.main-nav a { text-decoration: none; font-weight: 500; color: var(--tinta-suave); transition: color .2s; }
.main-nav a:hover { color: var(--verde); }

.cart-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  height: 44px; padding: 0 .9rem 0 .8rem;
  border-radius: 999px; border: 1.5px solid var(--verde);
  background: transparent; color: var(--verde); font-weight: 600;
  transition: background-color .2s, color .2s;
}
.cart-btn:hover { background: var(--verde); color: var(--blanco); }
.cart-label { display: none; }
.cart-count {
  min-width: 22px; height: 22px; padding: 0 6px;
  display: inline-grid; place-items: center;
  border-radius: 999px; background: var(--verde); color: var(--blanco);
  font-size: .78rem; font-variant-numeric: tabular-nums;
  transition: transform .3s var(--ease);
}
.cart-btn:hover .cart-count { background: var(--blanco); color: var(--verde); }
.cart-count.bump { transform: scale(1.25); }

/* ---------- 3. Inicio ---------- */
.hero { background: var(--gris-video); }
.hero-stage {
  position: relative;
  height: var(--hero-h, calc(100svh - var(--header-h)));
  min-height: 520px;
  overflow: hidden;
  background: var(--gris-video);
}
.hero-canvas, .hero-still { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-still { object-fit: cover; object-position: 21% 0; height: 62%; }
.hero.has-canvas .hero-still { visibility: hidden; }

/* Celular: perro arriba, texto abajo sobre el mismo gris */
.hero-copy {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  height: 42%;
  padding: 0 var(--gutter) 1.5rem;
  display: grid; align-items: end;
}
.scene { grid-area: 1 / 1; display: flex; flex-direction: column; gap: .9rem; }
.scene-2 { display: none; }
.motion .scene-2 { display: flex; opacity: 0; visibility: hidden; }

.hero-actions { display: flex; gap: .6rem; margin-top: .25rem; flex-wrap: wrap; }
.scene .hero-actions .btn { flex: 1 1 0; padding: 0 .9rem; }

/* Pantalla verde que crece desde el tarro */
.takeover {
  position: absolute; inset: 0; z-index: 3;
  background: var(--verde);
  display: grid; place-items: center;
  padding: 0 var(--gutter);
  clip-path: circle(0% at 25% 80%);
  visibility: hidden;
}
.takeover-inner { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; text-align: center; }
.takeover .eyebrow { color: var(--acento-claro); }
.takeover .giant { color: var(--hueso); }
.takeover .giant em { color: var(--acento-claro); }

/* Indicador para deslizar */
.scroll-hint {
  position: absolute; right: var(--gutter); top: 1rem; z-index: 5;
  display: flex; flex-direction: column; align-items: center; gap: .45rem;
  font-size: .7rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--verde);
}
.scroll-hint i { position: relative; width: 1.5px; height: 34px; background: rgba(36, 81, 58, .2); overflow: hidden; }
.scroll-hint i::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 100%; height: 40%;
  background: var(--verde);
  animation: hint 1.8s var(--ease) infinite;
}
@keyframes hint { to { top: 100%; } }
.motion .scroll-hint > * { animation: hintIn .8s 1.8s both; }
@keyframes hintIn { from { opacity: 0; transform: translateY(8px); } }

/* Palabras que suben al aparecer */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .06em 0 .12em; margin: -.06em 0 -.12em; }
.wi { display: inline-block; }

/* ---------- Párrafo que se pinta ---------- */
.manifesto { background: var(--verde); color: var(--hueso); padding: 5rem 0 6rem; }
.manifesto .eyebrow { color: var(--acento-claro); margin-bottom: 1.5rem; }
.paint {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(1.9rem, 7.4vw, 3.6rem); line-height: 1.08; letter-spacing: -0.015em;
  max-width: 22ch;
}
.paint .pw { opacity: 1; }
.motion .paint .pw { opacity: .2; }

/* ---------- Encabezados de sección ---------- */
.section-head { margin-bottom: 2rem; display: grid; gap: .6rem; }
.section-head h2, .night h2 { font-size: clamp(2.8rem, 13vw, 5.4rem); }

/* ---------- 4. Productos ---------- */
.products { padding: 4.5rem 0 4rem; background: var(--hueso); }

.filters { display: flex; gap: .5rem; margin-bottom: 1.75rem; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter {
  height: 42px; padding: 0 1.2rem; flex: none;
  border-radius: 999px; border: 1.5px solid var(--gris-osc);
  background: transparent; color: var(--tinta-suave); font-weight: 500;
  transition: background-color .2s, color .2s, border-color .2s;
}
.filter:hover { border-color: var(--verde); color: var(--verde); }
.filter.is-active { background: var(--verde); border-color: var(--verde); color: var(--blanco); }

.product-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem .9rem;
}
.product { display: flex; flex-direction: column; }
.product[hidden] { display: none; }
.product-photo { position: relative; overflow: hidden; aspect-ratio: 4 / 5; border-radius: var(--radio); background: var(--gris); }
.product-photo img { width: 100%; height: 112%; margin-top: -6%; object-fit: cover; transition: scale .8s var(--ease); }
.product:hover .product-photo img { scale: 1.04; }
.product-tag {
  position: absolute; top: .6rem; left: .6rem;
  padding: .2rem .6rem; border-radius: 999px;
  background: rgba(243, 243, 241, .92); color: var(--verde);
  font-size: .72rem; font-weight: 600; letter-spacing: .04em;
}
.product-info { display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem; padding-top: .8rem; }
.product h3 { font-family: var(--f-texto); font-size: .98rem; font-weight: 600; line-height: 1.25; color: var(--tinta); }
.product-size { font-size: .85rem; color: var(--tinta-suave); margin-top: .15rem; }
.product-price { font-family: var(--f-display); font-size: 1.15rem; font-weight: 700; color: var(--verde); margin-top: .35rem; }
.add-btn {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  border: none; background: var(--verde); color: var(--blanco);
  transition: background-color .2s, transform .2s var(--ease);
}
.add-btn:hover { background: var(--acento); }
.add-btn:active { transform: scale(.92); }
.add-btn .icon { width: 20px; height: 20px; stroke-width: 2.2; }

/* ---------- 6. Mientras dormís (sección oscura) ---------- */
.night { padding: 4.5rem 0; }
.night.is-dark { background: var(--verde-osc); color: var(--gris); }
.night.is-dark h2 { color: var(--hueso); }
.night.is-dark .eyebrow { color: var(--acento-claro); }
.night-inner { display: grid; gap: 2rem; }
.night-photo { margin: 0; border-radius: var(--radio); overflow: hidden; aspect-ratio: 3 / 2; }
.night-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 70%; }
.night-copy h2 { margin: .5rem 0 1.75rem; max-width: 12ch; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.step { display: grid; grid-template-columns: 48px 1fr; gap: 1rem; align-items: start; }
.step-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--acento); color: var(--verde-osc); }
.step:nth-child(2) .step-icon { background: transparent; color: var(--acento-claro); border: 1.5px solid var(--acento-claro); }
.step h3 { font-size: 1.4rem; color: var(--hueso); margin-bottom: .3rem; text-transform: uppercase; font-stretch: 85%; font-variation-settings: "wdth" 85; }
.step p { color: rgba(228, 227, 224, .8); }

/* ---------- 7. Beneficios ---------- */
.benefits { padding: 4.5rem 0; background: var(--gris); }
.benefit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.benefit {
  padding: 1.6rem 0;
  border-top: 1px solid var(--gris-osc);
  display: grid; grid-template-columns: 40px 1fr; column-gap: 1rem; row-gap: .3rem;
}
.benefit:last-child { border-bottom: 1px solid var(--gris-osc); }
.benefit .icon { grid-row: span 2; width: 28px; height: 28px; color: var(--acento); margin-top: .15rem; }
.benefit h3 { font-size: 1.5rem; color: var(--verde); text-transform: uppercase; font-stretch: 85%; font-variation-settings: "wdth" 85; }
.benefit p { color: var(--tinta-suave); }

/* ---------- 8. Cierre ---------- */
.closing { background: var(--verde); color: var(--gris); padding: 5rem 0; text-align: center; }
.closing-inner { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; }
.closing h2 { font-size: clamp(2.8rem, 12.5vw, 5.6rem); color: var(--hueso); max-width: 12ch; }
.closing-inner > p:not(.closing-phone) { font-size: 1.15rem; max-width: 34ch; }
.closing .btn { margin-top: .75rem; }
.closing-phone { font-size: .85rem; opacity: .75; }
.closing-inner > p.closing-eyebrow { color: var(--acento-claro); max-width: none; font-size: .76rem; }

/* ---------- 9. Pie ---------- */
.site-footer { background: var(--verde-osc); color: var(--gris); padding: 2.5rem 0 3rem; font-size: .9rem; }
.footer-inner { display: grid; gap: .75rem; }
.logo-footer { color: var(--hueso); }
.site-footer a { color: var(--hueso); text-underline-offset: 3px; }
.footer-small { opacity: .6; font-size: .8rem; }

/* ---------- 5. Carrito lateral ---------- */
.cart-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(26, 59, 42, .4); opacity: 0; transition: opacity .3s var(--ease); }
.cart-overlay.is-open { opacity: 1; }
.cart {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
  width: min(420px, 100%);
  background: var(--hueso);
  display: flex; flex-direction: column;
  transform: translateX(100%); visibility: hidden;
  transition: transform .4s var(--ease), visibility 0s linear .4s;
  box-shadow: -20px 0 50px rgba(26, 59, 42, .14);
}
.cart.is-open { transform: none; visibility: visible; transition: transform .4s var(--ease), visibility 0s; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem var(--gutter); border-bottom: 1px solid var(--gris-osc); }
.cart-head h2 { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 1.6rem; color: var(--verde); }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: none; background: transparent; display: grid; place-items: center; color: var(--verde); }
.icon-btn:hover { background: var(--gris); }

.cart-items { list-style: none; margin: 0; padding: .5rem var(--gutter); overflow-y: auto; flex: 1; }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: .85rem; align-items: center; padding: .85rem 0; border-bottom: 1px solid var(--gris); }
.cart-item img { width: 64px; height: 76px; object-fit: cover; border-radius: 10px; }
.cart-item h3 { font-family: var(--f-texto); font-size: .95rem; font-weight: 600; line-height: 1.25; }
.cart-item-price { font-size: .88rem; color: var(--tinta-suave); margin-top: .15rem; }
.qty { display: inline-flex; align-items: center; gap: .15rem; border: 1.5px solid var(--gris-osc); border-radius: 999px; }
.qty button { width: 34px; height: 34px; border: none; background: transparent; display: grid; place-items: center; color: var(--verde); border-radius: 50%; }
.qty button:hover { background: var(--gris); }
.qty .icon { width: 16px; height: 16px; stroke-width: 2.2; }
.qty span { min-width: 1.4rem; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

.cart-empty { padding: 2rem var(--gutter); color: var(--tinta-suave); flex: 1; }
.cart-empty[hidden] { display: none; }
.cart-foot { padding: 1rem var(--gutter) calc(1.25rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--gris-osc); display: grid; gap: 1rem; background: var(--hueso); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; }
.cart-total span { color: var(--tinta-suave); }
.cart-total strong { font-family: var(--f-display); font-size: 1.5rem; font-weight: 800; color: var(--verde); }
.cart-notice { padding: .9rem 1rem; border-left: 3px solid var(--acento); background: var(--gris); color: var(--verde-osc); font-size: .95rem; line-height: 1.45; }

/* ---------- Aviso al sumar ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 80;
  transform: translate(-50%, calc(100% + 2rem)); visibility: hidden;
  padding: .75rem 1.2rem; border-radius: 999px;
  background: var(--verde); color: var(--blanco); font-size: .92rem; font-weight: 500;
  white-space: nowrap; max-width: calc(100% - 2 * var(--gutter)); overflow: hidden; text-overflow: ellipsis;
  transition: transform .35s var(--ease), visibility 0s linear .35s;
  pointer-events: none;
}
.toast.is-visible { transform: translate(-50%, 0); visibility: visible; transition: transform .35s var(--ease), visibility 0s; }

/* ---------- Respaldo sin animaciones ---------- */
.io .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.io .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .io .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint i::after { animation: none; }
}

/* =========================================================
   Tablet
   ========================================================= */
@media (min-width: 700px) {
  :root { --gutter: 28px; --header-h: 68px; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.25rem 1.25rem; }
  .cart-label { display: inline; }
  .benefit-list { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .benefit { display: flex; flex-direction: column; gap: .5rem; border-bottom: none !important; padding-top: 1.75rem; }
  .benefit .icon { margin-bottom: .5rem; }
  .scene .hero-actions .btn { flex: 0 0 auto; padding: 0 1.5rem; }
}

/* =========================================================
   Inicio en pantallas anchas (desde 760 px): perro a la izquierda, texto a la derecha
   ========================================================= */
@media (min-width: 760px) {
  .hero-still { height: 100%; }
  .hero-copy {
    top: 0; bottom: 0; left: 48%; right: auto; width: 48%; max-width: 680px; height: auto;
    padding: 3rem 0; align-items: center;
  }
  .mega { font-size: clamp(3.4rem, 6.6vw, 7rem); }
  .giant { font-size: clamp(5rem, 12vw, 12rem); }
  .scroll-hint { right: auto; top: auto; left: 50%; bottom: 1.5rem; transform: translateX(-50%); }
}

/* =========================================================
   Escritorio: perro a la izquierda, texto sobre el gris de la derecha
   ========================================================= */
@media (min-width: 960px) {
  :root { --gutter: 40px; }
  .main-nav { display: flex; gap: 2rem; }


  .manifesto { padding: 8rem 0 9rem; }
  .paint { font-size: clamp(3rem, 5vw, 4.6rem); }

  .section-head h2, .night h2 { font-size: clamp(4.5rem, 8vw, 8rem); }
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .products, .night, .benefits { padding: 7rem 0; }

  .night-inner { grid-template-columns: 1.35fr 1fr; gap: 4rem; align-items: center; }
  .night-photo { aspect-ratio: 3 / 2; }

  .closing { padding: 8rem 0; }
  .closing h2 { font-size: clamp(5rem, 9vw, 9rem); }
  .footer-inner { grid-template-columns: auto 1fr auto; align-items: center; gap: 2rem; }
}
