/* Noorie Education Foundation + Ayah Academy: one stylesheet for both sites and the forms.
   Minimal, light, optimistic. Solid colours only. Motion is gentle and stops with reduced motion. */

/* ---------- Fonts (self-hosted) ---------- */
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
/* Urdu: Noori Nastaleeq when the visitor's device has it (common on Pakistani computers), else Mehr Nastaliq. */
@font-face { font-family: "Mehr Nastaliq Web"; src: url("../fonts/mehr-nastaliq-web.woff2") format("woff2"); font-weight: 400; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --bg: #FBFAF6;
  --surface: #FFFFFF;
  --tint: #F3F1EA;
  --green-wash: #E8F0EA;
  --ink: #14211B;
  --ink-2: #3F4C45;
  --ink-3: #5E6A63;
  --line: #E4E1D7;
  --line-2: #CFCBBE;
  --brand: #0F5A43;
  --brand-ink: #0A4232;
  --brand-soft: #2E7A60;
  --sun: #E3A13B;
  --sun-wash: #FBF0DA;
  --sun-ink: #7D5210;
  --deep: #0E2A20;
  --on-deep: #F4F2EA;
  --on-deep-2: #B9C8BF;
  --danger: #A2332B;
  --danger-wash: #FBECEA;
  --ok: #1D6A44;
  --ok-wash: #E6F2EA;

  --serif: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --urdu: "Jameel Noori Nastaleeq", "Noori Nastaleeq", "Mehr Nastaliq Web", "Noto Nastaliq Urdu", serif;

  --radius: 10px;
  --radius-lg: 18px;
  --wrap: 1180px;
  --gutter: clamp(18px, 4vw, 40px);
  --section: clamp(72px, 11vw, 140px);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --shadow: 0 1px 2px rgba(20, 33, 27, .05), 0 10px 30px rgba(20, 33, 27, .07);
  --header-h: 72px;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.12; letter-spacing: -.015em; color: var(--ink); }
h3 { font-size: 1.35rem; line-height: 1.25; }
strong { font-weight: 700; }
ul, ol { padding-inline-start: 1.2em; margin: 0 0 1em; }
::selection { background: var(--sun-wash); color: var(--ink); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius); text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: 780px; }
.section { padding-block: var(--section); }
.section-tight { padding-block: clamp(48px, 7vw, 88px); }
.tint { background: var(--tint); }
.green { background: var(--green-wash); }
.stack > * + * { margin-top: 1rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  margin: 0 0 1.1rem;
  font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: var(--sun); flex: none; }
.display { font-size: clamp(2.9rem, 8.2vw, 6.2rem); line-height: 1.02; letter-spacing: -.03em; font-weight: 400; }
.h1 { font-size: clamp(2.4rem, 5.6vw, 4.2rem); line-height: 1.06; letter-spacing: -.025em; }
.h2 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); line-height: 1.1; letter-spacing: -.02em; }
.h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); line-height: 1.25; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.6; color: var(--ink-2); max-width: 40em; }
.muted { color: var(--ink-3); }
.small { font-size: .9rem; }
em.accent, .accent { font-style: italic; color: var(--brand); }

