:root {
  --green-900: #0f2a1d;
  --green-700: #1f4d36;
  --green-500: #2f7050;
  --gold: #c9a24b;
  --gold-light: #e8d29a;
  --bg: #f3f5f2;
  --surface: #ffffff;
  --text: #17201a;
  --muted: #5a675e;
  --outline: #d5dcd5;
  --ok: #2e7d4f;
  --ok-bg: #e1f2e7;
  --bad: #c0392b;
  --bad-bg: #fbe5e2;
  --radius: 20px;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

section[id] { scroll-margin-top: 70px; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

.container { width: min(100% - 40px, var(--max)); margin-inline: auto; }

.gold { color: var(--gold); }
.muted { color: var(--muted); }

/* ---------- Navegación ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(15, 42, 29, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav__links { display: flex; align-items: center; gap: 26px; }
.nav__links a { color: #dbe7df; text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav__links a:hover { color: #fff; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand b { color: var(--gold); letter-spacing: .08em; font-size: .85em; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--small { padding: 9px 20px; background: var(--gold); color: var(--green-900) !important; }
.btn--gold { background: var(--gold); color: var(--green-900); box-shadow: 0 10px 28px rgba(201, 162, 75, .35); }
.btn--gold:hover { background: var(--gold-light); }
.btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn--ghost:hover { background: rgba(255, 255, 255, .08); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-500) 100%);
  padding: 80px 0 110px;
  border-radius: 0 0 48px 48px;
}
.hero__rings {
  position: absolute;
  right: -180px;
  top: -140px;
  width: 760px;
  height: 760px;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 28%, rgba(255,255,255,.07) 28% 28.4%, transparent 28.4% 46%, rgba(255,255,255,.07) 46% 46.4%, transparent 46.4% 64%, rgba(255,255,255,.07) 64% 64.4%, transparent 64.4%);
  pointer-events: none;
}
.hero__rings::before, .hero__rings::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, .06);
}
.hero__rings::before { left: 50%; top: 0; width: 2px; height: 100%; }
.hero__rings::after { top: 50%; left: 0; height: 2px; width: 100%; }

.hero__inner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 48px; }

.eyebrow { margin: 0 0 14px; color: var(--gold-light); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; }
.eyebrow--dark { color: var(--green-500); }

h1 { margin: 0 0 20px; font-size: clamp(2.3rem, 5vw, 3.8rem); line-height: 1.08; letter-spacing: -.02em; }
h2 { margin: 0 0 14px; font-size: clamp(1.8rem, 3.4vw, 2.5rem); line-height: 1.15; letter-spacing: -.015em; }
h3 { margin: 0 0 8px; font-size: 1.2rem; }

.lead { font-size: 1.15rem; color: #d3e3d9; max-width: 36em; margin: 0 0 32px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }

.hero__stats { display: flex; gap: 12px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.hero__stats li {
  display: flex;
  flex-direction: column;
  min-width: 118px;
  padding: 14px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
}
.hero__stats strong { font-size: 1.6rem; color: var(--gold-light); line-height: 1.2; }
.hero__stats span { font-size: .85rem; color: #cfe0d5; }

/* ---------- Maqueta del móvil ---------- */
.hero__phone { display: flex; justify-content: center; }
.phone {
  position: relative;
  width: 300px;
  padding: 12px;
  border-radius: 44px;
  background: #0b1510;
  box-shadow: 0 40px 80px rgba(0, 0, 0, .45), inset 0 0 0 2px #26352b;
  transform: rotate(3deg);
}
.phone__notch { position: absolute; top: 20px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #000; z-index: 2; }
.screen { border-radius: 34px; overflow: hidden; background: var(--bg); color: var(--text); font-size: 12px; line-height: 1.4; }
.screen__bar {
  display: flex; align-items: center; gap: 10px;
  padding: 38px 16px 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--green-900), var(--green-500));
}
.screen__title { flex: 1; font-size: 16px; font-weight: 700; }
.screen__timer { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-weight: 700; font-size: 11px; }
.screen__progress { height: 6px; background: var(--green-700); }
.screen__progress i { display: block; height: 100%; background: var(--gold); border-radius: 0 6px 6px 0; }
.screen__body { padding: 14px 14px 18px; }
.pills { display: flex; gap: 8px; margin-bottom: 10px; }
.pills span { flex: 1; text-align: center; padding: 6px; border: 1px solid var(--outline); border-radius: 999px; background: #fff; font-weight: 700; font-size: 11px; }
.qcard { padding: 12px; border: 1px solid var(--outline); border-radius: 16px; background: #fff; margin-bottom: 10px; }
.qcard p { margin: 8px 0 0; font-weight: 700; font-size: 12.5px; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #f6e9c6; color: #4a3708; font-weight: 700; font-size: 10px; }
.answer {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; margin-bottom: 8px;
  border: 1px solid var(--outline); border-radius: 14px; background: #fff;
}
.answer b { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: #e9eee9; color: var(--muted); font-size: 11px; }
.answer i { margin-left: auto; font-style: normal; font-weight: 700; }
.answer--ok { border: 2px solid var(--ok); background: var(--ok-bg); }
.answer--ok b { background: var(--ok); color: #fff; }
.answer--ok i { color: var(--ok); }
.answer--wrong { border: 2px solid var(--bad); background: var(--bad-bg); }
.answer--wrong b { background: var(--bad); color: #fff; }
.answer--wrong i { color: var(--bad); }

/* ---------- Secciones ---------- */
.section { padding: 96px 0; }
.section--tint { background: #e9efe9; }
.section__head { max-width: 640px; margin: 0 auto 48px; text-align: center; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  padding: 32px 28px;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(15, 42, 29, .1); }
.card p { margin: 0; color: var(--muted); }

.icon { display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 20px; border-radius: 50%; }
.icon svg { width: 30px; height: 30px; }
.icon--study { background: #ddeee3; fill: #2f7050; }
.icon--exam { background: #f6e9c6; fill: #8a6a1e; }
.icon--review { background: #f9e0da; fill: #b5472f; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 32px; }
.feature { display: flex; gap: 16px; padding: 24px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--outline); }
.feature h3 { font-size: 1.05rem; margin-bottom: 4px; }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; }
.feature__dot { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--green-700); color: var(--gold-light); font-weight: 700; }

/* ---------- Progreso ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 32px; font-weight: 500; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); font-size: .8rem; font-weight: 700; }

.chart { padding: 24px; background: var(--surface); border: 1px solid var(--outline); border-radius: 24px; box-shadow: 0 24px 50px rgba(15, 42, 29, .08); }
.chart__top { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 24px; padding: 14px; border-radius: 18px; background: linear-gradient(135deg, var(--green-900), var(--green-500)); text-align: center; color: #cfe0d5; }
.chart__top strong { display: block; font-size: 1.5rem; color: var(--gold-light); line-height: 1.2; }
.chart__top span { font-size: .8rem; }
.chart__bars { position: relative; display: flex; align-items: flex-end; justify-content: space-around; height: 220px; padding-top: 24px; }
.chart__bars i { position: relative; width: 11%; border-radius: 10px 10px 4px 4px; background: var(--ok); transform-origin: bottom; }
.chart__bars i.bad { background: var(--bad); }
.chart__bars i b { position: absolute; top: -22px; left: 0; right: 0; text-align: center; font-style: normal; font-size: .85rem; color: var(--muted); }
.chart__line { position: absolute; left: 0; right: 0; bottom: calc((100% - 24px) * .8); border-top: 2px dashed var(--gold); z-index: 1; }
.chart__line span { position: absolute; right: 0; top: -22px; font-size: .75rem; font-weight: 700; color: #8a6a1e; }

/* ---------- Llamada a la acción ---------- */
.cta { padding: 0 0 96px; }
.cta__inner {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 64px 32px;
  border-radius: 36px;
  color: #fff;
  background: linear-gradient(135deg, var(--green-900), var(--green-500));
}
.cta__inner img { margin-bottom: 16px; }
.cta__inner p { margin: 0 0 28px; color: #d3e3d9; max-width: 32em; }

/* ---------- Pie ---------- */
.footer { background: var(--green-900); color: #cfe0d5; padding: 40px 0; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: center; }
.footer__brand p { margin: 8px 0 0; font-size: .9rem; }
.footer__links { display: flex; flex-direction: column; gap: 6px; text-align: right; }
.footer__links a { text-decoration: none; }
.footer__links a:hover { color: var(--gold-light); }

/* ---------- Animación de entrada ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .cards .reveal:nth-child(2), .js .features .reveal:nth-child(2) { transition-delay: .1s; }
.js .cards .reveal:nth-child(3), .js .features .reveal:nth-child(3) { transition-delay: .2s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover { transform: none; }
}

/* ---------- Adaptación a pantallas pequeñas ---------- */
@media (max-width: 960px) {
  .hero__inner, .split { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 80px; border-radius: 0 0 32px 32px; }
  .hero__phone { order: 2; }
  .phone { transform: none; }
  .cards, .features { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .split { gap: 40px; }
}

@media (max-width: 620px) {
  .nav__links a:not(.btn) { display: none; }
  .footer__links { text-align: left; }
  .hero__stats { flex-wrap: nowrap; }
  .hero__stats li { flex: 1; min-width: 0; padding: 12px 10px; }
  .hero__stats strong { font-size: 1.25rem; }
}
