/* Hallmark · shape: app screen · genre: playful · theme: Arcade (deal 1/3, seed chupitometro-web-divertida-fiesta-ee61) · job: try · draw: none
 * hero: split, form beside the glass · nav: edge wordmark and links · footer: mast · imagery: the product · signature: the shot glass that fills, tips and splashes · arcade: ember/grille
 * axes: dark/pixel/chromatic-ember · posture: full-palette · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V4 · weakest: S, one object (the glass) carries all the spectacle */
/* waive: drawn prop, the user asked for striking animations and the shot glass is the product itself */
@import url("./tokens.css");
@import url("./base.css");

.skip { position: absolute; left: var(--space-md); top: calc(-1 * var(--space-3xl)); z-index: var(--z-toast); padding: var(--space-xs) var(--space-md); background: var(--color-ink); color: var(--color-paper); }
.skip:focus-visible { top: var(--space-md); }
.muted { color: var(--color-muted); font-size: var(--text-sm); }
.notice { padding-block: var(--space-xl); }
.split { font-family: var(--font-display); text-transform: uppercase; line-height: 1.02; text-shadow: -1.5px 0 0 var(--color-crt-r), 1.5px 0 0 var(--color-crt-c); }
h2 { font: 900 var(--text-2xl)/1 var(--font-body); letter-spacing: -0.02em; }

/* ---------- Cabecera y pie ---------- */
.nav { border-bottom: var(--rule-hair) solid var(--color-rule); }
.nav__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs) var(--space-md); min-height: 72px; padding-block: var(--space-xs); }
.wordmark { font: 400 var(--text-lg)/1 var(--font-display); text-transform: uppercase; text-decoration: none; }
.nav nav { display: flex; align-items: center; gap: var(--space-lg); }
.nav nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; font-size: var(--text-sm); text-decoration: underline 2px transparent; }
.nav nav a:hover { text-decoration-color: var(--color-ink); }
.nav nav a[aria-current="page"] { text-decoration-color: var(--color-accent-2); }
.toggle { min-height: 44px; padding: 0 var(--space-sm); background: transparent; color: var(--color-muted); border: var(--rule-bar) solid var(--color-rule); border-radius: var(--radius-card); font-weight: 700; font-size: var(--text-sm); cursor: pointer; }
.toggle:hover { color: var(--color-ink); }
.toggle[aria-pressed="true"] { color: var(--color-accent-2); border-color: var(--color-accent-2); }
.foot { margin-top: var(--section-gap-s); padding-block: var(--space-2xl); background: var(--color-paper-2); border-top: var(--rule-bar) solid var(--color-rule); color: var(--color-ink-2); font-size: var(--text-sm); }
.foot__mark { font: 400 var(--text-display-s)/1.05 var(--font-display); text-transform: uppercase; color: var(--color-ink); margin-bottom: var(--space-md); overflow-wrap: anywhere; }

