/* ============================================================
   Landing — Sistema de reportes en terreno para parking (Magna)
   Mismo lenguaje visual que presentacion/presentacion.html (template
   "Diagonal" reskineado a azul): esquinas casi rectas, sin sombras en
   tarjetas, paneles diagonales con captura real de pantalla, tokens de
   tema claro/oscuro. Adaptado a página de scroll normal (sin
   scroll-snap ni láminas de 100vh).
   ============================================================ */
:root {
  --ink: #171717;
  --paper: #e4e1d5;
  --surface: #ffffff;
  --accent: #2f6fed;
  --accent-soft: #dbe6fd;
  --line: rgba(23, 23, 23, 0.14);
  --muted: #565f6b;

  --hero-bg: #0b0d10;
  --hero-surface: #15181d;
  --hero-ink: #f4efe2;
  --hero-muted: #ded8c8;
  --hero-line: rgba(244, 239, 226, 0.18);
  --hero-accent: #5b9dff;
  --hero-accent-soft: #a8c8ff;

  --radius: 4px;
}
:root[data-theme="dark"] {
  --ink: #eae6d9;
  --paper: #12151a;
  --surface: #1b1f26;
  --accent: #5b9dff;
  --accent-soft: #223049;
  --line: rgba(234, 230, 217, 0.16);
  --muted: #9aa3af;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eae6d9;
    --paper: #12151a;
    --surface: #1b1f26;
    --accent: #5b9dff;
    --accent-soft: #223049;
    --line: rgba(234, 230, 217, 0.16);
    --muted: #9aa3af;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  transition: background .25s ease, color .25s ease;
}
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }
ul { margin: 0; }

.section {
  padding: 5.5rem 1.5rem;
}
.section.tight { padding: 4rem 1.5rem; }
.frame {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}
.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.dark-hero .eyebrow { color: var(--hero-accent); }
h2.section-title {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
}
.section-title .tarrow { color: var(--accent); }
.dark-hero .section-title .tarrow { color: var(--hero-accent); }
.lede {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 62ch;
  line-height: 1.55;
}
.dark-hero .lede { color: var(--hero-muted); }

/* ---------- nav ---------- */
.nav {
  /* Fondo siempre oscuro (independiente del toggle claro/oscuro): el
     logo (resources/logo_magna.svg) trae el wordmark en blanco, pensado
     para fondo oscuro, así que el nav no sigue los tokens de tema. */
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  background: var(--hero-bg);
  border-bottom: 1px solid var(--hero-line);
}
.nav-inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}
.nav-brand img { display: block; }
.nav-brand span {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--hero-muted);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav-links a {
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--hero-muted);
}
.nav-links a:hover { color: var(--hero-accent); }
.nav-links .btn, .nav-links a.btn:hover { background: var(--hero-accent); color: var(--hero-bg); }
.nav .theme-toggle {
  border-color: var(--hero-line);
  background: var(--hero-surface);
  color: var(--hero-ink);
}
@media (max-width: 760px) { .nav-links a:not(.btn) { display: none; } }

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 0.92rem;
}
.dark-hero .btn { background: var(--hero-accent); color: var(--hero-bg); }

/* ---------- tema ---------- */
.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
}

/* ---------- hero ---------- */
.hero {
  background: var(--hero-bg);
  color: var(--hero-ink);
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 6.5rem 1.5rem;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 46%; height: 100%;
  background: var(--hero-accent);
  opacity: 0.10;
  clip-path: polygon(100% 0, 100% 100%, 38% 100%);
  pointer-events: none;
}
.hero .frame { position: relative; z-index: 1; }
.hero-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0 auto 1.75rem;
}
.hero-logos-sep { color: var(--hero-muted); font-size: 1.1rem; opacity: 0.6; }
.hero-kicker {
  font-size: 0.9rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--hero-accent); font-weight: 700; margin-bottom: 1.25rem;
}
.hero-title {
  font-size: clamp(2.3rem, 5.5vw, 4rem);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.08;
  margin-bottom: 1.25rem;
}
.hero-sub {
  font-size: 1.2rem; color: var(--hero-muted);
  max-width: 56ch; margin: 0 auto 2rem;
}
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-ghost {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  border: 1px solid var(--hero-line);
  color: var(--hero-ink);
  font-weight: 700;
  text-decoration: none;
}

/* ---------- panel diagonal texto + captura ---------- */
.diag {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) 1.05fr;
  align-items: stretch;
  min-height: 380px;
}
.diag .diag-text {
  position: relative;
  background: var(--accent);
  color: #fff;
  padding: 3rem;
  display: flex; flex-direction: column; justify-content: center;
  margin-right: -60px;
  z-index: 2;
  border-radius: var(--radius);
}
.diag .diag-text::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 100%;
  width: 60px;
  background: inherit;
  clip-path: polygon(0 0, 100% 0, 34% 100%, 0 100%);
}
.diag .diag-text .eyebrow { color: rgba(255, 255, 255, 0.75); }
.diag .diag-text .lede { color: rgba(255, 255, 255, 0.92); }
.diag .diag-shot {
  display: flex; align-items: center;
  padding-left: 130px;
}
.diag .diag-shot .win, .diag .diag-shot .browser-frame { width: 100%; }
.dark-hero .diag .diag-text { background: var(--hero-accent); color: var(--hero-bg); }
.dark-hero .diag .diag-text .eyebrow { color: var(--hero-bg); opacity: 0.65; }
.dark-hero .diag .diag-text .lede { color: var(--hero-bg); opacity: 0.85; }
.diag.reverse { grid-template-columns: 1.05fr minmax(280px, 0.95fr); }
.diag.reverse .diag-text { order: 2; margin-right: 0; margin-left: -60px; }
.diag.reverse .diag-text::after { left: auto; right: 100%; transform: scaleX(-1); }
.diag.reverse .diag-shot { order: 1; padding-left: 0; padding-right: 130px; }
@media (max-width: 900px) {
  .diag, .diag.reverse { grid-template-columns: 1fr; min-height: 0; }
  .diag .diag-text, .diag.reverse .diag-text {
    margin: 0; padding: 2.25rem 1.75rem; order: 1;
  }
  .diag .diag-text::after { display: none; }
  .diag .diag-shot, .diag.reverse .diag-shot {
    padding: 0; margin-top: 1.5rem; order: 2;
  }
}

