/* 1. @font-face */
@font-face {
    font-family: "Readex Pro Arabic";
    src: url("/fonts/readex-pro-arabic-v27.woff2?v=readex-arabic-v27") format("woff2");
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
}

/* ============ Design Tokens ============ */
:root {
    color-scheme: light;
    --navy-950: #04101d;
    --navy-900: #071d33;
    --navy-800: #0b2946;
    --navy-700: #103a5e;
    --navy-600: #174d7a;
    --blue-600: #126ba8;
    --blue-500: #1c86cb;
    --blue-400: #4fa8e0;
    --blue-100: #e5f2fb;
    --teal-700: #056157;
    --teal-600: #087e75;
    --teal-500: #0aa196;
    --teal-100: #e3f6f3;
    --gold-600: #9a6d1b;
    --gold-500: #b98525;
    --gold-400: #d9a13d;
    --gold-100: #fbf3e0;
    --ink: #0f2438;
    --ink-soft: #4d6377;
    --muted: #7488a0;
    --line: #dfe8f0;
    --line-soft: #eef3f8;
    --white: #ffffff;
    --page: #f5f8fc;

    --hero-bg: #060e1a;
    --hero-bg-end: #0a1930;
    --glow-blue: rgba(18, 107, 168, .35);
    --glow-teal: rgba(8, 126, 117, .30);
    --glow-gold: rgba(185, 133, 37, .22);

    --r-xs: 8px;
    --r-sm: 12px;
    --r-md: 16px;
    --r-lg: 22px;
    --r-xl: 30px;
    --r-full: 999px;

    --shadow-sm: 0 2px 8px rgba(11, 41, 70, .05);
    --shadow-md: 0 12px 32px rgba(11, 41, 70, .09), 0 2px 8px rgba(11, 41, 70, .05);
    --shadow-lg: 0 28px 60px rgba(11, 41, 70, .14), 0 6px 16px rgba(11, 41, 70, .07);
    --shadow-xl: 0 40px 90px rgba(11, 41, 70, .22), 0 10px 24px rgba(11, 41, 70, .10);

    --ease-out: cubic-bezier(.22, 1, .36, 1);
    --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* ============ Reset ============ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--page);
    font-family: "Readex Pro Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
    line-height: 1.75;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

svg {
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

button {
    font: inherit;
}

/* 4. Utilities */
.page-shell {
    width: min(1200px, calc(100% - 48px));
    margin-inline: auto;
}
.skip-link {
    position: fixed;
    z-index: 200;
    transform: translateY(-100%);
    transition: transform 0.3s var(--ease-out);
    padding: 10px 20px;
    background: var(--white);
    color: var(--navy-900);
}
.skip-link:focus {
    transform: translateY(0);
}
.badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 14px 7px 12px;
    color: var(--navy-700);
    background: rgba(255, 255, 255, .7);
    border: 1px solid var(--line);
    border-radius: var(--r-full);
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: .2px;
    backdrop-filter: blur(8px);
}

.badge::before {
    width: 8px;
    height: 8px;
    background: var(--gold-500);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(185, 133, 37, .55);
    content: "";
    animation: pulse-dot 2.4s ease-out infinite;
}

.badge--hero {
    color: var(--white);
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    gap: 8px;
}

.badge--hero::before {
    background: var(--gold-400);
    box-shadow: 0 0 0 0 rgba(217, 161, 61, .6);
}