/* ---------- Controles ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 var(--space-lg); background: var(--color-accent); color: var(--color-accent-ink); border: var(--rule-bar) solid var(--color-ink); border-radius: var(--radius-card); box-shadow: var(--shadow-card); font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; transition: translate var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out); }
.btn:hover { translate: -1px -1px; box-shadow: 8px 8px 0 var(--color-accent-2); }
.btn:active { translate: 3px 3px; box-shadow: 2px 2px 0 var(--color-accent-2); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; }
.btn--quiet { background: transparent; color: var(--color-ink); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.chip { min-height: 44px; padding: 0 var(--space-md); background: transparent; color: var(--color-ink-2); border: var(--rule-bar) solid var(--color-rule); border-radius: var(--radius-card); font-weight: 700; font-size: var(--text-sm); cursor: pointer; }
.chip:hover { border-color: var(--color-muted); }
.chip:active { translate: 0 1px; }
.chip[aria-pressed="true"] { background: var(--color-ink); color: var(--color-paper); border-color: var(--color-ink); }

/* ---------- Portada ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap-columns); align-items: center; padding-block: var(--space-2xl); }
.hero h1 { font-size: clamp(2.5rem, 6vw + 0.5rem, 5.5rem); margin-bottom: var(--space-lg); }
.hero form { margin-top: var(--space-xl); max-width: 40rem; }
.hero label { display: block; margin-bottom: var(--space-xs); font-weight: 700; font-size: var(--text-sm); }
.form__row { display: flex; gap: var(--space-md); }
.form__row input { flex: 1; min-width: 0; min-height: 52px; padding: 0 var(--space-md); background: var(--color-paper-2); color: var(--color-ink); border: var(--rule-bar) solid var(--color-muted); border-radius: var(--radius-card); font-size: var(--text-lg); outline: 2px solid transparent; outline-offset: -4px; }
.form__row input::placeholder { color: var(--color-muted); }
.form__row input:focus-visible { outline-color: var(--color-focus); }
.form__row input[aria-invalid="true"] { border-color: var(--color-error); }
.form__help { min-height: 1lh; margin-top: var(--space-sm); font-size: var(--text-sm); color: var(--color-ink-2); }
.form__help a { text-decoration: underline 2px var(--color-accent-2); font-weight: 700; }
.hero__glass { display: grid; justify-items: center; gap: var(--space-md); }
.total { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: var(--space-sm); font-weight: 700; }

/* ---------- El vaso ---------- */
.glass { width: min(100%, 17rem); aspect-ratio: 200 / 240; overflow: visible; }
.glass__body { transform-origin: 100px 215px; }
.glass__wall { fill: none; stroke: var(--color-ink); stroke-width: 5; stroke-linejoin: round; }
.glass__base { fill: var(--color-ink); opacity: 0.85; }
.glass__shine { fill: none; stroke: var(--color-ink); stroke-width: 6; stroke-linecap: round; opacity: 0.25; }
.glass__liquid { transform: translateY(calc((1 - var(--level, 0.12)) * 160px)); transition: transform var(--dur-long) var(--ease-out); }
.glass__fill { fill: var(--color-accent); }
.glass__wave { fill: var(--color-accent-2); animation: wave 9s linear infinite; }
@keyframes wave { to { transform: translateX(-160px); } }
.glass.is-shot .glass__body { animation: shot 0.7s var(--ease-in-out); }
@keyframes shot { 0% { transform: none; } 35% { transform: translateY(-22px) rotate(-38deg); } 60% { transform: translateY(-18px) rotate(-32deg); } 82% { transform: translateY(4px) rotate(3deg); } 100% { transform: none; } }

#splash { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: var(--z-toast); }
.round { position: fixed; left: 50%; bottom: var(--space-xl); z-index: var(--z-toast); translate: -50% 0; padding: var(--space-md) var(--space-xl); background: var(--color-accent-2); color: var(--color-accent-ink); border-radius: var(--radius-card); font: 400 var(--text-xl)/1.1 var(--font-display); text-transform: uppercase; white-space: nowrap; opacity: 0; pointer-events: none; }
.round.is-on { animation: round 2.4s var(--ease-out); }
@keyframes round { 0% { opacity: 0; transform: translateY(24px) scale(0.8); } 12%, 82% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-12px); } }

/* ---------- Marcador de cifras rodantes ---------- */
.odometer { display: inline-flex; font: 700 var(--text-3xl)/1 var(--font-outlier); color: var(--color-accent-2); font-variant-numeric: tabular-nums; }
.odometer--giant { font-size: clamp(5rem, 17vw, 13rem); }
.odometer__slot { display: inline-block; height: 1em; width: 0.82em; overflow: hidden; text-align: center; }
.odometer__reel { display: block; transform: translateY(calc(var(--digit) * -1em)); transition: transform 0.55s var(--ease-out); }
.odometer__reel > span { display: block; height: 1em; }
.odometer__dot { width: 0.36em; }
.odometer.is-bump { animation: bump 0.32s var(--ease-out); }
@keyframes bump { 40% { transform: scale(1.06) translateY(-4px); } }

/* ---------- Listas ---------- */
.block { padding-top: var(--section-gap-s); }
.block--top { padding-top: var(--space-2xl); }
.block--top .chips { margin-block: var(--space-lg); }
.block__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-md); margin-bottom: var(--space-lg); }
.countdown { font-weight: 700; color: var(--color-ink); font-variant-numeric: tabular-nums; }
.empty { padding-block: var(--space-xl); color: var(--color-ink-2); }
.board { list-style: none; margin: 0; padding: 0; counter-reset: pos; }
.board li { counter-increment: pos; border-bottom: var(--rule-hair) solid var(--color-rule); }
.board a { position: relative; isolation: isolate; display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) auto; align-items: center; gap: var(--space-md); min-height: 76px; padding: var(--space-sm) var(--space-md); text-decoration: none; }
.board a::before { content: counter(pos); font-weight: 900; font-size: var(--text-xl); color: var(--color-muted); }
.board a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: -1; background: var(--color-accent); transform-origin: left; transform: scaleX(var(--share, 0)); transition: transform var(--dur-long) var(--ease-out); }
.board a:hover { background: var(--color-paper-3); }
.board li:first-child a { background: var(--color-accent); color: var(--color-accent-ink); }
.board li:first-child a::before, .board li:first-child .board__meta, .board li:first-child .board__count { color: var(--color-accent-ink); }
.board li:first-child a::after { background: var(--color-accent-ink); }
.board__phrase { font-weight: 900; font-size: var(--text-title); line-height: 1.2; overflow-wrap: anywhere; }
.board__meta { display: block; font-weight: 400; font-size: var(--text-sm); color: var(--color-muted); }
.board__count { font: 700 var(--text-3xl)/1 var(--font-outlier); color: var(--color-accent-2); font-variant-numeric: tabular-nums; }
.board li.is-hit { animation: hit 0.5s var(--ease-out); }
@keyframes hit { 30% { transform: scale(1.015); } }

