/* Base compartida de las landings de muestra. Implementa skills/vendor/landing-page-design (Parte B):
   una sola tipografía, escala de tipos y espaciados cerrados, radios de Tailwind, fondos planos,
   movimiento con una única curva. Cada demo define su paleta en :root (ver demos/<slug>/style.css). */

:root {
  /* Espaciado (B2): solo estos valores */
  --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;
  /* Radios (B3): escala de Tailwind */
  --r-sm: 4px; --r-md: 6px; --r-lg: 8px; --r-xl: 12px; --r-2xl: 16px; --r-3xl: 24px; --r-full: 9999px;
  /* Movimiento (B7) */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-ui: 300ms; --dur-layout: 500ms; --dur-reveal: 700ms;
  /* Paleta por defecto (cada demo la reemplaza) */
  --bg: #ffffff; --surface: #f6f6f4; --text: #111111; --muted: #5c5c5c; --border: #e3e3df;
  --accent: #1f6feb; --on-accent: #ffffff; --focus: #1f6feb;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 16px; line-height: 24px; font-weight: 400; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
a[href], button, summary, [role="button"] { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--s-200); top: -80px; z-index: 100; background: var(--accent); color: var(--on-accent);
  padding: var(--s-100) var(--s-200); min-height: 44px; display: inline-flex; align-items: center; border-radius: var(--r-lg); transition: transform var(--dur-ui) var(--ease); }
.skip:focus { transform: translateY(96px); }

/* Estilos de texto con nombre (B1). Tamaños = escala de Tailwind. Nunca itálica, nunca 900. */
.heading-1 { font-size: 36px; line-height: 40px; font-weight: 600; text-wrap: balance; }
.heading-2 { font-size: 30px; line-height: 36px; font-weight: 600; text-wrap: balance; }
.heading-3 { font-size: 24px; line-height: 32px; font-weight: 600; text-wrap: balance; }
.heading-4 { font-size: 20px; line-height: 28px; font-weight: 600; text-wrap: balance; }
.title-1 { font-size: 20px; line-height: 28px; font-weight: 500; }
.title-2 { font-size: 18px; line-height: 28px; font-weight: 500; }
.title-3 { font-size: 16px; line-height: 24px; font-weight: 500; }
.body-1 { font-size: 16px; line-height: 24px; font-weight: 600; }
.body-3 { font-size: 16px; line-height: 24px; font-weight: 400; text-wrap: pretty; }
.body-4 { font-size: 14px; line-height: 20px; font-weight: 600; }
.body-6 { font-size: 14px; line-height: 20px; font-weight: 400; text-wrap: pretty; }
.button-md { font-size: 16px; line-height: 24px; font-weight: 600; }
.button-lg { font-size: 18px; line-height: 28px; font-weight: 600; }
.button-sm { font-size: 14px; line-height: 20px; font-weight: 600; }
.caption-1 { font-size: 14px; line-height: 20px; font-weight: 500; }
.caption-3 { font-size: 12px; line-height: 16px; font-weight: 600; }
.caption-5 { font-size: 12px; line-height: 16px; font-weight: 400; }
@media (min-width: 768px) {
  .heading-1 { font-size: 48px; line-height: 48px; }
  .heading-2 { font-size: 36px; line-height: 40px; }
  .heading-3 { font-size: 30px; line-height: 36px; }
}
@media (min-width: 1024px) {
  .heading-1 { font-size: 60px; line-height: 60px; }
  .heading-2 { font-size: 48px; line-height: 48px; }
  .heading-3 { font-size: 36px; line-height: 40px; }
}
.muted { color: var(--muted); }

/* Layout */
.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--s-200); }
@media (min-width: 768px) { .wrap { padding-inline: var(--s-300); } }
.section { padding-block: var(--s-700); }
@media (min-width: 1024px) { .section { padding-block: var(--s-900); } }
.section__head { max-width: 680px; margin-bottom: var(--s-500); display: grid; gap: var(--s-100); }
.eyebrow { color: var(--accent); }
.grid { display: grid; gap: var(--s-200); }
@media (min-width: 768px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid { gap: var(--s-300); } }

/* Iconos (sprite inline de Phosphor, MIT) */
.i { width: 20px; height: 20px; fill: currentColor; flex: none; }
.i--lg { width: 24px; height: 24px; }

/* Botones: 8px vertical, 12px horizontal (B2). Hover cambia color, nunca escala */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-75); padding: var(--s-75) var(--s-200);
  min-height: 44px; border-radius: var(--r-lg); border: 1px solid transparent; text-decoration: none;
  transition: background-color var(--dur-ui) var(--ease), color var(--dur-ui) var(--ease), border-color var(--dur-ui) var(--ease), transform var(--dur-ui) var(--ease); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover, var(--accent)); filter: brightness(0.92); }
.btn--ghost { border-color: var(--border); background: transparent; color: var(--text); }
.btn--ghost:hover { background: var(--surface); }
.btn--block { width: 100%; }