/* ---------- Buttons and links ---------- */
.btn {
  --b: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 50px; padding: 12px 22px;
  border: 1.5px solid var(--b); border-radius: var(--radius);
  background: var(--b); color: #fff;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { --b: var(--brand-ink); }
.btn:active { transform: translateY(1px); }
.btn .arrow { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.btn:hover .arrow, .link-arrow:hover .arrow, .card-link:hover .arrow { transform: translateX(4px); }
[dir="rtl"] .arrow { transform: scaleX(-1); }
[dir="rtl"] .btn:hover .arrow, [dir="rtl"] .link-arrow:hover .arrow, [dir="rtl"] .card-link:hover .arrow { transform: scaleX(-1) translateX(4px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn-light { background: var(--on-deep); color: var(--deep); border-color: var(--on-deep); }
.btn-light:hover { background: #fff; border-color: #fff; color: var(--deep); }
.btn-small { min-height: 40px; padding: 8px 14px; font-size: .92rem; }
.btn[disabled], .btn.is-busy { opacity: .6; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.link-arrow { display: inline-flex; align-items: center; gap: .45em; font-weight: 600; color: var(--brand); text-decoration: none; }
.link-arrow .arrow { width: 18px; height: 18px; transition: transform .3s var(--ease); }
/* Links: a thin line draws in under the word on hover */
.prose a { color: var(--brand); text-decoration-color: rgba(15, 90, 67, .35); transition: text-decoration-color .25s var(--ease); }
.prose a:hover { text-decoration-color: currentColor; }
.footer a, .nav a { position: relative; text-decoration: none; transition: color .2s var(--ease); }
.footer a::after, .nav a::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left center; transition: transform .35s var(--ease);
}
[dir="rtl"] .footer a::after, [dir="rtl"] .nav a::after { transform-origin: right center; }
.footer a:hover::after, .nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 246, .88);
  -webkit-backdrop-filter: saturate(140%) blur(10px); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
  view-transition-name: site-header;
}
.header.is-scrolled { border-bottom-color: var(--line); background: rgba(251, 250, 246, .96); }
.header-in { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex: none; }
.brand-mark { width: 34px; height: 40px; flex: none; }
.brand-text { display: grid; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-size: 1.32rem; font-weight: 500; letter-spacing: -.01em; }
.brand-sub { font-size: .66rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-top: 3px; }
.nav { margin-inline-start: auto; }
.nav ul { list-style: none; display: flex; gap: clamp(14px, 2.2vw, 30px); margin: 0; padding: 0; }
.nav a { font-weight: 600; font-size: .96rem; color: var(--ink-2); padding-block: 6px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.header-tools { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; min-width: 56px; font-weight: 700; font-size: .95rem; line-height: 1; text-decoration: none; color: var(--ink); padding: 0 12px; border-radius: var(--radius); border: 1px solid var(--line-2); transition: border-color .2s var(--ease); }
.lang-switch:hover { border-color: var(--ink); }
.lang-switch[lang="ur"] { font-family: var(--urdu); font-weight: 400; font-size: 1.3rem; padding-top: 4px; }
.lang-switch[lang="en"] { font-family: var(--sans); }
.menu-btn { display: none; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: var(--radius); border: 1px solid var(--line-2); background: transparent; color: var(--ink); cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; }

@media (max-width: 960px) {
  .nav, .header-tools .btn { display: none; }
  .menu-btn { display: inline-flex; }
  .header-tools { margin-inline-start: auto; }
}

/* Mobile menu sheet */
.sheet { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column; padding: 0 var(--gutter) 32px; overflow-y: auto; }
.sheet[hidden] { display: none; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); }
.sheet nav ul { list-style: none; margin: 24px 0 0; padding: 0; }
.sheet nav li { border-bottom: 1px solid var(--line); }
.sheet nav a { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; text-decoration: none; font-family: var(--serif); font-size: 1.9rem; color: var(--ink); }
.sheet nav a .arrow { width: 22px; height: 22px; color: var(--brand); }
.sheet-foot { margin-top: auto; padding-top: 32px; display: grid; gap: 12px; }
html.js .sheet.is-open nav li { animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(56px, 9vw, 120px) clamp(64px, 10vw, 128px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { margin-bottom: 1.6rem; }
.hero .lead { margin-bottom: 2.2rem; }
.hero-note { margin-top: 2rem; display: flex; align-items: center; gap: 10px; font-size: .92rem; color: var(--ink-3); }
.hero-note svg { width: 18px; height: 18px; color: var(--brand); flex: none; }
.light { position: relative; width: min(100%, 460px); aspect-ratio: 1; margin-inline: auto; }
.light svg { width: 100%; height: 100%; overflow: visible; }
.light .sun { fill: var(--sun); }
.light .sun-wash { fill: var(--sun-wash); }
.light .ring { fill: none; stroke: var(--brand); stroke-width: 1; opacity: .28; }
.light .ring-2 { opacity: .16; }
.light .rays line { stroke: var(--sun); stroke-width: 1.4; stroke-linecap: round; }
.light .dot { fill: var(--brand); }
.light .rays { transform-origin: 50% 50%; transform-box: view-box; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .light { width: 220px; margin-inline: 0; }
}

/* Words of the headline rise in one after another */
.words .w { display: inline-block; }
html.js .words .w { animation: rise .9s var(--ease) both; animation-delay: calc(120ms + var(--i, 0) * 90ms); }

/* ---------- Page head (inner pages) ---------- */
.page-head { padding-block: clamp(48px, 8vw, 104px) clamp(32px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.page-head .lead { margin-top: 1.4rem; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0 0 1.4rem; font-size: .88rem; color: var(--ink-3); }
.crumbs li + li::before { content: "/"; margin-inline-end: 8px; color: var(--line-2); }
.crumbs a { text-decoration: none; color: var(--ink-3); }
.crumbs a:hover { color: var(--ink); }

/* ---------- Sections and grids ---------- */
.section-head { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head .lead { margin-top: 1rem; }
@media (max-width: 720px) { .section-head { grid-template-columns: 1fr; } }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3vw, 36px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 32px); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Pillar cards: quiet, a line on top, the whole card is a link */
.card {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 28px 26px 26px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: border-color .3s var(--ease), transform .4s var(--ease), box-shadow .4s var(--ease);
}
.card:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { font-size: 1.45rem; }
.card p { color: var(--ink-2); margin: 0; }
.card .card-link { margin-top: auto; padding-top: 8px; }
.card-link { display: inline-flex; align-items: center; gap: .45em; font-weight: 600; color: var(--brand); text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-link .arrow { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.icon-badge { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--green-wash); color: var(--brand); }
.icon-badge svg { width: 26px; height: 26px; }
.icon-badge.sun { background: var(--sun-wash); color: var(--sun-ink); }

/* Statement band */
.statement { font-family: var(--serif); font-size: clamp(1.7rem, 3.6vw, 2.8rem); line-height: 1.25; letter-spacing: -.015em; max-width: 24em; }
.statement .accent { font-style: italic; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: clamp(32px, 5vw, 56px); border-top: 1px solid var(--line-2); }
.facts > div { padding: 22px 24px 0 0; }
[dir="rtl"] .facts > div { padding: 22px 0 0 24px; }
.facts h3 { font-family: var(--sans); font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.facts p { color: var(--ink-2); margin: 0; font-size: .98rem; }
@media (max-width: 720px) { .facts { grid-template-columns: 1fr; } }

/* Two doors */
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.door { position: relative; display: flex; flex-direction: column; gap: 14px; padding: clamp(28px, 4vw, 48px); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); min-height: 300px; transition: transform .4s var(--ease), box-shadow .4s var(--ease); overflow: hidden; }
.door:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.door.is-deep { background: var(--deep); border-color: var(--deep); color: var(--on-deep); }
.door.is-deep h3, .door.is-deep .card-link { color: var(--on-deep); }
.door.is-deep p { color: var(--on-deep-2); }
.door h3 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.door p { color: var(--ink-2); max-width: 30em; margin: 0; }
.door .card-link { margin-top: auto; }
.door-tag { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }
.door.is-deep .door-tag { color: var(--sun); }
@media (max-width: 760px) { .doors { grid-template-columns: 1fr; } .door { min-height: 0; } }

/* Lists of programmes: rows */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row { position: relative; display: grid; grid-template-columns: 1.1fr 1fr auto; gap: 8px 28px; align-items: center; padding: 22px 4px; border-bottom: 1px solid var(--line); transition: background-color .3s var(--ease), padding .3s var(--ease); }
.row:hover { background: var(--surface); padding-inline: 14px; }
.row h3 { font-size: 1.3rem; }
.row .meta { color: var(--ink-3); font-size: .95rem; }
.row .card-link { justify-self: end; }
@media (max-width: 760px) { .row { grid-template-columns: 1fr; } .row .card-link { justify-self: start; } }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 6px; background: var(--tint); color: var(--ink-2); font-size: .82rem; font-weight: 600; }
.tag.green { background: var(--green-wash); color: var(--brand-ink); }
.tag.sun { background: var(--sun-wash); color: var(--sun-ink); }

.cat-block + .cat-block { margin-top: clamp(56px, 8vw, 96px); }
.cat-head { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; margin-bottom: 24px; }
.cat-head p { color: var(--ink-2); margin: 6px 0 0; max-width: 46em; }

/* Steps (welfare: how it works) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: s; }
.steps li { position: relative; padding: 28px 24px 0 0; border-top: 1px solid var(--line-2); counter-increment: s; }
[dir="rtl"] .steps li { padding: 28px 0 0 24px; }
.steps li::before { content: counter(s, decimal-leading-zero); display: block; font-family: var(--serif); font-size: 1.1rem; color: var(--brand); margin-bottom: 14px; }
.steps li::after { content: ""; position: absolute; top: -5px; inset-inline-start: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--sun); }
.steps h3 { font-family: var(--sans); font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.steps p { color: var(--ink-2); font-size: .98rem; margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; row-gap: 32px; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checklist li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.checklist svg { width: 22px; height: 22px; color: var(--brand); margin-top: 3px; }

/* Notes */
.note { display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding: 16px 18px; border-radius: var(--radius); background: var(--sun-wash); color: var(--ink); font-size: .97rem; }
.note svg { width: 22px; height: 22px; color: var(--sun-ink); margin-top: 2px; }
.note.green { background: var(--green-wash); }
.note.green svg { color: var(--brand); }
.note p:last-child { margin: 0; }

/* People, principles */
.person { display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: start; }
.initials { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--green-wash); color: var(--brand); font-family: var(--serif); font-size: 1.2rem; }
.person h3 { font-size: 1.35rem; }
.person .role { color: var(--brand); font-weight: 700; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin: 4px 0 10px; }
.person p { color: var(--ink-2); margin: 0; }

/* Campus cards */
.campus { padding: 28px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 10px; }
.campus h3 { font-size: 1.5rem; }
.campus address { font-style: normal; color: var(--ink-2); }

/* Contact list */
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.contact-list li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: center; }
.contact-list svg { width: 22px; height: 22px; color: var(--brand); }
.contact-list .label { display: block; font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.contact-list a { font-size: 1.15rem; font-weight: 600; text-decoration: none; }
.contact-list a:hover { color: var(--brand); }

/* Gallery placeholders */
.album { border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.album-cover { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--tint); color: var(--brand); }
.album-cover svg { width: 44px; height: 44px; opacity: .8; }
.album-body { padding: 18px 20px 20px; }
.album-body h3 { font-size: 1.2rem; margin-bottom: 4px; }
.album-body p { margin: 0; color: var(--ink-3); font-size: .93rem; }

/* Prose (privacy, terms, programme pages) */
.prose { max-width: 46em; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin: 2.2em 0 .7em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); }
.prose li { margin-bottom: .5em; }

/* Programme detail */
.detail { display: grid; grid-template-columns: 1fr 340px; gap: clamp(32px, 6vw, 80px); align-items: start; }
.aside { position: sticky; top: calc(var(--header-h) + 24px); padding: 26px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 16px; }
.aside dl { margin: 0; display: grid; gap: 14px; }
.aside dt { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.aside dd { margin: 2px 0 0; font-weight: 600; }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } .aside { position: static; } }

/* CTA band */
.cta { background: var(--deep); color: var(--on-deep); border-radius: var(--radius-lg); padding: clamp(36px, 6vw, 72px); display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; }
.cta h2 { color: var(--on-deep); }
.cta p { color: var(--on-deep-2); margin: 12px 0 0; max-width: 36em; }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { margin-top: var(--section); background: var(--deep); color: var(--on-deep); padding-block: clamp(56px, 8vw, 96px) 28px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
.footer .motto { font-family: var(--serif); font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.1; color: var(--on-deep); margin-bottom: 18px; }
.footer p { color: var(--on-deep-2); }
.footer h2 { font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sun); margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer a { color: var(--on-deep); }
.footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .14); display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: .88rem; color: var(--on-deep-2); }
.footer-bottom ul { display: flex; gap: 20px; }
@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-top > :first-child { grid-column: 1 / -1; } }

/* ---------- Forms ---------- */
.form-shell { display: grid; grid-template-columns: 280px 1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 900px) { .form-shell { grid-template-columns: 1fr; } }
.progress { position: sticky; top: calc(var(--header-h) + 24px); }
.progress ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.progress li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: center; padding: 10px 0; color: var(--ink-3); font-weight: 600; }
.progress .num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-2); font-size: .85rem; background: var(--bg); transition: all .3s var(--ease); }
.progress li.is-current { color: var(--ink); }
.progress li.is-current .num { border-color: var(--brand); color: var(--brand); }
.progress li.is-done .num { background: var(--brand); border-color: var(--brand); color: #fff; }
.progress-bar { display: none; height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; margin-bottom: 18px; }
.progress-bar span { display: block; height: 100%; width: 25%; background: var(--brand); transition: width .45s var(--ease); }
.progress .hint { margin-top: 18px; font-size: .9rem; color: var(--ink-3); }
.progress [data-step-label] { display: none; }
@media (max-width: 900px) {
  .progress [data-step-label] { display: block; margin: 0; }
  .progress { position: static; }
  .progress ol { display: none; }
  html.js .progress-bar { display: block; }
  .progress .hint { display: none; }
}

.form { display: grid; gap: 22px; }
.fieldset { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: clamp(22px, 4vw, 36px); margin: 0; min-width: 0; }
.fieldset legend { padding: 0; float: left; width: 100%; margin-bottom: 6px; font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 1.9rem); line-height: 1.2; }
[dir="rtl"] .fieldset legend { float: right; }
.fieldset legend + * { clear: both; }
.fieldset .step-lead { clear: both; color: var(--ink-2); margin: 0 0 22px; }
html.js .form[data-steps] .fieldset[data-step]:not(.is-active) { display: none; }
html.js .form[data-steps] .fieldset[data-step].is-active { animation: rise .45s var(--ease) both; }

