/* Landing de MIRTests (mir-tests.web.app). Mismo estilo que la app web: Inter + Instrument
   Serif, turquesa de la marca, modo claro y oscuro según el sistema. */
:root {
  --bg: #ffffff; --text: #0e0f11; --muted: #6a6f76; --faint: #a0a4aa; --line: #ecedef; --surface: #fafaf9;
  --accent: #27726e; --accent-soft: rgba(57, 165, 159, .16); --ok: #1e7f4e; --ok-bg: #f1f8f4; --bad: #c2412d;
  --band: #0c0d0e; --band-text: #f3f3f2; --band-muted: #8f959c; --band-line: #222428; --band-accent: #6ccbc4;
  --serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0b; --text: #eeeeec; --muted: #9a9ea4; --faint: #686c72; --line: #1d1e21; --surface: #111113;
    --accent: #48b3ac; --accent-soft: rgba(57, 165, 159, .14); --ok: #4cbf82; --ok-bg: #0f1f17; --bad: #f08a76;
    --band: #111214; --band-line: #24262a;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; line-height: 1.55; overflow-x: hidden;
}
:where(h1, h2, h3, p, ol, ul) { margin: 0; padding: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 28px; }
.overline { font-size: 11.5px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; padding: 8px 14px; background: var(--text); color: var(--bg); border-radius: 8px; }

/* Navegación */
.nav { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 400; font-size: 16px; letter-spacing: .04em; text-decoration: none; }
.brand svg { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.nav-links a:not(.btn) { color: var(--muted); text-decoration: none; transition: color .2s; }
.nav-links a:not(.btn):hover { color: var(--text); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 26px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text);
  font: inherit; font-size: 14.5px; font-weight: 450; text-decoration: none; cursor: pointer;
  transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease); }
