/* ============================================================
   R SOLUTIONS — Identidad visual
   Dark premium · Azul eléctrico #0066FF → Cyan #00D4FF
   Space Grotesk (display) · Inter (body) · JetBrains Mono (tech)
   ============================================================ */

:root {
  /* Fondos (luminance stacking) */
  --bg: #05070d;
  --bg-panel: #0a0e18;
  --surface: rgba(255, 255, 255, 0.025);
  --surface-hover: rgba(255, 255, 255, 0.05);

  /* Marca */
  --electric: #0066ff;
  --cyan: #00d4ff;
  --electric-soft: #3d8bff;
  --grad: linear-gradient(135deg, #0066ff 0%, #00d4ff 100%);

  /* Texto — alto contraste siempre */
  --text: #f5f8ff;
  --text-2: #c3cce0;
  --text-3: #8a94ad;

  /* Bordes */
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
  --border-electric: rgba(0, 102, 255, 0.45);

  /* Sombras cromáticas (Stripe adaptado a dark) */
  --shadow-electric: 0 20px 60px -20px rgba(0, 102, 255, 0.35);
  --shadow-deep: 0 30px 60px -30px rgba(0, 0, 0, 0.7);

  /* Tipografía */
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Ritmo */
  --container: 1160px;
  --section-pad: 110px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "cv01", "ss03";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.mono { font-family: var(--font-mono); }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1.08;
}

h1 { font-size: clamp(42px, 6.5vw, 76px); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(30px, 4vw, 48px); font-weight: 600; letter-spacing: -0.02em; }
h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

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

/* ============ BOTONES ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease);
}

.btn-primary {
  background: var(--grad);
  color: #ffffff;
  box-shadow: var(--shadow-electric);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 70px -18px rgba(0, 140, 255, 0.55);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(0, 160, 255, 0.5);
  transform: translateY(-2px);
}

.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-full { width: 100%; justify-content: center; }

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(5, 7, 13, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}
.brand-mark { display: inline-flex; filter: drop-shadow(0 4px 14px rgba(0, 102, 255, 0.45)); }
.brand-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.nav-links { display: flex; gap: 30px; }
.nav-links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  transition: color 0.3s ease;
}
.nav-links a:hover { color: var(--text); }

.nav-cta { display: flex; align-items: center; gap: 14px; }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-burger span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 150px 0 90px;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }

.hero-glow {
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 700px;
  background: radial-gradient(ellipse at center, rgba(0, 102, 255, 0.22) 0%, rgba(0, 212, 255, 0.06) 45%, transparent 70%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 85% 65% at 50% 35%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 85% 65% at 50% 35%, black 30%, transparent 75%);
}

.hero-inner { position: relative; text-align: center; }

.hero-badge {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  font-size: 12px;
  letter-spacing: 0.14em;
  margin-bottom: 34px;
}

.hero-sub {
  max-width: 640px;
  margin: 28px auto 0;
  font-size: clamp(17px, 2vw, 19.5px);
  line-height: 1.65;
  color: var(--text-2);
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 90px;
  padding-top: 44px;
  border-top: 1px solid var(--border);
}

.stat-num {
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
}
.stat-num .counter { color: var(--text); }
.stat-label {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text-3);
}

/* ============ SECCIONES ============ */
.section { padding: var(--section-pad) 0; position: relative; }

.section-head { max-width: 660px; margin-bottom: 64px; }
.section-head p { margin-top: 18px; font-size: 17.5px; color: var(--text-2); }

.kicker {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--electric-soft);
  margin-bottom: 16px;
}

/* ============ PRODUCTOS ============ */
.grid { display: grid; gap: 22px; }
.products { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease), background 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.card:hover {
  transform: translateY(-5px);
  background: var(--surface-hover);
  border-color: var(--border-electric);
  box-shadow: var(--shadow-electric);
}

