/* ============================================================
   Tokens de diseño — paleta PROVISIONAL, reemplazable.
   Cuando exista la identidad visual definitiva de MBG Software,
   actualizar solo estas variables (design.md, decisión 3).
   ============================================================ */
:root {
  /* Color */
  --color-bg: #0b1020;
  --color-surface: #131a30;
  --color-surface-alt: #1a2340;
  --color-text: #eef1fb;
  --color-text-muted: #a4adc9;
  --color-primary: #4f46e5;
  --color-primary-hover: #4338ca;
  --color-accent: #14b8a6;
  --color-border: #262f4d;
  --color-focus: #7c86ff;
  --color-badge-bg: #2a2140;
  --color-badge-text: #d8b4fe;

  /* Tipografía */
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --fs-h1: clamp(2rem, 5vw, 3.25rem);
  --fs-h2: clamp(1.5rem, 3.5vw, 2.25rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;

  /* Espaciado */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Layout */
  --max-width: 1100px;
  --radius: 14px;
  --radius-full: 999px;

  /* Movimiento */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
}

/* ============================================================
   Reset básico
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-base);
  font-size: var(--fs-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

h1, h2, h3, p, ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

/* Foco visible accesible (task 3.4) */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

/* Respeta prefers-reduced-motion (task 3.3) */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   Layout general
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius);
  z-index: 100;
}

.skip-link:focus {
  left: var(--space-sm);
  top: var(--space-sm);
}

header.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 16, 32, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.site-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-sm);
  padding: var(--space-sm) 0;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
}

@media (max-width: 480px) {
  .nav-links {
    gap: 0.5rem 0.9rem;
  }

  .nav-links a {
    font-size: 0.8rem;
  }
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: var(--fs-small);
  transition: color var(--transition-fast);
}

.nav-links a:hover {
  color: var(--color-text);
}

section {
  padding: var(--space-2xl) 0;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding-top: var(--space-2xl);
  text-align: center;
}

.hero h1 {
  font-size: var(--fs-h1);
  font-weight: 800;
  max-width: 18ch;
  margin: 0 auto var(--space-md);
}

.hero p {
  max-width: 55ch;
  margin: 0 auto;
  color: var(--color-text-muted);
  font-size: 1.1rem;
}

/* ============================================================
   Secciones de producto
   ============================================================ */
.product {
  border-top: 1px solid var(--color-border);
}

.product-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.product h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
}

.badge-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--color-badge-bg);
  color: var(--color-badge-text);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.product-lede {
  color: var(--color-text-muted);
  max-width: 65ch;
  margin-bottom: var(--space-lg);
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 800px) {
  .product-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }
}

.feature-list {
  display: grid;
  gap: var(--space-sm);
}

.feature-item {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  padding: var(--space-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.feature-item .icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--color-accent);
}

.feature-item h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.feature-item p {
  color: var(--color-text-muted);
  font-size: var(--fs-small);
}

/* Bloque de demo (video/capturas) — task 2.4 */
.demo-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.demo-block__media {
  aspect-ratio: 16 / 10;
  width: 100%;
  background: var(--color-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: var(--fs-small);
  text-align: center;
  padding: var(--space-md);
}

.demo-block__caption {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

.product-cta {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

/* Botones / CTA */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  text-decoration: none;
  font-size: var(--fs-body);
  transition: transform var(--transition-fast), background var(--transition-fast);
  border: 1px solid transparent;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-whatsapp {
  background: #25d366;
  color: #06210f;
}

.btn-whatsapp:hover {
  background: #1ebd5a;
}

.btn-secondary {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
}

.btn-secondary:hover {
  border-color: var(--color-accent);
}

/* ============================================================
   Contacto
   ============================================================ */
.contact {
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.contact h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.contact p.lede {
  color: var(--color-text-muted);
  max-width: 50ch;
  margin: 0 auto var(--space-lg);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-text);
  text-decoration: none;
  font-size: 1.05rem;
}

.contact-item .icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-accent);
}

.contact-item:hover {
  color: var(--color-accent);
}

/* ============================================================
   Footer
   ============================================================ */
footer.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg) 0;
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--fs-small);
}

footer.site-footer a {
  color: var(--color-text-muted);
  text-decoration: underline;
}

footer.site-footer a:hover {
  color: var(--color-text);
}

/* ============================================================
   Animaciones de entrada (task 3.2) — controladas por JS via
   la clase .is-visible cuando el elemento entra en viewport
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================================
   Página de política de privacidad
   ============================================================ */
.legal {
  max-width: 75ch;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md) var(--space-2xl);
}

.legal h1 {
  font-size: var(--fs-h2);
  margin-bottom: var(--space-sm);
}

.legal h2 {
  font-size: 1.25rem;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs);
}

.legal p,
.legal li {
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
}

.legal ul {
  list-style: disc;
  padding-left: 1.25rem;
}

.legal .updated {
  color: var(--color-text-muted);
  font-size: var(--fs-small);
  margin-bottom: var(--space-lg);
}

.legal .callout {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius);
  padding: var(--space-sm) var(--space-md);
  margin: var(--space-sm) 0;
}

.back-link {
  display: inline-block;
  margin-bottom: var(--space-md);
  color: var(--color-accent);
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}
