/* UCA SRMS — portal landing page (glassmorphism edition) */
:root {
  --hp-navy: #192f59;
  --hp-navy-deep: #0f1f3d;
  --hp-teal: #148eb7;
  --hp-teal-light: #3eb8db;
  --hp-amber: #fe9638;
  --hp-amber-deep: #e07a1a;
  --hp-green: #16a34a;
  --hp-text: #f4f8ff;
  --hp-muted: rgba(226, 236, 252, 0.72);
  --hp-glass: linear-gradient(150deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.08) 60%, rgba(255, 255, 255, 0.13) 100%);
  --hp-glass-strong: linear-gradient(150deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.13) 100%);
  --hp-glass-border: rgba(255, 255, 255, 0.28);
  --hp-glass-shadow:
    0 24px 60px rgba(4, 12, 30, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06);
  --hp-glass-shadow-hover:
    0 34px 80px rgba(4, 12, 30, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.home-portal {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--hp-text);
  -webkit-font-smoothing: antialiased;
}

/* ---- Aurora background ---- */
.home-portal__bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 85% 65% at 12% -5%, rgba(64, 199, 240, 0.7) 0%, transparent 60%),
    radial-gradient(ellipse 70% 55% at 100% 5%, rgba(255, 166, 77, 0.55) 0%, transparent 58%),
    radial-gradient(ellipse 80% 60% at 50% 112%, rgba(62, 184, 219, 0.55) 0%, transparent 62%),
    radial-gradient(ellipse 50% 45% at 82% 72%, rgba(74, 222, 128, 0.28) 0%, transparent 55%),
    radial-gradient(ellipse 55% 45% at 18% 80%, rgba(147, 118, 255, 0.3) 0%, transparent 55%),
    linear-gradient(160deg, #16295c 0%, #1d3f85 40%, #14608f 70%, #183067 100%);
  background-size: 100% 100%;
}

/* soft static light beams (kept unanimated for GPU-light rendering) */
.home-portal__bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    conic-gradient(from 200deg at 30% 30%, transparent 0deg, rgba(62, 184, 219, 0.18) 40deg, transparent 95deg),
    conic-gradient(from 20deg at 75% 65%, transparent 0deg, rgba(254, 150, 56, 0.14) 45deg, transparent 105deg);
  pointer-events: none;
}

/* fine dotted texture for depth */
.home-portal__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1.4px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 30%, transparent 100%);
  pointer-events: none;
}

.home-portal__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.85;
  pointer-events: none;
  will-change: transform;
  animation: hp-float 18s ease-in-out infinite;
}

.home-portal__orb--1 {
  width: 460px;
  height: 460px;
  background: radial-gradient(circle at 30% 30%, #7dd3fc, #148eb7 70%);
  top: -130px;
  right: -100px;
}

.home-portal__orb--2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle at 35% 35%, #ffc98f, #e07a1a 75%);
  bottom: -130px;
  left: -100px;
  animation-delay: -6s;
}

.home-portal__orb--3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle at 40% 40%, #9be7ff, #3eb8db 80%);
  top: 40%;
  left: 46%;
  opacity: 0.28;
  animation-delay: -11s;
}

@keyframes hp-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(22px, -28px) scale(1.06); }
}

