/* ═══════════════════════════════════════════════════════════════
   Barras Mocca — recorrido con la caja girando + tienda online
   ═══════════════════════════════════════════════════════════════ */
:root {
  --studio: #d6d8d9;          /* gris del estudio del video */
  --wine: #7A1F35;
  --wine-dark: #3D0D18;
  --wine-mid: #9B2842;
  --cream: #FAF7F2;
  --warm: #F2EAE0;
  --ink: #1F0B10;
  --ink-soft: #5b4a4e;
  --gold: #C8A94A;
  --font: "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { font-family: var(--font); background: var(--studio); color: var(--ink); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Grano sutil, da textura "de estudio" a toda la página */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 90; opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─── Loader ─── */
#loader {
  position: fixed; inset: 0; z-index: 200; background: var(--wine-dark); color: var(--cream);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6rem;
  transition: opacity .8s var(--ease), visibility .8s;
}
#loader.hidden { opacity: 0; visibility: hidden; }
.loader-brand { font-size: clamp(3rem, 9vw, 6rem); font-weight: 900; letter-spacing: -.05em; }
.loader-brand span { color: var(--gold); }
.loader-track { width: min(260px, 60vw); height: 2px; background: rgba(250,247,242,.15); overflow: hidden; }
#loader-bar { height: 100%; width: 0; background: var(--gold); transition: width .2s linear; }
#loader-percent { font-size: .75rem; letter-spacing: .3em; opacity: .55; font-variant-numeric: tabular-nums; }

/* ─── Header ─── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between;
  padding: 1.3rem 5vw; transition: background .5s var(--ease), padding .5s var(--ease), color .5s;
}
.site-header.solid { background: rgba(61,13,24,.92); backdrop-filter: blur(14px); color: var(--cream); padding-block: .9rem; }
.logo { font-size: 1.05rem; font-weight: 500; letter-spacing: -.01em; }
.logo b { font-weight: 900; color: var(--wine); transition: color .5s; }
.site-header.solid .logo b { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 2rem; font-size: .82rem; font-weight: 600; letter-spacing: .04em; }
.nav-links a { opacity: .75; transition: opacity .3s; }
.nav-links a:hover { opacity: 1; }
.nav-cta { opacity: 1 !important; background: var(--wine); color: var(--cream); padding: .65rem 1.2rem; border-radius: 999px; }
.site-header.solid .nav-cta { background: var(--gold); color: var(--wine-dark); }

/* ─── Canvas ─── */
.canvas-wrap { position: fixed; inset: 0; z-index: 1; }
#canvas { width: 100%; height: 100%; display: block; }

/* ─── Hero (fijo) ─── */
#hero-overlay {
  position: fixed; inset: 0; z-index: 20; pointer-events: none;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 0 5vw 9vh;
}
/* Velo suave detrás del título para que se lea aunque la caja quede cerca. */
#hero-overlay::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(214,216,217,.82) 0%, rgba(214,216,217,.55) 38%, rgba(214,216,217,0) 62%); }
.hero-kicker { display: inline-flex; align-items: center; gap: .6rem; font-size: .75rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--wine); margin-bottom: 1.2rem; opacity: 0; animation: fadeIn .9s var(--ease) .2s forwards; }
.hero-kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(200,169,74,.25); }
.hero-heading { font-size: clamp(3.6rem, 8.6vw, 12rem); font-weight: 900; line-height: .86; letter-spacing: -.065em; color: var(--wine-dark); max-width: 9ch; }
.hero-word { display: inline-block; opacity: 0; transform: translateY(60px); animation: wordUp 1s var(--ease) forwards; margin-right: .18em; }
.hero-word:nth-child(1) { animation-delay: .3s; }
.hero-word:nth-child(2) { animation-delay: .43s; }
.hero-word:nth-child(3) { animation-delay: .56s; }
.hero-word:nth-child(4) { animation-delay: .69s; }
.hero-word.accent { color: var(--wine-mid); font-style: italic; font-weight: 800; }
.hero-tagline { margin-top: 1.6rem; font-size: clamp(1rem, 1.5vw, 1.35rem); color: var(--ink-soft); font-weight: 400; opacity: 0; animation: fadeIn 1s var(--ease) 1.2s forwards; }
.scroll-indicator { position: absolute; right: 5vw; bottom: 9vh; display: flex; flex-direction: column; align-items: center; gap: .7rem; font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; color: var(--wine); opacity: 0; animation: fadeIn 1s var(--ease) 1.5s forwards; }
.scroll-indicator i { width: 1px; height: 56px; background: linear-gradient(var(--wine), transparent); animation: drip 2s ease-in-out infinite; transform-origin: top; }
/* Antes de cargar los cuadros, el hero espera. */
body.loading .hero-word, body.loading .hero-kicker, body.loading .hero-tagline, body.loading .scroll-indicator { animation-play-state: paused; }
@keyframes wordUp { to { opacity: 1; transform: none; } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ─── Overlay oscuro (cifras) ─── */
#dark-overlay { position: fixed; inset: 0; z-index: 5; background: var(--wine-dark); opacity: 0; pointer-events: none; }

/* ─── Recorrido ─── */
#scroll-container { position: relative; z-index: 10; height: 1000vh; }
.scroll-section { position: absolute; left: 0; right: 0; transform: translateY(-50%); pointer-events: none; }
.scroll-section .section-inner > * { pointer-events: auto; }
.align-left { padding-left: 5vw; padding-right: 55vw; }
.align-right { padding-left: 60vw; padding-right: 5vw; }
.align-left .section-inner, .align-right .section-inner { max-width: 38vw; }
.section-label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--wine-mid); margin-bottom: 1.4rem; }
.section-heading { font-size: clamp(2.6rem, 4.6vw, 5.4rem); font-weight: 900; line-height: .95; letter-spacing: -.05em; color: var(--wine-dark); }
.section-body { margin-top: 1.6rem; font-size: clamp(1rem, 1.15vw, 1.2rem); line-height: 1.65; color: var(--ink-soft); max-width: 34ch; }
.flavor-list { list-style: none; display: grid; gap: .65rem; }
.flavor-list li { display: flex; align-items: center; gap: .8rem; font-weight: 600; color: var(--ink); }
.flavor-list i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent); flex: none; }
.cta-button { display: inline-flex; align-items: center; gap: .7rem; margin-top: 2.2rem; background: var(--wine); color: var(--cream); padding: 1.15rem 2rem; border-radius: 999px; font-weight: 700; letter-spacing: .02em; transition: transform .4s var(--ease), background .4s; }
.cta-button:hover { transform: translateY(-3px); background: var(--wine-mid); }
.cta-button span { transition: transform .4s var(--ease); }
.cta-button:hover span { transform: translateX(4px); }

