:root {
  --paper: #f7faf8;
  --cream: #eaf1ec;
  --card: #ffffff;
  --ink: #093527;
  --text: #2c3b34;
  --muted: #5f7169;
  --gold: #c9a254;
  --gold-deep: #a07a2f;
  --gold-light: #ecd9ab;
  --green: #093527;
  --green-soft: #0c4433;
  --navy: #0f214b;
  --black: #093527;
  --line: rgba(9, 53, 39, 0.1);
  --shadow: 0 12px 30px rgba(9, 53, 39, 0.1);
  --radius: 14px;
  --display: "Cinzel", "Palatino Linotype", serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --urdu: "Noto Nastaliq Urdu", serif;
  --arabic: "Amiri", serif;
  --header: 76px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

html {
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

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

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.1;
}

p {
  margin: 0;
}

.wrap {
  width: min(1180px, calc(100% - 3rem));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 30;
  padding: 0.6rem 0.9rem;
  background: var(--ink);
  color: #fff;
}

.skip:focus {
  top: 0.6rem;
}

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

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

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--gold-deep);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold);
}

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

.eyebrow.light::before {
  background: var(--gold-light);
}

section {
  padding: 5.5rem 0;
}

.section-head {
  max-width: 34rem;
  margin-bottom: 2.25rem;
}

.section-head h2 {
  font-size: clamp(2rem, 3.6vw, 2.9rem);
}

.section-head p:last-child {
  margin-top: 1rem;
  font-size: 1.05rem;
  color: var(--text);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header);
  background: rgba(247, 250, 248, 0.96);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 18px rgba(9, 53, 39, 0.07);
}

.header-bar {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.brand img {
  display: block;
  height: 58px;
  width: auto;
}

@media (max-width: 900px) {
  .brand img {
    height: 48px;
  }
}

@media (max-width: 480px) {
  .brand img {
    height: 42px;
  }
}

.hero-pre {
  color: var(--gold, #c9a254);
  font-family: var(--sans);
  font-size: clamp(0.72rem, 1.4vw, 0.85rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0 0 0.4rem;
}

.footer-pre {
  color: var(--gold-light, #e2c884);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 0.3rem;
}

.nav {
  display: flex;
  gap: 2rem;
  margin-inline: auto;
}

.nav a {
  color: var(--ink);
  font-size: 0.9rem;
  text-decoration: none;
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

.header-call {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1.2rem;
  border-radius: 10px;
  background: var(--black);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
  white-space: nowrap;
}

.header-call svg {
  width: 16px;
  height: 16px;
  color: var(--gold-light);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}

.bars,
.bars::before,
.bars::after {
  display: block;
  width: 18px;
  height: 1.5px;
  margin: 0 auto;
  background: currentColor;
  position: relative;
}

.bars::before,
.bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.bars::before {
  top: -6px;
}

.bars::after {
  top: 6px;
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 4rem 0 4.5rem;
}

.hero-media {
  position: absolute;
  inset: 0 0 0 38%;
  background: url("../images/hero-mosque.jpg") 70% center / cover no-repeat;
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--paper) 0%, var(--paper) 3%, rgba(247, 250, 248, 0.75) 22%, rgba(247, 250, 248, 0) 55%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
  min-height: 500px;
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 4.9rem);
  letter-spacing: 0.02em;
  line-height: 1.02;
}

.hero-urdu {
  direction: rtl;
  width: fit-content;
  margin-top: 0.4rem;
  color: var(--gold-deep);
  font-family: var(--urdu);
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  line-height: 2;
}

.hero-text {
  max-width: 30rem;
  margin-top: 0.75rem;
  font-size: 1.08rem;
  color: var(--text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 200px;
  padding-block: 0.7rem;
  padding-inline: 0.8rem 1.3rem;
  border-radius: 12px;
  text-decoration: none;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta:hover,
.cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(9, 53, 39, 0.16);
}

.cta small {
  display: block;
  font-size: 0.74rem;
  font-weight: 400;
  opacity: 0.85;
}

.cta-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex: none;
}

.cta-icon svg {
  width: 20px;
  height: 20px;
}

.cta-dark {
  background: var(--black);
  color: #fff;
}

.cta-dark .cta-icon {
  background: rgba(236, 217, 171, 0.14);
  color: var(--gold-light);
}

.cta-light {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.cta-light .cta-icon {
  background: #e7f7ec;
  color: #1faa53;
}

.hero-emblem {
  justify-self: center;
  width: min(100%, 360px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-emblem img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 22px 40px rgba(9, 53, 39, 0.22));
}

/* Strip */

.strip {
  background: var(--black);
  color: #fff;
}

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

.strip-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.6rem 1.5rem;
}

.strip-item + .strip-item {
  border-inline-start: 1px solid rgba(236, 217, 171, 0.2);
}

.strip-item svg {
  width: 34px;
  height: 34px;
  flex: none;
  fill: none;
  stroke: var(--gold-light);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.strip-item strong {
  display: block;
  font-weight: 500;
  font-size: 0.98rem;
}

.strip-item span {
  display: block;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
}

/* Approach */

.approach {
  position: relative;
  overflow: hidden;
}

.approach-media {
  position: absolute;
  top: 0;
  right: 0;
  width: 52%;
  height: 440px;
  background: url("../images/quran-stand.jpg") center / cover no-repeat;
}

.approach-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--paper) 0%, var(--paper) 3%, rgba(247, 250, 248, 0.2) 40%, rgba(247, 250, 248, 0) 70%),
    linear-gradient(0deg, var(--paper) 0%, rgba(247, 250, 248, 0) 45%);
}

.approach .wrap {
  position: relative;
}

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
}

