/* ==========================================================
   SearchIslam.org — Option 2 "Night Courtyard" design system
   Shared by index.html and all content pages.
   ========================================================== */

:root {
  --night: #06190f;
  --night-2: #0a2317;
  --forest: #0d3d27;
  --emerald: #1a6b4a;
  --emerald-bright: #2e9268;
  --gold: #c4922a;
  --gold-soft: #e3c37f;
  --cream: #fdf8f0;
  --text: #e9e4d8;
  --text-dim: #a9b5aa;
  --prose: #cfd6c9;
  --line: rgba(227, 195, 127, 0.16);
  --glass: rgba(253, 248, 240, 0.045);
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "DM Sans", -apple-system, sans-serif;
  --font-serif: "Lora", Georgia, serif;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23c4922a' stroke-width='1'%3E%3Crect x='28' y='28' width='40' height='40'/%3E%3Crect x='28' y='28' width='40' height='40' transform='rotate(45 48 48)'/%3E%3Ccircle cx='48' cy='48' r='5'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-padding-top: 90px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; color: var(--cream); }
p { margin: 0 0 1em; }
a { color: var(--gold-soft); }
button { font: inherit; cursor: pointer; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.container { max-width: 1140px; margin-inline: auto; padding-inline: 22px; }
.section { padding-block: 90px; position: relative; }

.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold);
}
.kicker::before, .kicker.centered::after { content: ""; width: 28px; height: 1px; background: var(--gold); opacity: 0.6; }

.section-head { max-width: 660px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin-top: 14px; }
.section-head p { color: var(--text-dim); margin-bottom: 0; }

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--emerald-bright), var(--gold), var(--gold-soft));
  z-index: 300; box-shadow: 0 0 12px rgba(196, 146, 42, 0.7);
}

/* ---------- Cursor glow ---------- */
.cursor-glow {
  position: fixed; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 146, 42, 0.09), transparent 65%);
  pointer-events: none; z-index: 1; transform: translate(-50%, -50%);
  left: 50vw; top: 40vh;
}

/* ---------- Custom cursor ---------- */
body.custom-cursor, body.custom-cursor a, body.custom-cursor button, body.custom-cursor input, body.custom-cursor textarea, body.custom-cursor select { cursor: none; }
.cursor-dot, .cursor-ring { position: fixed; left: -100px; top: -100px; pointer-events: none; z-index: 350; border-radius: 50%; transform: translate(-50%, -50%); transition: opacity 0.3s ease; }
.cursor-dot { width: 6px; height: 6px; background: var(--gold-soft); box-shadow: 0 0 10px rgba(227, 195, 127, 0.8); }
.cursor-ring { width: 36px; height: 36px; border: 1.5px solid rgba(227, 195, 127, 0.55); transition: width 0.25s ease, height 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, opacity 0.3s ease; }
.cursor-ring.hot { width: 60px; height: 60px; background: rgba(196, 146, 42, 0.12); border-color: var(--gold); }
body.cursor-off .cursor-dot, body.cursor-off .cursor-ring { opacity: 0; }

/* ---------- Page transition veil ---------- */
.page-veil {
  position: fixed; inset: 0; z-index: 380; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(130deg, var(--night-2), var(--forest));
  transform: translateY(-102%); transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}
.page-veil.cover { transform: translateY(0); }
.page-veil svg { animation: spin-slow 12s linear infinite; }