.badge--hero svg {
    width: 16px;
    height: 16px;
}
.gradient-text {
    background: linear-gradient(100deg, var(--navy-800) 0%, var(--blue-600) 25%, var(--teal-600) 55%, var(--gold-500) 80%, var(--navy-800) 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradient-flow 9s ease-in-out infinite;
}

/* 5. Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 12px;
    animation: header-enter 600ms var(--ease-out);
}
.site-header__inner {
    min-height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 8px 10px 8px 18px;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(223,232,240,.7);
    border-radius: var(--r-full);
    box-shadow: 0 10px 30px rgba(11, 41, 70, .07), 0 2px 6px rgba(11, 41, 70, .04);
}
.school-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.school-brand picture {
    animation: brand-float 5s alternate infinite ease-in-out;
}
.school-brand img {
    width: 46px;
}
.school-brand span {
    display: flex;
    flex-direction: column;
}
.school-brand strong {
    color: var(--navy-900);
    font-size: 15.5px;
    font-weight: 800;
    white-space: nowrap;
}
.school-brand small {
    color: var(--gold-600);
    font-size: 11.5px;
    font-weight: 700;
}
.header-access {
    display: flex;
    gap: 8px;
}
.header-access a {
    position: relative;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: var(--r-full);
    font-size: 13px;
    font-weight: 800;
    overflow: hidden;
    transition: transform .2s var(--ease-out), box-shadow .25s var(--ease-out), background-color .2s ease, color .2s ease, border-color .2s ease;
}
.header-access svg {
    width: 17px;
    height: 17px;
}
.header-access__link--staff {
    color: var(--white);
    background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
    box-shadow: 0 8px 20px rgba(11, 41, 70, .22);
}
.header-access__link--staff:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(11, 41, 70, .30);
}
.header-access__link--student {
    color: var(--white);
    background: linear-gradient(135deg, var(--teal-700), var(--teal-500));
    box-shadow: 0 8px 20px rgba(8, 126, 117, .22);
}
.header-access__link--student:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(8, 126, 117, .30);
}
.header-access__link--guide {
    color: var(--navy-800);
    background: var(--gold-100);
    border-color: #ebd6a8;
}
.header-access__link--guide:hover {
    transform: translateY(-2px);
    background: #f7e8c5;
    box-shadow: 0 10px 24px rgba(154, 109, 27, .15);
}
.header-access__official {
    color: var(--navy-700);
    background: var(--white);
    border-color: var(--line) !important;
}
.header-access__official:hover {
    color: var(--blue-600);
    border-color: var(--blue-400) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(11, 41, 70, .09);
}

/* 6. Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: max(100vh, 700px);
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(180deg, var(--hero-bg) 0%, var(--hero-bg-end) 40%, #0c2240 70%, var(--page) 100%);
}
.hero__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

/* Aurora Layers */
.aurora {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    will-change: transform;
}
.aurora--1 {
    width: 600px;
    height: 600px;
    top: -15%;
    inset-inline-end: -10%;
    background: radial-gradient(circle, rgba(18,107,168,.40), transparent 65%);
    animation: aurora-drift-1 15s ease-in-out infinite;
}
.aurora--2 {
    width: 500px;
    height: 500px;
    bottom: -10%;
    inset-inline-start: -5%;
    background: radial-gradient(circle, rgba(8,126,117,.35), transparent 65%);
    animation: aurora-drift-2 18s ease-in-out infinite;
    animation-delay: -5s;
}
.aurora--3 {
    width: 400px;
    height: 400px;
    top: 35%;
    inset-inline-start: 40%;
    background: radial-gradient(circle, rgba(185,133,37,.25), transparent 65%);
    animation: aurora-drift-3 20s ease-in-out infinite;
    animation-delay: -10s;
}
.aurora--4 {
    width: 500px;
    height: 500px;
    top: 10%;
    inset-inline-start: 20%;
    background: radial-gradient(circle, rgba(79,168,224,.20), transparent 65%);
    animation: aurora-drift-4 22s ease-in-out infinite;
    animation-delay: -7s;
}

/* Mesh Grid */
.hero__mesh {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
    pointer-events: none;
}

/* Particles */
.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}
.particle--1 { width: 4px; height: 4px; background: var(--blue-400); box-shadow: 0 0 8px rgba(79,168,224,.6); top: 75%; inset-inline-start: 12%; animation: particle-float-1 12s ease-in-out infinite; }
.particle--2 { width: 3px; height: 3px; background: var(--teal-500); box-shadow: 0 0 6px rgba(10,161,150,.5); top: 80%; inset-inline-start: 45%; animation: particle-float-2 14s ease-in-out infinite; animation-delay: -3s; }
.particle--3 { width: 5px; height: 5px; background: var(--gold-400); box-shadow: 0 0 10px rgba(217,161,61,.5); top: 70%; inset-inline-end: 20%; animation: particle-float-1 11s ease-in-out infinite; animation-delay: -6s; }
.particle--4 { width: 3px; height: 3px; background: var(--blue-400); top: 85%; inset-inline-end: 35%; animation: particle-float-2 13s ease-in-out infinite; animation-delay: -2s; }
.particle--5 { width: 4px; height: 4px; background: var(--teal-500); top: 65%; inset-inline-start: 70%; animation: particle-float-1 15s ease-in-out infinite; animation-delay: -8s; }
.particle--6 { width: 2px; height: 2px; background: rgba(255,255,255,.6); top: 90%; inset-inline-start: 30%; animation: particle-float-2 10s ease-in-out infinite; animation-delay: -4s; }
.particle--7 { width: 3px; height: 3px; background: var(--gold-400); top: 60%; inset-inline-end: 60%; animation: particle-float-1 16s ease-in-out infinite; animation-delay: -11s; }
.particle--8 { width: 4px; height: 4px; background: var(--blue-500); top: 88%; inset-inline-end: 15%; animation: particle-float-2 12s ease-in-out infinite; animation-delay: -1s; }