/* ---- Language switcher (glass pill) ---- */
.home-portal__lang {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 30;
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.3rem;
  background: var(--hp-glass);
  border: 1px solid var(--hp-glass-border);
  border-radius: 999px;
  box-shadow: 0 12px 34px rgba(4, 12, 30, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

/* ---- Glass clock ---- */
.home-portal__datetime,
.hp-glass-clock {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 30;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.hp-glass-clock {
  isolation: isolate;
  overflow: hidden;
  min-width: 12.5rem;
  padding: 0.85rem 1rem;
  border-radius: 20px;
  background: var(--hp-glass-strong);
  border: 1px solid var(--hp-glass-border);
  box-shadow: var(--hp-glass-shadow);
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  animation: hp-glass-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hp-glass-clock::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(62, 184, 219, 0.65), rgba(255, 255, 255, 0.25), rgba(254, 150, 56, 0.5));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hp-glass-clock__shine {
  position: absolute;
  top: -40%;
  left: -20%;
  width: 70%;
  height: 90%;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.4) 0%, transparent 55%);
  transform: rotate(12deg);
  pointer-events: none;
  z-index: 0;
}

.hp-glass-clock__meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.hp-glass-clock__weekday {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: capitalize;
  color: #8ef0e0;
  line-height: 1.2;
}

.hp-glass-clock__weekday i {
  color: #7dd3fc;
  font-size: 0.78rem;
}

.hp-glass-clock__weekday-short {
  display: none;
}

.hp-glass-clock__date-line {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(226, 236, 252, 0.85);
  line-height: 1.25;
  white-space: nowrap;
}

.hp-glass-clock__time {
  display: inline-flex;
  align-items: baseline;
  gap: 0.08rem;
  margin-top: 0.15rem;
  font-variant-numeric: tabular-nums;
}

.hp-glass-clock__digit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55rem;
  padding: 0.18rem 0.28rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.hp-glass-clock__digit--sec {
  min-width: 1.45rem;
  font-size: 0.95rem;
  color: #7dd3fc;
  background: rgba(62, 184, 219, 0.18);
}

.hp-glass-clock__colon {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  padding: 0 0.05rem;
}

.hp-glass-clock__colon--blink {
  animation: hp-colon-blink 1s steps(1, end) infinite;
  color: #7dd3fc;
}

@keyframes hp-colon-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.25; }
}

@keyframes hp-glass-in {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 640px) {
  .hp-glass-clock {
    top: 0.65rem;
    left: 0.65rem;
    min-width: 0;
    max-width: calc(100vw - 6.75rem);
    padding: 0.65rem 0.75rem;
    border-radius: 16px;
  }
  .hp-glass-clock__weekday { font-size: 0.7rem; }
  .hp-glass-clock__weekday-full { display: none; }
  .hp-glass-clock__weekday-short { display: inline; }
  .hp-glass-clock__date-line {
    font-size: 0.68rem;
    white-space: normal;
  }
  .hp-glass-clock__digit {
    min-width: 1.3rem;
    font-size: 0.95rem;
    padding: 0.12rem 0.2rem;
  }
  .hp-glass-clock__digit--sec { font-size: 0.8rem; min-width: 1.2rem; }
  .home-portal__lang {
    top: 0.65rem;
    right: 0.65rem;
  }
}

.home-portal__lang-btn {
  min-width: 42px;
  padding: 0.42rem 0.75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--hp-muted);
  font: 700 0.78rem/1 'Plus Jakarta Sans', system-ui, sans-serif;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.home-portal__lang-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.home-portal__lang-btn.is-active {
  color: #06263d;
  background: linear-gradient(135deg, #9be7ff, #3eb8db);
  box-shadow: 0 6px 18px rgba(62, 184, 219, 0.45);
}

/* ---- Layout ---- */
.home-portal__main {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  max-width: 1180px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-portal__hero {
  text-align: center;
  margin-bottom: 2.25rem;
}

/* ---- Logo (glass tile) ---- */
.home-portal__logo-wrap {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 124px;
  height: 124px;
  margin-bottom: 1.25rem;
  padding: 0.55rem;
  background: var(--hp-glass-strong);
  border: 1px solid var(--hp-glass-border);
  border-radius: 26px;
  box-shadow: var(--hp-glass-shadow);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  animation: hp-glass-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-portal__logo-wrap::after {
  content: '';
  position: absolute;
  top: -35%;
  left: -25%;
  width: 65%;
  height: 85%;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.4) 0%, transparent 60%);
  transform: rotate(14deg);
  border-radius: inherit;
  pointer-events: none;
}

.home-portal__logo-wrap--gates {
  display: flex;
  margin: 0 auto 1.35rem;
}

.home-portal__logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 6px 14px rgba(4, 12, 30, 0.35));
}

.home-portal__logo-text {
  position: relative;
  z-index: 1;
  font-weight: 800;
  font-size: 2.55rem;
  letter-spacing: 0.06em;
  line-height: 1;
  background: linear-gradient(
    110deg,
    #9ecbff 0%,
    #ffffff 25%,
    #ffe9a8 40%,
    #ffffff 55%,
    #9ecbff 75%,
    #ffffff 100%
  );
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 6px 14px rgba(4, 12, 30, 0.4));
  animation: hp-logo-shine 2.8s linear infinite;
}