.card,
.course,
.mode,
.teacher-card,
.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card {
  padding: 1.75rem 1.6rem;
}

.card-icon {
  width: 38px;
  height: 38px;
  margin-bottom: 1.1rem;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.45rem;
}

.card p {
  color: var(--muted);
}

/* Courses */

.courses {
  background: var(--cream);
}

.cards-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.course {
  padding: 2rem 2rem 2.2rem;
}

.course-script {
  width: fit-content;
  color: var(--gold);
  font-family: var(--urdu);
  font-size: 2.2rem;
  line-height: 1.9;
}

.course-script.arabic {
  font-family: var(--arabic);
  font-size: 2.6rem;
  line-height: 1.4;
  color: #fff;
  margin-bottom: 0.6rem;
}

.course h3 {
  font-size: 1.5rem;
  margin: 0.4rem 0 0.6rem;
}

.course p:last-child {
  color: var(--muted);
}

.course-dark {
  background: var(--navy);
  border-color: var(--navy);
}

.course-dark h3 {
  color: #fff;
}

.course-dark p:last-child {
  color: rgba(255, 255, 255, 0.72);
}

/* Classes */

.classes-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.mode {
  display: flex;
  gap: 0.8rem;
  padding: 1.25rem;
}

.mode svg {
  width: 22px;
  height: 22px;
  flex: none;
  margin-top: 0.15rem;
  color: var(--ink);
}

.mode h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.mode h3 span {
  font-weight: 400;
  color: var(--muted);
}

.mode p {
  color: var(--muted);
  font-size: 0.9rem;
}

.map {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--cream);
}

.map iframe {
  display: block;
  width: 100%;
  height: 340px;
  border: 0;
}

.map-link {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  padding: 0.55rem 0.95rem;
  border-radius: 10px;
  background: var(--black);
  color: #fff;
  font-size: 0.85rem;
  text-decoration: none;
}

/* Teacher */

.teacher {
  padding-top: 0;
}

.teacher-card {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem 2.4rem;
}

.avatar {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--green-soft), var(--black));
  box-shadow: 0 0 0 4px var(--card), 0 0 0 5px var(--gold-light);
}

.avatar svg {
  width: 56px;
  height: 56px;
  fill: var(--gold);
}

.teacher-card .eyebrow {
  margin-bottom: 0.5rem;
}

.teacher-card h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  margin-bottom: 0.5rem;
}

.teacher-card p:last-child {
  color: var(--muted);
}

/* Contact */

.contact {
  padding-top: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.contact-panel {
  position: relative;
  overflow: hidden;
  padding: 2.6rem 2.4rem;
  border-radius: var(--radius);
  background: var(--black);
  color: rgba(255, 255, 255, 0.75);
}

.contact-mosque {
  position: absolute;
  right: -10px;
  bottom: 0;
  width: 260px;
  fill: rgba(236, 217, 171, 0.07);
}

.contact-panel h2 {
  position: relative;
  color: #fff;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 1rem;
}

.contact-panel > p:not(.eyebrow) {
  position: relative;
  max-width: 18rem;
}

.contact-phone {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 2rem;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.contact-phone span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gold-light);
  color: var(--black);
}

.contact-phone svg {
  width: 22px;
  height: 22px;
}

