:root {
  color-scheme: dark;

  --bg: #0b0d12;
  --surface: #12151c;
  --surface-2: #171b24;
  --border: #232833;
  --border-strong: #2e3542;

  --text: #eef0f4;
  --text-muted: #9aa3b2;
  --text-faint: #626b7a;

  --accent-quran: #2fb673;
  --accent-games: #7c8cff;
  --accent-gold: #d9b46a;

  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  --container: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-gap: clamp(48px, 7vw, 96px);
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

img {
  height: auto;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  right: var(--space-4);
  top: -60px;
  background: var(--text);
  color: var(--bg);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s var(--ease);
  z-index: 100;
}

.skip-link:focus {
  top: var(--space-4);
}

/* ---------- topbar ---------- */

.topbar {
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  max-width: var(--container);
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  padding: 0 var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--text);
  transition: color 0.2s var(--ease);
}

.brand:hover,
.brand:focus-visible {
  color: var(--accent-gold);
}

.brand:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.brand__icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.brand__name {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.005em;
  color: inherit;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: clamp(520px, 60vh, 620px);
  padding: var(--section-gap) var(--gutter);
  text-align: center;
  background-image:
    linear-gradient(rgba(5, 9, 16, 0.45), rgba(5, 9, 16, 0.45)),
    url("oasis-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero__inner {
  max-width: min(90vw, 860px);
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 var(--space-4);
  font-size: clamp(13px, 1.1vw, 15px);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  text-transform: none;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

.hero__title {
  margin: 0 0 var(--space-4);
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

.hero__brand-accent {
  color: var(--accent-gold);
}

.hero__subtitle {
  margin: 0 0 var(--space-3);
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  font-weight: 500;
  color: var(--text-muted);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

.hero__desc {
  margin: 0 auto;
  max-width: 56ch;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--text-muted);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

/* ---------- generic section ---------- */

.section__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--section-gap) var(--gutter);
}

.section__head {
  margin-bottom: var(--space-6);
  text-align: center;
}

.section__title {
  margin: 0 0 var(--space-2);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
}

.section__desc {
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(15px, 1.2vw, 17px);
}

/* ---------- services / cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}

.card {
  display: flex;
  flex-direction: column;
  background: rgba(18, 21, 28, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 16px 40px -24px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.card:hover,
.card:focus-visible {
  transform: translateY(-3px);
  background: rgba(23, 27, 36, 0.75);
  border-color: var(--border-strong);
  box-shadow: 0 20px 48px -20px rgba(0, 0, 0, 0.65);
}

.card:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
}

.card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s var(--ease);
}

.card:hover .card__image,
.card:focus-visible .card__image {
  transform: scale(1.04);
}

.card__media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(to bottom, transparent, rgba(18, 21, 28, 0.85));
  pointer-events: none;
}

.card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-6);
  flex: 1;
}

.card__title {
  margin: 0;
  font-size: clamp(19px, 1.6vw, 22px);
  font-weight: 700;
}

.card__desc {
  margin: 0;
  font-size: clamp(14.5px, 1vw, 16px);
  line-height: 1.7;
  color: var(--text-muted);
}

.card__cta {
  margin-top: auto;
  padding-top: var(--space-3);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-faint);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: color 0.2s var(--ease), gap 0.2s var(--ease);
}

.card--quran:hover .card__cta,
.card--quran:focus-visible .card__cta {
  color: var(--accent-quran);
}

.card--games:hover .card__cta,
.card--games:focus-visible .card__cta {
  color: var(--accent-games);
}

.card:hover .card__cta {
  gap: var(--space-3);
}

.arrow {
  transition: transform 0.2s var(--ease);
}

/* ---------- visitors ---------- */

.visitors {
  padding: 0 var(--gutter) var(--section-gap);
}

.visitors__box {
  max-width: 580px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-6) var(--space-7);
  background: rgba(18, 21, 28, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.visitors__icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.visitors__icon svg {
  width: 24px;
  height: 24px;
}

.visitors__text {
  min-width: 0;
}

.visitors__label {
  margin: 0;
  font-size: clamp(13px, 1vw, 14.5px);
  font-weight: 700;
  color: var(--text-faint);
}

.visitors__count {
  margin: 2px 0;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  text-align: right;
}

.visitors__note {
  margin: 0;
  font-size: clamp(12px, 0.9vw, 13px);
  color: var(--text-faint);
}

/* ---------- contact ---------- */

.contact {
  border-top: 1px solid var(--border);
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  max-width: 680px;
  margin: 0 auto;
}

.contact__card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  min-height: 48px;
  background: rgba(18, 21, 28, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.contact__card:hover,
.contact__card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: rgba(23, 27, 36, 0.75);
}

.contact__card:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.contact__card-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--accent-gold);
}

.contact__card-icon svg {
  width: 22px;
  height: 22px;
}

.contact__card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.contact__card-title {
  font-weight: 700;
  font-size: clamp(14px, 1.1vw, 15.5px);
  color: var(--text);
}

.contact__card-desc {
  font-size: clamp(12px, 0.9vw, 13px);
  color: var(--text-faint);
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--border);
}

.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--section-gap) var(--gutter);
  text-align: center;
}

.footer__brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: 2px;
}

.footer__icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.footer__brand {
  margin: 0;
  font-weight: 800;
  font-size: 18px;
}

.footer__domain {
  margin: 2px 0 var(--space-4);
  font-size: 14.5px;
  color: var(--text-faint);
  direction: ltr;
  unicode-bidi: plaintext;
}

.footer__rights {
  margin: 0 0 var(--space-3);
  font-size: 14px;
  color: var(--text-faint);
  line-height: 1.7;
}

.footer__credit {
  margin: 0;
  font-size: 14px;
  color: var(--text-faint);
}

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .brand__icon {
    width: 32px;
    height: 32px;
  }

  .hero {
    min-height: clamp(380px, 72vh, 520px);
  }

  .hero__title {
    font-size: clamp(2rem, 9vw, 3rem);
  }

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

  .card__body {
    padding: var(--space-5);
  }

  .section__inner {
    padding: var(--space-7) var(--space-4);
  }

  .visitors {
    padding: 0 var(--space-4) var(--space-7);
  }

  .visitors__box {
    padding: var(--space-5);
    gap: var(--space-4);
  }

  .visitors__icon {
    width: 40px;
    height: 40px;
  }

  .footer__inner {
    padding: var(--space-7) var(--space-4);
  }
}

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

@media (max-width: 420px) {
  .visitors__box {
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
  }
}

@media (min-width: 1440px) {
  .cards {
    gap: var(--space-6);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