@keyframes hp-logo-shine {
  0% { background-position: 125% 0; }
  100% { background-position: -125% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .home-portal__logo-text { animation: none; }
}

@media (max-width: 575px) {
  .home-portal__logo-text { font-size: 2.1rem; }
}

.home-portal__gates {
  text-align: center;
}

.home-portal__gates-title {
  margin: 0 0 0.5rem;
  color: #fff;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 24px rgba(4, 12, 30, 0.45);
}

.home-portal__gates-title::after {
  content: '';
  display: block;
  width: 64px;
  height: 4px;
  margin: 0.7rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #3eb8db, #9be7ff 45%, #ffb366);
  box-shadow: 0 0 18px rgba(62, 184, 219, 0.6);
}

.home-portal__gates-sub {
  max-width: 620px;
  margin: 0 auto 2.1rem;
  color: var(--hp-muted);
  font-size: 1rem;
  line-height: 1.65;
}

/* ---- Glass cards ---- */
.home-portal__cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.35rem;
  align-items: stretch;
  perspective: 1200px;
}

.home-portal-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  padding: 1.85rem 1.35rem 1.55rem;
  overflow: hidden;
  color: inherit;
  text-align: center;
  text-decoration: none;
  background: var(--hp-glass);
  border: 1px solid var(--hp-glass-border);
  border-radius: 24px;
  box-shadow: var(--hp-glass-shadow);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.32s ease, border-color 0.32s ease, background 0.32s ease;
  animation: hp-card-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-portal-card:nth-child(1) { animation-delay: 0.05s; }
.home-portal-card:nth-child(2) { animation-delay: 0.12s; }
.home-portal-card:nth-child(3) { animation-delay: 0.19s; }
.home-portal-card:nth-child(4) { animation-delay: 0.26s; }

@keyframes hp-card-in {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* accent line on top */
.home-portal-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--hp-card-accent);
  filter: saturate(140%);
  box-shadow: 0 0 22px var(--hp-card-glow, rgba(62, 184, 219, 0.55));
}

/* diagonal shine sweep */
.home-portal-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 55%;
  height: 100%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.22) 48%, transparent 100%);
  transform: skewX(-18deg);
  transition: left 0.6s ease;
  pointer-events: none;
  z-index: 1;
}

.home-portal-card:hover::after {
  left: 130%;
}

.home-portal-card:hover {
  color: inherit;
  text-decoration: none;
  transform: translateY(-10px) scale(1.015);
  background: var(--hp-glass-strong);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow:
    var(--hp-glass-shadow-hover),
    0 0 46px var(--hp-card-glow, rgba(62, 184, 219, 0.3));
}

