/* lasman.co/preparacion — «Preparemos juntos»: app de V60 para el celular. Colores del sistema David Lasman. */
:root {
  --ink: #101010;
  --ink-2: #1A1B1E;
  --ink-3: #26282D;
  --paper: #FFFFFF;
  --ice: #E4ECF6;
  --blue: #356BFF;
  --blue-soft: #C7D7EF;
  --muted: #A3ACB9;
  --line: rgba(255, 255, 255, .12);
  --ok: #3DDC84;
  --warn: #FFB547;
  --coffee: #7A4A2A;
  --font-display: 'Exo 2', 'Helvetica Neue', Arial, sans-serif;
  --font-body: Montserrat, 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --pad: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--ink); color: var(--paper); font-family: var(--font-body); line-height: 1.5;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;
}
h1, h2, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Marco de app: una columna del ancho de un celular, centrada en pantallas grandes */
.app {
  position: relative; max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; background: radial-gradient(120% 60% at 50% -10%, #1d2a4d 0%, var(--ink) 60%);
}
@media (min-width: 560px) {
  body { background: #0A0A0B; }
  .app { border-inline: 1px solid var(--line); box-shadow: 0 0 80px rgba(53, 107, 255, .08); }
}

/* Barra superior */
.bar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 10px) var(--pad) 10px;
  background: linear-gradient(var(--ink) 70%, transparent);
}
.bar__btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 12px; background: var(--ink-3); }
.bar__btn[aria-pressed="true"] .ic-off, .bar__btn[aria-pressed="false"] .ic-on { display: none; }
.bar__logo { margin-right: auto; }
.bar__logo img { display: block; filter: invert(1); width: 28px; height: 28px; }
.dots { flex: 1; display: flex; gap: 5px; list-style: none; margin: 0; padding: 0; }
.dots li { flex: 1; height: 4px; border-radius: 4px; background: var(--ink-3); transition: background .4s var(--ease); }
.dots li.is-done { background: var(--blue); }
.dots li.is-now { background: linear-gradient(90deg, var(--blue), var(--blue-soft)); }
.xp-pill { font: 700 13px/1 var(--font-display); padding: 8px 10px; border-radius: 99px; background: rgba(53, 107, 255, .16); color: var(--blue-soft); white-space: nowrap; }
.xp-pill.is-bump { animation: bump .5s var(--ease); }

/* Pantallas */
.screens { flex: 1; display: flex; flex-direction: column; }
.scr { display: flex; flex-direction: column; flex: 1; }
.js .scr { display: none; }
.js .scr.is-on { display: flex; animation: enter .45s var(--ease); }
.js .scr.is-back { animation-name: enter-back; }
.no-js .scr + .scr { border-top: 1px solid var(--line); }
.scr__body { flex: 1; padding: 12px var(--pad) 24px; display: flex; flex-direction: column; gap: 16px; }
.scr__actions {
  position: sticky; bottom: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 16px var(--pad) calc(env(safe-area-inset-bottom) + 16px);
  background: linear-gradient(transparent, var(--ink) 30%);
}
.scr__actions--row { flex-direction: row; }
.scr__actions--row .btn { flex: 1; }

