/* ═══════════════════════════════════════════════
   TOKENS · Variables, reset y base
   Cárgalo en TODAS las páginas
   ═══════════════════════════════════════════════ */

:root {
  /* Colores de marca */
  --brand: #0b64d1;
  --brand-dark: #084a9c;
  --brand-soft: #e8f1fc;
  --accent: #16a34a;
  --accent-dark: #128a3e;

  /* Neutros */
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;

  /* Radios y sombras */
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow-md: 0 8px 24px rgba(15,23,42,.08);
  --shadow-lg: 0 20px 48px rgba(15,23,42,.12);

  /* Safe areas iOS */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);

  /* Altura del header (útil para sticky) */
  --header-h: 56px;
}

@media (min-width: 640px) {
  :root { --header-h: 60px; }
}

/* Reset ligero */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Contenedor genérico (lo usan header, footer y body) */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 640px) {
  .container { padding: 0 24px; }
}

/* Botones base (compartidos: el header los usa, el body los usa) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  border: 0;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }

.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  background: var(--brand-dark);
  box-shadow: var(--shadow-md);
}

.btn--whatsapp { background: var(--accent); color: #fff; }
.btn--whatsapp:hover { background: var(--accent-dark); }

.btn--ghost { background: var(--brand-soft); color: var(--brand); }
.btn--ghost:hover { background: #d6e6fb; }

.btn--block { width: 100%; }

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}


/* ═══════════════════════════════════════════════
   HEADER · Topbar + Drawer móvil
   Cárgalo en TODAS las páginas
   ═══════════════════════════════════════════════ */

/* ────── TOPBAR ────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,.95);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: var(--safe-top);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.topbar__inner::before,
.topbar__inner::after {
  display: none;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
}
.topbar__brand:hover { text-decoration: none; }

.topbar__logo {
  height: 45px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 16px;
  flex-shrink: 0;
}

.topbar__nav { display: none; }

.topbar__menu {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 0;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 20px;
  cursor: pointer;
  transition: background .15s ease;
}
.topbar__menu:hover { background: #d6e6fb; }

/* Nav visible en tablet+ */
@media (min-width: 640px) {
  .topbar__nav {
    display: flex;
    gap: 8px;
  }
  .topbar__nav a {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 500;
    color: var(--muted);
  }
  .topbar__nav a:hover {
    background: var(--brand-soft);
    color: var(--brand);
    text-decoration: none;
  }
  .topbar__menu { display: none; }
}

/* ────── DRAWER MÓVIL ────── */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
  z-index: 90;
}
.drawer-backdrop.open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: #fff;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform .25s ease;
  z-index: 95;
  display: flex;
  flex-direction: column;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}
.drawer.open { transform: translateX(0); }

.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.drawer__title { font-weight: 800; font-size: 15px; }

.drawer__close {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 0;
  background: var(--bg);
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.drawer__close:hover { background: var(--line); }

.drawer__nav {
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 4px;
}
.drawer__nav a {
  padding: 14px 16px;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background .15s ease;
}
.drawer__nav a:hover { background: var(--brand-soft); color: var(--brand); }

.drawer__cta {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}


/* ═══════════════════════════════════════════════
   FOOTER
   Cárgalo en TODAS las páginas
   ═══════════════════════════════════════════════ */

.footer {
  background: var(--ink);
  color: #cbd5e1;
  padding: 28px 0 calc(28px + var(--safe-bottom));
  font-size: 14px;
}

.footer a { color: #e2e8f0; }
.footer a:hover { color: #fff; }

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.footer__inner::before,
.footer__inner::after {
  display: none;
}

@media (min-width: 640px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    align-items: center;
  }
}