:root {
  --primary: #5B8DEF;
  --primary-600: #4A79D8;
  --accent: #10B981;
  --text: #111827;
  --muted: #6B7280;
  --border: #E5E7EB;
  --bg: #FFFFFF;
  --bg-muted: #F8FAFC;
  --shadow: 0 2px 12px rgba(17, 24, 39, 0.08);
}

/* Reset y base */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
ul { list-style: none; padding: 0; margin: 0; }

/* Skip link accesible */
.skip-link {
  position: absolute;
  left: -9999px;
  top: -9999px;
  z-index: 9999;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  background: var(--bg);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

/* Contenedores y secciones */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; border-top: 1px solid var(--border); }
.section:first-of-type { border-top: 0; }
.section--muted { background: var(--bg-muted); }

/* Grid base */
.grid { display: grid; gap: 24px; align-items: start; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }
.gap { gap: 16px; }
.center { text-align: center; }

@media (min-width: 900px) {
  .grid--2 { grid-template-columns: 1fr 1fr; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* Tipografía */
.h1 {
  font-size: 32px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}
@media (min-width: 640px) { .h1 { font-size: 40px; } }
.h2 { font-size: 24px; line-height: 1.2; font-weight: 600; margin: 0; }
.lead { margin-top: 12px; color: var(--muted); font-size: 18px; }
.body { margin-top: 12px; color: var(--muted); font-size: 16px; }
.note { margin-top: 8px; color: var(--muted); font-size: 13px; }

/* Header y navegación */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(6px);
  background: rgba(255,255,255,0.95);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px;
}

.nav__brand { display: flex; align-items: center; gap: 10px; }
.nav__logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.logo-dot { width: 28px; height: 28px; border-radius: 6px; background: var(--primary); display: inline-block; }
.nav__title { font-size: 16px; }

/* Toggle y menú responsive */
.nav__toggle {
  margin-left: auto;
  width: 44px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.toggle-bar { width: 20px; height: 2px; background: var(--text); display: block; margin: 2px 0; }

/* Menu: por defecto oculto en móvil; visible en desktop */
.nav__menu {
  grid-column: 1 / -1;
  display: none;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  align-items: center;
  justify-content: space-between;
}
.nav__links { display: grid; gap: 8px; margin-bottom: 12px; }
.nav__link { color: #374151; font-size: 14px; }
.nav__link:hover { color: #111827; }
.nav__cta { display: flex; gap: 10px; align-items: center; }

@media (min-width: 900px) {
  .nav__toggle { display: none; }
  .nav__menu { display: flex; border-top: 0; padding-top: 0; }
  .nav__links { display: flex; gap: 18px; margin-bottom: 0; }
}

/* Hero */
.hero { padding-top: 88px; }
.hero__copy .btns { margin-top: 16px; display: flex; gap: 12px; flex-wrap: wrap; }

/* Cards y medias */
.card { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); background: var(--bg); }
.card--feature { border: 1px solid var(--border); border-radius: 14px; padding: 16px; background: var(--bg); }
.card--pad { padding: 18px; }
.card__title { display: block; font-weight: 600; }
.card__text { margin-top: 6px; color: var(--muted); font-size: 14px; }
.card__foot { padding: 12px 14px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--border); background: #fff; }

.media { position: relative; width: 100%; background: #F3F4F6; display: grid; place-items: center; }
.media--16x10 { aspect-ratio: 16 / 10; }
.media__placeholder { width: 96px; height: 96px; border-radius: 14px; border: 1px solid transparent; }
.media__placeholder.primary { background: rgba(91, 141, 239, 0.16); border-color: rgba(91, 141, 239, 0.28); }
.media__placeholder.accent { background: rgba(16, 185, 129, 0.16); border-color: rgba(16, 185, 129, 0.28); }

/* Lists y dots */
.list { margin-top: 16px; display: grid; gap: 10px; }
.list__item { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: flex-start; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-top: 6px; }
.dot--primary { background: var(--primary); }
.dot--accent { background: var(--accent); }

/* Botones y enlaces */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.12s ease;
  outline: none;
}
.btn:focus-visible { box-shadow: 0 0 0 3px rgba(16,185,129,0.16), 0 0 0 5px #fff; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-600); transform: translateY(-2px); }
.btn--secondary { background: #fff; color: var(--text); border-color: var(--border); }
.btn--secondary:hover { background: #F9FAFB; }
.link { display: inline-flex; margin-top: 10px; font-size: 14px; color: var(--primary); }
.link:hover { color: var(--primary-600); }

.cta .btns { margin-top: 16px; display: flex; gap: 12px; justify-content: center; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 48px 0; }
.footer__title { font-weight: 600; }
.footer__list { margin-top: 10px; display: grid; gap: 8px; }
.footer__link { color: var(--muted); font-size: 14px; }
.footer__link:hover { color: var(--text); }
.footer__copy { margin-top: 22px; font-size: 12px; color: var(--muted); text-align: center; }

/* Formularios */
.form { display: grid; gap: 10px; margin-top: 16px; max-width: 520px; }
.form label { font-size: 14px; color: #374151; }
.form input, .form textarea, .form select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
}
.form textarea { min-height: 120px; resize: vertical; }
.form__hint { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* Accessibility helpers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Highlight (ya existente) */
.highlight {
  animation: highlightFade 2s ease-in-out;
  box-shadow: 0 0 0 4px rgba(91, 141, 239, 0.4);
  border-radius: 12px;
}
@keyframes highlightFade {
  0%   { background-color: rgba(91,141,239,0.1); }
  50%  { background-color: rgba(91,141,239,0.2); }
  100% { background-color: transparent; }
}

/* ====== NUEVOS BLOQUES: sticky, countdown, progress ====== */

/* Sticky button */
.sticky-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(91, 141, 239, 0.14);
  transition: background 0.28s ease, transform 0.12s ease, opacity 0.28s ease;
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.sticky-btn:hover { background: var(--primary-600); transform: translateY(-2px); }
.sticky-btn.hidden { opacity: 0; pointer-events: none; transform: translateY(8px); }
.sticky-btn .countdown { font-size: 12px; opacity: 0.95; }

/* Pulso animado */
@keyframes pulse {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(91,141,239,0.28); }
  60%  { transform: scale(1.03); box-shadow: 0 0 0 12px rgba(91,141,239,0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(91,141,239,0); }
}
.sticky-btn.pulse { animation: pulse 2s ease-in-out; }

/* Countdown box */
.countdown-box {
  margin: 12px 0;
  padding: 12px 14px;
  background: #fff7ed;
  border: 1px solid #ffe8c8;
  border-radius: 10px;
  font-weight: 600;
  color: #7a4d19;
  font-size: 14px;
}
.progress-bar {
  margin-top: 8px;
  width: 100%;
  height: 8px;
  background: #fff2e6;
  border-radius: 6px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  width: 100%;
  transition: width 1s linear;
}
