/* ===== SCIPEC dynamic UI layer (add after styles.css) ===== */

@keyframes reveal-up {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: none; }
  }
  
  /* Scroll reveal + hero entrance. Only active when JS adds the "js" class,
     so visitors without JavaScript still see all content. */
  .js .reveal:not(.is-visible) { opacity: 0; }
  .js .reveal.is-visible,
  .js .hero-in {
    animation: reveal-up 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
    animation-delay: var(--d, 0ms);
  }
  
  /* Header: soft shadow and tighter padding once the page is scrolled */
  header.sticky {
    transition-property: box-shadow, padding;
    transition-duration: 0.3s;
  }
  header.sticky.is-scrolled {
    box-shadow: 0 10px 30px -18px rgba(2, 63, 52, 0.35);
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
  }
  
  /* Active section in the main menu */
  #main-nav a.is-active {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 10px;
    text-decoration-color: #90d0c8;
  }
  
  /* Floating helpers */
  #to-top,
  #mobile-cta {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  #to-top { transform: translateY(12px); }
  #mobile-cta { transform: translateY(100%); }
  #to-top.is-visible,
  #mobile-cta.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  
  /* Respect "reduce motion" settings */
  @media (prefers-reduced-motion: reduce) {
    .js .reveal:not(.is-visible) { opacity: 1; }
    .js .reveal.is-visible,
    .js .hero-in { animation: none; }
    #to-top, #mobile-cta { transition: none; }
    html { scroll-behavior: auto; }
  }