/* ===== DARK THEME (default) ===== */
:root {
  --bg: #080d1a;
  --bg-alt: #101a30;
  --card: #16213c;
  --border: #24345a;
  --text: #e8edf7;
  --text-dim: #9aa7c4;
  --accent: #22d3ee;
  --accent-2: #6366f1;
  --radius: 14px;
  --shadow: 0 10px 30px rgb(0, 0, 0, 0.35);
  --nav-bg: rgb(10, 15, 30, 0.85);
}

/* ===== LIGHT THEME ===== */
[data-theme='light'],
:root.light {
  --bg: #f5f7fa;
  --bg-alt: #e8ecf2;
  --card: #fff;
  --border: #d0d8e4;
  --text: #111827;
  --text-dim: #4b5563;
  --nav-bg: rgb(245, 247, 250, 0.92);
}

/* system preference: light → override only if no manual choice in localStorage */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #f5f7fa;
    --bg-alt: #e8ecf2;
    --card: #fff;
    --border: #d0d8e4;
    --text: #111827;
    --text-dim: #4b5563;
    --nav-bg: rgb(245, 247, 250, 0.92);
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    Inter,
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(1120px, 90%);
  margin: 0 auto;
}

/* ===== THEME TOGGLE ===== */
.theme-btn {
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-dim);
  transition:
    background 0.2s,
    border-color 0.2s;
  line-height: 1;
}

.theme-btn:hover {
  background: var(--card);
  border-color: var(--accent);
}

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text);
  font-size: 1.15rem;
}

.brand__mark {
  line-height: 0;
}

.brand strong {
  color: var(--accent);
  font-weight: 800;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav__links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav__links a:hover {
  color: var(--accent);
}

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  transition: 0.25s;
}

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition:
    transform 0.15s,
    box-shadow 0.2s;
  font-size: 1rem;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgb(34, 211, 238, 0.35);
}

.btn--sm {
  padding: 0.45rem 1.1rem;
  font-size: 0.9rem;
}

.btn--lg {
  padding: 0.9rem 1.8rem;
  font-size: 1.05rem;
}

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

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: none;
}

/* HERO */
.hero {
  padding: 110px 0 90px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgb(99, 102, 241, 0.28), transparent), var(--bg);
}

.hero__inner {
  text-align: center;
  max-width: 820px;
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgb(34, 211, 238, 0.35);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.4rem;
}

.hero__title {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
}

.hero__sub {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 2.2rem;
}

.hero__cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* divider */
.divider {
  height: 1px;
  width: min(1120px, 90%);
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, rgb(34, 211, 238, 0.4), transparent);
}

/* STATS */
.stats {
  padding: 90px 0;
  background: var(--bg-alt);
}