.kicker { font: 600 12px/1.2 var(--font-display); letter-spacing: .16em; text-transform: uppercase; color: var(--blue-soft); }
.title-xl { font: 800 clamp(40px, 13vw, 56px)/1 var(--font-display); letter-spacing: -.02em; }
.title { font: 700 clamp(26px, 7.5vw, 32px)/1.12 var(--font-display); letter-spacing: -.01em; }
.lead { color: var(--muted); font-size: 15px; }
.label { font: 600 12px/1.2 var(--font-display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hl { color: var(--blue); white-space: nowrap; }
.tip { font-size: 14px; color: var(--muted); padding: 12px 14px; border-radius: 14px; background: var(--ink-2); border: 1px solid var(--line); }
.tip b { color: var(--paper); }
.js .js-later:not(.is-shown) { display: none; }
.scr--hero .scr__body { padding-top: 24px; gap: 18px; }
.scr--hero .title-xl { background: linear-gradient(180deg, #fff 40%, var(--blue-soft)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Botones */
.btn {
  min-height: 56px; width: 100%; padding: 0 22px; border: 0; border-radius: 18px;
  font: 700 17px/1 var(--font-display); letter-spacing: .01em; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink-3); transition: transform .15s var(--ease), background .2s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn--main { background: var(--blue); color: #fff; box-shadow: 0 10px 30px rgba(53, 107, 255, .35); }
.btn--main[aria-disabled="true"] { opacity: .45; box-shadow: none; }
.btn--ghost { background: var(--ink-3); }
.btn--done { background: var(--ok); color: var(--ink); box-shadow: 0 10px 30px rgba(61, 220, 132, .35); animation: pulse 1.6s infinite; }
.btn--small { min-height: 42px; width: auto; font-size: 15px; border-radius: 14px; background: var(--paper); color: var(--ink); }
.link { background: none; border: 0; padding: 6px; font: 600 14px/1 var(--font-body); color: var(--muted); text-decoration: underline; text-decoration-color: var(--blue); text-underline-offset: 5px; }

/* Inicio */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats div { padding: 12px 8px; border-radius: 16px; background: var(--ink-2); border: 1px solid var(--line); text-align: center; }
.stats b { display: block; font: 800 22px/1.1 var(--font-display); }
.stats span { font-size: 11px; color: var(--muted); }
.stats [data-stat="level"] { font-size: 14px; line-height: 1.3; min-height: 24px; display: flex; align-items: center; justify-content: center; }
.serv { display: grid; gap: 10px; }
.serv__opt {
  display: grid; grid-template-columns: auto 1fr; column-gap: 14px; text-align: left; padding: 16px; border-radius: 20px;
  background: var(--ink-2); border: 2px solid var(--line); transition: border-color .2s, background .2s, transform .15s var(--ease);
}
.serv__opt:active { transform: scale(.98); }
.serv__opt[aria-checked="true"] { border-color: var(--blue); background: rgba(53, 107, 255, .1); }
.serv__cups { grid-row: span 3; width: 52px; text-align: center; font-size: 26px; align-self: center; letter-spacing: -8px; }
.serv__name { font: 700 18px/1.2 var(--font-display); }
.serv__sub { font-size: 13px; color: var(--muted); }
.serv__nums { font-size: 12px; color: var(--blue-soft); margin-top: 4px; }

/* Listas de chequeo */
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.check {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 14px; border-radius: 16px; text-align: left;
  background: var(--ink-2); border: 1px solid var(--line); transition: background .2s, border-color .2s, transform .15s var(--ease);
}
.check:active { transform: scale(.98); }
.check__ic { font-size: 22px; width: 30px; text-align: center; }
.check__n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-3); font: 700 14px/1 var(--font-display); }
.check__txt { flex: 1; font-size: 15px; }
.check__box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--muted); display: grid; place-items: center; transition: all .25s var(--ease); }
.check[aria-pressed="true"] { border-color: rgba(61, 220, 132, .5); background: rgba(61, 220, 132, .08); }
.check[aria-pressed="true"] .check__txt { color: var(--muted); }
.check[aria-pressed="true"] .check__box { background: var(--ok); border-color: var(--ok); animation: pop .35s var(--ease); }
.check[aria-pressed="true"] .check__box::after { content: ''; width: 7px; height: 12px; border: solid var(--ink); border-width: 0 3px 3px 0; transform: translateY(-2px) rotate(45deg); }

/* Termómetro */
.thermo { padding: 22px 18px 18px; border-radius: 24px; background: var(--ink-2); border: 1px solid var(--line); display: grid; gap: 10px; }
.thermo__val { font: 800 64px/1 var(--font-display); text-align: center; transition: color .3s; }
.thermo.is-hot .thermo__val { color: #FF7A59; }
.thermo.is-cold .thermo__val { color: #7FB2FF; }
.thermo.is-ok .thermo__val { color: var(--ok); }
.thermo__range { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; border-radius: 14px; margin: 14px 0 2px; background: linear-gradient(90deg, #7FB2FF 0%, #7FB2FF 45%, var(--ok) 60%, var(--ok) 70%, #FF7A59 85%); }
.thermo__range::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 5px solid var(--ink); box-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.thermo__range::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 5px solid var(--ink); }
.thermo__scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.thermo__msg { text-align: center; font-weight: 600; min-height: 1.5em; }

/* Quiz de molienda */
.quiz { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quiz__opt { display: grid; justify-items: center; gap: 4px; padding: 14px 6px 12px; border-radius: 18px; background: var(--ink-2); border: 2px solid var(--line); transition: border-color .2s, transform .15s var(--ease); }
.quiz__opt:active { transform: scale(.96); }
.quiz__opt.is-right { border-color: var(--ok); background: rgba(61, 220, 132, .1); animation: pop .4s var(--ease); }
.quiz__opt.is-wrong { border-color: #FF7A59; animation: shake .4s; }
.quiz__label { font: 700 15px/1.2 var(--font-display); }
.quiz__hint { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.3; }
.grain { width: 64px; height: 64px; border-radius: 50%; margin-bottom: 6px; background-color: #3A2416; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .06); }
.grain--fina { background-image: radial-gradient(#8B5A36 .8px, transparent 1.2px); background-size: 4px 4px; }
.grain--media { background-image: radial-gradient(#9C6A43 1.6px, transparent 2.2px), radial-gradient(#6E4224 1.4px, transparent 2px); background-size: 8px 8px, 7px 7px; background-position: 0 0, 3px 4px; }
.grain--gruesa { background-image: radial-gradient(#A8754C 3.4px, transparent 4.2px), radial-gradient(#6E4224 3px, transparent 3.8px); background-size: 15px 15px, 13px 13px; background-position: 0 0, 6px 7px; }
.quiz__why { min-height: 1.5em; font-weight: 600; text-align: center; }

/* Receta */
.recipe { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.recipe div { padding: 12px 14px; border-radius: 16px; background: var(--ink-2); border: 1px solid var(--line); display: grid; gap: 2px; }
.recipe span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.recipe b { font: 700 18px/1.2 var(--font-display); }

/* Cronómetro */
.scr--brew .scr__body { justify-content: center; gap: 12px; }
.brew { display: grid; gap: 16px; }
.brew__stage { position: relative; width: min(78vw, 300px); aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring__track { fill: none; stroke: var(--ink-3); stroke-width: 8; }
.ring__bar { fill: none; stroke: var(--blue); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 628.3; stroke-dashoffset: 628.3; transition: stroke-dashoffset .3s linear, stroke .3s; }
.brew.is-drain .ring__bar { stroke: var(--ok); }
.v60 { width: 54%; margin-top: -14%; overflow: visible; }
.v60__cone { fill: rgba(255, 255, 255, .05); stroke: #fff; stroke-width: 2.5; stroke-linejoin: round; }
.v60__base, .v60__cup { fill: none; stroke: rgba(255, 255, 255, .55); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.v60__bed { fill: var(--coffee); }
.v60__water { fill: rgba(53, 107, 255, .55); transform-box: view-box; transform-origin: 0 92px; transform: translateY(80px); transition: transform .3s linear; }
.v60__stream { fill: rgba(127, 178, 255, .9); opacity: 0; transition: opacity .3s; }
.brew.is-pouring .v60__stream { opacity: 1; animation: stream .5s linear infinite; }
.v60__bubbles circle { fill: rgba(255, 255, 255, .7); opacity: 0; }
.brew.is-bloom .v60__bubbles circle { animation: bubble 1.6s infinite; }
.brew.is-bloom .v60__bubbles circle:nth-child(2) { animation-delay: .4s; }
.brew.is-bloom .v60__bubbles circle:nth-child(3) { animation-delay: .8s; }
.brew.is-bloom .v60__bubbles circle:nth-child(4) { animation-delay: 1.2s; }
.clock { position: absolute; bottom: 15%; font: 800 44px/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.phase { text-align: center; display: grid; gap: 6px; min-height: 150px; align-content: start; }
.phase__title { font: 800 26px/1.15 var(--font-display); }
.phase__goal { font: 700 20px/1.2 var(--font-display); color: var(--blue-soft); }
.phase__goal b { font-size: 34px; color: #fff; }
.phase__now { font-size: 14px; color: var(--muted); }
.phase__now b { color: #fff; font-variant-numeric: tabular-nums; }
.phase__text { color: var(--ice); font-size: 15px; }
.phase__next { font-size: 13px; color: var(--muted); min-height: 1.4em; }
.steps-mini { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; list-style: none; margin: 0; padding: 0; }
.steps-mini li { white-space: nowrap; padding: 6px 10px; border-radius: 99px; font-size: 11px; font-weight: 600; background: var(--ink-3); color: var(--muted); transition: all .3s var(--ease); }
.steps-mini li.is-done { background: rgba(61, 220, 132, .15); color: var(--ok); }
.steps-mini li.is-now { background: var(--blue); color: #fff; transform: scale(1.06); }
.static-steps { color: var(--ice); display: grid; gap: 8px; padding-left: 20px; }
.count { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; background: rgba(16, 16, 16, .88); }
.count span { font: 800 160px/1 var(--font-display); color: var(--blue); animation: count 1s var(--ease) infinite; }

/* Resultado */
.scr--result .scr__body { gap: 14px; }
.card { padding: 18px; border-radius: 22px; background: var(--ink-2); border: 1px solid var(--line); display: grid; gap: 10px; }
.big { font: 800 44px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.card__msg { font-weight: 600; min-height: 1.5em; }
.card__msg.is-ok { color: var(--ok); }
.card__msg.is-warn { color: var(--warn); }
.gauge { position: relative; height: 12px; border-radius: 12px; background: var(--ink-3); margin: 6px 0; }
.gauge__zone { position: absolute; top: 0; bottom: 0; border-radius: 12px; background: rgba(61, 220, 132, .5); }
.gauge__pin { position: absolute; top: -6px; width: 6px; height: 24px; border-radius: 4px; background: #fff; transform: translateX(-50%); transition: left 1.2s var(--ease); box-shadow: 0 0 0 3px var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 11px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--ink-3); font-size: 14px; font-weight: 600; transition: all .2s var(--ease); }
.chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.xp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.xp-list li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; opacity: 0; animation: rise .4s var(--ease) forwards; }
.xp-list li b { color: var(--blue-soft); font-family: var(--font-display); }
.xp-list li.is-total { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 700; font-size: 16px; }
.xp-list li.is-total b { color: #fff; font-size: 18px; }
.level { display: grid; gap: 8px; margin-top: 6px; }
.level__top { display: grid; gap: 2px; }
.level__top b { font: 700 17px/1.2 var(--font-display); }
.level__top span { font-size: 12px; color: var(--muted); }
.level__bar { height: 10px; border-radius: 10px; background: var(--ink-3); overflow: hidden; }
.level__bar span { display: block; height: 100%; width: 0; border-radius: 10px; background: linear-gradient(90deg, var(--blue), #8FB0FF); transition: width 1.4s var(--ease); }
.badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 6px; }
.badges li { display: grid; justify-items: center; gap: 4px; text-align: center; font-size: 10.5px; line-height: 1.25; color: var(--muted); }
.badges .b-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; background: var(--ink-3); filter: grayscale(1); opacity: .35; }
.badges li.is-got { color: var(--paper); }
.badges li.is-got .b-ic { filter: none; opacity: 1; background: radial-gradient(circle at 30% 30%, #2a3c6e, #172036); box-shadow: 0 0 0 2px var(--blue); }
.badges li.is-new .b-ic { animation: badge 1s var(--ease) both; box-shadow: 0 0 0 2px var(--ok), 0 0 24px rgba(61, 220, 132, .5); }
.card--talk { background: linear-gradient(135deg, #1d2a4d, #15192a); border-color: rgba(53, 107, 255, .35); }
.question { font: 700 22px/1.25 var(--font-display); transition: opacity .25s; }
.question.is-swap { opacity: 0; }
.talk__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* Efectos */
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 20; }
.toast {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 68px); z-index: 21; transform: translate(-50%, -20px); opacity: 0;
  padding: 10px 16px; border-radius: 99px; background: var(--ok); color: var(--ink); font: 700 15px/1.2 var(--font-display);
  transition: opacity .25s, transform .35s var(--ease); pointer-events: none; width: max-content; max-width: calc(100vw - 32px); text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@keyframes enter { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes enter-back { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes bump { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.25); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, .5); } 50% { box-shadow: 0 0 0 12px rgba(61, 220, 132, 0); } }
@keyframes stream { from { transform: translateY(-4px); } to { transform: translateY(0); } }
@keyframes bubble { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
@keyframes count { 0% { transform: scale(1.4); opacity: 0; } 30% { transform: scale(1); opacity: 1; } 100% { transform: scale(.9); opacity: .8; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes badge { 0% { transform: scale(0) rotate(-30deg); } 70% { transform: scale(1.2) rotate(8deg); } 100% { transform: scale(1) rotate(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
