/* Decorative details and motion, with a quieter experience for reading modes. */
.page-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  background: var(--accent-teal);
  transform: scaleX(var(--page-progress, 0));
  transform-origin: left;
  z-index: 110;
  pointer-events: none;
}
.navbar.is-scrolled { box-shadow: 0 5px 24px rgba(15, 44, 89, 0.09); }
.hero-grid { position: relative; z-index: 1; }
.hero::before {
  content: '';
  position: absolute;
  width: 160px;
  height: 120px;
  right: 1.5rem;
  top: 1.75rem;
  opacity: 0.5;
  background-image: radial-gradient(circle, rgba(8, 127, 115, 0.22) 1.5px, transparent 1.5px);
  background-size: 16px 16px;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(8, 127, 115, 0.13);
  border-radius: 50%;
  right: -100px;
  bottom: -190px;
  pointer-events: none;
}
.hero-title span { display: inline-block; position: relative; }
.hero-title span::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.13em;
  height: 0.16em;
  border-top: 3px solid var(--accent-gold);
  border-radius: 50%;
  transform: rotate(-3deg);
}
.hero-content > * { animation: welcome-rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.hero-content > :nth-child(2) { animation-delay: 0.1s; }
.hero-content > :nth-child(3) { animation-delay: 0.2s; }
.hero-content > :nth-child(4) { animation-delay: 0.3s; }
.hero-content > :nth-child(5) { animation-delay: 0.4s; }
.hero-image-wrapper { animation: photo-arrive 0.9s 0.2s both; }
.hero-image-wrapper::before {
  content: '';
  position: absolute;
  inset: 2rem 0 5.5rem 0.7rem;
  border-radius: 28px;
  background: #eee1be;
  transform: rotate(3deg);
  pointer-events: none;
}
.hero-slider, .hero-photo-heading, .hero-image-caption { position: relative; z-index: 1; }
.hero-spark {
  position: absolute;
  z-index: 2;
  color: var(--accent-gold);
  line-height: 1;
  pointer-events: none;
  animation: spark-drift 4s ease-in-out 3;
}
.hero-spark-large { font-size: 3.6rem; left: -1.4rem; top: 1.25rem; }
.hero-spark-small { font-size: 2.7rem; right: -1rem; bottom: 6.2rem; animation-delay: 0.8s; }
.hero-image-caption { transition: border-color 0.25s, box-shadow 0.25s; }
.hero-image-caption:hover { border-color: var(--accent-teal); box-shadow: var(--shadow-md); }
.hero-image-caption > a i, .support-strip-inner > a > i { transition: transform 0.25s; }
.hero-image-caption > a:hover i { transform: translate(2px, -2px); }
.support-strip-inner > a { transition: color 0.25s; }
.support-strip-inner > a:hover > i { transform: translateX(4px); }
.support-strip-inner > a:hover .support-icon { background: var(--accent-teal); color: var(--neutral-card); transform: rotate(-6deg); }
.support-icon { transition: background 0.25s, color 0.25s, transform 0.25s; }
.program-card .program-icon { transition: transform 0.35s, border-radius 0.35s; }
.program-card:hover .program-icon { transform: rotate(-7deg); border-radius: 18px 10px 18px 10px; }
.event-main-img { transition: filter 0.35s; }
.event-featured-card:hover .event-main-img { filter: saturate(1.08); }

.learning-path {
  background: var(--accent-teal-light);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 2.5rem;
  margin-top: 2rem;
}
.learning-path-heading { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; margin-bottom: 2rem; }
.learning-path-heading .section-subtitle { margin-bottom: 0.4rem; }
.learning-path-heading h3 { font-size: 1.65rem; letter-spacing: -0.025em; }
.learning-path-heading > a { color: var(--accent-teal); font-size: 0.85rem; display: inline-flex; align-items: center; gap: 0.5rem; }
.learning-path-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; position: relative; }
.learning-path-steps::before { content: ''; position: absolute; top: 23px; left: 24px; right: 24px; border-top: 1px dashed var(--accent-teal); opacity: 0.3; }
.path-step { position: relative; min-width: 0; }
.path-number {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--accent-teal);
  color: var(--neutral-card);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
  transition: transform 0.3s;
}
.path-step:hover .path-number { transform: translateY(-4px) rotate(-4deg); }
.path-step h4 { font-size: 1rem; margin-bottom: 0.5rem; }
.path-step p { font-size: 0.85rem; line-height: 1.85; color: var(--text-muted); }
body.high-contrast .hero-image-wrapper::before { background: #364337; }
body.high-contrast .path-number { color: #091c3c; }
body.dyslexia-friendly .hero-content > *, body.dyslexia-friendly .hero-image-wrapper,
body.dyslexia-friendly .hero-spark { animation: none; }

@keyframes welcome-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes photo-arrive {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes spark-drift {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-7px) rotate(9deg); }
}
@keyframes menu-unfold {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 1200px) {
  .nav-menu.is-open { animation: menu-unfold 0.25s ease both; }
}
@media (max-width: 768px) {
  .hero-spark { display: none; }
  .hero::before { width: 85px; height: 85px; right: 0.5rem; top: 1rem; opacity: 0.3; }
  .hero-image-wrapper::before { inset: 2rem 0.25rem 5rem 0.75rem; transform: rotate(2deg); }
  .learning-path { padding: 1.35rem; }
  .learning-path-heading { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
  .learning-path-heading h3 { font-size: 1.4rem; }
  .learning-path-steps { grid-template-columns: 1fr; gap: 1.75rem; }
  .learning-path-steps::before { display: none; }
  .path-step { padding-left: 4rem; }
  .path-number { position: absolute; left: 0; top: 0; width: 42px; height: 42px; border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-content > *, .hero-image-wrapper, .hero-spark, .nav-menu.is-open { animation: none; }
  .reveal-on-scroll, .reveal-scale { opacity: 1; transform: none; }
}
