/* ---------- Tokens (mismos valores HSL que src/index.css) ---------- */
:root {
  --ms-primary: 142 45% 42%;
  --ms-primary-dark: 142 45% 28%;
  --ms-bg: 40 33% 97%;
  --ms-ink: 220 20% 20%;
  --ms-muted: 220 10% 50%;
  --ms-border: 40 15% 88%;
  --ms-good: 142 45% 72%;
  --ms-bad: 0 72% 72%;
  --ms-radius: 0.75rem;
  --ms-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Reset mínimo ---------- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }

body {
  font-family: var(--ms-font);
  background: hsl(var(--ms-bg));
  color: hsl(var(--ms-ink));
  line-height: 1.5;
}

/* ---------- Utilidades compartidas por todas las secciones ---------- */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}
.section {
  padding: 56px 0;
}
.section h2 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 12px 0;
  text-align: center;
  text-wrap: balance;
}
.section .section-lead {
  text-align: center;
  color: hsl(var(--ms-muted));
  max-width: 640px;
  margin: 0 auto 32px;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--ms-radius);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  text-align: center;
  border: none;
  cursor: pointer;
}
.btn-primary {
  background: hsl(var(--ms-primary));
  color: #fff;
  box-shadow: 0 8px 20px -6px hsla(var(--ms-primary) / 0.5);
}
.btn-primary:hover { background: hsl(var(--ms-primary-dark)); }
.btn-link {
  font-size: 0.9rem;
  color: hsl(var(--ms-primary-dark));
  text-decoration: underline;
  background: none;
}

:focus-visible {
  outline: 2px solid hsl(var(--ms-primary));
  outline-offset: 2px;
}

/* ---------- Reveal al hacer scroll ---------- */
.ms-reveal-ready .reveal {
  opacity: 0;
  transform: translateY(16px);
}
.ms-reveal-ready .reveal.is-visible {
  animation: msFadeUp 0.7s ease-out forwards;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: hsl(var(--ms-bg) / 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid hsl(var(--ms-border));
}
.site-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-logo {
  display: inline-flex;
  align-items: center;
}
.site-logo img {
  height: 48px;
  width: auto;
}
.nav-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle-btn:hover { background: hsl(var(--ms-border) / 0.5); }
.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.site-nav a:not(.btn) {
  text-decoration: none;
  font-size: 0.9rem;
  color: hsl(var(--ms-ink));
}
.site-nav-ctas { display: flex; align-items: center; gap: 14px; }

@media (max-width: 767px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 20px;
    background: hsl(var(--ms-bg));
    border-bottom: 1px solid hsl(var(--ms-border));
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav-ctas { flex-direction: column; align-items: stretch; }
}
@media (min-width: 768px) {
  .nav-toggle-btn { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding: 48px 0 64px; }
.hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}
.hero-copy { max-width: 460px; text-align: center; }
.hero-h1 {
  font-size: 1.7rem;
  line-height: 1.14;
  margin: 0 0 12px 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: hsl(var(--ms-ink));
}
.hero-frag { display: block; }
.hero-frag:not(.hero-punch) {
  opacity: 0;
  transform: translateY(10px);
  animation: msFadeUp 0.7s ease-out 0.1s forwards;
}
.hero-punch {
  color: hsl(var(--ms-primary-dark));
  font-size: 1.28em;
  margin-top: 6px;
  opacity: 0;
  transform-origin: center;
  will-change: transform, opacity;
  animation:
    msPunchPop 0.85s cubic-bezier(.22,1,.36,1) 0.55s forwards,
    msBreathe 3.6s ease-in-out 1.4s infinite;
}
.hero-sub {
  font-size: 0.95rem;
  color: hsl(var(--ms-muted));
  margin: 0 0 20px 0;
  opacity: 0;
  animation: msFadeUp 0.7s ease-out 0.25s forwards;
}
.hero-cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: msFadeUp 0.7s ease-out 0.4s forwards;
}
.btn-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

@keyframes msFadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes msPunchPop {
  0% { opacity: 0; translate: 0 14px; scale: .86; }
  55% { opacity: 1; translate: 0 -3px; scale: 1.05; }
  100% { opacity: 1; translate: 0 0; scale: 1; }
}
@keyframes msBreathe {
  0%, 100% { scale: 1; }
  50% { scale: 1.035; }
}

