/* Yan y Miro · Reto Visual — identidad de marca (yanymiro.com.mx) */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  --coral: #eb3f3b;
  --coral-dark: #c22f2c;
  --coral-soft: #fdeceb;
  --ink: #09090a;
  --ink-70: rgba(29, 26, 26, .72);
  --paper: #f9faf8;
  --card: #ffffff;
  --yellow: #ffcd4b;
  --green: #1e9e6a;
  --orange: #e07b1f;
  --red: #d62828;
  --line: #e7e6e2;
}

html, body { height: 100%; }
body {
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px 10px;
  background: var(--card);
  border-bottom: 3px solid var(--ink);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-weight: 900; font-size: 17px; letter-spacing: .5px; color: var(--coral); text-transform: uppercase; line-height: 1; }
.brand-sub { display: block; font-weight: 600; font-size: 11px; color: var(--ink-70); letter-spacing: .2px; margin-top: 2px; }
.progress-dots { display: flex; gap: 6px; }
.progress-dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.progress-dots span.on { background: var(--coral); }

main#app { max-width: 560px; margin: 0 auto; padding: 18px 16px 44px; }

.screen { display: none; }
.screen.active { display: block; animation: pop .25s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

h1 { color: var(--ink); font-size: 30px; font-weight: 900; text-align: center; margin: 8px 0 6px; letter-spacing: -.5px; }
h2 { color: var(--ink); font-size: 22px; font-weight: 800; margin: 4px 0 12px; letter-spacing: -.3px; }
p.lead { color: var(--ink-70); font-size: 15px; line-height: 1.5; margin-bottom: 14px; }
p.hint { font-size: 13px; color: var(--ink-70); margin-top: 8px; text-align: center; min-height: 18px; }
p.note { font-size: 12.5px; color: var(--ink-70); margin: 14px 4px; line-height: 1.45; }
p.status { font-size: 13px; text-align: center; color: var(--ink-70); margin-top: 10px; }
p.error { color: var(--red); font-size: 13px; min-height: 16px; margin-top: 6px; }

/* Logo de marca */
.logo-hero { display: block; width: min(260px, 70%); margin: 4px auto 14px; background: var(--card); border: 3px solid var(--ink); border-radius: 18px; padding: 10px; box-shadow: 6px 6px 0 var(--yellow); }
.logo-foot { text-align: center; font-size: 12px; font-weight: 700; color: var(--coral); letter-spacing: .3px; margin-bottom: 14px; }

/* Miro, la mascota */
.miro-row { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 16px; }
.miro-avatar { flex: none; width: 62px; height: 62px; background: var(--card); border: 2px solid var(--ink); border-radius: 16px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.miro-avatar svg { width: 92%; height: 92%; }
.brand-mark { width: 40px; height: 34px; overflow: hidden; display: flex; align-items: center; }
.brand-mark svg { width: 100%; height: auto; }
.miro-bubble {
  position: relative; background: var(--card); border: 2px solid var(--ink);
  border-radius: 14px; padding: 11px 13px; font-size: 14px; line-height: 1.45;
  color: var(--ink); box-shadow: 4px 4px 0 var(--coral-soft); flex: 1;
}
.miro-bubble::before {
  content: ""; position: absolute; left: -9px; top: 16px;
  border: 7px solid transparent; border-right-color: var(--ink); border-left: 0;
}
.miro-bubble b { color: var(--coral); }

.card {
  background: var(--card); border: 2px solid var(--ink); border-radius: 18px;
  padding: 18px; box-shadow: 5px 5px 0 var(--ink); margin-bottom: 18px;
}

.checklist p { font-weight: 800; margin-bottom: 8px; }
.checklist ul { list-style: none; }
.checklist li { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.checklist li:last-child { border: none; }

.form label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 14px; color: var(--ink); }
.form input[type=text], .form input[type=number], .form input[type=tel] {
  width: 100%; margin-top: 6px; padding: 13px 14px; font-size: 16px;
  border: 2px solid var(--line); border-radius: 12px; background: var(--paper);
  font-family: inherit;
}
.form input:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 3px var(--coral-soft); }
.consent { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 500 !important; font-size: 13px !important; color: var(--ink-70); line-height: 1.45; }
.consent input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--coral); }
.consent a { color: var(--coral); }

.steps .step { display: flex; gap: 12px; padding: 9px 0; align-items: flex-start; }
.step-num {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--coral); color: #fff; font-weight: 900;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.steps p { font-size: 14.5px; line-height: 1.45; }

