/* =========================================================
   UNITED UMMAH — FULL STYLESHEET (FINAL)
   File: css/styles.css
   Strategy:
   • Global defaults for all pages
   • Page themes via [data-page] attribute on <body>:
     – body[data-page="journey"]  → dark/cinematic
     – body[data-page="mission"]  → light/dawn
   ========================================================= */

/* 0) DESIGN TOKENS */
:root {
  /* Brand */
  --green: #177245;
  --red: #C22323;
  --black: #0C0C0C;
  --white: #FFFFFF;

  /* Neutrals */
  --ink: #0F172A;
  --sand: #F8F5EF;
  --fog: #E5E7EB;

  /* Typography */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --fs-hero: clamp(30px, 4vw, 46px);
  --fs-h1: clamp(26px, 3.6vw, 36px);
  --fs-h2: clamp(22px, 3vw, 28px);
  --fs-h3: clamp(18px, 2.2vw, 22px);
  --fs-body: 16px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
  --space-10: 64px;

  /* Radius & Shadows */
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,.08);
  --shadow-elev: 0 22px 60px rgba(0,0,0,.12);

  /* Layout */
  --container: 1200px;
}

/* 1) RESET & BASE */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--green);
  text-decoration: none;
  transition: color .2s ease, text-decoration-color .2s ease;
}
a:hover { text-decoration: underline; }

h1, h2, h3 {
  margin: 0 0 var(--space-4);
  line-height: 1.25;
  color: var(--black);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

.container {
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  width: 100%;
}

/* Subtle global background (Home/others). Page themes override with [data-page]. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(1200px 600px at 10% 0%, var(--sand) 0%, #FFFFFF 55%);
}

/* Sections */
.section {
  padding-block: var(--space-10);
  background: transparent;
}
.section:nth-of-type(even) {
  background: linear-gradient(180deg, #FFFFFF 0%, #F7F5F0 100%);
}

/* 2) GLOBAL UI LAYERS */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0;
  background: linear-gradient(90deg, var(--red), var(--green));
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.1);
  background: #fff;
  color: #111;
  font-weight: 900;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0,0,0,.15);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, box-shadow .25s ease;
  z-index: 140;
}
.to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.to-top:hover { box-shadow: 0 14px 36px rgba(0,0,0,.18); }

/* 3) HEADER / NAV (light navbar always) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 150;
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--fog);
  transition: box-shadow .25s ease;
}

.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-4);
}

.site-logo { width: 60px; height: 60px; }

.navbar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  align-items: center;
}

.navbar a {
  display: inline-block;
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--black);
  font-weight: 600;
  transition: background .25s ease, color .25s ease;
}

.navbar a.active,
.navbar a:hover {
  background: linear-gradient(90deg, rgba(23,114,69,.15), rgba(194,35,35,.15));
  text-decoration: none;
}

.menu-toggle {
  display: none;
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}

/* 4) HERO (shared) */
.hero {
  position: relative;
  min-height: 80vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.85) contrast(1.05);
  transform: translateZ(0);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.58) 0%, rgba(0,0,0,.78) 100%);
}

.hero-overlay {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding-block: var(--space-10);
}

.hero-overlay h1 {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: none !important;
  font-size: var(--fs-hero);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .8px;
  text-shadow: 0 2px 10px rgba(0,0,0,.35), 0 8px 28px rgba(0,0,0,.25);
}

.subtitle {
  margin-top: var(--space-3);
  color: #fff;
  opacity: .95;
  font-weight: 700;
}

.description {
  max-width: 820px;
  margin: var(--space-5) auto var(--space-6);
  color: #F1F5F9;
}

/* Helper to force white text anywhere (used in mission hero paragraphs) */
.force-white {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 700;
  will-change: transform;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .25s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn.primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 20px rgba(23,114,69,.35);
}
.btn.primary:hover {
  background: #115b37;
  box-shadow: 0 12px 28px rgba(23,114,69,.45);
}