.card-icon {
  width: 46px; height: 46px;
  border-radius: 11px;
  background: rgba(0, 102, 255, 0.12);
  border: 1px solid rgba(0, 140, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.card-icon svg { width: 23px; height: 23px; color: var(--cyan); }

.card h3 { margin-bottom: 10px; }
.card p { font-size: 14.5px; line-height: 1.6; color: var(--text-2); flex-grow: 1; }

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}
.card-tags span {
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 4px 9px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  color: var(--text-3);
}

.card-actions { margin-top: 18px; }

.card-cred {
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--text-3);
  user-select: all;
}

.link-arrow {
  color: var(--cyan);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  transition: color 0.3s ease;
}
.link-arrow::after {
  content: " →";
  transition: margin-left 0.3s var(--ease);
}
.link-arrow:hover { color: #7fe7ff; }
.link-arrow:hover::after { margin-left: 5px; }

/* ============ IA ============ */
.section-ia { background: var(--bg-panel); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); overflow: hidden; }

.ia-glow {
  position: absolute;
  top: 50%; right: -300px;
  transform: translateY(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle at center, rgba(0, 102, 255, 0.13) 0%, transparent 65%);
  pointer-events: none;
}

.features { grid-template-columns: repeat(2, 1fr); gap: 26px; }

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 34px 30px;
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.feature:hover {
  transform: translateY(-4px);
  border-color: var(--border-electric);
  box-shadow: var(--shadow-electric);
}

.feature-icon {
  width: 52px; height: 52px;
  border-radius: 13px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  box-shadow: 0 10px 30px -8px rgba(0, 120, 255, 0.5);
}
.feature-icon svg { width: 26px; height: 26px; color: #fff; }

.feature h3 { font-size: 22px; margin-bottom: 12px; }
.feature p { font-size: 15.5px; color: var(--text-2); }
.feature .card-tags { margin-top: 20px; }

/* ============ HARDWARE ============ */
.hw { grid-template-columns: repeat(4, 1fr); }

.hw-item {
  border-top: 1px solid var(--border-strong);
  padding-top: 24px;
  transition: border-color 0.45s ease;
}
.hw-item:hover { border-top-color: var(--electric-soft); }

.hw-num {
  font-size: 13px;
  color: var(--electric-soft);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}
.hw-item h3 { font-size: 18px; margin-bottom: 10px; }
.hw-item p { font-size: 14.5px; color: var(--text-3); }

/* ============ DGII ============ */
.dgii-banner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
  background: linear-gradient(140deg, rgba(0, 102, 255, 0.14) 0%, rgba(0, 212, 255, 0.05) 55%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid var(--border-electric);
  border-radius: 22px;
  padding: 56px;
  box-shadow: var(--shadow-electric);
  overflow: hidden;
}

.dgii-content h2 { margin-bottom: 16px; }
.dgii-content > p { font-size: 16.5px; color: var(--text-2); }

.dgii-list {
  list-style: none;
  margin: 24px 0 30px;
  display: grid;
  gap: 12px;
}
.dgii-list li {
  position: relative;
  padding-left: 30px;
  font-size: 15.5px;
  color: var(--text-2);
}
.dgii-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 20px; height: 20px;
  border-radius: 6px;
  background: rgba(0, 212, 255, 0.15);
  border: 1px solid rgba(0, 212, 255, 0.4);
  color: var(--cyan);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.code-card {
  background: #070b14;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-deep);
  overflow: hidden;
}
.code-dots {
  display: flex;
  gap: 7px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.code-dots span {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
.code-dots span:first-child { background: rgba(255, 95, 86, 0.8); }
.code-dots span:nth-child(2) { background: rgba(255, 189, 46, 0.8); }
.code-dots span:nth-child(3) { background: rgba(39, 201, 63, 0.8); }

.code-card pre {
  padding: 22px 24px;
  font-size: 13px;
  line-height: 1.75;
  color: #a8c7ff;
  overflow-x: auto;
}
.code-ok { color: #34e28a; }
.code-dim { color: var(--text-3); }

/* ============ POR QUÉ ============ */
.why { grid-template-columns: repeat(4, 1fr); }

.why-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--electric);
  border-radius: 12px;
  padding: 28px 24px;
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease), background 0.45s var(--ease);
}
.why-item:hover {
  transform: translateY(-4px);
  background: var(--surface-hover);
  border-left-color: var(--cyan);
}
.why-item h3 { font-size: 18px; margin-bottom: 10px; }
.why-item p { font-size: 14.5px; color: var(--text-2); }

/* ============ CONTACTO ============ */
.section-contact {
  background:
    radial-gradient(ellipse 60% 55% at 50% 110%, rgba(0, 102, 255, 0.14) 0%, transparent 70%),
    var(--bg-panel);
  border-top: 1px solid var(--border);
}

.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: start;
}

