@font-face {
  font-family: 'Uthmanic Hafs';
  src: url('fonts/UthmanicHafs_V22.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f7f1e3;
  --surface: #fffdf7;
  --card: #ffffff;
  --elevated: #fdf8ec;
  --text: #182026;
  --muted: #687076;
  --soft: #8a7e68;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --gold: #d6a84f;
  --gold-dark: #b7791f;
  --border: #e6d8b8;
  --shadow: 0 24px 70px rgba(24, 32, 38, 0.12);
  --hero-glow: rgba(15, 118, 110, 0.18);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --max: 1180px;
}

[data-theme='dark'] {
  --bg: #0b0b0b;
  --surface: #0f0f0f;
  --card: #151515;
  --elevated: #1b1b1b;
  --text: #f8fafc;
  --muted: #b8c2c7;
  --soft: #d8caa9;
  --primary: #2dd4bf;
  --primary-dark: #14b8a6;
  --gold: #f0c86a;
  --gold-dark: #d6a84f;
  --border: #2f2a21;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
  --hero-glow: rgba(45, 212, 191, 0.16);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 5%, var(--hero-glow), transparent 34rem),
    radial-gradient(circle at 90% 10%, rgba(214, 168, 79, 0.15), transparent 30rem),
    var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.25s ease, color 0.25s ease;
}

body.no-scroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  z-index: 1000;
}
.skip-link:focus { top: 16px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--primary), var(--gold));
  color: #fff;
  box-shadow: 0 14px 34px rgba(15, 118, 110, 0.28);
  font-weight: 900;
}

.brand-text span {
  display: block;
  font-size: 0.75rem;
  color: var(--soft);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a,
.nav-actions button {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 13px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.92rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border-color: color-mix(in srgb, var(--primary) 30%, transparent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button,
.menu-button {
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  min-width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}

.menu-button { display: none; }

main { min-height: 70vh; }

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 88px 22px;
}

.hero {
  padding-top: 88px;
  padding-bottom: 86px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 44px;
  align-items: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.kicker::before {
  content: '';
  width: 32px;
  height: 2px;
  border-radius: 999px;
  background: var(--gold);
}

h1, h2, h3 { line-height: 1.12; margin: 0; letter-spacing: -0.045em; }
h1 { font-size: clamp(3.2rem, 9vw, 6.4rem); }
h2 { font-size: clamp(2.05rem, 5vw, 3.6rem); }
h3 { font-size: 1.22rem; letter-spacing: -0.02em; }

.hero-subtitle {
  margin: 14px 0 0;
  color: var(--gold);
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.035em;
}

.hero-tagline {
  margin: 8px 0 0;
  color: var(--primary);
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  font-weight: 900;
}

.lead {
  margin: 24px 0 0;
  max-width: 690px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.22rem);
}

.hero-actions,
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  min-height: 48px;
  padding: 0 20px;
  font-weight: 900;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-color: color-mix(in srgb, var(--primary) 70%, #fff 10%);
  box-shadow: 0 16px 34px rgba(15, 118, 110, 0.26);
}
.btn-secondary {
  background: var(--card);
  color: var(--text);
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #1b1204;
  border-color: color-mix(in srgb, var(--gold) 70%, #fff 10%);
}

.hero-card {
  position: relative;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--card) 90%, transparent), var(--elevated));
  border-radius: 36px;
  padding: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-card::before {
  content: '';
  position: absolute;
  inset: -80px -90px auto auto;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(214, 168, 79, 0.22);
  filter: blur(8px);
}

.app-mock {
  position: relative;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 30px;
  padding: 18px;
  min-height: 510px;
}
.mock-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.mock-pill {
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--primary);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 900;
}
.quran-word {
  direction: rtl;
  min-height: 150px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background:
    radial-gradient(circle at center, color-mix(in srgb, var(--primary) 13%, transparent), transparent 64%),
    var(--elevated);
  border: 1px solid var(--border);
  font-family: 'Uthmanic Hafs', 'Amiri', serif;
  font-size: clamp(2.15rem, 6.2vw, 4.7rem);
  color: var(--text);
  text-align: center;
  line-height: 2.15;
  padding: 20px;
}
.quran-verse {
  letter-spacing: 0;
  word-spacing: 0.12em;
}
.lesson-list { display: grid; gap: 12px; margin-top: 18px; }
.lesson-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
}
.lesson-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--primary) 13%, transparent);
  color: var(--primary);
  font-weight: 900;
}
.lesson-row strong { display: block; }
.lesson-row span { color: var(--muted); font-size: 0.9rem; }
.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 30px;
}
.section-heading p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.about-card,
.legal-card,
.support-card,
.cta-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 42px);
}
.about-card p,
.legal-card p,
.support-card p { color: var(--muted); margin: 0 0 18px; }
.strong-line {
  display: block;
  margin-top: 22px;
  color: var(--primary);
  font-weight: 900;
  font-size: 1.18rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.feature-card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 22px;
  min-height: 210px;
  box-shadow: 0 14px 36px rgba(0,0,0,0.06);
}
.feature-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  background: color-mix(in srgb, var(--primary) 13%, transparent);
  color: var(--primary);
  font-weight: 900;
  font-size: 1.35rem;
}
.feature-card p { color: var(--muted); margin: 12px 0 0; }

.page-hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 86px 22px 34px;
  text-align: center;
}
.page-hero p { color: var(--muted); font-size: 1.13rem; margin: 18px auto 0; max-width: 760px; }

.legal-card {
  max-width: 920px;
  margin: 0 auto 70px;
}
.legal-card h2 {
  font-size: 1.5rem;
  margin: 32px 0 12px;
  letter-spacing: -0.025em;
}
.legal-card h2:first-child { margin-top: 0; }
.legal-card ul { color: var(--muted); padding-left: 22px; }
.legal-card li { margin: 8px 0; }
.legal-meta {
  display: grid;
  gap: 6px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--elevated);
  color: var(--muted);
}
.inline-link {
  color: var(--primary);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.support-card {
  max-width: 820px;
  margin: 0 auto 70px;
  text-align: center;
}
.support-email {
  display: inline-flex;
  margin: 16px 0 4px;
  color: var(--primary);
  font-weight: 900;
  font-size: 1.15rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 30px 22px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-links a { font-weight: 800; }
.footer-links a:hover { color: var(--primary); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 64px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-card { max-width: 620px; width: 100%; margin: 0 auto; }
}

@media (max-width: 760px) {
  .nav { padding: 12px 16px; }
  .menu-button { display: inline-grid; }
  .nav-links {
    position: fixed;
    inset: 69px 14px auto 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 14px; }
  .brand-text span { display: none; }
  .section { padding: 62px 16px; }
  .hero { padding-top: 54px; gap: 30px; }
  .hero-actions, .cta-row { flex-direction: column; }
  .btn { width: 100%; }
  .app-mock { min-height: auto; }
  .quran-word { min-height: 130px; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
}

@media (max-width: 430px) {
  .brand-mark { width: 40px; height: 40px; border-radius: 14px; }
  .hero-card { padding: 14px; border-radius: 26px; }
  .app-mock { padding: 12px; border-radius: 24px; }
  .lesson-row { grid-template-columns: auto 1fr; }
  .progress-dot { display: none; }
  .about-card, .legal-card, .support-card, .cta-card { border-radius: 22px; }
}