.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
.label { font-weight: 700; font-size: .98rem; }
.label .opt { font-weight: 500; color: var(--ink-3); font-size: .88rem; }
.help { font-size: .9rem; color: var(--ink-3); margin: -2px 0 0; }
.input, .select, .textarea {
  width: 100%; min-height: 52px; padding: 12px 14px;
  border: 1.5px solid var(--line-2); border-radius: var(--radius); background: #fff; color: var(--ink);
  font: 500 1.02rem/1.4 var(--sans);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.textarea { min-height: 130px; resize: vertical; line-height: 1.55; }
.select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F4C45' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 18px; background-position: right 14px center; padding-inline-end: 44px; }
[dir="rtl"] .select { background-position: left 14px center; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(15, 90, 67, .14); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.input.ltr { direction: ltr; text-align: start; }
[dir="rtl"] .input.ltr { text-align: right; }
.field-error { color: var(--danger); font-size: .9rem; font-weight: 600; margin: 0; display: flex; gap: 6px; align-items: center; }
.field-error::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

/* Choice tiles (checkboxes and radios) */
.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.choices.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .choices, .choices.three { grid-template-columns: 1fr; } }
.choice { position: relative; display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; padding: 16px; border: 1.5px solid var(--line-2); border-radius: var(--radius); background: #fff; cursor: pointer; transition: border-color .2s var(--ease), background-color .2s var(--ease); }
.choice:hover { border-color: var(--ink-3); }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice .box { width: 22px; height: 22px; border: 1.5px solid var(--line-2); border-radius: 6px; display: grid; place-items: center; margin-top: 2px; transition: all .2s var(--ease); background: #fff; }
.choice input[type="radio"] + .box { border-radius: 50%; }
.choice .box svg { width: 14px; height: 14px; color: #fff; opacity: 0; transform: scale(.6); transition: all .2s var(--ease); }
.choice input:checked + .box { background: var(--brand); border-color: var(--brand); }
.choice input:checked + .box svg { opacity: 1; transform: scale(1); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--green-wash); }
.choice input:focus-visible + .box { outline: 3px solid var(--sun); outline-offset: 2px; }
.choice .t { font-weight: 700; display: block; }
.choice .d { font-size: .9rem; color: var(--ink-3); display: block; margin-top: 2px; }

/* Children table */
.kids { display: grid; gap: 10px; }
.kid { display: grid; grid-template-columns: 34px 1fr 1fr; gap: 10px; align-items: center; }
.kid .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); font-weight: 700; font-size: .9rem; color: var(--ink-2); }
html.js .kid.is-hidden { display: none; }

/* File drop */
.drop { position: relative; display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: center; padding: 18px; border: 1.5px dashed var(--line-2); border-radius: var(--radius); background: var(--bg); cursor: pointer; transition: border-color .2s var(--ease), background-color .2s var(--ease); }
.drop:hover { border-color: var(--brand); background: var(--green-wash); }
.drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop .ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--green-wash); color: var(--brand); }
.drop .ic svg { width: 24px; height: 24px; }
.drop .t { font-weight: 700; display: block; }
.drop .d { display: block; font-size: .9rem; color: var(--ink-3); }
.drop.has-file { border-style: solid; border-color: var(--brand); background: var(--green-wash); }
.drop:focus-within { outline: 3px solid var(--sun); outline-offset: 2px; }
.drop[aria-invalid="true"] { border-color: var(--danger); }