/* Hero Fade */
.hero__fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, var(--page), transparent);
    pointer-events: none;
    z-index: 1;
}

/* 7. Hero Content */
.hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    align-items: center;
    gap: 48px;
    padding-block: 140px 100px;
    position: relative;
    z-index: 2;
}
.hero__content {
    color: var(--white);
}
.hero__content h1 {
    margin: 20px 0 8px;
    font-size: clamp(30px, 4.5vw, 56px);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.5px;
    animation: hero-title-enter 900ms var(--ease-out) 300ms backwards;
}
.hero__content .badge--hero {
    animation: fade-rise 600ms var(--ease-out) 100ms backwards;
}
.hero__slogan {
    margin: 0 0 24px;
    font-size: clamp(20px, 2.5vw, 30px);
    font-weight: 800;
    background: linear-gradient(100deg, var(--gold-400), var(--gold-500) 50%, var(--gold-400));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradient-shimmer 4s ease-in-out infinite, fade-rise 700ms ease-out 550ms backwards;
}
.hero__intro {
    max-width: 560px;
    margin: 0;
    color: rgba(200,215,230,.80);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.85;
    animation: fade-rise 700ms ease-out 750ms backwards;
}
.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 38px;
    animation: fade-rise 700ms ease-out 950ms backwards;
}

