/* =====================================================================
   Feria Tecnológica Pataz 2026 · Sistema de diseño
   Tema claro, colores SÓLIDOS (sin degradados) tomados de los logos:
   morado y magenta (Asociación Pataz), dorado (Poderosa), verde, naranja y turquesa (UGEL).
   Contraste verificado WCAG 2.1 AA: todo color de texto ≥ 4.5:1 sobre --bg y --surface.
   Los colores "-fill" son solo para fondos/decoración; sobre ellos se usa --on-fill o blanco.
   ===================================================================== */
:root {
  /* Fondos y superficies */
  --bg: #f7f4fa;
  --bg-2: #efe9f4;
  --bg-3: #e6ddee;
  --surface: #ffffff;
  --surface-2: #f3eef7;
  --surface-solid: #ffffff;
  --border: #ddd3e7;
  --border-strong: #c2b3d2;

  /* Texto (contraste sobre #ffffff / #f7f4fa) */
  --text: #24142f;      /* 16.0:1 */
  --text-2: #4a3a57;    /* 10.0:1 */
  --muted: #64567a;     /*  6.6:1 */

  /* Marca, versión apta para TEXTO (≥ 4.5:1 sobre blanco) */
  --purple: #77278b;    /*  8.6:1 */
  --magenta: #b8135f;   /*  6.1:1 */
  --gold: #855f00;      /*  5.6:1 */
  --cyan: #0f7068;      /*  5.9:1  (turquesa UGEL oscurecido) */
  --violet: #77278b;
  --pink: #b8135f;
  --green: #456d12;     /*  5.9:1 */
  --amber: #a83d12;     /*  6.2:1  (naranja UGEL oscurecido) */
  --red: #b42318;       /*  6.5:1 */
  --blue: #1d4ed8;      /*  6.7:1 */

  /* Marca, versión de RELLENO (exacta del logo) */
  --purple-fill: #77278b;
  --magenta-fill: #e5197f;
  --gold-fill: #d6a400;
  --green-fill: #8dc63f;
  --orange-fill: #ee6a2f;
  --teal-fill: #1fb5aa;
  --on-fill: #24142f;   /* texto sobre dorado/verde/turquesa/naranja */

  /* Tintes suaves sólidos para fondos de avisos y estados */
  --tint-purple: #f1e6f5;
  --tint-magenta: #fbe5ef;
  --tint-gold: #fbf1d3;
  --tint-green: #ebf4dd;
  --tint-teal: #e0f3f1;
  --tint-orange: #fde9df;
  --tint-red: #fde8e6;

  /* Compatibilidad: los antiguos "degradados" ahora son colores sólidos */
  --grad-gold: #d6a400;
  --grad-brand: #77278b;
  --grad-tech: #0f7068;
  --grad-hero: none;
  --brand-purple: #77278b;
  --brand-magenta: #e5197f;
  --brand-green: #8dc63f;
  --brand-gold: #d6a400;
  --brand-orange: #ee6a2f;
  --brand-teal: #1fb5aa;

  /* Bordes sobrios: botones 8 · campos 6 · tarjetas 10–12 · modales 12 · chips 6 */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 12px;
  --radius-btn: 8px;
  --radius-input: 6px;
  --radius-chip: 6px;
  --shadow: 0 6px 24px rgba(36, 20, 47, .10);
  --shadow-sm: 0 2px 8px rgba(36, 20, 47, .08);
  --shadow-glow: 0 6px 24px rgba(36, 20, 47, .10);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Sora', 'Inter', system-ui, sans-serif;
  --container: 1440px;
  --gutter: clamp(16px, 4vw, 56px);
  --header-h: 72px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  font: 17px/1.65 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video, canvas { max-width: 100%; display: block; }
a { color: var(--purple); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #5a1d69; }
nav a, .btn, .brand, .tabs a, .side-nav a, .footer-grid a, .card a.card-link { text-decoration: none; }
h1, h2, h3, h4, h5 { font-family: var(--font-display); line-height: 1.18; margin: 0 0 .5em; letter-spacing: -.015em; color: var(--text); }
h1 { font-size: clamp(2.1rem, 5vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.28rem; font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
small, .small { font-size: .88rem; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
::selection { background: #e7d3ef; color: var(--text); }
.ico { flex: none; display: inline-block; vertical-align: -0.2em; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--purple); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 999; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--magenta-fill); outline-offset: 2px; border-radius: 6px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.container-sm { max-width: calc(920px + 2 * var(--gutter)); }
.container-md { max-width: calc(1180px + 2 * var(--gutter)); }
.section { padding: clamp(48px, 6vw, 88px) 0; position: relative; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-tight { padding: 40px 0; }
.section-head { max-width: 860px; margin: 0 auto 40px; text-align: center; }
.section-head.is-left { margin-left: 0; text-align: left; }
/* Bandas de ancho completo con color sólido (ritmo de página web) */
.band-white { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.band-soft { background: var(--bg-2); }
.section-brand { background: var(--purple-fill); color: #fff; }
.section-brand h2, .section-brand h3, .section-brand h4 { color: #fff; }
.section-brand .section-head p, .section-brand > .container > p { color: #f3e8f7; }
.section-brand .card p, .section-brand .card .lead-2, .section-brand .step p { color: var(--text-2); }
.section-brand .card a:not(.btn), .section-brand .step a:not(.btn) { color: var(--purple); }
.section-brand .eyebrow { color: #ffd75e; }
.section-brand .eyebrow::before { background: #ffd75e; }
.section-brand .text-brand, .section-brand .text-tech { color: #ffd75e; }
.section-brand a:not(.btn) { color: #fff; }
.section-brand .card, .section-brand .card h3, .section-brand .card h4, .section-brand .step, .section-brand .step h4 { color: var(--text); }
.section-head p { color: var(--text-2); font-size: 1.1rem; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 700 .78rem/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--magenta); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 22px; height: 3px; background: var(--magenta-fill); border-radius: 2px; }
.text-gradient { color: var(--purple); background: none; -webkit-text-fill-color: currentColor; }
.text-tech { color: var(--cyan); background: none; -webkit-text-fill-color: currentColor; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.flex { display: flex; gap: 12px; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 16px; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-0 { margin-bottom: 0 !important; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .hide-sm { display: none !important; } }

/* ---------- Header / nav ---------- */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); display: flex; align-items: center; background: var(--surface); border-bottom: 1px solid var(--border); transition: box-shadow .25s; }
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--purple-fill); color: #fff; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: var(--font-display); font-size: 1rem; color: var(--text); }
.brand-text small { color: var(--magenta); font-weight: 700; letter-spacing: .08em; font-size: .72rem; text-transform: uppercase; }
.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav > a:not(.btn) { color: var(--text-2); font-weight: 600; font-size: .93rem; padding: 8px 12px; border-radius: 8px; transition: color .2s, background .2s; }
.main-nav > a:not(.btn):hover { color: var(--purple); background: var(--surface-2); }
.main-nav > a.is-active { color: var(--purple); background: var(--tint-purple); }
.nav-cta { margin-left: 8px; }
.nav-toggle { display: none; background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); border-radius: 8px; padding: 8px; cursor: pointer; }
@media (max-width: 1080px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .main-nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 16px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); transform: translateY(calc(-100% - var(--header-h))); visibility: hidden; transition: transform .3s ease, visibility 0s linear .3s; max-height: calc(100vh - var(--header-h)); overflow: auto; }
  .main-nav.is-open { transform: translateY(0); visibility: visible; transition: transform .3s ease, visibility 0s; }
  .main-nav > a:not(.btn) { padding: 12px 14px; font-size: 1rem; }
  .nav-cta { margin: 8px 0 0; justify-content: center; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 11px 22px; border-radius: var(--radius-btn); border: 2px solid var(--border-strong); background: var(--surface); color: var(--text); font: 700 .95rem/1.2 var(--font); cursor: pointer; transition: background .2s, border-color .2s, color .2s, transform .15s; text-align: center; white-space: nowrap; }
.btn:hover { color: var(--purple); border-color: var(--purple); background: var(--tint-purple); }
.btn:active { transform: scale(.98); }
.btn:disabled, .btn.is-disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--purple-fill); color: #fff; border-color: var(--purple-fill); }
.btn-primary:hover { background: #5a1d69; border-color: #5a1d69; color: #fff; }
.btn-gold { background: var(--gold-fill); color: var(--on-fill); border-color: var(--gold-fill); }
.btn-gold:hover { background: #b88d00; border-color: #b88d00; color: var(--on-fill); }
.btn-tech { background: var(--cyan); color: #fff; border-color: var(--cyan); }
.btn-tech:hover { background: #0a554f; border-color: #0a554f; color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border-strong); }
.btn-danger { background: var(--surface); border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-success:hover { background: #33520c; border-color: #33520c; color: #fff; }
.btn-sm { min-height: 36px; padding: 7px 14px; font-size: .86rem; }
.btn-lg { min-height: 52px; padding: 14px 30px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); cursor: pointer; }
.icon-btn:hover { color: var(--purple); border-color: var(--purple); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; position: relative; box-shadow: var(--shadow-sm); }
.card-lg { padding: clamp(22px, 4vw, 38px); border-radius: var(--radius-lg); }
.card-solid { background: var(--surface); }
.card-hover { transition: transform .25s ease, box-shadow .25s, border-color .25s; }
.card-hover:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.card-glow { border: 2px solid var(--purple-fill); }
.card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.gradient-border { border: 2px solid var(--purple-fill); }

/* Tarjeta de categoría */
.cat-card { --c: var(--purple); overflow: hidden; padding: 0; display: flex; flex-direction: column; border-top: 6px solid var(--c); }
.cat-card .cat-media { aspect-ratio: 4/3; background: var(--bg-3); position: relative; overflow: hidden; }
.cat-card .cat-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.cat-card:hover .cat-media img { transform: scale(1.04); }
.cat-card .cat-num { position: absolute; top: 14px; left: 14px; z-index: 1; width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center; font: 800 1.1rem var(--font-display); background: var(--c); color: #fff; box-shadow: var(--shadow-sm); }
.cat-card .cat-body { padding: 22px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.cat-card h3 { color: var(--text); margin: 0; }
.cat-card .cat-levels { display: grid; gap: 8px; margin-top: auto; }
.cat-card .cat-level { font-size: .92rem; color: var(--text-2); padding: 10px 12px; border-radius: 8px; background: var(--surface-2); border-left: 4px solid var(--c); }
.cat-card .cat-level b { display: block; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--c); }

/* ---------- Badges / chips ---------- */
.badge { --c: var(--muted); display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-chip); font: 700 .78rem/1.4 var(--font); color: var(--c); background: var(--surface); border: 1.5px solid var(--c); white-space: nowrap; }
.badge-gold { --c: var(--gold); } .badge-cyan { --c: var(--cyan); } .badge-green { --c: var(--green); } .badge-red { --c: var(--red); } .badge-violet { --c: var(--purple); } .badge-amber { --c: var(--amber); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius-chip); background: var(--surface); border: 1px solid var(--border-strong); font-size: .9rem; font-weight: 600; color: var(--text-2); }
.pill-toggle { display: inline-flex; padding: 4px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border-strong); gap: 4px; flex-wrap: wrap; }
.pill-toggle button, .pill-toggle a { border: 0; background: transparent; color: var(--text-2); padding: 8px 16px; border-radius: 6px; font: 700 .88rem var(--font); cursor: pointer; text-decoration: none; }
.pill-toggle button:hover, .pill-toggle a:hover { color: var(--purple); background: var(--tint-purple); }
.pill-toggle .is-active, .pill-toggle [aria-selected="true"] { background: var(--purple-fill); color: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: calc(100vh - var(--header-h)); display: flex; align-items: center; padding: 40px 0 72px; overflow: hidden; background: var(--bg); }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .35; pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
.hero h1 { margin-bottom: 20px; }
.hero .lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--text-2); max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 28px 0; }
.hero-art { position: relative; aspect-ratio: 1/1; border-radius: var(--radius-lg); overflow: hidden; background: var(--purple-fill); box-shadow: var(--shadow); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-float { position: absolute; z-index: 2; animation: float 6s ease-in-out infinite; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } .hero { min-height: auto; } .hero-art { max-width: 520px; margin: 0 auto; } }

/* ---------- Countdown & stats ---------- */
.countdown { display: inline-grid; grid-auto-flow: column; gap: 10px; }
.countdown .cd-unit { min-width: 76px; text-align: center; padding: 12px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border-strong); }
.countdown .cd-num { display: block; font: 800 1.9rem/1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--purple); }
.countdown .cd-lbl { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.stat { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.stat-num { font: 800 2.4rem/1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--text); }
.stat-label { color: var(--muted); font-size: .9rem; margin-top: 6px; }
.stat-icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--tint-purple); color: var(--purple); margin-bottom: 14px; }

/* ---------- Timeline / pasos ---------- */
.timeline { position: relative; display: grid; gap: 18px; }
.timeline::before { content: ""; position: absolute; left: 19px; top: 8px; bottom: 8px; width: 3px; background: var(--border-strong); border-radius: 3px; }
.tl-item { position: relative; padding-left: 58px; }
.tl-dot { position: absolute; left: 0; top: 2px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 3px solid var(--purple-fill); color: var(--purple); font: 800 .9rem var(--font-display); }
.tl-item.is-done .tl-dot { background: var(--purple-fill); color: #fff; }
.tl-item.is-now .tl-dot { background: var(--magenta-fill); border-color: var(--magenta-fill); color: #fff; box-shadow: 0 0 0 4px var(--tint-magenta); }
.tl-date { font: 800 .8rem var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--magenta); }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.step { padding: 22px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); border-top: 5px solid var(--purple-fill); box-shadow: var(--shadow-sm); }
.step:nth-child(2) { border-top-color: var(--magenta-fill); } .step:nth-child(3) { border-top-color: var(--gold-fill); } .step:nth-child(4) { border-top-color: var(--green-fill); } .step:nth-child(5) { border-top-color: var(--teal-fill); }
.step-n { font: 800 .76rem var(--font); letter-spacing: .12em; color: var(--magenta); }
.step h4 { margin: 8px 0 6px; }
.step p { color: var(--text-2); font-size: .93rem; margin: 0; }
@media (max-width: 960px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-weight: 700; font-size: .92rem; color: var(--text); }
.field label .req { color: var(--magenta); }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=range]), .field select, .field textarea, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: var(--radius-input); border: 1.5px solid var(--border-strong); background: var(--surface);
  color: var(--text); font: 500 1rem var(--font); transition: border-color .2s, box-shadow .2s; }
.input::placeholder, .field input::placeholder, .field textarea::placeholder { color: #8a7d9a; }
.field textarea, textarea.input { min-height: 110px; resize: vertical; line-height: 1.5; }
.field select, select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364567a' stroke-width='2'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.field select option, select.input option { background: #fff; color: var(--text); }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--purple); box-shadow: 0 0 0 3px #e2cdea; }
.field .help { font-size: .84rem; color: var(--muted); }
.field .error-msg { font-size: .84rem; font-weight: 600; color: var(--red); display: none; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--red); box-shadow: 0 0 0 3px var(--tint-red); }
.field.has-error .error-msg { display: block; }
.field.is-valid input { border-color: var(--green); }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 12px 14px; border-radius: 8px; border: 1.5px solid var(--border-strong); background: var(--surface); transition: border-color .2s, background .2s; }
.check:hover { border-color: var(--purple); }
.check input { width: 20px; height: 20px; accent-color: var(--purple-fill); margin-top: 2px; flex: none; }
.check:has(input:checked) { border-color: var(--purple); background: var(--tint-purple); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.option-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.option-card { --c: var(--purple); position: relative; cursor: pointer; padding: 18px; border-radius: 10px; border: 2px solid var(--border); background: var(--surface); transition: border-color .2s, background .2s, transform .2s; display: flex; flex-direction: column; gap: 6px; }
.option-card input { position: absolute; opacity: 0; pointer-events: none; }
.option-card:hover { border-color: var(--c); transform: translateY(-2px); }
.option-card:has(input:checked) { border-color: var(--c); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--c); }
.option-card:has(input:focus-visible) { outline: 3px solid var(--magenta-fill); outline-offset: 2px; }
.option-card .oc-icon { width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center; background: var(--c); color: #fff; }
.option-card strong { font-family: var(--font-display); color: var(--text); }
.option-card small { color: var(--muted); }

/* ---------- Wizard ---------- */
.stepper { display: flex; gap: 8px; margin-bottom: 28px; overflow-x: auto; padding-bottom: 4px; }
.stepper-item { flex: 1; min-width: 120px; display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: .86rem; font-weight: 700; }
.stepper-item::before { content: ""; height: 5px; border-radius: 5px; background: var(--border); transition: background .3s; }
.stepper-item.is-active { color: var(--purple); }
.stepper-item.is-active::before, .stepper-item.is-done::before { background: var(--purple-fill); }
.stepper-item.is-done { color: var(--green); }
.wizard-panel { display: none; animation: fadeUp .35s ease; }
.wizard-panel.is-active { display: block; }
.wizard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.member-card { padding: 20px; border-radius: 10px; border: 1.5px dashed var(--border-strong); background: var(--surface-2); }
.member-card + .member-card { margin-top: 16px; }
.member-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.member-num { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--purple-fill); font: 800 .9rem var(--font-display); color: #fff; }

/* ---------- Alerts / toasts ---------- */
.alert { padding: 14px 18px; border-radius: 8px; border: 1px solid var(--border-strong); border-left-width: 5px; background: var(--surface); color: var(--text); margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start; }
.alert-success { border-color: var(--green); background: var(--tint-green); color: #2b4609; }
.alert-error, .alert-danger { border-color: var(--red); background: var(--tint-red); color: #7a1810; }
.alert-warn, .alert-warning { border-color: var(--gold-fill); background: var(--tint-gold); color: #5c4200; }
.alert-info { border-color: var(--cyan); background: var(--tint-teal); color: #0a4c47; }
.toast-zone { position: fixed; right: 16px; bottom: 16px; z-index: 1000; display: grid; gap: 10px; max-width: min(380px, calc(100vw - 32px)); }
.toast { padding: 14px 18px; border-radius: 10px; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-left: 5px solid var(--purple-fill); box-shadow: var(--shadow); animation: toastIn .3s ease; display: flex; gap: 10px; align-items: center; font-weight: 600; }
.toast.success { border-left-color: var(--green); } .toast.error { border-left-color: var(--red); } .toast.warn { border-left-color: var(--gold-fill); }
.toast.is-leaving { animation: toastOut .3s forwards; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .94rem; color: var(--text); }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font: 800 .74rem var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); background: var(--surface-2); position: sticky; top: 0; }
.table tbody tr:nth-child(even) { background: #fbf9fc; }
.table tbody tr:hover { background: var(--tint-purple); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Tabs / modal / misc ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 24px; overflow-x: auto; }
.tabs a, .tabs button { padding: 12px 16px; border: 0; background: none; color: var(--text-2); font: 700 .93rem var(--font); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs a:hover, .tabs button:hover { color: var(--purple); }
.tabs .is-active { color: var(--purple); border-bottom-color: var(--purple-fill); }
.modal { position: fixed; inset: 0; z-index: 900; display: none; place-items: center; padding: 20px; background: rgba(36, 20, 47, .55); }
.modal.is-open { display: grid; animation: fadeIn .2s; }
.modal-box { width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow); animation: fadeUp .25s; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--purple-fill); font-weight: 800; color: #fff; flex: none; }
.progress { height: 10px; border-radius: 6px; background: var(--bg-3); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--purple-fill); border-radius: inherit; transition: width .5s ease; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .ico { margin: 0 auto 12px; }
.kbd, code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.code-big { font: 800 clamp(1.6rem, 5vw, 2.6rem) ui-monospace, monospace; letter-spacing: .12em; color: var(--purple); }
.divider-glow { height: 2px; background: var(--border); border: 0; margin: 0; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--border-strong); border-top-color: var(--purple); animation: spin .7s linear infinite; display: inline-block; }
.dot-live { width: 10px; height: 10px; border-radius: 50%; background: var(--red); display: inline-block; }
.prose { color: var(--text-2); }
.prose h2 { color: var(--text); font-size: 1.6rem; margin-top: 2.2em; }
.prose h3 { color: var(--text); margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose strong { color: var(--text); }

/* ---------- Footer (sólido, oscuro, alto contraste) ---------- */
.site-footer { background: #2b1236; color: #efe6f4; padding: 56px 0 24px; margin-top: 40px; }
.site-footer .brand, .site-footer .brand-text strong { color: #fff; }
.site-footer .brand-text small { color: #f7c9df; }
.site-footer .brand-mark { background: var(--magenta-fill); }
.site-footer .muted { color: #d9c7e3; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: #ffd75e; margin-bottom: 14px; }
.footer-grid a:not(.brand) { display: block; color: #efe6f4; padding: 4px 0; font-size: .94rem; }
.footer-grid a:not(.brand):hover { color: #fff; text-decoration: underline; }
.org-line { margin-bottom: 12px; }
.org-line strong { color: #fff; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid #4a2a58; color: #d9c7e3; font-size: .85rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- App shell (admin / jurado) ---------- */
.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 20px; padding: 20px 14px; background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; z-index: 60; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--text-2); font-weight: 600; font-size: .94rem; }
.side-nav a:hover { background: var(--surface-2); color: var(--purple); }
.side-nav a.is-active { background: var(--tint-purple); color: var(--purple); box-shadow: inset 4px 0 0 var(--purple-fill); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.side-user-info { flex: 1; min-width: 0; line-height: 1.2; }
.side-user-info strong { display: block; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.side-user-info small { color: var(--muted); }
.app-main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; padding: 14px 28px; background: var(--surface); border-bottom: 1px solid var(--border); min-height: 66px; }
.topbar-title { font-size: 1.25rem; margin: 0; flex: 1; }
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sidebar-toggle { display: none; }
.app-content { padding: 28px; max-width: 1400px; width: 100%; }
@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .3s; }
  .app-shell.sidebar-open .sidebar { transform: translateX(0); box-shadow: var(--shadow); }
  .sidebar-toggle { display: inline-grid; }
  .app-content { padding: 18px 16px; }
  .topbar { padding: 12px 16px; }
}

/* ---------- Animaciones (suaves; se anulan con prefers-reduced-motion) ---------- */
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; transition-delay: var(--d, 0s); }
[data-reveal].is-visible { opacity: 1; transform: none; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }
@keyframes skeletonPulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.skeleton { background: var(--bg-3); animation: skeletonPulse 1.4s infinite; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } [data-reveal] { opacity: 1; transform: none; } }

/* ---------- Impresión ---------- */
.print-only { display: none; }
@media print {
  @page { margin: 12mm; }
  body { background: #fff !important; color: #000 !important; }
  .site-header, .site-footer, .sidebar, .topbar, .no-print, .toast-zone, .btn { display: none !important; }
  .print-only { display: block; }
  .app-shell { display: block; }
  .card { box-shadow: none; border-color: #999; }
  a { color: #000; }
}

/* Logos de las instituciones sobre placa blanca sólida (legibles en el pie oscuro) */
.org-logos { display: grid; gap: 12px; padding: 14px; background: #ffffff; border-radius: 10px; justify-items: start; }
.org-logos img { width: 100%; max-width: 200px; height: auto; }
.org-logos img + img { max-width: 170px; }

/* =====================================================================
   Sonido de la interfaz (FT.sound) · botón del encabezado
   ===================================================================== */
.header-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.snd-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 10px; border-radius: var(--radius-btn); border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text-2); font: 700 .82rem/1 var(--font); cursor: pointer; white-space: nowrap; transition: color .2s, border-color .2s, background .2s; }
.snd-toggle:hover { color: var(--purple); border-color: var(--purple); background: var(--tint-purple); }
.snd-toggle .snd-off { display: none; }
.snd-toggle[aria-pressed="false"] { color: var(--muted); background: var(--surface-2); }
.snd-toggle[aria-pressed="false"] .snd-on { display: none; }
.snd-toggle[aria-pressed="false"] .snd-off { display: inline; }
.snd-toggle .snd-ico { font-size: 1rem; line-height: 1; }
@media (max-width: 1500px) { .site-header .snd-toggle .snd-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .site-header .snd-toggle { padding: 6px 9px; } }
.topbar .snd-toggle .snd-txt { display: none; }

/* =====================================================================
   Guía por voz (botón + mini reproductor con subtítulo)
   ===================================================================== */
.vg { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 10px; max-width: 100%; }
.vg-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 16px 6px 6px; border-radius: var(--radius-btn); border: 2px solid var(--cyan); background: var(--cyan); color: #fff; font: 700 .95rem/1.15 var(--font); cursor: pointer; text-align: left; transition: background .2s, border-color .2s, transform .15s; }
.vg-btn:hover { background: #0a554f; border-color: #0a554f; color: #fff; }
.vg-btn:active { transform: scale(.98); }
.vg-btn .vg-ico { width: 36px; height: 36px; border-radius: 6px; display: grid; place-items: center; background: #fff; color: var(--cyan); flex: none; }
.vg-btn small { display: block; font-weight: 500; font-size: .76rem; color: #dff3f1; }
.vg-btn[aria-expanded="true"] { background: #0a554f; border-color: #0a554f; }
.vg-btn.is-light { background: var(--surface); color: var(--cyan); }
.vg-btn.is-light small { color: var(--muted); }
.vg-btn.is-light .vg-ico { background: var(--cyan); color: #fff; }
.vg-btn.is-light:hover, .vg-btn.is-light[aria-expanded="true"] { background: var(--tint-teal); color: #0a4c47; }
.vg-player { width: min(560px, 100%); padding: 12px 14px; border-radius: 10px; background: var(--surface); border: 1.5px solid var(--cyan); box-shadow: var(--shadow-sm); color: var(--text); animation: fadeUp .25s ease; }
.vg-player[hidden] { display: none; }
.vg-row { display: flex; align-items: center; gap: 10px; }
.vg-pp, .vg-close { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 8px; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; padding: 0; }
.vg-pp { background: var(--cyan); border-color: var(--cyan); color: #fff; }
.vg-pp:hover { background: #0a554f; }
.vg-close:hover { color: var(--red); border-color: var(--red); }
.vg-track { flex: 1; min-width: 0; }
.vg-title { display: flex; justify-content: space-between; gap: 8px; font-size: .78rem; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.vg-time { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.vg-bar { height: 8px; border-radius: 4px; background: var(--bg-3); overflow: hidden; cursor: pointer; }
.vg-bar > span { display: block; height: 100%; width: 0; background: var(--cyan); border-radius: inherit; transition: width .2s linear; }
.vg-sub { margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--tint-teal); color: #0a4c47; font-size: .92rem; line-height: 1.5; border-left: 4px solid var(--cyan); }
.vg-sub[hidden] { display: none; }
.vg-subtoggle { all: unset; cursor: pointer; font-size: .78rem; font-weight: 700; color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; margin-top: 8px; display: inline-block; }
.vg-subtoggle:focus-visible { outline: 3px solid var(--magenta-fill); outline-offset: 2px; }
.section-brand .vg-btn, .cd-band .vg-btn { background: #fff; color: var(--cyan); border-color: #fff; }
.section-brand .vg-btn small, .cd-band .vg-btn small { color: var(--muted); }
.section-brand .vg-btn .vg-ico, .cd-band .vg-btn .vg-ico { background: var(--cyan); color: #fff; }
@media (prefers-reduced-motion: reduce) { .vg-bar > span { transition: none; } }

/* Interruptor "Guía automática en cada paso" */
.vg-auto { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; color: var(--text-2); cursor: pointer; min-height: 36px; }
.vg-auto input { width: 18px; height: 18px; accent-color: var(--cyan); margin: 0; }

/* =====================================================================
   ¿Cómo inscribirse? · mini tutorial de 4 pasos
   ===================================================================== */
.howto { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.howto-step { --c: var(--purple); position: relative; display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--c); box-shadow: var(--shadow-sm); }
.howto-top { display: flex; align-items: center; gap: 12px; }
.howto-ico { width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center; background: var(--c); color: #fff; flex: none; }
.howto-n { font: 800 .74rem var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--c); }
.howto-step h3 { font-size: 1.06rem; margin: 0; color: var(--text); }
.howto-step p { margin: 0; color: var(--text-2); font-size: .92rem; }
.howto-step .howto-ex { font-size: .84rem; color: var(--muted); }
.howto-step:not(:last-child)::after { content: ""; position: absolute; top: 40px; right: -15px; width: 10px; height: 10px; border-top: 3px solid var(--border-strong); border-right: 3px solid var(--border-strong); transform: rotate(45deg); z-index: 1; }
.howto.is-vertical { grid-template-columns: 1fr; gap: 10px; }
.howto.is-vertical .howto-step { padding: 14px 16px; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 12px; border-top-width: 1px; border-left: 4px solid var(--c); box-shadow: none; }
.howto.is-vertical .howto-step::after { display: none; }
.howto.is-vertical .howto-top { display: contents; }
.howto.is-vertical .howto-ico { width: 40px; height: 40px; grid-column: 1; grid-row: 1 / span 4; }
.howto.is-vertical .howto-n, .howto.is-vertical h3, .howto.is-vertical p { grid-column: 2; }
.howto.is-vertical .howto-n { align-self: end; }
@media (max-width: 1100px) { .howto { grid-template-columns: repeat(2, minmax(0, 1fr)); } .howto-step::after { display: none; } }
@media (max-width: 560px) { .howto { grid-template-columns: 1fr; } }

/* =====================================================================
   Ayuda escrita desplegable de cada paso del formulario
   ===================================================================== */
.step-help { margin: 0 0 20px; border-radius: 10px; border: 1.5px solid var(--cyan); background: var(--tint-teal); color: #0a4c47; }
.step-help > summary { cursor: pointer; list-style: none; min-height: 46px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; font-weight: 700; }
.step-help > summary::-webkit-details-marker { display: none; }
.step-help > summary::after { content: "+"; margin-left: auto; font: 800 1.3rem/1 var(--font); }
.step-help[open] > summary::after { content: "–"; }
.step-help > summary:focus-visible { outline: 3px solid var(--magenta-fill); outline-offset: 2px; border-radius: 8px; }
.step-help ul { margin: 0; padding: 0 14px 14px; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.step-help li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; background: var(--surface); color: var(--text-2); font-size: .93rem; line-height: 1.5; }
.step-help li .ico { color: var(--cyan); margin-top: 3px; }
.step-help li b { color: var(--text); }
.step-help li em { font-style: normal; color: #0a4c47; background: var(--tint-teal); padding: 1px 6px; border-radius: 4px; font-family: ui-monospace, monospace; font-size: .88em; }
@media (max-width: 760px) { .step-help ul { grid-template-columns: 1fr; } }

/* Texto solo para lectores de pantalla */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.container.section-tight, .container.section { padding-left: var(--gutter); padding-right: var(--gutter); }