.btn.secondary {
  background: transparent;
  border-color: rgba(255,255,255,.9);
  color: #fff;
}
.btn.secondary:hover { background: rgba(255,255,255,.14); }

.btn.small {
  padding: 10px 14px;
  font-weight: 600;
}

/* Divider */
.section-divider {
  width: 100%;
  max-height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(23,114,69,.25));
  opacity: .98;
}

/* 5) LAYOUTS */
.split {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: var(--space-8);
  align-items: center;
}
.split.reverse { grid-template-columns: .9fr 1.1fr; }
.split .image img { border-radius: var(--radius); box-shadow: var(--shadow-md); }
.split .text p + p { margin-top: var(--space-3); }

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-7);
}

.grid2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-7);
}

.card {
  background: #fff;
  border: 1px solid var(--fog);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
  transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elev);
  border-color: rgba(23,114,69,.35);
  background: #fff;
}
.card img { border-radius: var(--radius); margin-bottom: var(--space-4); }

figure { margin: 0; }
figure img { border-radius: var(--radius); box-shadow: var(--shadow-sm); }

figcaption {
  margin-top: var(--space-3);
  font-size: 15px;
  color: #374151;
}

.fullbleed { width: 100%; display: block; }

/* 6) OVERLAY BLOCKS */
.overlay-text {
  position: relative;
  margin-top: -30%; /* cinematic pull-up over fullbleed sections */
  margin-bottom: var(--space-8);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0,0,0,.06);
  border-left: 6px solid var(--green);
  padding: var(--space-6);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

/* neutralize overlap where requested (Front A/B on Mission) */
.no-overlap { margin-top: var(--space-6) !important; }

