/* Jamaat Ahmadiyaa — Islamic site theme (matches app ISLAMIC palette) */
:root {
  --navy: #0b1f3a;
  --navy-deep: #061428;
  --navy-soft: #143052;
  --gold: #c9a227;
  --gold-light: #e8d48b;
  --gold-muted: #a8892e;
  --ivory: #fafbfc;
  --mist: #eef2f6;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #d8e0ea;
  --white: #ffffff;
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-arabic: "Amiri", "Times New Roman", serif;
  --font-body: "Karla", Georgia, sans-serif;
  --radius: 14px;
  --max: 1120px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--gold-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--navy);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--navy);
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1em;
  color: var(--muted);
}

.arabic {
  font-family: var(--font-arabic);
  font-size: 1.35em;
  color: var(--gold-muted);
  direction: rtl;
}

/* —— Layout —— */
.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(250, 251, 252, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 2.5rem, var(--max));
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav a {
  color: var(--navy-soft);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--gold-muted);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.1rem;
  background: linear-gradient(135deg, var(--navy), var(--navy-soft));
  color: var(--gold-light) !important;
  border: 1px solid var(--gold);
  border-radius: 999px;
  font-size: 0.9rem;
}

.nav-cta:hover {
  filter: brightness(1.08);
  color: var(--white) !important;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--navy);
}

@media (max-width: 820px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s ease, opacity 0.28s ease;
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    padding: 0.85rem 0.5rem;
    border-bottom: 1px solid var(--mist);
  }

  .nav-cta {
    justify-content: center;
    margin-top: 0.5rem;
  }
}

/* —— Hero (full-bleed) —— */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 48%, var(--navy-soft) 100%);
  color: var(--white);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image:
    linear-gradient(30deg, var(--gold) 12%, transparent 12.5%, transparent 87%, var(--gold) 87.5%, var(--gold)),
    linear-gradient(150deg, var(--gold) 12%, transparent 12.5%, transparent 87%, var(--gold) 87.5%, var(--gold)),
    linear-gradient(30deg, var(--gold) 12%, transparent 12.5%, transparent 87%, var(--gold) 87.5%, var(--gold)),
    linear-gradient(150deg, var(--gold) 12%, transparent 12.5%, transparent 87%, var(--gold) 87.5%, var(--gold)),
    linear-gradient(60deg, var(--gold-light) 25%, transparent 25.5%, transparent 75%, var(--gold-light) 75%, var(--gold-light)),
    linear-gradient(60deg, var(--gold-light) 25%, transparent 25.5%, transparent 75%, var(--gold-light) 75%, var(--gold-light));
  background-size: 80px 140px;
  background-position: 0 0, 0 0, 40px 70px, 40px 70px, 0 0, 40px 70px;
  animation: patternDrift 28s linear infinite;
}

@keyframes patternDrift {
  from {
    background-position: 0 0, 0 0, 40px 70px, 40px 70px, 0 0, 40px 70px;
  }
  to {
    background-position: 80px 140px, 80px 140px, 120px 210px, 120px 210px, 80px 0, 120px 210px;
  }
}

.hero-glow {
  position: absolute;
  width: 55vw;
  height: 55vw;
  max-width: 640px;
  max-height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.22) 0%, transparent 70%);
  top: 10%;
  right: -10%;
  pointer-events: none;
  animation: glowPulse 8s ease-in-out infinite;
}

@keyframes glowPulse {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, 720px);
  text-align: center;
  padding: 3.5rem 0 4.5rem;
  animation: riseIn 0.9s ease both;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-crest {
  width: 96px;
  height: 96px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--navy-soft), var(--navy-deep));
  border: 2px solid var(--gold);
  display: grid;
  place-items: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.hero-crest img {
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.03em;
  margin: 0 0 0.35em;
}

.hero-arabic {
  font-family: var(--font-arabic);
  font-size: clamp(1.4rem, 3.5vw, 1.85rem);
  color: var(--gold-light);
  margin: 0 0 1rem;
}

.hero-line {
  width: 72px;
  height: 2px;
  margin: 0 auto 1.25rem;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.hero h1 {
  font-size: clamp(1.35rem, 3.2vw, 1.75rem);
  font-weight: 500;
  color: var(--gold-light);
  margin: 0 0 0.75rem;
}

.hero .lede {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.08rem;
  max-width: 34em;
  margin: 0 auto 1.75rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.45rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-muted));
  color: var(--navy-deep);
  border-color: var(--gold-light);
}

.btn-gold:hover {
  color: var(--navy-deep);
  filter: brightness(1.05);
}

.btn-outline {
  background: transparent;
  color: var(--gold-light);
  border-color: rgba(232, 212, 139, 0.55);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
}

.btn-navy {
  background: linear-gradient(135deg, var(--navy), var(--navy-soft));
  color: var(--gold-light);
  border-color: var(--gold);
}

