/* =========================================================================
   DataSucumbíos — Sistema de diseño unificado (sitio integrado, sin embebidos)
   Tema oscuro premium. Se usa en el layout base y todas las páginas propias.
   ========================================================================= */

:root {
  --bg: #0d1117;
  --bg-2: #0b0f14;
  --panel: #161b22;
  --panel-2: #1c2129;
  --elev: #21262d;
  --border: #30363d;
  --border-soft: #262c35;
  --brand: #f44242;
  --brand-2: #ff6b35;
  --accent: #58a6ff;
  --green: #2ea043;
  --text: #e6edf3;
  --muted: #8b949e;
  --muted-2: #6e7681;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 9px;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.38);
  --shadow-sm: 0 6px 16px rgba(0, 0, 0, 0.28);
  --ring: 0 0 0 3px rgba(88, 166, 255, 0.18);
  --nav-h: 64px;
  --maxw: 1200px;
  --font: "Ubuntu", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Fondo ambiental (aurora + rejilla de puntos) */
.aurora-bg {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1200px 520px at 100% -10%, rgba(244, 66, 66, 0.13), transparent 60%),
    radial-gradient(1000px 460px at -8% 0%, rgba(88, 166, 255, 0.12), transparent 55%),
    var(--bg);
}
.dot-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #484f58; }

a { color: inherit; text-decoration: none; }

/* ---------------------------------------------------------------- utilidades */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.text-gradient {
  background: linear-gradient(135deg, #fff 0%, var(--brand) 55%, var(--brand-2) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); background: rgba(88, 166, 255, 0.09);
  border: 1px solid rgba(88, 166, 255, 0.25); border-radius: 999px; padding: 6px 14px;
}
.section { padding: 72px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; letter-spacing: -.02em; }
.section-head p { color: var(--muted); margin-top: 12px; font-size: 1.02rem; }

/* skip link accesibilidad */
.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 200;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { left: 12px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------------------------------------------------------------- botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 22px; border-radius: 12px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
  transition: transform .12s ease, filter .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 8px 20px rgba(244, 66, 66, 0.3); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: var(--panel); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); background: var(--panel-2); }
.btn-lg { padding: 15px 28px; font-size: 1.02rem; border-radius: 14px; }

/* ---------------------------------------------------------------- nav global */
.site-nav {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  background: rgba(13, 17, 23, 0.72);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-nav .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.08rem; }
.brand img { height: 30px; width: auto; }
.brand .brand-mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 5px 14px rgba(244, 66, 66, 0.35);
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: var(--muted); font-weight: 500; font-size: .92rem; padding: 9px 14px; border-radius: 10px;
  transition: color .15s ease, background .15s ease;
}
.nav-links a:hover { color: var(--text); background: var(--panel); }
.nav-links a.active { color: var(--text); background: var(--panel); box-shadow: inset 0 -2px 0 var(--brand); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: var(--panel); border: 1px solid var(--border); color: var(--text); width: 42px; height: 42px; border-radius: 10px; cursor: pointer; font-size: 1.1rem; }

@media (max-width: 900px) {
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--panel); border-bottom: 1px solid var(--border); padding: 12px;
    transform: translateY(-130%); transition: transform .25s ease; box-shadow: var(--shadow);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 13px 14px; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-cta .btn { display: none; }
}

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); margin-top: 40px; }
.site-footer .container { padding-top: 40px; padding-bottom: 32px; display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: flex-start; }
.site-footer .foot-brand { max-width: 340px; }
.site-footer .foot-brand p { color: var(--muted); font-size: .9rem; margin-top: 10px; }
.site-footer .foot-cols { display: flex; gap: 48px; flex-wrap: wrap; }
.site-footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); margin-bottom: 12px; }
.site-footer a { display: block; color: var(--muted); font-size: .9rem; padding: 4px 0; }
.site-footer a:hover { color: var(--text); }
.foot-bottom { border-top: 1px solid var(--border); }
.foot-bottom .container { padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--muted-2); font-size: .82rem; }
.foot-bottom img { height: 22px; opacity: .8; vertical-align: middle; }

/* ---------------------------------------------------------------- tarjetas */
.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 22px;
  transition: transform .16s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(244, 66, 66, 0.45); box-shadow: var(--shadow); }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* módulo card */
.module-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px; }
.module-card .m-icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 6px 16px rgba(244, 66, 66, 0.3);
}
.module-card h3 { font-size: 1.15rem; font-weight: 700; }
.module-card p { color: var(--muted); font-size: .92rem; flex: 1; }
.module-card .m-link { color: var(--accent); font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: 7px; }
.module-card:hover .m-link { gap: 11px; }

/* KPI */
.kpi { text-align: center; }
.kpi .kpi-value { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; }
.kpi .kpi-value.c-brand { color: var(--brand); }
.kpi .kpi-value.c-accent { color: var(--accent); }
.kpi .kpi-value.c-green { color: var(--green); }
.kpi .kpi-label { color: var(--muted); font-size: .85rem; margin-top: 6px; text-transform: uppercase; letter-spacing: .04em; }

/* skeleton */
.skeleton { display: block; border-radius: var(--radius-sm); background: linear-gradient(100deg, var(--panel) 30%, var(--elev) 50%, var(--panel) 70%); background-size: 200% 100%; animation: sh 1.3s ease-in-out infinite; }
@keyframes sh { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* animación de entrada */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------------------------------------------------------------- embed mode
   Cuando la página se muestra DENTRO de un iframe (p. ej. Wix), se oculta el
   chrome del sitio para que el embed siga viéndose limpio. En el dominio propio
   (nivel superior) se muestra el sitio completo. */
.embedded .site-nav,
.embedded .site-footer,
.embedded .hide-in-embed { display: none !important; }
.embedded .page-main { padding-top: 0 !important; }

/* Perfiles integrados dentro del layout */
.perfil-page { padding: 28px 0 8px; }
