/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:        #faf5ee;
  --bg-2:      #f1e7d9;
  --paper:     #ffffff;
  --ink:       #2c2735;
  --ink-soft:  #423a4f;
  --ink-mute:  #7c7286;
  --accent:    #887abf;   /* lavender — from brand logo */
  --accent-dk: #6d5da3;
  --accent-2:  #c65b7c;   /* berry — warm secondary */
  --gold:      #d3a86b;
  --line:      rgba(44,39,53,0.12);
  --line-soft: rgba(44,39,53,0.07);

  --serif: "Fraunces", "Georgia", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:     cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --nav-h: 76px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  overflow-x: clip;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.01em; font-family: var(--serif); font-weight: 500; }
em { font-style: italic; color: var(--accent-dk); }
ul { list-style: none; padding: 0; }
::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent-dk);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--ink); color: var(--bg);
  z-index: 9999; border-radius: 8px; font-weight: 500;
  transition: top .3s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.container { max-width: 1240px; margin-inline: auto; padding-inline: 1.25rem; }

/* =============================================================
   3. Reveal / defensive
   ============================================================= */
[data-reveal] {
  opacity: 0; transform: translateY(32px);
  transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }
/* Defensive: element with reveal + split must never stay invisible */
.reveal[data-split], [data-reveal][data-split] {
  opacity: 1;
}

/* =============================================================
   4. Typography
   ============================================================= */
.kicker {
  font-family: var(--sans); font-weight: 600; font-size: .78rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent-dk);
  margin-bottom: .9rem;
}
.section-title {
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  margin-bottom: 1.1rem;
  max-width: 20ch;
}
.section-lead {
  font-size: 1.08rem; color: var(--ink-mute); max-width: 56ch;
  margin-bottom: 2.6rem;
}
.section-lead-small { color: var(--ink-mute); margin-bottom: 1.2rem; }

