/* ASEC seal tokens — blue + gold inherited by every surface */
:root {
  --asec-navy: #0A326B;
  --asec-ink: #0A326B;
  --asec-blue: #1573C5;
  --asec-blue-dark: #0C4A93;
  --asec-blue-mid: #1B86DB;
  --asec-soft: #E6F2FB;
  --asec-gold: #E8B423;
  --asec-gold-deep: #D4A017;
  --asec-cream: #F3F7FC;
  --asec-paper: #FFFFFF;
}

.kitenge-wash {
  background-color: var(--asec-cream);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(232, 180, 35, 0.16) 0 18%, transparent 19%),
    radial-gradient(circle at 88% 8%, rgba(21, 115, 197, 0.14) 0 16%, transparent 17%),
    linear-gradient(135deg, rgba(10, 50, 107, 0.035) 0 25%, transparent 25% 50%, rgba(10, 50, 107, 0.035) 50% 75%, transparent 75%);
  background-size: auto, auto, 28px 28px;
}

.hero-panel {
  background:
    linear-gradient(160deg, rgba(10, 50, 107, 0.94), rgba(21, 115, 197, 0.82)),
    url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23E8B423' stroke-opacity='0.22' stroke-width='1'%3E%3Cpath d='M0 40h80M40 0v80'/%3E%3Ccircle cx='40' cy='40' r='12'/%3E%3C/g%3E%3C/svg%3E");
}

.phone-shine {
  box-shadow: 0 30px 70px -28px rgba(10, 50, 107, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(232, 180, 35, 0.72);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.brand-mark-lg {
  width: 3rem;
  height: 3rem;
}

.brand-mark-xl {
  width: 5.5rem;
  height: 5.5rem;
}

.landing-hero {
  position: relative;
  isolation: isolate;
  min-height: min(92vh, 54rem);
  overflow: hidden;
}

.landing-students {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.landing-students-main {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 24%;
  transform-origin: 70% 24%;
  animation: courtyardDrift 64s ease-in-out infinite alternate;
}

.landing-students-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(243, 247, 252, 0.94) 0 32%, rgba(243, 247, 252, 0.58) 48%, rgba(10, 50, 107, 0.1) 72%, rgba(10, 50, 107, 0.28) 100%);
  pointer-events: none;
}

.landing-class-card {
  margin: 1.5rem 0 0;
  max-width: 22rem;
  overflow: hidden;
  border-radius: 1.25rem;
  border: 3px solid #fff;
  box-shadow: 0 16px 36px rgba(10, 50, 107, 0.18);
}

.landing-class-card img {
  display: block;
  width: 100%;
  height: 9.5rem;
  object-fit: cover;
  object-position: center 30%;
}

.asec-hub {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(38rem, 100%);
  margin-inline: auto;
}

.asec-hub-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  container-type: size;
}

.asec-hub-gear-wrap {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
  will-change: transform;
}

.asec-hub-gear-enter {
  position: absolute;
  inset: 0;
  animation: gearEnter 1.25s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.asec-hub-gear {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 22px 36px rgba(10, 50, 107, 0.28));
}

.asec-hub-sheen {
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(from 210deg, transparent 0 72%, rgba(255, 244, 200, 0.28) 82%, transparent 92%);
  mix-blend-mode: soft-light;
  animation: hubSheen 14s linear infinite;
}

.asec-hub-orbit {
  position: absolute;
  inset: 4%;
  z-index: 2;
  pointer-events: none;
  animation: hubOrbit 42s linear infinite;
}

.asec-hub-sat {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 11px;
  margin: -5.5px 0 0 -5.5px;
  border-radius: 50%;
  background: var(--asec-gold);
  box-shadow: 0 0 0 4px rgba(232, 180, 35, 0.16);
  transform: rotate(var(--a)) translateY(calc(-1 * 46cqmin));
}

.asec-hub-core {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  box-sizing: border-box;
  width: 68%;
  height: 68%;
  overflow: visible;
  border: 6px solid var(--asec-gold);
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  animation: crestSettle 1.35s cubic-bezier(0.22, 1, 0.36, 1) both, crestGlow 10s ease-in-out 1.5s infinite;
}