.form-card {
  padding: 2rem;
}

.form-card h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-card > p {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.enquiry {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.4rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.enquiry input,
.enquiry select,
.enquiry textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 0.95rem;
}

.enquiry select {
  appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b6257' stroke-width='1.5'/%3E%3C/svg%3E") right 1rem center no-repeat;
}

.enquiry select:invalid {
  color: #8b8378;
}

.enquiry input::placeholder,
.enquiry textarea::placeholder {
  color: #8b8378;
}

.enquiry input:focus,
.enquiry select:focus,
.enquiry textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 84, 0.2);
}

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

.submit {
  padding: 0.9rem;
  border: 0;
  border-radius: 10px;
  background: var(--black);
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.submit:hover {
  background: var(--navy);
}

.form-status {
  min-height: 1.3em;
  color: var(--gold-deep);
  font-size: 0.9rem;
}

/* Footer */

.site-footer {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% -10%, rgba(201, 162, 84, 0.14), transparent 45%),
    linear-gradient(180deg, var(--green-soft) 0%, var(--black) 60%);
  color: rgba(255, 255, 255, 0.72);
  padding: 3.5rem 0 1.6rem;
  border-top: 3px solid var(--gold);
}

.footer-pattern {
  position: absolute;
  inset: 0;
  background: var(--tile-light) 0 0 / 72px;
  opacity: 0.05;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse at 100% 0%, #000 0%, transparent 60%);
  mask-image: radial-gradient(ellipse at 100% 0%, #000 0%, transparent 60%);
}

.footer-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 2.5rem;
  align-items: start;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.footer-logo img {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.footer-pre {
  display: block;
  color: var(--gold-light);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-brand {
  display: block;
  color: #fff;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-transform: uppercase;
}

.footer-urdu {
  direction: rtl;
  width: fit-content;
  margin-top: 1rem;
  color: var(--gold-light);
  font-family: var(--urdu);
  font-size: 1.3rem;
  line-height: 2;
}

.footer-tag {
  margin-top: 0.4rem;
  max-width: 30ch;
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-social {
  display: flex;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

.footer-social a {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(236, 217, 171, 0.3);
  border-radius: 50%;
  color: var(--gold-light);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.footer-social a svg {
  width: 18px;
  height: 18px;
}

.footer-social a:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--green);
  transform: translateY(-2px);
}

.footer-head {
  margin-bottom: 1.1rem;
  color: #fff;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-head::after {
  content: "";
  display: block;
  width: 26px;
  height: 2px;
  margin-top: 0.5rem;
  background: var(--gold);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer-nav a {
  width: fit-content;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s ease, padding-inline-start 0.2s ease;
}

.footer-nav a:hover {
  color: var(--gold-light);
  padding-inline-start: 0.3rem;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-contact li {
  display: flex;
  gap: 0.7rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-contact svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
  color: var(--gold);
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.footer-base {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  margin-top: 2.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
}

.footer-credit {
  color: rgba(255, 255, 255, 0.6);
}

.footer-credit a {
  color: var(--gold-light);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-credit a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-base a {
  text-decoration: none;
}

.mobile-dock {
  display: none;
}

/* Section backgrounds */

:root {
  --tile-gold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23c9a254' stroke-width='1'%3E%3Crect x='24.4' y='24.4' width='31.2' height='31.2'/%3E%3Crect x='24.4' y='24.4' width='31.2' height='31.2' transform='rotate(45 40 40)'/%3E%3Ccircle cx='40' cy='40' r='7'/%3E%3Cpath d='M0 0l24.4 24.4M80 0L55.6 24.4M0 80l24.4-24.4M80 80L55.6 55.6M40 0v18M40 80V62M0 40h18M80 40H62'/%3E%3C/g%3E%3C/svg%3E");
  --tile-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23ecd9ab' stroke-width='1'%3E%3Crect x='24.4' y='24.4' width='31.2' height='31.2'/%3E%3Crect x='24.4' y='24.4' width='31.2' height='31.2' transform='rotate(45 40 40)'/%3E%3Ccircle cx='40' cy='40' r='7'/%3E%3Cpath d='M0 0l24.4 24.4M80 0L55.6 24.4M0 80l24.4-24.4M80 80L55.6 55.6M40 0v18M40 80V62M0 40h18M80 40H62'/%3E%3C/g%3E%3C/svg%3E");
  --dots: radial-gradient(rgba(201, 162, 84, 0.45) 1px, transparent 1.6px);
}

section,
.strip,
.site-footer,
.contact-panel,
.teacher-card {
  position: relative;
  isolation: isolate;
}

.strip::before,
.approach::before,
.courses::before,
.courses::after,
.classes::before,
.classes::after,
.teacher-card::before,
.contact::before,
.contact-panel::before,
.site-footer::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.strip::before {
  inset: 0;
  background: var(--tile-light) center / 64px;
  opacity: 0.07;
}

.approach::before {
  left: 0;
  bottom: 0;
  width: 420px;
  height: 420px;
  background: var(--tile-gold) 0 0 / 80px;
  opacity: 0.28;
  -webkit-mask-image: radial-gradient(circle at 0 100%, #000 0%, transparent 70%);
  mask-image: radial-gradient(circle at 0 100%, #000 0%, transparent 70%);
}

.courses::before {
  top: 0;
  right: 0;
  width: 560px;
  height: 100%;
  background: var(--tile-gold) 0 0 / 80px;
  opacity: 0.35;
  -webkit-mask-image: radial-gradient(ellipse at 100% 0%, #000 0%, transparent 65%);
  mask-image: radial-gradient(ellipse at 100% 0%, #000 0%, transparent 65%);
}

.courses::after {
  left: 50%;
  top: 0;
  width: 200px;
  height: 16px;
  transform: translate(-50%, -50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='16' viewBox='0 0 200 16'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23c9a254' stop-opacity='0'/%3E%3Cstop offset='.5' stop-color='%23c9a254'/%3E%3Cstop offset='1' stop-color='%23c9a254' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 8h84M116 8h84' stroke='url(%23g)'/%3E%3Cpath d='M100 1l7 7-7 7-7-7z' fill='%23c9a254'/%3E%3Ccircle cx='88' cy='8' r='1.6' fill='%23c9a254'/%3E%3Ccircle cx='112' cy='8' r='1.6' fill='%23c9a254'/%3E%3C/svg%3E") center / contain no-repeat;
}

.classes::before {
  top: 0;
  left: 0;
  width: 55%;
  height: 100%;
  background: var(--dots) 0 0 / 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at 0% 20%, #000 0%, transparent 60%);
  mask-image: radial-gradient(ellipse at 0% 20%, #000 0%, transparent 60%);
}

.classes::after {
  top: 50%;
  right: 4%;
  width: 520px;
  height: 520px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236, 217, 171, 0.55) 0%, rgba(236, 217, 171, 0) 65%);
}

.teacher-card {
  overflow: hidden;
  border-inline-start: 3px solid var(--gold);
}

.teacher-card::before {
  top: 0;
  right: 0;
  width: 320px;
  height: 100%;
  background: var(--tile-gold) 0 0 / 64px;
  opacity: 0.3;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000);
  mask-image: linear-gradient(90deg, transparent, #000);
}

.contact::before {
  left: 0;
  right: 0;
  bottom: 0;
  height: 70%;
  background:
    linear-gradient(180deg, var(--paper), rgba(247, 250, 248, 0)),
    var(--dots) 0 0 / 22px 22px;
  opacity: 0.6;
  -webkit-mask-image: radial-gradient(ellipse at 50% 100%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 100%, #000 0%, transparent 70%);
}

.contact-panel::before {
  top: 0;
  right: 0;
  width: 300px;
  height: 260px;
  background: var(--tile-light) 0 0 / 64px;
  opacity: 0.12;
  -webkit-mask-image: radial-gradient(circle at 100% 0%, #000 0%, transparent 70%);
  mask-image: radial-gradient(circle at 100% 0%, #000 0%, transparent 70%);
}

.site-footer::before {
  top: 0;
  right: 0;
  width: 480px;
  height: 100%;
  background: var(--tile-light) 0 0 / 64px;
  opacity: 0.06;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000);
  mask-image: linear-gradient(90deg, transparent, #000);
}

/* Responsive */

@media (max-width: 1040px) {
  .nav {
    gap: 1.3rem;
  }

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

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .header-call {
    display: none;
  }

  .lang-toggle {
    margin-inline-start: auto;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.5rem 1rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }

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

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

  .nav a::after {
    display: none;
  }

  .hero {
    padding: 2.5rem 0 0;
  }

  .hero-media {
    position: relative;
    inset: auto;
    order: 2;
    height: 360px;
    margin-top: -120px;
  }

  .hero-media::before {
    background: linear-gradient(180deg, var(--paper) 0%, rgba(247, 250, 248, 0) 45%);
  }

  .hero {
    display: flex;
    flex-direction: column;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 2.5rem;
  }

  .hero-emblem {
    justify-self: center;
    width: min(62%, 260px);
    z-index: 1;
  }

  .strip-grid,
  .cards-3,
  .cards-2,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .strip-item + .strip-item {
    border-inline-start: 0;
    border-top: 1px solid rgba(236, 217, 171, 0.2);
  }

  .approach-media {
    width: 100%;
    height: 280px;
    opacity: 0.35;
  }

  .courses::before,
  .approach::before {
    width: 260px;
    height: 260px;
    opacity: 0.22;
  }

  .classes::after {
    width: 320px;
    height: 320px;
  }

  .teacher-card::before {
    width: 180px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-about {
    grid-column: 1 / -1;
  }

  .footer-base {
    flex-direction: column;
    align-items: flex-start;
  }

  .mobile-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--black);
  }

  .mobile-dock a {
    display: grid;
    place-items: center;
    min-height: 56px;
    color: #fff;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-decoration: none;
    text-transform: uppercase;
  }

  .mobile-dock a + a {
    background: #1faa53;
  }

  body {
    padding-bottom: 56px;
  }
}

@media (max-width: 560px) {
  .wrap {
    width: calc(100% - 2.25rem);
  }

  section {
    padding: 4rem 0;
  }

  .cta {
    flex: 1 1 100%;
    min-width: 0;
    justify-content: center;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 11vw, 3.4rem);
  }

  .mode-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .teacher-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.6rem;
  }

  .contact-panel,
  .form-card {
    padding: 1.8rem 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .site-footer {
    padding-bottom: 5.5rem;
  }
}

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

  .cta,
  .nav a::after {
    transition: none;
  }
}

/* Language switch */

.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  height: 42px;
  padding: 0 0.9rem;
  border: 1px solid rgba(201, 162, 84, 0.5);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.lang-toggle:hover {
  background: #eef5f0;
  border-color: var(--gold);
}

.lang-ur {
  font-family: var(--urdu);
  font-size: 1rem;
  line-height: 1;
  padding-bottom: 0.2rem;
}

.lang-en {
  display: none;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
}

html[lang="ur"] .lang-ur {
  display: none;
}

html[lang="ur"] .lang-en {
  display: inline;
}

@media (max-width: 900px) {
  .header-bar {
    gap: 0.6rem;
  }
}

/* Urdu (right-to-left) */

html[lang="ur"] body {
  font-family: var(--urdu);
  line-height: 2.1;
}

html[lang="ur"] *:not([lang="en"]):not([lang="en"] *) {
  letter-spacing: 0;
}

html[lang="ur"] :is(h1, h2, h3, .footer-brand, .eyebrow, .form-card h3, .mobile-dock a) {
  font-family: var(--urdu);
  font-weight: 600;
  text-transform: none;
}

html[lang="ur"] bdi[dir="ltr"],
html[lang="ur"] .footer-urdu {
  font-family: var(--sans);
}

html[lang="ur"] .footer-urdu {
  direction: ltr;
  color: var(--gold-light);
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html[lang="ur"] .nav a {
  font-size: 0.95rem;
}

html[lang="ur"] .eyebrow {
  font-size: 0.85rem;
}

html[lang="ur"] .hero h1 {
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1.9;
}

html[lang="ur"] .hero-urdu {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
}

html[lang="ur"] .hero-text,
html[lang="ur"] .section-head p:last-child {
  line-height: 2.2;
}

html[lang="ur"] .section-head h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  line-height: 1.8;
}

html[lang="ur"] h3,
html[lang="ur"] .teacher-card h2 {
  line-height: 1.9;
}

html[lang="ur"] .contact-panel h2 {
  line-height: 1.8;
}

html[lang="ur"] .cta {
  line-height: 1.6;
}

html[lang="ur"] .cta small {
  font-size: 0.8rem;
}

html[lang="ur"] .strip-item strong {
  font-size: 0.95rem;
}

html[lang="ur"] .mobile-dock a {
  font-size: 0.95rem;
}

html[dir="rtl"] .skip {
  left: auto;
  right: 1rem;
}

html[dir="rtl"] .hero-media,
html[dir="rtl"] .approach-media {
  transform: scaleX(-1);
}

html[dir="rtl"] .approach-media {
  right: auto;
  left: 0;
}

html[dir="rtl"] .approach::before {
  left: auto;
  right: 0;
  -webkit-mask-image: radial-gradient(circle at 100% 100%, #000 0%, transparent 70%);
  mask-image: radial-gradient(circle at 100% 100%, #000 0%, transparent 70%);
}

html[dir="rtl"] .courses::before {
  right: auto;
  left: 0;
  -webkit-mask-image: radial-gradient(ellipse at 0% 0%, #000 0%, transparent 65%);
  mask-image: radial-gradient(ellipse at 0% 0%, #000 0%, transparent 65%);
}

html[dir="rtl"] .classes::before {
  left: auto;
  right: 0;
  -webkit-mask-image: radial-gradient(ellipse at 100% 20%, #000 0%, transparent 60%);
  mask-image: radial-gradient(ellipse at 100% 20%, #000 0%, transparent 60%);
}

html[dir="rtl"] .classes::after {
  right: auto;
  left: 4%;
}

html[dir="rtl"] .map-link {
  left: auto;
  right: 1rem;
}

html[dir="rtl"] .teacher-card::before,
html[dir="rtl"] .site-footer::before {
  right: auto;
  left: 0;
  -webkit-mask-image: linear-gradient(270deg, transparent, #000);
  mask-image: linear-gradient(270deg, transparent, #000);
}

html[dir="rtl"] .contact-mosque {
  right: auto;
  left: -10px;
}

html[dir="rtl"] .contact-panel::before {
  right: auto;
  left: 0;
  -webkit-mask-image: radial-gradient(circle at 0% 0%, #000 0%, transparent 70%);
  mask-image: radial-gradient(circle at 0% 0%, #000 0%, transparent 70%);
}

html[dir="rtl"] .enquiry select {
  background-position: left 1rem center;
}

@media (min-width: 901px) {
  html[dir="rtl"] .hero-media {
    inset: 0 38% 0 0;
  }
}

/* ---------- Motion: scroll reveals & micro-interactions ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* staggered children */
[data-reveal-group] > * {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal-group].is-visible > * {
  opacity: 1;
  transform: none;
}

[data-reveal-group].is-visible > *:nth-child(2) {
  transition-delay: 0.1s;
}
[data-reveal-group].is-visible > *:nth-child(3) {
  transition-delay: 0.2s;
}
[data-reveal-group].is-visible > *:nth-child(4) {
  transition-delay: 0.3s;
}

/* hero intro on load */
.hero-copy > * {
  opacity: 0;
  transform: translateY(22px);
  animation: heroIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.15s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.25s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.35s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.45s; }
.hero-copy > *:nth-child(6) { animation-delay: 0.55s; }

.hero-emblem {
  opacity: 0;
  transform: scale(0.92);
  animation: emblemIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

@keyframes heroIn {
  to { opacity: 1; transform: none; }
}

@keyframes emblemIn {
  to { opacity: 1; transform: none; }
}

/* gentle float on the hero emblem after it appears */
.hero-emblem img {
  animation: floaty 6s ease-in-out 1.3s infinite;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* card & tile hover lift */
.card,
.course,
.mode,
.teacher-card {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover,
.course:hover,
.mode:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(9, 53, 39, 0.14);
}

.card:hover .card-icon,
.strip-item:hover svg {
  transform: scale(1.08) rotate(-3deg);
}

.card-icon,
.strip-item svg {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.strip-item {
  transition: background 0.3s ease;
}

/* CTA + button polish */
.cta {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease, background 0.25s ease;
}

.cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(9, 53, 39, 0.2);
}

.cta:active {
  transform: translateY(-1px);
}

.submit {
  transition: transform 0.2s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 33, 75, 0.3);
}

.submit:active {
  transform: translateY(0);
}

/* header shrink on scroll */
.site-header {
  transition: height 0.3s ease, background 0.3s ease,
    border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-stuck {
  height: 64px;
}

/* link underline grow already exists; add contact phone + directions hover */
.contact-phone,
.map-link,
.header-call {
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.contact-phone:hover,
.header-call:hover {
  transform: translateY(-2px);
}

/* respect reduced motion for everything above */
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-reveal-group] > *,
  .hero-copy > *,
  .hero-emblem,
  .hero-emblem img {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }

  .card,
  .course,
  .mode,
  .cta,
  .submit,
  .card-icon,
  .strip-item svg {
    transition: none;
  }

  .card:hover,
  .course:hover,
  .mode:hover,
  .cta:hover,
  .submit:hover {
    transform: none;
  }
}
