/* ============================================================
   TriOrbits — sistema de diseño compartido
   Paleta orbital: cian → azul → púrpura sobre espacio profundo
   ============================================================ */

@font-face { font-family:'Space Grotesk'; font-weight:400; font-display:swap; src:url('/fonts/space-grotesk-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family:'Space Grotesk'; font-weight:500; font-display:swap; src:url('/fonts/space-grotesk-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family:'Space Grotesk'; font-weight:600; font-display:swap; src:url('/fonts/space-grotesk-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family:'Space Grotesk'; font-weight:700; font-display:swap; src:url('/fonts/space-grotesk-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-weight:400; font-display:swap; src:url('/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-weight:500; font-display:swap; src:url('/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-weight:600; font-display:swap; src:url('/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family:'Space Mono'; font-weight:400; font-display:swap; src:url('/fonts/space-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family:'Space Mono'; font-weight:700; font-display:swap; src:url('/fonts/space-mono-latin-700-normal.woff2') format('woff2'); }

:root {
  --bg:        #070b16;
  --bg-2:      #0a1020;
  --surface:   #0e1526;
  --surface-2: #121b30;
  --border:    #1b2540;
  --border-2:  #26324f;

  --text:      #eaf0fb;
  --muted:     #97a3be;
  --faint:     #5f6d8a;

  --cyan:   #22d3ee;
  --blue:   #3b82f6;
  --purple: #a855f7;
  --grad: linear-gradient(90deg, #22d3ee 0%, #3b82f6 50%, #a855f7 100%);
  --grad-soft: linear-gradient(135deg, rgba(34,211,238,.14), rgba(168,85,247,.14));

  --display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'Space Mono', ui-monospace, monospace;

  --maxw: 1120px;
  --radius: 16px;
  --shadow: 0 24px 60px -20px rgba(0,0,0,.7);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Fondo espacial sutil */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 78% -8%, rgba(168,85,247,.14), transparent 60%),
    radial-gradient(800px 480px at 12% 4%, rgba(34,211,238,.12), transparent 60%),
    radial-gradient(700px 700px at 50% 120%, rgba(59,130,246,.10), transparent 60%);
}

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

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Eyebrow / etiquetas ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px 2px rgba(34,211,238,.7);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display);
  font-weight: 600; font-size: 15px;
  padding: 13px 22px;
  border-radius: 11px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn-primary {
  color: #06111f;
  background: var(--grad);
  box-shadow: 0 8px 26px -8px rgba(59,130,246,.7);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -8px rgba(59,130,246,.85); }
.btn-ghost {
  color: var(--text);
  border-color: var(--border-2);
  background: rgba(255,255,255,.02);
}
.btn-ghost:hover { border-color: var(--cyan); transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* ---------- Navegación ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7,11,22,.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  height: 68px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { height: 30px; width: auto; }
.brand span {
  font-family: var(--display);
  font-weight: 700; font-size: 19px; letter-spacing: .5px;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-family: var(--display);
  font-weight: 500; font-size: 15px;
  color: var(--muted);
  padding: 9px 14px; border-radius: 9px;
  transition: color .16s ease, background .16s ease;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ""; display: block; height: 2px; margin-top: 5px; border-radius: 2px;
  background: var(--grad);
}
.nav-cta { margin-left: 10px; }
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: .2s; }

/* ---------- Hero ---------- */
.hero { position: relative; text-align: center; padding: 96px 0 84px; }
.orbit-stage { position: relative; display: inline-block; margin-bottom: 34px; }
.orbit-ring {
  position: absolute; top: 50%; left: 50%;
  border: 1px solid rgba(59,130,246,.28);
  border-radius: 50%;
  transform: translate(-50%,-50%);
  pointer-events: none;
}
.orbit-ring.r1 { width: 360px; height: 360px; animation: spin 26s linear infinite; }
.orbit-ring.r2 { width: 480px; height: 480px; border-color: rgba(168,85,247,.18); animation: spin 40s linear infinite reverse; }
.orbit-ring .node {
  position: absolute; top: -4px; left: 50%;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 14px 3px rgba(34,211,238,.8);
  transform: translateX(-50%);
}
.orbit-ring.r2 .node { background: var(--purple); box-shadow: 0 0 14px 3px rgba(168,85,247,.8); }
@keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg); } }
.hero-logo { width: 340px; max-width: 74vw; position: relative; z-index: 1; }

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.04;
  letter-spacing: -1px;
  margin: 6px 0 20px;
}
.hero h1 .grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead {
  color: var(--muted); font-size: 18px; max-width: 620px; margin: 0 auto 34px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Secciones ---------- */
.section { padding: 84px 0; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(26px, 4vw, 38px); letter-spacing: -.5px;
  margin: 14px 0 12px; line-height: 1.1;
}
.section-head p { color: var(--muted); font-size: 16.5px; }

/* ---------- Grid de cards ---------- */
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; padding: 1px; border-radius: var(--radius);
  background: var(--grad); opacity: 0;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  transition: opacity .25s ease; pointer-events: none;
}
.card:hover { transform: translateY(-4px); background: var(--surface-2); }
.card:hover::before { opacity: .9; }

