:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --text: #1c2030;
  --muted: #5b6275;
  --border: #e3e6ee;
  --accent: #4f46e5;
  --accent-soft: #eef0ff;
  --warn-soft: #fff6e5;
  --warn-border: #f3d38a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11131a;
    --surface: #1a1d27;
    --text: #e8eaf2;
    --muted: #9aa1b5;
    --border: #2b2f3d;
    --accent: #8b85ff;
    --accent-soft: #23244a;
    --warn-soft: #2e2716;
    --warn-border: #6b5520;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.bar {
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

.brand span { color: var(--accent); }

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  margin-left: 14px;
}

nav a:hover, nav a[aria-current="page"] { color: var(--accent); }

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 6px; }
h2 { font-size: 1.25rem; margin: 36px 0 10px; }
h3 { font-size: 1.05rem; margin: 22px 0 6px; }

.updated { color: var(--muted); font-size: 0.92rem; margin: 0 0 24px; }

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

ul, ol { padding-left: 1.3em; }
li { margin: 4px 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 18px 0;
}

.card.highlight { background: var(--accent-soft); border-color: transparent; }
.card.warn { background: var(--warn-soft); border-color: var(--warn-border); }

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
}

th { color: var(--muted); font-weight: 600; }

footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 24px 16px;
}

/* ---------- Página principal ---------- */

.home .bar { max-width: 1080px; }

.hero {
  background:
    radial-gradient(900px 400px at 85% -10%, var(--accent-soft), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}

.hero-inner,
.section-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 64px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.hero h1 span { color: var(--accent); }

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0 0 22px;
  max-width: 34em;
}

.hero-points { list-style: none; padding: 0; margin: 0; }

.hero-points li {
  position: relative;
  padding-left: 28px;
  margin: 8px 0;
}

.hero-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* Maqueta de teléfono */
.phone {
  justify-self: center;
  width: 280px;
  max-width: 100%;
  padding: 12px;
  border-radius: 38px;
  background: var(--text);
  box-shadow: 0 30px 60px -20px rgba(28, 32, 48, 0.35);
}

.phone-screen {
  border-radius: 28px;
  background: var(--bg);
  padding: 22px 16px;
  font-size: 0.85rem;
  line-height: 1.4;
}

.phone-screen p { margin: 0; }
.ph-greet { color: var(--muted); }
.ph-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 14px !important; }

.ph-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.ph-stat {
  background: var(--accent);
  color: #fff;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.ph-stat + .ph-stat { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.ph-num { font-size: 1.5rem; font-weight: 700; }
.ph-label { font-size: 0.75rem; opacity: 0.8; }

.ph-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  margin-top: 8px;
}

.ph-strong { font-weight: 600; }
.ph-muted { color: var(--muted); font-size: 0.78rem; }

.ph-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 999px;
  margin-bottom: 4px;
}

.ph-tag.clase { background: var(--accent-soft); color: var(--accent); }
.ph-tag.examen { background: var(--warn-soft); color: #9a6b00; border: 1px solid var(--warn-border); }

.ph-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  margin: 6px 0 4px;
  overflow: hidden;
}

.ph-bar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }

/* Secciones */
.section { padding: 64px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-title {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  line-height: 1.2;
  margin: 0 0 10px;
}

.section-lead { color: var(--muted); max-width: 40em; margin: 0 0 32px; }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
}

.feature h3 { margin: 12px 0 6px; font-size: 1.08rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.f-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.steps li { display: flex; gap: 14px; margin: 0; }
.steps h3 { margin: 4px 0 4px; }
.steps p { margin: 0; color: var(--muted); }

.step-n {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.trust {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
  background: var(--accent-soft);
  border-radius: 20px;
  padding: 32px;
}

.trust p { margin: 0; }
.trust-links { display: flex; flex-direction: column; gap: 10px; }

.btn {
  display: inline-block;
  text-align: center;
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }

@media (prefers-color-scheme: dark) {
  .phone { background: #000; border: 1px solid var(--border); }
  .ph-tag.examen { color: #f3d38a; }
  .btn { color: #11131a; }
  .ph-stat:first-child, .hero-points li::before, .step-n { color: #11131a; }
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; padding-top: 44px; padding-bottom: 48px; }
  .features { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .trust { grid-template-columns: 1fr; padding: 24px; }
}

@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  nav a { margin-left: 10px; font-size: 0.88rem; }
}
