:root {
  --espuma: #FBF3E4;
  --cacao: #2B140B;
  --cacao2: #3A1D10;
  --cafe: #7A4527;
  --dorado: #D4A32A;
  --amarillo: #F2B705;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  color: var(--cacao2);
  background: var(--espuma);
  overflow-x: hidden;
}

img {
  display: block;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid #F2B705;
  outline-offset: 3px;
}

/* C1: Hero a pantalla completa */
.hero {
  background: radial-gradient(circle at 20% 25%, #FFF9EC 0%, #FBF3E4 55%, #F8ECD3 100%);
  display: block;
  min-height: 0;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  display: block;
  container-type: inline-size;
}

/* Cambio 3.3: Escenario termina en y=878 (sin pie) */
.stage {
  --px: calc(100cqw / 1672);
  position: relative;
  width: 100%;
  aspect-ratio: 1672 / 878;
  overflow: hidden;
}

/* utilidades de posición en px de referencia */
.u {
  position: absolute;
  left: calc(var(--x) * var(--px));
  top: calc(var(--y) * var(--px));
  width: calc(var(--w) * var(--px));
}

.nav, .copy {
  display: contents; /* hijos absolutos respecto a .stage */
}

.visual {
  position: absolute;
  left: calc(660 * var(--px));
  top: calc(90 * var(--px));
  width: calc(1012 * var(--px));
  height: calc(788 * var(--px));
}

.v {
  position: absolute;
  left: calc(var(--x) * var(--px));
  top: calc(var(--y) * var(--px));
  width: calc(var(--w) * var(--px));
  height: auto;
}

.v img, .u img, .title img, .logo img {
  width: 100%;
  height: auto;
}

/* Utilidad fit para elementos en cajas fijas (título) */
.fit {
  position: absolute;
  left: calc(var(--x) * var(--px));
  top: calc(var(--y) * var(--px));
  width: calc(var(--w) * var(--px));
  height: calc(var(--h) * var(--px));
  margin: 0;
}
.fit > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

/* Utilidad vfit para elementos en cajas fijas dentro de .visual (vaso y splash) */
.vfit {
  position: absolute;
  left: calc(var(--x) * var(--px));
  top: calc(var(--y) * var(--px));
  width: calc(var(--w) * var(--px));
  height: calc(var(--h) * var(--px));
  object-fit: contain;
  object-position: center bottom;
}

/* parallax (variables --mx --my --d) */
.par {
  transform: translate(calc(var(--mx, 0) * var(--d, 0) * 22px), calc(var(--my, 0) * var(--d, 0) * 22px));
  will-change: transform;
}

/* ---------- MENÚ ---------- */
.logo {
  z-index: 9;
}
.logo img {
  filter: drop-shadow(0 6px 10px rgba(58, 29, 16, .25));
}

.menu {
  position: absolute;
  z-index: 9;
  left: calc(468 * var(--px));
  top: calc(41 * var(--px));
  display: flex;
  gap: calc(70 * var(--px));
}

.menu a {
  font: 600 max(11px, calc(15 * var(--px))) / 1 'Poppins', sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: calc(9 * var(--px));
  color: var(--cacao2);
  transition: color .2s;
}

.menu a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--dorado);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
}

.menu a:hover::after,
.menu a.is-active::after {
  transform: scaleX(1);
}

.btn-pedir {
  z-index: 9;
  height: calc(52 * var(--px));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(10 * var(--px));
  border: 2px solid var(--cacao2);
  border-radius: 999px;
  font: 700 max(11px, calc(15 * var(--px))) / 1 'Poppins', sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cacao2);
  transition: background-color .25s, color .25s, transform .25s;
}

.btn-pedir svg {
  width: calc(26 * var(--px));
  height: calc(26 * var(--px));
  flex-shrink: 0;
}

.btn-pedir:hover {
  background: var(--cacao2);
  color: #F6EAD2;
  transform: translateY(-1px);
}

.nav-line {
  position: absolute;
  z-index: 9;
  left: calc(234 * var(--px));
  right: 0;
  top: calc(88 * var(--px));
  height: 1px;
  background: rgba(168, 116, 26, .18);
}

.burger {
  display: none;
}

/* ---------- TEXTO IZQUIERDA ---------- */
.pill, .title, .lead, .btn-main, .info {
  z-index: 8;
}

.pill {
  height: calc(35 * var(--px));
  margin: 0;
  display: flex;
  align-items: center;
  gap: calc(12 * var(--px));
  padding-left: calc(17 * var(--px));
  padding-right: calc(17 * var(--px));
  background: #FFF8EA;
  border: 1.5px solid var(--dorado);
  border-radius: 999px;
  font: 700 max(11px, calc(15 * var(--px))) / 1 'Poppins', sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cacao2);
  white-space: nowrap;
}

.pill svg {
  width: calc(24 * var(--px));
  height: calc(24 * var(--px));
  color: #5A2E17;
  flex-shrink: 0;
}

.title {
  margin: 0;
}

