/* Superficies públicas del campus Faraday & Freire. */
:where(.ff-front,.ff-login,.ff-recovery,.adm-public) {
    --ff-ink: #102c4b;
    --ff-muted: #465d72;
    --ff-gold: #ffd27c;
    --ff-orange: #b54113;
    --ff-line: #ced9e2;
    --ff-paper: #f6f8fa;
    --ff-shadow: 0 14px 38px rgba(22,46,69,.09);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
:where(.ff-front,.ff-login,.ff-recovery,.adm-public) :focus-visible {
    outline: 3px solid #236496;
    outline-offset: 3px;
    box-shadow: 0 0 0 3px white;
}
.ff-skip { position: fixed; top: .5rem; left: .5rem; z-index: 9999; padding: .7rem 1rem; border-radius: .5rem; background: white; color: #112d4b; }
.ff-skip:not(:focus) { clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }

/* Portada y programas */
.ff-front .landing-header { border-bottom: 1px solid #dbe2e8; }
.ff-front .hero-section {
    min-height: min(740px,calc(100svh - var(--faraday-header-height)));
}
.ff-front .hero-section::before { background: repeating-linear-gradient(125deg,transparent 0 119px,#ffffff08 120px 121px); }
.ff-front .hero-section::after,.ff-front .hero-geometry,.ff-front .hero-orb { display: none; }
.ff-front .hero-copy h1 { font-weight: 800; letter-spacing: -.055em; }
.ff-front .hero-badge { background: #203c52; color: #ffdd9e; border: 1px solid #637687; }
.ff-front .hero-badge > span { background: #ffb348; box-shadow: none; }
.ff-front .hero-trust i { color: var(--ff-gold); background: #294556; }
.ff-front .hero-cta-primary { color: #242330; background: #ffba67; box-shadow: none; }
.ff-front .hero-cta-primary:hover { background: #ffd393; }
.ff-front .hero-mini-card { border-radius: .9rem; box-shadow: var(--ff-shadow); }
.ff-front .program-card { border-color: #cedae4; }
.ff-front .program-card-action { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: .22em; }
.ff-front .section-about .about-point { border-inline-start: 3px solid #bd761f; }
.ff-front :is(.programs-heading,.section-about) h2 { text-wrap: balance; }

/* Acceso y recuperación */
.ff-kicker,.ff-level-label { display: block; font-size: .73rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.ff-login { color: var(--ff-ink); background: radial-gradient(at 0% 0%,#fae9d3,transparent 47%),#edf2f5; }
.ff-login .contenedor-login { border: 1px solid #cdd9e0; box-shadow: 0 22px 65px #102a411c; }
.ff-login .ff-kicker,.ff-recovery .ff-kicker { color: #8a430f; }
.ff-login .encabezado-login h1 { color: var(--ff-ink); margin-top: .3rem; }
.ff-login .boton-login { background: var(--ff-ink); color: white; }
.ff-login .boton-login:hover { background: #234b69; }
.ff-login .free-trial-link { display: block; margin-top: .8rem; padding: .6rem; color: var(--ff-orange); text-align: center; font-weight: 650; text-decoration: underline; text-underline-offset: .2em; }
.ff-login .login-leaf,.ff-login .dino-login { animation-iteration-count: 1; }
.ff-recovery { box-sizing: border-box; margin: 0; color: var(--ff-ink); font-size: 1rem; line-height: 1.55; background: radial-gradient(ellipse at top right,#e6edf4,transparent 54%),#f8f5ef; }
.ff-recovery *, .ff-recovery *::before { box-sizing: inherit; }
.ff-recovery .page { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: clamp(16px,4vw,48px); }
.ff-recovery .card { width: min(100%,32rem); padding: clamp(1.25rem,4vw,2.7rem); border: 1px solid var(--ff-line); border-top: 4px solid #c05619; border-radius: 1.15rem; background: white; box-shadow: var(--ff-shadow); }
.ff-signature { display: flex; align-items: center; gap: .75rem; margin-bottom: 2rem; color: var(--ff-ink); }
.ff-signature img { object-fit: contain; }
.ff-signature strong { font: 700 1.2rem/1.1 Georgia,serif; }
.ff-recovery h1 { margin: .35rem 0 .8rem; font-size: clamp(1.7rem,6vw,2.3rem); line-height: 1.1; letter-spacing: -.04em; }
.ff-recovery .description { color: var(--ff-muted); }
.ff-recovery .field { display: grid; gap: .35rem; margin: 1rem 0; }
.ff-recovery label { font-weight: 650; }
.ff-recovery input { width: 100%; min-height: 46px; border: 1px solid #8498aa; border-radius: .6rem; padding: .6rem .8rem; color: inherit; font: inherit; }
.ff-recovery .actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.3rem; }
.ff-recovery .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .6rem 1rem; border: 1px solid transparent; border-radius: .6rem; font: 650 .95rem/1.3 system-ui,sans-serif; text-decoration: none; cursor: pointer; }
.ff-recovery .btn-primary { color: white; background: var(--ff-ink); }
.ff-recovery .btn-secondary { color: var(--ff-ink); border-color: var(--ff-line); background: var(--ff-paper); }
.ff-recovery .message,.ff-recovery .error { padding: .8rem 1rem; border-inline-start: 3px solid currentColor; border-radius: .45rem; }
.ff-recovery .message { background: #e8f4ee; color: #145638; }
.ff-recovery .error { background: #fff0e8; color: #82331d; }

/* Niveles, intentos y solicitudes */
.admision:has(.adm-public) { background: #f4f6f8; }
.admision:has(.adm-public) .adm-top { align-items: center; background: #122d45; border-bottom: 3px solid #d78e46; }
.admision:has(.adm-public) .adm-top a { color: white; }
.admision:has(.adm-public) .adm-top a:last-child { text-decoration: underline; text-underline-offset: .22em; }
.adm-main:has(.adm-public) > h1 { margin-bottom: .5rem; color: #102c4b; letter-spacing: -.045em; }
.adm-public .adm-lead { max-width: 48rem; color: var(--ff-muted); margin: .3rem 0 1.5rem; }
.adm-public .adm-card { overflow-wrap: anywhere; border-color: var(--ff-line); box-shadow: var(--ff-shadow); }
.adm-public .adm-levels { gap: clamp(12px,1.8vw,24px); }
.adm-public .adm-levels .adm-card { display: flex; flex-flow: column; align-items: stretch; margin: 0; text-align: start; padding: clamp(.8rem,1.4vw,1.15rem); border-top: 4px solid var(--level-color,#246758); scroll-margin-top: 1rem; }
.adm-public #nivel-primaria { --level-color: #a44814; }
.adm-public #nivel-secundaria { --level-color: #275a9d; }
.adm-public #nivel-coar { --level-color: #176448; }
.adm-public #nivel-preuniversitario { --level-color: #63478b; }
.adm-public .ff-level-label { align-self: flex-start; color: var(--level-color); margin-bottom: .7rem; }
.adm-public .adm-level-image { max-height: 15rem; aspect-ratio: 1.24; object-fit: contain; background: #f6f8fa; }
.adm-public .adm-levels h2 { margin: .85rem 0 .2rem; color: var(--ff-ink); }
.adm-public .adm-levels p { margin: .3rem 0; color: var(--ff-muted); }
.adm-public .adm-levels form { margin-top: auto; padding-top: .75rem; }
.adm-public button,.adm-public .adm-button { min-height: 44px; background: var(--ff-ink); color: white; }
.adm-public button:hover,.adm-public .adm-button:hover { background: #234b69; }
.adm-public [hidden] { display:none; }
.adm-public .adm-muted { margin-top: 1.4rem; color: var(--ff-muted); }
.adm-public #instrucciones-pago { margin-block-start: 1.5rem; border-top: 1px solid var(--ff-line); }
.adm-public .adm-grid > *, .adm-public fieldset { min-inline-size: 0; }
.adm-public .adm-option { display: flex; align-items: center; gap: .65rem; min-height: 44px; padding: .45rem .7rem; cursor: pointer; }
.adm-public .adm-option:has(input:checked) { background: #e7eff7; }
.adm-public input[type=radio],.adm-public input[type=checkbox] { flex: 0 0 auto; accent-color: #23517a; }
@media(max-width:900px) {
    .adm-public .adm-levels { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .ff-front .hero-section { min-height: auto; }
}
@media(max-width:570px) {
    .ff-front .hero-actions { gap: .65rem; }
    .ff-front .hero-copy h1 { font-size: clamp(2.45rem,10.5vw,3.5rem); }
    .ff-front .hero-trust { flex-direction: row; }
    .ff-recovery .actions > * { flex: 1 1 12rem; }
    .adm-public .adm-grid { grid-template-columns: minmax(0,1fr); }
    .adm-public .adm-levels { grid-template-columns: minmax(0,1fr); }
    .adm-public .adm-levels .adm-card { display: grid; grid-template-columns: minmax(72px,30%) minmax(0,1fr); column-gap: .9rem; }
    .adm-public .adm-level-image { grid-column: 1; grid-row: 1 / span 5; align-self: center; }
    .adm-public .adm-levels .adm-card > :not(img) { grid-column: 2; }
    .adm-public .adm-levels .ff-level-label { margin: 0; }
    .adm-public .adm-levels h2 { font-size: clamp(1.05rem,4.5vw,1.4rem); margin-top: .2rem; }
    .adm-public .adm-levels form { padding: 0; }
    .adm-public .adm-levels button { padding: .55rem .75rem; }
}
@media(prefers-reduced-motion:reduce) {
    :is(.ff-front,.ff-login,.ff-recovery,.adm-public) *, :is(.ff-front,.ff-login) *::before, :is(.ff-front,.ff-login) *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.ff-front .contact-form[hidden],.ff-front .ff-contact-direct[hidden] { display: none; }
.ff-front .contact-form-panel { padding: clamp(1rem,3vw,2rem); background: #142f48; border-radius: 1.25rem; color: white; }
.ff-front .contact-form-panel h3 { margin: 0; font-size: clamp(1.4rem,3vw,2rem); text-align: left; }
.ff-front .contact-form-panel > p { margin: .75rem 0 1.5rem; color: #e0eaf3; }
.ff-front .contact-form { gap: .85rem; }
.ff-front .contact-form label { display: grid; gap: .25rem; font-weight: 650; }
.ff-front .contact-form input { min-width: 0; height: 45px; padding: .6rem .8rem; border-radius: .6rem; color: #142f48; font: inherit; }
.ff-front .contact-form button,.ff-front .ff-contact-direct { justify-self: start; min-height: 44px; height: auto; padding: .75rem 1.1rem; border-radius: .6rem; background: #ffd27c; color: #142f48; }
.ff-front .ff-contact-direct { display: inline-flex; align-items: center; font-weight: 650; }
@media (max-width:640px) {
    .ff-front .header-inner { gap: .4rem; flex-wrap: nowrap; }
    .ff-front .header-inner > .brand-mark { min-width: 0; flex: 1 1 0; }
    .ff-front .header-inner .brand-mark img { flex: 0 0 auto; }
    .ff-front .header-inner .brand-copy { min-width: 0; }
    .ff-front .header-login-mobile { flex: 0 0 auto; margin-left: 0; }
    .ff-front .hero-grid,.ff-front .contact-grid { grid-template-columns: minmax(0,1fr); }
    .ff-front .hero-grid > *,.ff-front .contact-grid > * { min-width: 0; max-width: 100%; }
    .ff-front .hero-actions { grid-template-columns: minmax(0,1fr); }
    .ff-front .contact-data strong { overflow-wrap: anywhere; }
    .ff-front .contact-info h2 { font-size: clamp(1.8rem,8vw,2.4rem); }
}