.hero-phone-wrap {
  position: relative;
  width: 208px;
  height: 478px;
  flex-shrink: 0;
  will-change: transform;
  animation: msBob 6s ease-in-out infinite;
}
@keyframes msBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

.hero-phone-bezel {
  width: 100%;
  height: 100%;
  background: #1c1c1e;
  border-radius: 34px;
  padding: 8px;
  box-shadow:
    0 30px 60px -15px rgba(0,0,0,0.35),
    0 10px 20px -8px rgba(0,0,0,0.25),
    inset 0 1px 1px rgba(255,255,255,0.15);
  position: relative;
  z-index: 1;
}
.hero-phone-notch {
  position: absolute;
  top: 13px;
  left: 50%;
  transform: translateX(-50%);
  width: 73px;
  height: 20px;
  background: #000;
  border-radius: 10px;
  z-index: 5;
}
.hero-phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 26px;
  overflow: hidden;
  position: relative;
  background: hsl(var(--ms-bg));
}
/* Deja 28px de "colchón" bajo el notch (mismo color de fondo que la
   captura) en vez de tapar contenido: la captura conserva su tamaño
   real, solo se ancla al fondo del hueco de pantalla. */
.hero-shot { position: absolute; left: 0; right: 0; bottom: 0; height: 434px; overflow: hidden; }
.hero-shot img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  animation: msCycle 10.8s infinite;
}
.hero-shot img:nth-child(1) { animation-delay: 0s; }
.hero-shot img:nth-child(2) { animation-delay: 3.6s; }
.hero-shot img:nth-child(3) { animation-delay: 7.2s; }
@keyframes msCycle {
  0% { opacity: 0; }
  4% { opacity: 1; }
  29% { opacity: 1; }
  33% { opacity: 0; }
  100% { opacity: 0; }
}

.hero-badge {
  position: absolute;
  z-index: 3;
  will-change: transform, opacity;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 0.68rem;
  color: #2c3b30;
  box-shadow: 0 10px 25px -8px rgba(0,0,0,0.25);
  max-width: 140px;
  opacity: 0;
}
.hero-badge b { display: block; color: hsl(var(--ms-primary-dark)); font-size: 0.7rem; }
.hero-badge-1 { top: 30px; left: -18px; animation: msFadeUp 0.6s ease-out 1.1s forwards, msBob 5s ease-in-out 1.1s infinite; }
.hero-badge-2 { bottom: 82px; right: -24px; animation: msFadeUp 0.6s ease-out 1.4s forwards, msBob 5.5s ease-in-out 1.4s infinite; }

@media (prefers-reduced-motion: reduce) {
  .hero-frag, .hero-sub, .hero-cta-row, .hero-badge, .hero-phone-wrap, .reveal {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    translate: none !important;
    scale: none !important;
  }
}

@media (min-width: 768px) {
  .hero-inner { flex-direction: row; justify-content: center; align-items: center; gap: 56px; }
  .hero-copy { text-align: left; }
  .hero-cta-row { justify-content: flex-start; }
  .hero-h1 { font-size: 2.1rem; }
  .hero-punch { transform-origin: left center; }
}

/* ---------- ¿Es para ti? ---------- */
.para-quien-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  max-width: 640px;
  margin: 0 auto;
}
.para-quien-list li {
  background: #fff;
  border: 1px solid hsl(var(--ms-border));
  border-radius: var(--ms-radius);
  padding: 14px 18px;
  font-size: 0.95rem;
}

/* ---------- Cómo funciona ---------- */
.how-steps {
  display: grid;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}