/* 7) FOOTER */
.site-footer {
  position: relative;
  color: #fff;
  background: var(--black);
  overflow: hidden;
  margin-top: var(--space-10);
}
.footer-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .4;
}
.footer-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-block: var(--space-10);
}
.footer-logo {
  width: 70px;
  height: 70px;
  margin: 0 auto var(--space-4);
}
.footer-text {
  max-width: 800px;
  margin: 0 auto var(--space-6);
  color: #E8EDF2;
}
.social-icons {
  display: inline-flex;
  gap: var(--space-4);
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}
.social-icons img {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1);
  opacity: .9;
  transition: opacity .15s ease, transform .15s ease;
  cursor: pointer;
}
.social-icons img:hover { opacity: 1; transform: translateY(-2px); }
.copyright { margin: 0; color: #D1D5DB; font-size: 14px; }

/* 8) REVEAL ANIMATIONS (used by JS) */
.reveal {
  opacity: 0;
  transform: translate3d(0,22px,0);
  transition: opacity .8s ease, transform .8s ease;
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
.reveal.slide-left { transform: translate3d(-28px,0,0); }
.reveal.slide-right { transform: translate3d(28px,0,0); }
.reveal.zoom { transform: scale(.96); }

/* 9) UTILITIES */
.text-gradient {
  background: linear-gradient(90deg, var(--red), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.border-gradient {
  border: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--red), var(--green)) 1;
}
.mt { margin-top: var(--space-6); }
.force-white a {
  color: #ffffff !important;
  text-decoration-color: rgba(255,255,255,.55);
}

/* 10) ACCESSIBILITY */
:focus { outline: none; }
a:focus, button:focus, .btn:focus {
  outline: 2px dashed var(--green);
  outline-offset: 2px;
  border-radius: 6px;
}

/* 11) RESPONSIVE GLOBAL */
@media (max-width:1100px) {
  .split { grid-template-columns: 1fr; }
  .overlay-text { margin-top: -20%; }
  .grid3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width:900px) {
  .menu-toggle { display: block; }
  .navbar {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--fog);
    display: none;
  }
  .navbar ul {
    flex-direction: column;
    gap: 0;
    padding: var(--space-3);
  }
  .navbar a {
    border-radius: 8px;
    padding: 12px;
  }
  body.nav-open .navbar { display: block; }
  .grid3, .grid2 { grid-template-columns: 1fr; }
}

@media (max-width:640px) {
  .hero { min-height: 64vh; }
  .hero-overlay { padding-block: var(--space-8); }
  .overlay-text { margin-top: -10%; padding: var(--space-5); }
  .section { padding-block: var(--space-8); }
  .footer-content { padding-block: var(--space-8); }
}

/* 12) REDUCED MOTION */
@media (prefers-reduced-motion:reduce) {
  * {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
  }
}

/* =========================================================
   PAGE THEME: JOURNEY (DARK CINEMATIC) — scoped
   ========================================================= */

body[data-page="journey"]::before {
  background:
    radial-gradient(1200px 700px at 15% -10%, #121212 0%, #0b0b0b 55%),
    linear-gradient(180deg, #0c0c0c 0%, #0a0a0a 100%);
}

body[data-page="journey"] .section {
  background: linear-gradient(180deg, #0f0f0f 0%, #0b0b0b 100%) !important;
}

/* Navbar must stay dark text on light header */
body[data-page="journey"] .navbar a {
  color: #0a0a0a !important;
  font-weight: 600;
}
body[data-page="journey"] .navbar a:hover,
body[data-page="journey"] .navbar a.active {
  color: var(--green) !important;
  background: linear-gradient(90deg, rgba(23,114,69,.12), rgba(194,35,35,.12));
}

/* Divider glow */
body[data-page="journey"] .section-divider {
  filter:
    drop-shadow(0 0 10px rgba(23,114,69,.35))
    drop-shadow(0 0 8px rgba(194,35,35,.25));
  opacity: .95;
}

/* Overlays & typography (pure white for readability) */
body[data-page="journey"] .overlay-text {
  max-width: 980px;
  background: rgba(0,0,0,.65) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.06);
  border-left: 6px solid var(--green);
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
body[data-page="journey"] h1,
body[data-page="journey"] h2,
body[data-page="journey"] h3,
body[data-page="journey"] h4,
body[data-page="journey"] p,
body[data-page="journey"] li,
body[data-page="journey"] figcaption,
body[data-page="journey"] blockquote {
  color: #ffffff !important;
  text-shadow: 0 0 8px rgba(0,0,0,.6);
}
body[data-page="journey"] h2 {
  font-weight: 800;
  letter-spacing: .2px;
}

/* Content links inside sections = white */
body[data-page="journey"] .section a {
  color: #ffffff !important;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,.45);
}
body[data-page="journey"] .section a:hover { color: #f4f4f4 !important; }

/* Cards on dark */
body[data-page="journey"] .card {
  background: #121212;
  border-color: #1e1e1e;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
body[data-page="journey"] .card p,
body[data-page="journey"] .card h3,
body[data-page="journey"] .card a,
body[data-page="journey"] figcaption {
  color: #ffffff !important;
}

/* Cinematic image fade (paired with JS) */
body[data-page="journey"] .fullbleed {
  opacity: .85;
  transform: scale(1.02);
  transition: opacity .9s ease, transform 1s ease;
  filter: saturate(1.02) contrast(1.08) brightness(.95);
}
body[data-page="journey"] .fullbleed.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Scroll-next arrow */
body[data-page="journey"] .scroll-next {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 24px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 20px;
  line-height: 42px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  cursor: pointer;
  opacity: 0;
  transition: opacity .35s ease, transform .35s ease, box-shadow .25s ease;
}
body[data-page="journey"] .scroll-next.show {
  opacity: .95;
  animation: uuPulse 2.4s ease-in-out infinite;
}
body[data-page="journey"] .scroll-next:hover {
  box-shadow: 0 12px 36px rgba(0,0,0,.45);
}

@keyframes uuPulse {
  0% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
  100% { transform: translateX(-50%) translateY(0); }
}

/* Stronger dark hero overlay */
body[data-page="journey"] .hero::after {
  background: linear-gradient(180deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.82) 100%);
}
body[data-page="journey"] .hero .btn.secondary {
  border-color: rgba(255,255,255,.9);
  color: #fff;
}

/* Footer links bright */
body[data-page="journey"] footer a { color: #ffffff !important; }

/* =========================================================
   PAGE THEME: MISSION (LIGHT/DAWN) — scoped
   ========================================================= */

body[data-page="mission"]::before {
  background:
    radial-gradient(1200px 700px at 10% -10%, #fff9f0 0%, #ffffff 55%),
    linear-gradient(180deg, #ffffff 0%, #faf7f1 100%);
}

body[data-page="mission"] .section {
  background: linear-gradient(180deg, #ffffff 0%, #f9f6f1 100%) !important;
  padding-block: var(--space-10);
}

/* Hero: ensure subtitle/description are white for readability over image */
body[data-page="mission"] .hero::after {
  background: linear-gradient(180deg, rgba(255,255,255,.25) 0%, rgba(255,255,255,0) 40%, rgba(0,0,0,.25) 100%);
}
body[data-page="mission"] .hero-overlay h1 {
  color: #ffffff !important;
  text-shadow: 0 2px 10px rgba(0,0,0,.35), 0 8px 28px rgba(0,0,0,.25);
}
body[data-page="mission"] .hero .subtitle,
body[data-page="mission"] .hero .description {
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0,0,0,.35);
}

/* Typography on light sections */
body[data-page="mission"] h1,
body[data-page="mission"] h2,
body[data-page="mission"] h3,
body[data-page="mission"] h4 {
  color: #0c0c0c;
  font-weight: 800;
  letter-spacing: .2px;
}
body[data-page="mission"] p,
body[data-page="mission"] li,
body[data-page="mission"] figcaption,
body[data-page="mission"] blockquote {
  color: #1f2937;
}

/* Links on light */
body[data-page="mission"] .section a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-color: rgba(23,114,69,.45);
}
body[data-page="mission"] .section a:hover {
  color: #0e5a34;
  text-decoration-color: rgba(23,114,69,.7);
}

/* Overlay text cards (Mission) */
body[data-page="mission"] .overlay-text {
  max-width: 980px;
  background: rgba(255,255,255,.92) !important;
  color: #0f172a !important;
  border: 1px solid rgba(0,0,0,.06);
  border-left: 6px solid var(--green);
  box-shadow: 0 24px 60px rgba(0,0,0,.12);
}

/* Prevent overlay/image overlap specifically in Front A & B */
body[data-page="mission"] #front-a .overlay-text,
body[data-page="mission"] #front-b .overlay-text {
  margin-top: var(--space-6) !important;
  position: relative;
  z-index: 1;
}
body[data-page="mission"] #front-a .grid3,
body[data-page="mission"] #front-b .grid3 {
  position: relative;
  z-index: 2;
}

/* Cards */
body[data-page="mission"] .card {
  background: #ffffff;
  border-color: #ececec;
  box-shadow: 0 16px 40px rgba(0,0,0,.08);
}
body[data-page="mission"] .card h3 { color: #0c0c0c; }
body[data-page="mission"] .card p,
body[data-page="mission"] figcaption { color: #334155; }

/* Images polish */
body[data-page="mission"] .fullbleed {
  filter: saturate(1.02) contrast(1.04) brightness(1.02);
}
body[data-page="mission"] figure img,
body[data-page="mission"] .split .image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

/* Divider */
body[data-page="mission"] .section-divider {
  filter:
    drop-shadow(0 1px 6px rgba(23,114,69,.18))
    drop-shadow(0 1px 6px rgba(194,35,35,.12));
  opacity: .95;
}

/* Buttons on light */
body[data-page="mission"] .btn.primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 20px rgba(23,114,69,.22);
}
body[data-page="mission"] .btn.primary:hover { background: #115b37; }
body[data-page="mission"] .btn.secondary {
  border-color: #0c0c0c;
  color: #0c0c0c;
}
body[data-page="mission"] .btn.secondary:hover { background: rgba(0,0,0,.06); }

/* Navbar stays dark on light header (inherits from global) */
body[data-page="mission"] .navbar a { color: #0a0a0a; }
body[data-page="mission"] .navbar a.active,
body[data-page="mission"] .navbar a:hover {
  color: var(--green);
  background: linear-gradient(90deg, rgba(23,114,69,.12), rgba(194,35,35,.12));
}

/* Responsive refinements */
@media (max-width:1100px) {
  body[data-page="mission"] .overlay-text { margin-top: -10%; }
}
@media (max-width:900px) {
  body[data-page="mission"] .overlay-text {
    margin-top: -6%;
    padding: var(--space-5);
  }
  body[data-page="mission"] #front-a .overlay-text,
  body[data-page="mission"] #front-b .overlay-text {
    margin-top: var(--space-5) !important;
  }
}
@media (max-width:640px) {
  body[data-page="mission"] .hero { min-height: 66vh; }
  body[data-page="mission"] .hero-overlay { padding-block: var(--space-8); }
  body[data-page="mission"] .overlay-text {
    margin-top: -2%;
    padding: var(--space-5);
  }
  body[data-page="mission"] h1 { font-size: clamp(28px, 6.5vw, 42px); }
  body[data-page="mission"] h2 { font-size: clamp(22px, 5.3vw, 32px); }
  body[data-page="mission"] .section { padding-block: var(--space-8); }
}

/* =========================================================
   END — Full Stylesheet
   ========================================================= */

/* === Reset Mission footer to shared footer styling === */
body[data-page="mission"] .site-footer { background: var(--black) !important; }
body[data-page="mission"] .footer-bg { opacity: .4 !important; }
body[data-page="mission"] .footer-text,
body[data-page="mission"] .copyright { color: #E8EDF2 !important; }
body[data-page="mission"] .social-icons {
  display: inline-flex !important;
  gap: var(--space-4) !important;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}
body[data-page="mission"] .social-icons a {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}
body[data-page="mission"] .social-icons img {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1) !important; /* white icons on dark */
  opacity: .9 !important;
  transition: opacity .15s ease, transform .15s ease;
}
body[data-page="mission"] .social-icons img:hover {
  opacity: 1 !important;
  transform: translateY(-2px);
}
body[data-page="mission"] .footer-logo {
  width: 70px !important;
  height: auto !important;
  margin: 0 auto var(--space-4) !important;
}

/* =========================================================
   MASJID PAGE — SUPER-ELITE APPEND PACK (CSS ONLY)
   Scope: body[data-page="masjid"]
   Safe: no layout/color overrides for other pages
   ========================================================= */

/* Local token (gold only for highlights; won’t affect other pages) */
body[data-page="masjid"] {
  --gold: #d4af37;
}

/* 1) Progress Line 2.0 (ultra-thin top edge) */
body[data-page="masjid"] #scroll-progress {
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--green));
  box-shadow: 0 1px 10px rgba(0,0,0,.08);
}

/* 2) Section dots (right rail) */
body[data-page="masjid"] .section-dots {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 12px;
  z-index: 160;
  pointer-events: none;
}
body[data-page="masjid"] .section-dots button {
  width: 10px; height: 10px; border-radius: 999px;
  border: 1px solid rgba(0,0,0,.15);
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  opacity: .65;
  pointer-events: auto;
  transition: transform .18s ease, opacity .18s ease, background .18s ease;
}
body[data-page="masjid"] .section-dots button.active {
  background: radial-gradient(circle at 50% 50%, var(--gold), #fff 70%);
  transform: scale(1.35);
  opacity: 1;
}

/* 3) Back-to-top morph */
body[data-page="masjid"] #toTop {
  transition: transform .25s ease, box-shadow .25s ease, opacity .25s ease;
}
body[data-page="masjid"] #toTop.morph {
  transform: rotate(-90deg);
}

/* 4) Tooltip for progress bar */
body[data-page="masjid"] .progress-tooltip {
  position: fixed;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  font-size: 12px;
  color: #111;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 170;
}
body[data-page="masjid"] .progress-tooltip.show {
  opacity: 1;
  transform: translateX(-50%) translateY(2px);
}

/* 5) Focus echo (ripple) */
body[data-page="masjid"] .uu-ripple {
  position: absolute;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(212,175,55,.25) 0%, rgba(212,175,55,0) 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: uuRipple .6s ease forwards;
}
@keyframes uuRipple {
  0%   { opacity: .35; width: 0; height: 0; }
  100% { opacity: 0;   width: 220px; height: 220px; }
}

/* 6) Idle “breathe” glow (hero/footer only) */
body[data-page="masjid"] .idle-breathe {
  animation: uuBreathe 4.2s ease-in-out infinite;
}
@keyframes uuBreathe {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(212,175,55,.0)); }
  50%      { filter: drop-shadow(0 0 14px rgba(212,175,55,.35)); }
}

/* 7) Hero shrink (subtle) */
body[data-page="masjid"] .hero.shrink {
  min-height: 68vh;
  transition: min-height .35s ease;
}

/* 8) Ambient cursor halo (subtle light under cursor) */
body[data-page="masjid"] .cursor-halo {
  position: fixed;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(212,175,55,.14) 0%, rgba(212,175,55,0) 60%);
  border-radius: 999px;
  pointer-events: none;
  mix-blend-mode: multiply;
  transform: translate(-50%, -50%);
  opacity: .0;
  transition: opacity .25s ease;
  z-index: 90;
}
@media (pointer: coarse) {
  body[data-page="masjid"] .cursor-halo { display: none; }
}

