/* ============================================================
   InfluTools.com — Sistema de diseño global
   Stack: HTML + CSS + JS puro | Dark mode | Mobile-first
   ============================================================ */

/* --- Variables de diseño --- */
:root {
  --bg:           #0F0F1A;
  --surface:      #1A1A2E;
  --surface-2:    #222240;
  --primary:      #A855F7;
  --primary-dim:  #7C3AED;
  --accent:       #EC4899;
  --amber:        #F59E0B;
  --teal:         #14B8A6;
  --text:         #F1F0F5;
  --text-muted:   #9490A8;
  --border:       rgba(168, 85, 247, 0.15);

  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    20px;

  --shadow-card:  0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow:  0 0 24px rgba(168, 85, 247, 0.25);

  --transition:   0.2s ease;

  --font: 'Outfit', sans-serif;
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* --- Tipografía --- */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }

p {
  line-height: 1.65;
  color: var(--text-muted);
}

/* --- Layout base --- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 64px 0;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1.2rem;
}

.navbar__logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.navbar__logo span {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.navbar__links a:hover,
.navbar__links a.active {
  color: var(--text);
  background: var(--surface);
}

.navbar__menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 8px;
}

/* Mobile nav */
@media (max-width: 680px) {
  .navbar__links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 20px;
    gap: 4px;
  }

  .navbar__links.open {
    display: flex;
  }

  .navbar__links a {
    width: 100%;
    padding: 12px 16px;
  }

  .navbar__menu-btn {
    display: flex;
  }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 80px 0 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(168, 85, 247, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.hero__title {
  margin-bottom: 20px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero__title em {
  font-style: normal;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  max-width: 520px;
  margin: 0 auto 40px;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ============================================================
   BOTONES
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 500;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  transition: all var(--transition);
  text-decoration: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dim));
  color: #fff;
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.35);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(168, 85, 247, 0.5);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background: var(--surface);
  color: var(--text);
  border-color: rgba(168, 85, 247, 0.3);
}

.btn--accent {
  background: linear-gradient(135deg, var(--accent), #be185d);
  color: #fff;
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.35);
}

.btn--accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(236, 72, 153, 0.5);
}

.btn--teal {
  background: linear-gradient(135deg, var(--teal), #0d9488);
  color: #fff;
  box-shadow: 0 4px 16px rgba(20, 184, 166, 0.35);
}

.btn--teal:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(20, 184, 166, 0.5);
}

.btn--sm {
  font-size: 0.85rem;
  padding: 8px 16px;
}

.btn--full {
  width: 100%;
  justify-content: center;
}

/* ============================================================
   CARDS DE HERRAMIENTAS
   ============================================================ */
.tools {
  padding-top: 0;
}

.tools__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity var(--transition);
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  border-color: rgba(168, 85, 247, 0.3);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.tool-card__icon--purple {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.tool-card__icon--pink {
  background: rgba(236, 72, 153, 0.15);
  border: 1px solid rgba(236, 72, 153, 0.25);
}

.tool-card__icon--teal {
  background: rgba(20, 184, 166, 0.15);
  border: 1px solid rgba(20, 184, 166, 0.25);
}

.tool-card__label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.tool-card h3 {
  color: var(--text);
}

.tool-card p {
  font-size: 0.95rem;
  flex: 1;
}

/* ============================================================
   BADGES / ETIQUETAS DE ESTADO
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
}

.badge--purple {
  background: rgba(168, 85, 247, 0.15);
  color: var(--primary);
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.badge--teal {
  background: rgba(20, 184, 166, 0.15);
  color: var(--teal);
  border: 1px solid rgba(20, 184, 166, 0.25);
}

.badge--amber {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge--pink {
  background: rgba(236, 72, 153, 0.15);
  color: var(--accent);
  border: 1px solid rgba(236, 72, 153, 0.25);
}

/* ============================================================
   BARRA DE PROGRESO
   ============================================================ */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease, background-color 0.3s ease;
  background: var(--teal);
}

.progress-bar__fill--ok     { background: var(--teal); }
.progress-bar__fill--warn   { background: var(--amber); }
.progress-bar__fill--danger { background: var(--accent); }

/* ============================================================
   SECCIÓN "CÓMO FUNCIONA"
   ============================================================ */
.how {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.how__header {
  text-align: center;
  margin-bottom: 48px;
}

.how__header p {
  margin-top: 12px;
}

.how__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.how__step {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.how__step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
  flex-shrink: 0;
}

.how__step h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* ============================================================
   STATS / NÚMEROS
   ============================================================ */
.stats {
  text-align: center;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat__number {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 600;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat__label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.footer__logo span {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer__links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

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

.footer__copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  width: 100%;
  margin-top: 8px;
}

/* ============================================================
   UTILIDADES
   ============================================================ */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent  { color: var(--accent); }
.text-teal    { color: var(--teal); }
.text-amber   { color: var(--amber); }
.text-muted   { color: var(--text-muted); }

.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================================
   PÁGINAS DE CONTENIDO (legales y sobre)
   ============================================================ */
.page-header {
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(168, 85, 247, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.page-header__label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.page-header h1 {
  margin-bottom: 12px;
}

.page-header p {
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
}

.legal-content {
  padding-bottom: 80px;
}

.legal-content__body {
  max-width: 720px;
  margin: 0 auto;
}

.legal-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.legal-section {
  margin-bottom: 40px;
}

.legal-section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.legal-section p {
  margin-bottom: 12px;
  font-size: 0.95rem;
  line-height: 1.75;
}

.legal-section ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 12px;
}

.legal-section ul li {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 4px;
}

.legal-section a {
  color: var(--primary);
  transition: opacity var(--transition);
}

.legal-section a:hover {
  opacity: 0.8;
}

/* Footer — enlaces legales */
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.footer__legal a {
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer__legal a:hover {
  color: var(--primary);
}

/* ============================================================
   RESPONSIVE — Ajustes generales desktop
   ============================================================ */
@media (min-width: 768px) {
  section {
    padding: 80px 0;
  }

  .hero {
    padding: 100px 0 80px;
  }
}