/* Cifras sobre el overlay oscuro (único texto centrado) */
.section-stats { padding: 0 5vw; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; max-width: 1200px; margin: 0 auto; text-align: center; color: var(--cream); }
.stat { display: grid; grid-template-columns: auto auto; justify-content: center; align-items: baseline; }
.stat-number { font-size: clamp(4rem, 9vw, 9rem); font-weight: 900; letter-spacing: -.06em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-suffix { font-size: clamp(1.4rem, 2.4vw, 2.4rem); font-weight: 800; color: var(--gold); margin-left: .12em; }
.stat-label { grid-column: 1 / -1; text-align: center; margin-top: .9rem; font-size: .8rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; opacity: .6; }

/* ─── Bloques después del recorrido (tapan el canvas) ─── */
.after { position: relative; z-index: 30; }
.block { padding: 9rem 0; }
.block-light { background: var(--cream); }
.block-cream { background: var(--warm); }
.block-wine { background: var(--wine-dark); color: var(--cream); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 5vw; }
.block-head { max-width: 760px; margin-bottom: 4rem; }
.eyebrow { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--wine-mid); margin-bottom: 1.2rem; }
.block-head h2 { font-size: clamp(2.6rem, 5.6vw, 5.6rem); font-weight: 900; line-height: .95; letter-spacing: -.05em; color: var(--wine-dark); }
.block-head p { margin-top: 1.4rem; font-size: 1.1rem; line-height: 1.6; color: var(--ink-soft); max-width: 56ch; }
.block-head.on-dark h2 { color: var(--cream); }
.block-head.on-dark .eyebrow { color: var(--gold); }
.block-head.on-dark p { color: rgba(250,247,242,.65); }