/* 9) Floating dust (gold particles) */
body[data-page="masjid"] .dust-layer {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 5;
}
body[data-page="masjid"] .dust-layer span {
  position: absolute;
  width: 3px; height: 3px; border-radius: 999px;
  background: rgba(212,175,55,.55);
  opacity: .28;
  filter: blur(.2px);
  will-change: transform;
}

/* 10) Divider spark trail */
body[data-page="masjid"] .section-divider.spark {
  position: relative;
  overflow: visible;
}
body[data-page="masjid"] .section-divider.spark::after {
  content: "";
  position: absolute;
  top: 40%; left: 0;
  width: 18px; height: 18px;
  background: radial-gradient(circle, var(--gold), rgba(212,175,55,0) 70%);
  border-radius: 999px;
  transform: translateX(-20px);
  opacity: 0;
}

/* 11) H2 entrance flicker (single-use per section) */
body[data-page="masjid"] h2.glow-once {
  text-shadow: 0 0 0 rgba(212,175,55,0);
}

/* 12) Section dots on small screens: hide */
@media (max-width: 880px) {
  body[data-page="masjid"] .section-dots { display: none; }
}
/* =========================================================
   APPEND PACK — Motion + Utilities (Non-invasive)
   Scope-safe: only generic utilities + page-specific styles
   ========================================================= */

