@font-face {
    font-family: 'LT Wave Alt';
    src: url('../fonts/LTWaveAlt-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/Manrope-VariableFont_wght.ttf') format('truetype');
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --blue-deep: #0a1f8f;
    --blue: #2447bd;
    --sky: #578dda;
    --green: #8ddc64;
    --green-soft: #c5e09b;
    --ink: #142251;
    --slate: #5f6b88;
    --canvas: #f4f8ff;
    --white: #ffffff;
}

* { box-sizing: border-box; }

body {
    min-width: 320px;
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: 'Manrope', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.portal-shell {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    isolation: isolate;
    padding: 28px clamp(24px, 7vw, 112px) 22px;
    background:
        radial-gradient(circle at 11% 9%, rgba(141, 220, 100, .27), transparent 26rem),
        radial-gradient(circle at 94% 30%, rgba(87, 141, 218, .20), transparent 28rem),
        linear-gradient(135deg, #fbfdff 0%, #f2f7ff 70%, #effae9 100%);
}

.portal-shell::after {
    position: absolute;
    z-index: -1;
    top: 185px;
    right: -155px;
    width: min(42vw, 570px);
    height: min(42vw, 570px);
    border: 1px solid rgba(36, 71, 189, .14);
    border-radius: 50%;
    box-shadow: 0 0 0 42px rgba(36, 71, 189, .035), 0 0 0 84px rgba(36, 71, 189, .025);
    content: '';
}

.portal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1260px;
    margin: 0 auto;
}

.brand { display: inline-flex; align-items: center; }
.brand {
    padding: 10px 15px 9px;
    border: 1px solid rgba(141, 220, 100, .5);
    border-radius: 15px;
    background: var(--blue-deep);
    box-shadow: 0 10px 25px rgba(10, 31, 143, .18);
}
.brand img { display: block; width: 154px; height: auto; }

.company-link {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    color: var(--blue-deep);
    font-size: .82rem;
    font-weight: 750;
    letter-spacing: .015em;
    text-decoration: none;
}

.company-link:hover { color: #0a8d35; }

.hero {
    max-width: 1260px;
    margin: clamp(68px, 11vh, 132px) auto 0;
}

.eyebrow, .system-card__label {
    margin: 0;
    color: #317b35;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .15em;
}

h1, h2, p { margin-top: 0; }

h1 {
    max-width: 780px;
    margin: 13px 0 20px;
    color: var(--blue-deep);
    font-family: 'LT Wave Alt', 'Manrope', sans-serif;
    font-size: clamp(3rem, 6.1vw, 5.9rem);
    font-weight: 700;
    line-height: .96;
    letter-spacing: -.045em;
}

.hero-copy {
    max-width: 540px;
    margin-bottom: 0;
    color: var(--slate);
    font-size: clamp(1rem, 1.35vw, 1.16rem);
    font-weight: 520;
    line-height: 1.7;
}

.systems {
    max-width: 1260px;
    margin: clamp(55px, 8vh, 96px) auto 36px;
}

.systems-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.systems-heading h2 { margin-bottom: 0; color: var(--blue-deep); font-family: 'LT Wave Alt', 'Manrope', sans-serif; font-size: clamp(1.75rem, 2.8vw, 2.5rem); letter-spacing: -.03em; }
.systems-heading p { max-width: 320px; margin-bottom: 2px; color: var(--slate); font-size: .87rem; line-height: 1.5; text-align: right; }

.system-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

.system-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 385px;
    padding: 0 0 25px;
    overflow: hidden;
    border: 1px solid rgba(25, 54, 127, .09);
    border-radius: 22px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 14px 35px rgba(31, 55, 123, .08);
    text-decoration: none;
    transition: transform .22s ease, box-shadow .22s ease;
}

a.system-card:hover, a.system-card:focus-visible { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(18, 37, 100, .17); outline: none; }
a.system-card:focus-visible { box-shadow: 0 0 0 4px rgba(87, 141, 218, .34), 0 20px 40px rgba(18, 37, 100, .17); }

.system-banner {
    position: relative;
    display: block;
    height: 160px;
    overflow: hidden;
    border-bottom: 1px solid rgba(25, 54, 127, .07);
    background: #edf3ff;
}

.system-banner::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10, 31, 143, .1), transparent 64%);
    content: '';
}

.system-banner img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.system-card--recruitment .system-banner img { object-position: 67% center; }
.system-card--moodle .system-banner img { object-position: 65% center; }
.system-card--tickets .system-banner img { object-position: 65% center; }