.home-portal-card--staff {
  --hp-card-accent: linear-gradient(90deg, #6f8fd8, #9db8f5);
  --hp-card-glow: rgba(111, 143, 216, 0.45);
}
.home-portal-card--student {
  --hp-card-accent: linear-gradient(90deg, #148eb7, #7dd3fc);
  --hp-card-glow: rgba(62, 184, 219, 0.5);
}
.home-portal-card--apply {
  --hp-card-accent: linear-gradient(90deg, #fe9638, #ffc98f);
  --hp-card-glow: rgba(254, 150, 56, 0.5);
}
.home-portal-card--mobile {
  --hp-card-accent: linear-gradient(90deg, #16a34a, #6ee7a0);
  --hp-card-glow: rgba(52, 199, 106, 0.45);
}

.home-portal-card__icon {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  margin-bottom: 1.15rem;
  color: #fff;
  border-radius: 22px;
  font-size: 1.7rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 14px 30px rgba(4, 12, 30, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-portal-card:hover .home-portal-card__icon {
  transform: translateY(-4px) scale(1.06) rotate(-3deg);
}

.home-portal-card--staff .home-portal-card__icon { background: linear-gradient(135deg, #2a4a7a, #5b7fc0); }
.home-portal-card--student .home-portal-card__icon { background: linear-gradient(135deg, #148eb7, #3eb8db); }
.home-portal-card--apply .home-portal-card__icon { background: linear-gradient(135deg, #fe9638, #ffb366); }
.home-portal-card--mobile .home-portal-card__icon { background: linear-gradient(135deg, #16803b, #34c76a); }

.home-portal-card__title {
  position: relative;
  z-index: 2;
  margin: 0 0 0.5rem;
  color: #fff;
  font-size: 1.12rem;
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(4, 12, 30, 0.4);
}

.home-portal-card__desc {
  position: relative;
  z-index: 2;
  flex: 1;
  margin: 0;
  color: var(--hp-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.home-portal-card__cta {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.25rem;
  padding: 0.58rem 1.2rem;
  color: #eaf4ff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.25s ease, color 0.25s ease, gap 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.home-portal-card:hover .home-portal-card__cta {
  gap: 0.7rem;
  color: #06263d;
  background: linear-gradient(135deg, #ffffff, #d8f2ff);
  border-color: transparent;
  box-shadow: 0 10px 26px rgba(4, 12, 30, 0.35);
}

/* ---- Footer (glass chip) ---- */
.home-portal__footer {
  margin: 2.6rem auto 0;
  padding: 0.85rem 1.5rem;
  width: fit-content;
  max-width: calc(100% - 2rem);
  color: var(--hp-muted);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--hp-glass);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 12px 30px rgba(4, 12, 30, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  line-height: 1.4;
}

.home-portal__footer-line {
  color: #fff;
  font-weight: 600;
}

.home-portal__footer-sub {
  font-size: 0.72rem;
  opacity: 0.85;
  letter-spacing: 0.02em;
}

.home-portal__footer strong {
  color: #fff;
  font-weight: 700;
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .home-portal__cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575px) {
  .home-portal__lang { top: 0.75rem; right: 0.75rem; }
  .home-portal__main { padding: 5.5rem 1rem 1.75rem; justify-content: flex-start; }
  .home-portal__hero { margin-bottom: 1.75rem; }
  .home-portal__logo-wrap { width: 104px; height: 104px; border-radius: 22px; }
  .home-portal__cards { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .home-portal__orb--1 { width: 280px; height: 280px; }
  .home-portal__orb--2 { width: 240px; height: 240px; }
}

/* fallback for browsers without backdrop-filter */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .home-portal-card,
  .hp-glass-clock,
  .home-portal__lang,
  .home-portal__logo-wrap,
  .home-portal__footer {
    background: rgba(16, 32, 64, 0.88);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-portal__orb,
  .home-portal__bg::before { animation: none; }
  .home-portal-card,
  .hp-glass-clock,
  .home-portal__logo-wrap { animation: none; transition: none; }
  .home-portal-card::after { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   Nyongeza: salamu + typewriter, ticker, nyota, tilt-glare,
   mawasiliano ya haraka, splash ya logo
   ═══════════════════════════════════════════════════════════════ */

/* ---- Salamu ya muda (Habari za jioni 👋) ---- */
.hp-greeting {
  position: relative;
  z-index: 2;
  margin: 0.9rem 0 0.2rem;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9be7ff;
  text-shadow: 0 2px 14px rgba(4, 12, 30, 0.5);
}

.hp-greeting__wave {
  display: inline-block;
  animation: hp-wave 2.4s ease-in-out infinite;
  transform-origin: 70% 70%;
}

@keyframes hp-wave {
  0%, 55%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(16deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(12deg); }
  40% { transform: rotate(-4deg); }
}

/* ---- Typewriter ---- */
.hp-type__caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 3px;
  vertical-align: -0.15em;
  background: #9be7ff;
  animation: hp-caret 0.85s steps(1) infinite;
}

.hp-type__caret--done {
  animation: hp-caret 0.85s steps(1) infinite, hp-caret-fade 1s ease 2.4s forwards;
}

@keyframes hp-caret {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes hp-caret-fade {
  to { opacity: 0; width: 0; margin-left: 0; }
}

/* ---- Ticker ya matangazo (glass strip) ---- */
.hp-ticker {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0;
  max-width: min(720px, calc(100vw - 2rem));
  margin: 1rem auto 1.9rem;
  border-radius: 999px;
  background: var(--hp-glass);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 12px 30px rgba(4, 12, 30, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  overflow: hidden;
}

.hp-ticker__label {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  align-self: stretch;
  color: #06263d;
  background: linear-gradient(135deg, #ffc98f, #fe9638);
  font-size: 0.85rem;
}

.hp-ticker__viewport {
  flex: 1 1 auto;
  overflow: hidden;
  padding: 0.5rem 0;
  mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}

.hp-ticker__track {
  display: inline-flex;
  white-space: nowrap;
  will-change: transform;
  animation: hp-ticker-scroll 38s linear infinite;
}

.hp-ticker__track > span {
  padding: 0 2.4rem 0 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(240, 248, 255, 0.92);
  letter-spacing: 0.01em;
}

.hp-ticker:hover .hp-ticker__track {
  animation-play-state: paused;
}

@keyframes hp-ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---- Nyota zinazometa (subtle particles) ---- */
.hp-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hp-star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  box-shadow: 0 0 6px 1px rgba(190, 232, 255, 0.75);
  animation: hp-twinkle ease-in-out infinite;
}

@keyframes hp-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.7); }
  50% { opacity: 0.85; transform: scale(1.15); }
}

/* ---- Tilt glare: mwanga unaofuata mouse juu ya kadi ---- */
.home-portal-card {
  transform-style: preserve-3d;
}

.home-portal-card__glare {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(circle 220px at var(--hp-mx, 50%) var(--hp-my, 50%), rgba(255, 255, 255, 0.28) 0%, transparent 70%);
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.home-portal-card:hover .home-portal-card__glare {
  opacity: 1;
}

/* ---- Mawasiliano ya haraka (glass icons) ---- */
.hp-contacts {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin: 2.2rem auto 0;
}

.hp-contacts__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #e8f5ff;
  font-size: 1.05rem;
  text-decoration: none;
  background: var(--hp-glass);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  box-shadow: 0 10px 24px rgba(4, 12, 30, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.hp-contacts__btn:hover {
  transform: translateY(-4px) scale(1.08);
  color: #06263d;
  background: linear-gradient(135deg, #ffffff, #d8f2ff);
  box-shadow: 0 16px 34px rgba(4, 12, 30, 0.45);
}

/* ---- Splash ya logo ---- */
.hp-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 85% 65% at 12% -5%, rgba(64, 199, 240, 0.7) 0%, transparent 60%),
    radial-gradient(ellipse 70% 55% at 100% 5%, rgba(255, 166, 77, 0.55) 0%, transparent 58%),
    radial-gradient(ellipse 80% 60% at 50% 112%, rgba(62, 184, 219, 0.55) 0%, transparent 62%),
    linear-gradient(160deg, #16295c 0%, #1d3f85 40%, #14608f 70%, #183067 100%);
  opacity: 1;
  transition: opacity 0.5s ease;
}

.hp-splash--exit {
  opacity: 0;
  pointer-events: none;
}

.hp-splash__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding: 2rem 2.6rem;
  border-radius: 24px;
  background: var(--hp-glass);
  border: 1px solid var(--hp-glass-border);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--hp-glass-shadow);
  animation: hp-splash-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes hp-splash-in {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.hp-splash__logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  border-radius: 18px;
  filter: drop-shadow(0 10px 26px rgba(4, 12, 30, 0.5));
  animation: hp-splash-pulse 1.4s ease-in-out infinite;
}

@keyframes hp-splash-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.hp-splash__name {
  margin: 0;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-align: center;
}

.hp-splash__bar {
  width: 160px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.hp-splash__bar-fill {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3eb8db, #9be7ff);
  animation: hp-splash-bar 1.1s ease-in-out infinite;
}

@keyframes hp-splash-bar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

/* ---- Reduced motion: zima michezo mikubwa ---- */
@media (prefers-reduced-motion: reduce) {
  .hp-greeting__wave,
  .hp-star,
  .hp-splash__logo,
  .hp-splash__bar-fill { animation: none; }
  .hp-ticker__track { animation-duration: 90s; }
}

@media (max-width: 640px) {
  .hp-ticker { margin: 0.8rem auto 1.5rem; }
  .hp-ticker__track > span { font-size: 0.76rem; }
  .hp-contacts { gap: 0.65rem; margin-top: 1.8rem; }
  .hp-contacts__btn { width: 42px; height: 42px; font-size: 0.95rem; }
}