.card-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 18px;
  background: var(--grad-soft); border: 1px solid var(--border-2);
  color: var(--cyan);
}
.card h3 { font-family: var(--display); font-weight: 600; font-size: 20px; margin-bottom: 9px; }
.card p { color: var(--muted); font-size: 15px; }

/* ---------- Tags de estado ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .5px; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px; margin-top: 16px;
  border: 1px solid var(--border-2);
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px 1px rgba(34,211,238,.8); }
.tag.soon { color: var(--cyan); }
.tag.dev { color: var(--faint); }
.tag.dev::before { background: var(--faint); box-shadow: none; }

/* ---------- App destacada (RevPro) ---------- */
.spotlight {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  padding: 44px; overflow: hidden; position: relative;
}
.spotlight .mono-label { font-family: var(--mono); color: var(--purple); font-size: 12.5px; letter-spacing: 2px; text-transform: uppercase; }
.spotlight h3 { font-family: var(--display); font-weight: 700; font-size: 30px; margin: 12px 0 14px; }
.spotlight p { color: var(--muted); margin-bottom: 12px; }
.spotlight .feat { list-style: none; margin: 18px 0 26px; }
.spotlight .feat li { position: relative; padding-left: 24px; color: var(--muted); margin-bottom: 9px; font-size: 15px; }
.spotlight .feat li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--grad);
}
.spotlight-art {
  aspect-ratio: 1; border-radius: 18px; position: relative;
  background: radial-gradient(circle at 50% 40%, rgba(59,130,246,.20), transparent 65%);
  display: grid; place-items: center; border: 1px solid var(--border);
}
.spotlight-art img { width: 62%; filter: drop-shadow(0 10px 30px rgba(59,130,246,.35)); }

/* ---------- Página legal / prosa ---------- */
.legal { padding: 60px 0 90px; }
.legal-head { text-align: center; margin-bottom: 46px; padding-bottom: 34px; border-bottom: 1px solid var(--border); }
.legal-head img { width: 210px; max-width: 60vw; margin: 0 auto 22px; }
.legal-head h1 { font-family: var(--display); font-weight: 700; font-size: clamp(28px,5vw,40px); letter-spacing: -.5px; }
.legal-head .sub { color: var(--faint); font-family: var(--mono); font-size: 13px; margin-top: 10px; }
.legal-body { max-width: 760px; margin: 0 auto; }
.legal-body section { margin-bottom: 32px; }
.legal-body h2 {
  font-family: var(--display); font-weight: 600; font-size: 19px; margin-bottom: 11px;
  display: flex; gap: 12px; align-items: baseline;
}
.legal-body h2 .n { font-family: var(--mono); color: var(--cyan); font-size: 14px; }
.legal-body p, .legal-body li { color: var(--muted); font-size: 15.5px; margin-bottom: 10px; }
.legal-body ul { list-style: none; padding-left: 4px; margin-bottom: 12px; }
.legal-body li { position: relative; padding-left: 22px; }
.legal-body li::before { content: ""; position: absolute; left: 0; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--grad); }
.legal-body strong { color: var(--text); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 56px 0 32px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer .brand { margin-bottom: 14px; }
.footer .tagline { color: var(--faint); font-size: 14px; max-width: 280px; }
.footer h4 { font-family: var(--mono); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--faint); margin-bottom: 16px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul a { color: var(--muted); font-size: 15px; transition: color .16s; }
.footer ul a:hover { color: var(--cyan); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--faint); font-size: 13.5px; }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--cyan); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid.cols-3 { grid-template-columns: 1fr; }
  .grid.cols-2 { grid-template-columns: 1fr; }
  .spotlight { grid-template-columns: 1fr; padding: 32px; }
  .spotlight-art { max-width: 320px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .orbit-ring.r1 { width: 300px; height: 300px; }
  .orbit-ring.r2 { width: 380px; height: 380px; }

  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(7,11,22,.98); border-bottom: 1px solid var(--border);
    padding: 10px 16px 18px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 10px; border-radius: 8px; }
  .nav-links a.active::after { display: none; }
  .nav-cta { margin: 8px 0 0; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}

/* Reveal al hacer scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