.system-card__content { display: grid; gap: 9px; padding: 23px 25px 0; }
.system-card__content strong { color: var(--ink); font-family: 'LT Wave Alt', 'Manrope', sans-serif; font-size: 1.74rem; letter-spacing: -.025em; }
.system-card__content > span:last-child { color: var(--slate); font-size: .9rem; line-height: 1.58; }
.card-action { padding: 0 25px; margin-top: auto; color: var(--blue-deep); font-size: .88rem; font-weight: 800; }
.card-action span { margin-left: 7px; font-size: 1.1rem; }
.system-card--moodle .card-action { color: #2451bc; }
.system-card--tickets .card-action { color: #277634; }

.portal-footer { display: flex; justify-content: space-between; max-width: 1260px; margin: 0 auto; color: #73809b; font-size: .72rem; }

@media (max-width: 860px) {
    .system-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .system-card:last-child { grid-column: span 2; }
}

@media (max-width: 600px) {
    .portal-shell { padding: 22px 20px 18px; }
    .brand { padding: 8px 11px; border-radius: 12px; }
    .brand img { width: 126px; }
    .company-link { font-size: .72rem; }
    .hero { margin-top: 72px; }
    h1 { font-size: clamp(2.85rem, 14vw, 4.2rem); }
    .systems { margin-top: 64px; }
    .systems-heading { align-items: start; flex-direction: column; gap: 8px; }
    .systems-heading p { text-align: left; }
    .system-grid { grid-template-columns: 1fr; }
    .system-card, .system-card:last-child { min-height: 340px; grid-column: auto; }
    .system-banner { height: 150px; }
    .portal-footer { gap: 10px; flex-direction: column; margin-top: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .system-card { transition: none; }
}

/* Portal compacto: mismos recursos de marca, prioridad a las plataformas. */
body { min-width: 0; background: #f6f8fc; }
.portal-shell { padding: 0 0 24px; background: #f6f8fc; overflow: visible; }
.portal-shell::after { display: none; }
.portal-header { max-width: none; min-height: 100px; padding: 12px max(24px, calc((100% - 1160px) / 2)); background: #0a1f8f; border-bottom: 4px solid #8ddc64; gap: 20px; }
.brand { padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; flex-shrink: 0; }
.brand img { width: 148px; }
.company-link { color: #fff; min-height: 44px; font-size: .85rem; }
.company-link:hover { color: #c5e09b; }
a:focus-visible { outline: 3px solid #8ddc64; outline-offset: 6px; }
.hero, .systems, .portal-footer { width: calc(100% - 48px); max-width: 1160px; }
.hero { margin: 36px auto 0; }
.eyebrow { font-size: .69rem; letter-spacing: .14em; }
h1 { max-width: none; margin: 10px 0 12px; font-size: clamp(1.9rem, 3.5vw, 3rem); line-height: 1.12; letter-spacing: -.035em; }
.hero-copy { font-size: 1rem; line-height: 1.5; max-width: none; }
.systems { margin: 30px auto 28px; }
.systems-heading { align-items: center; margin-bottom: 16px; gap: 12px; }
.systems-heading h2 { font-family: Manrope, sans-serif; font-size: 1.05rem; font-weight: 800; letter-spacing: 0; }
.systems-heading p { font-size: .8rem; }
.system-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.system-card, .system-card:last-child { grid-column: auto; min-height: 0; padding: 0 0 22px; border-radius: 18px; background: #fff; box-shadow: 0 5px 18px rgba(20,34,81,.05); }
.system-banner { height: auto; aspect-ratio: 1.9; max-height: 180px; }
.system-banner img { object-position: center; }
.system-card__content { padding: 20px 22px 22px; gap: 10px; }
.system-card__content strong { font-size: clamp(1.35rem, 2vw, 1.65rem); line-height: 1.2; }
.system-card__content > span:last-child { font-size: .9rem; }
.system-card__label { font-size: .64rem; letter-spacing: .12em; }
.card-action { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin: auto 22px 0; padding: 10px 14px; border-radius: 9px; font-size: .8rem; background: #edf2fa; color: #34456b; }
.system-card--moodle .card-action, .system-card--tickets .card-action { color: #34456b; }
a.system-card .card-action { background: #0a1f8f; color: white; }
.portal-footer { padding-top: 20px; border-top: 1px solid #dce2ed; color: #596680; font-size: .75rem; }
@media (max-width: 900px) {
    .system-grid { grid-template-columns: 1fr; gap: 16px; }
    .system-card, .system-card:last-child { display: grid; grid-template-columns: 190px 1fr; grid-template-rows: 1fr auto; padding: 0; }
    .system-banner { grid-row: 1 / 3; height: 100%; aspect-ratio: auto; min-height: 206px; max-height: none; }
    .system-card--tickets .system-banner img { object-position: 88% center; }
    .system-card__content { padding: 20px 22px 14px; }
    .card-action { margin: 0 22px 18px; }
    .systems-heading { flex-direction: row; }
}
@media (max-width: 520px) {
    .portal-header { min-height: 88px; padding: 10px 18px; gap: 12px; }
    .brand img { width: 124px; }
    .company-link { font-size: .72rem; }
    .hero, .systems, .portal-footer { width: calc(100% - 32px); }
    .hero { margin-top: 24px; }
    h1 { font-size: 2rem; }
    .hero-copy { font-size: .9rem; }
    .systems { margin-top: 24px; }
    .systems-heading p { display: none; }
    .system-card, .system-card:last-child { grid-template-columns: 104px minmax(0, 1fr); }
    .system-banner { min-height: 200px; }
    .system-banner img { object-position: 73% center; }
    .system-card--tickets .system-banner img { object-position: 92% center; }
    .system-card__content { padding: 16px 14px 12px; gap: 8px; }
    .system-card__content strong { font-size: 1.25rem; overflow-wrap: break-word; }
    .system-card__content > span:last-child { font-size: .8rem; line-height: 1.5; }
    .system-card__label { font-size: .56rem; letter-spacing: .06em; }
    .card-action { margin: 0 14px 14px; font-size: .72rem; padding: 9px; }
    .portal-footer { flex-direction: column; gap: 8px; }
}
