/* ==========================================================================
   GOLDHALL FX — design & animation upgrade layer
   Loads AFTER styles.css / student.css / page.css / admin.css and polishes
   the whole site: richer motion, micro-interactions and refined surfaces.
   ========================================================================== */

/* ----- 0. Tokens & global polish ----- */
:root {
  --fx-ease: cubic-bezier(.22, .61, .36, 1);
  --fx-ease-spring: cubic-bezier(.34, 1.4, .44, 1);
  --fx-gold: #d8b45c;
  --fx-gold-bright: #eed488;
  --fx-gold-deep: #a58634;
  --fx-green: #1f5b43;
  --fx-green-deep: #0f2b20;
}

::selection { background: rgba(216, 180, 92, .85); color: #142c21; }

html.fx-ready { scroll-padding-top: 90px; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #10281e; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #3d7a5a, #245540); border-radius: 8px; border: 2px solid #10281e; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #d8b45c, #a58634); }

:focus-visible { outline: 2px solid var(--fx-gold); outline-offset: 2px; border-radius: 4px; }

/* ----- 1. Keyframes ----- */
@keyframes fxRise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fxRiseSmall { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fxSlideLeft { from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fxSlideRight { from { opacity: 0; transform: translateX(36px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fxPop { 0% { opacity: 0; transform: scale(.92) translateY(18px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes fxZoomReveal { from { opacity: 0; transform: scale(.94) translateY(16px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes fxDraw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fxSweep { 0% { transform: translateX(-130%) skewX(-18deg); } 55%, 100% { transform: translateX(230%) skewX(-18deg); } }
@keyframes fxKenBurns { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.14) translate(-1.4%, -1.8%); } }
@keyframes fxMote {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  12% { opacity: var(--fx-mote-o, .5); }
  88% { opacity: var(--fx-mote-o, .5); }
  100% { transform: translateY(-46vh) translateX(3vw); opacity: 0; }
}
@keyframes fxGradient { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }
@keyframes fxFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes fxFloatRing { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(-16px, -20px) rotate(6deg); } }
@keyframes fxPulseSoft { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes fxGlowPulse { 0%, 100% { opacity: .45; } 50% { opacity: .9; } }
@keyframes fxShimmerText { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }
@keyframes fxSpinSlow { to { transform: rotate(360deg); } }
@keyframes fxLetterSpace { from { letter-spacing: .6em; opacity: 0; } to { letter-spacing: 3px; opacity: 1; } }

/* ----- 2. Scroll progress bar ----- */
.fx-progress {
  position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 100000;
  background: linear-gradient(90deg, #a58634, #e8c84e 45%, #f5e6b0 70%, #e8c84e);
  box-shadow: 0 0 14px rgba(232, 200, 78, .75);
  transform: scaleX(0); transform-origin: 0 50%;
  pointer-events: none;
}

/* ----- 3. Reveal-on-scroll system (JS-gated, safe without JS) ----- */
html.fx-ready [data-reveal] { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--fx-ease), transform .8s var(--fx-ease); transition-delay: var(--fx-delay, 0s); will-change: opacity, transform; }
html.fx-ready [data-reveal="left"] { transform: translateX(-42px); }
html.fx-ready [data-reveal="right"] { transform: translateX(42px); }
html.fx-ready [data-reveal="zoom"] { transform: scale(.93) translateY(18px); }
html.fx-ready [data-reveal].fx-in { opacity: 1; transform: none; }

/* ----- 4. Page loader: hall logo with gold rings orbiting it ----- */
.page-loader { background: radial-gradient(circle at 50% 34%, #1d4732, #0b2018 72%); }

.loader-emblem {
  position: relative; width: 168px; height: 168px;
  display: grid; place-items: center; margin-bottom: 26px;
}
.loader-logo {
  position: relative; z-index: 3;
  width: 92px; height: 92px; border-radius: 12px;
  object-fit: contain; background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 0 1px rgba(216, 180, 92, .45);
  animation: loaderLogoIn .8s var(--fx-ease) both;
}
/* soft breathing glow behind the crest */
.loader-glow {
  position: absolute; z-index: 1; width: 116px; height: 116px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 200, 78, .42), rgba(232, 200, 78, 0) 68%);
  animation: loaderPulse 2.4s ease-in-out infinite;
}
/* the three rings: a faint full circle plus one bright arc that travels round */
.loader-ring {
  position: absolute; z-index: 2; border-radius: 50%;
  border: 2px solid rgba(216, 180, 92, .16);
  animation: loaderOrbit var(--dur, 3s) linear infinite;
}
/* bright arc sweeping the ring: conic gradient masked into a hairline */
.loader-ring::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  padding: 2px;
  background: conic-gradient(from 0deg,
    rgba(232, 200, 78, 0) 0deg,
    rgba(232, 200, 78, .12) 70deg,
    #f5e6b0 150deg,
    #e8c84e 190deg,
    rgba(232, 200, 78, 0) 250deg,
    rgba(232, 200, 78, 0) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  filter: drop-shadow(0 0 5px rgba(232, 200, 78, .75));
}
.loader-ring-outer { width: 168px; height: 168px; --dur: 3.4s; }
.loader-ring-mid   { width: 132px; height: 132px; --dur: 2.4s; animation-direction: reverse; }
.loader-ring-mid::after { border-top-color: #f3e3a4; border-right-color: rgba(243, 227, 164, .4); }
.loader-ring-inner { width: 112px; height: 112px; --dur: 1.7s; }

.loader-text {
  animation: fxLetterSpace 1.2s var(--fx-ease) both;
  text-transform: uppercase; font-size: 1rem;
  color: var(--fx-gold, #d8b45c); text-shadow: 0 0 18px rgba(232, 200, 78, .35);
}
.loader-bar {
  width: 148px; height: 2px; margin-top: 16px; border-radius: 2px;
  background: rgba(216, 180, 92, .18); overflow: hidden;
}
.loader-bar span {
  display: block; width: 45%; height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, transparent, #e8c84e, #f5e6b0);
  animation: loaderBar 1.5s ease-in-out infinite;
}

@keyframes loaderOrbit { to { transform: rotate(360deg); } }
@keyframes loaderPulse { 0%, 100% { transform: scale(.92); opacity: .55; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes loaderBar { 0% { transform: translateX(-120%); } 100% { transform: translateX(260%); } }
@keyframes loaderLogoIn { from { opacity: 0; transform: scale(.72) rotate(-6deg); } to { opacity: 1; transform: none; } }

/* ----- 5. Top bar, header & nav micro-interactions ----- */
.top-bar-social a { transition: transform .3s var(--fx-ease-spring), color .3s, background .3s; }
.top-bar-social a:hover { transform: translateY(-3px) scale(1.12); color: var(--fx-gold-bright); }

.header .logo-img img { transition: transform .6s var(--fx-ease); }
.header .logo-section:hover .logo-img img { transform: rotate(-6deg) scale(1.06); }
.header.scrolled { box-shadow: 0 10px 30px rgba(16, 40, 30, .14); }
@media (min-width: 769px) {
  .header, .header.scrolled {
    box-shadow: none;
    border-bottom: 1px solid rgba(200, 168, 78, .22);
  }
}

.main-nav a::after {
  content: ''; position: absolute; left: 26%; right: 26%; bottom: 4px; height: 2px;
  background: linear-gradient(90deg, var(--fx-gold), var(--fx-gold-bright));
  border-radius: 2px; transform: scaleX(0); transform-origin: 50% 50%;
  transition: transform .35s var(--fx-ease);
}
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }

.nav-dropdown-content { border-top: 2px solid var(--fx-gold); }
.nav-dropdown-content a { transition: padding-left .3s var(--fx-ease), background .3s, color .3s; }

/* ----- 6. Hero: Ken Burns, entrance sync, particles, glow ----- */
.hero-slide.active img { animation: fxKenBurns 7.5s var(--fx-ease) forwards; }
.hero-slide img { transform: scale(1.02); }

.hero-overlay {
  background:
    radial-gradient(circle at 78% 22%, rgba(216, 180, 92, .16), transparent 34%),
    linear-gradient(135deg, rgba(20, 46, 33, .9) 0%, rgba(45, 90, 61, .72) 45%, rgba(20, 46, 33, .68) 100%);
}
.hero-overlay::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 34%;
  background: linear-gradient(180deg, transparent, rgba(12, 26, 19, .55));
  pointer-events: none;
}

/* Re-time hero entrance so it plays as the loader fades (fx.js adds .fx-hero-go) */
html.fx-ready .hero .hero-content > *, html.fx-ready .hero .hero-line { animation: none; opacity: 0; }
html.fx-ready .hero .hero-line { width: 120px; transform: scaleX(0); transform-origin: 0 50%; }
html.fx-ready .hero.fx-hero-go .welcome-text { animation: fxRise .7s var(--fx-ease) .05s forwards; }
html.fx-ready .hero.fx-hero-go h2 { animation: fxRise .8s var(--fx-ease) .18s forwards; }
html.fx-ready .hero.fx-hero-go .hero-line { animation: fxDraw .7s var(--fx-ease) .5s forwards; }
html.fx-ready .hero.fx-hero-go .university-name { animation: fxRise .7s var(--fx-ease) .58s forwards; }
html.fx-ready .hero.fx-hero-go .hero-desc { animation: fxRise .7s var(--fx-ease) .72s forwards; }
html.fx-ready .hero.fx-hero-go .hero-btn { animation: fxRise .7s var(--fx-ease) .86s forwards; }

.hero-content h2 { text-shadow: 0 4px 30px rgba(0, 0, 0, .35); }
.hero-dot { box-shadow: 0 0 0 0 rgba(216, 180, 92, 0); }
.hero-dot.active { box-shadow: 0 0 0 5px rgba(216, 180, 92, .22); }

.fx-motes { position: relative; }
.fx-mote {
  position: absolute; bottom: -12px; border-radius: 50%;
  background: radial-gradient(circle, #f5e6b0 0%, #d8b45c 65%, transparent 75%);
  filter: drop-shadow(0 0 6px rgba(232, 200, 78, .8));
  animation: fxMote linear infinite; pointer-events: none; z-index: 1;
}

/* ----- 7. Shared button shine sweep ----- */
.hero-btn, .cta-btn-primary, .cta-btn-secondary, .hub-spotlight-button,
.form-submit, .hub-button, .admin-btn, .page-button, .about-btn, .login-btn .btn {
  position: relative; overflow: hidden; isolation: isolate;
}
.hero-btn::after, .cta-btn-primary::after, .cta-btn-secondary::after, .hub-spotlight-button::after,
.form-submit::after, .hub-button::after, .admin-btn::after, .page-button::after, .about-btn::after, .login-btn .btn::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .45) 50%, transparent 58%);
  transform: translateX(-130%) skewX(-18deg);
}
.hero-btn:hover::after, .cta-btn-primary:hover::after, .cta-btn-secondary:hover::after,
.hub-spotlight-button:hover::after, .form-submit:hover::after, .hub-button:hover::after,
.admin-btn:hover::after, .page-button:hover::after, .about-btn:hover::after, .login-btn:hover .btn::after {
  animation: fxSweep .9s var(--fx-ease);
}

/* ----- 8. Quick links ----- */
.quick-link-card::after {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .28) 50%, transparent 58%);
  transform: translateX(-130%) skewX(-18deg);
}
.quick-link-card:hover::after { animation: fxSweep .9s var(--fx-ease); }
.quick-link-card:hover .quick-link-icon i { animation: fxPulseSoft .7s var(--fx-ease); }

/* ----- 9. Hub spotlight ----- */
.hub-spotlight { background-size: auto, 180% 180%; animation: fxGradient 16s ease-in-out infinite alternate; }
.hub-spotlight::before { animation: fxFloatRing 18s ease-in-out infinite; }
.hub-spotlight-cards a { position: relative; overflow: hidden; }
.hub-spotlight-cards a::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .16) 50%, transparent 58%);
  transform: translateX(-130%) skewX(-18deg);
}
.hub-spotlight-cards a:hover::after { animation: fxSweep .9s var(--fx-ease); }
.hub-spotlight-cards a:hover > i:first-child { animation: fxPulseSoft .7s var(--fx-ease); }
.hub-spotlight-button:hover { box-shadow: 0 10px 26px rgba(221, 197, 111, .35); }

/* ----- 10. Section headers ----- */
.section-badge { transition: transform .35s var(--fx-ease-spring), box-shadow .35s; }
.section-badge:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(200, 168, 78, .25); }
.section-header .underline { position: relative; overflow: hidden; }
.section-header .underline::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .9) 50%, transparent 70%);
  animation: fxSweep 3.6s ease-in-out infinite;
}

/* ----- 11. About ----- */
.about-image { transition: transform .5s var(--fx-ease); }
.about-image:hover { transform: translateY(-4px); }
.about-image-overlay .year { animation: fxGlowPulse 4s ease-in-out infinite; }
.about-feature { transition: transform .3s var(--fx-ease-spring), color .3s; }
.about-feature:hover { transform: translateX(6px); }
.about-feature:hover i { color: var(--fx-gold-deep); }

/* ----- 12. Stats ----- */
.stat-item { transition: transform .4s var(--fx-ease), box-shadow .4s; }
.stat-item:hover { transform: translateY(-6px); }
.stat-item:hover .stat-icon i { animation: fxPulseSoft .8s var(--fx-ease); }

/* ----- 13. Leadership ----- */
.leader-card { transition: transform .45s var(--fx-ease), box-shadow .45s; will-change: transform; }
.leader-card:hover { box-shadow: 0 22px 50px rgba(16, 40, 30, .18); }
.leader-image { overflow: hidden; }
.leader-image img { transition: transform .8s var(--fx-ease); }
.leader-card:hover .leader-image img { transform: scale(1.08); }
.leader-social a { transition: transform .3s var(--fx-ease-spring), background .3s, color .3s; }
.leader-social a:hover { transform: translateY(-4px) scale(1.1); }

/* ----- 14. News / events / gallery ----- */
.news-card, .event-card { transition: transform .45s var(--fx-ease), box-shadow .45s; }
.news-card:hover, .event-card:hover { transform: translateY(-6px); box-shadow: 0 20px 44px rgba(16, 40, 30, .15); }
.news-image { overflow: hidden; }
.news-image img { transition: transform .8s var(--fx-ease); }
.news-card:hover .news-image img { transform: scale(1.07); }
.news-date { transition: transform .4s var(--fx-ease-spring); }
.news-card:hover .news-date { transform: scale(1.08) rotate(-2deg); }
.news-link i { transition: transform .3s var(--fx-ease); }
.news-link:hover i { transform: translateX(6px); }

.event-date-block { transition: transform .4s var(--fx-ease-spring); }
.event-card:hover .event-date-block { transform: scale(1.05); }

.gallery-item { overflow: hidden; }
.gallery-item img { transition: transform .8s var(--fx-ease), filter .8s; }
.gallery-item:hover img { transform: scale(1.09); }
.gallery-overlay { transition: opacity .4s, backdrop-filter .4s; }
.gallery-overlay i { transition: transform .45s var(--fx-ease-spring); transform: scale(.6); }
.gallery-item:hover .gallery-overlay i { transform: scale(1); }

/* ----- 15. CTA ----- */
.cta-section { background-size: 200% 200%; animation: fxGradient 14s ease-in-out infinite alternate; }
.cta-section::before { animation: fxFloatRing 16s ease-in-out infinite; }
.cta-section::after { animation: fxFloatRing 19s ease-in-out infinite reverse; }
.cta-btn-primary:hover { box-shadow: 0 14px 34px rgba(200, 168, 78, .4); }

/* ----- 16. Footer ----- */
.footer-column ul a { transition: padding-left .3s var(--fx-ease), color .3s; }
.footer-column ul a:hover { padding-left: 8px; color: var(--fx-gold-bright); }
.footer-social a { transition: transform .3s var(--fx-ease-spring), background .3s, color .3s, box-shadow .3s; }
.footer-social a:hover { transform: translateY(-4px); box-shadow: 0 8px 18px rgba(216, 180, 92, .3); }

/* ----- 17. Back to top ----- */
.back-to-top { transition: transform .35s var(--fx-ease-spring), opacity .35s, background .3s, box-shadow .3s; }
.back-to-top:hover { transform: translateY(-5px); box-shadow: 0 12px 26px rgba(216, 180, 92, .4); }

/* ==========================================================================
   STUDENT HUB
   ========================================================================== */

/* Ambient page glow */
.student-page { position: relative; }
.student-page::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 380px at 88% -4%, rgba(216, 180, 92, .16), transparent 60%),
    radial-gradient(560px 420px at -6% 100%, rgba(31, 91, 67, .13), transparent 60%),
    var(--hub-paper);
}