/* ---------- Detalle de una frase ---------- */
.term { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--gap-columns); align-items: center; padding-top: var(--space-2xl); }
.term__phrase { font-size: var(--text-display-s); text-transform: uppercase; margin-block: var(--space-sm) var(--space-lg); }
.term__phrase.is-long { font-size: var(--text-2xl); }
.term__score { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-md); }
.term__unit { font-weight: 900; font-size: var(--text-xl); }
.term__actions { display: flex; flex-wrap: wrap; gap: var(--space-lg); margin-top: var(--space-xl); }
.term__glass { display: grid; justify-items: center; gap: var(--space-md); text-align: center; }
.tray { display: grid; grid-template-columns: repeat(10, 1fr); gap: var(--space-2xs); width: 100%; max-width: 18rem; margin: 0; padding: 0; list-style: none; }
.tray li { height: 32px; background: var(--color-rule); clip-path: polygon(0 0, 100% 0, 85% 100%, 15% 100%); position: relative; overflow: hidden; }
.tray li::after { content: ""; position: absolute; inset: 0; background: var(--color-accent); transform: translateY(100%); transition: transform var(--dur-long) var(--ease-out); }
.tray li.is-full::after { transform: translateY(20%); }

.hours { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: var(--space-2xs); margin: var(--space-lg) 0 0; padding: 0; list-style: none; }
.hours li { display: grid; grid-template-rows: 120px auto; gap: var(--space-2xs); text-align: center; font-size: var(--text-xs); color: var(--color-muted); }
.hours i { display: block; background: var(--color-accent-2); transform-origin: bottom; transform: scaleY(var(--h, 0)); transition: transform var(--dur-long) var(--ease-out); border-bottom: 2px solid var(--color-accent-2); }
.hours li:not(:nth-child(3n + 1)) span { visibility: hidden; }

.refs { list-style: none; margin: 0 0 var(--space-xl); padding: 0; }
.ref { display: grid; grid-template-columns: 11rem minmax(0, 1fr) auto; gap: var(--space-lg); align-items: start; padding-block: var(--space-lg); border-top: var(--rule-hair) solid var(--color-rule); }
.ref__who { font-size: var(--text-sm); color: var(--color-muted); overflow-wrap: anywhere; }
.ref__who strong { display: block; color: var(--color-accent-2); font-size: var(--text-md); }
.ref__text { max-width: 65ch; overflow-wrap: anywhere; }
.ref__text mark { background: var(--color-accent); color: var(--color-accent-ink); padding: 0 var(--space-3xs); }
.ref__author { display: block; margin-bottom: var(--space-2xs); font-weight: 700; }
.ref__link { font-weight: 700; font-size: var(--text-sm); text-decoration: underline 2px var(--color-accent-2); white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.ref__link:hover { text-decoration-color: var(--color-accent); }
.ref.is-new { animation: arrive 0.6s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes arrive { from { opacity: 0; transform: translateX(-32px); } }
.note { margin-top: var(--space-lg); }

@media (max-width: 60rem) {
  .hero, .term { grid-template-columns: minmax(0, 1fr); padding-top: var(--space-xl); }
  .hero__glass .glass, .term__glass .glass { width: min(60%, 12rem); }
  .ref { grid-template-columns: minmax(0, 1fr); gap: var(--space-xs); }
}
@media (max-width: 40rem) {
  .wordmark { font-size: var(--text-md); }
  .nav nav { gap: var(--space-md); }
  .form__row { flex-direction: column; }
  .form__row input { flex: none; width: 100%; }
  .board a { grid-template-columns: 2rem minmax(0, 1fr) auto; gap: var(--space-xs); padding-inline: var(--space-xs); }
  .board__count { font-size: var(--text-2xl); }
}
@media (prefers-reduced-motion: reduce) {
  .glass__wave, .glass.is-shot .glass__body, .ref.is-new, .odometer.is-bump, .board li.is-hit { animation: none; }
  .round.is-on { animation: none; opacity: 1; }
  #splash { display: none; }
}
