/* ============================================================================
   CV Fernet — single page, conversion-first.  "La botella de todos".
   Bar de barrio premium a la medianoche. Vanilla. No build, no CDN.
   Palette: ámbar #F0A500 · negro #111111 · crema #F7F3EC · verde #1E3A2F · brillo #FFC23D
   ========================================================================== */

/* ── Fraunces (variable, self-hosted) ─────────────────────────────────────── */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
  src: url("/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
  src: url("/fraunces-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* metric-matched fallback over Georgia → near-zero font-swap CLS */
@font-face {
  font-family: "Fraunces Fallback";
  src: local("Georgia"), local("Times New Roman");
  size-adjust: 102%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand (locked palette) */
  --negro:   #111111;
  --crema:   #F7F3EC;
  --ambar:   #F0A500;
  --verde:   #1E3A2F;
  --brillo:  #FFC23D;

  /* derived */
  --negro-2:    #0C0C0C;
  --negro-soft: #1A1A1A;
  --ink:        #1A1714;
  --ambar-ink:  #8F5B00;
  --crema-deep: #EFE7D8;
  --verde-deep: #14271F;
  --paper:      #FFFFFF;

  --muted:        #6E6657;
  --muted-2:      #6F6859;
  --line:         #E2D8C6;
  --on-dark:      #EDE6D8;
  --muted-dark:   #B7AE9C;
  --muted-dark-2: #948B7A;
  --line-dark:    rgba(247,243,236,.14);

  --danger:    #C0402F;
  --danger-bg: #FBEAE7;
  --good:      #3CB371;

  --focus: 0 0 0 3px rgba(240,165,0,.5);

  /* Type */
  --serif: "Fraunces", "Fraunces Fallback", Georgia, "Times New Roman", serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:  "SF Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;

  --h1:  clamp(2.3rem, 5.2vw, 4rem);
  --h2:  clamp(1.7rem, 3.4vw, 2.6rem);
  --lead: clamp(1.05rem, 1.7vw, 1.25rem);

  /* spacing — 8pt */
  --s1: .5rem; --s2: 1rem; --s3: 1.5rem; --s4: 2rem;
  --s5: 3rem;  --s6: 4rem; --s7: 5rem;   --s8: 7rem;

  --radius: 18px; --radius-s: 11px; --radius-pill: 9999px;

  --shadow:    0 10px 40px -14px rgba(17,17,17,.22);
  --shadow-lg: 0 26px 70px -22px rgba(17,17,17,.34);

  /* motion */
  --spring: cubic-bezier(0.34,1.56,0.64,1);
  --reveal: cubic-bezier(.2,.8,.2,1);
  --std:    cubic-bezier(.4,0,.2,1);
  --ease:   cubic-bezier(.25,.46,.45,.94);

  --wrap: 1200px;
}

html {
  font-size: 16px; scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%; scroll-padding-top: 76px;
}
@media (min-width: 744px) { html { font-size: 17px; } }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--crema);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
}

/* ── Grain overlay (inline data-URI feTurbulence, no network) ──────────────── */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 999; pointer-events: none;
  mix-blend-mode: overlay; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg, canvas { display: block; max-width: 100%; }

/* ── Type ──────────────────────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--serif);
  line-height: 1.04; letter-spacing: -.02em; font-weight: 800;
  color: var(--ink); text-wrap: balance;
}
h1 { font-size: var(--h1); font-weight: 900; letter-spacing: -.03em; line-height: 1.0; }
h2 { font-size: var(--h2); font-weight: 800; letter-spacing: -.025em; line-height: 1.08; }
h3 { font-size: clamp(1.2rem,.4vw + 1.1rem,1.5rem); font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }

.hero__accent { color: var(--ambar); display: inline-block; }
a { color: inherit; text-underline-offset: 3px; }

.prose { color: var(--muted); max-width: 52ch; font-size: 1.05rem; }
.prose--center { margin-inline: auto; }
.prose em { color: var(--ink); font-style: italic; }

.eyebrow {
  font-family: var(--sans);
  font-size: .8125rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ambar); margin-bottom: var(--s2);
}
.eyebrow--dark { color: var(--verde); }

.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;
}

/* ── Layout / day-night rhythm ─────────────────────────────────────────── */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
@media (min-width: 744px) { .wrap { width: min(100% - 4rem, var(--wrap)); } }