/* Cambio 4: white-space nowrap en escritorio */
.lead {
  margin: 0;
  font: 500 max(12px, calc(17 * var(--px))) / calc(22 * var(--px)) 'Poppins', sans-serif;
  color: #4A2413;
  white-space: nowrap;
}

.btn-main {
  height: calc(38 * var(--px));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(12 * var(--px));
  background: linear-gradient(180deg, #FFC82E, #F2A900);
  color: var(--cacao);
  border-radius: 999px;
  font: 700 max(11px, calc(14 * var(--px))) / 1 'Poppins', sans-serif;
  letter-spacing: .07em;
  text-transform: uppercase;
  box-shadow: 0 calc(6 * var(--px)) calc(14 * var(--px)) rgba(212, 163, 42, .35);
  transition: transform .25s, box-shadow .25s;
  cursor: pointer;
}

.btn-main svg {
  width: calc(18 * var(--px));
  height: calc(18 * var(--px));
  transition: transform .25s;
}

.btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 calc(10 * var(--px)) calc(20 * var(--px)) rgba(212, 163, 42, .45);
}

.btn-main:hover svg {
  transform: translateX(5px);
}

.info {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
  z-index: 8;
}

.info li {
  position: absolute;
  left: calc(var(--x) * var(--px));
  top: 0;
}

.info .ico {
  position: absolute;
  left: 0;
  top: calc(var(--y) * var(--px));
  width: calc(var(--w) * var(--px));
  height: calc(var(--h) * var(--px));
  object-fit: contain;
  object-position: left center;
}

.info div {
  position: absolute;
  left: calc((var(--tx) - var(--x)) * var(--px));
  top: calc(640 * var(--px));
  display: flex;
  flex-direction: column;
  gap: calc(3 * var(--px));
  width: calc(190 * var(--px));
}

.info b {
  font: 700 max(11px, calc(13 * var(--px))) / 1.2 'Poppins', sans-serif;
  color: var(--cacao2);
}

.info span {
  font: 400 max(10px, calc(11.5 * var(--px))) / calc(14 * var(--px)) 'Poppins', sans-serif;
  color: #6B4026;
  max-width: calc(130 * var(--px));
}

.info .sep {
  top: calc(640 * var(--px));
  width: 1px;
  height: calc(48 * var(--px));
  background: rgba(212, 163, 42, .7);
}

/* ---------- VISUAL ---------- */
.ring {
  z-index: 1;
  height: calc(var(--w) * var(--px));
}

.ring .draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.is-ready .ring .draw {
  animation: draw 1.4s .2s ease-out forwards;
}

/* Cambio 1: Río de chocolate sin bordes con sobrante */
.river {
  position: absolute;
  z-index: 2;
  left: calc(-40 * var(--px));
  top: calc(548 * var(--px));
  bottom: auto;
  width: calc(1752 * var(--px));
  height: calc(360 * var(--px));
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
}

.splash {
  z-index: 3;
}

.splash-front {
  z-index: 6;
  display: none;
  clip-path: inset(66% 0 0 0);
}

.fix-base .splash-front {
  display: block;
}

/* Cambio 5.2: Respiración del vaso anclada a la base */
.product {
  z-index: 5;
  transform-origin: 50% 94%;
}

.ptl {
  position: absolute;
  z-index: var(--z);
  pointer-events: none;
  left: calc((var(--cx) - var(--s) / 2) * var(--px));
  top: calc((var(--cy) - var(--s) / 2) * var(--px));
  width: calc(var(--s) * var(--px));
  height: auto;
  rotate: var(--r);
  filter: blur(var(--b));
  transform: translate(calc(var(--mx, 0) * var(--d) * 22px), calc(var(--my, 0) * var(--d) * 22px));
  animation: fadeIn .8s ease both var(--delay), float var(--dur) ease-in-out var(--delay) infinite;
}

/* ---------- INSIGNIA (Cambio 2.2) ---------- */
.badge {
  z-index: 8;
  height: calc(var(--w) * var(--px));
  rotate: -8deg;
}

.badge svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 calc(14 * var(--px)) calc(24 * var(--px)) rgba(43, 20, 11, .35));
}

