:root {
  --cream: #F8F0E5;
  --cream-2: #EFE4D6;
  --ink: #2E2119;
  --brown: #8A5A35;
  --brown-dark: #4A3022;
  --green: #5E6B46;
  --muted: #6E5F54;
  --line: rgba(46, 33, 25, .14);
  --serif: "Marcellus", "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; color: var(--brown-dark); }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.15; text-wrap: balance; }
h3 { font-size: 1.5rem; }

/* Marca (corazón del logo recortado con CSS) */
.mark {
  --s: .12;
  display: inline-block;
  width: calc(350px * var(--s));
  height: calc(370px * var(--s));
  background: url("/img/lula-logo.jpg") no-repeat;
  background-size: calc(1254px * var(--s));
  background-position: calc(-455px * var(--s)) calc(-262px * var(--s));

}
.mark-lg { --s: .18; }

/* Navegación */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: .75rem clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand-word { font-family: var(--serif); font-size: 1.5rem; letter-spacing: .3em; color: var(--brown-dark); }
.nav nav { display: flex; align-items: center; gap: clamp(.75rem, 2.5vw, 2rem); }
.nav nav a {
  text-decoration: none; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); transition: color .2s;
}
.nav nav a:hover { color: var(--brown-dark); }
.nav-cta { border: 1px solid var(--brown-dark); padding: .45rem .9rem; color: var(--brown-dark) !important; }
.nav-cta:hover { background: var(--brown-dark); color: var(--cream) !important; }

/* Portada */
.hero {
  min-height: calc(100svh - 64px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 1rem 1.25rem 4rem;
}
.hero-logo {
  width: min(560px, 92vw); height: auto;

  margin-bottom: -1.5rem;
}
.hero-line {
  font-family: var(--serif); font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  color: var(--muted); margin: 0 0 2rem; max-width: 34ch;
}
.btn {
  display: inline-block; text-decoration: none;
  background: var(--brown-dark); color: var(--cream);
  padding: .9rem 1.8rem; font-size: .8rem; letter-spacing: .2em; text-transform: uppercase;
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--brown); transform: translateY(-1px); }

/* Secciones */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(4.5rem, 10vw, 7.5rem) clamp(1.25rem, 4vw, 2.5rem); text-align: center; }
.eyebrow {
  font-size: .75rem; letter-spacing: .32em; text-transform: uppercase; color: var(--green);
  margin: 0 0 1rem; font-weight: 500;
}
.eyebrow::after { content: ""; display: block; width: 36px; height: 1px; background: var(--green); margin: .9rem auto 0; opacity: .6; }
.lead { max-width: 56ch; margin: 1.5rem auto 0; color: var(--muted); font-size: 1.15rem; }

/* Nuestro café */
.value-list {
  list-style: none; padding: 0; margin: 3.5rem 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  counter-reset: v; text-align: left;
  border-top: 1px solid var(--line);
}
.value-list li { padding: 2rem 1.5rem 0; counter-increment: v; border-left: 1px solid var(--line); }
.value-list li:first-child { border-left: 0; padding-left: 0; }
.value-list li::before { content: "0" counter(v); display: block; font-family: var(--serif); color: var(--green); letter-spacing: .2em; font-size: .9rem; margin-bottom: .75rem; }
.value-list h3 { margin-bottom: .5rem; }
.value-list p { margin: 0; color: var(--muted); font-size: 1rem; }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 3rem; }
.contact-item { padding: 2rem 1.5rem; border: 1px solid var(--line); }
.contact-item h3 { margin-bottom: .5rem; }
.contact-item p { margin: 0; color: var(--muted); }
.todo { font-style: italic; color: var(--muted); }

/* Pie */
.footer { text-align: center; padding: 4rem 1.5rem 2.5rem; border-top: 1px solid var(--line); }
.footer-word { font-family: var(--serif); font-size: 2rem; letter-spacing: .35em; margin: .75rem 0 .25rem; color: var(--brown-dark); padding-left: .35em; }
.footer-tag { font-size: .75rem; letter-spacing: .22em; text-transform: uppercase; color: var(--green); margin: 0 0 2rem; }
.footer-legal { font-size: .8rem; color: var(--muted); margin: 0; }