/* Sabores */
.flavor-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.2rem; }
.flavor-card { background: #fff; border-radius: 22px; overflow: hidden; transition: transform .6s var(--ease), box-shadow .6s var(--ease); box-shadow: 0 1px 2px rgba(31,11,16,.05); }
.flavor-card:hover { transform: translateY(-8px); box-shadow: 0 24px 50px -24px color-mix(in srgb, var(--c) 55%, transparent); }
.flavor-card img { aspect-ratio: 1; object-fit: cover; width: 100%; background: var(--warm); }
.flavor-card div { padding: 1.2rem 1.2rem 1.5rem; }
.flavor-card .tag { display: inline-block; font-size: .66rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); padding: .3rem .65rem; border-radius: 999px; }
.flavor-card h3 { margin-top: .8rem; font-size: 1.02rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.flavor-card p { margin-top: .5rem; font-size: .85rem; color: var(--ink-soft); }

/* Nutrición */
.nutri-tabs { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.nutri-tabs button { border: 1.5px solid rgba(31,11,16,.15); background: transparent; padding: .7rem 1.2rem; border-radius: 999px; font-weight: 700; font-size: .85rem; cursor: pointer; transition: all .35s var(--ease); }
.nutri-tabs button[aria-selected="true"] { background: var(--c); border-color: var(--c); color: #fff; }
.nutri-panel { display: grid; grid-template-columns: 1fr 1.3fr; gap: 3rem; background: #fff; border-radius: 26px; padding: 2.6rem; }
.nutri-kcal { font-size: clamp(4rem, 8vw, 7rem); font-weight: 900; letter-spacing: -.06em; line-height: 1; color: var(--wine-dark); }
.nutri-kcal small { font-size: 1rem; font-weight: 600; letter-spacing: 0; color: var(--ink-soft); }
.nutri-ing { margin-top: 1.4rem; font-size: .95rem; line-height: 1.6; color: var(--ink-soft); }
.nutri-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.nutri-table td { padding: .75rem 0; border-bottom: 1px solid rgba(31,11,16,.08); }
.nutri-table td:nth-child(2) { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.nutri-table td:nth-child(3) { text-align: right; width: 5.5rem; color: var(--ink-soft); font-size: .8rem; }
.nutri-table tr.sub td:first-child { padding-left: 1.2rem; color: var(--ink-soft); }

/* ─── Tienda ─── */
.shop { display: grid; grid-template-columns: 1fr 380px; gap: 2rem; align-items: start; }
.shop-step { border: 0; background: rgba(250,247,242,.04); border: 1px solid rgba(250,247,242,.09); border-radius: 24px; padding: 2rem; margin-bottom: 1.4rem; }
.shop-step legend { float: left; width: 100%; display: flex; align-items: baseline; gap: .8rem; font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 1.6rem; }
.shop-step legend span { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--gold); color: var(--wine-dark); font-size: .95rem; font-weight: 900; transform: translateY(2px); }
.shop-step legend small { font-size: .82rem; font-weight: 500; opacity: .5; letter-spacing: 0; }
.shop-step > *:not(legend) { clear: both; }
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.product { display: flex; flex-direction: column; background: rgba(250,247,242,.06); border-radius: 18px; overflow: hidden; border: 1.5px solid transparent; transition: border-color .35s, background .35s; }
.product.selected { border-color: var(--c); background: rgba(250,247,242,.1); }
.product img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.product .p-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.product h4 { font-size: .98rem; font-weight: 800; letter-spacing: -.01em; display: flex; align-items: flex-start; gap: .5rem; }
.product h4 i { flex: none; width: 9px; height: 9px; margin-top: .42em; border-radius: 50%; background: var(--c); }
.product p { font-size: .78rem; opacity: .55; margin: .25rem 0 .9rem; }
.stepper { display: flex; align-items: center; justify-content: space-between; margin-top: auto; background: rgba(0,0,0,.25); border-radius: 999px; padding: .25rem; }
.stepper button { width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 0; background: rgba(250,247,242,.1); color: var(--cream); font-size: 1.2rem; font-weight: 700; cursor: pointer; transition: background .25s; }
.stepper button:hover { background: var(--gold); color: var(--wine-dark); }
.stepper input { width: 3rem; text-align: center; background: transparent; border: 0; font-weight: 800; font-size: 1.05rem; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

.delivery { display: grid; gap: .8rem; }
.opt { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; border-radius: 16px; border: 1.5px solid rgba(250,247,242,.12); cursor: pointer; transition: border-color .3s, background .3s; }
.opt:has(input:checked) { border-color: var(--gold); background: rgba(200,169,74,.08); }
.opt:has(input:disabled) { opacity: .4; cursor: not-allowed; }
.opt input { accent-color: var(--gold); width: 1.15rem; height: 1.15rem; flex: none; }
.opt span { display: flex; flex-direction: column; gap: .15rem; flex: 1; }
.opt small { font-size: .8rem; opacity: .55; }
.opt em { font-style: normal; font-size: .78rem; font-weight: 700; color: var(--gold); white-space: nowrap; }
.rule { margin-top: 1rem; font-size: .85rem; color: var(--gold); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.2rem; }
.f { display: flex; flex-direction: column; gap: .45rem; font-size: .78rem; font-weight: 600; letter-spacing: .04em; opacity: .9; }
.f small { opacity: .5; font-weight: 500; }
.f.wide { grid-column: 1 / -1; }
.f input, .f select, .f textarea { background: rgba(250,247,242,.07); border: 1.5px solid rgba(250,247,242,.12); border-radius: 12px; padding: .85rem 1rem; font-size: .95rem; font-weight: 500; letter-spacing: 0; outline: none; transition: border-color .3s; }
.f input:focus, .f select:focus, .f textarea:focus { border-color: var(--gold); }
.f select option { color: var(--ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.summary { position: sticky; top: 6.5rem; background: var(--cream); color: var(--ink); border-radius: 26px; padding: 2rem; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.summary h3 { font-size: 1.3rem; font-weight: 900; letter-spacing: -.03em; margin-bottom: 1.2rem; }
.sum-items { list-style: none; display: grid; gap: .5rem; font-size: .9rem; min-height: 1.5rem; }
.sum-items li { display: flex; justify-content: space-between; gap: 1rem; }
.sum-items li.empty { opacity: .45; }
.sum-rows { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid rgba(31,11,16,.1); display: grid; gap: .55rem; font-size: .9rem; }
.sum-rows div { display: flex; justify-content: space-between; }
.sum-rows dt { color: var(--ink-soft); }
.sum-rows dd { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.sum-total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 1.2rem; padding-top: 1.2rem; border-top: 2px solid var(--ink); }
.sum-total span { font-weight: 700; }
.sum-total strong { font-size: 2.2rem; font-weight: 900; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.tier-hint { margin-top: .6rem; font-size: .8rem; color: var(--wine-mid); font-weight: 600; min-height: 1.2em; }
.turnstile { margin-top: 1.2rem; min-height: 0; }
.form-error { margin-top: 1rem; font-size: .85rem; color: #b42318; background: #fde8e7; padding: .7rem .9rem; border-radius: 10px; }
.submit { margin-top: 1.2rem; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: .7rem; background: #1f8f4e; color: #fff; border: 0; padding: 1.1rem; border-radius: 999px; font-weight: 800; font-size: 1rem; cursor: pointer; transition: transform .35s var(--ease), background .35s, opacity .35s; }
.submit svg { width: 20px; height: 20px; }
.submit:hover:not(:disabled) { transform: translateY(-2px); background: #177a41; }
.submit:disabled { opacity: .35; cursor: not-allowed; }
.fineprint { margin-top: .9rem; font-size: .74rem; color: var(--ink-soft); line-height: 1.5; text-align: center; }

.done { max-width: 520px; margin: 0 auto; text-align: center; background: var(--cream); color: var(--ink); border-radius: 28px; padding: 3rem 2rem; }
.done-icon { width: 4rem; height: 4rem; margin: 0 auto 1.2rem; border-radius: 50%; display: grid; place-items: center; background: #1f8f4e; color: #fff; font-size: 2rem; font-weight: 900; }
.done h3 { font-size: 2rem; font-weight: 900; letter-spacing: -.04em; }
.done p { margin-top: .8rem; color: var(--ink-soft); line-height: 1.6; }
.as-link { width: auto; padding-inline: 2rem; margin-top: 1.6rem; }
.link { display: block; margin: 1.2rem auto 0; background: none; border: 0; color: var(--wine); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Footer */
.site-footer { background: #24070e; color: var(--cream); padding: 3rem 0; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; align-items: center; }
.foot-brand { font-size: 1.4rem; font-weight: 500; }
.foot-brand b { font-weight: 900; color: var(--gold); }
.foot-brand small { display: block; font-size: .72rem; letter-spacing: .25em; text-transform: uppercase; opacity: .5; margin-top: .3rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.6rem; font-size: .88rem; opacity: .8; }
.foot-links a:hover { color: var(--gold); }

/* ─── Responsive ─── */
@media (max-width: 1100px) {
  .flavor-cards { grid-template-columns: repeat(3, 1fr); }
  .shop { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 768px) {
  .nav-links a:not(.nav-cta) { display: none; }
  #scroll-container { height: 620vh; }
  .align-left, .align-right { padding: 0 6vw; }
  .align-left .section-inner, .align-right .section-inner {
    max-width: none; background: rgba(250,247,242,.82); backdrop-filter: blur(10px); padding: 1.8rem; border-radius: 22px;
  }
  .section-heading { font-size: clamp(2.2rem, 9vw, 3rem); }
  .hero-heading { font-size: clamp(3.4rem, 17vw, 6rem); }
  .scroll-indicator { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 2.4rem 1rem; }
  .block { padding: 6rem 0; }
  .flavor-cards { grid-template-columns: 1fr 1fr; }
  .products { grid-template-columns: 1fr 1fr; }
  .fields { grid-template-columns: 1fr; }
  .nutri-panel { grid-template-columns: 1fr; padding: 1.6rem; gap: 1.6rem; }
  .shop-step { padding: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-word, .hero-kicker, .hero-tagline, .scroll-indicator { animation: none; opacity: 1; transform: none; }
}

/* Campo con formato inválido (p. ej. email) */
.shop input.invalid { border-color: #e0605a !important; box-shadow: 0 0 0 3px rgba(224,96,90,.18); }