.btn-primary, .btn-secondary {
  display: block; width: 100%; border: 2px solid var(--ink); cursor: pointer;
  border-radius: 12px; font-size: 17px; font-weight: 900; font-family: inherit;
  padding: 15px; transition: transform .08s ease, box-shadow .12s ease;
  text-transform: none; letter-spacing: -.2px;
}
.btn-primary { background: var(--coral); color: #fff; box-shadow: 5px 5px 0 var(--ink); }
.btn-primary:hover { background: var(--coral-dark); }
.btn-secondary { background: var(--card); color: var(--ink); box-shadow: 5px 5px 0 var(--line); }
.btn-primary:active, .btn-secondary:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }

/* Juego de percepción */
.stage {
  background: var(--card); border: 2px solid var(--ink); border-radius: 18px;
  box-shadow: 5px 5px 0 var(--yellow);
  min-height: 210px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.game-word {
  font-size: 52px; font-weight: 900; letter-spacing: 1px;
  color: var(--ink); text-transform: lowercase; text-align: center; padding: 20px;
}
.game-word.show { animation: flash .5s ease; }
@keyframes flash { 0% { transform: scale(.7); opacity: 0; } 25% { transform: scale(1); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.stage-empty-note { font-size: 15px; color: var(--ink-70); text-align: center; padding: 20px; font-weight: 600; }

.round-meter { display: flex; gap: 5px; justify-content: center; margin-bottom: 12px; }
.round-meter i { width: 16px; height: 6px; border-radius: 3px; background: var(--line); }
.round-meter i.done-ok { background: var(--green); }
.round-meter i.done-bad { background: var(--coral); }
.round-meter i.now { background: var(--yellow); }

.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 440px; margin: 0 auto; }
.btn-option {
  display: flex; align-items: center; gap: 10px;
  border: 2px solid var(--ink); border-radius: 14px; padding: 15px 12px;
  background: var(--card); color: var(--ink); cursor: pointer; font-family: inherit;
  font-size: 19px; font-weight: 800; text-transform: lowercase;
  box-shadow: 4px 4px 0 var(--ink); transition: transform .08s ease, box-shadow .08s ease;
}
.btn-option:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-option:disabled { cursor: default; }
.opt-letter {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}
.opt-word { flex: 1; text-align: center; }
.btn-option.is-correct { background: var(--green); border-color: var(--ink); color: #fff; }
.btn-option.is-correct .opt-letter { background: #fff; color: var(--green); }
.btn-option.is-wrong { background: var(--coral); border-color: var(--ink); color: #fff; }
.btn-option.is-wrong .opt-letter { background: #fff; color: var(--coral); }
.btn-option.dim { opacity: .45; }
#gameFeedback { font-size: 14px; font-weight: 700; text-align: center; color: var(--ink); min-height: 20px; }
.score-live { text-align: center; color: var(--ink-70); font-size: 13px; font-weight: 700; margin-top: 8px; }

/* Miro (arte oficial del logo): guiño durante el juego */
.game-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.game-head h2 { margin: 4px 0 12px; }
.miro-game { width: 66px; height: 58px; }
.miro-game .lid { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0); }
.miro-game.winking .lid-r { animation: wink 3.4s ease-in-out infinite; }
.miro-game.winking .lid-l { animation: blink 5.1s ease-in-out infinite; }
.miro-game.winking.hurrying .lid-r { animation-duration: 1.2s; }
.miro-game.focus { transform: scale(1.08) rotate(-4deg); transition: transform .15s ease; }
@keyframes wink { 0%, 78%, 100% { transform: scaleY(0); } 84%, 91% { transform: scaleY(1); } }
@keyframes blink { 0%, 46%, 53%, 100% { transform: scaleY(0); } 48%, 51% { transform: scaleY(1); } }

/* Resultados */
.traffic { font-size: 44px; text-align: center; }
.traffic-label { font-size: 21px; font-weight: 900; text-align: center; margin: 6px 0 12px; letter-spacing: -.3px; }
.result-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px dashed var(--line); font-size: 15px; }
.result-row:last-child { border: none; }
.result-row b { color: var(--coral); text-align: right; }
.final-quote {
  font-weight: 700; text-align: center; font-size: 15px; color: var(--ink);
  background: var(--yellow); border: 2px solid var(--ink); border-radius: 12px;
  padding: 12px; margin-bottom: 12px; line-height: 1.4;
}
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #fff; }
.badge.ok { background: var(--green); } .badge.warn { background: var(--orange); } .badge.refer { background: var(--red); }
.cta { margin-top: 6px; }
.cta .btn-whats {
  display: block; text-align: center; background: #25d366; color: #fff; text-decoration: none;
  border: 2px solid var(--ink); border-radius: 12px; padding: 15px; font-weight: 800; font-size: 16px;
  margin-top: 10px; box-shadow: 5px 5px 0 var(--ink);
}
.qr-box { text-align: center; margin-top: 16px; }
.qr-box img { width: 150px; border-radius: 12px; background: #fff; padding: 6px; border: 2px solid var(--ink); }
.qr-caption { font-size: 12px; color: var(--ink-70); margin-top: 6px; }