/* 8. Buttons */
.btn {
    position: relative;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: 1px solid transparent;
    border-radius: var(--r-full);
    font-size: 14.5px;
    font-weight: 800;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
    box-shadow: var(--shadow-sm);
}
.btn > svg:not(.btn__arrow) {
    width: 18px;
    height: 18px;
}
.btn__arrow {
    width: 16px;
    height: 16px;
    transition: transform .25s var(--ease-spring);
}
.btn:hover {
    transform: translateY(-3px);
}
.btn:hover .btn__arrow {
    transform: translateX(-4px);
}
.btn--primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--navy-700) 0%, var(--blue-600) 50%, var(--navy-700) 100%);
    background-size: 200% 200%;
    animation: btn-gradient-shift 5s ease-in-out infinite;
    box-shadow: 0 14px 34px rgba(11,41,70,.35), 0 0 20px rgba(18,107,168,.15);
}
.btn--primary:hover {
    box-shadow: 0 22px 50px rgba(11,41,70,.45), 0 0 30px rgba(18,107,168,.25);
}
.btn--primary::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.20) 50%, transparent 70%);
    transform: translateX(-120%);
    animation: shimmer-sweep 4s ease-in-out 2s infinite;
}
.btn--teal {
    color: var(--white);
    background: linear-gradient(135deg, var(--teal-700) 0%, var(--teal-500) 50%, var(--teal-700) 100%);
    background-size: 200% 200%;
    animation: btn-gradient-shift 5s ease-in-out infinite;
    box-shadow: 0 14px 34px rgba(5,97,87,.35), 0 0 20px rgba(8,126,117,.15);
}
.btn--teal:hover {
    box-shadow: 0 22px 50px rgba(5,97,87,.45), 0 0 30px rgba(8,126,117,.25);
}
.btn--teal::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.20) 50%, transparent 70%);
    transform: translateX(-120%);
    animation: shimmer-sweep 4s ease-in-out 3s infinite;
}

/* 9. Hero Visual */
.hero__visual {
    position: relative;
    min-height: 480px;
    display: grid;
    place-items: center;
    animation: fade-rise 1000ms ease-out 200ms backwards;
}
.hero__glow {
    position: absolute;
    inset: 5%;
    background: radial-gradient(circle at 50% 45%, rgba(18,107,168,.25), transparent 55%), radial-gradient(circle at 30% 70%, rgba(8,126,117,.20), transparent 50%), radial-gradient(circle at 70% 30%, rgba(185,133,37,.15), transparent 50%);
    filter: blur(25px);
    animation: glow-breathe 6s ease-in-out infinite;
}
.hero__frame {
    position: relative;
    z-index: 2;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.1), inset 0 1px 0 rgba(255,255,255,.1);
}
.hero__frame::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1.5px solid rgba(255,255,255,.12);
    border-radius: inherit;
    z-index: 3;
    pointer-events: none;
    animation: frame-glow 4s ease-in-out infinite;
}
.hero__frame img {
    width: 100%;
    max-width: 520px;
    height: auto;
    display: block;
    animation: image-float 7s ease-in-out infinite alternate;
}
.hero__ring {
    position: absolute;
    border: 1.5px solid;
    border-radius: 50%;
    pointer-events: none;
}
.hero__ring--1 {
    inset: 8%;
    border-color: rgba(18,107,168,.18);
    border-style: dashed;
    animation: spin-slow 35s linear infinite;
}
.hero__ring--2 {
    inset: -6%;
    border-color: rgba(8,126,117,.12);
    animation: spin-slow 50s linear infinite reverse;
}
.hero__ring--3 {
    inset: -15%;
    border-color: rgba(185,133,37,.08);
    border-style: dotted;
    animation: spin-slow 65s linear infinite;
}

/* 10. Hero Scroll Indicator */
.hero__scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(50%);
    width: 34px;
    height: 54px;
    display: grid;
    place-items: center;
    border: 1.5px solid rgba(255,255,255,.2);
    border-radius: var(--r-full);
    z-index: 5;
    transition: border-color 0.3s;
}
.hero__scroll:hover {
    border-color: rgba(255,255,255,.5);
}
.hero__scroll::before {
    content: "";
    width: 4px;
    height: 8px;
    background: rgba(255,255,255,.6);
    border-radius: var(--r-full);
    animation: scroll-dot 2s ease-in-out infinite;
}

/* 11. Section Head */
.section-head {
    max-width: 800px;
    margin: 0 auto 50px;
    text-align: center;
}
.section-head h2 {
    margin: 14px 0 12px;
    color: var(--navy-900);
    font-size: clamp(26px, 3.4vw, 40px);
    line-height: 1.3;
    font-weight: 800;
}
.section-head p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.85;
}

