/* ============================================================
   GEO-FIBER · Cosmic Design System
   Deep-space, glassmorphism, un acento de glow. Anti-slop.
   Diales: variance 6 · motion 4 · density 5
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Fondo deep-space (nunca #000) */
  --bg-void: #060814;
  --bg-deep: #0B0F1F;
  --bg-elevated: #111729;

  /* Texto alto contraste (nunca #fff) */
  --text-hi: #E8ECF7;
  --text-mid: #A6AEC4;
  --text-low: #5C6685;

  /* Un acento de glow: azul-violeta cósmico */
  --accent: #6E8BFF;
  --accent-soft: #8FA3FF;
  --accent-glow: rgba(110, 139, 255, 0.25);

  /* Estados (uso funcional, no decorativo) */
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;

  /* Hairlines glassmórficos */
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-hi: rgba(255, 255, 255, 0.14);

  --radius: 20px;
  --radius-sm: 12px;
  --maxw: 1120px;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

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

/* --------- fondo cósmico (halo + grilla sutil) --------- */
/* Foto de fondo (misma imagen del proyecto) con velo deep-space encima */
.photo-bg {
  position: fixed; inset: 0; z-index: -3;
  background:
    linear-gradient(rgba(6, 8, 20, 0.82), rgba(6, 8, 20, 0.93)),
    url('/assets/img/fondo_login.png');
  background-size: cover; background-position: center;
}
.cosmic-bg { position: fixed; inset: 0; z-index: -2; overflow: hidden; background: transparent; }
.cosmic-bg::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 50% 0%, var(--accent-glow) 0%, transparent 60%),
    radial-gradient(40% 40% at 85% 90%, rgba(143, 163, 255, 0.10) 0%, transparent 70%);
  filter: blur(20px);
}
.cosmic-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 80%);
          mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 80%);
  opacity: 0.5;
}

/* --------- tipografía --------- */
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text-hi); line-height: 1.05; letter-spacing: -0.02em; font-weight: 600; }
.display { font-size: clamp(2.4rem, 6vw, 4.5rem); font-weight: 700; }
.h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.eyebrow { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-low); }
.lead { font-size: clamp(1rem, 2vw, 1.18rem); color: var(--text-mid); max-width: 60ch; }
.muted { color: var(--text-low); }
.gradient-text { background: linear-gradient(135deg, var(--text-hi), var(--accent-soft)); -webkit-background-clip: text; background-clip: text; color: transparent; }
a { color: inherit; text-decoration: none; }

/* --------- layout --------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(64px, 10vw, 120px) 0; }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; gap: 16px; align-items: center; }
.between { justify-content: space-between; }
.wrap-center { display: flex; align-items: center; justify-content: center; min-height: 100dvh; padding: 24px; }

/* --------- glass card --------- */
.glass {
  background: rgba(17, 23, 41, 0.55);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 0 var(--hairline-hi), 0 24px 60px -20px rgba(0, 0, 0, 0.7);
}
@supports not (backdrop-filter: blur(1px)) { .glass { background: var(--bg-elevated); } }
.card-pad { padding: clamp(24px, 4vw, 40px); }

/* --------- nav --------- */
.nav { height: 72px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 600; color: var(--text-hi); font-size: 1.05rem; }
.brand img { height: 34px; width: auto; }
/* Logo más prominente en el login */
.login-aside .brand { gap: 14px; font-size: 1.25rem; }
.login-aside .brand img { height: 60px; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--text-mid); font-size: 0.92rem; transition: color .2s; }
.nav-links a:hover { color: var(--text-hi); }

/* --------- botones --------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; padding: 13px 24px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s, border-color .2s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--bg-void); box-shadow: 0 0 40px -8px var(--accent); }
.btn-primary:hover { background: var(--accent-soft); box-shadow: 0 0 52px -6px var(--accent); }
.btn-ghost { background: transparent; color: var(--text-hi); border-color: var(--hairline-hi); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text-hi); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 28px; font-size: 1rem; }

/* --------- forms --------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.label { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-low); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .ic { position: absolute; left: 14px; color: var(--text-low); font-size: 1.05rem; display: flex; }
.input {
  width: 100%; background: rgba(6, 8, 20, 0.6); border: 1px solid var(--hairline-hi);
  border-radius: var(--radius-sm); padding: 14px 16px; color: var(--text-hi); font-family: var(--font-body); font-size: 0.98rem;
  transition: border-color .2s, box-shadow .2s; outline: none;
}
.input.has-icon { padding-left: 44px; }
.input::placeholder { color: var(--text-low); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.input.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.18); }
.input-btn { position: absolute; right: 12px; background: none; border: none; color: var(--text-low); cursor: pointer; font-size: 1.05rem; display: flex; }
.input-btn:hover { color: var(--accent); }
.hint { font-size: 0.8rem; color: var(--text-low); }
.error-msg { font-size: 0.88rem; color: var(--danger); display: none; align-items: center; gap: 8px; }
.error-msg.show { display: flex; }

/* --------- badges / pills --------- */
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--hairline); font-size: 0.78rem; color: var(--text-mid); background: rgba(255,255,255,0.03); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.dot.ok { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.dot.warn { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.dot.danger { background: var(--danger); box-shadow: 0 0 10px var(--danger); }

/* --------- bento / grids --------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.feature { display: flex; flex-direction: column; gap: 14px; }
.feature .fic { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--accent-glow); color: var(--accent-soft); font-size: 1.4rem; border: 1px solid var(--hairline); }
.feature h3 { font-size: 1.15rem; }
.feature p { font-size: 0.95rem; color: var(--text-mid); }

/* --------- stats --------- */
.stat .num { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); color: var(--text-hi); font-weight: 700; }
.stat .lbl { font-size: 0.85rem; color: var(--text-low); }

/* --------- footer --------- */
.footer { border-top: 1px solid var(--hairline); padding: 32px 0; color: var(--text-low); font-size: 0.85rem; }

/* --------- animaciones (motivadas, reduced-motion safe) --------- */
@keyframes reveal { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.reveal { animation: reveal .6s cubic-bezier(.2,.7,.2,1) both; }
.reveal-1 { animation-delay: .06s; } .reveal-2 { animation-delay: .14s; } .reveal-3 { animation-delay: .22s; } .reveal-4 { animation-delay: .3s; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(6,8,20,.35); border-top-color: var(--bg-void); border-radius: 50%; animation: spin .7s linear infinite; }

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

/* --------- utilidades --------- */
.hidden { display: none !important; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; } .mt-12 { margin-top: 48px; }
.w-full { width: 100%; }
.text-accent { color: var(--accent-soft); }

/* --------- responsive --------- */
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .row.responsive { flex-direction: column; align-items: stretch; }
  .login-shell { grid-template-columns: 1fr !important; max-width: 440px !important; }
  .login-aside { border-right: none !important; border-bottom: 1px solid var(--hairline); }
  .split { grid-template-columns: 1fr; }
}