.student-header { position: relative; overflow: hidden; }
.student-header::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--fx-gold) 30%, var(--fx-gold-bright) 50%, var(--fx-gold) 70%, transparent);
  background-size: 200% 100%; animation: fxGradient 6s linear infinite alternate;
}
.brand-crest { transition: transform .5s var(--fx-ease-spring), box-shadow .3s, border-color .3s; }
.student-brand:hover .brand-crest { transform: rotate(-8deg) scale(1.07); box-shadow: 0 8px 20px rgba(20,45,33,.2); border-color: var(--fx-gold); }

/* Brand panel + crests */
.brand-panel::before { animation: fxFloatRing 16s ease-in-out infinite; }
.brand-crest-lg { animation: fxPop .8s var(--fx-ease) .1s both; transition: transform .5s var(--fx-ease-spring); }
.brand-panel:hover .brand-crest-lg { transform: translateY(-5px) scale(1.03); }
.brand-rule { animation: fxDraw .8s var(--fx-ease) .45s both; transform-origin: 0 50%; }
.auth-crest { transition: transform .5s var(--fx-ease-spring); }
.auth-card:hover .auth-crest { transform: rotate(-5deg) scale(1.05); }
.grad-crest { animation: fxPop .7s var(--fx-ease) both; }
/* Auth shell entrance */
.brand-panel-inner > * { opacity: 0; animation: fxRise .8s var(--fx-ease) forwards; }
.brand-panel-inner > *:nth-child(1) { animation-delay: .08s; }
.brand-panel-inner > *:nth-child(2) { animation-delay: .2s; }
.brand-panel-inner > *:nth-child(3) { animation-delay: .32s; }
.brand-panel-inner > *:nth-child(4) { animation-delay: .44s; }
.brand-panel-inner > *:nth-child(5) { animation-delay: .56s; }
.auth-card { opacity: 0; animation: fxPop .85s var(--fx-ease) .3s forwards; }
.auth-card-brand { animation: fxRiseSmall .6s var(--fx-ease) .38s both; }
.auth-tabs { animation: fxRiseSmall .6s var(--fx-ease) .46s both; }
.auth-benefits li { transition: transform .3s var(--fx-ease-spring); }
.auth-benefits li:hover { transform: translateX(6px); }
.auth-benefits i { transition: transform .4s var(--fx-ease-spring), background .3s, color .3s; }
.auth-benefits li:hover i { transform: scale(1.15) rotate(-8deg); background: var(--fx-gold); color: #223427; }
.brand-motto i { animation: fxFloat 4.5s ease-in-out infinite; }
/* Underline tabs (base layout lives in student.css) */
.auth-tab { transition: color .3s, background .3s; }
.auth-tab::after { transition: transform .4s var(--fx-ease); }
.auth-tab:hover { color: var(--fx-green); background: rgba(31,91,67,.05); }
.auth-tab:active { transform: scale(.985); }
.auth-tab.active { color: #142c21; }
.auth-title { animation: fxRiseSmall .5s var(--fx-ease) both; }
.auth-subtitle { animation: fxRiseSmall .5s var(--fx-ease) .06s both; }

/* Form fields stagger (replays each time a tab re-renders the form) */
.portal-form > * { opacity: 0; animation: fxRiseSmall .55s var(--fx-ease) forwards; }
.portal-form > *:nth-child(1) { animation-delay: .04s; }
.portal-form > *:nth-child(2) { animation-delay: .09s; }
.portal-form > *:nth-child(3) { animation-delay: .14s; }
.portal-form > *:nth-child(4) { animation-delay: .19s; }
.portal-form > *:nth-child(5) { animation-delay: .24s; }
.portal-form > *:nth-child(6) { animation-delay: .29s; }
.portal-form > *:nth-child(7) { animation-delay: .34s; }
.portal-form > *:nth-child(8) { animation-delay: .39s; }
.portal-form > *:nth-child(9) { animation-delay: .44s; }
.portal-form > *:nth-child(10) { animation-delay: .49s; }
.portal-form > *:nth-child(11) { animation-delay: .54s; }
.portal-form > *:nth-child(12) { animation-delay: .59s; }

.portal-form input, .portal-form select {
  transition: border-color .25s, box-shadow .25s, background .25s, transform .25s;
}
.portal-form input:hover, .portal-form select:hover { border-color: #b9c9bc; }
.portal-form input:focus, .portal-form select:focus { transform: translateY(-1px); background: #fdfffd; }

/* Email field hint */
.field-hint { display: flex; align-items: center; gap: 6px; color: #8d9a90; font-size: .69rem; font-weight: 500; letter-spacing: .01em; }
.field-hint i { color: var(--fx-gold-deep); font-size: .66rem; }
.field-hint.ok { color: #2f8f57; }
.field-hint.warn { color: #b4453c; }

/* Form alerts: a boxed line with an icon, so a rejected sign-in is noticed
   rather than skimmed past. Skipped entirely when the slot is empty. */
.auth-alert { display: none; }
.auth-alert:not(:empty) {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 11px 13px; border-radius: 9px; border: 1px solid transparent;
  font-size: .82rem; line-height: 1.45; margin: 2px 0 4px;
}
.auth-alert i { margin-top: 2px; flex: none; font-size: .82rem; }
.auth-alert-error { background: #fdf1f0; border-color: #f0c9c5; color: #a8372c; }
.auth-alert-error i { color: #c0453a; }
.auth-alert-success { background: #f0f8f3; border-color: #c6e3d2; color: #216a46; }
.auth-alert-success i { color: #2f8f57; }
.auth-alert:not(:empty) { animation: authAlertIn .28s var(--fx-ease); }
@keyframes authAlertIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .auth-alert:not(:empty) { animation: none; } }

.form-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.form-error { animation: fxRiseSmall .3s var(--fx-ease); }

/* Dashboard */
.hub-welcome {
  position: relative; overflow: hidden;
  background-size: auto, 220% 220%;
  animation: fxGradient 16s ease-in-out infinite alternate;
}
.hub-welcome::after {
  content: ''; position: absolute; width: 240px; height: 240px; border-radius: 50%;
  border: 1px solid rgba(238, 212, 136, .25); right: -60px; top: -90px; pointer-events: none;
  box-shadow: 0 0 0 34px rgba(238, 212, 136, .05), 0 0 0 70px rgba(238, 212, 136, .03);
  animation: fxFloatRing 14s ease-in-out infinite;
}
.hub-profile-strip span { transition: transform .25s var(--fx-ease-spring), color .25s; }
.hub-profile-strip span:hover { transform: translateY(-2px); color: #35543f; }
.hub-profile-strip i { transition: transform .35s var(--fx-ease-spring); }
.hub-profile-strip span:hover i { transform: scale(1.25) rotate(-6deg); }

.hub-resource { position: relative; overflow: hidden; transition: transform .35s var(--fx-ease), border-color .35s, box-shadow .35s; }
.hub-resource::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 42%, rgba(31, 91, 67, .06) 50%, transparent 58%);
  transform: translateX(-130%) skewX(-18deg);
}
.hub-resource:hover::after { animation: fxSweep .9s var(--fx-ease); }
.hub-resource:hover .hub-resource-icon { animation: fxPulseSoft .7s var(--fx-ease); background: #e0ecd7; }
.hub-resource-icon { transition: background .3s; }
.resource-link i { transition: transform .3s var(--fx-ease); }
.resource-link:hover i { transform: translate(4px, -2px); }

.hub-panel { transition: transform .35s var(--fx-ease), box-shadow .35s; }
.hub-panel:hover { box-shadow: 0 14px 34px rgba(24, 55, 45, .08); }
.announcement { transition: transform .3s var(--fx-ease), background .3s; }
.announcement:hover { transform: translateX(5px); background: #f1f6ee; }
.announcement-icon { transition: transform .4s var(--fx-ease-spring); }
.announcement:hover .announcement-icon { transform: rotate(-8deg) scale(1.08); }

.poll-card { transition: transform .35s var(--fx-ease), border-color .35s, box-shadow .35s; }
.poll-card:hover { transform: translateY(-4px); border-color: #cddccd; box-shadow: 0 14px 30px rgba(24, 55, 45, .08); }
.candidate-option { transition: border-color .25s, background .25s, transform .25s; }
.candidate-option:hover { border-color: #9dbfa7; transform: translateX(3px); }
.election-status { animation: fxPop .6s var(--fx-ease) both; }

.graduated-card { animation: fxPop .7s var(--fx-ease) both; }
.graduated-card .icon i { display: inline-block; animation: fxFloat 3.6s ease-in-out infinite; }
.complete-access { transition: border-color .3s, color .3s, transform .3s, box-shadow .3s; }
.complete-access:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(160, 68, 57, .12); }

/* ==========================================================================
   ADMIN
   ========================================================================== */
.member-email { display: block; color: #7d8a81; font-weight: 400; margin-top: 2px; font-size: .72rem; }
.member-email i { color: var(--fx-gold-deep); margin-right: 4px; font-size: .66rem; }
.member-email.personal i { color: #5d8a6f; }

.admin-login .login-card { animation: fxPop .65s var(--fx-ease) both; }
.login-mark { background: #fff; box-shadow: 0 0 0 2px var(--fx-gold), 0 14px 30px rgba(20,45,33,.18); overflow: hidden; border-radius: 22%; }
.login-mark img { width: 100%; height: 100%; object-fit: cover; }
.login-mark i { display: inline-block; animation: fxFloat 3.8s ease-in-out infinite; }
.admin-topbar { animation: fxRiseSmall .5s var(--fx-ease) both; }
.admin-tabbar { animation: fxRiseSmall .5s var(--fx-ease) .08s both; }
.admin-brand img { transition: transform .5s var(--fx-ease-spring); }
.admin-brand:hover img { transform: rotate(-8deg) scale(1.08); }
.admin-main > * { animation: fxRiseSmall .5s var(--fx-ease) both; }
.admin-main > *:nth-child(1) { animation-delay: .04s; }
.admin-main > *:nth-child(2) { animation-delay: .1s; }
.admin-main > *:nth-child(3) { animation-delay: .16s; }
.admin-main > *:nth-child(4) { animation-delay: .22s; }
.admin-main > *:nth-child(5) { animation-delay: .28s; }
.admin-tab { transition: color .25s, background .25s; }
.admin-tab::after { transition: transform .35s var(--fx-ease); }
.admin-tab:hover { color: var(--primary-dark); background: #f4f8f4; }
.admin-tab.active { color: var(--primary-dark); }
.panel { transition: box-shadow .35s, transform .35s; }
.panel:hover { box-shadow: 0 16px 40px rgba(20, 45, 33, .1); }
.content-row { transition: transform .25s var(--fx-ease), background .25s; }
.content-row:hover { transform: translateX(4px); }
.table-action { transition: background .25s, color .25s, transform .25s; }
.table-action:hover { transform: translateY(-1px); }

/* ==========================================================================
   INNER PAGES (page.css)
   ========================================================================== */
.inner-hero { position: relative; overflow: hidden; }
.inner-hero::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 40%;
  background: linear-gradient(180deg, transparent, rgba(10, 24, 17, .4)); pointer-events: none;
}
.inner-hero .container { position: relative; z-index: 1; }
.inner-hero .eyebrow { display: inline-block; animation: fxRise .7s var(--fx-ease) .05s both; }
.inner-hero h1 { animation: fxRise .8s var(--fx-ease) .16s both; text-shadow: 0 4px 26px rgba(0, 0, 0, .3); }
.inner-hero p { animation: fxRise .8s var(--fx-ease) .3s both; }
.content-card { transition: transform .4s var(--fx-ease), box-shadow .4s, border-color .4s; }
.content-card:hover { transform: translateY(-7px); box-shadow: 0 22px 46px rgba(16, 40, 30, .14); }
.content-card > i { display: inline-block; transition: transform .45s var(--fx-ease-spring), color .3s; }
.content-card:hover > i { transform: scale(1.18) rotate(-6deg); color: var(--fx-gold-deep); }
.page-cta { background: linear-gradient(120deg, #16392b, #2d5a3d, #16392b); background-size: 220% 220%; animation: fxGradient 14s ease-in-out infinite alternate; position: relative; overflow: hidden; }
.page-button:hover { box-shadow: 0 12px 28px rgba(200, 168, 78, .35); }
.page-footer a { transition: color .3s, letter-spacing .3s; }
.page-footer a:hover { letter-spacing: .4px; }

/* ==========================================================================
   ACCESSIBILITY — honour reduced-motion preferences
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  html.fx-ready [data-reveal] { opacity: 1 !important; transform: none !important; }
  html.fx-ready .hero .hero-content > *, html.fx-ready .hero .hero-line { opacity: 1 !important; transform: none !important; animation: none !important; }
  html.fx-ready .hero .hero-line { width: 120px !important; }
  .brand-panel-inner > *, .auth-card, .auth-card-brand, .auth-tabs, .portal-form > *, .admin-main > *, .admin-topbar, .admin-tabbar, .admin-login .login-card,
  .inner-hero .eyebrow, .inner-hero h1, .inner-hero p, .auth-title, .auth-subtitle, .election-status, .graduated-card { opacity: 1 !important; animation: none !important; }
  .fx-mote, .fx-progress { display: none !important; }
}

/* ==========================================================================
   NAVIGATION — tidy six-tab bar (Home · Student Hub · News · Events ·
   Documents · About Us) with the Student Hub pill highlighted
   ========================================================================== */
.main-nav { align-items: center; }
.main-nav a.nav-highlight {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0; padding: 10px 16px; border-radius: 999px;
  color: var(--primary-dark); font-weight: 700;
  background: linear-gradient(120deg, rgba(200, 168, 78, .28), rgba(232, 200, 78, .16));
  box-shadow: inset 0 0 0 1.5px rgba(200, 168, 78, .7), 0 2px 8px rgba(200, 168, 78, .12);
  transition: transform .3s var(--fx-ease), box-shadow .3s, background .3s, color .3s;
}
.main-nav a.nav-highlight i { font-size: .84rem; color: var(--fx-gold-deep); }
.main-nav a.nav-highlight:hover, .main-nav a.nav-highlight:focus-visible {
  transform: translateY(-1px); color: var(--primary-dark);
  background: linear-gradient(120deg, rgba(200, 168, 78, .42), rgba(232, 200, 78, .24));
  box-shadow: inset 0 0 0 1.5px rgba(200, 168, 78, .92), 0 8px 18px rgba(200, 168, 78, .26);
}
.main-nav a.nav-highlight.active {
  color: var(--white);
  background: linear-gradient(135deg, #1a3a2a 0%, #2d5a3d 100%);
  box-shadow: 0 6px 18px rgba(26, 58, 42, .26), inset 0 0 0 1.5px var(--fx-gold-bright);
}
.main-nav a.nav-highlight.active i { color: var(--fx-gold-bright); }
@media (max-width: 768px) {
  .main-nav a.nav-highlight {
    display: flex; justify-content: flex-start; margin: 0; padding: 13px 16px; border-radius: 12px;
    box-shadow: inset 0 0 0 1px rgba(200, 168, 78, .45); background: rgba(200, 168, 78, .14);
    transform: none !important;
  }
}
/* Tablets / small laptops: tighten the six tabs + Login so the whole bar
   always sits on one even row instead of wrapping into two ragged rows. */
@media (min-width: 769px) and (max-width: 1080px) {
  .nav-section .container { gap: 10px; }
  .main-nav { gap: 3px; padding: 4px; }
  .main-nav a, .main-nav a.nav-highlight { padding: 8px 10px; font-size: .84rem; gap: 6px; }
  .main-nav a i, .main-nav a.nav-highlight i { font-size: .78rem; }
  .main-nav a::after { left: 22%; right: 22%; }
  .login-btn { padding-left: 10px; }
  .login-btn .btn { padding: 9px 15px; font-size: .84rem; gap: 6px; }
}

/* ----- managed content: picture + link on public cards ----- */
.content-card .content-card-link {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 14px;
  font-weight: 700; font-size: .86rem; color: var(--primary-green);
}
.content-card .content-card-link i { font-size: .72rem; margin: 0; color: inherit; }
.content-card .content-card-link:hover { color: var(--fx-gold-deep); }
.news-card .news-body .news-link { display: inline-flex; align-items: center; gap: 7px; }

/* Executive card without a portrait */
.leader-image-fallback { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(135deg, var(--primary-dark), var(--primary-green)); color: var(--gold-light); font-size: 3rem; }

/* Link from the home executive preview to the full Executives page */
.leaders-more { text-align: center; margin: 26px 0 0; }
.leaders-more a { display: inline-flex; align-items: center; gap: 9px; padding: 12px 26px; border-radius: 999px; background: var(--primary-dark); color: var(--white); font-weight: 700; font-size: .92rem; transition: var(--transition); }
.leaders-more a:hover { background: var(--gold); color: var(--primary-dark); transform: translateY(-2px); }
.leaders-more a i { font-size: .8rem; }

/* ==========================================================================
   3D DEPTH LAYER
   Perspective-based depth for hero, cards, stats and section headings.
   Everything here is additive: without JS the page is unchanged, and the
   reduced-motion block below disables all of it.
   ========================================================================== */

/* ----- Hero: real depth with layered parallax ----- */
.hero { perspective: 1200px; transform-style: preserve-3d; }
.hero .hero-content { transform-style: preserve-3d; will-change: transform; }
html.fx-ready .hero .hero-content > * { transform-style: preserve-3d; }
/* each line of the hero sits on its own depth plane */
html.fx-ready .hero .welcome-text { transform: translateZ(26px); }
html.fx-ready .hero .hero-content h2 { transform: translateZ(58px); }
html.fx-ready .hero .university-name { transform: translateZ(34px); }
html.fx-ready .hero .hero-desc { transform: translateZ(16px); }
html.fx-ready .hero .hero-btn { transform: translateZ(44px); }
/* the slider sits behind the copy in 3D space */
.hero .hero-slider { transform: translateZ(-60px) scale(1.06); transform-style: preserve-3d; }
.hero .hero-overlay { transform: translateZ(-40px) scale(1.04); }

/* ----- Cards: 3D tilt target + specular sheen ----- */
.fx-3d { position: relative; transform-style: preserve-3d; will-change: transform; }
.fx-3d::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--fx-mx, 50%) var(--fx-my, 50%),
    rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 42%);
  opacity: 0; transition: opacity .35s var(--fx-ease);
}
.fx-3d.fx-tilting::after { opacity: 1; }
/* children float slightly above the card surface */
.fx-3d > * { transform: translateZ(0); }
.fx-3d.fx-tilting .leader-image,
.fx-3d.fx-tilting .content-media { transform: translateZ(24px); }
.fx-3d.fx-tilting .leader-info,
.fx-3d.fx-tilting .content-card h3 { transform: translateZ(14px); }

/* ----- Section headings: hinged reveal ----- */
html.fx-ready [data-reveal="hinge"] {
  opacity: 0; transform: perspective(900px) rotateX(-26deg) translateY(34px);
  transform-origin: 50% 100%;
  transition: opacity .85s var(--fx-ease), transform .95s var(--fx-ease);
  transition-delay: var(--fx-delay, 0s);
}
html.fx-ready [data-reveal="hinge"].fx-in { opacity: 1; transform: none; }

/* ----- Stats: lift off the page ----- */
.stat-item { perspective: 700px; }
.stat-icon { transition: transform .5s var(--fx-ease-spring); }
.stat-item:hover .stat-icon { transform: translateZ(30px) rotateY(12deg) scale(1.08); }

/* ----- Gallery tiles: 3D pop ----- */
.gallery-item, .page-gallery-item { transition: transform .5s var(--fx-ease), box-shadow .5s; transform-style: preserve-3d; }
.gallery-item:hover, .page-gallery-item:hover { transform: translateY(-6px) rotateX(2.5deg) rotateY(-2.5deg) scale(1.02); box-shadow: 0 26px 50px rgba(10, 30, 20, .3); }

/* ----- Buttons: pressable depth ----- */
.hero-btn, .about-btn, .page-button, .cta-btn-primary, .cta-btn-secondary, .form-submit, .hub-button { transform-style: preserve-3d; }
.hero-btn:hover, .about-btn:hover, .page-button:hover, .cta-btn-primary:hover, .cta-btn-secondary:hover { transform: translateY(-3px) translateZ(14px); }

/* ----- Nav tabs: raised active state ----- */
.main-nav a { transition: transform .35s var(--fx-ease), background .35s, color .35s; }
.main-nav a:hover { transform: translateY(-2px) translateZ(10px); }
.main-nav a.active { transform: translateY(-2px) translateZ(14px); }

/* ----- Footer / CTA panels: subtle float ----- */
.cta-content { transform-style: preserve-3d; }

@media (prefers-reduced-motion: reduce) {
  .fx-3d, .fx-3d::after, .gallery-item, .page-gallery-item, .main-nav a,
  .stat-icon, .hero-btn, .about-btn, .page-button { transform: none !important; }
  .fx-3d::after { display: none !important; }
  html.fx-ready [data-reveal="hinge"] { opacity: 1 !important; transform: none !important; }
}

/* Loader on small screens: shrink the emblem so it stays proportionate */
@media (max-width: 480px) {
  .loader-emblem { width: 132px; height: 132px; margin-bottom: 20px; }
  .loader-ring-outer { width: 132px; height: 132px; }
  .loader-ring-mid { width: 104px; height: 104px; }
  .loader-ring-inner { width: 88px; height: 88px; }
  .loader-logo { width: 72px; height: 72px; }
  .loader-glow { width: 92px; height: 92px; }
  .loader-text { font-size: .88rem; letter-spacing: 2px; }
}