/* 12. Portals Section */
.portals {
    position: relative;
    padding: 100px 0 110px;
    background: radial-gradient(ellipse 50% 50% at 100% 0%, rgba(18,107,168,.04), transparent), radial-gradient(ellipse 50% 50% at 0% 100%, rgba(8,126,117,.03), transparent), #ffffff;
    border-block: 1px solid var(--line-soft);
}
.portals__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}
.portal-card {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 38px 36px 36px;
    background: rgba(255,255,255,.70);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(223,232,240,.6);
    border-radius: 28px;
    box-shadow: 0 4px 20px rgba(11,41,70,.05), 0 20px 50px rgba(11,41,70,.08);
    overflow: hidden;
    isolation: isolate;
    transition: transform .4s var(--ease-spring), box-shadow .4s ease, border-color .3s ease;
}
.portal-card::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1.5px;
    background: linear-gradient(135deg, transparent 30%, rgba(18,107,168,.40) 50%, transparent 70%);
    background-size: 300% 300%;
    border-radius: inherit;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity .4s ease;
    pointer-events: none;
    z-index: 1;
    animation: gradient-border-shift 6s ease infinite;
}
.portal-card:hover {
    transform: translateY(-10px) scale(1.01);
    border-color: transparent;
    box-shadow: 0 30px 70px rgba(11,41,70,.16), 0 8px 20px rgba(11,41,70,.08);
}
.portal-card:hover::before {
    opacity: 1;
}

/* Portal Card Shimmer */
.portal-card__shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 40%, rgba(255,255,255,.5) 50%, transparent 60%);
    transform: translateX(-100%);
    pointer-events: none;
    z-index: 0;
}
.portal-card:hover .portal-card__shimmer {
    animation: card-shimmer 1s ease forwards;
}

.portal-card--student::before {
    background: linear-gradient(135deg, transparent 30%, rgba(8,126,117,.40) 50%, transparent 70%);
    background-size: 300% 300%;
}

.portal-card__ribbon {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}
.portal-card--staff .portal-card__ribbon {
    background: linear-gradient(90deg, var(--navy-700), var(--blue-500));
}
.portal-card--student .portal-card__ribbon {
    background: linear-gradient(90deg, var(--teal-700), var(--teal-500));
}

.portal-card__heading {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}
.portal-card__heading > div > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}
.portal-card__heading h3 {
    color: var(--navy-900);
    font-size: 24px;
    font-weight: 800;
}
.portal-card__icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    color: var(--white);
    border-radius: 22px;
    box-shadow: var(--shadow-md);
    animation: icon-float 5s alternate infinite;
    position: relative;
}
.portal-card--staff .portal-card__icon {
    background: linear-gradient(135deg, var(--navy-700), var(--blue-600));
}
.portal-card--student .portal-card__icon {
    background: linear-gradient(135deg, var(--teal-700), var(--teal-500));
    animation-delay: -2s;
}
.portal-card__icon::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid currentColor;
    animation: pulse-ring 2s infinite;
}
.portal-card__icon svg {
    width: 30px;
    height: 30px;
    stroke-width: 1.9;
}
.portal-card > p {
    margin: 0 0 22px;
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.85;
}
.portal-features {
    display: grid;
    gap: 12px;
    margin: 0 0 32px;
    padding: 0;
    list-style: none;
}
.portal-features li {
    display: flex;
    gap: 12px;
    color: #2b4258;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.6;
    align-items: center;
}
.portal-features li::before {
    content: "";
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-block;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23126ba8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}
.portal-card--staff .portal-features li::before {
    background-color: var(--blue-100);
}
.portal-card--student .portal-features li::before {
    background-color: var(--teal-100);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23087e75' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
}