.beat { padding-block: clamp(var(--s6), 7vw, var(--s7)); position: relative; }
.beat--tight { padding-block: clamp(var(--s5), 6vw, var(--s6)); }
.beat--cream { background: var(--crema-deep); }
.beat--dark {
  background: var(--negro); color: var(--on-dark);
  position: relative; overflow: clip;
}
.beat--dark::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  mix-blend-mode: overlay; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.beat--dark > .wrap { position: relative; z-index: 1; }
.beat--dark h2 { color: var(--crema); }
.beat--dark .prose { color: var(--muted-dark); }
.beat--dark .prose em { color: var(--crema); }

.section__head { margin-bottom: var(--s4); max-width: 52ch; }
.section__head--center { text-align: center; margin-inline: auto; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  --bg: var(--ambar); --fg: var(--negro);
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 1rem 1.7rem; border: 0; border-radius: var(--radius-pill);
  font: inherit; font-weight: 700; font-size: 1.0625rem; letter-spacing: -.01em;
  text-decoration: none; cursor: pointer; white-space: nowrap; overflow: hidden;
  background: var(--bg); color: var(--fg);
  transition: transform .15s ease-out, box-shadow .2s ease-out, background .15s ease-out, opacity .18s;
}
.btn--primary { box-shadow: 0 8px 26px -8px rgba(240,165,0,.6); }
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 16px 34px -8px rgba(240,165,0,.7); }
.btn--primary:active { transform: scale(.96); transition-duration: .1s; transition-timing-function: ease-in; }

/* pour-fill: a --brillo layer wipes left→right on hover */
.btn--pour .btn__fill {
  position: absolute; inset: 0; z-index: -1; background: var(--brillo);
  clip-path: inset(0 100% 0 0);
  transition: clip-path .35s var(--std);
}
.btn--pour:hover .btn__fill,
.btn--pour:focus-visible .btn__fill { clip-path: inset(0 0 0 0); }
.btn__label { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: .5em; }

.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn--ghost-dark { color: var(--crema); border-color: rgba(247,243,236,.4); }
.btn--ghost-dark:hover { border-color: var(--ambar); color: var(--brillo); }
.btn--block { display: flex; width: 100%; }
.btn:disabled { opacity: .65; cursor: progress; transform: none; box-shadow: none; }

/* ── Skip link ──────────────────────────────────────────────────────────── */
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 1000;
  background: var(--negro); color: var(--crema); padding: .6rem 1rem;
  border-radius: var(--radius-s); text-decoration: none; transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* ── Nav (compacta) ─────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(17,17,17,.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(247,243,236,.1);
}
.nav__inner { display: flex; align-items: center; gap: var(--s2); height: 60px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--crema); }
.brand__mark { flex: none; }
.brand__type { font-family: var(--serif); font-weight: 800; letter-spacing: -.02em; font-size: 1.15rem; }

/* live bottle mini */
.navbottle {
  display: none; align-items: center; gap: .45rem; margin-left: auto;
  color: var(--muted-dark); font-size: .85rem; font-variant-numeric: tabular-nums;
}
.navbottle svg { flex: none; }
.navbottle__txt b { color: var(--brillo); font-weight: 700; }
@media (min-width: 560px) { .navbottle { display: inline-flex; } }

