/* ============================================================
   Horizun Hub — Design System
   Dark, technical, vanguardista. Marca Horizun (navy/azul/teal).
   ============================================================ */

:root {
  /* Superficies oscuras */
  --bg:        #070b12;
  --bg-2:      #0b111c;
  --surface:   #0e1622;
  --surface-2: #131e2e;
  --line:      #1d2a3d;
  --line-2:    #26384f;

  /* Tinta / texto */
  --ink:       #eef3f9;
  --ink-2:     #c2cedd;
  --muted:     #8595a8;
  --faint:     #5c6a7e;

  /* Acentos de marca */
  --navy:      #16243f;
  --blue:      #1d67a7;
  --blue-2:    #2f86d4;
  --teal:      #16b6c0;
  --teal-2:    #0a7b83;
  --cyan:      #3fe0e8;
  --violet:    #7b6cf6;

  /* Estados */
  --ok:        #2fbf71;
  --warn:      #e0a526;
  --error:     #e0584f;

  /* Glow / gradientes */
  --grad-brand: linear-gradient(120deg, var(--blue-2) 0%, var(--teal) 100%);
  --grad-soft:  linear-gradient(135deg, rgba(47,134,212,.16), rgba(22,182,192,.10));
  --glow-teal:  0 0 0 1px rgba(22,182,192,.30), 0 8px 40px -12px rgba(22,182,192,.45);

  --radius:    14px;
  --radius-sm: 9px;
  --radius-lg: 22px;

  --serif: "Source Sans 3", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --sans:  "Source Sans 3", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --maxw: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Fondo tecnológico: rejilla + halos */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(900px 500px at 78% -8%, rgba(22,182,192,.14), transparent 60%),
    radial-gradient(800px 520px at 8% 4%, rgba(47,134,212,.16), transparent 55%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 35%, transparent 90%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { width: min(var(--maxw), 92vw); margin-inline: auto; }

/* ---------- Tipografía utilitaria ---------- */
.overline {
  font-family: var(--mono);
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--teal);
}
h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0; font-weight: 700; }
.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7,11,18,.72);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; gap: 28px;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand img { height: 26px; width: auto; }
.brand .by {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em;
  color: var(--faint); text-transform: uppercase; border-left: 1px solid var(--line-2);
  padding-left: 12px;
}
.nav-links { display: flex; gap: 26px; }
.nav-links a {
  font-size: 14px; color: var(--ink-2); font-weight: 500;
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--cyan); }
.nav-cta {
  font-size: 13.5px; font-weight: 600; padding: 9px 18px; border-radius: 999px;
  background: var(--grad-brand); color: #06222a;
  transition: filter .15s ease, transform .08s ease;
}
.nav-cta:hover { filter: brightness(1.08); }
.nav-cta:active { transform: translateY(1px); }
.nav-ghost {
  font-size: 13.5px; font-weight: 600; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--ink);
}
.nav-ghost:hover { border-color: var(--teal); color: var(--cyan); }
.nav-toggle { display: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: 92px 0 64px; text-align: center; }
.badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 15px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(22,182,192,.06);
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--ink-2);
  margin-bottom: 26px;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(22,182,192,.18); }
.hero h1 { font-size: clamp(34px, 6vw, 66px); margin-bottom: 22px; }
.hero p.lead {
  max-width: 680px; margin: 0 auto 34px;
  font-size: clamp(16px, 2.2vw, 20px); color: var(--ink-2);
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 600; padding: 13px 26px; border-radius: 999px;
  cursor: pointer; border: 0; transition: filter .15s ease, transform .08s ease, border-color .15s ease;
}
.btn-primary { background: var(--grad-brand); color: #06222a; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--teal); color: var(--cyan); }
.btn:active { transform: translateY(1px); }

/* Stats */
.stats { display: flex; gap: 48px; justify-content: center; flex-wrap: wrap; margin-top: 56px; }
.stat { text-align: center; }
.stat .n { font-size: 30px; font-weight: 700; color: var(--ink); }
.stat .l { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ============================================================
   SECCIÓN / MÓDULOS
   ============================================================ */
.section { padding: 74px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(26px, 4vw, 40px); margin: 14px 0; }
.section-head p { color: var(--muted); font-size: 17px; }

.modules {
  display: grid; gap: 18px;
  grid-template-columns: repeat(3, 1fr);
}
.module {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,255,255,.018), transparent 40%),
    var(--surface);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.module::after {
  content: ""; position: absolute; inset: -1px;
  border-radius: inherit; padding: 1px;
  background: var(--grad-brand);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .2s ease;
}
.module:hover { transform: translateY(-4px); border-color: transparent; box-shadow: 0 18px 50px -22px rgba(22,182,192,.5); }
.module:hover::after { opacity: 1; }
.module .ico {
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 11px; margin-bottom: 18px;
  background: var(--grad-soft); border: 1px solid var(--line-2);
  color: var(--cyan);
}
.module .ico svg { width: 24px; height: 24px; }
.module h3 { font-size: 19px; margin-bottom: 8px; }
.module p { color: var(--muted); font-size: 14.5px; margin: 0 0 18px; flex: 1; }
.module .tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.module .tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em;
  padding: 4px 9px; border-radius: 6px;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}
.module .go {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 600; color: var(--cyan);
}
.module .go svg { width: 15px; height: 15px; transition: transform .15s ease; }
.module:hover .go svg { transform: translateX(4px); }
.module.soon { opacity: .72; }
.module .pill {
  position: absolute; top: 18px; right: 18px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; color: var(--warn);
  border: 1px solid rgba(224,165,38,.35); background: rgba(224,165,38,.08);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 36px; margin-top: 40px;
}
.footer-grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer .brand img { height: 24px; }
.footer p { color: var(--muted); font-size: 14px; max-width: 320px; }
.footer .cols { display: flex; gap: 60px; flex-wrap: wrap; }
.footer .col h4 { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin: 0 0 14px; }
.footer .col a { display: block; color: var(--ink-2); font-size: 14px; margin-bottom: 9px; }
.footer .col a:hover { color: var(--cyan); }
.footer-bottom {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: .04em;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 920px) {
  .modules { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  .modules { grid-template-columns: 1fr; }
  .stats { gap: 28px; }
  .hero { padding: 64px 0 40px; }
}

/* Animación de entrada */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.in { animation: rise .6s cubic-bezier(.2,.7,.2,1) forwards; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .reveal.in { animation: none; }
}