.asec-hub-core::before {
  content: "";
  position: absolute;
  inset: -16px;
  z-index: -1;
  border-radius: 50%;
  border: 1px dashed rgba(232, 180, 35, 0.5);
}

.asec-hub-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 50%;
}

.asec-hub-caption {
  margin-top: 1.1rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: var(--asec-navy);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(10, 50, 107, 0.2);
  animation: captionIn 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.45s both;
}

@keyframes gearEnter {
  from {
    opacity: 0;
    transform: rotate(-22deg) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hubSheen {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes hubOrbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

@keyframes courtyardDrift {
  from { transform: scale(1); }
  to { transform: scale(1.025); }
}

@keyframes crestSettle {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes crestGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 180, 35, 0); }
  50% { box-shadow: 0 0 0 10px rgba(232, 180, 35, 0.12); }
}

@keyframes captionIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes heroIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes panelItemIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes ruleDraw {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.hero-in {
  animation: heroIn 1.05s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--delay, 0s);
}

.hero-panel-item {
  animation: panelItemIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(0.7s + var(--i, 0) * 0.16s);
}

.js-anim .reveal {
  opacity: 0;
}

.js-anim .reveal.is-visible,
.reveal.is-visible {
  opacity: 1;
  animation: heroIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--delay, 0s);
}

.academic-heading {
  position: relative;
  display: inline-block;
}

.academic-heading::after {
  content: "";
  display: block;
  width: min(7.5rem, 55%);
  height: 2px;
  margin-top: 0.65rem;
  background: linear-gradient(90deg, var(--asec-gold), rgba(232, 180, 35, 0));
  transform: scaleX(0);
  transform-origin: left center;
}

.academic-heading.is-visible::after,
.js-anim .academic-heading.is-visible::after {
  animation: ruleDraw 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.academic-steps {
  position: relative;
}

.academic-steps.is-visible .academic-steps-rule {
  transform: scaleX(1);
}

.academic-steps-rule {
  display: none;
}

@media (min-width: 768px) {
  .academic-steps-rule {
    display: block;
    position: absolute;
    top: 5.15rem;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(232, 180, 35, 0.55), transparent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 1.35s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
  }
}

.academic-step-num {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(232, 180, 35, 0.45);
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  transform: scale(0.92);
  opacity: 0.55;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease, background-color 0.6s ease;
}

.academic-steps.is-visible .academic-step-num {
  transform: scale(1);
  opacity: 1;
  background: rgba(232, 180, 35, 0.12);
}

.academic-stat dd {
  font-variant-numeric: tabular-nums;
}

.shine-btn {
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

.shine-btn:hover {
  transform: translateY(-1px);
}

.shine-btn::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -40%;
  width: 22%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  transform: skewX(-18deg);
  animation: shine 9s ease-in-out 1.2s 1;
}

.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 3.5rem;
  animation: marquee 48s linear infinite;
}

.marquee:hover .marquee-track,
.anim-paused .marquee-track,
.anim-paused .asec-hub-gear-enter,
.anim-paused .asec-hub-sheen,
.anim-paused .asec-hub-orbit,
.anim-paused .landing-students-main,
.anim-paused .asec-hub-core {
  animation-play-state: paused;
}

.lift {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -24px rgba(10, 50, 107, 0.38);
}

.gold-glow:hover {
  box-shadow: 0 0 0 4px rgba(232, 180, 35, 0.14);
}

.site-header {
  transition: box-shadow 0.35s ease, background-color 0.35s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 16px 36px -22px rgba(10, 50, 107, 0.55);
}