.how-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.how-step-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: hsl(var(--ms-primary) / 0.12);
  color: hsl(var(--ms-primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.how-step h3 { margin: 0 0 4px 0; font-size: 1.05rem; }
.how-step p { margin: 0; color: hsl(var(--ms-muted)); font-size: 0.92rem; }

.how-visual { display: none; }

@media (min-width: 768px) {
  .how-layout {
    display: grid;
    grid-template-columns: minmax(220px, 300px) 1fr;
    gap: 48px;
    align-items: start;
    max-width: 900px;
    margin: 0 auto;
  }
  .how-steps { grid-template-columns: none; max-width: none; margin: 0; }
  .how-step {
    flex-direction: row;
    padding: 28px 20px;
    border-radius: var(--ms-radius);
    min-height: 42vh;
  }
  .how-step.is-active { background: hsl(var(--ms-primary) / 0.06); }
  .how-step.is-active .how-step-icon { background: hsl(var(--ms-primary)); color: #fff; }

  .how-visual {
    display: block;
    position: sticky;
    top: 96px;
    align-self: start;
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
    aspect-ratio: 390 / 844;
    border-radius: var(--ms-radius);
    overflow: hidden;
    border: 1px solid hsl(var(--ms-border));
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.25);
  }
  .how-visual-step { position: absolute; inset: 0; }
  .how-visual-step img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    opacity: 0;
    transition: opacity 0.4s ease;
  }
  .how-visual-step.is-active img { opacity: 1; }

  .how-tap-ripple {
    position: absolute;
    top: 16.5%;
    right: 10%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: hsl(var(--ms-primary) / 0.55);
    opacity: 0;
    pointer-events: none;
  }
  .how-visual-step[data-step="3"].is-active .how-tap-ripple {
    animation: msTapRipple 2.4s ease-out 0.5s infinite;
  }
  @keyframes msTapRipple {
    0% { opacity: 0; transform: scale(0.4); }
    17% { opacity: 0.6; transform: scale(1); }
    67%, 100% { opacity: 0; transform: scale(2.6); }
  }
}
.how-steps-note {
  text-align: center;
  color: hsl(var(--ms-muted));
  font-size: 0.88rem;
  margin: 24px 0 0;
}

/* ---------- Simplicidad ---------- */
.simplicidad-callout {
  text-align: center;
  max-width: 640px;
  margin: 28px auto 0;
  font-size: 1.05rem;
}

/* ---------- Testimonios ---------- */
.testimonials {
  display: grid;
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}
.testimonial {
  background: #fff;
  border: 1px solid hsl(var(--ms-border));
  border-radius: var(--ms-radius);
  padding: 20px;
}
.testimonial p { margin: 0 0 12px 0; font-style: italic; }
.testimonial cite { font-style: normal; font-weight: 700; font-size: 0.85rem; color: hsl(var(--ms-muted)); }

@media (min-width: 768px) {
  .testimonials { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Sección semántica SEO ---------- */
.sinonimos-body {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  color: hsl(var(--ms-muted));
}

/* ---------- Patrones, no diagnósticos ---------- */
.patrones-grid {
  display: grid;
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}
.patrones-col {
  background: #fff;
  border-radius: var(--ms-radius);
  padding: 20px;
}
.patrones-col h3 { margin: 0 0 12px 0; font-size: 1rem; }
.patrones-si { border: 2px solid hsl(var(--ms-good)); }
.patrones-no { border: 2px solid hsl(var(--ms-bad)); }
.patrones-si ul, .patrones-no ul { margin: 0; padding-left: 20px; font-size: 0.92rem; }
.patrones-si li { color: hsl(142 45% 30%); }
.patrones-no li { color: hsl(0 60% 40%); }

@media (min-width: 768px) {
  .patrones-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Privacidad ---------- */
.privacidad-grid {
  display: grid;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}
.privacidad-block { text-align: center; padding: 12px; }
.privacidad-block h3 { font-size: 1rem; margin: 8px 0 6px; }
.privacidad-block p { margin: 0; color: hsl(var(--ms-muted)); font-size: 0.9rem; }
.privacidad-icon { font-size: 1.8rem; }

@media (min-width: 768px) {
  .privacidad-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 720px; margin: 0 auto; display: grid; gap: 10px; }
.faq-list details {
  background: #fff;
  border: 1px solid hsl(var(--ms-border));
  border-radius: var(--ms-radius);
  padding: 14px 18px;
}
.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
}
.faq-list p { margin: 10px 0 0 0; color: hsl(var(--ms-muted)); font-size: 0.92rem; }

/* ---------- CTA final ---------- */
.cta-final {
  background: hsl(var(--ms-primary));
  color: #fff;
  text-align: center;
  padding: 64px 20px;
}
.cta-final h2 { color: #fff; }
.cta-final p { color: hsl(0 0% 100% / 0.85); margin-bottom: 24px; }
.cta-final .btn-primary { background: #fff; color: hsl(var(--ms-primary-dark)); }
.cta-final .btn-primary:hover { background: hsl(40 33% 92%); }
.cta-final .btn-link { color: #fff; }

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 24px 20px;
  font-size: 0.82rem;
  color: hsl(var(--ms-muted));
}