.btn:hover { border-color: var(--faint); transform: translateY(-1px); }
.btn--primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn--primary:hover { border-color: var(--text); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .45); }
.btn--small { height: 38px; padding: 0 18px; font-size: 13.5px; }
.btn[aria-disabled="true"] { opacity: .55; cursor: default; transform: none; }
.btn small { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Portada */
.hero { position: relative; text-align: center; padding-top: 72px; overflow-x: clip; }
.glow { position: absolute; left: 50%; top: 360px; width: 1100px; height: 640px; transform: translateX(-50%); pointer-events: none; z-index: -1;
  background: radial-gradient(closest-side, var(--accent-soft), transparent); filter: blur(10px); }
h1 { max-width: 840px; margin: 22px auto 0; font-size: clamp(40px, 6vw, 72px); line-height: 1.04; letter-spacing: -.045em; font-weight: 300; }
h1 em { font-size: 1.08em; color: var(--accent); }
.lead { max-width: 540px; margin: 24px auto 0; font-size: 17px; font-weight: 300; color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 40px; }
.note { margin-top: 16px; font-size: 13px; color: var(--faint); }
.hero > .container > * { animation: rise 1s var(--ease) both; }
.hero > .container > :nth-child(2) { animation-delay: .08s; }
.hero > .container > :nth-child(3) { animation-delay: .16s; }
.hero > .container > :nth-child(4) { animation-delay: .24s; }
.hero > .container > :nth-child(5) { animation-delay: .32s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Vista del producto (pregunta real, animada al aparecer) */
.product-wrap { margin-top: 72px; text-align: left; }
.product { border: 1px solid var(--line); border-radius: 16px; background: var(--bg); overflow: hidden;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .02), 0 30px 60px -36px rgba(0, 0, 0, .22); }
.product-bar { display: flex; align-items: center; gap: 18px; padding: 15px 26px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.product-track { flex: 1; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.product-track span { display: block; width: 28%; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform 1.4s .5s var(--ease); }
.product-body { display: grid; grid-template-columns: 1.35fr 1fr; }
.product-question { padding: 30px 34px 34px; }
.product-meta { font-size: 12.5px; color: var(--accent); }
.product-meta span { color: var(--faint); }
.product-stem { margin-top: 12px; font-size: 16.5px; font-weight: 500; line-height: 1.45; letter-spacing: -.012em; }
.product-options { list-style: none; margin-top: 20px; display: grid; gap: 8px; }
.product-options li { display: flex; gap: 12px; font-size: 14px; padding: 11px 15px; border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .8s 1.2s var(--ease), background-color .8s 1.2s var(--ease); }
.product-options li span { color: var(--faint); min-width: 14px; }
.product-panel { padding: 30px 34px 34px; border-left: 1px solid var(--line); background: var(--surface); }
.product-panel > * { opacity: 0; transform: translateY(8px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.product-panel > :nth-child(1) { transition-delay: 1.8s; }
.product-panel > :nth-child(2) { transition-delay: 1.95s; }
.product-panel > :nth-child(3) { transition-delay: 2.1s; }
.product-result { font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ok); }
.product-explanation { margin-top: 12px; font-size: 14px; font-weight: 300; line-height: 1.7; }
.product-ref { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--muted); }
.product.is-visible .product-track span { transform: scaleX(1); }
.product.is-visible li.is-correct { border-color: var(--ok); background: var(--ok-bg); }
.product.is-visible .product-panel > * { opacity: 1; transform: none; }

/* Cifras */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 120px; }
.stats div { display: grid; gap: 8px; padding: 4px 0 4px 28px; border-left: 1px solid var(--line); }
.stats div:first-child { padding-left: 0; border-left: 0; }
.stats strong { font-size: clamp(40px, 4.6vw, 60px); line-height: 1; font-weight: 200; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.stats span { font-size: 11.5px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

/* Títulos de sección */
h2 { margin-top: 16px; font-size: clamp(32px, 4vw, 50px); line-height: 1.06; letter-spacing: -.04em; font-weight: 300; }
h2 em { color: var(--accent); }
.section { margin-top: 140px; }
.section-head { max-width: 640px; }
.section-head p:not(.overline) { margin-top: 18px; font-size: 16px; font-weight: 300; color: var(--muted); }

/* Banda oscura: simulacros */
.band { margin-top: 140px; background: var(--band); color: var(--band-text); border-top: 1px solid var(--band-line); border-bottom: 1px solid var(--band-line); }
.band-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding-top: 112px; padding-bottom: 112px; }
.band .overline { color: var(--band-muted); }
.band h2 em { color: var(--band-accent); }
.band-text { margin-top: 20px; max-width: 420px; font-size: 16px; font-weight: 300; color: var(--band-muted); }
.band-clock { display: grid; justify-items: end; gap: 14px; }
.clock { font-size: clamp(64px, 9vw, 120px); line-height: 1; font-weight: 200; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.clock span { color: var(--band-accent); }
.band-caption { font-size: 11.5px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--band-muted); }

/* Capturas de la app */
.screens { display: flex; gap: 28px; margin-top: 56px; padding: 8px 4px 28px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.screens::-webkit-scrollbar { display: none; }
.screen { flex: 0 0 auto; width: 230px; scroll-snap-align: center; }
.screen img { width: 100%; height: auto; aspect-ratio: 1206 / 2622; border-radius: 30px; border: 1px solid var(--line);
  box-shadow: 0 30px 50px -34px rgba(0, 0, 0, .35); background: var(--surface); }
.screen p { margin-top: 16px; font-size: 14px; color: var(--muted); text-align: center; }
@media (min-width: 1100px) { .screens { justify-content: center; overflow: visible; } .screen { width: 196px; } }

/* Funciones */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px 48px; margin-top: 64px; }
.feature { padding-top: 24px; border-top: 1px solid var(--line); }
.feature-n { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--accent); }
.feature h3 { margin-top: 12px; font-size: 19px; font-weight: 400; letter-spacing: -.02em; }
.feature p { margin-top: 8px; font-size: 15px; font-weight: 300; color: var(--muted); }

/* Precios */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 56px; }
.plan { display: flex; flex-direction: column; padding: 34px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); }
.plan--premium { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), transparent 60%), var(--bg); }
.plan h3 { font-size: 22px; font-weight: 400; letter-spacing: -.02em; }
.plan-price { margin-top: 18px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.plan-price strong { font-size: 44px; font-weight: 300; letter-spacing: -.04em; line-height: 1; }
.plan-price span { color: var(--muted); font-size: 15px; }
.plan-alt { margin-top: 8px; font-size: 14px; color: var(--muted); }
.plan-alt b { color: var(--accent); font-weight: 500; }
.plan ul { list-style: none; margin-top: 26px; display: grid; gap: 12px; font-size: 15px; font-weight: 300; }
.plan li { display: flex; gap: 12px; }
.plan li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 4px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.3l2.2 2.2 4.8-5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.plan li.is-off { color: var(--faint); }
.plan li.is-off::before { background: var(--line); }
.plan-foot { margin-top: auto; padding-top: 30px; font-size: 13px; color: var(--faint); }
.plans-note { margin-top: 24px; font-size: 13.5px; color: var(--muted); text-align: center; }

/* Preguntas frecuentes */
.faq { max-width: 760px; margin-top: 48px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 0; font-size: 17px; font-weight: 400; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; font-weight: 200; color: var(--accent); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; font-size: 15px; font-weight: 300; color: var(--muted); max-width: 640px; }

/* Final y pie */
.final { margin-top: 168px; text-align: center; }
.footer { margin-top: 150px; padding-top: 30px; padding-bottom: 44px; border-top: 1px solid var(--line); font-size: 12.5px; font-weight: 300; color: var(--faint); }
.footer-row { display: flex; justify-content: space-between; gap: 32px; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer p { max-width: 560px; text-align: right; }

/* Aparición al hacer scroll (solo si hay JavaScript) */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .product.reveal { transform: translateY(28px) scale(.985); }
.js .product.reveal.is-visible { transform: none; }

/* Página de texto (política de privacidad) */
.doc { max-width: 720px; margin: 0 auto; padding: 56px 28px 0; }
.doc h1 { margin: 12px 0 0; font-size: clamp(34px, 5vw, 52px); text-align: left; }
.doc .updated { margin-top: 12px; font-size: 13.5px; color: var(--faint); }
.doc h2 { margin-top: 44px; font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.doc p { margin-top: 12px; font-size: 16px; font-weight: 300; line-height: 1.75; color: var(--text); }

@media (max-width: 860px) {
  .nav-links a:not(.btn) { display: none; }
  .hero { padding-top: 48px; }
  .cta .btn { width: 100%; }
  .product-wrap { margin-top: 56px; }
  .product-body { grid-template-columns: 1fr; }
  .product-panel { border-left: 0; border-top: 1px solid var(--line); }
  .product-question, .product-panel { padding: 22px 20px; }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 40px; margin-top: 80px; }
  .stats div:nth-child(3) { padding-left: 0; border-left: 0; }
  .section, .band { margin-top: 96px; }
  .band-inner { grid-template-columns: 1fr; gap: 40px; padding-top: 80px; padding-bottom: 80px; }
  .band-clock { justify-items: start; }
  .features { grid-template-columns: 1fr; gap: 32px; margin-top: 40px; }
  .plans { grid-template-columns: 1fr; }
  .plan { padding: 26px; }
  .final { margin-top: 120px; }
  .footer { margin-top: 100px; }
  .footer-row { flex-direction: column; gap: 14px; }
  .footer p { text-align: left; }
}
@media (max-width: 420px) {
  .container { padding: 0 16px; }
  .doc { padding: 40px 16px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal, .product-panel > * { opacity: 1 !important; transform: none !important; }
}