/* =============================================================
   5. Buttons
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .95rem 1.7rem; border-radius: 999px;
  font-weight: 600; font-size: .95rem;
  box-shadow: 0 4px 14px rgba(44,39,53,0.08), 0 1px 3px rgba(44,39,53,0.06);
  transition: transform .45s var(--ease-soft), box-shadow .45s var(--ease-soft), background-color .3s, color .3s;
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px rgba(136,122,191,0.28), 0 8px 18px rgba(44,39,53,0.14);
}
.btn:active { transform: translateY(-1px); transition-duration: .12s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dk); }
.btn-ghost { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.btn-lg { padding: 1.1rem 2.1rem; font-size: 1.02rem; }

/* =============================================================
   6. Nav
   ============================================================= */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 200;
  height: var(--nav-h);
  transition: background-color .4s var(--ease-out), box-shadow .4s var(--ease-out), backdrop-filter .4s var(--ease-out);
}
.nav.is-scrolled {
  background: rgba(250,245,238,0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.nav-inner {
  max-width: 1240px; margin-inline: auto; padding-inline: 1.25rem;
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav-brand { display: flex; align-items: center; }
.nav-logo { height: 34px; width: auto; }
.nav-links { display: none; gap: 1.7rem; }
.nav-links a {
  position: relative; font-weight: 500; font-size: .95rem; padding: .3rem 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--accent-dk); transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { display: none; }
.nav-burger {
  display: grid; gap: 5px; padding: .5rem; z-index: 210;
}
.nav-burger span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  position: fixed; inset: 0; z-index: 190;
  background: var(--bg);
  display: grid; place-items: center;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .6s var(--ease-soft);
}
.nav-mobile.is-open { clip-path: inset(0); }
.nav-mobile nav { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; }
.nav-mobile a { font-family: var(--serif); font-size: 1.6rem; }
.nav-mobile .btn { margin-top: 1rem; }

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-burger { display: none; }
}

/* =============================================================
   7. Hero
   ============================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  padding-top: var(--nav-h);
  padding-bottom: 3rem;
  overflow: clip;
  isolation: isolate;
}
.hero-halo {
  position: absolute; inset: -20% -10% -10% -10%; z-index: -1;
  background:
    radial-gradient(45% 40% at 22% 20%, rgba(136,122,191,.30), transparent 65%),
    radial-gradient(50% 45% at 82% 68%, rgba(198,91,124,.16), transparent 65%),
    radial-gradient(60% 50% at 50% 100%, rgba(211,168,107,.14), transparent 70%);
  filter: blur(60px);
}
.hero-inner {
  text-align: center; max-width: 780px; padding-inline: 1.25rem;
  display: flex; flex-direction: column; align-items: center;
}
.hero-logo { height: 64px; width: auto; margin-bottom: 1.6rem; }
.hero-title {
  font-size: clamp(2.3rem, 7vw, 4.6rem);
  max-width: 16ch;
  margin-bottom: 1.3rem;
}
.hero-sub {
  font-size: 1.15rem; color: var(--ink-mute); max-width: 52ch;
  margin-bottom: 2.2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* =============================================================
   7b. Monedero Dulce
   ============================================================= */
.monedero-grid {
  display: grid; grid-template-columns: 1fr; gap: 2.6rem; align-items: center;
}
@media (min-width: 960px) { .monedero-grid { grid-template-columns: 0.85fr 1.15fr; gap: 3.5rem; } }
.monedero-figure { display: flex; justify-content: center; }
.monedero-figure img { width: min(320px, 100%); }
.monedero-text p { color: var(--ink-soft); font-size: 1.04rem; margin-bottom: 1.6rem; max-width: 52ch; }
.monedero-benefits { display: grid; gap: 1.2rem; margin-bottom: 2rem; }
.monedero-benefits li {
  display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem;
  border-top: 1px solid var(--line-soft); padding-top: 1rem;
}
.monedero-benefits strong {
  font-family: var(--serif); font-size: 1.1rem; color: var(--accent-dk);
  white-space: nowrap;
}
.monedero-benefits span { color: var(--ink-mute); font-size: .95rem; }

/* =============================================================
   8. Marquee
   ============================================================= */
.marquee {
  overflow: hidden; position: relative;
  padding-block: 1.1rem;
  background: var(--ink);
  color: var(--bg);
}
.marquee::before, .marquee::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 60px; z-index: 2; pointer-events: none;
}
.marquee::before { left: 0;  background: linear-gradient(90deg, var(--ink), transparent); }
.marquee::after  { right: 0; background: linear-gradient(270deg, var(--ink), transparent); }
.marquee-track {
  display: inline-flex; gap: 1.4rem; white-space: nowrap; will-change: transform;
  font-family: var(--serif); font-style: italic; font-size: 1.15rem;
}
.marquee-track span { opacity: .88; }

/* =============================================================
   9. Sections generic
   ============================================================= */
.section { padding-block: 5.5rem; }
.section-alt { background: var(--bg-2); }

/* =============================================================
   10. Sabores grid
   ============================================================= */
.sabores-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.6rem;
  margin-bottom: 3.2rem;
}
@media (min-width: 640px) { .sabores-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .sabores-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .sabores-grid { grid-template-columns: repeat(4, 1fr); } }
.sabores-grid-destacados { max-width: 1000px; margin-inline: auto; }
@media (min-width: 1280px) { .sabores-grid-destacados { grid-template-columns: repeat(3, 1fr); } }
.sabores-cta { text-align: center; margin-top: -1.6rem; margin-bottom: 0; }

.sabor-card {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  background: var(--paper);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  position: relative; isolation: isolate;
  box-shadow: 0 22px 44px -32px rgba(44,39,53,.45);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .55s var(--ease-soft), box-shadow .45s var(--ease-soft);
}
.sabor-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: radial-gradient(240px circle at var(--mx) var(--my), rgba(136,122,191,.26), transparent 62%);
  opacity: 0; transition: opacity .35s;
}
.sabor-card:hover {
  transition-duration: .15s;
  box-shadow: 0 38px 70px -28px rgba(136,122,191,0.4), 0 16px 30px -16px rgba(44,39,53,0.2);
}
.sabor-card:hover::before { opacity: 1; }