.badge-txt {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #FFFDF8;
  padding-top: calc(4 * var(--px));
  user-select: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.b1 {
  font: 800 calc(21 * var(--px)) / 1 'Poppins', sans-serif;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.b2 {
  font: 800 calc(68 * var(--px)) / .85 'Poppins', sans-serif;
  margin-top: calc(2 * var(--px));
}

.b3 {
  font: 700 calc(12.5 * var(--px)) / 1 'Poppins', sans-serif;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #F6EAD2;
  margin-top: calc(6 * var(--px));
}

.b4 {
  font: 800 calc(46 * var(--px)) / 1 'Poppins', sans-serif;
  font-style: normal;
  margin-top: calc(2 * var(--px));
  background: linear-gradient(180deg, #FFD45A, #E8A400);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.b5 {
  font: 600 calc(8.5 * var(--px)) / 1.25 'Poppins', sans-serif;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #F6EAD2;
  max-width: calc(130 * var(--px));
  margin-top: calc(3 * var(--px));
}


/* ---------- ANIMACIONES ---------- */
@keyframes fadeIn {
  from { opacity: 0; }
}

@keyframes rise {
  from { opacity: 0; translate: 0 calc(24 * var(--px)); }
}

@keyframes pop {
  from { opacity: 0; scale: .92; translate: 0 calc(40 * var(--px)); }
}

@keyframes pop-product {
  from { opacity: 0; translate: 0 calc(40 * var(--px)); }
}

@keyframes breathe {
  0%, 100% { scale: 1; }
  50% { scale: 1.014; }
}

@keyframes badge-in {
  from { opacity: 0; translate: 0 calc(24 * var(--px)); }
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

@keyframes float {
  50% { translate: 0 calc(-10 * var(--px)); }
}

.hero:not(.is-ready) .anim {
  opacity: 0;
}

.is-ready .anim {
  animation: rise .8s cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: var(--d, 0s);
}

.is-ready .product {
  animation:
    pop-product 1s .25s cubic-bezier(.2, .9, .25, 1.1) both,
    breathe 6s 1.4s ease-in-out infinite;
}

.is-ready .splash {
  animation: pop .9s .1s ease-out both;
}

.is-ready .badge {
  animation: badge-in .7s 1s ease-out both;
}

.river {
  animation: fadeIn .9s ease both;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  .hero .anim {
    opacity: 1;
  }
}

/* ---------- VERSIÓN MÓVIL (< 900 px de ancho) ---------- */
@media (max-width: 899px) {
  .hero {
    min-height: 100vh;
    display: block;
    overflow-y: auto;
  }

  .wrap {
    max-width: 100%;
    display: block;
  }

  .stage {
    --px: calc(100vw / 782);
    aspect-ratio: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 0;
  }

  .u, .v {
    position: static;
    width: auto;
  }

  .fit {
    position: static;
    width: auto;
    height: auto;
  }
  .fit > img {
    width: 100%;
    height: auto;
    object-fit: initial;
  }
  .title.fit {
    margin: 14px auto 0;
    width: 92%;
  }

  .river {
    position: relative;
    left: 0;
    width: 100%;
    height: auto;
    top: auto;
    object-fit: initial;
    margin-top: -22vw;
  }

  .info .ico {
    position: static;
    width: auto;
    height: 30px;
    margin: 0 auto 6px;
  }


  .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    position: relative;
    z-index: 9;
  }

  .nav .logo {
    width: 56px;
  }

  .menu {
    display: none;
  }

  .nav-line {
    display: none;
  }

  .btn-pedir {
    position: static;
    width: auto;
    height: 40px;
    padding: 0 16px;
    font-size: 13px;
    margin-left: auto;
    margin-right: 10px;
  }

  .burger {
    display: grid;
    gap: 4px;
    background: none;
    border: 0;
    padding: 8px;
    cursor: pointer;
    z-index: 25;
  }

  .burger i {
    width: 22px;
    height: 2px;
    background: var(--cacao2);
    display: block;
    transition: transform .2s;
  }

  .menu-open .menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: #FBF3E4;
    padding: 18px;
    gap: 16px;
    z-index: 20;
    box-shadow: 0 10px 20px rgba(58, 29, 16, .15);
  }

  .copy {
    display: block;
    padding: 8px 18px 0;
    text-align: center;
    position: relative;
    z-index: 8;
  }

  .pill {
    position: static;
    width: auto;
    display: inline-flex;
    height: 32px;
    padding: 0 14px;
    font-size: 12px;
    margin: 0 auto;
  }

  .lead {
    position: static;
    width: auto;
    font-size: 16px;
    line-height: 1.45;
    margin: 10px auto 0;
    max-width: 340px;
    white-space: normal;
  }
  .lead .br-d {
    display: none;
  }

  .btn-main {
    position: static;
    width: 100%;
    max-width: 340px;
    height: 50px;
    font-size: 14px;
    margin: 16px auto 0;
  }

  .info {
    position: static;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 16px 0 0;
    padding: 0 12px;
  }

  .info li {
    position: static;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .info div {
    position: static;
    width: auto;
    align-items: center;
    text-align: center;
  }

  .info b {
    font-size: 12px;
  }

  .info span {
    display: none;
  }

  .info .sep {
    display: none;
  }

  /* grupo visual: se escala y se recorta lateralmente para centrar el vaso */
  .visual {
    position: relative;
    left: auto;
    top: auto;
    width: calc(1012 * var(--px));
    height: calc(788 * var(--px));
    margin-left: -7vw;
    margin-top: 8px;
  }

  .v {
    position: absolute;
    left: calc(var(--x) * var(--px));
    top: calc(var(--y) * var(--px));
    width: calc(var(--w) * var(--px));
  }

  .badge {
    --x: 610;
    --y: 70;
    --w: 190;
  }
}
