/* ==========================================================
   Aula Docente — portada, ingreso y cambio de PIN (v0.20.0)
   La hoja de respuestas (óvalos A–D) es el motivo visual,
   tomado del óvalo dorado del logo DFGM.
   Derechos de Autor DFGM 2026
   ========================================================== */

@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 500 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-700-normal.woff2") format("woff2"); font-weight: 700 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --night: #0F2240;
  --ink: #13294B;
  --ink-2: #2A4572;
  --mist: #AFC0DA;
  --gold: #E0A526;
  --gold-soft: #F6D688;
  --paper: #F3F5F8;
  --white: #FFFFFF;
  --line: #DCE2EA;
  --text: #1A2438;
  --muted: #56627A;
  --green: #2B7149;
  --green-50: #E6F2EA;
  --red: #B3261E;
  --red-50: #FBEAE8;
  --display: "Bricolage Grotesque", "Inter", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --focus: 0 0 0 3px rgba(224, 165, 38, 0.6);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body.pub { margin: 0; font-family: var(--body); font-size: 1rem; line-height: 1.6; color: var(--text); background: var(--paper); }
.pub img { max-width: 100%; display: block; }
.pub a { color: inherit; }
.pub :focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.pub h1, .pub h2, .pub h3 { font-family: var(--display); line-height: 1.12; margin: 0; letter-spacing: -0.015em; }
.wrap { width: min(1160px, 100% - 32px); margin: 0 auto; }

.pub-bubbles { position: absolute; inset: 0; width: 100%; height: 100%; color: rgba(175, 192, 218, 0.06); pointer-events: none; }

