:root {
  --ink: #08344a;
  --ink-soft: #4d6573;
  --header: #003e5c;
  --header-deep: #00344e;
  --sky: #a4cef4;
  --sky-soft: #e7f6ff;
  --cream: #f6f1e4;
  --gold: #fff4d4;
  --gold-deep: #e2c36a;
  --mint: #e7f3ea;
  --line: rgba(8, 52, 74, 0.1);
  --white: #ffffff;
  --shadow: 0 14px 34px rgba(8, 52, 74, 0.08);
  --radius: 24px;
  --header-h: 78px;
  --font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --arabic: "Amiri", "Noto Naskh Arabic", serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.03em;
}

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

::selection {
  background: #a4cef4;
  color: #08344a;
}

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

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

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 80;
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
}

.skip:focus {
  top: 12px;
}

.container {
  width: min(1140px, calc(100% - 40px));
  margin-inline: auto;
}

.eyebrow {
  margin-bottom: 10px;
  color: #1a7380;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow-light {
  color: var(--gold-deep);
}

.lede {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.arabic {
  font-family: var(--arabic);
  font-weight: 700;
  letter-spacing: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

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

.btn-light {
  background: #fff;
  color: var(--ink);
}

.btn-light:hover {
  background: #f3fbff;
}

.btn-line {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-line:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-dark {
  background: var(--header);
  color: #fff;
}

.btn-dark:hover {
  background: #0c5270;
}

.btn-sm {
  min-height: 42px;
  padding: 0 16px;
  font-size: 0.92rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header);
  color: #fff;
}

.site-header.is-stuck {
  box-shadow: 0 10px 28px rgba(0, 28, 44, 0.22);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.03em;
  z-index: 2;
}

.logo-mark {
  display: grid;
  place-items: center;
  color: var(--gold-deep);
  flex: 0 0 auto;
}

.logo-text {
  font-size: clamp(0.92rem, 2vw, 1.05rem);
  white-space: nowrap;
}

.nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.nav a:hover,
.nav a.is-active {
  color: #fff;
}

.nav a.btn {
  color: var(--ink);
}

.nav a.btn:hover {
  color: var(--ink);
}

.nav-cta {
  display: none;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 2;
}

.header-wa {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.nav-toggle span:not(.sr-only) {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle span:nth-child(2) { top: 15px; }
.nav-toggle span:nth-child(3) { top: 21px; }
.nav-toggle span:nth-child(4) { top: 27px; }

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  top: 21px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(4) {
  top: 21px;
  transform: rotate(-45deg);
}

.hero {
  background:
    radial-gradient(circle at 88% 18%, rgba(164, 206, 244, 0.2), transparent 26%),
    radial-gradient(circle at 8% 90%, rgba(226, 195, 106, 0.14), transparent 24%),
    var(--header);
  color: #fff;
  padding: 56px 0 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: 56px;
  align-items: center;
}

.hero .arabic {
  font-size: 1.7rem;
  line-height: 1;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.92);
  text-align: left;
  width: fit-content;
}

.hero h1 {
  font-size: clamp(2.05rem, 4.3vw, 3.45rem);
  font-weight: 800;
  max-width: 16ch;
  text-wrap: balance;
}

.hero .lede {
  margin-top: 18px;
  max-width: 46ch;
  color: rgba(255, 255, 255, 0.84);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 22px;
  font-weight: 600;
  font-size: 0.95rem;
}

.hero-contact a {
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  padding-bottom: 1px;
}

.hero-contact a:hover {
  border-bottom-color: #fff;
}

.hero-frame {
  position: relative;
}

.hero-frame img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  object-position: center 42%;
  border-radius: 28px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
}

.hero-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 210px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #e7f8dc;
  color: #16361c;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.hero-badge small,
.hero-badge strong {
  display: block;
}

.hero-badge small {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #3d6a40;
}

.hero-badge strong {
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.badge-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2f9e44;
  box-shadow: 0 0 0 6px rgba(47, 158, 68, 0.16);
  flex: 0 0 auto;
}

.hero-book {
  position: absolute;
  left: 18px;
  bottom: 22px;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold-deep);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.trust {
  background: var(--sky);
  color: #0c3d56;
  padding: 26px 0;
}

.trust-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.trust-inner > p {
  max-width: 260px;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.trust-stats {
  display: flex;
  align-items: stretch;
}

.trust-stats li {
  min-width: 140px;
  padding: 0 32px;
  border-left: 1px solid rgba(12, 61, 86, 0.18);
}

.trust-stats li:first-child {
  border-left: 0;
  padding-left: 8px;
}

.trust-stats strong {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.trust-stats span {
  display: block;
  margin-top: 4px;
  font-weight: 600;
  font-size: 0.95rem;
}

.section {
  padding: 88px 0;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
}

.section-head h2,
.learn h2,
.best h2,
.contact-copy h2 {
  font-size: clamp(1.85rem, 3vw, 2.6rem);
  font-weight: 800;
}

.section-head p:last-child {
  margin-top: 12px;
  color: var(--ink-soft);
}

.feature-grid,
.course-grid {
  display: grid;
  gap: 22px;
}

.feature-grid {
  grid-template-columns: repeat(3, 1fr);
}

.feature-card {
  padding: 28px 26px 30px;
  border-radius: var(--radius);
  min-height: 230px;
}

.feature-cream { background: var(--cream); }
.feature-gold { background: var(--gold); }
.feature-mint { background: var(--mint); }

.feature-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 16px;
  background: #fff;
  color: #1a7380;
}

.feature-gold .feature-icon { color: #9a7420; }
.feature-mint .feature-icon { color: #2d7a45; }

.feature-card h3,
.course-body h3,
.teacher-card h3,
.join-form h3 {
  font-size: 1.2rem;
  font-weight: 800;
}

.feature-card p {
  margin-top: 8px;
  color: var(--ink-soft);
}

.courses {
  background: #f5f8fb;
}

.course-grid {
  grid-template-columns: repeat(3, 1fr);
}

.course-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(8, 52, 74, 0.12);
}

.course-media {
  overflow: hidden;
  background: #d7e3ea;
}

.course-media img {
  width: 100%;
  height: 196px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.course-card:hover .course-media img {
  transform: scale(1.05);
}

.media-noorani { object-position: 78% center; }
.media-reading { object-position: center 62%; }
.media-hifz { object-position: center 45%; }
.media-translation { object-position: 62% 48%; }
.media-tajweed { object-position: center 40%; }
.media-kids { object-position: center 42%; }

.course-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding: 18px 18px 20px;
}

.kicker {
  color: #1a7380;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.4;
}

.course-body > p:not(.kicker):not(.meta) {
  color: var(--ink-soft);
  font-size: 0.96rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  color: #6a7e8a;
  font-size: 0.8rem;
  font-weight: 700;
}

.meta span + span::before {
  content: "·";
  margin: 0 8px;
}

.course-body .btn {
  margin-top: auto;
  align-self: flex-start;
}

.section-cta {
  display: flex;
  justify-content: center;
  margin-top: 34px;
}

.learn {
  background: var(--sky-soft);
  padding: 88px 0;
}

.learn-grid,
.best-grid,
.contact-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 52px;
  align-items: center;
}

.learn-photo-wrap img,
.photo-tall,
.photo-short {
  width: 100%;
  object-fit: cover;
  border-radius: 28px;
}

.learn-photo-wrap img {
  height: 460px;
  object-position: center 58%;
  box-shadow: var(--shadow);
}

.learn-copy h2,
.best-copy h2 {
  max-width: 16ch;
}

.learn .lede,
.best .lede {
  margin-top: 14px;
}

.ticks {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.ticks li {
  position: relative;
  padding-left: 32px;
  font-weight: 600;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #1a7380 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.2 6.4 11 12.5 5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.stat-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 26px;
}

.stat-pills article {
  background: #fff;
  border-radius: 18px;
  padding: 16px 16px 14px;
  box-shadow: var(--shadow);
}

.stat-pills strong,
.stat-pills span {
  display: block;
}

.stat-pills strong {
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.stat-pills span {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.best-grid {
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
}

.teacher-card {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 22px;
  padding: 14px;
  border-radius: 18px;
  background: #f4f8fb;
  border: 1px solid var(--line);
}

.teacher-mark {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--header);
  color: var(--gold-deep);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.teacher-card p:last-child {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.best-photos {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 16px;
  align-items: end;
}

.photo-tall {
  height: 430px;
  object-position: center 38%;
}

.photo-short {
  height: 300px;
  margin-bottom: 36px;
  object-position: center 40%;
}

.contact-band {
  background:
    radial-gradient(circle at 12% 20%, rgba(164, 206, 244, 0.16), transparent 28%),
    #05415b;
  color: #fff;
  padding: 80px 0;
}

.contact-grid {
  grid-template-columns: 1fr 0.92fr;
  align-items: start;
}

.contact-copy h2 {
  max-width: 12ch;
}

.contact-copy .lede {
  margin-top: 14px;
  max-width: 46ch;
  color: rgba(255, 255, 255, 0.82);
}

.contact-list {
  margin-top: 26px;
  display: grid;
  gap: 14px;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.contact-list a {
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  overflow-wrap: anywhere;
}

.contact-list a:hover {
  border-bottom-color: #fff;
}

.contact-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
}

.join-form {
  background: #fff;
  color: var(--ink);
  border-radius: 24px;
  padding: 26px 24px 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.16);
  display: grid;
  gap: 14px;
}

.join-form h3 {
  margin-bottom: 2px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-size: 0.82rem;
  font-weight: 800;
}

.field em {
  font-style: normal;
  font-weight: 600;
  color: var(--ink-soft);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #d5e2ea;
  background: #f7fbfd;
  border-radius: 12px;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--ink);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid rgba(226, 195, 106, 0.7);
  outline-offset: 1px;
  border-color: #b7c9d4;
}

.form-error {
  min-height: 1.2em;
  margin: 0;
  color: #9d2430;
  font-size: 0.9rem;
  font-weight: 700;
}

.form-note {
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.form-note a {
  color: #0c6e86;
  font-weight: 700;
}

.site-footer {
  background: #fff;
  padding: 64px 0 28px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.9fr 1.15fr;
  gap: 36px;
}

.footer-brand .logo {
  color: var(--ink);
}

.footer-arabic {
  margin-top: 12px;
  font-size: 1.45rem;
  color: var(--header);
  line-height: 1;
  text-align: left;
  width: fit-content;
}

.footer-brand p:last-child {
  margin-top: 12px;
  max-width: 34ch;
  color: var(--ink-soft);
}

.site-footer h3 {
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
}

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

.footer-contact li:last-child {
  color: var(--ink-soft);
  font-weight: 600;
}

.footer-base {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: #6d818c;
  font-size: 0.9rem;
  font-weight: 600;
}

.wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 45;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 12px 28px rgba(18, 120, 60, 0.35);
  text-decoration: none;
}

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

.wa-float.is-hidden {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1100px) {
  .nav {
    gap: 16px;
  }

  .header-wa {
    display: none;
  }

  .hero-grid,
  .learn-grid,
  .best-grid,
  .contact-grid {
    gap: 36px;
  }
}

@media (max-width: 980px) {
  .nav-toggle {
    display: inline-block;
    margin-left: auto;
    flex-shrink: 0;
  }

  .header-actions {
    display: none;
  }

  .header-inner {
    position: static;
  }

  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    transform: none;
    width: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px 22px 20px;
    background: var(--header-deep);
    box-shadow: 0 16px 30px rgba(0, 20, 32, 0.2);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 12px 4px;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-cta {
    display: inline-flex;
    margin-top: 12px;
    border-bottom: 0;
  }

  .hero-grid,
  .learn-grid,
  .best-grid,
  .contact-grid,
  .feature-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 36px 0 48px;
  }

  .hero h1,
  .learn-copy h2,
  .best-copy h2,
  .contact-copy h2 {
    max-width: none;
  }

  .hero-frame img {
    height: 420px;
  }

  .course-grid {
    grid-template-columns: 1fr 1fr;
  }

  .best-photos {
    order: -1;
  }

  .photo-tall {
    height: 360px;
  }

  .photo-short {
    height: 260px;
    margin-bottom: 0;
  }

  .learn-photo-wrap img {
    height: 360px;
  }

  .section,
  .learn {
    padding: 68px 0;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(1140px, calc(100% - 32px));
  }

  .trust-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .trust-inner > p {
    max-width: none;
  }

  .trust-stats {
    width: 100%;
  }

  .trust-stats li {
    flex: 1;
    min-width: 0;
    padding: 0 12px;
  }

  .course-grid,
  .stat-pills,
  .best-photos {
    grid-template-columns: 1fr;
  }

  .hero-frame img,
  .learn-photo-wrap img,
  .photo-tall {
    height: 320px;
  }

  .photo-short {
    height: 220px;
  }

  .footer-base {
    flex-direction: column;
  }

  .hero-actions .btn,
  .join-form .btn,
  .section-cta .btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .trust-stats {
    flex-direction: column;
    gap: 14px;
  }

  .trust-stats li,
  .trust-stats li:first-child {
    border-left: 0;
    padding: 0;
  }

  .logo-text {
    font-size: 0.86rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