/* ---------- marco de celular ---------- */
.phone {
  width: 230px;
  margin: 0 auto;
  border: 10px solid var(--ink);
  border-radius: 36px;
  overflow: hidden;
  background: var(--ink);
}
.phone img { display: block; width: 100%; }

/* ---------- marco de captura ---------- */
.win {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}
.win-chrome {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.6rem 0.8rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.win-chrome span { width: 9px; height: 9px; border-radius: 999px; background: var(--line); }
.win-url {
  margin-left: 0.6rem;
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.15rem 0.8rem;
}
.browser-frame {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--hero-surface);
  border: 1px solid var(--hero-line);
}
.browser-frame .win-chrome { background: var(--hero-bg); border-color: var(--hero-line); }
.browser-frame .win-chrome span { background: var(--hero-line); }
.browser-frame .win-url { background: var(--hero-surface); color: var(--hero-muted); }

/* ---------- galería de capturas ---------- */
.shot-grid { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: center; margin-top: 2rem; }
.shot-grid figure { margin: 0; width: 260px; flex: 1 1 260px; max-width: 300px; }
.shot-grid figcaption { margin-top: 0.6rem; font-size: 0.9rem; color: var(--muted); text-align: center; }

/* ---------- pasos "cómo funciona" ---------- */
.steps {
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.75rem;
  margin-top: 2.5rem;
}
.steps::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--line); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; text-align: left; padding-top: 1.75rem; }
.step::before {
  content: '';
  position: absolute; top: 0; left: 0;
  border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-top: 8px solid var(--accent);
}
.step h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.step p { color: var(--muted); font-size: 0.95rem; line-height: 1.45; }

/* ---------- grilla de funciones / cells ---------- */
.cell-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-top: 2.5rem; }
.cell-grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .cell-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cell-grid { grid-template-columns: 1fr; } }
.cell {
  border: 1px solid var(--line); border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem; background: var(--surface); text-align: left;
}
.cell .icon { font-size: 1.5rem; margin-bottom: 0.6rem; }
.cell h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.cell p { font-size: 0.9rem; color: var(--muted); line-height: 1.4; }

/* ---------- beneficios ---------- */
.benefit-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 2.5rem; text-align: left; margin-top: 2.5rem; }
@media (max-width: 700px) { .benefit-list { grid-template-columns: 1fr; } }
.benefit { display: flex; gap: 0.9rem; align-items: flex-start; }
.benefit .mark {
  flex: none;
  width: 28px; height: 28px; border-radius: 4px;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 800;
}
.benefit h3 { font-size: 1rem; margin-bottom: 0.2rem; }
.benefit p { font-size: 0.9rem; color: var(--muted); }

/* ---------- casos de uso ---------- */
.usecase-grid { display: grid; grid-template-columns: repeat(3, 1fr); text-align: left; margin-top: 2.5rem; }
@media (max-width: 800px) { .usecase-grid { grid-template-columns: 1fr; } }
.usecase { padding: 0 1.75rem; border-left: 1px solid var(--line); }
.usecase:first-child { border-left: none; padding-left: 0; }
@media (max-width: 800px) {
  .usecase { border-left: none; border-top: 1px solid var(--line); padding: 1.5rem 0 0; }
  .usecase:first-child { border-top: none; padding-top: 0; }
}
.usecase h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.usecase p { font-size: 0.92rem; color: var(--muted); line-height: 1.5; margin-bottom: 0.75rem; }
.usecase ul { padding-left: 1.1rem; color: var(--muted); font-size: 0.88rem; line-height: 1.6; }

/* ---------- en resumen (tickets) ---------- */
.ticket-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; text-align: left; margin-top: 2.5rem; }
@media (max-width: 900px) { .ticket-grid { grid-template-columns: 1fr; max-width: 420px; margin: 2.5rem auto 0; } }
.ticket {
  border: 1px solid var(--line); border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface); padding: 2rem 1.75rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.ticket.featured { border-color: var(--accent); background: var(--accent-soft); }
.ticket .plan { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); font-weight: 700; }
.ticket .price { font-size: 1.35rem; font-weight: 800; }
.ticket ul { padding-left: 1.1rem; color: var(--muted); font-size: 0.9rem; line-height: 1.7; flex: 1; }

/* ---------- contacto ---------- */
.contact-grid { display: flex; flex-wrap: wrap; gap: 2.5rem; justify-content: center; margin-top: 2rem; }
.contact-item { text-align: center; }
.contact-item .label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--hero-accent); margin-bottom: 0.35rem; }
.contact-item .value { font-size: 1.1rem; font-weight: 700; }
.contact-ctas { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 2rem; }

/* ---------- footer ---------- */
.footer {
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* ---------- lightbox ---------- */
#lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 10, 12, 0.9);
  display: none; align-items: center; justify-content: center;
  padding: 2rem;
}
#lightbox.open { display: flex; }
#lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 10px; }
#lightbox .close-btn {
  position: absolute; top: 1.5rem; right: 1.5rem;
  width: 42px; height: 42px; border-radius: 999px;
  background: rgba(255,255,255,0.1); color: #fff; border: none;
  font-size: 1.3rem; cursor: pointer;
}
