/* ==========================================================================
   TLC · Página de inicio
   Hoja de estilos ligera, sin dependencias.
   ========================================================================== */

:root {
  --navy-900: #071a33;
  --navy-800: #0b2545;
  --navy-700: #13315c;
  --navy-500: #1f4e8c;
  --cyan: #38bdf8;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #e3262f;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 24px 60px -20px rgba(7, 26, 51, .55);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--navy-900);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

img, svg, video { display: block; max-width: 100%; }

a { color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Hero ------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-media img,
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 40% center;
}

.hero-media img { animation: kenburns 24s ease-in-out infinite alternate; transform-origin: 35% 60%; }

@keyframes kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.12) translateX(-2%); }
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(7, 26, 51, .94) 0%, rgba(7, 26, 51, .82) 38%, rgba(7, 26, 51, .45) 70%, rgba(7, 26, 51, .7) 100%),
    linear-gradient(0deg, rgba(7, 26, 51, .9) 0%, rgba(7, 26, 51, 0) 35%);
}

/* malla sutil tipo "mapa de patio" */
.hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(56, 189, 248, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, .07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, #000 0%, transparent 60%);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 60%);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(16px, 5vw, 64px);
}

.topbar img { height: 40px; width: auto; }

.topbar a {
  font-size: .9rem;
  text-decoration: none;
  opacity: .85;
  border-bottom: 1px solid transparent;
}
.topbar a:hover { opacity: 1; border-color: currentColor; }

.hero-body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 420px);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
  padding: 24px clamp(16px, 5vw, 64px) 56px;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: rgba(56, 189, 248, .14);
  border: 1px solid rgba(56, 189, 248, .35);
  color: #bae6fd;
}

.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .7);
  animation: ping 1.8s infinite;
}

@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, .7); }
  70%  { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  font-weight: 800;
}

.hero h1 span {
  background: linear-gradient(90deg, #7dd3fc, #38bdf8 40%, #a5f3fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 0 0 28px;
  max-width: 560px;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: #cbd5e1;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 12px;
  font-size: .9rem;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.chips svg { width: 18px; height: 18px; flex: none; color: var(--cyan); }

/* ---------- Tarjeta de acceso ------------------------------------------ */

.login-card {
  background: rgba(255, 255, 255, .97);
  color: var(--ink);
  border-radius: 22px;
  padding: 36px 32px 28px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--red);
}

.login-card .logo { width: 260px; height: auto; margin: 4px auto 10px; }

.login-card h2 {
  margin: 12px 0 4px;
  font-size: 1.25rem;
  text-align: center;
}

.login-card .sub {
  margin: 0 0 24px;
  text-align: center;
  font-size: .9rem;
  color: var(--muted);
}

.field { position: relative; margin-bottom: 16px; }

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: .85rem;
  font-weight: 600;
  color: #334155;
}

.field svg {
  position: absolute;
  left: 14px;
  bottom: 13px;
  width: 18px;
  height: 18px;
  color: #94a3b8;
  pointer-events: none;
}

.field input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #f8fafc;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.field input:focus {
  outline: none;
  background: var(--white);
  border-color: var(--navy-500);
  box-shadow: 0 0 0 4px rgba(31, 78, 140, .15);
}

.field.has-error input { border-color: var(--red); }

.toggle-pass {
  position: absolute;
  right: 6px;
  bottom: 5px;
  padding: 8px;
  border: 0;
  background: none;
  color: #64748b;
  cursor: pointer;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 600;
}
.toggle-pass:hover { color: var(--navy-800); }

.row-between {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 20px;
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: .875rem;
  color: var(--navy-500);
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }

.btn-primary {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--white);
  background: linear-gradient(135deg, var(--navy-700), var(--navy-500));
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(19, 49, 92, .8);
  transition: transform .15s, box-shadow .15s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(19, 49, 92, .9); }
.btn-primary:active { transform: translateY(0); }
.btn-primary svg { width: 18px; height: 18px; }

.login-foot {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: .78rem;
  color: var(--muted);
  text-align: center;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .6);
  text-decoration: none;
  font-size: .8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.scroll-hint svg { width: 18px; height: 18px; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }

/* ---------- Módulos ---------------------------------------------------- */

.features {
  background: linear-gradient(180deg, var(--navy-900) 0%, #0c2340 100%);
  color: var(--white);
  padding: 80px clamp(16px, 5vw, 64px) 72px;
}

.features-inner { max-width: 1240px; margin: 0 auto; }

.section-head { max-width: 680px; margin: 0 0 40px; }
.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  letter-spacing: -.01em;
}
.section-head p { margin: 0; color: #94a3b8; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(56, 189, 248, .45); }

.card-media {
  aspect-ratio: 16 / 9;
  background: #0a1f3a;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.card-media svg { width: 100%; height: 100%; }

.card-body { padding: 22px 22px 26px; }

.card-tag {
  display: inline-block;
  margin-bottom: 8px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cyan);
}

.card h3 { margin: 0 0 8px; font-size: 1.2rem; }
.card p { margin: 0 0 14px; color: #cbd5e1; font-size: .95rem; }

.card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  font-size: .88rem;
  color: #94a3b8;
}
.card li::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--cyan);
  vertical-align: middle;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 40px;
  padding: 24px;
  border-radius: var(--radius);
  background: rgba(56, 189, 248, .06);
  border: 1px solid rgba(56, 189, 248, .18);
}
.stat strong { display: block; font-size: 1.6rem; color: var(--white); }
.stat span { font-size: .85rem; color: #94a3b8; }

.site-foot {
  background: #061528;
  color: #64748b;
  font-size: .82rem;
  text-align: center;
  padding: 22px 16px;
}

/* ---------- Diálogo de recuperación ------------------------------------ */

.dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 18px;
  box-shadow: var(--shadow);
  color: var(--ink);
}
.dialog::backdrop { background: rgba(7, 26, 51, .6); backdrop-filter: blur(3px); }
.dialog form { padding: 26px 26px 22px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dialog h2 { margin: 0; font-size: 1.15rem; }
.dialog p { margin: 0 0 18px; font-size: .9rem; color: var(--muted); }
.dialog .field input { padding-left: 14px; }
.dialog-close {
  border: 0; background: none; font-size: 1.6rem; line-height: 1;
  color: #94a3b8; cursor: pointer; padding: 4px 8px; border-radius: 8px;
}
.dialog-close:hover { color: var(--ink); }

/* ---------- Responsivo ------------------------------------------------- */

@media (max-width: 1020px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .cards .card:last-child { grid-column: 1 / -1; }
  .cards .card:last-child .card-media { aspect-ratio: 21 / 9; }
}

@media (max-width: 860px) {
  .hero-body { grid-template-columns: 1fr; padding-top: 8px; }
  .hero-copy { order: 2; }
  .login-card { order: 1; max-width: 440px; width: 100%; margin: 0 auto; }
  .hero-media::after { background: linear-gradient(180deg, rgba(7, 26, 51, .7) 0%, rgba(7, 26, 51, .92) 60%); }
  .scroll-hint { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .cards .card:last-child .card-media { aspect-ratio: 16 / 9; }
  .login-card { padding: 28px 20px 22px; }
  .login-card .logo { width: 220px; }
  .topbar img { height: 30px; }
}

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

@media (max-width: 480px) {
  .stat strong { font-size: 1.15rem; }
  .stats { padding: 18px; }
}
