/* ============================================================
   Mi clave · Fundación Barceló
   Usa los tokens de brand.css (manual MAR 2026): colores, tipografía, radios cápsula, sombras azuladas.
   Misma base visual que Becas. Sin frameworks.
   ============================================================ */

body { min-height: 100vh; display: flex; flex-direction: column; background: var(--surface-raised); }
main { flex: 1; padding: var(--space-7) 0 var(--space-6); }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

.wrap        { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--space-4); }
.wrap-narrow { max-width: 640px; }

.skip-link { position: absolute; left: -999px; top: var(--space-2); z-index: 100; background: var(--barcelo-white); color: var(--barcelo-blue);
             padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill); font-family: var(--font-display); font-weight: 600; }
.skip-link:focus { left: var(--space-2); box-shadow: var(--focus-ring); }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-xs); }

/* ---------- Encabezado con la trama (bandas tipo estadio derivadas de la B) ---------- */
.site-header { position: relative; background: var(--barcelo-blue); color: var(--text-on-brand); overflow: hidden; }
.site-header .wrap { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 84px; }
.site-header .logo img { display: block; height: 68px; width: auto; }
.site-header .tag { font-family: var(--font-display); font-weight: 600; font-size: var(--text-xs); letter-spacing: var(--ls-wide); text-transform: uppercase; opacity: .9; margin-right: 300px; }
.site-header::before, .site-header::after { content: ""; position: absolute; border-radius: var(--radius-pill); pointer-events: none; }
.site-header::before { right: -70px; top: -28px; width: 300px; height: 64px; background: var(--barcelo-navy); }
.site-header::after  { right: 90px;  bottom: -26px; width: 190px; height: 52px; background: var(--barcelo-cyan); opacity: .9; }
@media (max-width: 760px) { .site-header .tag { display: none; } }
@media (max-width: 640px) {
	.site-header .logo img { height: 56px; }
	.site-header::before { width: 190px; right: -80px; }
	.site-header::after  { width: 120px; right: 20px; }
}

/* ---------- Tipografía ---------- */
.eyebrow { display: block; margin-bottom: var(--space-3); }
h1.titulo { font-size: clamp(1.9rem, 4.5vw, 2.5rem); margin-bottom: var(--space-4); }
.lead { font-size: var(--text-md); line-height: var(--lh-relaxed); color: var(--text-body); }
.muted { color: var(--text-muted); }
.small { font-size: var(--text-sm); }
.centrado { text-align: center; margin-top: var(--space-4); }
a { text-underline-offset: 3px; }
code { font-family: var(--font-mono); font-size: .95em; background: var(--blue-50); color: var(--blue-800); padding: 1px 8px; border-radius: var(--radius-pill); white-space: nowrap; }
.usuario { display: inline-block; font-family: var(--font-display); font-weight: 700; color: var(--blue-800); background: var(--blue-50); padding: 2px 14px; border-radius: var(--radius-pill); }

/* ---------- Superficies ---------- */
.card { background: var(--surface-card); border-radius: var(--radius-xl); padding: var(--space-6); box-shadow: var(--shadow-sm); border: var(--border-width) solid transparent; }
.card + .card { margin-top: var(--space-5); }
.card h2 { font-size: var(--text-lg); margin-bottom: var(--space-3); }
.card p:last-child { margin-bottom: 0; }
.card-flat { box-shadow: none; border-color: var(--border-subtle); }
@media (max-width: 640px) { .card { padding: var(--space-5) var(--space-4); border-radius: var(--radius-lg); } main { padding-top: var(--space-5); } }