/* precio del fernet hoy chip */
.pricechip {
  margin-left: auto; display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem .8rem; border-radius: var(--radius-pill);
  border: 1px solid rgba(240,165,0,.4); background: rgba(240,165,0,.1);
  text-decoration: none; font-size: .82rem; transition: border-color .15s, background .15s;
}
.pricechip:hover { border-color: var(--ambar); background: rgba(240,165,0,.16); }
@media (min-width: 560px) { .pricechip { margin-left: 0; } }
.pricechip__label { color: var(--muted-dark); text-transform: uppercase; letter-spacing: .06em; font-size: .68rem; font-weight: 700; }
.pricechip__val { color: var(--brillo); font-weight: 700; font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ═══════════════ HERO = el formulario (negro) ═══════════════ */
.hero {
  background: radial-gradient(120% 90% at 78% 12%, #1c1c1c 0%, var(--negro) 48%, var(--negro-2) 100%);
  color: var(--on-dark);
  padding-block: clamp(var(--s5), 5vw, var(--s7));
  overflow: clip; position: relative;
  scroll-margin-top: 70px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  mix-blend-mode: overlay; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero__inner {
  position: relative; z-index: 1;
  display: grid; gap: var(--s5); align-items: start;
}
@media (min-width: 940px) {
  .hero__inner { grid-template-columns: 1.15fr .85fr; gap: var(--s6); }
}
.hero__main { min-width: 0; }
.hero__head { max-width: 46ch; }
.hero h1 { color: var(--crema); }
.lead { font-size: var(--lead); color: var(--muted-dark); margin: var(--s2) 0 var(--s4); max-width: 46ch; }

/* ── upload card ── */
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--s4); box-shadow: var(--shadow-lg);
  color: var(--ink);
}
.card__lead { color: var(--ink); font-weight: 600; margin-bottom: var(--s3); font-size: 1rem; }
.card__price { display: inline-block; color: var(--ambar-ink); font-family: var(--mono); font-weight: 700; font-size: .92rem; }

.field { margin-bottom: var(--s3); }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .5rem; }
.field__hint { display: block; margin-top: .4rem; font-size: .82rem; color: var(--muted-2); }
.field__opt { font-weight: 500; color: var(--muted-2); font-size: .85em; }

input[type="email"], textarea {
  width: 100%; padding: .85rem 1rem; font: inherit; font-size: 1rem;
  border: 1.5px solid var(--line); border-radius: var(--radius-s);
  background: var(--crema); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 5.5rem; line-height: 1.5; }
input[type="email"]:focus, textarea:focus { outline: 0; border-color: var(--ambar); box-shadow: var(--focus); background: var(--paper); }
input[type="email"][aria-invalid="true"] { border-color: var(--danger); }

