/* ==========================================================================
   QvaSoft — Shared stylesheet (ES + EN landings)
   Brand colors extracted from logo.svg
   ========================================================================== */

:root {
  --brand-400: #4fc3f7;
  --brand-500: #03a9f4;
  --brand-600: #039be5;
  --brand-800: #01579b;
  --ink-950: #050b16;
  --ink-900: #0a1424;
  --ink-800: #101d33;
}

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  /* Evita el scroll horizontal provocado por elementos decorativos absolutos */
  overflow-x: hidden;
  max-width: 100%;
}

body {
  background-color: var(--ink-950);
  color: #cbd5e1;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
  position: relative;
}

::selection {
  background: var(--brand-500);
  color: #04121f;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--ink-950);
}
::-webkit-scrollbar-thumb {
  background: #1e3555;
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-800);
}

/* ---------- Typography helpers ---------- */
.text-gradient {
  background: linear-gradient(100deg, var(--brand-400) 0%, var(--brand-500) 45%, var(--brand-800) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.headline {
  color: #f1f5f9;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

/* ---------- Layout helpers ---------- */
.shell {
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 768px) {
  .shell {
    padding-inline: 2rem;
  }
}

.section {
  padding-block: 5rem;
  position: relative;
  /* Recorta los "glows" decorativos que sobresalen a los lados.
     Sin esto, provocan scroll horizontal y una franja oscura lateral en móvil. */
  overflow: hidden;
  overflow: clip;
}
@media (min-width: 1024px) {
  .section {
    padding-block: 7rem;
  }
}

.divider-top {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

/* ---------- Decorative glows ---------- */
.glow {
  position: absolute;
  border-radius: 9999px;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  /* Nunca deben aumentar el ancho desplazable del documento */
  max-width: 100%;
}
.glow-brand {
  background: rgba(3, 169, 244, 0.28);
}
.glow-deep {
  background: rgba(1, 87, 155, 0.35);
}

.grid-bg {
  background-image:
    linear-gradient(rgba(3, 169, 244, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(3, 169, 244, 0.055) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(ellipse 75% 60% at 50% 30%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 30%, #000 35%, transparent 100%);
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(160deg, rgba(16, 29, 51, 0.85) 0%, rgba(10, 20, 36, 0.65) 100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s ease, box-shadow 0.35s ease;
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(3, 169, 244, 0.14), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(3, 169, 244, 0.45);
  box-shadow: 0 24px 60px -28px rgba(3, 169, 244, 0.45);
}
.card:hover::after {
  opacity: 1;
}

.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: linear-gradient(140deg, rgba(3, 169, 244, 0.22), rgba(1, 87, 155, 0.28));
  border: 1px solid rgba(3, 169, 244, 0.3);
  color: var(--brand-400);
  flex-shrink: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active {
  transform: scale(0.97);
}

/* Variante compacta (p. ej. CTA del header en escritorio) */
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 0.6rem;
  gap: 0.4rem;
}

/* En pantallas grandes el CTA del header se mantiene discreto */
@media (min-width: 1024px) {
  #site-header .btn-sm {
    padding: 0.45rem 0.95rem;
    font-size: 0.83rem;
  }
  #site-header .btn-sm svg {
    width: 0.9rem;
    height: 0.9rem;
  }
}

.btn-primary {
  background: linear-gradient(120deg, var(--brand-500), var(--brand-600));
  color: #04121f;
  box-shadow: 0 12px 32px -12px rgba(3, 169, 244, 0.75);
}
.btn-primary:hover {
  box-shadow: 0 18px 44px -12px rgba(3, 169, 244, 0.95);
  transform: translateY(-2px);
}

.btn-ghost {
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
}
.btn-ghost:hover {
  border-color: rgba(3, 169, 244, 0.55);
  color: #fff;
  background: rgba(3, 169, 244, 0.1);
  transform: translateY(-2px);
}

.btn-whatsapp {
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.45);
  color: #86efac;
}
.btn-whatsapp:hover {
  background: rgba(37, 211, 102, 0.2);
  color: #bbf7d0;
  transform: translateY(-2px);
}

/* ---------- Navbar ---------- */
.nav-link {
  position: relative;
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 0;
  background: var(--brand-500);
  border-radius: 2px;
  transition: width 0.25s ease;
}
.nav-link:hover {
  color: #e2e8f0;
}
.nav-link:hover::after,
.nav-link.is-active::after {
  width: 100%;
}
.nav-link.is-active {
  color: var(--brand-400);
}

#site-header {
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}
#site-header.is-scrolled {
  background: rgba(5, 11, 22, 0.82);
  backdrop-filter: blur(14px);
  border-color: rgba(148, 163, 184, 0.14);
}

#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
/* Se usa el encadenado con el id del header para superar la especificidad
   de las utilidades que Tailwind CDN inyecta al final del <head>. */
#site-header #mobile-menu.is-open,
#mobile-menu.is-open {
  max-height: 40rem;
}

/* ---------- Chips / badges ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #bae6fd;
  background: rgba(3, 169, 244, 0.1);
  border: 1px solid rgba(3, 169, 244, 0.28);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-400);
}

/* ---------- Tech pills ---------- */
.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 0.7rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.07);
  border: 1px solid rgba(148, 163, 184, 0.16);
  transition: all 0.25s ease;
}
.tech-pill:hover {
  color: #fff;
  border-color: rgba(3, 169, 244, 0.5);
  background: rgba(3, 169, 244, 0.1);
  transform: translateY(-3px);
}