/* ---------- 0) Reduced motion respect ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 1) Generic reveal-on-scroll utility ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  will-change: opacity, transform;
  transition: opacity 540ms cubic-bezier(.2,.7,.2,1),
              transform 540ms cubic-bezier(.2,.7,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Allow slight staggering via data-delay (ms or s accepted) */
.reveal[data-delay] {
  transition-delay: var(--reveal-delay, 0s);
}
.reveal[data-delay].in {
  --reveal-delay: attr(data-delay);
}

/* ---------- 2) Slide variants (optional classes used in HTML) ---------- */
.slide-left { transform: translateX(-18px); }
.slide-right { transform: translateX(18px); }
.slide-left.in, .slide-right.in { transform: translateX(0); }

/* ---------- 3) Scroll progress bar (only if element exists) ---------- */
#scroll-progress {
  position: fixed;
  z-index: 9999;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #c9a227 0%, #177245 100%);
  box-shadow: 0 0 8px rgba(0,0,0,.15);
  pointer-events: none;
}

/* Page-6 (Network) theme override for progress bar (dark/blue align with logo) */
body[data-page="network"] #scroll-progress {
  background: linear-gradient(90deg, #1e90ff 0%, #00d4ff 100%);
}

/* ---------- 4) Back-to-top button (only styles, no layout changes) ---------- */
.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9998;
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 0;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-size: 18px;
  line-height: 40px;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .28s ease, transform .28s ease, visibility 0s .28s;
}
.to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity .28s ease, transform .28s ease, visibility 0s;
}
.to-top:focus { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- 5) Minimal anchor focus ring (accessibility, non-visual change) ---------- */
a:focus-visible, button:focus-visible {
  outline: 2px solid #ffd166;
  outline-offset: 2px;
}
/* =========================================================
   PAGE THEME: NETWORK (DARK • EMERALD • GOLD) — scoped
   ========================================================= */