/* Navegación flotante (B7): compacta, translúcida, con blur; menú móvil de alto completo */
.nav { position: fixed; top: var(--s-200); left: 50%; transform: translate(-50%, var(--bar-offset, 36px)); transition: transform var(--dur-layout) var(--ease); z-index: 50; width: calc(100% - var(--s-400));
  max-width: 880px; display: flex; align-items: center; justify-content: space-between; gap: var(--s-200);
  padding: var(--s-75) var(--s-75) var(--s-75) var(--s-200); border-radius: var(--r-2xl);
  background: var(--nav-bg, rgba(255,255,255,0.78)); border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.nav__brand { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.nav__links { display: none; align-items: center; gap: var(--s-300); }
.nav__links a { text-decoration: none; color: var(--muted); transition: color var(--dur-ui) var(--ease); }
.nav__links a:hover, .nav__links a[aria-current="true"] { color: var(--text); }
.nav__toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; background: transparent; border-radius: var(--r-lg); }
.nav__bars { position: relative; width: 20px; height: 14px; }
.nav__bars span { position: absolute; left: 0; width: 100%; height: 2px; background: currentColor; border-radius: var(--r-full);
  transition: transform var(--dur-layout) var(--ease), opacity var(--dur-ui) var(--ease); }
.nav__bars span:nth-child(1) { top: 0; } .nav__bars span:nth-child(2) { top: 6px; } .nav__bars span:nth-child(3) { top: 12px; }
.nav__toggle[aria-expanded="true"] .nav__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__bars span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] .nav__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.menu { position: fixed; inset: 0; z-index: 40; background: var(--menu-bg, rgba(255,255,255,0.96)); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  display: grid; align-content: center; justify-items: start; gap: var(--s-200); padding: var(--s-900) var(--s-300) var(--s-300);
  opacity: 0; visibility: hidden; transition: opacity var(--dur-layout) var(--ease), visibility 0s linear var(--dur-layout); }
.menu.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.menu a { text-decoration: none; opacity: 0; transform: translateY(24px); transition: opacity var(--dur-layout) var(--ease), transform var(--dur-layout) var(--ease); }
.menu.is-open a { opacity: 1; transform: none; }
.menu.is-open a:nth-child(1) { transition-delay: 60ms; } .menu.is-open a:nth-child(2) { transition-delay: 120ms; }
.menu.is-open a:nth-child(3) { transition-delay: 180ms; } .menu.is-open a:nth-child(4) { transition-delay: 240ms; }
.menu.is-open a:nth-child(5) { transition-delay: 300ms; } .menu.is-open a:nth-child(6) { transition-delay: 360ms; }
@media (min-width: 768px) { .nav__links { display: flex; } .nav__toggle, .menu { display: none; } }

/* Hero: título y subtítulo con máximo de 680px; título en color sólido (S-023: el degradé de texto se lee como look de IA) */
.hero { padding-top: calc(var(--s-900) + var(--s-300)); padding-bottom: var(--s-600); }
@media (min-width: 1024px) { .hero { padding-top: calc(var(--s-900) + var(--s-400)); padding-bottom: var(--s-700); } }
.hero__copy { display: grid; gap: var(--s-200); justify-items: start; }
.hero h1, .hero__sub { max-width: 680px; }
.hero h1 { color: var(--text); padding-bottom: var(--s-50); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s-100); margin-top: var(--s-100); }
.hero__proof { display: flex; flex-wrap: wrap; gap: var(--s-100) var(--s-300); color: var(--muted); margin-top: var(--s-100); }
.hero__proof li { display: inline-flex; align-items: center; gap: var(--s-75); }
.hero__proof .i { color: var(--accent); }

/* Tarjetas */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-2xl); padding: var(--s-300); display: grid; gap: var(--s-100); align-content: start; }
.card__icon { width: 40px; height: 40px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.steps { counter-reset: paso; }
.steps .card::before { counter-increment: paso; content: counter(paso); color: var(--accent); font-weight: 600; font-size: 14px; line-height: 20px; }

/* FAQ (<details>: funciona sin JavaScript y el texto está en el HTML) */
.faq { display: grid; gap: var(--s-100); max-width: 760px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--s-200); min-height: 44px; padding: var(--s-100) var(--s-200); border-radius: var(--r-xl); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { transition: transform var(--dur-layout) var(--ease); }
.faq details[open] summary .i { transform: rotate(45deg); }
.faq details p { padding: 0 var(--s-200) var(--s-200); color: var(--muted); }

/* Frase destacada (B11): palabra por palabra al entrar en pantalla */
.tagline { padding-block: var(--s-800); }
.tagline__text { max-width: 680px; }
.tagline .w { color: var(--text); opacity: 0.3; transition: opacity var(--dur-layout) var(--ease); }
.tagline .w.on { opacity: 1; }

/* Aparición de secciones (una sola vez) */
[data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity var(--dur-reveal) var(--ease), transform var(--dur-reveal) var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }

/* Formulario */
.form { display: grid; gap: var(--s-200); }
.field { display: grid; gap: var(--s-75); }
.field input, .field select, .field textarea { font: inherit; padding: var(--s-100) var(--s-100); min-height: 44px; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.field[data-invalid="true"] input, .field[data-invalid="true"] select, .field[data-invalid="true"] textarea { border-color: #b3261e; }
.field__error { color: #b3261e; min-height: 16px; }

/* Pie y aviso de muestra */
.footer { border-top: 1px solid var(--border); padding-block: var(--s-500); color: var(--muted); }
.footer__grid { display: grid; gap: var(--s-300); }
@media (min-width: 768px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer ul { display: grid; gap: var(--s-75); }
.footer a { text-decoration: none; } .footer a:hover { color: var(--text); }
.demo-bar { background: var(--text); color: var(--bg); text-align: center; height: 36px; padding: var(--s-75) var(--s-200); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.updated { color: var(--muted); }

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