/* ── Tokens ─────────────────────────────────────────── */
:root{
  --green-900:#0A342F;
  --green-800:#0E4D45;
  --green-700:#146055;
  --green-50:#EEF4F2;
  --gold:#C1972B;
  --gold-soft:#E4C877;
  --paper:#FBF8F3;
  --paper-2:#F4EEE4;
  --ink:#1A2422;
  --ink-2:#4B5A56;
  --line:#E2D9CB;
  --danger:#9B2C2C;

  --wrap:1120px;
  --radius:14px;
  --shadow:0 1px 2px rgba(26,36,34,.05),0 12px 32px -18px rgba(10,52,47,.35);

  --font-ar-display:'Amiri',Georgia,serif;
  --font-ar-body:'Cairo',system-ui,sans-serif;
  --font-en-display:'Cormorant Garamond',Georgia,serif;
  --font-en-body:'Inter',system-ui,sans-serif;

  --font-display:var(--font-ar-display);
  --font-body:var(--font-ar-body);
}
html:not([lang="ar"]){ --font-display:var(--font-en-display); --font-body:var(--font-en-body); }

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; scroll-padding-top:86px; }
body{
  margin:0; background:var(--paper); color:var(--ink);
  font-family:var(--font-body); font-size:17px; line-height:1.75;
  -webkit-font-smoothing:antialiased;
}
html:not([lang="ar"]) body{ font-size:16.5px; line-height:1.7; }
img,svg{ max-width:100%; }
h1,h2,h3,h4{ font-family:var(--font-display); line-height:1.25; margin:0 0 .5em; font-weight:700; }
h1{ font-size:clamp(2.1rem,5.2vw,3.6rem); letter-spacing:-.01em; }
h2{ font-size:clamp(1.6rem,3.4vw,2.4rem); }
h3{ font-size:1.2rem; }
p{ margin:0 0 1em; }
a{ color:var(--green-700); }