.portal-card__action {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    align-self: stretch;
    margin-top: auto;
    padding: 12px 24px;
    border-radius: var(--r-full);
    font-size: 14.5px;
    font-weight: 800;
    transition: all 0.3s var(--ease-spring);
    color: var(--white);
}
.portal-card--staff .portal-card__action {
    background: linear-gradient(135deg, var(--navy-800), var(--blue-600));
    box-shadow: 0 12px 26px rgba(11, 41, 70, .22);
}
.portal-card--student .portal-card__action {
    background: linear-gradient(135deg, var(--teal-700), var(--teal-500));
    box-shadow: 0 12px 26px rgba(8, 126, 117, .22);
}
.portal-card__action svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s var(--ease-spring);
}
.portal-card__action:hover {
    transform: translateY(-3px);
}

.portal-card--staff .portal-card__action:hover {
    box-shadow: 0 20px 40px rgba(11, 41, 70, .30);
}

.portal-card--student .portal-card__action:hover {
    box-shadow: 0 20px 40px rgba(8, 126, 117, .30);
}

.portal-card__action:hover svg {
    transform: translateX(-4px);
}

/* 13. Features Section */
.features {
    padding: 60px 0 20px;
    background: var(--white);
}
.features__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
.feature {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 26px;
    background: linear-gradient(140deg, #fbfdff, #f5f8fc);
    border: 1px solid var(--line-soft);
    border-radius: 22px;
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.feature:hover {
    transform: translateY(-5px);
    border-color: var(--line);
    box-shadow: var(--shadow-md);
}
.feature__icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: var(--blue-600);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    position: relative;
}
.feature__icon::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    background: currentColor;
    opacity: 0.08;
    animation: icon-glow-pulse 3s ease-in-out infinite;
}
.feature__icon svg {
    width: 22px;
    height: 22px;
}
.feature:nth-child(2) .feature__icon { color: var(--teal-600); }
.feature:nth-child(3) .feature__icon { color: var(--gold-600); }

.feature__copy strong {
    display: block;
    color: var(--navy-900);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
}
.feature__copy span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

/* 14. Official CTA Section */
.official {
    position: relative;
    margin: 80px 0 0;
    padding: 80px 0;
    color: var(--white);
    background: radial-gradient(circle at top left, rgba(18,107,168,.15), transparent 40%), radial-gradient(circle at bottom right, rgba(185,133,37,.15), transparent 40%), var(--navy-950);
    overflow: hidden;
}
.official::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(circle, black 30%, transparent 70%);
    pointer-events: none;
}
.official__inner {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 48px;
}
.official__copy {
    max-width: 720px;
}
.official__copy .badge {
    color: var(--white);
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.18);
}
.official__copy .badge::before {
    background: var(--gold-400);
    box-shadow: 0 0 8px rgba(217,161,61,.5);
}
.official h2 {
    margin: 16px 0 10px;
    color: var(--white);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.35;
    font-weight: 800;
}
.official p {
    margin: 0;
    color: rgba(219,230,237,.82);
    font-size: 15.5px;
    line-height: 1.85;
}
.official__cta {
    min-width: 220px;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    color: var(--navy-900);
    background: linear-gradient(135deg, var(--white), #f0f6fb);
    border-radius: var(--r-full);
    font-size: 14.5px;
    font-weight: 800;
    box-shadow: 0 18px 40px rgba(0,0,0,.28), inset 0 1px 0 var(--white);
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s ease;
}
.official__cta:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 50px rgba(0,0,0,.35), inset 0 1px 0 var(--white);
}
.official__cta svg {
    width: 18px;
    height: 18px;
    animation: external-nudge 3s alternate infinite;
}

/* 15. Footer */
.site-footer {
    color: #b9cbda;
    background: var(--navy-950);
    border-top: 1px solid rgba(255,255,255,.06);
}
.site-footer__inner {
    min-height: 78px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
    padding-block: 22px;
}
.site-footer p {
    margin: 0;
    font-size: 13px;
}
.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    font-size: 13px;
    font-weight: 700;
}
.site-footer a {
    transition: color .2s;
}
.site-footer a:hover {
    color: var(--white);
}
/* 16. Focus */
:where(a, button):focus-visible {
    outline: 3px solid var(--gold-400);
    outline-offset: 4px;
    border-radius: var(--r-sm);
}