/* Responsive */
@media (max-width: 860px) {
  .value-list { grid-template-columns: 1fr 1fr; row-gap: 2.5rem; }
  .value-list li:nth-child(3) { border-left: 0; padding-left: 0; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .nav nav a:not(.nav-cta) { display: none; }
  .value-list { grid-template-columns: 1fr; }
  .value-list li { border-left: 0; padding-left: 0; }
  .hero-logo { margin-bottom: -.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Botones extra */
.hero-ctas { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: center; }
.btn-ghost { background: transparent; color: var(--brown-dark); border: 1px solid var(--brown-dark); }
.btn-ghost:hover { background: var(--brown-dark); color: var(--cream); }
.btn-sm { padding: .65rem 1.3rem; font-size: .72rem; }
.btn-whatsapp { margin-top: 3rem; background: var(--green); }
.btn-whatsapp:hover { background: #4C5838; }

/* Tienda */
.shop { max-width: none; background: var(--cream-2); }
.product-grid {
  max-width: var(--max); margin: 3.5rem auto 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: stretch;
}
.product { background: var(--cream); border: 1px solid var(--line); display: flex; flex-direction: column; text-align: left; }
.product.featured { outline: 1px solid var(--brown); outline-offset: -1px; }
.product-art {
  aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.product-art span {
  font-family: var(--serif); letter-spacing: .35em; font-size: 1.05rem; padding-left: .35em;
  color: var(--cream); border: 1px solid rgba(248, 240, 229, .55); padding: .9rem 1.2rem .9rem 1.55rem;
}
.art-veracruz { background: linear-gradient(160deg, #84532E, #6B4226); }
.art-chiapas  { background: linear-gradient(160deg, #4A3022, #2E2119); }
.art-lula     { background: linear-gradient(135deg, #8A5A35 0 50%, #3E281C 50% 100%); }
.product-body { padding: 1.75rem 1.75rem 2rem; display: flex; flex-direction: column; flex: 1; }
.product-origin { margin: 0 0 .35rem; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--green); font-weight: 500; }
.product-body h3 { font-size: 1.75rem; margin-bottom: .5rem; }
.product-desc { margin: 0 0 1.25rem; color: var(--muted); }
.product-specs { margin: 0 0 1.5rem; border-top: 1px solid var(--line); }
.product-specs div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.product-specs dt { color: var(--muted); }
.product-specs dd { margin: 0; color: var(--brown-dark); }
.product-body .btn { margin-top: auto; align-self: flex-start; }

/* Pasos de compra */
.steps { list-style: none; padding: 0; margin: 3rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.steps li { padding: 2rem 1.5rem; border: 1px solid var(--line); }
.step-num {
  display: inline-flex; width: 2.4rem; height: 2.4rem; border-radius: 50%; align-items: center; justify-content: center;
  border: 1px solid var(--brown); color: var(--brown); font-family: var(--serif); font-size: 1.1rem; margin-bottom: 1rem;
}
.steps h3 { margin-bottom: .5rem; }
.steps p { margin: 0; color: var(--muted); }
.contact-social { margin: 1.5rem 0 0; color: var(--muted); }

@media (max-width: 860px) {
  .product-grid, .steps { grid-template-columns: 1fr; max-width: 460px; margin-left: auto; margin-right: auto; }
}

/* Historia: diorama stop-motion guiado por el scroll */
.story { padding-bottom: clamp(3rem, 6vw, 5rem); }
.story-scroll { position: relative; margin-top: clamp(2rem, 5vw, 3.5rem); }
.story-sticky {
  display: grid; gap: clamp(1.25rem, 3vw, 3rem); align-items: center;
  grid-template-columns: minmax(0, 1.6fr) minmax(15rem, 1fr);
}
.story-stage {
  position: relative; aspect-ratio: 800 / 560; width: 100%;
  background: #E9D8C0; overflow: hidden;
  box-shadow: 0 30px 60px -36px rgba(46, 33, 25, .55), 0 2px 6px -2px rgba(46, 33, 25, .18);
}
.story-stage > svg { display: block; width: 100%; height: 100%; }
.story-text { text-align: left; }
.story-lines { list-style: none; margin: 0; padding: 0; }
.story-line {
  font-family: var(--serif); font-size: clamp(1.3rem, 2.1vw, 1.75rem); line-height: 1.38;
  color: var(--brown-dark); text-wrap: pretty; margin: 0 0 1.25rem;
}
.story-line strong { font-weight: 400; color: var(--brown); }
.story-progress { display: none; }
.story-hint { display: none; }

/* Modo scroll (requiere JS) */
.is-scrolly { height: calc(var(--steps) * 78svh); }
.is-scrolly .story-sticky {
  position: sticky; top: 4.25rem; height: calc(100svh - 4.25rem);
  padding: clamp(.75rem, 2vh, 1.5rem) 0;
}
.is-scrolly .story-stage { max-height: calc(100svh - 7rem); }
.is-scrolly .story-lines { display: grid; }
.is-scrolly .story-line {
  grid-area: 1 / 1; margin: 0; opacity: 0; transform: translateY(.75rem);
  transition: opacity .35s ease, transform .6s cubic-bezier(0.16, 1, 0.3, 1);
}
.is-scrolly .story-line.is-active { opacity: 1; transform: none; transition-delay: .12s; }
.is-scrolly .story-progress {
  display: block; height: 2px; margin-top: 2rem; background: var(--line); overflow: hidden;
}
.story-progress span { display: block; height: 100%; background: var(--brown); transform: scaleX(0); transform-origin: 0 50%; }
.is-scrolly .story-hint {
  display: flex; align-items: center; gap: .6rem; margin: 1.25rem 0 0;
  font-size: .8rem; letter-spacing: .08em; color: var(--muted);
  transition: opacity .3s ease;
}
.story-stage:not([data-scene="1"]) ~ .story-text .story-hint { opacity: 0; }
.story-hint-dot { animation: hint 1.6s steps(4) infinite; }
@keyframes hint { 0% { transform: translateY(0); } 50% { transform: translateY(4px); } 100% { transform: translateY(0); } }

/* Elementos del diorama: todos avanzan por cuadros (steps) */
.syl, .mtn, .bag, .fam, .mist, .clouds, .sun { transform-box: fill-box; }
.cam {
  transform-box: view-box; transform-origin: 0 0;
  transition: transform 1.1s steps(9, end);
}
[data-scene="3"] .cam { transform: translate(-100px, -132.5px) scale(1.25); }
[data-scene="5"] .cam { transform: translate(-176px, -448px) scale(1.8); }
[data-scene="6"] .cam { transform: translate(-464px, -448px) scale(1.8); }
[data-scene="7"] .cam { transform: translate(-200px, -280px) scale(1.5); }
[data-scene="9"] .cam { transform: translate(-120px, -110px) scale(1.3); }

.sky-day { opacity: 0; transition: opacity .9s steps(5, end); }
.sun { transform: translateY(40px); transition: transform 1.2s steps(6, end); }
[data-scene="1"] .sun { transform: translateY(18px); }
.story-stage:not([data-scene="1"]) .sky-day { opacity: 1; }
.story-stage:not([data-scene="1"]):not([data-scene="2"]) .sun { transform: translateY(-30px); }

/* Lu + La → LULA */
.syl {
  font-family: var(--serif); font-size: 66px; letter-spacing: .14em; fill: var(--brown-dark);
  opacity: 0; transform: scale(.4); transform-origin: 50% 50%;
  transition: opacity .5s steps(4, end), transform .7s steps(6, end);
}
[data-scene="2"] .syl { opacity: 1; transform: none; }
[data-scene="2"] .syl-la { transition-delay: .6s; }
[data-scene="3"] .syl { opacity: 1; }
[data-scene="3"] .syl-lu { transform: translateX(62px); }
[data-scene="3"] .syl-la { transform: translateX(-58px); }

/* Brazos: manos que se juntan (3) y brindis (9) */
.arm { transform-box: view-box; transition: transform .8s steps(6, end); }
.arm-lupe { transform-origin: 334px 320px; }
.arm-lalo { transform-origin: 466px 320px; }
[data-scene="3"] .arm-lupe, [data-scene="9"] .arm-lupe { transform: rotate(-21deg); }
[data-scene="3"] .arm-lalo, [data-scene="9"] .arm-lalo { transform: rotate(21deg); transition-delay: .35s; }
[data-scene="9"] .arm-lupe { transform: rotate(-30deg); }
[data-scene="9"] .arm-lalo { transform: rotate(30deg); }

/* Montañas que brotan del mantel (4–7) */
.mtn { transform: scaleY(0); transform-origin: 50% 100%; transition: transform .8s steps(6, end); }
.mtn-chia { transition-delay: .25s; }
[data-scene="4"] .mtn, [data-scene="5"] .mtn, [data-scene="6"] .mtn, [data-scene="7"] .mtn { transform: none; }
.cherries circle { opacity: 0; transition: opacity .1s steps(1, end); transition-delay: calc(var(--d) * .14s + .5s); }
[data-scene="5"] .cherries circle, [data-scene="6"] .cherries circle, [data-scene="7"] .cherries circle { opacity: 1; }
[data-scene="5"] .mist { animation: drift 2.4s steps(4, end) infinite alternate; }
[data-scene="6"] .clouds { animation: drift 2.4s steps(4, end) infinite alternate; }
@keyframes drift { from { transform: translateX(-6px); } to { transform: translateX(8px); } }

/* Granos y bolsa (7) */
.beans ellipse { opacity: 0; transition: opacity .1s steps(1, end); }
[data-scene="7"] .beans ellipse { opacity: 1; transition-delay: calc(var(--d) * .16s + .9s); }
.bag { transform: scaleY(0); transform-origin: 50% 100%; transition: transform .6s steps(5, end); }
[data-scene="7"] .bag { transform: none; transition-delay: .4s; }

/* Familia (8) */
.fam { transform: translateY(170px); transition: transform .7s steps(6, end); }
[data-scene="8"] .fam { transform: none; }
[data-scene="8"] .fam-2 { transition-delay: .25s; }
[data-scene="8"] .fam-3 { transition-delay: .5s; }
[data-scene="8"] .fam-mugs { transition-delay: .7s; }

/* Brindis y corazón de vapor (9) */
.mug { transition: opacity .3s steps(2, end); }
[data-scene="9"] .mug { opacity: 0; }
.toast { opacity: 0; transition: opacity .2s steps(2, end); }
[data-scene="9"] .toast { opacity: 1; transition-delay: .8s; }
.heart { stroke-dasharray: 100; stroke-dashoffset: 100; opacity: 0; transition: stroke-dashoffset 1.4s steps(10, end), opacity .2s; }
[data-scene="9"] .heart { stroke-dashoffset: 0; opacity: 1; transition-delay: 1.3s, 1.3s; }

/* Celular: escena arriba, narración abajo */
@media (max-width: 860px) {
  .story-sticky { grid-template-columns: 1fr; align-content: start; }
  .story-text { text-align: center; }
  .is-scrolly .story-sticky { gap: 1rem; padding-top: .5rem; }
  .is-scrolly .story-stage { max-height: 52svh; }
  .story-line { font-size: clamp(1.15rem, 4.6vw, 1.4rem); }
  .is-scrolly .story-hint { justify-content: center; }
  .is-scrolly .story-progress { margin-top: 1.25rem; }
}

/* Movimiento reducido: sin zoom ni temblor; cambios suaves por opacidad */
@media (prefers-reduced-motion: reduce) {
  .cam { transform: none !important; transition: none; }
  .story-stage svg *, .story-line {
    transition-duration: .35s !important; transition-timing-function: ease !important; transition-delay: 0s !important;
    animation: none !important;
  }
  .mtn, .bag, .fam { transform: none !important; opacity: 0; transition-property: opacity !important; }
  [data-scene="4"] .mtn, [data-scene="5"] .mtn, [data-scene="6"] .mtn, [data-scene="7"] .mtn,
  [data-scene="7"] .bag, [data-scene="8"] .fam { opacity: 1; }
}

/* Superficies del navegador */
::selection { background: #E3C9A8; color: var(--ink); }
:focus-visible { outline: 2px solid var(--brown); outline-offset: 3px; }

@media (max-width: 860px) {
  .is-scrolly .story-sticky { align-content: center; }
  .is-scrolly .story-stage { aspect-ratio: 1 / 1; max-height: 56svh; }
}

.product-soon {
  margin: auto 0 0; align-self: flex-start;
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 500;
  color: var(--brown-dark); background: #EADBC6; padding: .45rem .8rem; border-radius: 2px;
}

/* Redes (aún sin enlace) */
.social { list-style: none; display: flex; justify-content: center; gap: 1.25rem; margin: 0 0 1.75rem; padding: 0; }
.social-icon { display: inline-flex; color: var(--brown-dark); opacity: .75; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
