/* ============================================================
   Polaris Data Systems — Landing Oficial (www.polarisdatasystems.com)
   Estética astral limpia (Polar Noche / Polar Día), mobile-first, 0 frameworks.
   ============================================================ */

:root,
html[data-tema="noche"] {
  --bg: #040914;
  --bg-2: #0a1426;
  --surface: rgba(11, 22, 42, 0.78);
  --surface-solid: #0b162a;
  --text: #f0f9ff;
  --muted: #94b3d0;
  --accent: #38bdf8;
  --accent-strong: #0284c7;
  --accent-soft: #bae6fd;
  --accent-glow: rgba(56, 189, 248, 0.16);
  --gold: #f59e0b;
  --border: rgba(125, 211, 252, 0.2);
  --border-soft: rgba(125, 211, 252, 0.1);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

html[data-tema="dia"] {
  --bg: #f4f7fb;
  --bg-2: #e8eff7;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --text: #091324;
  --muted: #475569;
  --accent: #0284c7;
  --accent-strong: #0369a1;
  --accent-soft: #0369a1;
  --accent-glow: rgba(2, 132, 199, 0.12);
  --gold: #b45309;
  --border: rgba(15, 23, 42, 0.14);
  --border-soft: rgba(15, 23, 42, 0.08);
  --shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

header, main, footer { position: relative; z-index: 1; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--text);
}
.brand-orb {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: radial-gradient(circle at 38% 36%, #02060e 52%, var(--accent-glow) 100%);
  box-shadow: 0 0 18px var(--accent-glow), inset 0 0 8px var(--accent-glow);
}
.brand-text { display: flex; flex-direction: column; line-height: 1; gap: 3px; }
.brand-text strong { font-size: 0.96rem; letter-spacing: 0.24em; font-weight: 800; }
.brand-text small { font-size: 0.56rem; letter-spacing: 0.34em; color: var(--accent-soft); font-weight: 700; }

.nav-links {
  display: none;
  align-items: center;
  gap: 24px;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 160ms ease;
}
.nav-links a:hover { color: var(--text); }
@media (min-width: 820px) { .nav-links { display: flex; } }

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 150ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-lg { padding: 13px 22px; font-size: 0.95rem; border-radius: 14px; }
.btn-bloque { width: 100%; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #fff;
  box-shadow: 0 8px 24px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 12px 30px rgba(56, 189, 248, 0.28); }
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); }
.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  display: grid;
  place-items: center;
}

/* Hero */
.hero {
  padding: 64px 20px 44px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
@media (min-width: 820px) { .hero { padding: 88px 20px 56px; } }
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-soft);
  margin-bottom: 22px;
}
.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.hero h1 {
  margin: 0;
  max-width: 840px;
  font-size: clamp(2rem, 4.8vw, 3.35rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 800;
}
.hero-lead {
  margin: 20px 0 0;
  max-width: 680px;
  font-size: clamp(0.98rem, 1.8vw, 1.12rem);
  color: var(--muted);
}
.hero-ctas {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* Quick company access */
.quick-access {
  margin-top: 34px;
  width: 100%;
  max-width: 560px;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  text-align: left;
}
.qa-label { display: block; font-size: 0.82rem; font-weight: 700; color: var(--accent-soft); margin-bottom: 8px; }
.qa-row { display: flex; gap: 8px; }
.qa-row input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
}
.qa-row input:focus { outline: none; border-color: var(--accent); }
.qa-hint { margin: 8px 0 0; font-size: 0.76rem; color: var(--muted); }

/* Metrics strip */
.metrics-strip {
  margin: 34px 0 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 760px) { .metrics-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.metrics-strip > div {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  text-align: left;
}
.metrics-strip dt { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 700; }
.metrics-strip dd { margin: 4px 0 0; font-size: 0.95rem; font-weight: 700; color: var(--text); }

/* Sections */
.section { padding: 52px 20px; }
.sec-head { max-width: 680px; margin-bottom: 28px; }
.sec-kicker {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 8px;
}
.sec-head h2, .arch-copy h2, .cta-banner h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3.2vw, 2.15rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
}
.sec-head p { margin: 10px 0 0; color: var(--muted); }

/* Module Cards */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 720px) { .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card {
  padding: 24px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 180ms ease, transform 180ms ease;
}
.card:hover { border-color: var(--border); transform: translateY(-2px); }
.card-ico {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--accent-glow);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
}
.card h3 { margin: 4px 0 0; font-size: 1.12rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.9rem; flex: 1; }
.card-tags {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.card-tags li {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent-soft);
}

/* Architecture section */
.arch-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding: 28px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
@media (min-width: 860px) {
  .arch-panel { grid-template-columns: 1.25fr 0.95fr; padding: 36px; align-items: center; }
}
.arch-copy p { color: var(--muted); margin: 12px 0 0; }
.arch-list { margin: 16px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; color: var(--muted); font-size: 0.9rem; }
.arch-list strong { color: var(--text); }
.arch-list code, .step-box code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bg-2);
  font-size: 0.84em;
  color: var(--accent-soft);
}

.arch-diagram { display: flex; flex-direction: column; gap: 10px; }
.step-box {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 16px;
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
}
.step-box.accent { border-color: var(--accent); background: var(--accent-glow); }
.step-num {
  flex: 0 0 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: #04101f;
  font-weight: 800;
  font-size: 0.82rem;
  display: grid;
  place-items: center;
}
.step-box strong { display: block; font-size: 0.94rem; }
.step-box p { margin: 3px 0 0; font-size: 0.82rem; color: var(--muted); }
.step-arrow { text-align: center; color: var(--accent); font-weight: 800; }

/* Downloads */
.dl-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 760px) { .dl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dl-card {
  padding: 22px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dl-badge {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-glow);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-soft);
}
.dl-card h3 { margin: 2px 0 0; font-size: 1.06rem; }
.dl-card p { margin: 0; font-size: 0.86rem; color: var(--muted); flex: 1; }

/* CTA Banner */
.cta-banner {
  padding: 32px 26px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--surface-solid), color-mix(in srgb, var(--accent-strong) 18%, var(--surface-solid)));
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: space-between;
}
@media (min-width: 820px) { .cta-banner { flex-direction: row; align-items: center; padding: 38px 36px; } }
.cta-banner p { margin: 8px 0 0; color: var(--muted); max-width: 560px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Footer */
.footer {
  margin-top: 28px;
  border-top: 1px solid var(--border-soft);
  padding: 28px 0 40px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: space-between;
}
@media (min-width: 720px) { .footer-inner { flex-direction: row; align-items: center; } }
.footer-brand strong { display: block; font-size: 0.84rem; letter-spacing: 0.2em; }
.footer-brand span { font-size: 0.8rem; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { font-size: 0.84rem; color: var(--muted); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--accent); }