/* 17. Keyframes */
@keyframes header-enter {
    from { opacity: 0; transform: translateY(-18px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-rise {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes hero-title-enter {
    from { opacity: 0; clip-path: inset(100% 0 0 0); }
    to { opacity: 1; clip-path: inset(0); }
}
@keyframes gradient-flow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
@keyframes gradient-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
@keyframes pulse-dot {
    0% { box-shadow: 0 0 0 0 rgba(185,133,37,.55); }
    70% { box-shadow: 0 0 0 10px rgba(185,133,37,0); }
    100% { box-shadow: 0 0 0 0 rgba(185,133,37,0); }
}
@keyframes aurora-drift-1 {
    0%, 100% { transform: translate(0,0) scale(1); opacity: .6; }
    25% { transform: translate(-8%,5%) scale(1.15); opacity: .8; }
    50% { transform: translate(-4%,-10%) scale(.95); opacity: .5; }
    75% { transform: translate(8%,-3%) scale(1.08); opacity: .7; }
}
@keyframes aurora-drift-2 {
    0%, 100% { transform: translate(0,0) scale(1); opacity: .5; }
    30% { transform: translate(10%,-8%) scale(1.1); opacity: .7; }
    60% { transform: translate(5%,10%) scale(.9); opacity: .4; }
    90% { transform: translate(-8%,5%) scale(1.05); opacity: .6; }
}
@keyframes aurora-drift-3 {
    0%, 100% { transform: translate(0,0) scale(1); opacity: .4; }
    33% { transform: translate(-12%,8%) scale(1.2); opacity: .6; }
    66% { transform: translate(8%,-6%) scale(.85); opacity: .3; }
}
@keyframes aurora-drift-4 {
    0%, 100% { transform: translate(0,0) scale(1); opacity: .3; }
    40% { transform: translate(6%,10%) scale(1.1); opacity: .5; }
    80% { transform: translate(-10%,-4%) scale(.95); opacity: .35; }
}
@keyframes particle-float-1 {
    0% { transform: translateY(0) scale(0); opacity: 0; }
    8% { opacity: .7; transform: translateY(-20px) scale(1); }
    85% { opacity: .3; }
    100% { transform: translateY(-500px) scale(.4); opacity: 0; }
}
@keyframes particle-float-2 {
    0% { transform: translate(0,0) scale(0); opacity: 0; }
    10% { opacity: .6; transform: translate(15px,-10px) scale(1); }
    50% { transform: translate(-10px,-250px) scale(.8); opacity: .4; }
    100% { transform: translate(20px,-550px) scale(.3); opacity: 0; }
}
@keyframes glow-breathe {
    0%, 100% { opacity: .8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.06); }
}
@keyframes image-float {
    from { transform: translateY(0) rotate(0deg); }
    to { transform: translateY(-16px) rotate(.5deg); }
}
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes brand-float {
    from { transform: translateY(0); }
    to { transform: translateY(-3px); }
}
@keyframes icon-float {
    from { transform: translateY(0); }
    to { transform: translateY(-6px); }
}
@keyframes pulse-ring {
    0% { transform: scale(1); opacity: .55; }
    100% { transform: scale(1.55); opacity: 0; }
}
@keyframes scroll-dot {
    0%, 100% { transform: translateY(-5px); opacity: .4; }
    50% { transform: translateY(6px); opacity: 1; }
}
@keyframes shimmer-sweep {
    0%, 100% { transform: translateX(-120%); }
    50% { transform: translateX(120%); }
}
@keyframes btn-gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
@keyframes card-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}
@keyframes gradient-border-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
@keyframes icon-glow-pulse {
    0%, 100% { opacity: .06; transform: scale(1); }
    50% { opacity: .12; transform: scale(1.08); }
}
@keyframes external-nudge {
    from { transform: translate(0,0); }
    to { transform: translate(-3px,-3px); }
}
@keyframes frame-glow {
    0%, 100% { border-color: rgba(255,255,255,.08); }
    50% { border-color: rgba(255,255,255,.20); }
}
/* 18. Scroll-Driven Animations */
@supports (animation-timeline: view()) {
    .section-head, .portal-card, .feature, .official__inner {
        animation: scroll-reveal linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 35%;
    }
    .portal-card:nth-child(2) {
        animation-range: entry 5% entry 40%;
    }
    @keyframes scroll-reveal {
        from { opacity: 0; transform: translateY(50px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

/* 19. Responsive Design */
@media (max-width: 1040px) {
    .hero__inner { gap: 32px; padding-block: 120px 80px; }
    .hero__visual { min-height: 400px; }
    .header-access__official span { display: none; }
    .header-access a { padding-inline: 14px; }
}

@media (max-width: 900px) {
    .hero { min-height: auto; }
    .hero__inner {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
        padding-block: 100px 60px;
    }
    .hero__content { flex-direction: column; align-items: center; display: flex; }
    .hero__intro { margin-inline: auto; }
    .hero__actions { justify-content: center; }
    .hero__visual { min-height: 340px; }
    .hero__visual img { max-width: 400px; }
    .hero__scroll { display: none; }
    .features__grid { grid-template-columns: 1fr; }
    .official__inner { flex-direction: column; align-items: flex-start; gap: 28px; text-align: start; }
    .official__cta { width: 100%; }
}

@media (max-width: 820px) {
    .page-shell { width: calc(100% - 32px); }
    .site-header { padding-block: 10px; }
    .site-header__inner {
        padding: 10px 12px;
        border-radius: 22px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .school-brand { justify-content: center; }
    .header-access {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr auto;
    }
    .header-access a { min-width: 0; }
    .header-access__official span { display: inline; }
    .portals { padding: 70px 0 76px; }
    .portals__grid { grid-template-columns: 1fr; gap: 22px; }
    .portal-card { padding: 30px 26px 28px; border-radius: 22px; }
}

@media (max-width: 560px) {
    .school-brand { justify-content: flex-start; }
    .school-brand img { width: 40px; }
    .school-brand strong { font-size: 14px; white-space: normal; }
    .school-brand small { font-size: 11px; }
    .header-access { grid-template-columns: 1fr 1fr; }
    .header-access a { font-size: 12px; padding: 8px 12px; }
    .header-access__link--guide { grid-column: 1 / -1; }
    .header-access__official { grid-column: 1 / -1; }
    .hero__inner { padding-block: 80px 40px; }
    .hero__content h1 { font-size: clamp(24px, 6.4vw, 30px); }
    .hero__slogan { font-size: 20px; }
    .hero__intro { font-size: 15px; }
    .hero__actions { display: grid; grid-template-columns: 1fr; width: 100%; }
    .btn { width: 100%; }
    .hero__visual { min-height: 260px; }
    .hero__visual img { max-width: 300px; }
    .hero__frame { border-radius: 18px; }
    .section-head h2 { font-size: 24px; }
    .section-head p { font-size: 14.5px; }
    .portal-card { padding: 26px 22px 24px; border-radius: 20px; }
    .portal-card h3 { font-size: 20px; }
    .portal-card__icon { width: 54px; height: 54px; border-radius: 16px; }
    .portal-card__icon svg { width: 26px; height: 26px; }
    .official { padding: 56px 0; margin-top: 60px; }
    .site-footer__inner { flex-direction: column; align-items: flex-start; gap: 12px; }
    
    .aurora { transform: scale(0.6); transform-origin: center; }
    .particle--5, .particle--6, .particle--7, .particle--8 { display: none; }
}

/* 20. Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}
