/* Fe Sin Filtro — enhancements. Loaded after the main bundle. Does not remove existing animations, colors, or components. */

/* ---- Base polish ---- */
html {
  scroll-behavior: smooth;
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

#contenido,
#gracia,
#profecia,
#verdad,
#pilares,
#familia,
#galeria,
#donar,
#oracion,
#accion,
#contacto {
  scroll-margin-top: 6.25rem;
}

.scroll-mt-28 {
  scroll-margin-top: 7rem;
}

::selection {
  background: rgba(212, 175, 55, 0.35);
  color: #0a1428;
}

/* Balanced headings, nicer wrapping */
h1, h2, h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* Focus visible — gold ring, used by keyboard users */
:focus {
  outline: none;
}
:focus-visible {
  outline: 2.5px solid #d4af37;
  outline-offset: 3px;
  border-radius: 4px;
}
a.rounded-full:focus-visible,
button.rounded-full:focus-visible,
.fsf-top:focus-visible,
.fsf-donate-wa:focus-visible {
  outline-offset: 4px;
  border-radius: 999px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  background: #0a1428;
  color: #f3e5ab;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(10, 20, 40, 0.35);
  transition: top 0.2s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 1rem;
  outline: 2.5px solid #d4af37;
  outline-offset: 3px;
}

/* ---- Contrast: gold text on light surfaces (nav “Gracia” was 1.95:1) ---- */
/* Deeper bronze, still clearly gold, only for small nav/text on light backgrounds. */
nav a.text-gold {
  color: #8a6f10;
  border-color: #8a6f10;
}

/* Donate “coming soon” was white at 50% — bump for readability, keep the quiet tone. */
#donar p.italic {
  color: rgba(255, 255, 255, 0.82);
}

/* White text on gold CTAs: a light shadow helps perceived contrast without changing colors. */
.bg-gradient-gold {
  text-shadow: 0 1px 2px rgba(10, 20, 40, 0.28);
}

/* ---- Glassy polish (adds to existing .glass / .glass-dark, does not remove them) ---- */
.glass {
  -webkit-backdrop-filter: blur(24px) saturate(1.35);
  backdrop-filter: blur(24px) saturate(1.35);
}
.glass-dark {
  -webkit-backdrop-filter: blur(28px) saturate(1.3);
  backdrop-filter: blur(28px) saturate(1.3);
}

/* Mobile menu: the original glass was too transparent and hero text showed through. */
@media (max-width: 767px) {
  nav > div.glass,
  nav div.absolute.top-full {
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: blur(32px) saturate(1.45);
    backdrop-filter: blur(32px) saturate(1.45);
    border-bottom: 1px solid rgba(212, 175, 55, 0.22);
    box-shadow: 0 24px 48px rgba(10, 20, 40, 0.14);
  }
  nav.glass,
  nav.fixed.glass {
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(28px) saturate(1.4);
    backdrop-filter: blur(28px) saturate(1.4);
  }
  /* Larger tap targets in the mobile drawer */
  nav > div.glass a,
  nav > div.glass button,
  nav div.absolute.top-full a,
  nav div.absolute.top-full button {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  /* WhatsApp FAB overlaps the hero CTA on small screens */
  header a.bg-gradient-gold {
    margin-right: 3.6rem;
    margin-left: 0.25rem;
  }
}

/* Scrolled nav: slightly richer glass */
nav.glass {
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  backdrop-filter: blur(24px) saturate(1.4);
}

/* ---- Back to top ---- */
.fsf-top {
  position: fixed;
  right: 1.5rem;
  bottom: 6.75rem;
  z-index: 90;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 999px;
  background: rgba(10, 20, 40, 0.88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  color: #f3e5ab;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(10, 20, 40, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.fsf-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.fsf-top:hover {
  background: #0a1428;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.35), 0 8px 24px rgba(10, 20, 40, 0.4);
}
.fsf-top svg {
  width: 20px;
  height: 20px;
}

/* ---- Donate WhatsApp CTA (the section already invites WhatsApp contact) ---- */
.fsf-donate-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1.75rem;
  padding: 0.95rem 1.85rem;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(37, 211, 102, 0.32);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  text-shadow: none;
}
.fsf-donate-wa:hover {
  background: #20b858;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(37, 211, 102, 0.4);
  color: #fff;
}
.fsf-donate-wa svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* ---- Reduced motion: keep animations defined, shorten them when requested ---- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .liquid-blob,
  .animate-ping {
    animation: none !important;
  }
  .fsf-top,
  .fsf-donate-wa {
    transition: none;
  }
}

/* ---- Noscript fallback ---- */
.fsf-noscript {
  max-width: 40rem;
  margin: 4rem auto;
  padding: 2.5rem 2rem;
  text-align: center;
  font-family: "Plus Jakarta Sans", sans-serif;
  color: #0a1428;
}
.fsf-noscript h1 {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  margin-bottom: 0.75rem;
}
.fsf-noscript a {
  color: #8a6f10;
}

/* Privacy / 404 pages share a few helpers (also used if this CSS is linked there) */
@media (min-width: 768px) {
  .fsf-top {
    right: 1.65rem;
    bottom: 6.9rem;
  }
}
