/* ==========================================================================
   Niebla · Tostaduría mágica — estilos (vanilla, sin build)
   ========================================================================== */
/* Tipografía oficial de Niebla (Amarante, SIL OFL 1.1), autoalojada */
@font-face {
  font-family: "Amarante";
  src: url("assets/fonts/amarante.woff2") format("woff2"), url("assets/fonts/amarante.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
:root {
  --charcoal: #080605;
  --espresso: #4A281B;
  --copper: #A75A2B;
  --parchment: #D8C7A1;
  --forest: #1D2720;
  --gold: #E0A840;
  --red: #8E2A22;

  --ink: #EDE3CC;           /* texto principal sobre oscuro */
  --ink-soft: rgba(237, 227, 204, .72);
  --ink-faint: rgba(237, 227, 204, .58);
  --line: rgba(216, 199, 161, .14);

  --f-title: "Amarante", "Times New Roman", serif;
  --f-accent: "Cormorant Garamond", Georgia, serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius: 18px;
  --glow: 0 0 0 1px rgba(216, 199, 161, .09), 0 30px 60px -30px rgba(0, 0, 0, .9), 0 10px 50px -18px rgba(167, 90, 43, .28);
  --glow-hover: 0 0 0 1px rgba(224, 168, 64, .18), 0 34px 70px -30px rgba(0, 0, 0, .9), 0 14px 70px -14px rgba(167, 90, 43, .45);
  --ease: cubic-bezier(.22, .8, .24, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { overflow-x: hidden; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--charcoal);
  color: var(--ink);
  font: 400 16px/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  position: relative;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
::selection { background: rgba(224, 168, 64, .35); color: #fff; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--parchment); color: var(--charcoal); padding: .5rem 1rem; border-radius: 8px; }
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ---------- Atmósfera continua (sin cortes entre secciones) ---------- */
.atmos {
  position: absolute; inset: 0; z-index: -3; pointer-events: none;
  /* Un solo gradiente largo para toda la página: las secciones son transparentes. */
  /* Notas de color: lavados grandes y difusos de la paleta (espresso, cobre, bosque, rojo profundo)
     repartidos a lo largo del documento. Base casi negra (~RGB 8-12) entre ellos. */
  background:
    radial-gradient(ellipse max(55vw, 420px) 70vh at 10% 15%, rgba(74, 40, 27, .42), transparent 70%),
    radial-gradient(ellipse max(40vw, 320px) 50vh at 92% 22%, rgba(120, 30, 24, .13), transparent 70%),
    radial-gradient(ellipse max(60vw, 460px) 75vh at 88% 36%, rgba(29, 39, 32, .8), transparent 70%),
    radial-gradient(ellipse max(45vw, 360px) 55vh at 8% 45%, rgba(167, 90, 43, .09), transparent 70%),
    radial-gradient(ellipse max(58vw, 440px) 70vh at 18% 59%, rgba(29, 39, 32, .75), transparent 70%),
    radial-gradient(ellipse max(48vw, 380px) 60vh at 92% 66%, rgba(74, 40, 27, .38), transparent 70%),
    radial-gradient(ellipse max(44vw, 340px) 55vh at 26% 78%, rgba(120, 30, 24, .12), transparent 70%),
    radial-gradient(ellipse max(40vw, 320px) 50vh at 78% 81%, rgba(167, 90, 43, .08), transparent 70%),
    radial-gradient(ellipse max(60vw, 460px) 60vh at 50% 93%, rgba(74, 40, 27, .34), transparent 70%),
    radial-gradient(ellipse max(40vw, 320px) 45vh at 6% 99%, rgba(29, 39, 32, .6), transparent 70%),
    linear-gradient(180deg,
      #080605 0%,
      #0A0706 10%,
      #0C0806 20%,
      #0A0706 30%,
      #070A08 40%,
      #080A08 48%,
      #0A0706 58%,
      #0C0806 67%,
      #0B0807 76%,
      #070A08 86%,
      #080605 100%);
}
#fog {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -2; pointer-events: none;
  opacity: .5;
  /* bordes difuminados: la niebla nunca termina en una línea */
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .018;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 .95  0 0 0 0 .85  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Sin halos por sección: el color vive en las 'notas' de .atmos y la luz de vela en el medallón y las tarjetas. */
.section { position: relative; padding: clamp(3rem, 6vw, 4.5rem) 0; }

/* Ornamento suave entre secciones */
.section + .section > .wrap::before {
  grid-column: 1 / -1; width: 100%;
  content: "✦"; display: block; text-align: center; color: rgba(224, 168, 64, .45);
  font-size: .8rem; letter-spacing: 0; margin: 0 auto clamp(2.5rem, 6vw, 4rem);
  background: linear-gradient(90deg, transparent, rgba(216, 199, 161, .22) 35%, transparent 47%, transparent 53%, rgba(216, 199, 161, .22) 65%, transparent) center / 100% 1px no-repeat;
  max-width: 420px;
}

.wrap { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }

/* ---------- Tipografía ---------- */
h1, h2, h3 { font-family: var(--f-title); font-weight: 500; letter-spacing: .04em; line-height: 1.15; margin: 0; color: #F2E7CF; }
h2 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); text-wrap: balance; }
h3 { font-size: 1.12rem; letter-spacing: .06em; }
em { font-family: var(--f-accent); font-style: italic; font-weight: 400; letter-spacing: .01em; }
.kicker {
  font: 500 .72rem/1.4 var(--f-mono); letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold); opacity: .85; margin: 0 0 1rem;
}
.section__head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section__head--center { text-align: center; max-width: 720px; margin-inline: auto; }
.section__sub { color: var(--ink-soft); font-family: var(--f-accent); font-size: clamp(1.15rem, 2.4vw, 1.35rem); font-style: italic; margin: 1rem 0 0; }
.lead { font-family: var(--f-accent); font-size: clamp(1.35rem, 3vw, 1.7rem); line-height: 1.4; color: var(--ink); margin-top: 0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 48px; padding: .8rem 1.6rem; border-radius: 999px;
  font: 500 .78rem/1.3 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; text-align: center;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), background-color .4s, border-color .4s, color .4s;
}
.btn--primary {
  background: linear-gradient(180deg, #c06c35, var(--copper));
  color: #1a0f08; font-weight: 600;
  box-shadow: 0 10px 40px -10px rgba(224, 140, 64, .55), inset 0 1px 0 rgba(255, 230, 190, .35);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 50px -8px rgba(224, 140, 64, .7), inset 0 1px 0 rgba(255, 230, 190, .4); }
.btn--ghost { border-color: rgba(216, 199, 161, .35); color: var(--parchment); background: rgba(8, 6, 5, .25); backdrop-filter: blur(4px); }
.btn--ghost:hover { border-color: var(--gold); color: #fff; transform: translateY(-2px); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem clamp(1rem, 4vw, 2.5rem);
  padding-top: max(.8rem, env(safe-area-inset-top));
  transition: background-color .5s, backdrop-filter .5s, box-shadow .5s;
}
.nav.is-scrolled { background: rgba(8, 6, 5, .55); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 1px 0 var(--line); }
.dev-banner:not([hidden]) ~ .nav { top: 28px; }
.nav__brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font: 400 .95rem/1 var(--f-title); letter-spacing: .3em; text-transform: uppercase; }
.nav__links { display: none; gap: clamp(1rem, 2.4vw, 2.2rem); }
.nav__links a { font: 400 .72rem/1 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; color: var(--ink-soft); transition: color .3s; }
.nav__links a:hover { color: var(--gold); }
.nav__wa { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; color: var(--parchment); font: 500 .7rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; padding: .6rem .9rem; border: 1px solid rgba(216, 199, 161, .25); border-radius: 999px; transition: border-color .3s, color .3s; }
.nav__wa:hover { border-color: var(--gold); color: #fff; }
.nav__wa span { display: none; }
.nav__actions { display: flex; align-items: center; gap: .55rem; }
/* Sección activa (desktop y panel) */
.nav__links a { position: relative; padding: .35rem 0; }
.nav__links a::after { content: ""; position: absolute; left: 50%; right: 50%; bottom: -.35rem; height: 1px; background: var(--gold); box-shadow: 0 0 10px rgba(224, 168, 64, .8); opacity: 0; transition: left .45s var(--ease), right .45s var(--ease), opacity .45s; }
.nav__links a.is-active { color: var(--gold); text-shadow: 0 0 16px rgba(224, 168, 64, .45); }
.nav__links a.is-active::after { left: 0; right: 0; opacity: 1; }

/* Botón hamburguesa (solo celular / tablet) */
.nav__toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid rgba(216, 199, 161, .25); background: rgba(8, 6, 5, .35); cursor: pointer; transition: border-color .3s, box-shadow .3s; }
.nav__toggle:hover, .nav__toggle[aria-expanded="true"] { border-color: var(--gold); box-shadow: 0 0 18px rgba(224, 168, 64, .25); }
.nav__burger { position: relative; width: 18px; height: 12px; }
.nav__burger i { position: absolute; left: 0; right: 0; height: 1.5px; border-radius: 2px; background: var(--parchment); transition: transform .4s var(--ease), opacity .3s, top .4s var(--ease); }
.nav__burger i:nth-child(1) { top: 0; }
.nav__burger i:nth-child(2) { top: 5.25px; }
.nav__burger i:nth-child(3) { top: 10.5px; }
.nav__toggle[aria-expanded="true"] .nav__burger i:nth-child(1) { top: 5.25px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__burger i:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] .nav__burger i:nth-child(3) { top: 5.25px; transform: rotate(-45deg); }
.nav__wa { min-height: 44px; min-width: 44px; justify-content: center; }
@media (min-width: 900px) { .nav__links { display: flex; } .nav__wa span { display: inline; } .nav__toggle, .menu { display: none !important; } }

/* Panel del menú (debajo del encabezado, que sigue visible con WhatsApp y el botón cerrar) */
body.menu-open { overflow: hidden; }
body.menu-open .nav { background: rgba(8, 6, 5, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
body.menu-open .cart-fab { opacity: 0; pointer-events: none; }
.menu { position: fixed; inset: 0; z-index: 38; }
.menu__backdrop { position: absolute; inset: 0; background: rgba(4, 3, 3, .62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity .45s var(--ease); }
.menu__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 86vw); overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column;
  padding: calc(5.4rem + env(safe-area-inset-top)) 1.8rem calc(2rem + env(safe-area-inset-bottom));
  background:
    radial-gradient(90% 45% at 100% 0%, rgba(167, 90, 43, .16), transparent 70%),
    radial-gradient(80% 40% at 0% 100%, rgba(29, 39, 32, .5), transparent 70%),
    linear-gradient(180deg, #0c0907, #080605 60%, #090807);
  border-left: 1px solid var(--line);
  box-shadow: -30px 0 80px -20px rgba(0, 0, 0, .9), -10px 0 60px -30px rgba(224, 150, 70, .25);
  transform: translateX(104%); transition: transform .55s var(--ease);
}
.dev-banner:not([hidden]) ~ .menu .menu__panel { padding-top: calc(7.2rem + env(safe-area-inset-top)); }
.menu.is-open .menu__backdrop { opacity: 1; }
.menu.is-open .menu__panel { transform: none; }
.menu__kicker { font: 500 .64rem/1.2 var(--f-mono); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); opacity: .85; margin: 0 0 1.2rem; }
.menu__list { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.menu__list li { border-bottom: 1px solid var(--line); opacity: 0; transform: translateX(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.menu__list li:first-child { border-top: 1px solid var(--line); }
.menu.is-open .menu__list li { opacity: 1; transform: none; }
.menu.is-open .menu__list li:nth-child(2) { transition-delay: .05s; }
.menu.is-open .menu__list li:nth-child(3) { transition-delay: .1s; }
.menu.is-open .menu__list li:nth-child(4) { transition-delay: .15s; }
.menu.is-open .menu__list li:nth-child(5) { transition-delay: .2s; }
.menu__list a { display: flex; align-items: baseline; gap: 1.1rem; padding: 1.05rem .3rem; text-decoration: none; color: var(--ink); transition: color .3s, text-shadow .3s; }
.menu__n { flex: none; width: 2.2rem; font: italic 500 1.25rem/1 var(--f-accent); color: var(--gold); opacity: .7; }
.menu__t { font: 500 1.45rem/1.1 var(--f-title); letter-spacing: .08em; }
.menu__list a:hover, .menu__list a:focus-visible { color: #fff; }
.menu__list a.is-active { color: var(--gold); text-shadow: 0 0 22px rgba(224, 168, 64, .45); }
.menu__list a.is-active .menu__n { opacity: 1; }
.menu__list a.is-active .menu__t::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: .7rem; vertical-align: middle; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.menu__foot { margin: auto 0 0; padding-top: 2rem; font: 400 .66rem/1.9 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.menu__foot a { color: var(--parchment); text-decoration: none; border-bottom: 1px solid rgba(216, 199, 161, .3); }
@media (prefers-reduced-motion: reduce) {
  .menu__panel, .menu__backdrop, .menu__list li, .nav__burger i, .nav__links a::after { transition: none !important; }
  .menu__list li { transform: none; }
}

.dev-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 45; height: 28px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font: 500 .64rem/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase;
  background: repeating-linear-gradient(135deg, rgba(224, 168, 64, .92) 0 14px, rgba(208, 152, 50, .92) 14px 28px);
  color: #1a0f08; padding: 0 .75rem; white-space: nowrap; overflow: hidden;
}
.dev-banner__more { display: none; }
@media (min-width: 640px) { .dev-banner__more { display: inline; } }

/* ---------- Portada ---------- */
.hero {
  position: relative; min-height: 100svh; display: grid; place-items: center;
  padding: 7rem 1.25rem 6rem; text-align: center; isolation: isolate; overflow-x: clip;
}
.hero__medallion::before { /* luz de vela concentrada en el medallón */
  content: ""; position: absolute; inset: -110%; border-radius: 50%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(224, 150, 70, .17), rgba(167, 90, 43, .05) 50%, transparent);
  animation: candle 6s ease-in-out infinite;
}
@keyframes candle { 0%, 100% { opacity: .85; } 40% { opacity: 1; } 55% { opacity: .78; } 70% { opacity: .95; } }
.hero__inner { max-width: 880px; }
.hero__medallion { position: relative; width: clamp(132px, 30vw, 188px); margin: 0 auto 2rem; border-radius: 50%; box-shadow: 0 0 0 1px rgba(216, 199, 161, .12), 0 0 80px -6px rgba(224, 150, 70, .35), 0 30px 60px -20px #000; animation: float 9s ease-in-out infinite; }
.hero__medallion img { width: 100%; height: auto; border-radius: 50%; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hero__title { font-size: clamp(2.9rem, 11vw, 6.4rem); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; line-height: 1; }
.hero__title em { display: block; margin-top: .9rem; font-size: clamp(1.5rem, 4.4vw, 2.5rem); letter-spacing: .04em; text-transform: none; color: var(--parchment); }
.hero__dash { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } /* guion solo para lectores/SEO */
.hero__tagline { text-wrap: balance; margin: 1.8rem auto 0; max-width: 40ch; font-family: var(--f-accent); font-style: italic; font-size: clamp(1.15rem, 2.6vw, 1.4rem); line-height: 1.45; color: var(--ink-soft); }
.hero__tagline span { display: block; margin-top: .5rem; font-family: var(--f-body); font-style: normal; font-size: .82em; color: var(--ink-faint); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: 2.4rem; }
.hero__claims { list-style: none; padding: 0; margin: 3rem auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.6rem; font: 400 .68rem/1.4 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-faint); }
.hero__claims li { display: flex; align-items: center; gap: .6rem; }
.hero__claims li::before { content: "✦"; color: var(--gold); opacity: .6; font-size: .7rem; }

/* ---------- Tarjetas "luz de vela" ---------- */
.card {
  position: relative; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 21, 16, .82), rgba(17, 12, 10, .86));
  box-shadow: var(--glow);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: box-shadow .6s var(--ease), transform .6s var(--ease);
}
.card:hover { box-shadow: var(--glow-hover); }

/* ---------- Nosotros ---------- */
.story__grid { display: grid; gap: 1.5rem 4rem; }
.story__text p { color: var(--ink-soft); max-width: 60ch; }
.story__text .lead { color: var(--ink); }
.story__pillars { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1rem; }
.story__pillars .card { padding: 1.5rem 1.5rem 1.4rem; }
.story__pillars p { margin: .5rem 0 0; color: var(--ink-soft); font-size: .95rem; }
.story__pillars--two .card { padding: 1.8rem 1.8rem 1.7rem; }
.story__pillars--two p { font-size: 1rem; line-height: 1.7; }
.story__label { font: 500 .7rem/1.2 var(--f-mono); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin: 0 0 .9rem; opacity: .9; }
.story__text .lead { font-family: var(--f-title); font-size: clamp(1.45rem, 3.2vw, 2rem); line-height: 1.25; letter-spacing: .02em; margin: 0 0 1rem; }
.emblem { display: block; height: auto; opacity: .88; filter: drop-shadow(0 0 22px rgba(224, 168, 64, .22)); margin-bottom: 1.2rem; }
.emblem--hat { width: clamp(84px, 11vw, 120px); }
.emblem--book { width: clamp(64px, 8vw, 88px); margin-inline: auto; opacity: .8; }
.section__note { margin: .9rem auto 0; max-width: 52ch; font-size: .92rem; color: var(--ink-faint); }
.pillar__n { display: block; font: italic 500 1.4rem/1 var(--f-accent); color: var(--gold); margin-bottom: .6rem; opacity: .8; }
@media (min-width: 900px) {
  .story__grid { grid-template-columns: 1fr 1.2fr; align-items: start; }
  .story__pillars { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
  .story__pillars--two { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Productos ---------- */
.products { display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
/* Con 2 columnas (tablet), un café impar al final queda centrado en vez de colgar a la izquierda */
@media (min-width: 706px) and (max-width: 1050px) { .products > .product:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc((100% - 1.6rem) / 2); } }
.products__loading, .products__error { grid-column: 1 / -1; text-align: center; color: var(--ink-faint); font-family: var(--f-accent); font-style: italic; font-size: 1.2rem; }
.product { display: flex; flex-direction: column; overflow: hidden; }
.product__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: radial-gradient(70% 70% at 50% 58%, rgba(167, 90, 43, .34), rgba(20, 14, 11, 0) 70%), linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,0)); }
.product__media img, .product__media svg { width: 100%; height: 100%; object-fit: cover; }
.product__media svg { object-fit: contain; }
/* Etiquetas reales: se muestran completas, sobre negro, con brillo de vela */
.product__media--label { aspect-ratio: 5 / 6; padding: 3.2rem 1.4rem 1.2rem; background: radial-gradient(60% 55% at 50% 52%, rgba(167, 90, 43, .22), rgba(8, 6, 5, 0) 72%), #080605; }
.product__media--label img { object-fit: contain; mix-blend-mode: lighten; /* el negro de la etiqueta se funde con el fondo */ transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.product:hover .product__media--label img { transform: scale(1.025); }
.product__badges { position: absolute; top: .9rem; left: .9rem; right: .9rem; display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.badge { font: 500 .62rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; padding: .45rem .65rem; border-radius: 999px; background: rgba(8, 6, 5, .6); border: 1px solid rgba(216, 199, 161, .2); color: var(--parchment); backdrop-filter: blur(6px); }
.badge--ok { color: #b9d3b0; border-color: rgba(150, 190, 140, .35); }
.badge--low { color: #ffd38a; border-color: rgba(224, 168, 64, .5); }
.badge--out { color: #f1b3aa; border-color: rgba(200, 80, 70, .5); background: rgba(90, 20, 16, .55); }
.product__body { padding: 1.4rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .9rem; flex: 1; }
.product__origin { font: 400 .68rem/1.4 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); opacity: .85; margin: 0; }
.product__name { font-size: 1.4rem; letter-spacing: .05em; }
.product__meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: 0; font-size: .85rem; color: var(--ink-soft); }
.product__meta dt { display: inline; color: var(--ink-faint); font: 400 .66rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; margin-right: .35rem; }
.product__meta dd { display: inline; margin: 0; }
.roast-dots { display: inline-flex; gap: 3px; vertical-align: middle; margin-left: .35rem; }
.roast-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(216, 199, 161, .18); }
.roast-dots i.on { background: var(--copper); box-shadow: 0 0 6px rgba(167, 90, 43, .7); }
.notes { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0; }
.notes li { font-family: var(--f-accent); font-style: italic; font-size: 1.02rem; padding: .15rem .7rem; border-radius: 999px; background: rgba(216, 199, 161, .07); border: 1px solid rgba(216, 199, 161, .12); color: var(--parchment); }
.product__desc { margin: 0; color: var(--ink-soft); font-size: .92rem; }
.product__opts { display: grid; gap: .7rem; margin-top: auto; }
.opt-label { display: block; font: 400 .64rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: .45rem; }
.seg { display: flex; gap: .4rem; }
.seg button {
  flex: 1; min-height: 42px; border-radius: 10px; border: 1px solid rgba(216, 199, 161, .2); background: rgba(8, 6, 5, .35);
  font: 500 .8rem/1 var(--f-mono); letter-spacing: .08em; cursor: pointer; color: var(--ink-soft); transition: all .3s;
}
.seg button[aria-pressed="true"] { border-color: var(--copper); background: rgba(167, 90, 43, .22); color: #fff; box-shadow: inset 0 0 0 1px rgba(167, 90, 43, .5); }
.seg button.is-out { text-decoration: line-through; opacity: .5; }
.select { position: relative; }
.select select {
  width: 100%; min-height: 42px; appearance: none; -webkit-appearance: none; border-radius: 10px; padding: 0 2.4rem 0 .9rem;
  border: 1px solid rgba(216, 199, 161, .2); background: rgba(8, 6, 5, .45); font-size: .9rem; cursor: pointer;
}
.select select option { background: #16110e; color: var(--ink); }
.select::after { content: ""; position: absolute; right: 1rem; top: 50%; width: 7px; height: 7px; border-right: 1.5px solid var(--parchment); border-bottom: 1.5px solid var(--parchment); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.product__buy { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .4rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.price { font: 500 1.55rem/1 var(--f-title); letter-spacing: .02em; color: #F4E9D0; }
.price small { display: block; font: 400 .62rem/1.4 var(--f-mono); letter-spacing: .14em; color: var(--ink-faint); text-transform: uppercase; margin-top: .3rem; }
.product__buy .btn { padding-inline: 1.2rem; }
.product.is-out .product__media { filter: grayscale(.8) brightness(.7); }
.shop__note { text-align: center; margin: 2.5rem auto 0; max-width: 52ch; font-size: .88rem; color: var(--ink-faint); }

/* ---------- Aprende ---------- */
.roast-scale { max-width: 640px; margin: 0 auto 2.5rem; }
.roast-scale__bar { height: 8px; border-radius: 99px; background: linear-gradient(90deg, #c9a46a, #a46a3a 30%, var(--copper) 45%, var(--espresso) 72%, #1d110b); box-shadow: 0 0 30px rgba(167, 90, 43, .35); }
.roast-scale__labels { display: flex; justify-content: space-between; margin-top: .7rem; font: 400 .66rem/1 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-faint); }
.learn__grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.learn__card { padding: 1.6rem; }
.learn__card p { color: var(--ink-soft); font-size: .94rem; margin: .7rem 0 0; }
.learn__card h3 { margin-top: .2rem; }
.learn__tag { font: 500 .64rem/1.2 var(--f-mono) !important; letter-spacing: .2em; text-transform: uppercase; color: var(--gold) !important; margin: 0 0 .6rem !important; opacity: .9; }
.learn__card--wide { grid-column: 1 / -1; }
.timeline { list-style: none; padding: 0; margin: 1.3rem 0 0; display: grid; gap: .8rem; counter-reset: t; }
.timeline li { display: grid; gap: .2rem; padding: .9rem 1rem; border-left: 2px solid var(--copper); background: linear-gradient(90deg, rgba(167, 90, 43, .12), transparent); border-radius: 0 10px 10px 0; }
.timeline li:nth-child(2) { border-color: var(--gold); background: linear-gradient(90deg, rgba(224, 168, 64, .14), transparent); }
.timeline li:nth-child(3) { border-color: rgba(216, 199, 161, .35); background: linear-gradient(90deg, rgba(216, 199, 161, .06), transparent); }
.timeline strong { font: 500 .95rem/1.2 var(--f-title); letter-spacing: .05em; color: #F4E9D0; }
.timeline span { color: var(--ink-soft); font-size: .92rem; }
.learn__foot { font-family: var(--f-accent); font-style: italic; font-size: 1.1rem !important; }
@media (min-width: 900px) { .timeline { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Misiones ---------- */
.missions__grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); max-width: 940px; margin-inline: auto; }
.mission { padding: 2rem 1.8rem; display: flex; flex-direction: column; gap: .8rem; overflow: hidden; }
.mission::after { content: ""; position: absolute; right: -120px; top: -120px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(closest-side, rgba(224, 150, 70, .12), transparent); pointer-events: none; }
.mission h3 { font-size: 1.5rem; }
.mission p { margin: 0; color: var(--ink-soft); }
.mission__price { margin: auto 0 .6rem !important; padding-top: .8rem; font: 400 .72rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint) !important; }
.mission__price span { display: block; font: 500 2.3rem/1 var(--f-title); letter-spacing: .03em; color: var(--gold); margin-bottom: .4rem; text-shadow: 0 0 30px rgba(224, 168, 64, .3); }
.mission .btn { align-self: flex-start; }
.quest__intro { text-align: center; max-width: 54ch; margin: -1rem auto 2.2rem; color: var(--ink); font-family: var(--f-accent); font-size: clamp(1.15rem, 2.4vw, 1.3rem); }
.quest { border-color: rgba(142, 42, 34, .35); }
.quest::after { background: radial-gradient(closest-side, rgba(142, 42, 34, .2), transparent); }
.quest .mission__price { margin-top: auto !important; }
.quest .mission__price span { font-size: 1.9rem; color: #e7b56a; }
.quest__foot { text-align: center; max-width: 60ch; margin: 2.2rem auto 0; color: var(--ink-soft); font-size: .95rem; }
.quest__foot em { display: block; margin-top: .6rem; font-family: var(--f-accent); font-size: 1.2rem; color: var(--gold); }
.missions__sub { margin-top: clamp(4rem, 9vw, 6.5rem); }
.missions__cta { text-align: center; margin: 2rem 0 0; }

/* ---------- Contacto ---------- */
.contact__inner { text-align: center; max-width: 720px; }
.contact h2 em { font-size: .7em; color: var(--parchment); }
.contact__list { list-style: none; padding: 0; margin: 2.5rem auto; display: grid; gap: 0; max-width: 520px; text-align: left; }
.contact__list li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 1rem .2rem; border-bottom: 1px solid var(--line); color: var(--ink); }
.contact__list li:first-child { border-top: 1px solid var(--line); }
.contact__list a { color: var(--parchment); text-decoration: none; border-bottom: 1px solid rgba(216, 199, 161, .3); }
.contact__list a:hover { color: var(--gold); border-color: var(--gold); }
.contact__label { font: 400 .68rem/1.9 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-faint); }
.contact__list li > :last-child, .contact__list li { text-align: right; }
.contact__list li .contact__label { text-align: left; }

.footer { text-align: center; padding: 3rem 1rem calc(6rem + env(safe-area-inset-bottom)); color: var(--ink-faint); font: 400 .7rem/1.8 var(--f-mono); letter-spacing: .18em; text-transform: uppercase; }
.footer p { margin: 0; text-wrap: balance; }
.select select:disabled { opacity: .5; cursor: not-allowed; }
.footer__small { opacity: .6; font-size: .6rem; }

/* ---------- Revelado al hacer scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { transform: none; transition: opacity .01s; }
  .hero__medallion::before, .hero__medallion { animation: none; }
}

/* ---------- Carrito ---------- */
.cart-fab {
  position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 50;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 1px solid rgba(216, 199, 161, .28); color: var(--parchment);
  background: radial-gradient(circle at 50% 35%, rgba(60, 38, 26, .95), rgba(14, 12, 11, .95));
  box-shadow: 0 0 0 4px rgba(8, 6, 5, .35), 0 12px 40px -8px rgba(0, 0, 0, .8), 0 0 40px -10px rgba(224, 150, 70, .5);
  transition: transform .4s var(--ease), box-shadow .4s;
}
.cart-fab:hover { transform: translateY(-3px); }
.cart-fab.bump { animation: bump .6s var(--ease); }
@keyframes bump { 30% { transform: scale(1.14); } 100% { transform: scale(1); } }
.cart-fab__count { position: absolute; top: -3px; right: -3px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: var(--gold); color: #1a0f08; font: 600 .7rem/1 var(--f-mono); box-shadow: 0 0 14px rgba(224, 168, 64, .6); }

.cart-layer { position: fixed; inset: 0; z-index: 60; overflow: hidden; pointer-events: none; }
.cart-backdrop, .cart { pointer-events: auto; }
.cart-backdrop { position: absolute; inset: 0; z-index: 0; background: rgba(5, 5, 6, .6); backdrop-filter: blur(3px); opacity: 0; transition: opacity .45s var(--ease); }
.cart-backdrop.is-open { opacity: 1; }
.cart {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 1; width: min(440px, 100%);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #110B08, #0A0706 60%, #090C0A);
  box-shadow: -30px 0 80px -20px rgba(0, 0, 0, .9), -1px 0 0 var(--line);
  transform: translateX(104%); transition: transform .55s var(--ease); visibility: hidden;
}
.cart.is-open { transform: none; visibility: visible; }
.cart__head { display: flex; align-items: center; justify-content: space-between; padding: 1.3rem 1.4rem; padding-top: max(1.3rem, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); }
.cart__head h2 { font-size: 1.3rem; letter-spacing: .12em; text-transform: uppercase; }
.cart__close { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--parchment); }
.cart__close:hover { border-color: var(--gold); }
.cart__body { flex: 1; overflow-y: auto; padding: .6rem 1.4rem; overscroll-behavior: contain; }
.cart__items { list-style: none; padding: 0; margin: 0; }
.cart-item { display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.cart-item__name { font: 500 1rem/1.25 var(--f-title); letter-spacing: .04em; color: #F4E9D0; margin: 0; }
.cart-item__opt { font: 400 .66rem/1.5 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin: .25rem 0 0; }
.cart-item__price { font: 500 1rem/1.2 var(--f-title); text-align: right; color: var(--parchment); }
.cart-item__row { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.qty { display: inline-flex; align-items: center; border: 1px solid rgba(216, 199, 161, .22); border-radius: 999px; }
.qty button { width: 36px; height: 34px; border: 0; background: none; cursor: pointer; font-size: 1.05rem; color: var(--parchment); }
.qty button:disabled { opacity: .3; cursor: not-allowed; }
.qty output { min-width: 1.8rem; text-align: center; font: 500 .9rem/1 var(--f-mono); }
.cart-item__remove { border: 0; background: none; cursor: pointer; color: var(--ink-faint); font: 400 .66rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 3px; }
.cart-item__remove:hover { color: #f1b3aa; }
.cart__empty { text-align: center; color: var(--ink-faint); font-family: var(--f-accent); font-style: italic; font-size: 1.25rem; padding: 3rem 0; }
.cart__empty a { font-family: var(--f-mono); font-style: normal; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.cart__foot { padding: 1.2rem 1.4rem; padding-bottom: max(1.2rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 1rem; background: rgba(8, 6, 5, .4); }
.cart__total { display: flex; justify-content: space-between; align-items: baseline; }
.cart__total span { font: 400 .72rem/1 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-faint); }
.cart__total strong { font: 500 1.6rem/1 var(--f-title); color: #F4E9D0; }
.field span { display: block; font: 400 .64rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: .45rem; }
.field input { width: 100%; min-height: 44px; border-radius: 10px; border: 1px solid rgba(216, 199, 161, .22); background: rgba(8, 6, 5, .5); padding: 0 .9rem; font-size: 16px; }
.field input:focus { border-color: var(--copper); outline: none; box-shadow: 0 0 0 3px rgba(167, 90, 43, .25); }
.cart__hint { margin: 0; font-size: .78rem; color: var(--ink-faint); text-align: center; }
body.cart-open { overflow: hidden; }

.toast {
  position: fixed; left: 50%; top: calc(4.8rem + env(safe-area-inset-top)); z-index: 55; translate: -50% -12px; opacity: 0; pointer-events: none;
  padding: .75rem 1.2rem; border-radius: 999px; background: rgba(22, 17, 14, .92); border: 1px solid rgba(224, 168, 64, .35); color: var(--parchment);
  font: 400 .72rem/1.2 var(--f-mono); letter-spacing: .1em; box-shadow: 0 10px 40px -10px #000; transition: opacity .4s, translate .4s var(--ease); width: max-content; max-width: calc(100% - 2rem); text-align: center;
}
.toast.is-on { opacity: 1; translate: -50% 0; }
main section[tabindex="-1"]:focus { outline: none; }

/* Omniroast (Aprende) */
.learn__card--omni strong { color: var(--parchment); font-weight: 500; }
.omni__uses { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1.1rem 0 0; }
.omni__uses li { font: italic 500 1.05rem/1 var(--f-accent); padding: .4rem .9rem; border-radius: 999px; color: var(--gold); border: 1px solid rgba(224, 168, 64, .35); background: rgba(224, 168, 64, .06); box-shadow: 0 0 18px -6px rgba(224, 168, 64, .35); }
@media (min-width: 900px) { .learn__grid { grid-template-columns: 1fr 2fr; } }

/* Nav: "Nosotros · Misión y Visión" en dos líneas compactas */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nav__links { align-items: center; }
.nav__stack { display: inline-flex; flex-direction: column; align-items: center; gap: .28rem; white-space: nowrap; }
.nav__stack small { font: 400 .54rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); transition: color .3s; }
.nav__stack:hover small, .nav__stack.is-active small { color: rgba(224, 168, 64, .75); }
.nav__links a { white-space: nowrap; }
.menu__sub { display: block; margin-top: .35rem; font: italic 500 1.02rem/1.1 var(--f-accent); letter-spacing: .02em; text-transform: none; color: var(--ink-soft); }
.menu__list a.is-active .menu__sub { color: rgba(224, 168, 64, .8); }
.menu__list a.is-active .menu__t::after { display: none; }
.menu__list a { position: relative; padding-right: 1.6rem; }
.menu__list a.is-active::after { content: ""; position: absolute; right: .4rem; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }

/* ==========================================================================
   Capítulos seleccionables: el contenido emerge de la niebla
   ========================================================================== */
.chapters__list { display: grid; gap: 1rem; max-width: 1040px; margin-inline: auto; }
.chapter {
  position: relative; border-radius: var(--radius); overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, rgba(26, 18, 14, .78), rgba(14, 10, 8, .84));
  box-shadow: var(--glow);
  transition: box-shadow .7s var(--ease), transform .7s var(--ease), opacity .9s var(--ease), translate .9s var(--ease);
}
/* niebla que deriva sobre la tarjeta al pasar o enfocar */
.chapter::before {
  content: ""; position: absolute; inset: -20% -30%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 60% at 30% 50%, rgba(216, 205, 180, .07), transparent 70%),
    radial-gradient(35% 55% at 70% 40%, rgba(167, 90, 43, .08), transparent 70%);
  opacity: 0; transform: translate3d(-6%, 0, 0);
  transition: opacity .9s var(--ease), transform 2.4s var(--ease);
}
.chapter:hover, .chapter:focus-within { box-shadow: var(--glow-hover); }
.chapter:hover:not(.is-open), .chapter:has(.chapter__toggle:focus-visible):not(.is-open) { transform: translateY(-2px); }
.chapter:hover::before, .chapter:focus-within::before { opacity: 1; transform: translate3d(6%, 0, 0); }
.chapter.is-open { box-shadow: 0 0 0 1px rgba(224, 168, 64, .16), 0 30px 70px -30px rgba(0, 0, 0, .9), 0 14px 70px -20px rgba(167, 90, 43, .35); }

.chapter__h { margin: 0; font: inherit; }
.chapter__toggle {
  width: 100%; display: flex; align-items: center; gap: clamp(.9rem, 3vw, 1.5rem);
  padding: clamp(1.1rem, 3vw, 1.5rem) clamp(1.1rem, 3vw, 1.8rem);
  background: none; border: 0; border-radius: var(--radius); text-align: left; cursor: pointer; color: inherit;
}
.chapter__toggle:focus-visible { outline-offset: -3px; }
.chapter__txt { flex: 1; min-width: 0; display: grid; gap: .35rem; }
.chapter__title { font: 500 clamp(1.15rem, 3.4vw, 1.55rem)/1.2 var(--f-title); letter-spacing: .05em; color: #F2E7CF; transition: color .5s, text-shadow .5s; }
.chapter__dot { color: var(--gold); opacity: .7; }
.chapter__teaser { font: italic 400 clamp(1rem, 2.6vw, 1.12rem)/1.35 var(--f-accent); color: var(--ink-soft); }
.chapter.is-open .chapter__title, .chapter__toggle:hover .chapter__title { color: #fff; text-shadow: 0 0 24px rgba(224, 168, 64, .25); }

/* Sello con el número del capítulo */
.chapter__seal {
  position: relative; flex: none; width: clamp(48px, 9vw, 58px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  font: italic 500 clamp(1.15rem, 3vw, 1.35rem)/1 var(--f-accent); color: var(--gold);
  border: 1px solid rgba(224, 168, 64, .35);
  background: radial-gradient(circle at 50% 40%, rgba(224, 168, 64, .1), rgba(8, 6, 5, .4) 70%);
  box-shadow: inset 0 0 0 4px rgba(8, 6, 5, .6), inset 0 0 0 5px rgba(216, 199, 161, .12);
  transition: box-shadow .8s var(--ease), border-color .8s, color .8s;
}
.chapter.is-open .chapter__seal { border-color: rgba(224, 168, 64, .75); color: #f6d48d; box-shadow: inset 0 0 0 4px rgba(8, 6, 5, .6), inset 0 0 0 5px rgba(224, 168, 64, .3), 0 0 26px rgba(224, 168, 64, .35); }
/* halo que se expande y destellos (solo al abrir) */
.chapter__seal::after, .chapter__seal::before { content: ""; position: absolute; pointer-events: none; opacity: 0; }
.chapter__seal::after { inset: -1px; border-radius: 50%; border: 1px solid rgba(240, 196, 110, .8); }
.chapter__seal::before {
  left: 50%; top: 50%; width: 3px; height: 3px; margin: -1.5px; border-radius: 50%; background: #ffe2a3;
  box-shadow: 18px -22px 0 0 rgba(255, 226, 163, .9), -24px -12px 0 -.5px rgba(255, 226, 163, .7), 26px 10px 0 -.5px rgba(255, 226, 163, .6),
              -14px 24px 0 -.5px rgba(255, 226, 163, .7), 4px -30px 0 -1px rgba(255, 226, 163, .5), -30px 6px 0 -1px rgba(255, 226, 163, .5);
}
.chapter.is-opening .chapter__seal::after { animation: sealHalo .9s var(--ease) both; }
.chapter.is-opening .chapter__seal::before { animation: sealSparks 1s var(--ease) .05s both; }
@keyframes sealHalo { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.9); } }
@keyframes sealSparks { 0% { opacity: 0; transform: scale(.4) rotate(0); } 35% { opacity: 1; } 100% { opacity: 0; transform: scale(1.35) rotate(35deg); } }

/* Chevron */
.chapter__chev { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(216, 199, 161, .2); position: relative; transition: transform .8s var(--ease), border-color .5s; }
.chapter__chev::before { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; border-right: 1.5px solid var(--parchment); border-bottom: 1.5px solid var(--parchment); transform: translate(-50%, -70%) rotate(45deg); }
.chapter.is-open .chapter__chev { transform: rotate(180deg); border-color: rgba(224, 168, 64, .5); }

/* Cuerpo: altura fluida (0fr → 1fr) y contenido que pasa de la niebla a nítido */
.chapter__body { display: grid; grid-template-rows: 1fr; }
.js .chapter__body { grid-template-rows: 0fr; transition: grid-template-rows .85s var(--ease) .08s; }
.js .chapter.is-open .chapter__body { grid-template-rows: 1fr; transition-delay: 0s; }
.chapter__clip { position: relative; min-height: 0; overflow: hidden; }
.chapter__content { padding: .4rem clamp(1.1rem, 3vw, 1.8rem) clamp(1.6rem, 4vw, 2.4rem); }
.js .chapter__content {
  opacity: 0; filter: blur(8px); transform: translate3d(0, 14px, 0);
  transition: opacity .45s ease, filter .5s ease, transform .5s var(--ease);
}
.js .chapter.is-open .chapter__content {
  opacity: 1; filter: none; transform: none;
  transition: opacity .8s var(--ease) .12s, filter .9s var(--ease) .1s, transform .9s var(--ease) .1s;
}
/* Velo de niebla que barre y se disipa al abrir; vuelve a cubrir al cerrar */
.chapter__mist {
  position: absolute; inset: 0 -40%; z-index: 2; pointer-events: none; opacity: 0;
  background:
    radial-gradient(30% 45% at 25% 30%, rgba(222, 212, 190, .16), transparent 70%),
    radial-gradient(35% 50% at 55% 60%, rgba(222, 212, 190, .12), transparent 72%),
    radial-gradient(28% 40% at 80% 25%, rgba(224, 168, 64, .07), transparent 70%),
    linear-gradient(90deg, transparent, rgba(200, 190, 170, .06) 40%, rgba(200, 190, 170, .06) 60%, transparent);
}
.chapter.is-opening .chapter__mist { animation: mistClear 1.1s var(--ease) both; }
.chapter.is-closing .chapter__mist { animation: mistGather .7s ease both; }
@keyframes mistClear { 0% { opacity: 1; transform: translate3d(-12%, 0, 0) scale(1.05); } 100% { opacity: 0; transform: translate3d(14%, 0, 0) scale(1.15); } }
@keyframes mistGather { 0% { opacity: 0; transform: translate3d(10%, 0, 0); } 100% { opacity: .9; transform: translate3d(0, 0, 0); } }

/* Contenido de cada capítulo (antes eran secciones) */
.chapter__display { font: 500 clamp(1.6rem, 3.6vw, 2.4rem)/1.15 var(--f-title); letter-spacing: .04em; margin: 0; color: #F2E7CF; text-wrap: balance; }
.chapter__content .section__head { margin-bottom: clamp(1.4rem, 3vw, 2.2rem); }
.chapter__content.story__grid { gap: 1.2rem 3rem; }
.chapter__content .story__pillars { margin-top: .6rem; }
.chapter__content .missions__sub { margin-top: clamp(2.5rem, 6vw, 4rem); }
.chapter__content .quest__intro { margin-top: 0; }

/* Cómo tostamos (antes del catálogo) */
.roast-intro { display: grid; gap: 1.4rem 3rem; padding: clamp(1.4rem, 3.5vw, 2.2rem); margin: 0 auto clamp(2rem, 5vw, 3rem); max-width: 1040px; }
.roast-intro h3 { font-size: clamp(1.25rem, 3vw, 1.6rem); margin-bottom: .8rem; }
.roast-intro p { color: var(--ink-soft); margin: 0 0 .7rem; }
.roast-intro strong { color: var(--parchment); font-weight: 500; }
.roast-intro__side { padding-top: 1.2rem; border-top: 1px solid var(--line); }
@media (min-width: 900px) {
  .roast-intro { grid-template-columns: 1.6fr 1fr; align-items: start; }
  .roast-intro__side { padding: 0 0 0 2rem; border-top: 0; border-left: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  .chapter, .chapter::before, .chapter__chev, .chapter__seal, .chapter__title { transition: none !important; }
  .chapter:hover, .chapter:focus-within { transform: none !important; }
  .js .chapter__body, .js .chapter.is-open .chapter__body { transition: none !important; }
  .js .chapter__content, .js .chapter.is-open .chapter__content { transition: none !important; filter: none !important; transform: none !important; }
  .chapter__mist, .chapter__seal::before, .chapter__seal::after { animation: none !important; display: none; }
}

/* ---------- Checkout (carrito) ---------- */
.checkout { display: grid; gap: 1.1rem; padding: 1.4rem 0 1.6rem; }
.checkout[hidden] { display: none; }
.checkout__title { margin: 0; font: 400 1.1rem/1.2 var(--f-title); letter-spacing: .12em; text-transform: uppercase; color: #F4E9D0; }
.field label { display: block; }
.field em { font-style: normal; text-transform: none; letter-spacing: .04em; opacity: .8; }
.field input, .field textarea { color: var(--ink); font-family: var(--f-body); }
.field textarea { width: 100%; min-height: 64px; border-radius: 10px; border: 1px solid rgba(216, 199, 161, .22); background: rgba(8, 6, 5, .5); padding: .7rem .9rem; font-size: 16px; resize: vertical; }
.field textarea:focus { border-color: var(--copper); outline: none; box-shadow: 0 0 0 3px rgba(167, 90, 43, .25); }
.field input[aria-invalid="true"] { border-color: #d07a6c; box-shadow: 0 0 0 3px rgba(142, 42, 34, .28); }
.field__err { margin: .4rem 0 0; min-height: 0; font-size: .8rem; line-height: 1.35; color: #f1b3aa; }
.field__err:empty { display: none; }
.field .select select { width: 100%; min-height: 44px; font-size: 16px; }
.checkout__tipo { border: 0; padding: 0; margin: 0; min-width: 0; }
.checkout__tipo legend { padding: 0; margin-bottom: .45rem; }
.checkout__tipo legend span { font: 400 .64rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.tipo { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.tipo__opt { position: relative; cursor: pointer; }
.tipo__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tipo__card { display: flex; flex-direction: column; gap: .35rem; height: 100%; padding: .85rem .9rem; border-radius: 12px; border: 1px solid rgba(216, 199, 161, .22); background: rgba(8, 6, 5, .45); transition: border-color .3s, background .3s, box-shadow .3s; }
.tipo__card strong { font: 500 .95rem/1.2 var(--f-title); letter-spacing: .04em; color: #F4E9D0; }
.tipo__card small { font-size: .76rem; line-height: 1.35; color: var(--ink-faint); }
.tipo__opt:hover .tipo__card { border-color: rgba(224, 168, 64, .5); }
.tipo__opt input:checked + .tipo__card { border-color: var(--gold); background: rgba(167, 90, 43, .16); box-shadow: inset 0 0 0 1px var(--gold); }
.tipo__opt input:focus-visible + .tipo__card { outline: 2px solid var(--gold); outline-offset: 2px; }
.ship { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .5s var(--ease), opacity .4s var(--ease); }
.ship.is-open { grid-template-rows: 1fr; opacity: 1; }
.ship.no-anim { transition: none; }
.ship__inner { overflow: hidden; min-height: 0; }
.ship:not(.is-open) .ship__inner { visibility: hidden; }
.ship__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem .7rem; padding-top: .2rem; }
.field--full { grid-column: 1 / -1; }
.ship__note { margin: 1rem 0 0; padding: .7rem .9rem; border-radius: 10px; border: 1px dashed rgba(224, 168, 64, .4); font-size: .82rem; color: var(--ink-soft); text-align: center; }
.cart__status { margin: 0; font-size: .8rem; text-align: center; color: #f1c9a0; }
.cart__status:empty { display: none; }
#cart-send[aria-disabled="true"] { opacity: .55; filter: saturate(.6); box-shadow: none; }
@media (max-width: 360px) { .tipo, .ship__grid { grid-template-columns: 1fr; } }

/* ---------- Forma de pago ---------- */
.pago { display: grid; gap: .8rem; padding-top: .4rem; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.pago[hidden], .bank[hidden], .tipo__opt[hidden], .pago__note[hidden] { display: none; }
.pago.pop { animation: pagoIn .5s var(--ease); }
@keyframes pagoIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tipo--single { grid-template-columns: 1fr; }
.pago__note { margin: .55rem 0 0; font-size: .8rem; color: var(--ink-soft); }
.bank { padding: 1rem 1rem .9rem; border-radius: 14px; border: 1px solid rgba(224, 168, 64, .35); background: linear-gradient(160deg, rgba(74, 40, 27, .35), rgba(8, 6, 5, .55)); display: grid; gap: .8rem; animation: pagoIn .45s var(--ease); }
.bank__title { margin: 0; font: 400 .66rem/1 var(--f-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.bank__list { margin: 0; display: grid; }
.bank__row { display: grid; gap: .2rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.bank__row:last-child { border-bottom: 0; }
.bank__row dt { font: 400 .6rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.bank__row dd { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: .6rem; color: #F4E9D0; font-size: .95rem; overflow-wrap: anywhere; }
.bank__copy { flex: none; min-height: 32px; padding: 0 .75rem; border-radius: 999px; border: 1px solid rgba(216, 199, 161, .25); background: none; cursor: pointer; color: var(--parchment); font: 400 .6rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; transition: border-color .3s, color .3s; }
.bank__copy:hover, .bank__copy:focus-visible { border-color: var(--gold); color: var(--gold); }
.bank__copy.is-done, .bank__all.is-done { border-color: #7fb08a; color: #a9d8b2; }
.bank__hint { margin: 0; font-size: .8rem; text-align: center; color: var(--ink-soft); }
@media (prefers-reduced-motion: reduce) { .pago.pop, .bank { animation: none; } }

/* Páginas legales */
.footer__links a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.footer__links a:hover { color: var(--ink, #eee); }
.legal { max-width: 720px; margin: 0 auto; padding: 4rem 1.25rem 2rem; font-family: var(--f-body); line-height: 1.7; }
.legal h1 { font-family: "Cormorant Garamond", serif; font-weight: 500; font-size: clamp(2rem, 5vw, 2.8rem); margin: 0 0 .5rem; }
.legal h2 { font-family: "Cormorant Garamond", serif; font-weight: 500; font-size: 1.5rem; margin: 2rem 0 .5rem; }
.legal a { color: inherit; text-decoration: underline; }
.legal__back { display: inline-block; margin-bottom: 2rem; font: 400 .75rem/1 var(--f-mono); letter-spacing: .15em; text-transform: uppercase; }
.legal__meta { opacity: .6; font-size: .85rem; }