.alert { display: flex; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-md); border: var(--border-width) solid; margin: var(--space-4) 0; line-height: 1.5; text-align: left; }
.alert::before { content: ""; width: 4px; border-radius: 4px; flex: 0 0 auto; background: currentColor; opacity: .85; }
.alert > div { flex: 1; min-width: 0; }
.alert p { margin: 0; }
.alert p + p { margin-top: var(--space-2); }
.alert strong { font-family: var(--font-display); }
.alert ul { margin: var(--space-2) 0 0; padding-left: 1.2em; }
.alert ul.sin-sangria { margin: 0; }
.alert a { color: inherit; font-weight: 600; text-decoration: underline; }
.alert-success { background: #E4F5EC; border-color: #BEE6CE; color: #0E5C34; }
.alert-warning { background: #FCF1D6; border-color: #F3DFA0; color: #7A5600; }
.alert-danger  { background: #FBE6E4; border-color: #F3C4BF; color: #8E1E16; }

/* ---------- Botones (cápsula) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: 48px; padding: 0 var(--space-6); border: var(--border-width) solid transparent;
       border-radius: var(--radius-pill); font-family: var(--font-display); font-weight: 600; font-size: 1rem; line-height: 1; cursor: pointer; text-decoration: none;
       transition: background var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard); }
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--barcelo-blue); color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover { background: var(--blue-600); box-shadow: none; }
.btn-primary:active { background: var(--blue-700); }
.btn-outline { background: transparent; color: var(--barcelo-blue); border-color: var(--barcelo-blue); }
.btn-outline:hover { background: var(--blue-50); }
.btn-lg { height: 54px; font-size: 1.0625rem; }
.btn-block { width: 100%; }
.acciones-dobles { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-5); }
@media (max-width: 480px) { .acciones-dobles .btn { width: 100%; } }
.enviando { pointer-events: none; opacity: .75; }

/* ---------- Formularios ---------- */
.field { margin-bottom: var(--space-5); }
.field > label { display: block; margin-bottom: var(--space-2); font-family: var(--font-display); font-weight: 600; font-size: .9rem; color: var(--text-strong); }
.hint { display: block; margin-top: var(--space-2); font-size: var(--text-sm); color: var(--text-muted); }
.input { width: 100%; min-height: 50px; padding: 0 var(--space-4); font: inherit; font-size: 1rem; color: var(--text-strong); background: #fff;
         border: var(--border-width) solid var(--border-default); border-radius: var(--radius-md); transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.input:focus { outline: none; border-color: var(--barcelo-blue); box-shadow: var(--focus-ring); }

.input-clave { position: relative; }
.input-clave .input { padding-right: 96px; }
.ver-clave { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 38px; padding: 0 var(--space-4); border: 0; border-radius: var(--radius-pill);
             background: transparent; color: var(--barcelo-blue); font-family: var(--font-display); font-weight: 600; font-size: var(--text-sm); cursor: pointer; }
.ver-clave:hover { background: var(--blue-50); }

/* Reglas de la clave: se van tildando mientras se escribe */
.reglas { list-style: none; padding: 0; margin: var(--space-3) 0 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.reglas li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 8px; border-radius: var(--radius-pill); background: var(--gray-100);
             color: var(--gray-700); font-size: var(--text-sm); transition: background var(--dur-fast), color var(--dur-fast); }
.reglas li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: var(--border-width) solid var(--gray-400); box-sizing: border-box; }
.reglas li.cumple { background: #E4F5EC; color: #0E5C34; }
.reglas li.cumple::before { border: 0; background: var(--color-success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat; }
#coincide.ok { color: #0E5C34; font-weight: 600; }
#coincide.no { color: #8E1E16; font-weight: 600; }

.captcha { margin: 0 0 var(--space-5); min-height: 70px; }

/* ---------- Pasos ---------- */
.pasos-lista { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-4); counter-reset: n; }
.pasos-lista li { display: flex; gap: var(--space-3); align-items: flex-start; counter-increment: n; }
.pasos-lista li::before { content: counter(n); flex: 0 0 auto; width: 30px; height: 30px; border-radius: var(--radius-pill); background: var(--blue-50); color: var(--barcelo-blue);
                          font-family: var(--font-display); font-weight: 700; display: grid; place-items: center; }
.pasos-lista li > span { padding-top: 3px; }

/* ---------- Resultado ---------- */
.resultado { text-align: center; }
.resultado .icono { width: 72px; height: 72px; margin: 0 auto var(--space-5); border-radius: 50%; display: grid; place-items: center; background: var(--blue-50); }
.resultado .icono svg { width: 34px; height: 34px; stroke: var(--barcelo-blue); }
.resultado .icono.ok { background: #E4F5EC; } .resultado .icono.ok svg { stroke: var(--color-success); }
.resultado .icono.aviso { background: #FCF1D6; } .resultado .icono.aviso svg { stroke: #B07F00; }
.resultado .lead { margin-left: auto; margin-right: auto; max-width: 48ch; }
.resultado-lista { text-align: left; max-width: 48ch; margin: var(--space-5) auto; padding-left: 1.3em; }
.resultado-lista li { margin-bottom: var(--space-2); }
.tramite-nro { display: inline-block; margin: 0 0 var(--space-5); padding: var(--space-3) var(--space-6); border-radius: var(--radius-pill); background: var(--blue-50); color: var(--blue-800);
               font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); letter-spacing: .02em; word-break: break-all; }
.detalle { text-align: left; white-space: pre-wrap; font-size: var(--text-sm); background: var(--gray-50); padding: var(--space-3); border-radius: var(--radius-md); }

/* ---------- Pie ---------- */
.site-footer { padding: var(--space-6) 0; background: var(--barcelo-navy); color: rgba(255,255,255,.85); font-size: var(--text-sm); }
.site-footer a { color: #fff; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; align-items: center; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
