/* style.css -- VigilanTV. Paleta de Smart Systems (naranja #F15A24 sobre grafito), claro y oscuro.
   Los tokens viven en :root. Tres bloques: claro por defecto; oscuro si el sistema lo pide y
   el usuario no eligio claro; oscuro si el usuario lo eligio a mano (data-theme="dark"). */

:root {
  --bg: #ffffff;
  --bg-soft: #f3f4f6;
  --surface: #ffffff;
  --border: #e5e7eb;
  --text: #1f2937;
  --text-dim: #4b5563;
  --accent: #F15A24;         /* decorativo: logo, marcos, chispas. No lleva texto encima */
  --accent-text: #b43a10;    /* enlaces y acentos de texto sobre fondo claro */
  --btn-bg: #b43a10;
  --btn-text: #ffffff;
  --focus: #b43a10;
  --shadow: 0 1px 2px rgba(15, 20, 28, 0.05), 0 8px 24px rgba(15, 20, 28, 0.07);
  --radius: 14px;
  --radius-pill: 999px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141c;
    --bg-soft: #171e29;
    --surface: #171e29;
    --border: #2a3441;
    --text: #e5e7eb;
    --text-dim: #aab2bf;
    --accent-text: #ff9a6e;
    --btn-bg: #ff8a5c;
    --btn-text: #111827;
    --focus: #ff9a6e;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f141c;
  --bg-soft: #171e29;
  --surface: #171e29;
  --border: #2a3441;
  --text: #e5e7eb;
  --text-dim: #aab2bf;
  --accent-text: #ff9a6e;
  --btn-bg: #ff8a5c;
  --btn-text: #111827;
  --focus: #ff9a6e;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

a { color: var(--accent-text); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- barra superior ---------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;   /* área táctil mínima en móvil, igual que los botones */
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}

.brand img { width: 32px; height: 32px; display: block; }
.brand .tv { color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover { border-color: var(--accent-text); }

.btn-solid {
  background: var(--btn-bg);
  color: var(--btn-text);
  border-color: var(--btn-bg);
  font-weight: 600;
}

.btn-solid:hover { filter: brightness(0.95); }

/* ---------- portada ---------- */

.hero {
  max-width: 760px;
  margin: 3rem auto 2rem;
  padding: 0 16px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.8rem, 5.2vw, 2.6rem);
  line-height: 1.2;
  margin: 0 0 0.9rem;
  color: var(--text);
}

.hero p.lead {
  color: var(--text-dim);
  font-size: 1.1rem;
  margin: 0 auto;
  max-width: 62ch;
}

.hero .actions { margin-top: 1.8rem; }

/* ---------- bloques ---------- */

.content {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 16px 2rem;
}

.section-title {
  font-size: 1.35rem;
  margin: 2.2rem 0 1rem;
  color: var(--text);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.3rem;
}

.card h3 { margin: 0 0 0.5rem; color: var(--text); font-size: 1.1rem; }
.card p { margin: 0; color: var(--text-dim); }

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.9rem;
}

.steps li {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0.9rem;
  align-items: start;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.step-num {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #111827;   /* sobre naranja: grafito, contraste de sobra en ambos temas */
  font-weight: 700;
}

.steps h3 { margin: 0.15rem 0 0.3rem; font-size: 1.05rem; color: var(--text); }
.steps p { margin: 0; color: var(--text-dim); }

.note {
  color: var(--text-dim);
  font-size: 0.95rem;
  text-align: center;
  margin: 2rem auto 0;
  max-width: 62ch;
}

/* ---------- foot ---------- */

.foot {
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  text-align: center;
  font-size: 0.9rem;
  padding: 1.6rem 16px 2rem;
}

.foot p { margin: 0.25rem 0; }

/* ---------- aviso del botón Atrás ---------- */

.back-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: 90vw;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  background: #1f2937;
  color: #ffffff;
  font-size: 14px;
  text-align: center;
  z-index: 9999;
  display: none;
}

/* ---------- 404 ---------- */

.page-404 {
  max-width: 560px;
  margin: 4rem auto;
  padding: 0 16px;
  text-align: center;
}

.page-404 h1 { font-size: 2rem; margin-bottom: 0.6rem; }
.page-404 p { color: var(--text-dim); }

/* ---------- movil ---------- */

@media (max-width: 480px) {
  .nav { padding-top: 0.7rem; padding-bottom: 0.7rem; }
  .hero { margin-top: 2rem; }
  .nav .btn { width: auto; }
}