.pub-env {
  display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600;
  background: #FDF4DF; color: #7A5000; margin-bottom: 18px;
}
.pub-env--dark { background: rgba(224, 165, 38, 0.16); color: var(--gold-soft); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px;
  border-radius: 999px; font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid transparent;
  cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
.btn--gold { background: var(--gold); color: var(--night); }
.btn--gold:hover { background: var(--gold-soft); }
.btn--line { border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.btn--line:hover { border-color: #fff; }
.btn--ink { background: var(--ink); color: #fff; width: 100%; }
.btn--ink:hover { background: var(--ink-2); }

/* ---------- Barra superior ---------- */
.top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px max(16px, calc((100% - 1160px) / 2));
  color: #fff;
}
.top__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.top__brand img { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 12px; padding: 3px; }
.top__brand span { font-family: var(--display); font-weight: 800; font-size: 1.15rem; line-height: 1.1; }
.top__brand small { display: block; font-family: var(--body); font-weight: 400; font-size: 0.8rem; color: var(--mist); }
.top__nav { display: flex; align-items: center; gap: 24px; }
.top__nav a { text-decoration: none; font-weight: 600; font-size: 0.95rem; color: #E3EAF5; }
.top__nav a:hover { color: #fff; }
.top__nav .top__cta { padding: 8px 18px; border-radius: 999px; background: #fff; color: var(--night); }
.top__nav .top__cta:hover { background: var(--gold-soft); color: var(--night); }

/* ---------- Portada: héroe ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 600px at 85% 10%, #1D3A66 0%, rgba(29, 58, 102, 0) 60%), var(--night); color: #fff; }
.hero__inner {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; align-items: center;
  width: min(1160px, 100% - 32px); margin: 0 auto; padding: 132px 0 88px; min-height: min(100vh, 900px);
}
.hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); font-weight: 800; letter-spacing: -0.025em; max-width: 19ch; }
.hero__lead { margin: 22px 0 0; max-width: 54ch; font-size: 1.125rem; color: #D4DEEE; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 32px; margin: 44px 0 0; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.hero__facts div { min-width: 120px; }
.hero__facts dt { font-family: var(--display); font-weight: 800; font-size: 2rem; line-height: 1; color: var(--gold); }
.hero__facts dd { margin: 6px 0 0; font-size: 0.875rem; color: var(--mist); max-width: 18ch; }

/* ---------- La hoja de respuestas ---------- */
.sheet {
  margin: 0; background: var(--white); color: var(--text); border-radius: 20px; padding: 28px;
  box-shadow: 0 30px 60px -20px rgba(3, 10, 25, 0.55);
}
.sheet__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.sheet__head > span:first-child { font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.sheet__tag { font-size: 0.8rem; font-weight: 600; color: var(--ink-2); background: #EEF2F8; padding: 3px 10px; border-radius: 999px; }
.sheet__stem { margin: 0 0 18px; font-size: 1rem; line-height: 1.55; }
.sheet__options { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sheet__option {
  width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center; text-align: left;
  padding: 10px 14px 10px 10px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff;
  font: inherit; font-size: 0.95rem; line-height: 1.4; color: var(--text); cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.sheet__option:hover { border-color: var(--ink-2); }
.sheet__bubble {
  width: 40px; height: 28px; border-radius: 50%; border: 2px solid var(--ink-2);
  display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; color: var(--ink-2);
  transition: background-color .25s, color .25s, border-color .25s;
}
.is-answered .sheet__option { cursor: default; }
.is-answered .sheet__option:not(.is-correct):not(.is-picked) { opacity: 0.6; }
.sheet__option.is-picked .sheet__bubble { background: var(--gold); border-color: var(--gold); color: var(--night); }
.sheet__option.is-correct { border-color: var(--green); background: var(--green-50); }
.sheet__option.is-correct .sheet__bubble { background: var(--green); border-color: var(--green); color: #fff; }
.sheet__option.is-picked.is-wrong { border-color: var(--red); background: var(--red-50); }
.sheet__feedback { margin: 6px 4px 4px 62px; font-size: 0.875rem; line-height: 1.5; color: var(--muted); }
.sheet__hint { margin: 16px 0 0; font-size: 0.875rem; color: var(--muted); }
.sheet__hint.is-ok { color: var(--green); font-weight: 600; }
.sheet__hint.is-ko { color: var(--red); font-weight: 600; }
.sheet__source { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
.sheet__source a { display: inline-block; margin-top: 6px; font-weight: 700; color: var(--ink); }

/* ---------- Pasos ---------- */
.steps { padding: 96px 0; background: var(--paper); }
.steps h2, .roles h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); color: var(--ink); }
.steps__list { list-style: none; counter-reset: step; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.steps__list li { counter-increment: step; position: relative; padding-top: 64px; }
.steps__list li::before {
  content: counter(step); position: absolute; top: 0; left: 0; width: 52px; height: 36px; border-radius: 50%;
  border: 2px solid var(--ink); display: grid; place-items: center; font-family: var(--display); font-weight: 800; color: var(--ink);
}
.steps__list li:last-child::before { background: var(--gold); border-color: var(--gold); }
.steps__list h3 { font-size: 1.25rem; color: var(--ink); }
.steps__list p { margin: 10px 0 0; color: var(--muted); max-width: 40ch; }

/* ---------- Cargos ---------- */
.roles { padding: 96px 0; background: var(--white); }
.roles .wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.roles__intro p { margin: 16px 0 0; color: var(--muted); max-width: 46ch; }
.roles__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.roles__list li { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.roles__list h3 { font-size: 1.15rem; color: var(--ink); }
.roles__list p { margin: 4px 0 0; font-size: 0.95rem; color: var(--muted); }
.roles__list strong { flex: none; text-align: right; font-family: var(--display); font-weight: 800; font-size: 1.5rem; color: var(--ink); line-height: 1.1; }
.roles__list strong small { display: block; font-family: var(--body); font-weight: 400; font-size: 0.8rem; color: var(--muted); }

/* ---------- Cierre y pie ---------- */
.closing { background: var(--ink); color: #fff; padding: 64px 0; }
.closing__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.closing h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.foot { background: var(--night); color: var(--mist); padding: 28px 0; font-size: 0.85rem; }
.foot__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; }
.foot p { margin: 0; }

/* ---------- Ingreso y cambio de PIN ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth__panel {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: 40px clamp(24px, 5vw, 72px); color: #fff;
  background: radial-gradient(900px 500px at 10% 100%, #1D3A66 0%, rgba(29, 58, 102, 0) 60%), var(--night);
}
.auth__brand { position: relative; display: flex; align-items: center; gap: 14px; text-decoration: none; }
.auth__brand img { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 14px; padding: 4px; }
.auth__brand span { font-family: var(--display); font-weight: 800; font-size: 1.3rem; line-height: 1.1; }
.auth__brand small { display: block; font-family: var(--body); font-weight: 400; font-size: 0.85rem; color: var(--mist); }
.auth__pitch { position: relative; max-width: 560px; }
.auth__pitch h2 { font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 800; letter-spacing: -0.02em; }
.auth__pitch p { margin: 18px 0 0; color: #D4DEEE; font-size: 1.05rem; max-width: 42ch; }
.auth__foot { position: relative; margin: 0; font-size: 0.85rem; color: var(--mist); }
.auth__main { display: grid; place-items: center; padding: 48px 24px; background: var(--white); }
.auth__box { width: min(420px, 100%); }
.auth__box h1 { font-size: 2rem; color: var(--ink); }
.auth__intro { margin: 10px 0 28px; color: var(--muted); }
.auth-field { margin-bottom: 18px; }
.auth-field label { display: block; font-weight: 600; font-size: 0.95rem; color: var(--ink); margin-bottom: 6px; }
.auth-field input {
  width: 100%; height: 52px; padding: 0 16px; border: 1.5px solid #C6CFDC; border-radius: 12px;
  font: inherit; font-size: 1.05rem; color: var(--text); background: #fff;
}
.auth-field input:focus { outline: none; border-color: var(--ink); box-shadow: var(--focus); }
.auth-field small { display: block; margin-top: 6px; font-size: 0.85rem; color: var(--muted); }
.auth-pin { position: relative; }
.auth-pin input { padding-right: 92px; }
.auth-pin button {
  position: absolute; right: 8px; top: 8px; height: 36px; padding: 0 12px; border: 0; border-radius: 8px;
  background: #EEF2F8; color: var(--ink); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.auth-alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 0.95rem; }
.auth-alert--error { background: var(--red-50); color: var(--red); }
.auth-alert--warning { background: #FDF4DF; color: #7A5000; }
.auth-alert--success, .auth-alert--info { background: var(--green-50); color: var(--green); }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 20px; font-size: 0.95rem; }
.auth-links a { color: var(--ink); font-weight: 600; }
.auth-note { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }

/* ---------- Adaptación a pantallas ---------- */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); gap: 40px; padding: 112px 0 64px; min-height: 0; }
  .hero h1 { max-width: 20ch; }
  .roles .wrap { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .steps__list { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .steps__list li { padding: 0 0 0 72px; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth__panel { gap: 24px; padding: 24px 20px 28px; }
  .auth__pitch h2 { font-size: 1.6rem; }
  .auth__pitch p, .auth__foot { display: none; }
  .auth__main { place-items: start center; padding: 32px 16px 48px; }
}
@media (max-width: 640px) {
  .top__nav a:not(.top__cta) { display: none; }
  .top__brand small { display: none; }
  .hero__facts { gap: 20px; }
  .hero__facts dt { font-size: 1.6rem; }
  .sheet { padding: 20px 16px; }
  .sheet__feedback { margin-left: 8px; }
  .roles__list li { align-items: flex-start; }
  .steps, .roles { padding: 64px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
.auth-inline { margin: 0; }
.auth-linkbtn { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--ink); text-decoration: underline; cursor: pointer; }

/* ---------- Solicitud de cuenta ---------- */
.auth-field select, .auth-field textarea {
  width: 100%; padding: 12px 16px; border: 1.5px solid #C6CFDC; border-radius: 12px;
  font: inherit; font-size: 1rem; color: var(--text); background: #fff;
}
.auth-field select { height: 52px; padding: 0 12px; }
.auth-field select:focus, .auth-field textarea:focus { outline: none; border-color: var(--ink); box-shadow: var(--focus); }
.reg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.reg-modules { border: 0; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.reg-modules legend { font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.reg-module { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid #C6CFDC; border-radius: 14px; cursor: pointer; background: #fff; }
.reg-module:has(input:checked) { border-color: var(--ink); box-shadow: var(--focus); }
.reg-module input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.reg-module strong { display: block; color: var(--ink); }
.reg-module small { display: block; color: var(--muted); font-size: .88rem; margin-top: 2px; }
.reg-consent { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--muted); margin: 4px 0 20px; }
.reg-consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.reg-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 560px) { .reg-grid { grid-template-columns: 1fr; } }

/* ---------- Portada: módulos ---------- */
.mods { padding: 72px 0; background: #fff; }
.mods h2 { margin: 0 0 8px; color: var(--ink); }
.mods__lead { margin: 0 0 28px; color: var(--muted); max-width: 60ch; }
.mods__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.mods__card { border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 10px; background: #FBFCFE; }
.mods__card h3 { margin: 0; color: var(--ink); font-size: 1.35rem; }
.mods__card p { margin: 0 0 8px; color: var(--muted); flex: 1; }
.mods__card .btn { align-self: flex-start; }
.mods__tag { align-self: flex-start; font-size: .8rem; font-weight: 700; color: #7A5000; background: #FDF4DF; padding: 4px 10px; border-radius: 999px; }
@media (max-width: 760px) { .mods__grid { grid-template-columns: 1fr; } }

/* Modo de escritura del PIN y teclado numérico en pantalla (v0.25.4) */
.pin-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; font-size: 0.875rem; color: var(--muted, #566176); }
.pin-mode span { margin-right: 4px; }
.pin-mode button { border: 1px solid var(--line-strong, #B9C3D1); background: #fff; color: var(--ink-900, #13294B); border-radius: 999px; padding: 6px 12px; font: inherit; font-weight: 600; cursor: pointer; }
.pin-mode button.is-on { background: var(--ink-900, #13294B); border-color: var(--ink-900, #13294B); color: #fff; }
.pin-pad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; max-width: 320px; }
.pin-pad[hidden] { display: none; }
.pin-pad button { min-height: 52px; border: 1px solid var(--line-strong, #B9C3D1); border-radius: 10px; background: #fff; font: inherit; font-size: 1.35rem; font-weight: 700; color: var(--ink-900, #13294B); cursor: pointer; touch-action: manipulation; }
.pin-pad button:hover { background: var(--ink-50, #EEF2F8); }
.pin-pad button:active { transform: scale(0.97); }
.pin-pad .pin-pad__fn { font-size: 0.95rem; color: var(--muted, #566176); background: var(--paper, #F2F4F7); }
.pin-count { margin: 6px 0 0; font-size: 0.8125rem; color: var(--muted, #566176); min-height: 1em; }
.auth-field.is-pad-target input { border-color: var(--ink-900, #13294B); box-shadow: 0 0 0 3px rgba(224, 165, 38, 0.35); }
.pin-pad.is-masked .pin-pad__digit { color: var(--muted, #566176); background: var(--paper, #F2F4F7); cursor: wait; }
.pin-pad__digit:disabled { opacity: 1; }
.pin-pad-note { margin: 6px 0 0; font-size: 0.8125rem; color: var(--muted, #566176); }
.auth__indep { display: block; margin-top: 6px; font-size: 0.74rem; line-height: 1.45; opacity: 0.8; }
.auth__dfgm { font-style: normal; color: var(--gold); }
