/* Base común. Cada versión define sus tokens de color, fuente y radio en :root
   y luego su propio layout. Espaciado solo con la escala --s-*. */
:root {
  --s-25: 2px; --s-50: 4px; --s-75: 8px; --s-100: 12px; --s-200: 16px; --s-300: 24px;
  --s-400: 32px; --s-500: 40px; --s-600: 48px; --s-700: 64px; --s-800: 80px; --s-900: 96px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--s-900); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px; line-height: 24px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { text-wrap: balance; font-weight: 600; }
p, li, dd { text-wrap: pretty; }
button { font: inherit; color: inherit; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s-300); }
@media (max-width: 640px) { .wrap { padding-inline: var(--s-200); } }

.skip {
  position: absolute; left: var(--s-200); top: -100px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: var(--s-75) var(--s-100);
  border-radius: 8px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: var(--s-200); }

:focus-visible { outline: 2px solid var(--focus, var(--accent)); outline-offset: 3px; border-radius: 4px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-75);
  padding: var(--s-75) var(--s-100); min-height: 48px;
  font-size: 16px; line-height: 24px; font-weight: 600;
  text-decoration: none; border: 0; border-radius: var(--btn-radius, 8px); cursor: pointer;
  transition: transform 300ms var(--ease), background-color 300ms var(--ease), color 300ms var(--ease), box-shadow 300ms var(--ease);
}
.btn i { font-size: 20px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.98); }
.btn-sm { font-size: 14px; line-height: 20px; min-height: 40px; }

/* Nav en píldora flotante */
.nav-wrap { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; justify-content: center; padding-inline: var(--s-200); pointer-events: none; }
.nav {
  pointer-events: auto;
  margin-top: var(--s-300);
  width: max-content; max-width: 100%;
  display: flex; align-items: center; gap: var(--s-300);
  padding: var(--s-75) var(--s-75) var(--s-75) var(--s-300);
  border-radius: 9999px;
  background: var(--nav-bg);
  backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
}
.nav-logo img { height: 32px; width: auto; }
.nav-links { display: flex; gap: var(--s-50); }
.nav-links a {
  display: block; padding: var(--s-75) var(--s-100); border-radius: 9999px;
  font-size: 14px; line-height: 20px; font-weight: 500; text-decoration: none; color: var(--muted);
  transition: color 300ms var(--ease), background-color 300ms var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.is-current { color: var(--ink); background: var(--chip); }
.burger { display: none; position: relative; width: 40px; height: 40px; border: 0; background: transparent; border-radius: 9999px; cursor: pointer; }
.burger span {
  position: absolute; left: 11px; width: 18px; height: 2px; border-radius: 2px; background: var(--ink);
  transition: transform 700ms var(--ease), top 700ms var(--ease);
}
.burger span:first-child { top: 15px; }
.burger span:last-child { top: 23px; }
.menu-open .burger span:first-child { top: 19px; transform: rotate(45deg); }
.menu-open .burger span:last-child { top: 19px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 40;
  background: var(--menu-bg);
  backdrop-filter: blur(64px); -webkit-backdrop-filter: blur(64px);
  display: flex; align-items: center; padding: var(--s-900) var(--s-300) var(--s-600);
  opacity: 0; visibility: hidden;
  transition: opacity 700ms var(--ease), visibility 0s linear 700ms;
}
.menu-open .menu { opacity: 1; visibility: visible; transition: opacity 700ms var(--ease); }
.menu ul { display: grid; gap: var(--s-100); width: 100%; }
.menu li { overflow: hidden; }
.menu a {
  display: inline-flex; align-items: center; gap: var(--s-100);
  font-size: 36px; line-height: 40px; font-weight: 600; text-decoration: none; color: var(--ink);
  transform: translateY(48px); opacity: 0;
  transition: transform 700ms var(--ease), opacity 700ms var(--ease);
}
.menu-open .menu a { transform: none; opacity: 1; }
.menu li:nth-child(1) a { transition-delay: 100ms; }
.menu li:nth-child(2) a { transition-delay: 150ms; }
.menu li:nth-child(3) a { transition-delay: 200ms; }
.menu li:nth-child(4) a { transition-delay: 250ms; }
.menu li:nth-child(5) a { transition-delay: 300ms; }
.menu li:nth-child(6) a { transition-delay: 350ms; }
.menu .menu-wa { font-size: 20px; line-height: 28px; color: var(--accent); margin-top: var(--s-200); }
.menu-open { overflow: hidden; }

@media (max-width: 960px) {
  .nav-links { display: none; }
  .burger { display: block; }
  .nav { gap: var(--s-100); }
}
@media (max-width: 420px) { .nav-cta { display: none; } }

/* Aparición al hacer scroll */
.js [data-reveal] {
  opacity: 0; transform: translateY(64px); filter: blur(12px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease), filter 900ms var(--ease);
}
.js [data-reveal].is-in { opacity: 1; transform: none; filter: none; }

/* Frase grande palabra por palabra */
.tagline-text { max-width: 880px; font-size: 48px; line-height: 1; font-weight: 600; letter-spacing: -0.02em; }
.tagline-text [data-line] { display: block; }
.tagline-text [data-line] + [data-line] { margin-top: var(--s-100); }
.tagline-text .w { color: var(--ink); opacity: 0.28; transition: opacity 600ms var(--ease); }
.tagline-text .w.on { opacity: 1; }
@media (max-width: 640px) { .tagline-text { font-size: 36px; line-height: 40px; } }

/* Comparador antes / después */
.compare { position: relative; overflow: hidden; --pos: 50%; touch-action: pan-y; }
.compare img { width: 100%; height: 100%; object-fit: cover; }
.compare .compare-after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.compare-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.compare-line::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 32px; height: 32px; margin: -16px 0 0 -16px;
  border-radius: 9999px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Preguntas frecuentes */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s-200);
  padding: var(--s-300) 0; font-size: 18px; line-height: 28px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; line-height: 32px; font-weight: 400; color: var(--muted); transition: transform 500ms var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: var(--s-300); color: var(--muted); max-width: 680px; }

/* WhatsApp flotante en móvil */
.wa-float {
  position: fixed; right: var(--s-200); bottom: var(--s-200); z-index: 30;
  width: 56px; height: 56px; border-radius: 9999px; display: grid; place-items: center;
  background: #1F8A4C; color: #fff; font-size: 30px; text-decoration: none;
  box-shadow: 0 2px 4px rgba(0,0,0,.12), 0 12px 32px rgba(0,0,0,.18);
  transition: transform 300ms var(--ease);
}
.wa-float:hover { transform: translateY(-2px); }
.wa-float:active { transform: scale(0.96); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; filter: none; }
}