/* ---------- Steps timeline ---------- */
.step {
  position: relative;
  padding-left: 4.25rem;
}
.step-num {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.85rem;
  font-weight: 700;
  color: var(--brand-400);
  background: rgba(3, 169, 244, 0.1);
  border: 1px solid rgba(3, 169, 244, 0.35);
}
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 1.5rem;
  top: 3.4rem;
  bottom: -1.6rem;
  width: 1px;
  background: linear-gradient(to bottom, rgba(3, 169, 244, 0.5), rgba(3, 169, 244, 0));
}

/* ---------- FAQ (native details) ---------- */
.faq-item {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 0.9rem;
  background: rgba(16, 29, 51, 0.5);
  overflow: hidden;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.faq-item[open] {
  border-color: rgba(3, 169, 244, 0.45);
  background: rgba(16, 29, 51, 0.8);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.15rem 1.35rem;
  font-weight: 600;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary .faq-chevron {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  color: var(--brand-400);
}
.faq-item[open] summary .faq-chevron {
  transform: rotate(180deg);
}
.faq-answer {
  padding: 0 1.35rem 1.25rem;
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  max-width: 100%;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marquee 34s linear infinite;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #64748b;
  white-space: nowrap;
  transition: color 0.25s ease;
}
.marquee-item:hover {
  color: var(--brand-400);
}
@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Floating WhatsApp FAB ---------- */
.fab-whatsapp {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: #25d366;
  color: #04240f;
  box-shadow: 0 14px 34px -10px rgba(37, 211, 102, 0.7);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.fab-whatsapp:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 20px 44px -10px rgba(37, 211, 102, 0.85);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Testimonials ---------- */
.quote-mark {
  font-size: 3.5rem;
  line-height: 1;
  color: rgba(3, 169, 244, 0.3);
  font-family: Georgia, "Times New Roman", serif;
}

/* ---------- Logo mark ---------- */
.logo-mark {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
}
.logo-mark path {
  transition: filter 0.3s ease;
}
a:hover .logo-mark path,
.logo:hover .logo-mark path {
  filter: drop-shadow(0 0 3px rgba(3, 169, 244, 0.9));
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .marquee-track {
    animation: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .card,
  .btn,
  .tech-pill,
  .fab-whatsapp {
    transition: none;
  }
}