.form-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 4px; }
.form-nav .spacer { flex: 1; }
html:not(.js) .form-nav [data-prev], html:not(.js) .form-nav [data-next] { display: none; }
.consent { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; font-size: .97rem; color: var(--ink-2); }
.consent input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--brand); }
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }

.errors-box { border: 1.5px solid var(--danger); background: var(--danger-wash); border-radius: var(--radius); padding: 16px 18px; }
.errors-box h2 { font-family: var(--sans); font-size: 1rem; font-weight: 700; color: var(--danger); margin-bottom: 6px; }
.errors-box ul { margin: 0; color: var(--ink); }

/* Result panels */
.done { text-align: center; padding: clamp(36px, 6vw, 72px) clamp(20px, 5vw, 56px); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.done .tick { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 22px; display: grid; place-items: center; background: var(--green-wash); color: var(--brand); }
.done .tick svg { width: 34px; height: 34px; }
html.js .done .tick { animation: pop .7s var(--ease) both .1s; }
.ref { display: inline-block; margin: 14px 0 6px; padding: 12px 22px; border-radius: var(--radius); background: var(--sun-wash); font: 700 clamp(1.5rem, 4vw, 2rem)/1.2 var(--sans); letter-spacing: .06em; color: var(--ink); direction: ltr; }
.status-card { border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); padding: clamp(24px, 4vw, 40px); }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 8px; font-weight: 700; background: var(--green-wash); color: var(--brand-ink); }
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-pill.s-declined { background: var(--tint); color: var(--ink-2); }
.timeline { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 0; }
.timeline li { position: relative; padding: 0 0 18px 26px; color: var(--ink-3); }
[dir="rtl"] .timeline li { padding: 0 26px 18px 0; }
.timeline li::before { content: ""; position: absolute; top: 8px; inset-inline-start: 0; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--bg); }
.timeline li::after { content: ""; position: absolute; top: 22px; bottom: -2px; inset-inline-start: 5px; width: 1px; background: var(--line-2); }
.timeline li:last-child::after { display: none; }
.timeline li.is-done { color: var(--ink); }
.timeline li.is-done::before { background: var(--brand); border-color: var(--brand); }
.timeline li.is-now { color: var(--ink); font-weight: 700; }
.timeline li.is-now::before { border-color: var(--sun); background: var(--sun); }