.wrap{ width:100%; max-width:var(--wrap); margin-inline:auto; padding-inline:22px; }
.wrap.narrow{ max-width:820px; }
.section{ padding:84px 0; }
.section-alt{ background:var(--paper-2); border-block:1px solid var(--line); }
.grid-2{ display:grid; gap:44px; grid-template-columns:1.15fr .85fr; align-items:start; }
.skip-link{ position:absolute; inset-inline-start:-9999px; }
.skip-link:focus{ inset-inline-start:12px; top:12px; background:#fff; padding:10px 16px; z-index:99; border-radius:8px; }

.section-eyebrow{
  font-size:.78rem; letter-spacing:.14em; text-transform:uppercase;
  color:var(--gold); font-weight:600; margin-bottom:.5em;
}
html[dir="rtl"] .section-eyebrow{ letter-spacing:0; font-size:.92rem; text-transform:none; }
.lede{ font-size:1.05rem; color:var(--ink-2); }
.note{
  margin-top:30px; padding:16px 20px; background:rgba(193,151,43,.09);
  border-inline-start:3px solid var(--gold); border-radius:8px;
  font-size:.95rem; color:var(--ink-2);
}

/* ── Buttons ────────────────────────────────────────── */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:14px 28px; border-radius:999px; border:1px solid transparent;
  font-family:var(--font-body); font-size:1rem; font-weight:600;
  text-decoration:none; cursor:pointer; transition:.18s ease;
}
.btn-primary{ background:var(--green-800); color:#fff; box-shadow:var(--shadow); }
.btn-primary:hover{ background:var(--green-700); transform:translateY(-1px); }
.btn-ghost{ border-color:var(--green-800); color:var(--green-800); background:transparent; }
.btn-ghost:hover{ background:var(--green-800); color:#fff; }
.btn-block{ width:100%; }
.btn:disabled{ opacity:.6; cursor:not-allowed; transform:none; }

/* ── Header ─────────────────────────────────────────── */
.site-header{
  position:sticky; top:0; z-index:50;
  background:rgba(251,248,243,.9); backdrop-filter:blur(12px);
  border-bottom:1px solid transparent; transition:.25s ease;
}
.site-header.scrolled{ border-bottom-color:var(--line); box-shadow:0 8px 24px -20px rgba(10,52,47,.5); }
.header-inner{ display:flex; align-items:center; gap:20px; min-height:74px; }
.brand{ display:flex; align-items:center; gap:12px; text-decoration:none; color:var(--green-800); }
.brand-mark{
  flex:none; width:40px; height:40px; border-radius:50%;
  object-fit:cover; display:block;
  box-shadow:0 0 0 1px rgba(10,52,47,.12);
}
.brand-text strong{ display:block; font-family:var(--font-display); font-size:1.06rem; color:var(--ink); line-height:1.3; }
.brand-text small{ color:var(--ink-2); font-size:.78rem; }

.site-nav{ display:flex; gap:20px; margin-inline-start:auto; }
.site-nav a{
  color:var(--ink-2); text-decoration:none; font-size:.94rem; font-weight:500;
  padding:6px 0; border-bottom:2px solid transparent; transition:.15s;
  white-space:nowrap;
}
.site-nav a:hover,.site-nav a.active{ color:var(--green-800); border-bottom-color:var(--gold); }

.header-actions{ display:flex; align-items:center; gap:10px; }
/* Three-way language selector — the current language is always visible, so a
   reader who cannot read the interface can still find their own language. */
.lang-switch{
  display:inline-flex; background:#fff; border:1px solid var(--line);
  border-radius:999px; padding:3px; gap:2px;
}
.lang-switch button{
  border:0; background:none; cursor:pointer; color:var(--ink-2);
  padding:6px 13px; border-radius:999px; font-weight:600; font-size:.82rem;
  font-family:var(--font-en-body); line-height:1.4; transition:.15s;
}
.lang-switch button[lang="ar"]{ font-family:var(--font-ar-body); font-size:.86rem; }
.lang-switch button:hover{ color:var(--green-800); background:var(--green-50); }
.lang-switch button.active{ background:var(--green-800); color:#fff; }
.lang-switch button[hidden]{ display:none; }
.nav-toggle{ display:none; flex-direction:column; gap:5px; background:none; border:0; padding:8px; cursor:pointer; }
.nav-toggle span{ width:22px; height:2px; background:var(--ink); border-radius:2px; transition:.2s; }

/* ── Hero ───────────────────────────────────────────── */
.hero{
  position:relative; overflow:hidden; color:#fff; padding:96px 0 72px;
  background:var(--green-900);
}
/* The photograph sits behind a scrim: it is a portrait shot on a wide banner,
   so it is anchored to the outer edge where the tower falls, and the text side
   is darkened enough to stay legible. */
.hero-photo{
  position:absolute; inset:0; pointer-events:none;
  background-image:url("hero.jpg");
  background-size:cover;
  background-position:right 22%;
  opacity:1;
}
html[dir="rtl"] .hero-photo{ background-position:left 20%; }
.hero-scrim{
  position:absolute; inset:0; pointer-events:none;
  background:
    linear-gradient(to bottom, rgba(10,52,47,0) 45%, rgba(10,52,47,.55) 78%, rgba(10,52,47,.85) 100%),
    linear-gradient(to right,
      rgba(10,52,47,.94) 0%, rgba(10,52,47,.80) 42%, rgba(10,52,47,.18) 100%);
}
html[dir="rtl"] .hero-scrim{
  background:
    linear-gradient(to bottom, rgba(10,52,47,0) 45%, rgba(10,52,47,.55) 78%, rgba(10,52,47,.85) 100%),
    linear-gradient(to left,
      rgba(10,52,47,.94) 0%, rgba(10,52,47,.80) 42%, rgba(10,52,47,.18) 100%);
}
.hero-pattern{
  position:absolute; inset:0; opacity:.06; pointer-events:none;
  background-image:
    radial-gradient(circle at 50% 50%, transparent 60%, var(--gold-soft) 61%, transparent 63%),
    radial-gradient(circle at 0% 50%, transparent 60%, var(--gold-soft) 61%, transparent 63%),
    radial-gradient(circle at 100% 50%, transparent 60%, var(--gold-soft) 61%, transparent 63%);
  background-size:64px 64px;
}
.hero::after{
  content:""; position:absolute; inset-inline-end:-140px; top:-140px;
  width:460px; height:460px; border-radius:50%;
  background:radial-gradient(circle, rgba(193,151,43,.28), transparent 68%);
}
.hero-inner{ position:relative; z-index:1; max-width:860px; }
.eyebrow{
  display:inline-block; padding:6px 16px; border-radius:999px;
  background:rgba(228,200,119,.14); border:1px solid rgba(228,200,119,.4);
  color:var(--gold-soft); font-size:.88rem; font-weight:600; margin-bottom:20px;
}
.hero h1{ color:#fff; margin-bottom:.3em; }
.hero-sub{ font-size:clamp(1.05rem,2.2vw,1.3rem); color:var(--gold-soft); font-family:var(--font-display); margin-bottom:1em; }
.hero-lede{ font-size:1.05rem; color:rgba(255,255,255,.82); max-width:62ch; }
.hero-cta{ display:flex; flex-wrap:wrap; gap:14px; margin:32px 0 44px; }
.hero .btn-primary{ background:var(--gold); color:var(--green-900); }
.hero .btn-primary:hover{ background:var(--gold-soft); }
.hero .btn-ghost{ border-color:rgba(255,255,255,.4); color:#fff; }
.hero .btn-ghost:hover{ background:#fff; color:var(--green-900); border-color:#fff; }

.hero-facts{ display:grid; grid-template-columns:repeat(4,1fr); gap:20px; margin:0; padding-top:28px; border-top:1px solid rgba(255,255,255,.16); }
.hero-facts div{ min-width:0; }
.hero-facts dt{ font-size:.82rem; color:rgba(255,255,255,.6); margin-bottom:4px; }
.hero-facts dd{ margin:0; font-family:var(--font-display); font-size:1.22rem; color:var(--gold-soft); }

/* ── Verse ──────────────────────────────────────────── */
.verse{
  position:relative; overflow:hidden; background:var(--green-800);
  color:#fff; padding:56px 0; text-align:center;
}
.verse::before{
  content:""; position:absolute; inset:0;
  background:url("band-verse.jpg") center 62%/cover;
}
/* The verse is centred, so the scrim is heaviest in the middle rather than
   at one edge. */
.verse::after{
  content:""; position:absolute; inset:0;
  background:radial-gradient(ellipse at center,
    rgba(10,52,47,.92) 0%, rgba(10,52,47,.86) 45%, rgba(10,52,47,.68) 100%);
}
.verse > .wrap{ position:relative; z-index:1; }
.verse blockquote{ margin:0; }
.ayah{ font-family:'Amiri',serif; font-size:clamp(1.3rem,3vw,1.9rem); line-height:1.9; margin:0 0 .4em; color:#fff; }
.ayah-trans{ font-size:.98rem; color:rgba(255,255,255,.8); max-width:60ch; margin:0 auto .5em; }
.ayah-trans:empty{ display:none; }
.verse cite{ font-style:normal; font-size:.86rem; color:var(--gold-soft); }

/* ── About ──────────────────────────────────────────── */
.pill-list{ list-style:none; margin:0; padding:0; display:grid; gap:12px; }
.pill-list li{
  background:#fff; border:1px solid var(--line); border-radius:12px;
  padding:15px 20px; font-size:.98rem; box-shadow:var(--shadow);
  position:relative; padding-inline-start:46px;
}
.pill-list li::before{
  content:""; position:absolute; inset-inline-start:20px; top:50%; margin-top:-4px;
  width:8px; height:8px; border-radius:50%; background:var(--gold);
}

/* ── Supervision ────────────────────────────────────── */
.scholar-card{
  background:#fff; border:1px solid var(--line); border-radius:var(--radius);
  padding:32px 34px; box-shadow:var(--shadow); max-width:860px;
  border-top:3px solid var(--gold);
}
.scholar-head{ display:flex; align-items:center; gap:18px; margin-bottom:22px; }
.scholar-mark{ color:var(--green-800); flex:none; display:grid; place-items:center; }
.scholar-head h3{
  margin:0 0 2px; font-size:1.25rem; color:var(--green-800); line-height:1.4;
}
.scholar-role{ margin:0; font-size:.9rem; color:var(--ink-2); }
.scholar-card p{ color:var(--ink-2); }
.scholar-card h4{
  font-family:var(--font-body); font-size:.97rem; font-weight:600; color:var(--ink);
  margin:26px 0 14px; padding-top:20px; border-top:1px solid var(--line);
}
.project-list{ list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.project-list li{
  position:relative; padding-inline-start:28px; font-size:.96rem;
}
.project-list li::before{
  content:""; position:absolute; inset-inline-start:6px; top:.62em;
  width:7px; height:7px; border-radius:50%; background:var(--gold);
}

/* ── Curriculum ─────────────────────────────────────── */
.year-card{
  background:#fff; border:1px solid var(--line); border-radius:var(--radius);
  padding:26px 28px; margin-bottom:18px; box-shadow:var(--shadow);
  border-inline-start:4px solid var(--green-800);
}
.year-badge{
  display:inline-block; background:var(--green-50); color:var(--green-800);
  padding:4px 14px; border-radius:999px; font-size:.82rem; font-weight:600; margin-bottom:10px;
}
.year-card h3{ margin-bottom:.35em; font-size:1.35rem; }
.year-card p{ margin:0; color:var(--ink-2); }

.course-grid{ list-style:none; margin:30px 0 0; padding:0; display:grid; gap:14px; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); counter-reset:c; }
.course-grid li{
  display:flex; align-items:center; gap:14px; background:#fff;
  border:1px solid var(--line); border-radius:12px; padding:16px 18px; transition:.18s;
}
.course-grid li:hover{ border-color:var(--gold); transform:translateY(-2px); box-shadow:var(--shadow); }
.course-grid li{ counter-increment:c; }
.course-grid li::before{
  content:counter(c);
  flex:none; width:34px; height:34px; display:grid; place-items:center;
  border-radius:50%; background:var(--green-800); color:var(--gold-soft);
  font-family:var(--font-ar-display); font-size:1rem;
}
/* Numerals follow the language: Arabic-Indic in Arabic, Western elsewhere.
   Generating them from a counter keeps the markup free of either. */
html[lang="ar"] .course-grid li::before{ content:counter(c, arabic-indic); }
.course-grid h4{ margin:0; font-size:1rem; font-family:var(--font-body); font-weight:600; }

/* ── Features ───────────────────────────────────────── */
.feature-grid{ display:grid; gap:20px; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); margin-top:12px; }
.feature{ background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:28px; box-shadow:var(--shadow); }
.feature svg{ width:34px; height:34px; fill:var(--green-800); margin-bottom:14px; }
.feature h3{ font-size:1.12rem; margin-bottom:.4em; }
.feature p{ margin:0; color:var(--ink-2); font-size:.96rem; }

/* ── Admission ──────────────────────────────────────── */
.req-list{ margin:0; padding:0; list-style:none; counter-reset:r; display:grid; gap:14px; }
.req-list li{
  position:relative; padding-inline-start:52px; padding-block:8px;
  counter-increment:r; font-size:1rem;
}
.req-list li::before{
  counter-increment:none; content:counter(r);
  position:absolute; inset-inline-start:0; top:6px;
  width:34px; height:34px; display:grid; place-items:center;
  border-radius:50%; border:1.5px solid var(--gold); color:var(--green-800);
  font-family:var(--font-display); font-weight:700;
}
html[lang="ar"] .req-list li::before{ content:counter(r, arabic-indic); }
.date-card{ background:var(--green-800); color:#fff; border-radius:var(--radius); padding:30px; box-shadow:var(--shadow); }
.date-card .section-eyebrow{ color:var(--gold-soft); }
.date-range{ font-family:var(--font-display); font-size:1.55rem; line-height:1.5; margin-bottom:.5em; }
/* The English date range spells out both calendars, so it needs more room. */
html:not([lang="ar"]) .date-range{ font-size:1.2rem; line-height:1.6; }
.date-range em{ font-style:normal; color:var(--gold-soft); }
.date-range strong{ display:block; color:var(--gold-soft); }
.date-note{ font-size:.92rem; color:rgba(255,255,255,.78); }
.date-card .btn-primary{ background:var(--gold); color:var(--green-900); margin-top:8px; }
.date-card .btn-primary:hover{ background:var(--gold-soft); }

/* ── Form ───────────────────────────────────────────── */
form{ margin-top:32px; }
fieldset{ border:0; margin:0 0 30px; padding:0; }
legend{
  font-family:var(--font-display); font-size:1.15rem; font-weight:700; color:var(--green-800);
  padding:0 0 12px; margin-bottom:18px; width:100%; border-bottom:1px solid var(--line);
}
.row{ display:grid; gap:18px; grid-template-columns:1fr 1fr; }
.field{ margin-bottom:18px; min-width:0; }
.field label,.field .label{ display:block; font-size:.93rem; font-weight:600; margin-bottom:7px; color:var(--ink); }
.req{ color:var(--danger); }
.field input[type=text],.field input[type=tel]{
  width:100%; padding:12px 14px; border:1px solid var(--line); border-radius:10px;
  background:#fff; font-family:var(--font-body); font-size:1rem; color:var(--ink); transition:.15s;
}
.field input:focus{ outline:none; border-color:var(--green-700); box-shadow:0 0 0 3px rgba(20,96,85,.14); }
.field input.invalid{ border-color:var(--danger); }
.hint{ font-size:.82rem; color:var(--ink-2); margin:6px 0 0; }
.hint.block{ margin:-6px 0 16px; }
.err{ font-size:.82rem; color:var(--danger); margin:6px 0 0; min-height:0; display:none; }
.err.show{ display:block; }

.choices{ display:flex; gap:10px; flex-wrap:wrap; }
.choice{
  display:inline-flex; align-items:center; gap:8px; cursor:pointer;
  border:1px solid var(--line); background:#fff; border-radius:999px;
  padding:10px 18px; font-size:.95rem; font-weight:500; margin:0; transition:.15s;
}
.choice input{ accent-color:var(--green-800); margin:0; }
.choice:has(input:checked){ border-color:var(--green-800); background:var(--green-50); }

.form-status{ font-size:.92rem; margin:0 0 14px; min-height:1.2em; }
.form-status.error{ color:var(--danger); }
.fine{ font-size:.82rem; color:var(--ink-2); text-align:center; margin-top:14px; }

.success-card{
  margin-top:32px; text-align:center; background:#fff; border:1px solid var(--line);
  border-radius:var(--radius); padding:44px 30px; box-shadow:var(--shadow);
}
.success-card svg{ width:56px; height:56px; fill:var(--green-800); margin-bottom:10px; }
.success-card p{ color:var(--ink-2); }

/* ── Photo band ─────────────────────────────────────── */
.section-photo{ position:relative; overflow:hidden; background:var(--green-900); color:#fff; }
.section-photo > .wrap{ position:relative; z-index:1; }
.section-photo .photo-layer{
  position:absolute; inset:0;
  background-image:url("band-apply.jpg");
  background-size:cover; background-position:left center;
}
html[dir="rtl"] .section-photo .photo-layer{ background-position:right center; }
.section-photo .photo-scrim{
  position:absolute; inset:0;
  background:linear-gradient(to right,
    rgba(10,52,47,.55) 0%, rgba(10,52,47,.88) 38%, rgba(10,52,47,.95) 100%);
}
html[dir="rtl"] .section-photo .photo-scrim{
  background:linear-gradient(to left,
    rgba(10,52,47,.55) 0%, rgba(10,52,47,.88) 38%, rgba(10,52,47,.95) 100%);
}
.section-photo h2{ color:#fff; }
.section-photo .section-eyebrow{ color:var(--gold-soft); }
.section-photo .lede,.section-photo .fine{ color:rgba(255,255,255,.82); }
.section-photo .btn-primary{ background:var(--gold); color:var(--green-900); }
.section-photo .btn-primary:hover{ background:var(--gold-soft); }

/* ── Apply call-to-action ───────────────────────────── */
.apply-cta{ text-align:center; }
.apply-cta .lede{ max-width:58ch; margin-inline:auto; }
.apply-checklist{
  list-style:none; margin:26px auto 30px; padding:24px 28px; max-width:520px;
  background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.18);
  border-radius:var(--radius); text-align:start; backdrop-filter:blur(3px);
}
.apply-checklist li{
  position:relative; padding-inline-start:30px; margin-bottom:12px; font-size:.97rem;
}
.apply-checklist li:last-child{ margin-bottom:0; }
.apply-checklist li::before{
  content:""; position:absolute; inset-inline-start:0; top:.55em;
  width:12px; height:7px; border-inline-start:2px solid var(--gold-soft);
  border-bottom:2px solid var(--gold-soft); transform:rotate(-45deg);
}
/* The tick is drawn from two borders, so it must rotate the other way when the
   inline start edge flips, or it reads as a chevron in Arabic. */
html[dir="rtl"] .apply-checklist li::before{ transform:rotate(45deg); }
.apply-cta .btn-block{ max-width:520px; margin-inline:auto; }

/* ── Contact ────────────────────────────────────────── */
.contact-grid{ display:grid; gap:18px; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); margin-top:12px; }
.contact-card{
  display:flex; align-items:center; gap:16px; background:#fff; border:1px solid var(--line);
  border-radius:var(--radius); padding:22px 24px; text-decoration:none; color:inherit; transition:.18s;
}
a.contact-card:hover{ border-color:var(--green-800); transform:translateY(-2px); box-shadow:var(--shadow); }
.contact-card svg{ width:30px; height:30px; fill:var(--green-800); flex:none; }
.contact-card h3{ font-size:1rem; margin:0 0 2px; }
.contact-card p{ margin:0; color:var(--ink-2); font-size:.95rem; }

/* ── Footer ─────────────────────────────────────────── */
.site-footer{ background:var(--green-900); color:#fff; padding:36px 0; text-align:center; }
.site-footer p{ margin:0 0 4px; }
.site-footer .muted{ color:rgba(255,255,255,.6); font-size:.9rem; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width:900px){
  .grid-2{ grid-template-columns:1fr; }
  .hero-facts{ grid-template-columns:repeat(2,1fr); }
}
/* The three-language switch takes real width; on phones the brand has to give
   way so the school name is not squeezed into a column of single words. */
@media (max-width:620px){
  .header-inner{ gap:10px; min-height:64px; }
  .brand{ gap:9px; min-width:0; }
  .brand-mark{ width:34px; height:34px; }
  .brand-text strong{ font-size:.86rem; line-height:1.25; }
  .brand-text small{ display:none; }
  .lang-switch{ padding:2px; }
  .lang-switch button{ padding:5px 9px; font-size:.74rem; }
  .lang-switch button[lang="ar"]{ font-size:.78rem; }
}
@media (max-width:1000px){
  .nav-toggle{ display:flex; }
  .site-nav{
    position:absolute; inset-inline:0; top:100%; flex-direction:column; gap:0;
    background:var(--paper); border-bottom:1px solid var(--line);
    padding:8px 22px 18px; display:none;
  }
  .site-nav.open{ display:flex; }
  .site-nav a{ padding:12px 0; border-bottom:1px solid var(--line); }
  .header-actions{ margin-inline-start:auto; }
  .section{ padding:60px 0; }
  .hero{ padding:64px 0 52px; }
  .row{ grid-template-columns:1fr; gap:0; }
}
@media (prefers-reduced-motion:reduce){
  *{ transition:none !important; scroll-behavior:auto !important; }
}
