/* Section heading scroll reveal — fade-in-up + highlighted underline */

.section-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.section-header--center {
  align-items: center;
  text-align: center;
}

.section-header > span,
.section-header > p {
  display: block;
  width: 100%;
}

.section-header--center > span,
.section-header--center > p {
  width: auto;
  max-width: 100%;
}

.reveal-heading {
  display: block;
  width: fit-content;
  max-width: 100%;
  opacity: 0;
  transform: translate3d(0, 40px, 0);
}

.reveal-heading.is-visible {
  animation: fade-in-up 0.95s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal-heading::after {
  content: "";
  display: block;
  width: 0;
  height: 4px;
  margin: 0.85rem 0 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #5b2aa6 0%, #ff6a00 100%);
  transition: width 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}

.reveal-heading.is-visible::after {
  width: 5rem;
}

.section-header--center .reveal-heading::after {
  margin-left: auto;
  margin-right: auto;
}

.reveal-heading.heading-on-dark::after {
  background: linear-gradient(90deg, #ff6a00 0%, #ffd0a8 100%);
}

.reveal--instant .reveal-heading {
  opacity: 1;
  transform: none;
  animation: none !important;
}

.reveal--instant .reveal-heading::after {
  width: 5rem;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translate3d(0, 40px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.reveal.section-focus {
  animation: section-focus-ring 1s ease;
}

@keyframes section-focus-ring {
  0%,
  100% {
    box-shadow: inset 0 0 0 0 rgba(255, 106, 0, 0);
  }

  40% {
    box-shadow: inset 0 0 0 3px rgba(255, 106, 0, 0.4);
  }
}

#site-header.is-scrolled {
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
  .reveal-heading {
    opacity: 1;
    transform: none;
    animation: none !important;
  }

  .reveal-heading::after {
    width: 5rem;
    transition: none;
  }

  .reveal-heading:not(.is-visible) {
    opacity: 0.6;
  }

  .reveal.section-focus {
    animation: none;
  }
}