body[data-page="network"]::before{
  content:"";
  position:fixed; inset:0; z-index:-1;
  background:
    radial-gradient(1200px 700px at 15% -10%, #0b1722 0%, #05090f 55%),
    linear-gradient(180deg, #081018 0%, #05080D 100%);
}

/* Kill the light alternating backgrounds on this page */
body[data-page="network"] .section,
body[data-page="network"] .section:nth-of-type(even){
  background: transparent !important;
}

/* Optional subtle grid accent behind content (uses your network-grid-bg.png) */
body[data-page="network"]::after{
  content:"";
  position:fixed; inset:0; z-index:-1;
  background-image: url("assets/img/united-ummah-network/network-grid-bg.png");
  background-size: 1600px auto;
  background-position: center top;
  background-repeat: no-repeat;
  opacity:.18;
  pointer-events:none;
  filter: saturate(1.05) contrast(1.05);
}

/* HERO: keep cinematic darkness but readable text */
body[data-page="network"] .hero::after{
  background: linear-gradient(180deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.84) 100%);
}
body[data-page="network"] .hero-overlay h1,
body[data-page="network"] .hero .subtitle,
body[data-page="network"] .hero .description{
  color:#ffffff !important;
  text-shadow: 0 2px 10px rgba(0,0,0,.4), 0 8px 30px rgba(0,0,0,.28);
}

/* HEADINGS & TEXT — make headings white as requested */
body[data-page="network"] h1,
body[data-page="network"] h2,
body[data-page="network"] h3,
body[data-page="network"] h4{
  color:#ffffff !important;
  font-weight:800;
  letter-spacing:.2px;
  text-shadow:0 0 8px rgba(0,0,0,.55);
}
body[data-page="network"] p,
body[data-page="network"] li,
body[data-page="network"] figcaption,
body[data-page="network"] blockquote{
  color:#E8EEF6 !important;
}

/* LINKS inside sections = white with subtle underline */
body[data-page="network"] .section a{
  color:#ffffff !important;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,.45);
}
body[data-page="network"] .section a:hover{
  text-decoration-color: rgba(255,255,255,.75);
}

/* OVERLAY CARDS — NOT glass; match Journey style (solid dark) */
body[data-page="network"] .overlay-text{
  max-width: 980px;
  margin-top: -24dvh; /* cinematic pull-up that won’t crush hero */
  background:#0b1117 !important;             /* solid, no glass */
  color:#ffffff !important;
  border:1px solid rgba(255,255,255,.06);
  border-left:6px solid var(--green);
  box-shadow:0 20px 60px rgba(0,0,0,.45);
}

/* GRID images and figures pop on dark */
body[data-page="network"] figure img,
body[data-page="network"] .grid2 img,
body[data-page="network"] .grid3 img,
body[data-page="network"] .fullbleed{
  filter: saturate(1.03) contrast(1.08) brightness(.96);
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
  border-radius: var(--radius);
}

/* Divider line gets a soft emerald/gold glow */
body[data-page="network"] .section-divider{
  filter:
    drop-shadow(0 0 10px rgba(23,114,69,.35))
    drop-shadow(0 0 8px rgba(194,35,35,.22))
    drop-shadow(0 2px 12px rgba(0,0,0,.45));
  opacity:.95;
}

/* Buttons remain brandy and readable on dark */
body[data-page="network"] .btn.primary{
  background: var(--green);
  color:#fff;
  box-shadow: 0 10px 26px rgba(23,114,69,.38);
}
body[data-page="network"] .btn.secondary{
  border-color: rgba(255,255,255,.9);
  color:#fff;
}

/* Footer stays as-is (already dark), just brighten links */
body[data-page="network"] footer a{ color:#ffffff !important; }

/* RESPONSIVE tune for the overlay pull-up on small screens */
@media (max-width:900px){
  body[data-page="network"] .overlay-text{ margin-top:-12dvh; }
}
@media (max-width:640px){
  body[data-page="network"] .overlay-text{ margin-top:-8dvh; }
}

/* =========================================================
   JOIN — SUPER ELITE UPGRADES (scoped & safe)
   ========================================================= */
body[data-page="join"]{
  --uu-green:#177245;
  --uu-red:#C22323;
  --uu-ink:#0C0C0C;
  --uu-parch:#F8F5EF;
  --uu-stickyTop: 96px; /* top offset for sticky image under header */
}

/* 1) SECTION 2 — Sticky image column */
body[data-page="join"] #two-fronts .split{
  align-items: start;
}
body[data-page="join"] #two-fronts .split .image{
  position: relative;
}
body[data-page="join"] #two-fronts .split .image img{
  position: sticky;
  top: var(--uu-stickyTop);
  will-change: transform, filter;
  transition: transform .25s ease, filter .25s ease, box-shadow .25s ease;
  box-shadow: 0 14px 48px rgba(0,0,0,.16);
  border-radius: 16px;
}
@media (max-width: 900px){
  /* Disable sticky on mobile to avoid cramped layouts */
  body[data-page="join"] #two-fronts .split .image img{
    position: static;
    top: auto;
  }
}