.drop {
  position: relative; display: grid; place-items: center; text-align: center;
  border: 2px dashed var(--line); border-radius: var(--radius-s);
  padding: var(--s4) var(--s2); background: var(--crema); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop.is-drag { border-color: var(--ambar); background: #FFF8E9; }
.drop:focus-visible { outline: 0; box-shadow: var(--focus); border-color: var(--ambar); }
.drop input[type="file"] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.drop__idle { display: grid; justify-items: center; gap: .4rem; color: var(--muted); pointer-events: none; }
.drop__idle svg { color: var(--ambar-ink); }
.drop__idle strong { color: var(--ink); }
.drop__idle small { color: var(--muted-2); font-size: .82rem; }
.drop__picked { display: none; align-items: center; gap: .55rem; font-weight: 600; color: var(--verde); }
.drop.has-file .drop__idle { display: none; }
.drop.has-file .drop__picked { display: inline-flex; }
.drop__clear {
  position: relative; z-index: 1; pointer-events: auto;
  border: 0; background: none; font: inherit; font-size: .82rem; font-weight: 600;
  color: var(--ambar-ink); text-decoration: underline; cursor: pointer; padding: 0 .25rem;
}

.consents { display: grid; gap: var(--s2); margin: var(--s3) 0; }
.check { display: grid; grid-template-columns: auto 1fr; gap: .65rem; align-items: start; cursor: pointer; font-size: .9rem; color: var(--muted); line-height: 1.45; }
.check input[type="checkbox"] { width: 1.15rem; height: 1.15rem; margin-top: .1rem; accent-color: var(--ambar); cursor: pointer; flex: none; }
.check a { color: var(--ambar-ink); }
.check strong { color: var(--danger); }
.check em { font-style: normal; color: var(--muted-2); }

.status { margin-bottom: var(--s2); padding: .8rem 1rem; border-radius: var(--radius-s); font-size: .92rem; line-height: 1.45; }
.status[hidden] { display: none; }
.status.is-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #F0CBC5; animation: shake .4s ease-in-out; }
.status.is-info  { background: #FFF6E2; color: var(--ambar-ink); border: 1px solid #F4DFAE; }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%,60%{transform:translateX(-6px)} 40%,80%{transform:translateX(6px)} }

.btn__spinner { display: none; width: 1.15rem; height: 1.15rem; border-radius: 50%;
  border: 2.5px solid rgba(17,17,17,.35); border-top-color: var(--negro); animation: spin .7s linear infinite; }
.btn.is-loading .btn__label { opacity: .55; }
.btn.is-loading .btn__spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.card__fine { margin-top: var(--s2); font-size: .82rem; color: var(--muted-2); text-align: center; }

/* ── The bottle stage (centerpiece) ── */
.hero__side { display: grid; gap: var(--s3); align-content: start; }
.hero__bottle { display: flex; justify-content: center; }
.stage {
  position: relative;
  width: clamp(200px, 32vw, 290px);
  aspect-ratio: 200 / 460;
  min-height: 380px;
  display: grid; place-items: center;
}
.stage__svg {
  position: relative; z-index: 2;
  width: 100%; height: 100%;
  filter: drop-shadow(0 30px 44px rgba(0,0,0,.5));
}
.stage.is-idle .stage__svg { animation: shimmer 3s ease-in-out infinite; }
@keyframes shimmer { 50% { filter: drop-shadow(0 30px 44px rgba(0,0,0,.5)) brightness(1.08); } }

.stage__pause {
  position: absolute; top: 0; right: 0; z-index: 6;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(247,243,236,.1); border: 1px solid rgba(247,243,236,.2);
  color: var(--crema); backdrop-filter: blur(4px);
  transition: background .15s, border-color .15s;
}
.stage__pause:hover { background: rgba(247,243,236,.18); border-color: var(--ambar); }
.stage__pause .ic-play { display: none; }
.stage.is-paused .ic-pause { display: none; }
.stage.is-paused .ic-play { display: block; }

.stage__glow {
  position: absolute; z-index: 1; inset: 12% 6%; border-radius: 50%;
  opacity: 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255,194,61,.55), rgba(240,165,0,0));
}
.stage__glow.is-burst { animation: glow-bloom 1.4s var(--ease); }
@keyframes glow-bloom {
  0%   { opacity: 0; transform: scale(.7); }
  30%  { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(1.15); }
}

.stage__confetti { position: absolute; z-index: 5; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.stage__pop {
  position: absolute; z-index: 5; top: 2%; left: 50%;
  transform: translate(-50%, 0) scale(0.4); opacity: 0; pointer-events: none;
}
.stage__pop.is-pop { animation: fernet-pop 1.4s var(--spring) forwards; }
@keyframes fernet-pop {
  0%   { opacity: 0; transform: translate(-50%, 10px) scale(.4); }
  35%  { opacity: 1; transform: translate(-50%,-10px) scale(1.25); }
  55%  { transform: translate(-50%,-6px) scale(1.0); }
  85%  { opacity: 1; transform: translate(-50%,-6px) scale(1.0); }
  100% { opacity: 0; transform: translate(-50%,-14px) scale(.95); }
}

#bottle-fill, #bottle-meniscus { transition: y .6s var(--spring), height .6s var(--spring); }
.stage.is-draining #bottle-fill,
.stage.is-draining #bottle-meniscus { transition: y .8s ease-in, height .8s ease-in; }
.bottle__shine { mix-blend-mode: screen; }

#wave-a { animation: wave-x 6s linear infinite; }
#wave-b { animation: wave-x 4s linear infinite reverse; }
@keyframes wave-x { to { transform: translateX(-48px); } }
.stage.is-paused #wave-a, .stage.is-paused #wave-b,
.stage.is-paused .stage__svg { animation-play-state: paused; }

.bottle__ticks line { stroke: rgba(247,243,236,.5); stroke-width: 1.4; }
.bottle__ticks text {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  fill: rgba(247,243,236,.62); letter-spacing: .02em;
}
.tick--goal line { stroke: var(--brillo); stroke-width: 2; }
.tick--goal text { fill: var(--brillo); }
.tick--goal.is-near line { animation: goal-glow 1.6s ease-in-out infinite; }
.tick--goal.is-near text { animation: goal-glow 1.6s ease-in-out infinite; }
@keyframes goal-glow { 50% { opacity: .35; } }

.lbl-cv     { font-family: var(--serif); font-size: 17px; font-weight: 800; fill: var(--verde); letter-spacing: .5px; }
.lbl-fernet { font-family: var(--serif); font-size: 13px; font-weight: 700; fill: var(--negro); letter-spacing: 2px; }
.lbl-sub    { font-family: var(--serif); font-size: 8px; fill: #6b5a3a; letter-spacing: .5px; }

.readout {
  position: absolute; z-index: 4; left: 50%; bottom: 4%;
  transform: translateX(-50%);
  display: grid; gap: .35rem; justify-items: center; text-align: center;
  padding: .65rem 1rem; min-width: 64%;
  background: rgba(12,12,12,.66); border: 1px solid rgba(247,243,236,.16);
  border-radius: var(--radius-s); backdrop-filter: blur(8px);
}
.readout__goal { font-weight: 600; color: var(--crema); font-size: .95rem; line-height: 1.3; }
.sse { display: inline-flex; align-items: center; gap: .45rem; font-size: .78rem; color: var(--muted-dark); }
.sse__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-dark-2); flex: none; transition: background .3s; }
.sse__dot[data-state="live"]       { background: var(--good); }
.sse__dot[data-state="connecting"] { background: var(--ambar); animation: blink 1.1s var(--ease) infinite; }
.sse__dot[data-state="error"]      { background: var(--danger); }
@keyframes blink { 50% { opacity: .3; } }

/* ── progress-to-next-fernet (4 rungs) + counters ── */
.prog {
  border: 1px solid var(--line-dark); border-radius: var(--radius);
  background: rgba(247,243,236,.04); padding: var(--s3);
}
.prog__head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: .8rem; }
.prog__title { font-weight: 600; color: var(--crema); font-size: .95rem; }
.prog__count { font-family: var(--mono); font-size: .85rem; color: var(--muted-dark); font-variant-numeric: tabular-nums; }
.prog__count b { color: var(--brillo); font-size: 1.1rem; }
.prog__rungs { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; margin-bottom: .9rem; }
.prog__rung {
  height: 8px; border-radius: var(--radius-pill);
  background: rgba(247,243,236,.12); transition: background .4s var(--ease), box-shadow .4s var(--ease);
}
.prog__rung.is-on { background: var(--ambar); }
.prog__rung--goal.is-on { background: var(--brillo); box-shadow: 0 0 14px -2px rgba(255,194,61,.7); }
.prog__counters { display: flex; flex-wrap: wrap; gap: .3rem var(--s3); font-size: .85rem; color: var(--muted-dark); }
.prog__counters b { color: var(--ambar); font-family: var(--mono); font-weight: 700; font-variant-numeric: tabular-nums; }