.site-nav a {
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.4rem;
  height: 2px;
  background: var(--asec-gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.site-nav a:focus-visible,
.shine-btn:focus-visible {
  outline: 2px solid var(--asec-gold);
  outline-offset: 3px;
}

@keyframes shine {
  0% { left: -40%; }
  100% { left: 130%; }
}

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

@keyframes pageIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.page-in {
  animation: pageIn 0.5s ease;
}

#mobile-nav {
  transition: opacity 0.28s ease;
}

.shelf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.shelf-chip {
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0a326b;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(10, 50, 107, 0.28);
}

.shelf-chip.is-on {
  background: #0a326b;
  color: #fff;
  box-shadow: inset 0 0 0 2px #e8b423;
}

.shelf-filters {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  align-items: end;
}

.shelf-filters label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4a5a70;
}

.shelf-filters input,
.shelf-filters select {
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(10, 50, 107, 0.12);
  background: #fff;
  padding: 0 0.9rem;
  color: var(--asec-ink);
  font-weight: 600;
}

.shelf-card {
  display: block;
  overflow: hidden;
  border-radius: 1.5rem;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(10, 50, 107, 0.1);
  color: inherit;
  text-decoration: none;
}

.shelf-cover {
  position: relative;
  min-height: 148px;
  padding: 1.1rem 1.15rem;
  color: #fff;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 42%),
    linear-gradient(180deg, color-mix(in srgb, var(--cover, #0a326b) 88%, white), var(--cover, #0a326b));
}

.shelf-cover.has-photo {
  min-height: 220px;
  padding: 0.9rem 1rem;
}

.shelf-cover.has-photo::before {
  display: none;
}

.shelf-cover.has-photo.shelf-cover-wide {
  min-height: 320px;
}

.shelf-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.shelf-cover.has-photo .shelf-badge,
.shelf-cover.has-photo .shelf-year {
  position: relative;
  z-index: 1;
}

.shelf-cover::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 10px;
  width: 8px;
  border-radius: 4px;
  background: rgba(232, 180, 35, 0.85);
}

.shelf-cover strong {
  display: block;
  margin-top: 2.2rem;
  color: #fff;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.2;
  text-shadow: 0 1px 8px rgba(10, 50, 107, 0.55);
}

.shelf-cover-wide {
  min-height: 200px;
}

.shelf-cover-wide strong {
  margin-top: 3rem;
  font-size: 1.8rem;
}

.shelf-badge,
.shelf-year {
  display: inline-block;
  border-radius: 999px;
  padding: 0.22rem 0.6rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: #0a326b;
}

.shelf-year {
  margin-left: 0.35rem;
}

.shelf-body {
  padding: 1.15rem 1.2rem 1.3rem;
  color: #0a326b;
  background: #fff;
}

.shelf-body .text-clay,
.shelf-body p {
  color: #3a4a60;
}

.shelf-body h2,
.shelf-body h3,
.shelf-body .font-display {
  color: #0a326b;
}

.shop-cover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 40%),
    linear-gradient(180deg, #1573c5, #0a326b);
}

.shop-book { --cover: #0c4a93; }
.shop-stationery { --cover: #1573c5; }
.shop-uniform { --cover: #0a326b; }
.shop-shoes { --cover: #4a5a70; }
.shop-exam { --cover: #8a5a12; }

.shop-book,
.shop-stationery,
.shop-uniform,
.shop-shoes,
.shop-exam {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 40%),
    linear-gradient(180deg, color-mix(in srgb, var(--cover) 80%, white), var(--cover));
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .hero-in, .hero-panel-item, .asec-hub-core, .asec-hub-caption, .academic-heading::after {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }
  .asec-hub-core {
    transform: translate(-50%, -50%);
  }
  .asec-hub-core::before,
  .landing-students-main,
  .float-slow,
  .shine-btn::after,
  .marquee-track,
  .page-in,
  .asec-hub-gear-enter,
  .asec-hub-sheen,
  .asec-hub-orbit {
    animation: none;
  }
  .asec-hub-sat {
    display: none;
  }
  .academic-steps-rule,
  .academic-step-num {
    transform: none;
    opacity: 1;
  }
  .lift:hover,
  .shine-btn:hover {
    transform: none;
  }
}

@media (max-width: 900px) {
  .landing-students-main {
    object-position: center 20%;
  }
  .landing-students-veil {
    background:
      linear-gradient(180deg, rgba(243, 247, 252, 0.92) 0 38%, rgba(243, 247, 252, 0.62) 58%, rgba(10, 50, 107, 0.22) 100%);
  }
}

/* Fit every public page on phone, tablet, and desktop */
html {
  overflow-x: clip;
}

body.page-in,
body.kitenge-wash {
  overflow-x: clip;
  max-width: 100%;
}

img {
  max-width: 100%;
}

.site-header {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.site-header-bar {
  min-width: 0;
}

.site-brand {
  min-width: 0;
}

.site-nav-toggle {
  color: #fff;
  border: 1.5px solid rgba(232, 180, 35, 0.85);
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.15rem;
  line-height: 1;
}

.site-mobile-nav {
  flex-direction: column;
  gap: 0.35rem;
  max-height: min(70vh, 32rem);
  overflow: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.85rem 1rem 1.1rem;
}

.site-mobile-nav.is-open {
  display: flex;
}

.site-mobile-link,
.site-mobile-cta {
  display: block;
  min-height: 44px;
  padding: 0.7rem 0.15rem;
  color: #fff;
  text-decoration: none;
}

.site-mobile-cta {
  margin-top: 0.25rem;
  border-radius: 999px;
  background: var(--asec-gold);
  color: var(--asec-navy);
  font-weight: 700;
  text-align: center;
}

body.nav-open {
  overflow: hidden;
}

.shelf-filters .shine-btn,
.shelf-filters button {
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  padding: 0 1.1rem;
  background: var(--asec-gold);
  color: var(--asec-navy);
  font-weight: 700;
}

main,
.shelf-body h2,
.shelf-body h3,
.academic-stat dd {
  overflow-wrap: anywhere;
}

input,
select,
textarea {
  font-size: 16px;
  max-width: 100%;
}

@media (max-width: 1279px) {
  .landing-hero {
    min-height: 0;
  }

  .asec-hub {
    width: min(22rem, 72vw);
  }
}

@media (max-width: 767px) {
  .landing-hero {
    min-height: 0;
  }

  .landing-hero > .relative {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
    gap: 2rem;
  }

  .asec-hub {
    width: min(16.75rem, 78vw);
  }

  .asec-hub-core {
    border-width: 4px;
  }

  .asec-hub-core::before {
    inset: -10px;
  }

  .asec-hub-caption {
    white-space: normal;
    text-align: center;
    letter-spacing: 0.1em;
    line-height: 1.35;
    max-width: 18rem;
  }

  .academic-stat {
    gap: 0.65rem;
  }

  .academic-stat dd {
    font-size: 1.05rem;
    line-height: 1.2;
  }

  .shelf-filters {
    grid-template-columns: 1fr;
  }

  .shelf-cover.has-photo {
    min-height: 180px;
  }

  .shelf-cover.has-photo.shelf-cover-wide,
  .shelf-cover-wide {
    min-height: 200px;
  }

  .shelf-cover-wide strong {
    margin-top: 2rem;
    font-size: 1.4rem;
  }

  .shelf-body {
    padding: 1rem 1rem 1.1rem;
  }

  footer .font-display {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 420px) {
  .academic-stat {
    grid-template-columns: 1fr;
  }

  .brand-mark {
    width: 2.15rem;
    height: 2.15rem;
  }
}

.pwa-install {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1.5px solid rgba(232, 180, 35, 0.9);
  border-radius: 999px;
  background: rgba(232, 180, 35, 0.12);
  color: #e8b423;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0 0.9rem;
  cursor: pointer;
}

.pwa-install.is-ready {
  background: #e8b423;
  color: #0a326b;
  box-shadow: 0 0 0 3px rgba(232, 180, 35, 0.28);
}

.asec-ops-top .pwa-install {
  color: #0a326b;
  border-color: #0a326b;
  background: #fff;
}

@media (display-mode: standalone) {
  body {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .site-header,
  .asec-ops-top {
    padding-top: env(safe-area-inset-top);
  }
}