/* ---------- Urdu ---------- */
html[lang="ur"] body { font-family: var(--urdu); font-size: 1.3rem; line-height: 2.1; }
html[lang="ur"] .lead { font-size: clamp(1.35rem, 1.9vw, 1.55rem); line-height: 2; }
html[lang="ur"] .small, html[lang="ur"] .help, html[lang="ur"] .hero-note, html[lang="ur"] .meta, html[lang="ur"] .choice .d, html[lang="ur"] .drop .d, html[lang="ur"] .field-error { font-size: 1.08rem; line-height: 1.9; }
html[lang="ur"] .words { word-spacing: -.12em; }
html[lang="ur"] .nav a { font-size: 1.2rem; }
html[lang="ur"] .btn-small { font-size: 1.05rem; }
html[lang="ur"] .footer-bottom { font-size: 1rem; }
html[lang="ur"] h1, html[lang="ur"] h2, html[lang="ur"] h3, html[lang="ur"] h4,
html[lang="ur"] .statement, html[lang="ur"] .fieldset legend, html[lang="ur"] .footer .motto, html[lang="ur"] .brand-name,
html[lang="ur"] .sheet nav a, html[lang="ur"] .steps li::before {
  font-family: var(--urdu); font-weight: 400; letter-spacing: 0; line-height: 1.7;
}
html[lang="ur"] .display { line-height: 1.45; font-size: clamp(2.6rem, 7vw, 5rem); }
html[lang="ur"] .h1 { line-height: 1.55; }
html[lang="ur"] .h2 { line-height: 1.6; }
html[lang="ur"] .eyebrow, html[lang="ur"] .door-tag, html[lang="ur"] .person .role, html[lang="ur"] .aside dt,
html[lang="ur"] .contact-list .label, html[lang="ur"] .footer h2, html[lang="ur"] .brand-sub {
  letter-spacing: 0; text-transform: none; font-weight: 400; font-size: 1.08rem;
}
html[lang="ur"] .btn, html[lang="ur"] .input, html[lang="ur"] .select, html[lang="ur"] .textarea, html[lang="ur"] .label,
html[lang="ur"] .nav a, html[lang="ur"] .card-link, html[lang="ur"] .link-arrow, html[lang="ur"] .tag, html[lang="ur"] .choice .t {
  font-family: var(--urdu); font-weight: 400;
}
html[lang="ur"] .btn { padding-block: 14px 8px; line-height: 1.6; }
html[lang="ur"] .input, html[lang="ur"] .textarea { line-height: 1.9; }
html[lang="ur"] .accent { font-style: normal; }
.en { font-family: var(--sans); }
.num-ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { opacity: 0; transform: scale(.6); } 60% { opacity: 1; transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes turn { to { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }

html.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
[data-d="1"] { --d: 1; } [data-d="2"] { --d: 2; } [data-d="3"] { --d: 3; } [data-d="4"] { --d: 4; } [data-d="5"] { --d: 5; }
.words .w:nth-child(2) { --i: 1; } .words .w:nth-child(3) { --i: 2; } .words .w:nth-child(4) { --i: 3; } .words .w:nth-child(5) { --i: 4; }
.words .w:nth-child(6) { --i: 5; } .words .w:nth-child(7) { --i: 6; } .words .w:nth-child(8) { --i: 7; } .words .w:nth-child(n+9) { --i: 8; }
.sheet nav li:nth-child(2) { --i: 1; } .sheet nav li:nth-child(3) { --i: 2; } .sheet nav li:nth-child(4) { --i: 3; } .sheet nav li:nth-child(5) { --i: 4; } .sheet nav li:nth-child(n+6) { --i: 5; }
html.js [data-reveal].is-in { opacity: 1; transform: none; }
html.js .light .rays { animation: turn 90s linear infinite; }
html.js .light .glow { transform-origin: 50% 50%; transform-box: view-box; animation: breathe 7s ease-in-out infinite; }

/* Page-to-page transition (browsers that support it) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: fade .2s ease reverse both; }
::view-transition-new(root) { animation: rise .45s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  html.js [data-reveal] { opacity: 1; transform: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}

@media print {
  .header, .footer, .sheet, .btn, .form-nav { display: none !important; }
  body { background: #fff; }
}

/* Small additions */
.page-actions { margin-top: 2rem; }
.brand-mark .m-arch, .brand-mark .m-dot { fill: var(--brand); }
.brand-mark .m-star { fill: var(--sun); }
.footer .brand-mark .m-arch { fill: var(--on-deep); }
[lang="ur"] { font-family: var(--urdu); }
html[lang="en"] [lang="ur"] { line-height: 2.1; }
.center { justify-content: center; }
.need { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; padding: 22px 0; border-top: 1px solid var(--line); }
.need h3 { font-size: 1.25rem; margin-bottom: 4px; }
.need p { margin: 0; color: var(--ink-2); }
.row-text { grid-template-columns: 1fr 1.6fr; }
.row-text .meta { color: var(--ink-2); font-size: 1rem; margin: 0; }
@media (max-width: 760px) { .row-text { grid-template-columns: 1fr; } }
.path-list { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 0; }
.path-list li { border-top: 1px solid var(--line); }
.path-list a { position: relative; z-index: 1; display: block; padding: 10px 0; text-decoration: none; font-weight: 600; color: var(--ink-2); transition: color .2s, padding .3s var(--ease); }
.path-list a:hover { color: var(--brand); padding-inline-start: 6px; }
.path-card:hover { transform: none; }
.steps-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .steps-3 { grid-template-columns: 1fr; } }
.hero-note span { max-width: 36em; }
.done .lead { margin-inline: auto; }
.status-card .h2 { margin: 6px 0 10px; }
.status-card .note { margin: 18px 0 6px; }

.academy-h1 { font-size: clamp(2.5rem, 5.6vw, 4.6rem); line-height: 1.04; }
html[lang="ur"] .academy-h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); line-height: 1.6; }
@media (max-width: 520px) {
  .header-in { gap: 10px; }
  .brand { min-width: 0; flex: 0 1 auto; gap: 10px; }
  .brand-text { min-width: 0; }
  .brand-name { font-size: 1.18rem; }
  .brand-sub { letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .header-tools { gap: 8px; flex: none; }
  .lang-switch { min-width: 48px; padding: 0 10px; }
  .menu-btn { width: 44px; height: 44px; }
}

/* =================================================================
   Live timetable, departments, galleries and stories
   ================================================================= */
html:not(.js) .js-only { display: none !important; }
.c-quran { --c: #0F5A43; --cw: #E5F0E9; }
.c-skills { --c: #1F5876; --cw: #E3EEF4; }
.c-youth { --c: #8A5A0E; --cw: #FBEFD6; }
.c-care { --c: #993D3D; --cw: #F8E7E5; }

/* ---------- Home: full picture hero ---------- */
.hero-x { position: relative; isolation: isolate; overflow: hidden; background: var(--deep); color: var(--on-deep); padding-block: clamp(72px, 11vw, 150px) clamp(28px, 4vw, 48px); min-height: min(92svh, 900px); display: flex; flex-direction: column; justify-content: space-between; gap: clamp(36px, 6vw, 64px); }
.hero-x-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-x .eyebrow { color: var(--sun); }
.hero-x .eyebrow::before { background: var(--sun); }
.hero-x h1 { color: #fff; margin: 1.2rem 0 1.6rem; max-width: 9.5em; }
.hero-x .lead { color: var(--on-deep-2); max-width: 30em; margin-bottom: 2.2rem; }
.hero-x-in { position: relative; }
.hero-lattice { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-lattice g { stroke: #F4F2EA; opacity: .075; }
.hero-hills { position: absolute; inset-inline: 0; bottom: 0; width: 100%; height: 26%; }
.hill-back { fill: #12382A; }
.hill-front { fill: #0A2118; }
.hero-sun { position: absolute; top: 50%; inset-inline-end: -14vw; width: min(54vw, 760px); aspect-ratio: 1; transform: translateY(-50%); }
@media (min-width: 1500px) { .hero-sun { inset-inline-end: calc((100vw - var(--wrap)) / 2 - 260px); } }
.hero-sun svg { width: 100%; height: 100%; overflow: visible; }
.sun-glow circle { fill: var(--sun); }
.sun-glow .g1 { opacity: .05; } .sun-glow .g2 { opacity: .065; } .sun-glow .g3 { opacity: .09; }
.hero-sun .arch { fill: none; stroke: var(--sun); stroke-width: 1.6; opacity: .5; }
.hero-sun .arch-outer { stroke: #F4F2EA; opacity: .14; }
.hero-sun .ring-dash { fill: none; stroke: var(--sun); stroke-width: 1.4; stroke-dasharray: 2 11; opacity: .45; }
.sun-rays line { stroke: var(--sun); stroke-width: 2; stroke-linecap: round; opacity: .8; }
.sun-disc { fill: var(--sun); }
.sun-star rect { fill: none; stroke: var(--deep); stroke-width: 3; opacity: .32; }
.sun-star circle { fill: var(--deep); opacity: .4; }
.motes circle { fill: #FBE3B4; opacity: 0; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: rgba(9, 30, 22, .64); }
.hero-x.has-photo .hero-shade { background: rgba(9, 30, 22, .58); }
.btn-sun { background: var(--sun); border-color: var(--sun); color: #1E1503; }
.btn-sun:hover { background: #F0B455; border-color: #F0B455; color: #1E1503; }
.btn-outline-light { background: transparent; color: var(--on-deep); border-color: rgba(244, 242, 234, .45); }
.btn-outline-light:hover { background: rgba(244, 242, 234, .08); border-color: var(--on-deep); color: #fff; }
html.js .sun-rays { transform-origin: 400px 400px; animation: turn 140s linear infinite; }
html.js .sun-glow { transform-origin: 400px 400px; animation: breathe 9s ease-in-out infinite; }
html.js .hero-sun .ring-dash { transform-origin: 400px 400px; animation: turn 220s linear infinite reverse; }
html.js .motes circle { animation: mote 11s ease-in-out infinite; }
.motes circle:nth-child(2n) { animation-duration: 14s; animation-delay: -3s; }
.motes circle:nth-child(3n) { animation-duration: 17s; animation-delay: -7s; }
.motes circle:nth-child(5n) { animation-delay: -9s; }
@keyframes mote { 0% { opacity: 0; transform: translateY(18px); } 30% { opacity: .75; } 70% { opacity: .55; } 100% { opacity: 0; transform: translateY(-46px); } }
@media (max-width: 860px) {
  .hero-x { min-height: 0; padding-top: 0; }
  .hero-sun { position: relative; top: auto; inset-inline-end: auto; transform: none; width: 118vw; max-width: 560px; margin: -18vw auto -34vw; margin-inline-end: -30vw; }
  [dir="rtl"] .hero-sun { margin-inline-end: -30vw; }
  .hero-x-bg { position: absolute; }
  .hero-x .hero-x-bg .hero-sun { position: absolute; top: -14vw; inset-inline-end: -36vw; width: 112vw; margin: 0; }
  .hero-x-in { padding-top: clamp(220px, 62vw, 380px); }
  .hero-x.has-photo .hero-x-in { padding-top: clamp(150px, 46vw, 300px); }
  .hero-hills { height: 18%; }
  .hero-sun .arch { opacity: .28; }
}

/* ---------- Live panel ---------- */
.live { display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero-x .live { background: rgba(251, 250, 246, .97); border-color: transparent; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.live-clock { display: grid; align-content: center; gap: 2px; padding: 22px 24px; background: var(--deep); color: var(--on-deep); position: relative; }
.hero-x .live-clock { background: #0B241B; }
.live-h { font-family: var(--sans); font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sun); }
.live-time { font-family: var(--serif); font-size: clamp(1.7rem, 2.6vw, 2.1rem); line-height: 1.15; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.live-day { font-size: .9rem; color: var(--on-deep-2); }
.live-pulse { position: absolute; top: 20px; inset-inline-end: 20px; width: 10px; height: 10px; border-radius: 50%; background: #4ADE80; }
html.js .live-pulse { animation: ping 2.2s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .55); } 70% { box-shadow: 0 0 0 12px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
.live-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; }
.live-group { padding: 20px 24px; border-inline-start: 1px solid var(--line); min-width: 0; }
.live-group:first-child { border-inline-start: 0; }
.live-label { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.is-now .live-label { color: var(--ok); }
.dot, .dot-live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22A35A; flex: none; }
html.js .dot, html.js .dot-live { animation: ping 2.2s ease-out infinite; }
.live-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.live-list li { display: grid; gap: 1px; }
.live-list a, .live-list strong { font-weight: 700; color: var(--ink); text-decoration: none; }
.live-list a:hover { color: var(--brand); text-decoration: underline; }
.live-meta { font-size: .9rem; color: var(--ink-3); }
.live-quiet { margin: 0; color: var(--ink-2); font-weight: 600; }
.hero-live-light { margin-top: clamp(36px, 6vw, 64px); }
@media (max-width: 760px) {
  .live { grid-template-columns: 1fr; }
  .live-clock { padding: 16px 20px; grid-template-columns: auto 1fr; column-gap: 14px; align-items: baseline; }
  .live-h { grid-column: 1 / -1; }
  .live-group { padding: 16px 20px; border-inline-start: 0; border-top: 1px solid var(--line); }
  .live-group:first-child { border-top: 0; }
}
.status-live, .status-next, .status-date { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; font-weight: 700; padding: 4px 10px; border-radius: 6px; }
.status-live { background: var(--ok-wash); color: var(--ok); }
.status-next { background: var(--tint); color: var(--ink-2); }
.status-date { background: var(--sun-wash); color: var(--sun-ink); }
.card-status { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; }

/* ---------- Home doors ---------- */
.door-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 24px); }
.door-x { position: relative; display: flex; flex-direction: column; gap: 12px; min-height: 260px; padding: clamp(26px, 3.4vw, 40px); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s; }
.door-x:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.door-x h2 { font-size: clamp(1.45rem, 2.2vw, 1.8rem); }
.door-x p { margin: 0; color: var(--ink-2); }
.door-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--green-wash); color: var(--brand); margin-bottom: 6px; }
.door-ic svg { width: 26px; height: 26px; }
.door-go { margin-top: auto; padding-top: 10px; display: inline-flex; align-items: center; gap: .45em; font-weight: 700; color: var(--brand); }
.door-go .arrow { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.door-x:hover .door-go .arrow { transform: translateX(4px); }
[dir="rtl"] .door-go .arrow { transform: scaleX(-1); }
[dir="rtl"] .door-x:hover .door-go .arrow { transform: scaleX(-1) translateX(4px); }
.door-x.is-deep { background: var(--deep); border-color: var(--deep); color: var(--on-deep); }
.door-x.is-deep h2 { color: #fff; }
.door-x.is-deep p { color: var(--on-deep-2); }
.door-x.is-deep .door-ic { background: rgba(227, 161, 59, .16); color: var(--sun); }
.door-x.is-deep .door-go { color: var(--sun); }
.door-x.is-sun .door-ic { background: var(--sun-wash); color: var(--sun-ink); }
@media (max-width: 900px) { .door-grid { grid-template-columns: 1fr; } .door-x { min-height: 0; } }

/* ---------- Departments ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(28px, 4vw, 44px); position: sticky; top: calc(var(--header-h) + 8px); z-index: 5; padding: 8px; margin-inline: -8px; border-radius: 14px; background: rgba(251, 250, 246, .92); }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 16px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; transition: background-color .25s var(--ease), border-color .25s, color .25s; }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[aria-pressed="true"].c-quran, .chip[aria-pressed="true"].c-skills, .chip[aria-pressed="true"].c-youth, .chip[aria-pressed="true"].c-care { background: var(--c); border-color: var(--c); }
.chip-n { font-size: .78rem; opacity: .7; font-variant-numeric: tabular-nums; }
.dept-group + .dept-group { margin-top: clamp(48px, 7vw, 80px); }
.dept-group-head { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; margin-bottom: 22px; }
.dept-group-head .h3 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
.dept-group-head p { margin: 4px 0 0; max-width: 52em; }
.dept-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--cw, var(--green-wash)); color: var(--c, var(--brand)); flex: none; transition: transform .45s var(--ease); }
.dept-icon svg { width: 26px; height: 26px; }
.dept-icon.big { width: 72px; height: 72px; border-radius: 20px; }
.dept-icon.big svg { width: 36px; height: 36px; }
.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.dept-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); overflow: hidden; transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s; }
.dept-card::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 4px; background: var(--c, var(--brand)); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
[dir="rtl"] .dept-card::before { transform-origin: right; }
.dept-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.dept-card:hover::before { transform: scaleX(1); }
.dept-card:hover .dept-icon { transform: rotate(-6deg) scale(1.06); }
.dept-card h3 { font-size: 1.35rem; margin-top: 8px; }
.dept-card .meta { margin: 0; color: var(--ink-3); font-size: .93rem; }
.dept-where { display: flex; align-items: center; gap: 6px; }
.dept-where svg { width: 16px; height: 16px; flex: none; }
.dept-go { margin-top: auto; padding-top: 12px; display: inline-flex; align-items: center; gap: .45em; font-weight: 700; color: var(--c, var(--brand)); }
.dept-go .arrow { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.dept-card:hover .dept-go .arrow { transform: translateX(4px); }
[dir="rtl"] .dept-go .arrow { transform: scaleX(-1); }
[dir="rtl"] .dept-card:hover .dept-go .arrow { transform: scaleX(-1) translateX(4px); }
.small-cards .dept-card { padding: 20px; }
.is-entering { animation: rise .5s var(--ease) both; }
.dept-head .dept-title { display: flex; gap: 20px; align-items: center; }
.dept-head h1 { margin-top: 6px; }
@media (max-width: 640px) { .dept-head .dept-title { flex-direction: column; align-items: flex-start; gap: 14px; } }

/* Class times on a department page */
.times-grid { display: grid; gap: 20px; }
.batches { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.batch { display: grid; gap: 14px; align-content: start; padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.batch.is-live { border-color: #9BD3B0; box-shadow: 0 0 0 4px var(--ok-wash); }
.batch-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.batch h3 { font-size: 1.3rem; }
.batch-where { margin: 4px 0 0; color: var(--ink-3); font-size: .92rem; }
.week { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.week li { display: grid; place-items: center; height: 34px; border-radius: 8px; font-size: .78rem; font-weight: 700; background: var(--tint); color: var(--ink-3); }
.week li.on { background: var(--brand); color: #fff; }
.weekly { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-weight: 600; }
.batch-dates p { margin: 0 0 6px; }
.batch-dates .sep { color: var(--line-2); }
.course-bar { display: block; width: 100%; height: 8px; margin: 8px 0 6px; border: 0; border-radius: 8px; background: var(--line); overflow: hidden; -webkit-appearance: none; appearance: none; }
.course-bar::-webkit-progress-bar { background: var(--line); border-radius: 8px; }
.course-bar::-webkit-progress-value { background: var(--brand); border-radius: 8px; }
.course-bar::-moz-progress-bar { background: var(--brand); border-radius: 8px; }

/* ---------- Photos ---------- */
.photo-grid { list-style: none; margin: 0; padding: 0; columns: 3 260px; column-gap: 14px; }
.photo-grid li { break-inside: avoid; margin-bottom: 14px; }
.ph { position: relative; display: block; border-radius: 14px; overflow: hidden; background: var(--tint); }
.ph img { width: 100%; height: auto; transition: transform .7s var(--ease), opacity .4s; }
.ph:hover img { transform: scale(1.04); }
.ph-tag { position: absolute; inset-inline-start: 10px; bottom: 10px; padding: 4px 10px; border-radius: 8px; background: rgba(14, 42, 32, .82); color: #fff; font-size: .8rem; font-weight: 700; }
.photo-strip .photo-grid { columns: 4 200px; }
.album-cover.c-quran, .album-cover.c-skills, .album-cover.c-youth, .album-cover.c-care { background: var(--cw); color: var(--c); }
.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; background: rgba(6, 18, 13, .94); opacity: 0; transition: opacity .3s var(--ease); }
.lightbox.is-open { opacity: 1; }
.lb-fig { margin: 0; display: grid; justify-items: center; gap: 12px; padding: 56px 0 24px; max-height: 100svh; }
.lb-fig img { max-width: 100%; max-height: calc(100svh - 140px); width: auto; height: auto; border-radius: 10px; }
.lb-fig figcaption { display: flex; gap: 16px; color: #E7EDE9; font-size: .95rem; }
.lb-count { color: #9FB2A8; font-variant-numeric: tabular-nums; }
.lb-btn { width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; justify-self: center; }
.lb-btn:hover { background: rgba(255, 255, 255, .2); }
.lb-close { position: absolute; top: 14px; inset-inline-end: 14px; }
@media (max-width: 640px) { .lightbox { grid-template-columns: 1fr; } .lb-prev, .lb-next { position: absolute; bottom: 18px; } .lb-prev { inset-inline-start: 18px; } .lb-next { inset-inline-end: 18px; } .lb-fig { padding: 64px 8px 84px; } }

/* ---------- Stories ---------- */
.stories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stories.is-full { grid-template-columns: repeat(2, 1fr); }
.story { display: flex; flex-direction: column; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.story-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--tint); }
.story-body { padding: 24px; display: grid; gap: 10px; }
.story-meta { margin: 0; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.story h3 { font-size: 1.4rem; }
.story-text p { color: var(--ink-2); margin-bottom: .7em; }
.story-person { margin: 0; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.story-person::before { content: ""; width: 22px; height: 2px; background: var(--sun); }
@media (max-width: 960px) { .stories, .stories.is-full { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .stories, .stories.is-full { grid-template-columns: 1fr; } }
.empty-state { display: grid; justify-items: center; text-align: center; gap: 18px; padding: clamp(36px, 6vw, 72px) 20px; border: 1px dashed var(--line-2); border-radius: var(--radius-lg); }

/* Month and year pickers */
.month-pick { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; max-width: 420px; }

html[lang="ur"] .live-h, html[lang="ur"] .live-label, html[lang="ur"] .story-meta { letter-spacing: 0; text-transform: none; font-size: 1rem; }
html[lang="ur"] .live-meta, html[lang="ur"] .status-live, html[lang="ur"] .status-next, html[lang="ur"] .status-date, html[lang="ur"] .chip { font-size: 1.02rem; line-height: 1.9; }
html[lang="ur"] .live-time { font-family: var(--urdu); font-size: 1.7rem; line-height: 1.9; }
html[lang="ur"] .week li { font-family: var(--urdu); font-size: .95rem; }
html[lang="ur"] .hero-x h1 { max-width: 12em; }
@media (prefers-reduced-motion: reduce) { .motes circle { opacity: .5; } }

/* Skeleton loading: a calm pulse until a photo arrives, then it fades in */
@keyframes skel { 0%, 100% { background-color: var(--tint); } 50% { background-color: var(--line); } }
html.js .ph:not(.is-loaded), html.js .pa-img:not(.is-loaded), html.js .story:not(.is-loaded) .story-img { animation: skel 1.4s ease-in-out infinite; }
html.js .ph img, html.js .pa-img img, html.js .story-img, html.js .hero-photo { opacity: 0; transition: opacity .6s var(--ease), transform .7s var(--ease); }
html.js .ph img.is-loaded, html.js .pa-img img.is-loaded, html.js .story-img.is-loaded, html.js .hero-photo.is-loaded, html.js .is-loaded > img { opacity: 1; }
.pa-img { display: block; border-radius: 10px; background: var(--tint); }
.lb-fig.is-loading img { opacity: .25; }
.lb-fig.is-loading::after { content: ""; position: absolute; top: 50%; left: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: turn .8s linear infinite; }
.lb-fig { position: relative; }
.lb-fig img { transition: opacity .3s; }
@media (prefers-reduced-motion: reduce) { html.js .ph img, html.js .pa-img img, html.js .story-img, html.js .hero-photo { opacity: 1; } }

/* About */
.two-doors { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .two-doors { grid-template-columns: 1fr; } }
.door-x h3 { font-size: clamp(1.45rem, 2.2vw, 1.8rem); }
.door-x.is-deep h3 { color: #fff; }
.ayah { margin: 2rem 0; padding: 26px 28px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--sun); }
.ayah blockquote { margin: 0 0 14px; font-family: "Amiri", "Scheherazade New", "Traditional Arabic", "Noto Naskh Arabic", "Times New Roman", serif; font-size: clamp(1.5rem, 2.6vw, 1.95rem); line-height: 2; color: var(--ink); text-align: right; }
.ayah figcaption { display: grid; gap: 4px; color: var(--ink-2); }
.ayah cite { font-style: normal; font-size: .88rem; font-weight: 700; color: var(--brand); }
.ayah figcaption[lang="ur"] { font-family: var(--urdu); text-align: right; }
.ayah .ayah-ur { font-family: var(--urdu); font-size: 1.25rem; line-height: 2.1; color: var(--ink-2); }
.ayah figcaption[lang="ur"] cite { font-family: var(--urdu); font-size: 1.02rem; font-weight: 400; }
.ayah-band { padding-bottom: 0; }
.ayah-feature { max-width: 860px; margin: 0 auto; text-align: center; padding: 34px 32px; border-inline-start-width: 1px; border-top: 4px solid var(--sun); }
.ayah-feature blockquote, .ayah-feature figcaption[lang="ur"] { text-align: center; }
.ayah-feature blockquote { font-size: clamp(1.7rem, 3.2vw, 2.35rem); }
.ayah-feature .ayah-ur { font-size: clamp(1.25rem, 2vw, 1.5rem); }
.footer-bottom .credit a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.numbers > div { display: grid; gap: 6px; padding: 26px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.num-big { font-family: var(--serif); font-size: clamp(2.6rem, 5vw, 3.6rem); line-height: 1; color: var(--brand); }
.initials svg { width: 28px; height: 28px; }
.campus-hours { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-weight: 600; color: var(--ink-2); }
.campus-hours svg { width: 18px; height: 18px; color: var(--brand); flex: none; }