.nearmiss {
  display: inline-flex; align-items: center; gap: .55rem; margin-top: var(--s2);
  padding: .5rem .9rem; border-radius: var(--radius-pill);
  background: rgba(240,165,0,.13); border: 1px solid rgba(240,165,0,.45);
  color: var(--brillo); font-weight: 600; font-size: .9rem;
  animation: nearmiss-pulse 1.8s var(--ease) infinite;
}
.nearmiss[hidden] { display: none; }
.nearmiss__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ambar); flex: none; }
@keyframes nearmiss-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(240,165,0,0); }
  50%     { box-shadow: 0 0 22px -2px rgba(240,165,0,.55); }
}

/* ── Level-up toast ── */
.toast {
  position: fixed; z-index: 1001; left: 50%; bottom: 2.2rem;
  transform: translate(-50%, 90px); opacity: 0;
  max-width: min(92vw, 30rem);
  padding: .95rem 1.4rem; border-radius: var(--radius-pill);
  background: var(--negro); color: var(--crema);
  border: 1px solid rgba(240,165,0,.5);
  box-shadow: 0 18px 50px -12px rgba(0,0,0,.6);
  font-weight: 600; text-align: center; line-height: 1.4;
}
.toast[hidden] { display: none; }
.toast.is-in  { animation: toast-in  .3s var(--reveal) forwards; }
.toast.is-out { animation: toast-out .25s ease-in forwards; }
@keyframes toast-in  { to { transform: translate(-50%, 0);   opacity: 1; } }
@keyframes toast-out { to { transform: translate(-50%, 90px); opacity: 0; } }

