/* ---------------------------------------------------------------------------
   landing.css - Estilos de la ZONA PUBLICA (landing y login).
   Proyecto UBIKUA - Soluciones para Ciudades y Destinos Inteligentes.
   Bloque 1A. CSS propio, sin frameworks.
   --------------------------------------------------------------------------- */

:root {
  --ubi-blue:      #2563eb;
  --ubi-blue-dark: #0f172a;
  --ubi-ink:       #1e293b;
  --ubi-muted:     #64748b;
  --ubi-line:      #e2e8f0;
  --ubi-bg:        #f8fafc;
}

* { box-sizing: border-box; }

body.pub {
  margin: 0;
  /* Bloque 1A: pila nativa del sistema, sin tipografias de terceros.
     En Windows se resuelve a Segoe UI. */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ubi-ink);
  background: var(--ubi-bg);
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- cabecera */
.pub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 30px;
  background: #fff;
  border-bottom: 1px solid var(--ubi-line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.pub-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.pub-brand img { height: 40px; width: auto; display: block; border-radius: 6px; }
.pub-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.pub-brand-text b { font-size: 18px; font-weight: 800; letter-spacing: .5px; color: var(--ubi-blue-dark); }
.pub-brand-text small { font-size: 11px; color: var(--ubi-muted); }

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

/* ------------------------------------------------------------------ botones */
.pub-btn {
  display: inline-block;
  padding: 9px 20px;
  border-radius: 8px;
  background: var(--ubi-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--ubi-blue);
  transition: background .15s ease, transform .15s ease;
}
.pub-btn:hover { background: #1d4ed8; border-color: #1d4ed8; }
.pub-btn-lg { padding: 15px 52px; font-size: 17px; border-radius: 10px; }
.pub-btn-ghost {
  background: transparent;
  color: var(--ubi-blue);
}
.pub-btn-ghost:hover { background: #eff6ff; }

/* -------------------------------------------------------------------- hero */
.pub-main { max-width: 1120px; margin: 0 auto; padding: 0 30px 60px; }

.hero { text-align: center; padding: 74px 0 46px; }
.hero-eyebrow {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ubi-blue);
}
.hero h1 {
  margin: 0 auto 20px;
  max-width: 880px;
  font-size: 42px;
  line-height: 1.18;
  font-weight: 800;
  color: var(--ubi-blue-dark);
  letter-spacing: -.6px;
}
.hero h1 .dot { color: var(--ubi-blue); }
.hero-sub {
  margin: 0 auto;
  max-width: 700px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ubi-muted);
}

/* ------------------------------------------------------------------- tarjetas */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 26px;
  margin-top: 18px;
}
.card {
  background: #fff;
  border: 1px solid var(--ubi-line);
  border-radius: 16px;
  padding: 30px 30px 26px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
  transition: box-shadow .18s ease, transform .18s ease;
}
.card:hover { box-shadow: 0 14px 34px rgba(15, 23, 42, .10); transform: translateY(-2px); }
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #eff6ff;
  color: var(--ubi-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card-icon svg { width: 26px; height: 26px; }
.card h2 {
  margin: 0 0 10px;
  font-size: 21px;
  font-weight: 800;
  color: var(--ubi-blue-dark);
}
.card-lead { margin: 0 0 16px; font-size: 14.5px; line-height: 1.6; color: var(--ubi-muted); }
.card-list { margin: 0; padding: 0; list-style: none; }
.card-list li {
  position: relative;
  padding: 6px 0 6px 24px;
  font-size: 14px;
  line-height: 1.45;
  border-top: 1px solid #f1f5f9;
}
.card-list li:first-child { border-top: 0; }
.card-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 13px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ubi-blue);
}

/* ---------------------------------------------------------------------- CTA */
.cta { text-align: center; margin-top: 52px; }
.cta-note { margin: 14px 0 0; font-size: 12.5px; color: var(--ubi-muted); }

/* -------------------------------------------------------------------- login */
.login-wrap {
  min-height: calc(100vh - 220px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 20px;
}
.login-card {
  width: 100%;
  max-width: 390px;
  background: #fff;
  border: 1px solid var(--ubi-line);
  border-radius: 14px;
  padding: 34px 32px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, .10);
}
.login-card h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 800;
  color: var(--ubi-blue-dark);
  text-align: center;
}
.login-card .login-sub {
  margin: 0 0 8px;
  font-size: 12.5px;
  color: var(--ubi-muted);
  text-align: center;
}
.login-card label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin: 16px 0 5px;
}
.login-card input[type=text],
.login-card input[type=password] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ubi-ink);
}
.login-card input:focus {
  outline: none;
  border-color: var(--ubi-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
.login-card button[type=submit] {
  width: 100%;
  margin-top: 22px;
  padding: 11px;
  border: 0;
  border-radius: 8px;
  background: var(--ubi-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.login-card button[type=submit]:hover { background: #1d4ed8; }

.login-msg {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
}
.login-msg.error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.login-msg.info  { background: #f8fafc; border: 1px solid var(--ubi-line); color: var(--ubi-muted); }
.login-back {
  display: block;
  margin-top: 22px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ubi-muted);
  text-decoration: none;
}
.login-back:hover { color: var(--ubi-blue); text-decoration: underline; }

/* -------------------------------------------------------------------- pie */
.pub-footer {
  border-top: 1px solid var(--ubi-line);
  background: #fff;
  padding: 22px 30px;
  font-size: 12.5px;
  color: var(--ubi-muted);
}
.pub-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}
.pub-footer a { color: var(--ubi-blue); text-decoration: none; }
.pub-footer a:hover { text-decoration: underline; }

@media (max-width: 620px) {
  .hero h1 { font-size: 30px; }
  .pub-header { padding: 12px 16px; }
  .pub-main { padding: 0 16px 40px; }
  .pub-brand-text small { display: none; }
}
