:root {
  --rojo: #d52b1e;      /* rojo bandera de Canadá */
  --tinta: #16202c;
  --gris: #5b6b7a;
  --suave: #f4f7fa;
  --borde: #dce4ec;
  --ok: #1f9d55;
  --warn: #d39e00;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--tinta); line-height: 1.55; }
a { color: inherit; text-decoration: none; }

/* Hero */
.hero { background: linear-gradient(135deg, #b71c12, var(--rojo)); color: #fff; padding-bottom: 60px; }
nav { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; max-width: 1080px; margin: 0 auto; }
.logo { font-weight: 700; font-size: 20px; }
.hero-inner { max-width: 720px; margin: 40px auto 0; padding: 0 24px; text-align: center; }
.hero h1 { font-size: 44px; line-height: 1.1; margin-bottom: 16px; }
.lead { font-size: 19px; opacity: .95; margin-bottom: 28px; }
.trust { margin-top: 16px; font-size: 14px; opacity: .9; }

/* Botones */
.btn { display: inline-block; background: #fff; color: var(--rojo); font-weight: 700; padding: 14px 26px; border-radius: 10px; border: none; cursor: pointer; font-size: 16px; transition: transform .08s; }
.btn:hover { transform: translateY(-2px); }
.btn-big { font-size: 18px; padding: 16px 34px; }
.btn-small { padding: 9px 16px; font-size: 14px; }
.full { width: 100%; margin-top: 8px; }

/* Pasos */
.steps { max-width: 1000px; margin: -36px auto 0; padding: 0 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { background: #fff; border: 1px solid var(--borde); border-radius: 14px; padding: 24px; box-shadow: 0 8px 24px rgba(20,32,44,.06); }
.step span { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--rojo); color: #fff; font-weight: 700; margin-bottom: 10px; }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--gris); font-size: 15px; }

/* Formulario */
.apply { max-width: 720px; margin: 64px auto; padding: 0 24px; }
.form-card { background: #fff; border: 1px solid var(--borde); border-radius: 16px; padding: 32px; }
.form-card h2 { font-size: 28px; }
.muted { color: var(--gris); }
form { margin-top: 18px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: block; font-weight: 600; font-size: 14px; margin-top: 14px; }
input, select { width: 100%; margin-top: 6px; padding: 11px 12px; border: 1px solid var(--borde); border-radius: 9px; font-size: 15px; font-weight: 400; }
fieldset { margin-top: 20px; border: 1px solid var(--borde); border-radius: 12px; padding: 16px; }
legend { font-weight: 700; padding: 0 8px; }
.chk { font-weight: 400; display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.chk input { width: auto; margin: 0; }
.fineprint { font-size: 12.5px; color: var(--gris); margin-top: 14px; }

/* Examen de inglés */
.engtest { margin-top: 18px; border: 1px solid var(--borde); border-radius: 12px; padding: 16px; }
.engtest-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.engtest-head .btn { background: var(--rojo); color: #fff; flex-shrink: 0; }
.engtest-head p { font-size: 13px; margin-top: 2px; }
.q { padding: 12px 0; border-bottom: 1px solid var(--borde); }
.q-text { font-weight: 600; margin-bottom: 8px; }
.opt { font-weight: 400; display: flex; align-items: center; gap: 9px; margin-top: 6px; cursor: pointer; }
.opt input { width: auto; margin: 0; }
#gradeTest { margin-top: 14px; background: var(--rojo); color: #fff; }
.engresult { margin-top: 6px; padding: 14px; border-radius: 10px; font-size: 14px; }
.engresult.ok { background: #e9f8ef; border: 1px solid var(--ok); }
.engresult.no { background: #fef7e7; border: 1px solid var(--warn); }
.engresult p { margin-top: 4px; }

/* Vista previa en vivo */
.preview { margin-top: 22px; padding: 16px; background: var(--suave); border-radius: 12px; }
.preview-bar { height: 12px; background: #e3e9ef; border-radius: 99px; overflow: hidden; }
#previewFill { height: 100%; width: 0; background: var(--warn); transition: width .3s, background .3s; }
#previewText { margin-top: 10px; font-size: 14px; font-weight: 600; }

/* Resultado */
.result { margin-top: 24px; padding: 28px; border-radius: 16px; text-align: center; }
.result.ok { background: #e9f8ef; border: 1px solid var(--ok); }
.result.no { background: #fef7e7; border: 1px solid var(--warn); }
.result h2 { margin-bottom: 8px; }
.result .ref { font-family: monospace; background: #fff; padding: 4px 10px; border-radius: 6px; }

.hidden { display: none; }

footer { background: var(--tinta); color: #cdd7e0; padding: 30px 24px; text-align: center; }
footer p { max-width: 760px; margin: 6px auto; font-size: 14px; }
footer .muted { color: #8da0b3; font-size: 12.5px; }

@media (max-width: 640px) {
  .hero h1 { font-size: 32px; }
  .steps { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
}
