/* ============================================================
   GB Sistemas — Hoja de estilos
   Tema oscuro (por defecto) con paleta azul + modo claro
   ============================================================ */

/* ---------- Variables ---------- */
:root {
  color-scheme: dark;

  --bg: #050d1a;
  --bg-soft: #081426;
  --surface: rgba(13, 27, 46, 0.72);
  --surface-solid: #0c1a30;
  --border: rgba(96, 165, 250, 0.16);
  --border-strong: rgba(96, 165, 250, 0.32);

  --text: #e8f0fe;
  --muted: #9db1cf;

  --primary: #3b82f6;
  --primary-strong: #2563eb;
  --accent: #38bdf8;
  --gradient: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);

  --glow-a: rgba(37, 99, 235, 0.22);
  --glow-b: rgba(56, 189, 248, 0.12);
  --shadow: 0 24px 60px rgba(2, 8, 23, 0.55);
  --shadow-sm: 0 10px 30px rgba(2, 8, 23, 0.4);

  --radius: 18px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", var(--font-body);
}

[data-theme="light"] {
  color-scheme: light;

  --bg: #f3f6fc;
  --bg-soft: #e9effa;
  --surface: rgba(255, 255, 255, 0.85);
  --surface-solid: #ffffff;
  --border: rgba(30, 64, 140, 0.12);
  --border-strong: rgba(37, 99, 235, 0.35);

  --text: #0e1b33;
  --muted: #4a5f80;

  --glow-a: rgba(37, 99, 235, 0.10);
  --glow-b: rgba(56, 189, 248, 0.08);
  --shadow: 0 24px 50px rgba(30, 64, 140, 0.12);
  --shadow-sm: 0 10px 26px rgba(30, 64, 140, 0.10);
}

/* ---------- Reset básico ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- Utilidades tipográficas ---------- */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.01em; }

h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }

.grad-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.lead, .lead-sm { color: var(--muted); font-size: 1.06rem; max-width: 56ch; }
.lead-sm { font-size: 1rem; margin-bottom: 16px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn svg { width: 18px; height: 18px; }

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(37, 99, 235, 0.45); }

.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-sm); }

.btn-wa { background: #16a34a; color: #fff; }
.btn-wa:hover { background: #15803d; transform: translateY(-2px); }
.btn-wa.btn-sm { padding: 9px 18px; font-size: 0.88rem; }

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

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.icon-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--gradient);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}
.brand-name em { font-style: normal; font-weight: 500; color: var(--accent); }

.menu { display: flex; align-items: center; gap: 26px; }
.menu > a:not(.btn) {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  transition: color 0.2s ease;
}
.menu > a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
  transition: width 0.25s ease;
}
.menu > a:not(.btn):hover { color: var(--text); }
.menu > a:not(.btn):hover::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 10px; }

/* Iconos del toggle: en oscuro muestro sol (pasar a claro), en claro muestro luna */
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }

.hamburger { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 96px 0 110px;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}
.glow-a { width: 520px; height: 520px; top: -160px; right: -80px; background: var(--glow-a); }
.glow-b { width: 420px; height: 420px; bottom: -180px; left: -120px; background: var(--glow-b); }
.glow-c { width: 480px; height: 480px; top: -120px; right: -120px; background: var(--glow-a); }

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 22px;
}
.badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18); }
  50% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0.06); }
}

.hero-copy h1 { margin-bottom: 18px; }
.hero-copy .lead { margin-bottom: 30px; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  color: var(--muted);
  font-size: 0.9rem;
}
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
}

/* --- Mockup de dashboard (puro CSS) --- */
.browser {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: rotate(1.2deg);
  transition: transform 0.4s ease;
}
.browser:hover { transform: rotate(0deg) translateY(-4px); }

.browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.browser-bar span { width: 10px; height: 10px; border-radius: 50%; }
.browser-bar span:nth-child(1) { background: #ef4444; }
.browser-bar span:nth-child(2) { background: #eab308; }
.browser-bar span:nth-child(3) { background: #22c55e; }
.browser-bar em {
  font-style: normal;
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: 10px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
}

.dashboard { display: flex; min-height: 320px; }

.dash-side {
  width: 54px;
  border-right: 1px solid var(--border);
  padding: 18px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.dash-side i {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--border);
}
.dash-side i:first-child { background: var(--gradient); }

.dash-main { flex: 1; padding: 18px; display: flex; flex-direction: column; gap: 16px; }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kpi {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--bg-soft);
}
.kpi small { display: block; color: var(--muted); font-size: 0.68rem; letter-spacing: 0.04em; text-transform: uppercase; }
.kpi strong { font-family: var(--font-display); font-size: 1.05rem; }
.kpi .up { display: block; font-size: 0.7rem; color: #22c55e; font-weight: 600; }

.chart {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  min-height: 120px;
}
.chart .bar {
  flex: 1;
  height: var(--h, 40%);
  border-radius: 6px 6px 2px 2px;
  background: var(--gradient);
  opacity: 0.85;
  transform-origin: bottom;
  animation: grow 1s cubic-bezier(0.2, 0.8, 0.3, 1) backwards;
}
.chart .bar:nth-child(2) { animation-delay: 0.08s; }
.chart .bar:nth-child(3) { animation-delay: 0.16s; }
.chart .bar:nth-child(4) { animation-delay: 0.24s; }
.chart .bar:nth-child(5) { animation-delay: 0.32s; }
.chart .bar:nth-child(6) { animation-delay: 0.4s; }
.chart .bar:nth-child(7) { animation-delay: 0.48s; }
@keyframes grow { from { transform: scaleY(0); } }

.rows { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.row i { height: 8px; border-radius: 4px; background: var(--border); }
.row i:first-child { width: 34%; }
.row i:nth-child(2) { width: 22%; }
.row b { margin-left: auto; width: 46px; height: 8px; border-radius: 4px; background: var(--primary); opacity: 0.55; }

/* ---------- Secciones ---------- */
.section { padding: 96px 0; position: relative; }
.section-alt {
  background:
    radial-gradient(900px 400px at 85% 0%, var(--glow-b), transparent),
    var(--bg-soft);
}

.section-head { text-align: center; max-width: 640px; margin: 0 auto 54px; }
.section-head p { color: var(--muted); margin-top: 12px; }

/* ---------- Cards de sistemas ---------- */
.grid { display: grid; gap: 22px; }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }

.card {
  display: flex;
  flex-direction: column;
  padding: 30px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(56, 189, 248, 0.12));
  border: 1px solid var(--border-strong);
  color: var(--accent);
  margin-bottom: 20px;
}
.card-icon svg { width: 26px; height: 26px; }

.card h3 { margin-bottom: 10px; }
.card > p { color: var(--muted); font-size: 0.95rem; margin-bottom: 16px; }

.card ul { display: grid; gap: 8px; margin-bottom: 22px; }
.card li {
  position: relative;
  padding-left: 22px;
  font-size: 0.9rem;
  color: var(--muted);
}
.card li::before {
  content: "›";
  position: absolute;
  left: 4px;
  color: var(--accent);
  font-weight: 700;
}

.card-link {
  margin-top: auto;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  transition: transform 0.2s ease;
}
.card-link:hover { transform: translateX(4px); }

/* ---------- Servicios ---------- */
.services-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.service {
  padding: 28px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.service:hover { transform: translateY(-5px); border-color: var(--border-strong); }

.service-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 14px;
}
.service h3 { margin-bottom: 10px; font-size: 1.05rem; }
.service p { color: var(--muted); font-size: 0.9rem; }

/* ---------- Nosotros ---------- */
.nosotros-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.check-list { display: grid; gap: 14px; }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  font-size: 0.95rem;
}
.check-list li::before {
  content: "✓";
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.nosotros-grid .btn { margin-top: 10px; }

/* ---------- Contacto ---------- */
.contacto-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-cards { display: grid; gap: 18px; margin-top: 30px; }

.contact-hint {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 40ch;
}

.form-card {
  padding: 34px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-solid);
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
}

.field { display: grid; gap: 7px; }
.field label { font-size: 0.88rem; font-weight: 600; }
.field label small { color: var(--muted); font-weight: 400; }

.field input,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--muted); opacity: 0.7; }

.form-note {
  font-size: 0.85rem;
  color: var(--muted);
  min-height: 1.2em;
}
.form-note.ok { color: #22c55e; }
.form-note.err { color: #ef4444; }

/* Honeypot anti-spam: invisible para personas, visible para bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 40px;
  padding-block: 54px 36px;
}

.footer-tag { color: var(--muted); font-size: 0.92rem; margin-top: 16px; }

.footer-nav { display: grid; gap: 10px; align-content: start; }
.footer-nav a { color: var(--muted); font-size: 0.94rem; }
.footer-nav a:hover { color: var(--text); }

.footer-contact { display: grid; gap: 10px; align-content: start; font-size: 0.94rem; color: var(--muted); }
.footer-contact a { font-weight: 600; color: var(--text); }
.footer-contact a:hover { color: var(--accent); }

.footer-base {
  border-top: 1px solid var(--border);
  padding-block: 20px;
  font-size: 0.84rem;
  color: var(--muted);
  text-align: center;
}

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  box-shadow: 0 12px 30px rgba(34, 197, 94, 0.45);
  transition: transform 0.2s ease;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; }
.wa-float::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(34, 197, 94, 0.5);
  animation: ring 2.4s infinite;
}
@keyframes ring {
  0% { transform: scale(0.9); opacity: 1; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* ---------- Animación de aparición ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .chart .bar { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero { padding: 72px 0 84px; }
  .hero-copy { text-align: center; }
  .hero-copy .lead { margin-inline: auto; }
  .hero-cta, .hero-points { justify-content: center; }
  .nosotros-grid { grid-template-columns: 1fr; gap: 40px; }
  .contacto-grid { grid-template-columns: 1fr; gap: 44px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 900px) {
  .hamburger { display: inline-flex; }

  .menu {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 10px 24px 22px;
    transform: translateY(-130%);
    transition: transform 0.3s ease;
    z-index: 99;
    box-shadow: var(--shadow);
  }
  .menu.open { transform: translateY(0); }

  .menu > a:not(.btn) { padding: 14px 4px; font-size: 1rem; border-bottom: 1px solid var(--border); }
  .menu > a:not(.btn)::after { display: none; }
  .menu .btn { margin-top: 18px; justify-content: center; }
}

@media (max-width: 560px) {
  .container { padding-inline: 18px; }
  .section { padding: 72px 0; }
  .hero { padding: 56px 0 68px; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .form-card { padding: 26px 20px; }
  .kpis { grid-template-columns: 1fr; }
  .browser { transform: none; }
  .wa-float { right: 16px; bottom: 16px; width: 52px; height: 52px; }
}
