:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-raised: #1c232d;
  --gold: #c9a84c;
  --gold-soft: rgba(201, 168, 76, 0.16);
  --gold-glow: rgba(201, 168, 76, 0.25);
  --green: #2d6a4f;
  --green-bright: #2d9b6f;
  --green-glow: rgba(45, 155, 111, 0.22);
  --text: #f0ead6;
  --text-muted: #7d8590;
  --border: rgba(240, 234, 214, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.page { min-height: 100vh; }

.container {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container-narrow { max-width: 48rem; }

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(240, 234, 214, 0.06);
  background: rgba(13, 17, 23, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(201, 168, 76, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-size: 1rem;
  font-weight: 600;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-header nav a {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.site-header nav a:hover,
.site-header nav a.active { color: var(--text); }

/* ── Hero ── */
.hero-section {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 6rem;
}

.hero-glow {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-glow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -10%;
  width: 420px;
  height: 420px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(201, 168, 76, 0.1);
  filter: blur(120px);
}

.hero-glow::after {
  content: "";
  position: absolute;
  right: 10%;
  top: 30%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(45, 106, 79, 0.1);
  filter: blur(120px);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 48rem;
}

.hero-icon-wrap {
  position: relative;
  margin-bottom: 2rem;
}

.hero-icon-glow {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background: rgba(201, 168, 76, 0.25);
  filter: blur(24px);
}

.hero-icon {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 24px;
  object-fit: cover;
  border: 1px solid rgba(201, 168, 76, 0.4);
}

.pill {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 0.375rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 168, 76, 0.3);
  background: rgba(201, 168, 76, 0.1);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--gold);
}

.bismillah {
  font-family: "Amiri Quran", serif;
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.hero-content h1 {
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.gradient-text {
  background: linear-gradient(90deg, var(--gold), var(--green-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin-top: 1.5rem;
  max-width: 36rem;
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--text-muted);
  text-wrap: pretty;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), #d9be6d);
  color: #0d1117;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 32px rgba(201, 168, 76, 0.2);
  transition: transform 0.2s;
}

.btn-cta:hover { transform: scale(1.03); }

/* ── Phone mockups ── */
.phones {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1rem;
  max-width: 42rem;
  margin: 4rem auto 0;
  padding: 0 1rem;
}

.phone {
  flex-shrink: 0;
}

.phone-frame {
  position: relative;
  aspect-ratio: 9 / 19;
  padding: 0.625rem;
  border-radius: 2.6rem;
  border: 1px solid rgba(201, 168, 76, 0.25);
  background: #05070a;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
}

.phone-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 2.6rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.phone-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2rem;
  display: block;
}

.phone-notch {
  position: absolute;
  top: 0.625rem;
  left: 50%;
  z-index: 2;
  width: 33%;
  height: 1.5rem;
  transform: translateX(-50%);
  border-radius: 0 0 1rem 1rem;
  background: #05070a;
}

.phone-center {
  width: 11rem;
  z-index: 2;
}

.phone-left,
.phone-right {
  width: 9rem;
  opacity: 0.9;
  transform: translateY(1.5rem);
}

.phone-left { transform: translateY(1.5rem) rotate(-6deg); }
.phone-right { transform: translateY(1.5rem) rotate(6deg); }

.phone-left,
.phone-right { display: none; }

/* ── Services ── */
.services-section {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto 3.5rem;
}

.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green-bright);
}

.section-header h2 {
  margin-top: 1rem;
  font-size: clamp(1.875rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.services-grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.service-card {
  height: 100%;
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 168, 76, 0.5);
  box-shadow: 0 0 30px -8px var(--gold);
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(201, 168, 76, 0.2);
  background: rgba(201, 168, 76, 0.1);
  color: var(--gold);
}

.service-card h3 {
  margin-top: 1.25rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.service-card p {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-muted);
}

/* ── Fi Sabeelillah ── */
.sabeelillah-section {
  padding: 0 0 6rem;
}

.sabeelillah-frame {
  border-radius: 28px;
  padding: 1px;
  background: linear-gradient(135deg, var(--gold), rgba(201, 168, 76, 0.4), var(--green-bright));
}

.sabeelillah-inner {
  position: relative;
  overflow: hidden;
  border-radius: 27px;
  background: var(--surface);
  padding: 3.5rem 1.5rem;
  text-align: center;
}

.sabeelillah-glow {
  position: absolute;
  left: 50%;
  top: 0;
  width: 16rem;
  height: 16rem;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(201, 168, 76, 0.1);
  filter: blur(48px);
  pointer-events: none;
}

.sabeelillah-ar {
  position: relative;
  font-family: "Amiri Quran", serif;
  font-size: clamp(2.25rem, 5vw, 3rem);
  color: var(--gold);
}

.sabeelillah-en {
  position: relative;
  margin-top: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--green-bright);
}

.sabeelillah-text {
  position: relative;
  max-width: 36rem;
  margin: 1.5rem auto 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
  text-wrap: pretty;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid rgba(240, 234, 214, 0.06);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.footer-inner a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-inner a:hover { color: var(--text); }

/* ── Legal pages ── */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.wrap::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 40% at 20% 0%, var(--gold-glow), transparent 55%),
    radial-gradient(ellipse 50% 35% at 85% 10%, var(--green-glow), transparent 50%);
}

.legal-hero {
  margin: 2rem 0;
}

.legal-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.legal-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.legal-meta a {
  color: var(--green-bright);
  text-decoration: none;
}

.legal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2rem;
}

.legal-content h2 {
  font-size: 1.15rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--gold);
}

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

.legal-content p,
.legal-content li {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}

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

.legal-content li { margin-bottom: 0.4rem; }

.legal-content a {
  color: var(--green-bright);
  text-decoration: none;
}

.legal-content a:hover { text-decoration: underline; }

.legal-toc {
  background: rgba(13, 17, 23, 0.5);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.legal-toc h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.legal-toc ol { padding-left: 1.25rem; }

.legal-toc li {
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.legal-toc a {
  color: var(--text);
  text-decoration: none;
}

.legal-toc a:hover { color: var(--gold); }

/* ── Responsive ── */
@media (min-width: 640px) {
  .hero-icon { width: 112px; height: 112px; }
  .phone-left,
  .phone-right { display: block; }
  .phone-center { width: 13rem; }
  .phone-left,
  .phone-right { width: 11rem; }
  .phones { gap: 2rem; }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
  .sabeelillah-inner { padding: 3.5rem 3rem; }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 639px) {
  .hero-section { padding-top: 3.5rem; }
  .site-header nav a { padding: 0.5rem; font-size: 0.8125rem; }
  .legal-content { padding: 1.25rem; }
}
