/* Hallmark · genre: editorial · macrostructure: Bento Grid · design-system: design.md · designed-as-app */
/* Portal Alumni USC — identidad oficial alumniUSC */

@font-face {
    font-family: 'FrutigerNext';
    src: url('../fonts/FrutigerNextLT-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'MontserratLight';
    src: url('../fonts/Montserrat-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

:root {
    --azul: #004892;
    --azul-oscuro: #012a54;
    --verde: #009179;
    --verde-oscuro: #00614f;
    --verde-mas-oscuro: #004a3c;
    --naranja: #EAAB32;
    --naranja-oscuro: #b98520;
    --gris-fondo: #F5F6F4;
    --gris-borde: #E8E8E6;
    --tinta: #1A1A1A;
    --gris-texto: #6B7280;
    --gris-texto-fuerte: #48525C;
    --rojo-error: #A13030;
    --rojo-error-bg: #FDECEC;
    --rojo-error-borde: #F3B7B7;
    --verde-bg: #E7F5F0;
    --verde-borde: #A9D8C6;

    --carrera-agronomia: #009578;
    --carrera-zootecnia: #ef7622;
    --carrera-tecnologia-alimentos: #e4a612;
    --carrera-administracion-agraria: #004a97;

    --font-display: 'FrutigerNext', Arial, sans-serif;
    --font-body: 'MontserratLight', Arial, sans-serif;

    --sombra-card: 0 1px 2px rgba(26, 26, 26, .04), 0 8px 20px rgba(26, 26, 26, .06);
    --radio-card: 14px;
    --sidebar-ancho: 220px;
    --sidebar-margen: 20px;

    /* ---------- tokens de tema (claro/oscuro) ----------
       Valores claros por default: asi es la app hoy fuera del bloque
       directorio. El bloque oscuro (body.page-directorio, .drawer.app-sidebar)
       fija estos mismos tokens a sus valores oscuros localmente mientras no
       existe el toggle real (Fase 4) - ver esas reglas mas abajo. */
    --superficie-bg: var(--gris-fondo);
    --superficie-card: #FFFFFF;
    --superficie-hover: rgba(26, 26, 26, .04);
    --texto-sobre-superficie: var(--tinta);
    --texto-sobre-superficie-secundario: var(--gris-texto);
    --borde: var(--gris-borde);
}

:root[data-theme="dark"] {
    --superficie-bg: var(--tinta);
    --superficie-card: color-mix(in srgb, var(--verde-oscuro) 18%, var(--tinta));
    --superficie-hover: rgba(255, 255, 255, .06);
    --texto-sobre-superficie: #FFFFFF;
    --texto-sobre-superficie-secundario: color-mix(in srgb, #FFFFFF 62%, transparent);
    --borde: rgba(255, 255, 255, .1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--superficie-bg);
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge viejo */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none; /* Chrome, Safari, navegadores basados en Chromium */
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--superficie-bg) url('../img/patron-fondo.png') repeat;
    color: var(--texto-sobre-superficie);
    font-family: var(--font-body);
    line-height: 1.5;
    transition: background-color .25s ease, color .25s ease;
}

a { color: inherit; }

/* ---------- brand lockup (logo, fuera del header) ---------- */

.brand-lockup {
    display: block;
    text-decoration: none;
    margin: 0 0 36px;
}

.brand-lockup__logo {
    height: 56px;
    width: auto;
    display: block;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px 60px;
}

/* pantallas de app: ancho completo, sin centrar por defecto */
body.page-app-shell .main {
    align-items: stretch;
    justify-content: flex-start;
}

body.page-app-shell .brand-lockup {
    align-self: center;
}

/* mi cuenta: fondo plano (ver bloque "mi cuenta" en perfil.css) */
body.page-cuenta .brand-lockup {
    display: none;
}

body.page-cuenta .footer,
body.page-home .footer {
    display: none;
}

body.page-login #theme-toggle {
    display: none;
}

.cuenta-topbar-logo {
    position: fixed;
    top: 18px;
    left: 20px;
    z-index: 31;
    display: block;
}

.cuenta-topbar-logo img {
    height: 40px;
    width: auto;
    display: block;
}

.footer {
    background: var(--superficie-card);
    border-top: 1px solid var(--borde);
    font-family: var(--font-body);
    color: var(--texto-sobre-superficie-secundario);
}

.footer__top {
    max-width: min(1800px, 94vw);
    margin: 0 auto;
    padding: 56px 32px 40px;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer__brand-logo {
    height: 40px;
    width: auto;
    display: block;
    margin-bottom: 16px;
}

.footer__tagline {
    font-size: .92rem;
    line-height: 1.55;
    max-width: 30ch;
    margin: 0;
}

.footer__heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: var(--texto-sobre-superficie);
    margin: 0 0 18px;
}

.footer__links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer__links a {
    font-size: .92rem;
    color: var(--texto-sobre-superficie-secundario);
    text-decoration: none;
}

.footer__links a:hover {
    color: var(--azul);
}

.footer__contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.footer__contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .92rem;
}

.footer__contact svg {
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    stroke: var(--verde);
}

.footer__social {
    display: flex;
    gap: 10px;
}

.footer__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid var(--borde);
    color: var(--texto-sobre-superficie-secundario);
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.footer__social a:hover {
    border-color: var(--azul);
    color: var(--azul);
    background: color-mix(in srgb, var(--azul) 10%, transparent);
}

.footer__social svg {
    width: 17px;
    height: 17px;
}

.footer__bottom {
    max-width: min(1800px, 94vw);
    margin: 0 auto;
    padding: 20px 32px 32px;
    border-top: 1px solid var(--borde);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer__copyright,
.footer__institucion {
    font-size: .8rem;
    letter-spacing: .02em;
    margin: 0;
}

@media (max-width: 760px) {
    .footer__top {
        grid-template-columns: 1fr 1fr;
        padding: 40px 24px 32px;
    }

    .footer__bottom {
        padding: 16px 24px 24px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* ---------- check (confirmación) ---------- */

.check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--verde);
    color: #fff;
    font-size: 2.2rem;
    line-height: 1;
    margin: 0 auto 20px;
    animation: check-pop .4s cubic-bezier(.2, .9, .3, 1.2) both;
}

@keyframes check-pop {
    0% { transform: scale(.4); opacity: 0; }
    70% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .check { animation: none; }
}

