/* =========================================================================
   Pembrokeshire Schools Football Association
   Custom styles layered on top of Bootstrap 5.
   ========================================================================= */

:root {
  --navy: #0b3057;
  --navy-dark: #082542;
  --green: #01ac83;
  --green-dark: #019670;
  --bg-tint: #eef8f8;
  --bg-tint-2: #f4faf7;
  --text-body: #5b7285;
  --text-heading: #0b3057;
  --border: #e1e8ee;

  --font-heading: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-logo: "Playfair Display", Georgia, "Times New Roman", serif;

  /* Bootstrap variable overrides */
  --bs-primary: #01ac83;
  --bs-body-font-family: var(--font-body);
  --bs-body-color: var(--text-body);
  --bs-link-color: var(--green-dark);
  --bs-link-hover-color: var(--navy);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  font-weight: 700;
  line-height: 1.2;
}

a { text-decoration: none; }

img { max-width: 100%; }

.container-narrow { max-width: 1180px; }

/* ---------------------------------------------------------------------- */
/* Skip link (accessibility)                                              */
/* ---------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--green);
  color: #fff;
  padding: 12px 20px;
  z-index: 2000;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
  color: #fff;
}

/* Consistent, visible focus ring for keyboard users everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.form-control:focus,
.btn:focus-visible {
  outline: 3px solid var(--green-dark);
  outline-offset: 2px;
  box-shadow: none;
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                */
/* ---------------------------------------------------------------------- */
.btn {
  font-weight: 600;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
}

.btn-brand-primary {
  background-color: var(--green);
  border-color: var(--green);
  color: #fff;
}
.btn-brand-primary:hover,
.btn-brand-primary:focus {
  background-color: var(--green-dark);
  border-color: var(--green-dark);
  color: #fff;
}

.btn-brand-outline-light {
  background-color: transparent;
  border: 2px solid rgba(255, 255, 255, 0.65);
  color: #fff;
}
.btn-brand-outline-light:hover,
.btn-brand-outline-light:focus {
  border-color: #fff;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.08);
}

.btn-brand-outline-navy {
  background-color: transparent;
  border: 2px solid var(--navy);
  color: var(--navy);
}
.btn-brand-outline-navy:hover,
.btn-brand-outline-navy:focus {
  background-color: var(--navy);
  color: #fff;
}

/* ---------------------------------------------------------------------- */
/* Header / navigation                                                    */
/* ---------------------------------------------------------------------- */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(8, 37, 66, 0.25);
}

.navbar {
  --bs-navbar-padding-y: 0.8rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff !important;
}

.brand-mark {
  width: 55px;
  height: 55px;
  flex-shrink: 0;
  display: block;
}

.brand-name {
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.site-header .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 600;
  padding: 0.6rem 1.1rem !important;
  border-radius: 999px;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus {
  color: #fff !important;
}

.site-header .nav-link.active {
  background: var(--green);
  color: #fff !important;
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5);
}

.header-social {
  display: flex;
  gap: 6px;
}

.header-social a {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: var(--green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.header-social a:hover,
.header-social a:focus { background: var(--green-dark); }

.navbar-toggler:focus {
  box-shadow: none;
  outline: 3px solid var(--green);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.9%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ---------------------------------------------------------------------- */
/* Hero                                                                    */
/* ---------------------------------------------------------------------- */
.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  color: #fff;
  min-height: 480px;
  display: flex;
  align-items: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(100deg, rgba(8, 37, 66, 0.92) 0%, rgba(8, 37, 66, 0.78) 42%, rgba(8, 37, 66, 0.35) 75%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
}

.hero-bg-2 {
  opacity: 0;
}

.hero .container-narrow {
  position: relative;
  z-index: 2;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 2.9rem);
  max-width: 16ch;
}

.hero-lead {
  color: rgba(255, 255, 255, 0.85);
  max-width: 50ch;
  font-size: 1.05rem;
}

/* Smaller banner hero used on About / Contact pages — no photo, just a
   navy-to-green brand gradient instead. */
.page-hero {
  min-height: 260px;
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-dark) 35%, var(--green) 100%);
}
.page-hero::before {
  content: none;
}
.page-hero h1 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); max-width: none; }

/* Sequential icon animation in the inner-page hero banners. Three white
   line-art figures (skill, fitness, rules) are stacked exactly on top of
   each other and crossfade through in turn, on a loop. */