.contact-info h2 { margin-bottom: 18px; }
.contact-info > p { font-size: 16.5px; margin-bottom: 34px; }

.wa-big {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 20px 28px;
  background: rgba(37, 211, 102, 0.09);
  border: 1px solid rgba(37, 211, 102, 0.4);
  border-radius: 14px;
  text-decoration: none;
  color: #4ade80;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.wa-big:hover {
  transform: translateY(-3px);
  background: rgba(37, 211, 102, 0.15);
  box-shadow: 0 20px 50px -18px rgba(37, 211, 102, 0.4);
}
.wa-big-label { font-size: 11px; letter-spacing: 0.15em; color: #86efac; }
.wa-big-num {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  color: #f0fdf4;
  letter-spacing: 0.01em;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 20px; }

.contact-form label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 13px 15px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  resize: vertical;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-3); }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--electric-soft);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.18);
}

.contact-form input.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; padding: 0; border: none; }

.form-note {
  margin-top: 14px;
  font-size: 14px;
  text-align: center;
  color: #34e28a;
  min-height: 20px;
}
.form-note.error { color: #ff6b6b; }

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--border);
  background: #04060b;
  padding: 64px 0 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer-brand p {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.6;
}
.footer-title {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-3);
  margin-bottom: 18px;
}
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14.5px;
  transition: color 0.3s ease;
}
.footer-col a:hover { color: var(--cyan); }
.footer-loc { font-size: 13.5px; color: var(--text-3); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 24px;
  padding-bottom: 28px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-3);
}
.footer-bottom .mono { font-size: 11px; letter-spacing: 0.12em; }

/* ============ WHATSAPP FLOTANTE ============ */
.wa-float {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 90;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 35px -8px rgba(37, 211, 102, 0.6);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.wa-float:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 18px 45px -8px rgba(37, 211, 102, 0.75);
}

/* ============ ANIMACIONES (lentas, legibles) ============ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.d1 { transition-delay: 0.1s; }
.d2 { transition-delay: 0.25s; }
.d3 { transition-delay: 0.4s; }
.d4 { transition-delay: 0.55s; }

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

/* ============ RESPONSIVE ============ */
@media (max-width: 1080px) {
  .products { grid-template-columns: repeat(2, 1fr); }
  .hw, .why { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  :root { --section-pad: 80px; }

  .nav-links {
    position: fixed;
    top: 66px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(5, 7, 13, 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 0; font-size: 16px; border-bottom: 1px solid var(--border); }
  .nav-links a:last-child { border-bottom: none; }
  .nav-burger { display: flex; }

  .features { grid-template-columns: 1fr; }
  .dgii-banner { grid-template-columns: 1fr; padding: 40px 28px; gap: 36px; }
  .contact-wrap { grid-template-columns: 1fr; gap: 44px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 34px 20px; }
}

@media (max-width: 620px) {
  .products { grid-template-columns: 1fr; }
  .hw, .why { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 34px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .hero { padding-top: 130px; }
  .hero-badge { font-size: 10px; padding: 7px 14px; }
  .btn { padding: 13px 22px; font-size: 15px; }
  .contact-form { padding: 26px 20px; }
  .wa-big { width: 100%; justify-content: center; }
  .wa-float { bottom: 18px; right: 18px; width: 52px; height: 52px; }
}