/* ---------- Kinetic headings ---------- */
.rw { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.rw > span { display: inline-block; transform: translateY(112%) rotate(2deg); transition: transform 0.75s cubic-bezier(0.19, 1, 0.22, 1); transition-delay: calc(var(--i) * 65ms); }
.rw-in .rw > span { transform: none; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 400; background: var(--gold); color: var(--night); padding: 10px 18px; border-radius: 0 0 10px 0; font-weight: 700; }
.skip-link:focus { left: 0; }

/* ---------- Banner ---------- */
.banner {
  position: relative; z-index: 5;
  background: linear-gradient(90deg, var(--gold), #d4a844, var(--gold));
  color: var(--night); text-align: center; padding: 9px 16px;
  font-size: 0.9rem; font-weight: 600;
}
.banner a { color: var(--night); font-weight: 800; text-underline-offset: 3px; }

/* ---------- Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: transparent;
  transition: background-color 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(6, 25, 15, 0.82);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--cream); text-decoration: none; }
.brand .tld { color: var(--gold); }
.brand svg { animation: spin-slow 40s linear infinite; }
@keyframes spin-slow { to { transform: rotate(360deg); } }

.nav-menu { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-menu a {
  position: relative; display: block; padding: 10px 13px; font-size: 0.96rem; font-weight: 500;
  color: var(--text); text-decoration: none; border-radius: 8px; transition: color 0.25s ease;
}
.nav-menu a::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 5px; height: 2px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease;
}
.nav-menu a:hover { color: var(--gold-soft); }
.nav-menu a:hover::after, .nav-menu a[aria-current="page"]::after { transform: scaleX(1); }
.nav-menu a[aria-current="page"] { color: var(--gold-soft); font-weight: 700; }
.nav-menu .nav-cta a { background: var(--gold); color: var(--night); border-radius: 999px; padding-inline: 20px; font-weight: 700; margin-left: 8px; }
.nav-menu .nav-cta a::after { display: none; }
.nav-menu .nav-cta a:hover { background: var(--gold-soft); color: var(--night); }

.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 10px; background: none; border: none; }
.nav-toggle .bar { width: 100%; height: 2px; background: var(--cream); border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 919px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: rgba(6, 25, 15, 0.96); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line); padding: 12px 18px 20px; display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 13px 14px; font-size: 1.05rem; }
  .nav-menu .nav-cta a { text-align: center; margin: 10px 0 0; }
}

/* ---------- Hero (homepage) ---------- */
.hero {
  position: relative; min-height: 92vh; display: flex; align-items: center;
  overflow: hidden; margin-top: -73px; padding-top: 73px;
  background: radial-gradient(ellipse at 50% 120%, #10442c 0%, var(--night) 62%);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.aurora { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; transform: translateZ(0); }
.aurora-1 { width: 620px; height: 620px; left: -160px; top: -120px; background: rgba(26, 107, 74, 0.4); animation: drift-1 22s ease-in-out infinite alternate; }
.aurora-2 { width: 480px; height: 480px; right: -120px; bottom: -80px; background: rgba(196, 146, 42, 0.16); animation: drift-2 26s ease-in-out infinite alternate; }
@keyframes drift-1 { to { transform: translate(180px, 120px) scale(1.15); } }
@keyframes drift-2 { to { transform: translate(-160px, -140px) scale(1.2); } }

.hero::after {
  content: ""; position: absolute; inset: 0; background-image: var(--pattern);
  background-size: 96px 96px; opacity: 0.05; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

.hero-inner { position: relative; z-index: 3; max-width: 860px; margin-inline: auto; text-align: center; padding-block: 120px 140px; }

.hero-bismillah {
  font-family: "Amiri", serif; font-size: clamp(1.5rem, 3.5vw, 2.2rem); color: var(--gold-soft);
  opacity: 0; animation: fade-down 1.2s ease 0.2s forwards; margin-bottom: 26px;
}
@keyframes fade-down { from { opacity: 0; transform: translateY(-14px); } to { opacity: 0.9; transform: none; } }

.hero h1 { font-size: clamp(2.5rem, 6.5vw, 4.4rem); margin-bottom: 8px; letter-spacing: -0.01em; }
.split .word { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.split .ch { display: inline-block; transform: translateY(115%); animation: rise 0.85s cubic-bezier(0.19, 1, 0.22, 1) forwards; animation-delay: calc(0.35s + var(--i) * 0.03s); }
@keyframes rise { to { transform: none; } }

.goldline {
  display: block; font-style: italic; font-weight: 500;
  background: linear-gradient(100deg, var(--gold-soft), #f6e3b4 40%, var(--gold) 80%);
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 5s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }

.hero-sub {
  font-family: var(--font-serif); font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--text-dim);
  max-width: 600px; margin: 26px auto 40px; opacity: 0; animation: fade-up 1s ease 1.15s forwards;
}
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.hero .hero-ctas { opacity: 0; animation: fade-up 1s ease 1.35s forwards; }

.btn {
  position: relative; display: inline-block; padding: 15px 32px; border-radius: 999px;
  font-weight: 700; font-size: 1.02rem; text-decoration: none; border: 1px solid transparent;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease;
  will-change: transform;
}
.btn-gold { background: linear-gradient(120deg, var(--gold), #d9a944); color: var(--night); box-shadow: 0 8px 30px rgba(196, 146, 42, 0.35); }
.btn-gold:hover { box-shadow: 0 14px 44px rgba(196, 146, 42, 0.5); }
.btn-ghost { border-color: rgba(253, 248, 240, 0.35); color: var(--cream); }
.btn-ghost:hover { border-color: var(--gold-soft); color: var(--gold-soft); background: rgba(196, 146, 42, 0.07); }
.btn-emerald { background: var(--emerald); color: var(--cream); }
.btn-emerald:hover { background: var(--emerald-bright); }

.scroll-hint {
  position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-dim); font-size: 0.72rem; letter-spacing: 0.25em; text-transform: uppercase;
  text-decoration: none; opacity: 0; animation: fade-up 1s ease 1.9s forwards;
}
.scroll-hint .wheel { width: 22px; height: 36px; border: 1.5px solid var(--text-dim); border-radius: 12px; position: relative; }
.scroll-hint .wheel::before { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 3px; background: var(--gold-soft); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0%, 100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(11px); opacity: 0.2; } }

/* ---------- Page hero (content pages) ---------- */
.page-hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 88px 0 74px; margin-top: -73px; padding-top: 160px;
  background: radial-gradient(ellipse at 50% -30%, #145534 0%, var(--night) 68%);
  border-bottom: 1px solid var(--line);
}
.page-hero::before {
  content: ""; position: absolute; inset: 0; background-image: var(--pattern);
  background-size: 96px 96px; opacity: 0.05; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse at center, black 10%, transparent 80%);
  mask-image: radial-gradient(ellipse at center, black 10%, transparent 80%);
}
.page-hero .container { position: relative; max-width: 800px; }
.page-hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); margin: 16px 0 18px; }
.page-hero p { font-family: var(--font-serif); font-size: 1.12rem; color: var(--text-dim); max-width: 620px; margin: 0 auto; }
.page-hero p a { color: var(--gold-soft); }

/* ---------- Marquee ---------- */
.marquee { background: linear-gradient(90deg, var(--forest), var(--emerald), var(--forest)); border-block: 1px solid var(--line); padding: 16px 0; overflow: hidden; position: relative; z-index: 4; will-change: transform; }
.marquee-track { display: flex; width: max-content; gap: 0; animation: marquee 36s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { display: inline-flex; align-items: center; gap: 26px; padding-inline: 13px; font-family: var(--font-display); font-style: italic; font-size: 1.08rem; color: var(--cream); white-space: nowrap; }
.marquee .sep { color: var(--gold); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Stats ---------- */
.stats-grid { display: grid; gap: 40px; text-align: center; }
@media (min-width: 680px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
.stat { position: relative; }
.stat-ring { position: relative; width: 190px; height: 190px; margin: 0 auto 18px; }
.stat-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.stat-ring .track { fill: none; stroke: rgba(253, 248, 240, 0.08); stroke-width: 3; }
.stat-ring .fill { fill: none; stroke: url(#goldgrad); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 552.9; stroke-dashoffset: 552.9; filter: drop-shadow(0 0 6px rgba(196, 146, 42, 0.6)); }
.stat-num {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 2.7rem; font-weight: 700; color: var(--gold-soft);
}
.stat-label { color: var(--text-dim); font-size: 0.98rem; max-width: 240px; margin-inline: auto; }

/* ---------- Tilt cards ---------- */
.topics { background: linear-gradient(var(--night) 0%, var(--night-2) 50%, var(--night) 100%); }
.topics-grid { display: grid; gap: 24px; }
@media (min-width: 640px) { .topics-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .topics-grid { grid-template-columns: repeat(3, 1fr); } }

.tilt-card {
  --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 50%;
  position: relative; display: block; padding: 30px 28px; border-radius: 18px;
  background: var(--glass); border: 1px solid var(--line);
  text-decoration: none; color: var(--text);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.18s ease-out, border-color 0.3s ease, background-color 0.3s ease;
  overflow: hidden;
}
.tilt-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s ease;
  background: radial-gradient(420px circle at var(--gx) var(--gy), rgba(227, 195, 127, 0.14), transparent 55%);
}
.tilt-card:hover { border-color: rgba(227, 195, 127, 0.45); background: rgba(253, 248, 240, 0.07); }
.tilt-card:hover::before { opacity: 1; }
.tilt-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px;
  border-radius: 15px; background: rgba(196, 146, 42, 0.12); color: var(--gold-soft); margin-bottom: 20px;
  border: 1px solid rgba(227, 195, 127, 0.25); transition: transform 0.3s ease, background-color 0.3s ease;
}
.tilt-card:hover .tilt-icon { transform: translateY(-4px) scale(1.06); background: rgba(196, 146, 42, 0.22); }
.tilt-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.tilt-card p { color: var(--text-dim); font-size: 0.97rem; margin-bottom: 16px; }
.tilt-card .card-link { font-weight: 700; font-size: 0.94rem; color: var(--gold); letter-spacing: 0.02em; }
.tilt-card .card-link::after { content: " →"; transition: margin-left 0.25s ease; }
.tilt-card:hover .card-link::after { margin-left: 6px; }

/* ---------- Verse ---------- */
.verse-section {
  position: relative; overflow: hidden; text-align: center;
  background: radial-gradient(ellipse at 50% 0%, #12442c 0%, var(--night) 70%);
  border-block: 1px solid var(--line);
}
.verse-section::before {
  content: ""; position: absolute; inset: -50%;
  background-image: var(--pattern); background-size: 130px 130px; opacity: 0.05;
  animation: pattern-pan 60s linear infinite; pointer-events: none;
}
@keyframes pattern-pan { to { transform: translate(130px, 130px); } }

.verse-star { width: 54px; height: 54px; margin: 0 auto 26px; color: var(--gold); animation: spin-slow 30s linear infinite; }
.verse-quote { max-width: 780px; margin-inline: auto; min-height: 9em; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.verse-quote:active { cursor: grabbing; }
body.custom-cursor .verse-quote { cursor: none; }
.verse-text { font-family: var(--font-serif); font-style: italic; font-size: clamp(1.5rem, 3.6vw, 2.2rem); line-height: 1.55; color: var(--cream); margin: 0 0 24px; }
.verse-text .vw { display: inline-block; opacity: 0; filter: blur(8px); transform: translateY(14px); animation: word-in 0.7s ease forwards; animation-delay: calc(var(--i) * 0.055s); }
@keyframes word-in { to { opacity: 1; filter: blur(0); transform: none; } }
.verse-ref { font-size: 0.88rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }

.verse-cycle { width: 200px; height: 2px; margin: 34px auto 22px; background: rgba(253, 248, 240, 0.12); border-radius: 2px; overflow: hidden; }
.verse-cycle span { display: block; height: 100%; width: 0; background: var(--gold); }
.verse-cycle span.run { animation: cycle 8s linear forwards; }
@keyframes cycle { from { width: 0; } to { width: 100%; } }

.verse-dots { display: flex; justify-content: center; gap: 10px; }
.verse-dots button { width: 34px; height: 4px; padding: 0; border: none; border-radius: 4px; background: rgba(253, 248, 240, 0.15); transition: background-color 0.3s ease; }
.verse-dots button:hover { background: rgba(227, 195, 127, 0.5); }
.verse-dots button.active { background: var(--gold); }
.verse-hint { font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-dim); opacity: 0.7; margin-top: 14px; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin-inline: auto; }
.faq-item { background: var(--glass); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 14px; overflow: hidden; transition: border-color 0.35s ease, box-shadow 0.35s ease, background-color 0.35s ease; }
.faq-item.open { border-color: rgba(227, 195, 127, 0.5); background: rgba(253, 248, 240, 0.06); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); }
.faq-question {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%;
  padding: 20px 24px; background: none; border: none; text-align: left;
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--cream);
}
.faq-icon { flex: none; width: 28px; height: 28px; position: relative; border-radius: 50%; border: 1px solid rgba(227, 195, 127, 0.4); transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.35s ease; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; top: 50%; left: 50%; width: 12px; height: 1.5px; background: var(--gold-soft); transform: translate(-50%, -50%); transition: transform 0.35s ease; }
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item.open .faq-icon { background: var(--gold); border-color: var(--gold); transform: rotate(135deg); }
.faq-item.open .faq-icon::before, .faq-item.open .faq-icon::after { background: var(--night); }
.faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s cubic-bezier(0.4, 0, 0.2, 1); }
.faq-item.open .faq-answer { grid-template-rows: 1fr; }
.faq-answer-inner { overflow: hidden; min-height: 0; }
.faq-answer-inner p { padding: 0 24px 22px; margin: 0; color: var(--text-dim); }
.faq-answer-inner p + p { padding-top: 0; }
.faq-answer-inner a { color: var(--gold-soft); }

/* ---------- Mosque finder ---------- */
.mosque-section { text-align: center; background: linear-gradient(var(--night), var(--night-2)); }
.mosque-inner { max-width: 620px; margin-inline: auto; }
.mosque-form { display: flex; gap: 10px; max-width: 500px; margin: 30px auto 0; }
.mosque-form input {
  flex: 1; min-width: 0; padding: 15px 22px; border-radius: 999px; font: inherit;
  background: rgba(253, 248, 240, 0.06); border: 1px solid var(--line); color: var(--cream);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.mosque-form input::placeholder { color: var(--text-dim); }
.mosque-form input:focus { outline: none; border-color: var(--gold); background: rgba(253, 248, 240, 0.09); }
.mosque-form button { padding: 0 26px; border: none; border-radius: 999px; background: var(--gold); color: var(--night); font-weight: 700; transition: background-color 0.25s ease; }
.mosque-form button:hover { background: var(--gold-soft); }
.mosque-note { font-size: 0.85rem; color: var(--text-dim); margin-top: 16px; }

/* ---------- Literature ---------- */
.lit-grid { display: grid; gap: 22px; }
@media (min-width: 580px) { .lit-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .lit-grid { grid-template-columns: repeat(4, 1fr); } }
.lit-card {
  --rx: 0deg; --ry: 0deg;
  display: flex; flex-direction: column; padding: 28px 24px; border-radius: 16px;
  background: var(--glass); border: 1px solid var(--line);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.18s ease-out, border-color 0.3s ease, background-color 0.3s ease;
}
.lit-card:hover { transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(-6px); border-color: rgba(227, 195, 127, 0.45); background: rgba(253, 248, 240, 0.07); }
.lit-badge { align-self: flex-start; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--night); background: var(--gold-soft); border-radius: 999px; padding: 4px 12px; margin-bottom: 18px; }
.lit-card h3 { font-size: 1.14rem; margin-bottom: 8px; }
.lit-card p { color: var(--text-dim); font-size: 0.93rem; flex: 1; }
.lit-card a { font-weight: 700; font-size: 0.94rem; text-decoration: none; color: var(--gold); }
.lit-card a:hover { color: var(--gold-soft); }

/* ---------- Prose (content pages) ---------- */
.prose { max-width: 720px; margin-inline: auto; }
.prose > p, .prose li { font-family: var(--font-serif); font-size: 1.08rem; line-height: 1.8; color: var(--prose); }
.prose strong, .prose em { color: var(--text); }
.prose h2 { font-size: 1.65rem; margin-top: 1.9em; padding-left: 16px; border-left: 3px solid var(--gold); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.25rem; margin-top: 1.5em; }
.prose a { color: var(--gold-soft); }
.prose blockquote {
  margin: 1.7em 0; padding: 24px 28px;
  background: var(--glass); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: 0 16px 16px 0;
  font-family: var(--font-serif); font-style: italic; color: var(--cream);
}
.prose blockquote p { margin-bottom: 10px; font-size: 1.12rem; color: var(--cream); }
.prose blockquote cite { display: block; font-style: normal; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }

/* ---------- Info cards ---------- */
.info-grid { display: grid; gap: 18px; max-width: 940px; margin-inline: auto; }
@media (min-width: 640px) { .info-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .info-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.info-card {
  background: var(--glass); border: 1px solid var(--line); border-radius: 16px; padding: 26px 24px;
  transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
}
.info-card:hover { border-color: rgba(227, 195, 127, 0.4); background: rgba(253, 248, 240, 0.07); transform: translateY(-4px); }
.info-card h3 { font-size: 1.14rem; margin-bottom: 8px; display: flex; align-items: baseline; gap: 12px; }
.info-card .num { font-family: var(--font-display); font-size: 1.6rem; color: var(--gold); }
.info-card p { color: var(--text-dim); font-size: 0.96rem; margin-bottom: 0; }

/* ---------- Timeline ---------- */
.timeline { max-width: 720px; margin-inline: auto; padding-left: 28px; border-left: 1.5px solid rgba(196, 146, 42, 0.5); list-style: none; }
.timeline li { position: relative; padding-bottom: 34px; }
.timeline li::before {
  content: ""; position: absolute; left: -36px; top: 6px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--gold); border: 3px solid var(--night); box-shadow: 0 0 10px rgba(196, 146, 42, 0.7);
}
.timeline .tl-year { font-weight: 700; font-size: 0.82rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.timeline h3 { font-size: 1.25rem; margin: 6px 0 6px; }
.timeline p { color: var(--text-dim); margin-bottom: 0; font-size: 1rem; }

/* ---------- Pillars ---------- */
.pillar {
  display: grid; gap: 8px 28px; max-width: 780px; margin: 0 auto 24px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 18px; padding: 32px 30px;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.pillar:hover { border-color: rgba(227, 195, 127, 0.4); background: rgba(253, 248, 240, 0.06); }
@media (min-width: 640px) { .pillar { grid-template-columns: 88px 1fr; } }
.pillar-num { font-family: var(--font-display); font-size: 3.2rem; font-weight: 700; color: var(--gold); line-height: 1; text-shadow: 0 0 24px rgba(196, 146, 42, 0.45); }
@media (min-width: 640px) { .pillar-num { grid-row: span 2; } }
.pillar h3 { font-size: 1.45rem; margin-bottom: 2px; }
.pillar .pillar-arabic { font-family: var(--font-serif); font-style: italic; color: var(--gold-soft); font-weight: 500; }
.pillar p { color: var(--text-dim); margin-bottom: 0; }

/* ---------- Forms (contact page) ---------- */
.form-grid { display: grid; gap: 28px; max-width: 1000px; margin-inline: auto; }
@media (min-width: 880px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-card { background: var(--glass); border: 1px solid var(--line); border-radius: 18px; padding: 34px 30px; }
.form-card h2 { font-size: 1.55rem; }
.form-card > p { color: var(--text-dim); font-size: 0.97rem; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 7px; color: var(--gold-soft); letter-spacing: 0.03em; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 15px; border-radius: 12px; font: inherit;
  background: rgba(253, 248, 240, 0.05); border: 1px solid var(--line); color: var(--cream);
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--gold); background: rgba(253, 248, 240, 0.08); }
.field textarea { resize: vertical; min-height: 120px; }
.check-group { display: grid; gap: 10px; }
.check-group label { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; font-size: 0.97rem; color: var(--text); }
.check-group input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--gold); flex: none; }
.form-error { color: #ff9d8a; font-size: 0.88rem; margin-top: 6px; display: none; }
.field.invalid .form-error { display: block; }
.field.invalid input, .field.invalid textarea { border-color: #c96a56; }
.form-success { display: none; background: var(--glass); border: 1px solid var(--gold); border-radius: 16px; padding: 26px; text-align: center; }
.form-success.visible { display: block; }
.form-success .tick { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--gold); color: var(--night); font-size: 1.4rem; margin-bottom: 12px; }
.form-success h3 { color: var(--cream); }
.form-success p { color: var(--text-dim); margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; background: linear-gradient(130deg, var(--forest), var(--emerald)); position: relative; overflow: hidden; border-block: 1px solid var(--line); }
.cta-band::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern); background-size: 96px 96px; opacity: 0.07; pointer-events: none; }
.cta-band .container { position: relative; }
.cta-band h2 { color: var(--cream); font-size: clamp(1.8rem, 4vw, 2.5rem); }
.cta-band p { color: rgba(253, 248, 240, 0.8); max-width: 560px; margin-inline: auto; }
.cta-band .hero-ctas { margin-top: 30px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 60px 0 30px; font-size: 0.95rem; color: var(--text-dim); background: var(--night); }
.footer-grid { display: grid; gap: 36px; margin-bottom: 44px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.4fr; } }
.site-footer h3 { color: var(--gold-soft); font-size: 0.95rem; font-family: var(--font-body); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: var(--text-dim); text-decoration: none; transition: color 0.2s ease; }
.site-footer a:hover { color: var(--gold-soft); }
.footer-blurb { max-width: 300px; }
.footer-bottom { border-top: 1px solid rgba(253, 248, 240, 0.08); padding-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; font-size: 0.84rem; }

/* ---------- Option switcher ---------- */
.option-switch {
  position: fixed; right: 18px; bottom: 18px; z-index: 250;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(6, 25, 15, 0.85); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(227, 195, 127, 0.4); color: var(--gold-soft);
  padding: 10px 18px; border-radius: 999px; font-size: 0.88rem; font-weight: 700; text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); transition: transform 0.25s ease, border-color 0.25s ease;
}
.option-switch:hover { transform: translateY(-3px); border-color: var(--gold); }

/* ---------- Reveals ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.19, 1, 0.22, 1); transition-delay: calc(var(--d, 0) * 100ms); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal, .hero-sub, .hero .hero-ctas, .scroll-hint, .hero-bismillah { opacity: 1; transform: none; }
  .split .ch { transform: none; }
  .verse-text .vw { opacity: 1; filter: none; transform: none; }
  .rw > span { transform: none; }
  .cursor-glow, .scroll-hint, .cursor-dot, .cursor-ring, .page-veil { display: none; }
}

/* ---------- Site search ---------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.search-strip { padding: 40px 0 6px; }

.search-form {
  position: relative;
  max-width: 640px;
  margin-inline: auto;
  display: flex;
  gap: 8px;
}

.search-form input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 14px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  background: var(--glass);
  color: var(--text);
  backdrop-filter: blur(6px);
}

.search-form input[type="search"]::placeholder { color: var(--text-dim); }

.search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196, 146, 42, 0.18);
}

.search-form button {
  padding: 0 24px;
  border: none;
  border-radius: 999px;
  background: var(--gold);
  color: var(--night);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-form button:hover { background: var(--gold-soft); }

.search-suggestions {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  list-style: none;
  margin: 0;
  padding: 8px;
  display: none;
}

.search-suggestions.open { display: block; }

.search-suggestions a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
}

.search-suggestions a:hover,
.search-suggestions a:focus {
  background: var(--glass);
  color: var(--gold-soft);
}

.search-suggestions .sug-page {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