.section__eyebrow {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 2.5rem;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.stat {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat__value {
  display: block;
  font-size: 2.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  /* stylelint-disable-next-line property-no-vendor-prefix */
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.stat__label {
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* SOLUTIONS */
.solutions {
  padding: 100px 0;
}

.section__title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.section__lead {
  color: var(--text-dim);
  max-width: 640px;
  margin: 0.8rem 0 2.8rem;
}

.solutions__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition:
    transform 0.2s,
    border-color 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgb(34, 211, 238, 0.5);
}

.card__icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.7rem;
}

.card p {
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* CASE */
.case {
  padding: 100px 0;
  background: var(--bg-alt);
}

.case__inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.case .section__eyebrow {
  text-align: left;
  margin-bottom: 0.8rem;
}

.case__content p {
  color: var(--text-dim);
  margin-top: 1rem;
}

.case__content strong {
  color: var(--text);
}

.case__results {
  display: grid;
  gap: 1.2rem;
}

.case__result {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  text-align: center;
}

.case__value {
  display: block;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
}

.case__label {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* CTA */
.cta {
  padding: 110px 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 110%, rgb(34, 211, 238, 0.18), transparent), var(--bg);
}

.cta__inner {
  text-align: center;
  max-width: 720px;
}

.cta__title {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.cta__sub {
  color: var(--text-dim);
  margin-bottom: 2.2rem;
  font-size: 1.1rem;
}

.cta__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  margin-bottom: 1.2rem;
}

.cta__form input {
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
}

.cta__form input:focus {
  border-color: var(--accent);
}

.cta__form button {
  grid-column: 1 / -1;
  justify-self: center;
}

.cta__note {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.cta__note a {
  color: var(--accent);
}

/* ===== FOOTER: columnas con separadores ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  background: var(--bg-alt);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 0;
  margin-bottom: 2.5rem;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0 2rem;
}

.footer__col:first-child {
  padding-left: 0;
}

.footer__col:last-child {
  padding-right: 0;
}

.footer__col:not(:first-child) {
  border-left: 1px solid var(--border);
  padding-left: 2rem;
}

.footer__col--brand {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.footer__brand .brand {
  font-size: 1.15rem;
}

.footer__tagline {
  color: var(--text-dim);
  font-size: 0.9rem;
  max-width: 260px;
  line-height: 1.55;
}

.footer__title {
  color: var(--accent);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  margin: 0 0 0.25rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
}

.footer__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.7rem;
}

.footer__list li {
  margin: 0;
}

.footer__list a,
.footer__list span {
  color: var(--text-dim);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
  display: inline-block;
  padding: 0.1rem 0;
}

.footer__list a:hover {
  color: var(--accent);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  margin-top: 0.5rem;
}

.footer__bottom p,
.footer__bottom a {
  color: var(--text-dim);
  font-size: 0.88rem;
  text-decoration: none;
}

.footer__bottom a:hover {
  color: var(--accent);
}

/* RESPONSIVE */
@media (width <= 820px) {
  .nav__links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1.2rem;
    gap: 1rem;
    display: none;
  }

  .nav__links.open {
    display: flex;
  }

  .nav__toggle {
    display: block;
  }

  .stats__grid,
  .solutions__grid {
    grid-template-columns: 1fr;
  }

  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .case__inner {
    grid-template-columns: 1fr;
  }

  .cta__form {
    grid-template-columns: 1fr;
  }

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

  .hero__cta {
    flex-direction: column;
    align-items: center;
  }
}

@media (width <= 480px) {
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer__col {
    padding: 0;
  }

  .footer__col:not(:first-child) {
    border-left: none;
    padding-left: 0;
  }

  .footer__col:first-child {
    padding-right: 0;
  }

  .footer__col:last-child {
    padding-left: 0;
  }

  .footer__tagline {
    max-width: 100%;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .footer {
    padding: 2.5rem 0 1.5rem;
  }
}

/* ===== FORM MESSAGE ===== */
.form-msg {
  display: none;
  margin-top: 0.8rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  grid-column: 1 / -1;
}

.form-msg--ok {
  background: rgb(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgb(16, 185, 129, 0.3);
}

.form-msg--err {
  background: rgb(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgb(239, 68, 68, 0.3);
}

/* ===== HONEYPOT (anti-bot, invisible) ===== */
.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* ===== FLOATING WHATSAPP BUTTON ===== */
.wa-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 6px 20px rgb(37, 211, 102, 0.45);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  animation: wa-pulse 2.4s infinite;
}

.wa-float svg {
  width: 1.9rem;
  height: 1.9rem;
  fill: currentcolor;
}

.wa-float:hover,
.wa-float:focus-visible {
  transform: scale(1.1);
  box-shadow: 0 8px 26px rgb(37, 211, 102, 0.6);
  animation-play-state: paused;
}

@keyframes wa-pulse {
  0% {
    box-shadow:
      0 6px 20px rgb(37, 211, 102, 0.45),
      0 0 0 0 rgb(37, 211, 102, 0.4);
  }

  70% {
    box-shadow:
      0 6px 20px rgb(37, 211, 102, 0.45),
      0 0 0 16px rgb(37, 211, 102, 0);
  }

  100% {
    box-shadow:
      0 6px 20px rgb(37, 211, 102, 0.45),
      0 0 0 0 rgb(37, 211, 102, 0);
  }
}

@media (width <= 600px) {
  .wa-float {
    right: 0.9rem;
    bottom: 0.9rem;
    width: 3.2rem;
    height: 3.2rem;
  }
}