/* 2) Subtle depth parallax state (toggled by JS) */
body[data-page="join"] #two-fronts .split .image img.is-sticky{
  filter: saturate(104%);
}
body[data-page="join"] #two-fronts .split .image img.depth-1{
  transform: translate3d(0, -2px, 0) scale(1.01);
}
body[data-page="join"] #two-fronts .split .image img.depth-2{
  transform: translate3d(0, -4px, 0) scale(1.012);
}
body[data-page="join"] #two-fronts .split .image img.depth-3{
  transform: translate3d(0, -6px, 0) scale(1.015);
}

/* 3) Premium H2 underline reveal */
body[data-page="join"] h2.reveal{
  position: relative;
  overflow: hidden;
}
body[data-page="join"] h2.reveal::after{
  content:"";
  position:absolute; left:0; bottom:-6px; height:3px; width:0%;
  background: linear-gradient(90deg, var(--uu-green), rgba(23,114,69,.35));
  transition: width .6s cubic-bezier(.2,.7,.2,1);
}
body[data-page="join"] h2.reveal.is-visible::after{
  width: 82%;
}

/* 4) Collaborators button contrast fix (white bg) */
body[data-page="join"] #orgs .btn.secondary{
  color: var(--uu-green);
  background: #fff;
  border: 2px solid var(--uu-green);
  box-shadow: 0 8px 24px rgba(23,114,69,.15);
}
body[data-page="join"] #orgs .btn.secondary:hover{
  background: rgba(23,114,69,.08);
  box-shadow: 0 12px 32px rgba(23,114,69,.22);
}
body[data-page="join"] #orgs .btn.secondary:focus-visible{
  outline: 3px solid rgba(23,114,69,.35);
  outline-offset: 2px;
  border-color: var(--uu-green);
}

/* 5) Mobile comfort */
@media (max-width: 640px){
  body[data-page="join"] .overlay-text.container p{ line-height:1.72; }
  body[data-page="join"] .list-dash li{ margin:.5rem 0; }
}

/* 6) Section flash highlight (used by JS smooth-scroll) */
body[data-page="join"] .flash{
  box-shadow: 0 0 0 3px rgba(23,114,69,.22) inset;
  transition: box-shadow .4s ease;
}