.sabor-img-wrap {
  position: relative;
  aspect-ratio: 6/5;
  background:
    linear-gradient(180deg, transparent 60%, rgba(44,39,53,.5) 130%),
    var(--bg-2);
}
.sabor-img { position: relative; z-index: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-soft); }
.sabor-card:hover .sabor-img { transform: scale(1.08); }

.sabor-tag {
  position: absolute; left: 14px; bottom: -14px; z-index: 2;
  background: var(--paper); color: var(--accent-dk);
  font-family: var(--sans); font-weight: 700; font-size: .66rem;
  letter-spacing: .09em; text-transform: uppercase;
  padding: .4rem .8rem; border-radius: 999px;
  box-shadow: 0 8px 18px -6px rgba(44,39,53,.3);
}

.sabor-body { padding: 1.7rem 1.3rem 1.5rem; }
.sabor-card h3 {
  font-size: 1.3rem; margin-bottom: .55rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid var(--line-soft);
}
.sabor-card p { font-size: .92rem; color: var(--ink-mute); line-height: 1.6; }

.sabores-mas {
  background: var(--paper); border: 1px solid var(--line-soft); border-radius: 20px;
  padding: 2rem clamp(1.25rem, 4vw, 2.6rem);
}
.sabores-mas h3 { font-size: 1.4rem; margin-bottom: .4rem; }
.sabores-lista { display: grid; gap: .9rem; }
@media (min-width: 720px) { .sabores-lista { grid-template-columns: repeat(2, 1fr); column-gap: 2.4rem; } }
.sabores-lista li { font-size: .95rem; color: var(--ink-soft); border-top: 1px solid var(--line-soft); padding-top: .9rem; }
.sabores-lista strong { color: var(--ink); font-family: var(--serif); font-size: 1.02rem; }

/* =============================================================
   11. Galería
   ============================================================= */
.galeria-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.4rem;
}
@media (min-width: 720px) { .galeria-grid { grid-template-columns: repeat(3, 1fr); } }
.galeria-item {
  position: relative;
  border-radius: 20px; overflow: hidden; aspect-ratio: 4/5;
  box-shadow: 0 20px 40px -18px rgba(44,39,53,0.22);
}
.galeria-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease-soft); }
.galeria-item:hover img { transform: scale(1.06); }

.fotos-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem;
  margin-bottom: 3rem;
}
@media (min-width: 640px) { .fotos-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .fotos-grid { grid-template-columns: repeat(4, 1fr); } }
.galeria-item figcaption {
  position: absolute; inset: auto 0 0 0; z-index: 1;
  padding: 2.2rem .9rem .8rem;
  background: linear-gradient(180deg, transparent, rgba(44,39,53,.72));
  color: #fff; font-weight: 600; font-size: .88rem;
}

/* =============================================================
   12. Ubicaciones
   ============================================================= */
.ubicaciones-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.4rem;
}
@media (min-width: 640px) { .ubicaciones-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .ubicaciones-grid { grid-template-columns: repeat(3, 1fr); } }
.ubicacion-card {
  --mx: 50%; --my: 50%;
  background: var(--paper); border: 1px solid var(--line-soft); border-radius: 18px;
  padding: 1.8rem; position: relative; isolation: isolate; overflow: hidden;
  transition: transform .4s var(--ease-soft), box-shadow .4s var(--ease-soft);
}
.ubicacion-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(200px circle at var(--mx) var(--my), rgba(136,122,191,.18), transparent 62%);
  opacity: 0; transition: opacity .35s;
}
.ubicacion-card:hover { transform: translateY(-5px); box-shadow: 0 24px 46px -22px rgba(44,39,53,0.24); }
.ubicacion-card:hover::before { opacity: 1; }
.ubicacion-num { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 1.1rem; }
.ubicacion-card h3 { font-size: 1.2rem; margin: .5rem 0 .5rem; }
.ubicacion-card p { color: var(--ink-mute); font-size: .92rem; margin-bottom: 1rem; }
.ubicacion-link { font-weight: 600; color: var(--accent-dk); font-size: .9rem; }

/* =============================================================
   13. Historia
   ============================================================= */