/* ═══════════════ RESULT PANEL (post-pago) ═══════════════ */
.result { scroll-margin-top: 70px; }
.result[hidden] { display: none; }
.result__inner { max-width: 760px; margin-inline: auto; }

.result__status {
  display: flex; align-items: center; justify-content: center; gap: .8rem;
  margin-top: var(--s3); padding: var(--s3); text-align: center;
  border: 1px solid var(--line-dark); border-radius: var(--radius);
  background: rgba(247,243,236,.04); color: var(--crema); font-weight: 600;
}
.result__spinner {
  width: 1.3rem; height: 1.3rem; border-radius: 50%; flex: none;
  border: 3px solid rgba(247,243,236,.25); border-top-color: var(--ambar);
  animation: spin .8s linear infinite;
}

.result__ready { display: grid; gap: var(--s3); margin-top: var(--s3); }

/* parseability card */
.parsecard {
  border: 1px solid var(--line-dark); border-radius: var(--radius);
  background: rgba(247,243,236,.04); padding: var(--s3);
}
.parsecard[hidden] { display: none; }
.parsecard__title { font-weight: 700; color: var(--crema); margin-bottom: var(--s2); }
.parsebar { display: grid; gap: .7rem; }
.parsebar__row { display: grid; grid-template-columns: 4rem 1fr 3rem; align-items: center; gap: .7rem; }
.parsebar__lbl { font-size: .82rem; color: var(--muted-dark); }
.parsebar__track { height: 10px; border-radius: var(--radius-pill); background: rgba(247,243,236,.12); overflow: hidden; }
.parsebar__fill { display: block; height: 100%; width: 0; border-radius: var(--radius-pill); transition: width .9s var(--ease); }
.parsebar__fill--before { background: var(--muted-dark); }
.parsebar__fill--after  { background: var(--ambar); }
.parsebar__val { font-family: var(--mono); font-size: .9rem; color: var(--brillo); text-align: right; font-variant-numeric: tabular-nums; }
.parsecard__note { margin-top: var(--s2); font-size: .82rem; color: var(--muted-dark-2); }

.downloads { display: flex; flex-wrap: wrap; gap: var(--s2); }
.downloads .btn[hidden] { display: none; }