.hero-icon-stage {
  position: relative;
  width: 170px;
  height: 189px;
}

.hero-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.18));
  animation: hero-icon-cycle 9s ease-in-out infinite;
}

.hero-icon-1 { animation-delay: 0s; }
.hero-icon-2 { animation-delay: 3s; }
.hero-icon-3 { animation-delay: 6s; }

@keyframes hero-icon-cycle {
  0%    { opacity: 0; }
  4%    { opacity: 1; }
  30%   { opacity: 1; }
  36%   { opacity: 0; }
  100%  { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-icon {
    animation: none;
    opacity: 0;
  }
  .hero-icon-1 {
    opacity: 1;
  }
}

/* ---------------------------------------------------------------------- */
/* Intro section                                                          */
/* ---------------------------------------------------------------------- */
.intro h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  max-width: 26ch;
  color: var(--green);
}

/* ---------------------------------------------------------------------- */
/* Document library                                                       */
/* ---------------------------------------------------------------------- */
.library-panel {
  background: var(--bg-tint);
  border-radius: 20px;
  padding: 3rem;
}

.doc-list {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(11, 48, 87, 0.06);
  list-style: none;
  margin: 0;
  padding: 0;
}

.doc-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid var(--border);
}
.doc-row:last-child { border-bottom: none; }

.doc-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.doc-info { flex: 1; min-width: 0; }
.doc-info h3 {
  font-size: 1rem;
  margin: 0 0 2px;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--text-heading);
}
.doc-info p {
  font-size: 0.86rem;
  margin: 0;
  color: var(--text-body);
}

.doc-meta {
  font-size: 0.82rem;
  color: var(--text-body);
  white-space: nowrap;
}

.doc-download {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-tint);
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.doc-download:hover,
.doc-download:focus-visible { background: var(--green); color: #fff; }

.doc-empty,
.doc-loading,
.doc-error {
  padding: 2rem 1.35rem;
  color: var(--text-body);
  font-size: 0.95rem;
}

.doc-error { color: #b3261e; }

.library-note {
  font-size: 0.85rem;
  color: var(--text-body);
  margin-top: 0.9rem;
}

.get-involved-icon svg { width: 60px; height: 60px; }

.involved-list {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 0;
  display: grid;
  gap: 12px;
}

.involved-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-heading);
  font-weight: 500;
  line-height: 1.45;
}

.involved-list .tick-badge {
  margin-top: 2px;
}

.tick-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
}

/* "Follow us for updates" block under Get involved on the home page */
.social-update-block {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--border);
}

.social-update-title {
  font-family: var(--font-heading);
  color: var(--text-heading);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.social-update-block p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.social-update-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 1rem;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
}
.social-btn:hover,
.social-btn:focus {
  background: var(--green);
  color: #fff;
}

.social-update-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--green-dark);
  font-size: 0.9rem;
}
.social-update-cta:hover,
.social-update-cta:focus {
  color: var(--navy);
}

/* ---------------------------------------------------------------------- */
/* Get in touch band                                                      */
/* ---------------------------------------------------------------------- */
.contact-band {
  background: var(--bg-tint-2);
  border-radius: 20px;
  padding: 2.5rem;
}

/* Sized to match the combined width of the Facebook + Twitter buttons
   in the "Follow us" block on the home page, so the two calls-to-action
   feel like they belong to the same design language. */
.contact-cta-btn {
  width: 280px;
  max-width: 100%;
  justify-content: center;
}

.contact-bubble {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-eyebrow {
  color: var(--green-dark);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}

.contact-details-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-heading);
}

.contact-details-list a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-heading);
}
.contact-details-list a:hover { color: var(--green-dark); }

/* ---------------------------------------------------------------------- */
/* Sponsors band                                                          */
/* ---------------------------------------------------------------------- */
.sponsors-section {
  padding: 3.5rem 0 4rem;
  border-top: 1px solid var(--border);
  background-color: #e7e7e7;
}

.sponsors-head h2,
#sponsors-heading {
  font-size: 1.25rem;
}

.sponsors-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}

.sponsors-row img {
  max-height: 145px;
  width: auto;
}

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.85);
  padding: 2.75rem 0;
}

.footer-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  min-width: 0;
}

.footer-chevron {
  flex-shrink: 0;
  opacity: 0.9;
}