.section-historia { background: var(--bg-2); }
.historia-grid {
  display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center;
}
@media (min-width: 960px) { .historia-grid { grid-template-columns: 1.1fr 0.9fr; } }
.historia-text p { margin-bottom: 1.1rem; color: var(--ink-soft); font-size: 1.04rem; }
.historia-stat {
  display: flex; align-items: baseline; gap: 1rem; margin-top: 1.6rem;
  padding-top: 1.6rem; border-top: 1px solid var(--line);
}
.historia-stat-num { font-family: var(--serif); font-size: 2.6rem; color: var(--accent-dk); }
.historia-stat-label { color: var(--ink-mute); font-size: .92rem; max-width: 22ch; }
.historia-figure {
  display: flex; justify-content: center;
}
.historia-figure img { width: min(360px, 100%); }

/* =============================================================
   14. CTA final
   ============================================================= */
.section-cta {
  position: relative; text-align: center; overflow: clip;
}
.cta-inner { max-width: 720px; margin-inline: auto; position: relative; }
.cta-mascot {
  width: min(160px, 34vw); margin-inline: auto; margin-bottom: 1.2rem;
}
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: .6rem; }

/* =============================================================
   15. Footer
   ============================================================= */
.footer { background: var(--ink); color: var(--bg); padding-top: 4rem; }
.footer-inner {
  display: grid; grid-template-columns: 1fr; gap: 2.4rem;
  padding-bottom: 3rem; border-bottom: 1px solid rgba(250,245,238,0.14);
}
@media (min-width: 720px) { .footer-inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-logo { height: 30px; width: auto; margin-bottom: 1rem; filter: brightness(0) invert(1); }
.footer-brand p { color: rgba(250,245,238,0.6); font-size: .92rem; max-width: 30ch; margin-bottom: 1.2rem; }
.social-row { display: flex; gap: .7rem; }
.social-icon {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(250,245,238,0.08); color: rgba(250,245,238,0.75);
  border: 1px solid rgba(250,245,238,0.14);
  transition: background-color .3s, color .3s, transform .3s var(--ease-soft);
}
.social-icon:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-3px); }
.footer-col h4 { font-family: var(--sans); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(250,245,238,0.5); margin-bottom: 1rem; }
.footer-col { display: flex; flex-direction: column; gap: .65rem; font-size: .92rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { max-width: 1240px; margin-inline: auto; padding: 1.6rem 1.25rem; font-size: .82rem; color: rgba(250,245,238,0.5); }

/* =============================================================
   15b. Global cursor glow (follows the pointer across the page)
   ============================================================= */
.cursor-glow {
  position: fixed; top: 0; left: 0; z-index: 1;
  width: 480px; height: 480px; margin: -240px 0 0 -240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(136,122,191,.16), rgba(198,91,124,.07) 45%, transparent 70%);
  pointer-events: none;
  will-change: transform;
  transition: opacity .3s;
}
@media (max-width: 959px), (hover: none) {
  .cursor-glow { display: none; }
}

/* =============================================================
   16. WhatsApp float
   ============================================================= */
.whatsapp-float {
  position: fixed; right: 1.3rem; bottom: 1.3rem; z-index: 150;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 12px 30px rgba(37,211,102,0.45);
  transition: transform .35s var(--ease-soft);
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(37,211,102,0.55);
  animation: waPulse 2.4s ease-out infinite;
}
@keyframes waPulse {
  0%   { box-shadow: 0 0 0 0 rgba(37,211,102,0.5); }
  70%  { box-shadow: 0 0 0 18px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}
@media (prefers-reduced-motion: reduce) {
  .whatsapp-float::before { animation: none; }
}

/* =============================================================
   17. Splash
   ============================================================= */
.splash {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bg);
  display: grid; place-items: center;
  pointer-events: auto;
  transition: opacity .8s, clip-path 1s;
  animation: splashSafety .01s 4.5s forwards;
}
.splash.is-out { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); }
@keyframes splashSafety { to { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); } }
.splash-logo { height: 56px; width: auto; animation: splashPulse 1.4s ease-in-out infinite; }
@keyframes splashPulse { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }

/* =============================================================
   18. Reduced-motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .cta-mascot { animation: none; }
  /* Do NOT disable: reveals, tilt, hover, marquee, count-up */
}