/* —— Sections —— */
.section {
  padding: 4.5rem 0;
}

.section-mist {
  background: linear-gradient(180deg, var(--mist), var(--ivory));
}

.section-navy {
  background: var(--navy);
  color: var(--white);
}

.section-navy h2,
.section-navy h3 {
  color: var(--white);
}

.section-navy p {
  color: rgba(255, 255, 255, 0.72);
}

.section-head {
  text-align: center;
  max-width: 36em;
  margin: 0 auto 2.75rem;
}

.section-head .eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-muted);
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1rem 0 0;
}

.ornament-line {
  width: 48px;
  height: 1px;
  background: var(--line);
}

.ornament-diamond {
  width: 8px;
  height: 8px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 1.75rem;
}

@media (max-width: 860px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.feature {
  text-align: center;
  padding: 0.5rem 0.75rem;
}

.feature-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--mist);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--gold-muted);
  font-size: 1.35rem;
}

.feature h3 {
  font-size: 1.35rem;
  margin-bottom: 0.4rem;
}

.feature p {
  font-size: 0.98rem;
  margin: 0;
}

.verse-band {
  text-align: center;
  padding: 3.5rem 1.25rem;
  background: linear-gradient(135deg, var(--navy-deep), var(--navy-soft));
}

.verse-band .arabic {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--gold-light);
  margin-bottom: 0.75rem;
}

.verse-band .translation {
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  max-width: 32em;
  margin: 0 auto;
}

.download-band .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

@media (max-width: 800px) {
  .download-band .wrap {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .download-band .cta-row {
    justify-content: center;
  }
}

.phone-frame {
  justify-self: end;
  width: min(100%, 280px);
  aspect-ratio: 9 / 17;
  border-radius: 28px;
  border: 3px solid var(--gold);
  background:
    linear-gradient(160deg, rgba(11, 31, 58, 0.15), rgba(11, 31, 58, 0.55)),
    url("../assets/hero.jpg") center / cover no-repeat;
  box-shadow: 0 24px 60px rgba(6, 20, 40, 0.45);
  animation: riseIn 1.1s ease 0.15s both;
}

@media (max-width: 800px) {
  .phone-frame {
    justify-self: center;
  }
}

/* —— Page hero (inner pages) —— */
.page-hero {
  position: relative;
  padding: 3.5rem 0 3rem;
  background: linear-gradient(150deg, var(--navy-deep), var(--navy) 60%, var(--navy-soft));
  overflow: hidden;
}

.page-hero .hero-pattern {
  opacity: 0.1;
}

.page-hero .wrap {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 4vw, 2.85rem);
  margin-bottom: 0.4rem;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.72);
  max-width: 36em;
  margin: 0;
}

.page-hero .breadcrumb {
  color: var(--gold-light);
  font-size: 0.85rem;
  margin-bottom: 0.85rem;
}

.page-hero .breadcrumb a {
  color: var(--gold-light);
}

.content-block {
  padding: 3.5rem 0 4.5rem;
}

.prose {
  max-width: 720px;
}

.prose h2 {
  font-size: 1.65rem;
  margin-top: 2rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose ul {
  padding-left: 1.2rem;
  color: var(--muted);
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose .meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 800px) {
  .split {
    grid-template-columns: 1fr;
  }
}

/* Contact form — interaction container */
.form-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: 0 10px 30px rgba(11, 31, 58, 0.06);
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: var(--ivory);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.18);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-aside h3 {
  font-size: 1.4rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
}

.contact-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.contact-list strong {
  display: block;
  color: var(--navy);
  font-size: 0.92rem;
}

.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}

.faq-list summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--navy);
  font-weight: 600;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  float: right;
  color: var(--gold-muted);
  font-weight: 400;
}

.faq-list details[open] summary::after {
  content: "–";
}

.faq-list details p {
  margin: 0.75rem 0 0;
}

.marketing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

@media (max-width: 700px) {
  .marketing-grid {
    grid-template-columns: 1fr;
  }
}

.marketing-item h3 {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.pill-note {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--gold-muted);
}

/* —— Footer —— */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.7);
  padding: 3.5rem 0 1.75rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 0.6rem;
}

.footer-brand span {
  color: var(--gold);
}

.site-footer h4 {
  color: var(--gold-light);
  font-size: 1.05rem;
  margin-bottom: 0.9rem;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 0.45rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.95rem;
}

.site-footer a:hover {
  color: var(--gold-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  font-size: 0.88rem;
}

.form-status {
  display: none;
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(201, 162, 39, 0.12);
  border: 1px solid rgba(201, 162, 39, 0.35);
  color: var(--navy);
  font-size: 0.95rem;
}

.form-status.is-visible {
  display: block;
}