.footer-text p {
  margin: 0;
  line-height: 1.5;
}

.footer-copyright {
  color: #fff;
  font-weight: 700;
  font-size: 0.98rem;
}

.footer-orgname {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.98rem;
}

.footer-meta {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.65);
}

.footer-meta a {
  color: var(--green);
  font-weight: 600;
}
.footer-meta a:hover,
.footer-meta a:focus { color: #fff; }

.footer-meta .divider {
  margin: 0 0.5em;
  color: rgba(255, 255, 255, 0.35);
}

.footer-text .footer-legal {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 0.4rem;
  margin-bottom: 0;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
}
.footer-legal a:hover,
.footer-legal a:focus { color: #fff; }

.footer-legal .divider {
  margin: 0 0.5em;
  color: rgba(255, 255, 255, 0.3);
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  flex-shrink: 0;
}

.footer-logo {
  width: 46px;
  height: 46px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.footer-social a:hover,
.footer-social a:focus { background: var(--green); }

@media (max-width: 575.98px) {
  .footer-flex { flex-direction: column; text-align: center; }
  .footer-left { flex-direction: column; text-align: center; }
}

/* ---------------------------------------------------------------------- */
/* About page extras                                                      */
/* ---------------------------------------------------------------------- */
.value-card {
  background: var(--bg-tint);
  border-radius: 16px;
  padding: 1.75rem;
  height: 100%;
}

.value-card .tick-badge-lg {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.value-card h3 { font-size: 1.05rem; }
.value-card p { font-size: 0.92rem; margin: 0; }

.stat-box {
  text-align: center;
  padding: 1.5rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  height: 100%;
}

.stat-box-wsfa {
  border-radius: 150px;
}

.stat-box .num {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--green-dark);
}

.stat-box .label {
  font-size: 0.85rem;
  color: var(--text-body);
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
}

.stat-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 0.35rem;
}

/* Home page stat boxes: fade/slide in, staggered, when scrolled into
   view — see initStatsReveal() in js/main.js. Falls back to fully
   visible with no motion if JS doesn't run or reduced motion is set. */
.stat-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.stat-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.stats-row-animate .col-6:nth-child(1) .stat-reveal { transition-delay: 0s; }
.stats-row-animate .col-6:nth-child(2) .stat-reveal { transition-delay: 0.1s; }
.stats-row-animate .col-6:nth-child(3) .stat-reveal { transition-delay: 0.2s; }
.stats-row-animate .col-6:nth-child(4) .stat-reveal { transition-delay: 0.3s; }

.stat-box:hover {
  border-color: var(--green);
}

@media (prefers-reduced-motion: reduce) {
  .stat-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------------------------------------------------------------------- */
/* FAQ accordion (About page)                                             */
/* ---------------------------------------------------------------------- */
.faq-accordion .accordion-item {
  border: 1px solid var(--border);
  border-radius: 12px !important;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.faq-accordion .accordion-button {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-heading);
  background: #fff;
  padding: 1rem 1.25rem;
}

.faq-accordion .accordion-button:not(.collapsed) {
  background: var(--bg-tint);
  color: var(--green-dark);
  box-shadow: none;
}

.faq-accordion .accordion-button:focus {
  box-shadow: 0 0 0 3px rgba(1, 172, 131, 0.25);
}

.faq-accordion .accordion-button::after {
  flex-shrink: 0;
}

.faq-accordion .accordion-body {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-body);
  font-size: 0.95rem;
}

.faq-accordion .accordion-body a {
  color: var(--green-dark);
  font-weight: 600;
}

/* ---------------------------------------------------------------------- */
/* Legal pages (Privacy Policy / Terms & Conditions)                      */
/* ---------------------------------------------------------------------- */
.legal-content {
  max-width: 72ch;
}

.legal-content h2 {
  font-size: 1.25rem;
  margin-top: 2.25rem;
}
.legal-content h2:first-of-type {
  margin-top: 0;
}

.legal-content p {
  margin-bottom: 1rem;
}

.legal-content ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}
.legal-content li {
  margin-bottom: 0.5rem;
}

.legal-content code {
  color: var(--navy);
  background: var(--bg-tint);
  padding: 0.1em 0.45em;
  border-radius: 4px;
  font-size: 0.9em;
}

.legal-updated {
  display: inline-block;
  background: var(--bg-tint);
  color: var(--text-body);
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  margin-bottom: 2rem;
}

/* The long third-party list reads better as two columns once there's
   room, but never mid-sentence — each item is its own <li>. */
.legal-columns {
  columns: 1;
}
@media (min-width: 768px) {
  .legal-columns {
    columns: 2;
    column-gap: 2rem;
  }
  .legal-columns li {
    break-inside: avoid;
  }
}

/* ---------------------------------------------------------------------- */
/* Contact page form                                                      */
/* ---------------------------------------------------------------------- */
.contact-form label {
  font-weight: 600;
  color: var(--text-heading);
  font-size: 0.9rem;
}

.contact-form .form-control {
  border-radius: 8px;
  border-color: var(--border);
  padding: 0.7rem 0.9rem;
}

.contact-form .form-control:focus {
  border-color: var(--green);
}

.contact-info-card {
  background: var(--bg-tint);
  border-radius: 20px;
  padding: 2.25rem;
}

.form-status {
  display: none;
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  font-size: 0.92rem;
}
.form-status.is-visible { display: block; }
.form-status.success { background: #e3f7ef; color: #036b4d; }
.form-status.error { background: #fdecea; color: #8a221a; }

/* Honeypot field: hidden from sighted users AND kept out of the tab order,
   but still present in the DOM for basic spam-bot filtering. Screen reader
   users never encounter it because it is aria-hidden. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------------------------------------------------------------------- */
/* Reduced motion                                                         */
/* ---------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------------------------------------------------------------------- */
/* Responsive                                                              */
/* ---------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  .library-panel { padding: 1.75rem; }
  .contact-band { padding: 1.75rem; text-align: left; }
  .doc-meta { display: none; }

  #sponsors-heading { text-align: center; width: 100%; }

  .sponsors-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    justify-items: center;
    align-items: center;
    gap: 2rem 1.5rem;
  }
  /* If there's an odd one left over, center it across both columns
     instead of leaving it stranded on the left. */
  .sponsors-row img:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* ---------------------------------------------------------------------- */
/* Custom cursor                                                          */
/* ---------------------------------------------------------------------- */
/* A subtle branded ring in place of the default arrow, and a filled dot
   over anything clickable. Falls back to the normal system cursor
   (the keyword after the comma) if the image can't load for any reason,
   and is skipped entirely on touch devices, which have no cursor anyway. */
@media (hover: hover) and (pointer: fine) {
  body {
    cursor: url("../images/cursor/cursor-default.png") 14 14, auto;
  }

  a,
  button,
  .btn,
  input[type="submit"],
  input[type="button"],
  label[for],
  select,
  .navbar-toggler,
  .accordion-button,
  [role="button"],
  [onclick] {
    cursor: url("../images/cursor/cursor-pointer.png") 14 14, pointer;
  }

  input[type="text"],
  input[type="email"],
  textarea {
    cursor: text;
  }
}

/* ---------------------------------------------------------------------- */
/* Page preloader                                                         */
/* ---------------------------------------------------------------------- */
.page-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.page-preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-mark {
  width: 72px;
  height: 72px;
  animation: preloader-spin 1.1s linear infinite;
}

.preloader-mark img {
  width: 100%;
  height: 100%;
  display: block;
}

@keyframes preloader-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .preloader-mark {
    animation: none;
  }
  .page-preloader {
    transition: opacity 0.15s linear, visibility 0.15s linear;
  }
}

/* ---------------------------------------------------------------------- */
/* Site-wide fade-in-on-scroll                                            */
/* ---------------------------------------------------------------------- */
/* Applied to the main content blocks on every page — see
   initScrollReveal() in js/main.js. Each element fades/slides in the
   first time it scrolls into view, once, independently of the others. */
.intro,
.library-panel,
.contact-band,
.sponsors-section,
.legal-content,
.faq-accordion,
.value-card,
.contact-info-card,
#contact-form {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.intro.is-visible,
.library-panel.is-visible,
.contact-band.is-visible,
.sponsors-section.is-visible,
.legal-content.is-visible,
.faq-accordion.is-visible,
.value-card.is-visible,
.contact-info-card.is-visible,
#contact-form.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .intro,
  .library-panel,
  .contact-band,
  .sponsors-section,
  .legal-content,
  .faq-accordion,
  .value-card,
  .contact-info-card,
  #contact-form {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