/* match report card */
.matchcard {
  border: 1px solid var(--line-dark); border-radius: var(--radius);
  background: rgba(247,243,236,.04); padding: var(--s3);
}
.matchcard[hidden] { display: none; }
.matchcard__head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: var(--s2); flex-wrap: wrap; }
.matchcard__title { font-weight: 700; color: var(--crema); font-size: 1.05rem; }
.band {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .9rem; border-radius: var(--radius-pill);
  font-weight: 700; font-size: .85rem; letter-spacing: .02em; text-transform: uppercase;
  border: 1px solid; background: rgba(247,243,236,.06);
}
.band[data-band="fuerte"]  { color: var(--good);  border-color: rgba(60,179,113,.5);  background: rgba(60,179,113,.12); }
.band[data-band="parcial"] { color: var(--brillo); border-color: rgba(240,165,0,.5);  background: rgba(240,165,0,.13); }
.band[data-band="débil"]   { color: #E8917F; border-color: rgba(192,64,47,.5); background: rgba(192,64,47,.15); }

.matchgrid { margin-bottom: var(--s2); }
.matchgrid__cell { display: grid; gap: .15rem; }
.matchgrid__cell[hidden] { display: none; }
.matchgrid__lbl { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-dark-2); font-weight: 700; }
.matchgrid__val { color: var(--crema); font-size: .95rem; }
.matchgrid__val .ok { color: var(--good); }
.matchgrid__val .no { color: #E8917F; }

.chips { margin-top: var(--s2); }
.chips[hidden] { display: none; }
.chips__lbl { display: block; font-size: .8rem; color: var(--muted-dark); margin-bottom: .55rem; font-weight: 600; }
.chips__list { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; }
.chips__list li {
  padding: .35rem .75rem; border-radius: var(--radius-pill); font-size: .85rem; font-weight: 600;
  background: rgba(240,165,0,.14); border: 1px solid rgba(240,165,0,.4); color: var(--brillo);
}
.chips__list--soft li { background: rgba(247,243,236,.06); border-color: var(--line-dark); color: var(--on-dark); font-weight: 500; }
.matchcard__note { margin-top: var(--s2); font-size: .82rem; color: var(--muted-dark-2); }

.result__redo { text-align: center; color: var(--muted-dark); font-size: .95rem; }
.result__redo a { color: var(--brillo); }

.result__failed { margin-top: var(--s3); text-align: center; color: var(--on-dark); }
.result__failed[hidden] { display: none; }
.result__failed-msg { font-weight: 700; color: #E8917F; margin-bottom: .4rem; }
.result__failed a { color: var(--brillo); }

/* ═══════════════ Qué hacemos / qué recibís (crema) ═══════════════ */
.bullets { list-style: none; display: grid; gap: var(--s3); max-width: 900px; }
@media (min-width: 760px) { .bullets { grid-template-columns: 1fr 1fr; gap: var(--s3) var(--s5); } }
.bullets li { position: relative; padding-left: 2rem; color: var(--ink); font-size: 1.0625rem; }
.bullets li strong { color: var(--ink); }
.bullets li::before {
  content: ""; position: absolute; left: 0; top: .15em;
  width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23F7F3EC' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat,
    var(--verde);
}

/* ── Precio line + FAQ ── */
.faq__inner { max-width: 820px; }
.faq { display: grid; gap: var(--s2); }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-s); padding: var(--s2) var(--s3); }
.faq summary {
  list-style: none; cursor: pointer; font-weight: 600; font-size: 1.0625rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-weight: 400; font-size: 1.5rem; color: var(--ambar-ink);
  line-height: 1; transition: transform .2s var(--std); flex: none;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin-top: .75rem; color: var(--muted); font-size: 1rem; }
.faq a, #fernet-line a { color: var(--ambar-ink); }
#fernet-line { margin-top: var(--s2); font-size: 1rem; }

/* ── Footer ── */
.footer { background: var(--negro-2); color: var(--muted-dark); padding-block: var(--s5); }
.footer__inner { display: grid; gap: var(--s3); }
@media (min-width: 760px) { .footer__inner { grid-template-columns: 1fr auto; align-items: start; } }
.footer__brand .brand__type { color: var(--crema); font-size: 1.2rem; }
.footer__brand p { margin-top: .5rem; font-size: .9rem; max-width: 32ch; color: var(--muted-dark-2); }
.footer__links { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); }
.footer__links a { color: var(--muted-dark); text-decoration: none; font-size: .92rem; }
.footer__links a:hover { color: var(--crema); text-decoration: underline; }
.footer__legal { grid-column: 1 / -1; font-size: .8rem; color: var(--muted-dark-2); max-width: 60ch; }

/* ── Focus ── */
:focus-visible { outline: 2px solid var(--ambar); outline-offset: 2px; border-radius: 4px; }
.beat--cream :focus-visible { outline-color: var(--ambar-ink); }

/* ── Reveal on scroll ── */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .4s var(--reveal), transform .4s var(--reveal); }
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-delay="0"] { transition-delay: 0ms; }
[data-delay="1"] { transition-delay: 80ms; }
[data-delay="2"] { transition-delay: 160ms; }
[data-delay="3"] { transition-delay: 240ms; }
[data-delay="4"] { transition-delay: 320ms; }

/* ── Mobile: bottle below the form ── */
@media (max-width: 939px) {
  .hero__side { order: 2; }
  .stage { width: clamp(200px, 62vw, 280px); }
}

/* ════════════════ REDUCED MOTION — first-class state ════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .sse__dot[data-state="connecting"] { animation: none; }
  .nearmiss { animation: none; }
  #bottle-fill, #bottle-meniscus { transition: opacity .3s linear !important; }
  #wave-a, #wave-b { animation: none; display: none; }
  .stage.is-idle .stage__svg { animation: none; }
  .stage__pop, .stage__glow, .stage__confetti { display: none !important; }
  .parsebar__fill { transition: none !important; }
}
