/* Scroll reveal + animations */
.reveal { opacity: 0; transform: translate3d(0, 24px, 0); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translate3d(0,0,0); }
@keyframes fadeUp {
  from { opacity: 0; transform: translate3d(0, 20px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
.animate-fade-up { animation: fadeUp 0.7s ease-out both; }
.hero-kenburns { animation: kenburns 18s ease-in-out infinite alternate; }
@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

/* Site header sticky — override legacy header.sticky rules from compiled CSS */
#masthead.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
#masthead.site-header--sticky {
  background: var(--background) !important;
  box-shadow: 0 1px 0 0 var(--border) !important;
}
#masthead.site-header--sticky .nav-link,
#masthead.site-header--sticky .search-toggle,
#masthead.site-header--sticky .mobile-menu-toggle {
  color: #105286 !important;
}
#masthead.site-header--sticky .nav-link:hover,
#masthead.site-header--sticky .search-toggle:hover,
#masthead.site-header--sticky .mobile-menu-toggle:hover {
  color: var(--primary) !important;
}
.header-overlay #masthead.site-header--overlay {
  background: #ffffff !important;
  box-shadow: none !important;
}
.header-overlay #masthead.site-header--overlay .nav-link,
.header-overlay #masthead.site-header--overlay .search-toggle,
.header-overlay #masthead.site-header--overlay .mobile-menu-toggle {
  /*color: var(--on-dark) !important;*/
  color: #105286 !important;
}
.header-overlay #masthead.site-header--overlay .nav-link:hover,
.header-overlay #masthead.site-header--overlay .search-toggle:hover,
.header-overlay #masthead.site-header--overlay .mobile-menu-toggle:hover {
  color: var(--primary) !important;
}
.header-overlay #masthead.site-header--sticky {
  background: var(--background) !important;
  box-shadow: 0 1px 0 0 var(--border) !important;
}
.header-overlay #masthead.site-header--sticky .nav-link,
.header-overlay #masthead.site-header--sticky .search-toggle,
.header-overlay #masthead.site-header--sticky .mobile-menu-toggle {
  color: var(--foreground) !important;
}
.header-overlay #masthead.site-header--sticky .nav-link:hover,
.header-overlay #masthead.site-header--sticky .search-toggle:hover,
.header-overlay #masthead.site-header--sticky .mobile-menu-toggle:hover {
  color: #19517b !important;
}

/* Hero typography */
.hero-slider h2 { font-family: var(--font-display); font-size: 48px; }

/* Card slider dots — explicit styles for JS-generated controls */
.card-slider-dot {
  height: 0.375rem;
  width: 0.75rem;
  border: 0;
  padding: 0;
  border-radius: 9999px;
  background: var(--border);
  cursor: pointer;
  transition: width 0.3s ease, background-color 0.3s ease;
}
.card-slider-dot:hover { background: color-mix(in oklch, var(--primary) 40%, var(--border)); }
.card-slider-dot.is-active {
  width: 2rem;
  background: var(--primary);
}
.bg-mmgradiant .card-slider-dot {
  background: rgba(255, 255, 255, 0.35);
}
.bg-mmgradiant .card-slider-dot:hover {
  background: rgba(255, 255, 255, 0.55);
}
.bg-mmgradiant .card-slider-dot.is-active {
  background: var(--primary);
}

/* Articleship modal */
#articleship-modal.hidden { display: none !important; }
#articleship-modal:not(.hidden) {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: 1rem;
}
#articleship-modal [data-modal-backdrop] {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
}
#articleship-modal .modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  background: var(--background);
  border-radius: 0.375rem;
  padding: 1.5rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes modalOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
#articleship-modal:not(.hidden) [data-modal-backdrop] {
  animation: modalOverlayIn 0.2s ease-out both;
}
#articleship-modal:not(.hidden) .modal-panel {
  animation: modalIn 0.2s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .animate-fade-up, .hero-kenburns { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
  #articleship-modal .modal-panel, #articleship-modal [data-modal-backdrop] { animation: none !important; }
}
