/* ============================================================
   NOR CAN GEO — Animations
   CSS-only, no JS dependencies.
   Durations: 0.2–0.35s interactive · 0.55s scroll-reveal · 1–2s on-load.
   All blocks are mirrored in the prefers-reduced-motion section at the end.
   ============================================================ */

/* ── 1. Card hover — lift + deeper shadow ──────────────────── */
.card {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 32, 91, 0.14);
}

/* ── 2. Button animations — scale + glow ──────────────────── */
.btn {
  position: relative;
  overflow: hidden;
  transition: background 0.25s ease, opacity 0.25s ease,
              transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover        { transform: translateY(-2px); }
.btn--pill:hover  { transform: translateY(-2px); }

.btn--primary:hover {
  box-shadow: 0 6px 18px rgba(24, 165, 164, 0.35);
}

/* Hero CTA variants */
.hero-cta-buttons .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(24, 165, 164, 0.35);
}
.hero-cta-buttons .btn-secondary:hover {
  transform: translateY(-2px);
}

/* Submit button already has translateY in contact.css — keep consistent */
.btn--submit:hover {
  transform: translateY(-2px);
}

/* ── 3. Scroll-reveal — tighten easing ────────────────────── */
.reveal {
  transition:
    opacity  0.55s ease-out var(--reveal-delay, 0ms),
    transform 0.55s ease-out var(--reveal-delay, 0ms);
}

/* ── 4. Nav link underline — grows left → right ───────────── */
.primary-nav ul li a {
  position: relative;
}
.primary-nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--green);
  border-radius: 1px;
  transition: width 0.25s ease, left 0.25s ease;
}
.primary-nav ul li a:hover::after,
.primary-nav ul li.current-menu-item > a::after {
  width: 100%;
  left: 0;
}

/* ── 5. Mobile nav — slide down + fade ────────────────────── */
@media (max-width: 768px) {
  /* Keep rendered (position:absolute so no layout shift), animate visibility */
  .primary-nav {
    display: block !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    /* delay visibility collapse until after fade finishes */
    transition:
      opacity     0.25s ease,
      transform   0.25s ease,
      visibility  0s linear 0.25s;
  }
  .primary-nav.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    /* make visible immediately on open */
    transition:
      opacity     0.25s ease,
      transform   0.25s ease,
      visibility  0s linear 0s;
  }
}

/* ── 6. Search input focus glow ───────────────────────────── */
.header-search input[type="search"] {
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.header-search input[type="search"]:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0, 32, 91, 0.12);
  outline: none;
}

/* ── 7. Partner / sidebar cards ───────────────────────────── */
.partner-card {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.partner-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0, 32, 91, 0.13);
}

/* ── 8. Sidebar person — hover tint ─────────────────────────*/
.sidebar-person {
  transition: background 0.2s ease;
  border-radius: 6px;
  padding: 0.5rem;
  margin-inline: -0.5rem;
}
.sidebar-person:hover {
  background: rgba(0, 32, 91, 0.04);
}

/* ── 9. Footer social icons — pulse ring on hover ─────────── */
.social-icons a {
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.social-icons a:hover {
  transform: translateY(-2px) scale(1.08);
}

/* ── 10. prefers-reduced-motion — disable everything above ── */
@media (prefers-reduced-motion: reduce) {
  /* Cards */
  .card,
  .partner-card {
    transition: none !important;
  }
  .card:hover,
  .partner-card:hover {
    transform: none;
    box-shadow: var(--card-shadow-hover);
  }

  /* Buttons */
  .btn,
  .btn--pill,
  .btn--submit,
  .hero-cta-buttons .btn-primary,
  .hero-cta-buttons .btn-secondary {
    transition: background 0.2s ease, opacity 0.2s ease !important;
    transform: none !important;
    box-shadow: none !important;
  }

  /* Nav underline */
  .primary-nav ul li a::after {
    transition: none !important;
  }

  /* Mobile nav */
  .primary-nav {
    transition: none !important;
  }

  /* Search */
  .header-search input[type="search"] {
    transition: none !important;
  }

  /* Sidebar */
  .sidebar-person {
    transition: none !important;
  }

  /* Social */
  .social-icons a {
    transition: background 0.2s ease, color 0.2s ease !important;
    transform: none !important;
  }
}
