:root {
  --paper: #f6f2e7;
  --card: #fffdf8;
  --ink: #1b2a21;
  --muted: #56655b;
  --green: #1e5a3c;
  --green-deep: #143d29;
  --leaf: #d7e7cb;
  --rose: #f0c9ce;
  --rose-deep: #a84a5e;
  --whatsapp: #1fa855;
  --rule: rgba(30, 90, 60, 0.16);
  --grid: rgba(30, 90, 60, 0.07);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --arabic: "IBM Plex Sans Arabic", "Geeza Pro", Tahoma, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  overflow-x: hidden;
  overflow-x: clip;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 24px;
}

section[id] { scroll-margin-top: 24px; }

/* ---------- header ---------- */

.top {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-block: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green);
  color: var(--paper);
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1;
  padding-bottom: 3px;
}

.nav {
  display: flex;
  gap: 28px;
  margin-inline-start: auto;
  font-size: 15px;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  padding-block: 6px;
  border-bottom: 1.5px solid transparent;
}

.nav a:hover { color: var(--ink); border-bottom-color: var(--green); }

.top-actions { display: flex; align-items: center; gap: 10px; }

.lang {
  font-family: var(--arabic);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--green);
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 7px 14px;
}

html[dir="rtl"] .lang { font-family: var(--sans); }
.lang:hover { background: var(--card); border-color: var(--green); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1.5px solid var(--green);
  background: var(--green);
  color: var(--paper);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn svg { flex: none; }
.btn:hover { background: var(--green-deep); transform: translateY(-1px); }
.btn-small { padding: 7px 15px; font-size: 14px; gap: 7px; }
.btn-ghost { background: transparent; color: var(--green); }
.btn-ghost:hover { background: var(--card); }
.btn-light { background: var(--paper); border-color: var(--paper); color: var(--green-deep); }
.btn-light:hover { background: #fff; }

:focus-visible { outline: 2.5px solid var(--rose-deep); outline-offset: 3px; border-radius: 6px; }

.fab {
  position: fixed;
  z-index: 10;
  bottom: 20px;
  inset-inline-end: 20px;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(20, 61, 41, 0.55);
  transition: transform 0.15s ease;
}

.fab:hover { transform: scale(1.06); }

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 56px;
  padding-block: 40px 96px;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}

.eyebrow .dot { margin-inline: 4px; color: var(--rose-deep); }

h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.3rem, 4.9vw, 3.9rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 4px 13px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--card);
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.5;
}

.lead {
  margin: 20px 0 0;
  max-width: 34em;
  font-size: 1.12rem;
  color: var(--muted);
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  color: var(--muted);
}

.facts li { display: flex; align-items: center; white-space: nowrap; }
.facts li + li::before {
  content: "";
  width: 4px;
  height: 4px;
  margin-inline: 14px;
  border-radius: 50%;
  background: var(--rose-deep);
}

.hero-photo {
  position: relative;
  justify-self: center;
  width: min(100%, 400px);
}

.arch {
  position: relative;
  z-index: 1;
  margin: 0;
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px 28px 28px;
  overflow: hidden;
  background: var(--leaf);
  box-shadow: 0 0 0 8px var(--paper), 0 0 0 9px var(--rule), 0 30px 60px -30px rgba(20, 61, 41, 0.45);
}

.arch img { width: 100%; height: 100%; object-fit: cover; }

.plot {
  position: absolute;
  z-index: 0;
  width: 128%;
  inset-inline-start: -14%;
  bottom: -14%;
  overflow: visible;
}

html[dir="rtl"] .plot { transform: scaleX(-1); }

.plot .axis { stroke: var(--green); stroke-width: 1; opacity: 0.35; }
.plot .curve { fill: none; stroke: var(--rose-deep); stroke-width: 2; stroke-linecap: round; opacity: 0.75; }

.badge {
  position: absolute;
  z-index: 2;
  top: 6%;
  inset-inline-end: -4%;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--rose);
  color: var(--green-deep);
  font-family: var(--serif);
  font-size: 30px;
  box-shadow: 0 0 0 6px var(--paper);
}

.tag {
  position: absolute;
  z-index: 2;
  bottom: 9%;
  inset-inline-start: -13%;
  padding: 7px 14px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--rule);
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--green-deep);
  box-shadow: 0 10px 24px -14px rgba(20, 61, 41, 0.5);
}

/* ---------- sections ---------- */

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 32px;
  padding-bottom: 20px;
  margin-bottom: 32px;
  border-bottom: 1.5px solid var(--ink);
}

h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section-head p { margin: 0; color: var(--muted); }

/* ---------- teaching ---------- */

.teaching { padding-block: 24px 96px; }

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

.card {
  display: flex;
  flex-direction: column;
  padding: 28px 28px 10px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 22px;
}

.glyph {
  display: block;
  margin-bottom: 18px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 40px;
  line-height: 1.1;
  color: var(--green);
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] .glyph { text-align: right; }

h3 { margin: 0 0 6px; font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; }
.card p { margin: 0 0 18px; color: var(--muted); font-size: 0.98rem; }

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

.card li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-block: 13px;
  border-top: 1px solid var(--rule);
  font-weight: 600;
  font-size: 1.05rem;
}

.card li::before {
  content: "";
  flex: none;
  align-self: center;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rose-deep);
}

.card li small {
  margin-left: auto;
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 400;
  color: var(--muted);
  text-align: end;
}

html[dir="rtl"] .card li small { margin-left: 0; margin-right: auto; text-align: left; }

/* ---------- students ---------- */

.voices { padding-bottom: 96px; }

.quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

.quote {
  margin: 0;
  padding: 26px 28px 30px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 22px;
}

.quote::before {
  content: "\201C";
  display: block;
  height: 36px;
  font-family: var(--serif);
  font-size: 64px;
  line-height: 0.85;
  color: var(--rose-deep);
}

html[dir="rtl"] .quote::before { content: "\201D"; }

.quote p {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.45rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

html[dir="rtl"] .quote p { font-family: var(--arabic); font-weight: 600; font-size: 1.3rem; line-height: 1.6; letter-spacing: 0; }

.alumni {
  margin-top: 20px;
  padding: 26px 28px;
  border-radius: 22px;
  background: var(--leaf);
  color: var(--green-deep);
}

.alumni-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}

html[dir="rtl"] .alumni-label { letter-spacing: 0; font-size: 0.9rem; }

.alumni p { margin: 0; font-size: 1.15rem; font-weight: 500; text-wrap: balance; }

/* ---------- about ---------- */

.about { padding-bottom: 96px; }

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: start;
  gap: 56px;
}

.about-text { margin: 0; font-size: 1.3rem; line-height: 1.55; }

.about dl {
  margin: 0;
  padding: 6px 28px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 22px;
}

.about dl > div {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: baseline;
  gap: 16px;
  padding-block: 16px;
  border-top: 1px solid var(--rule);
}

.about dl > div:first-child { border-top: 0; }

dt {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

dd { margin: 0; font-weight: 600; }

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

.contact { padding-bottom: 56px; }

.contact-box {
  padding: clamp(36px, 6vw, 72px);
  border-radius: 28px;
  background-color: var(--green-deep);
  background-image:
    linear-gradient(rgba(246, 242, 231, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 242, 231, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--paper);
}

.contact-box p { margin: 14px 0 0; max-width: 30em; color: rgba(246, 242, 231, 0.78); font-size: 1.08rem; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; }

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

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 0 96px;
  font-size: 14px;
  color: var(--muted);
}

.foot a { font-family: var(--arabic); }
html[dir="rtl"] .foot a { font-family: var(--sans); }

/* ---------- 404 ---------- */

.lost {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  min-height: 100vh;
  padding: 24px;
  text-align: center;
}

.lost .glyph { margin: 0; font-size: 64px; text-align: center; }
.lost p { margin: 0; color: var(--muted); }

/* ---------- arabic ---------- */

html[dir="rtl"] body,
html[dir="rtl"] h1,
html[dir="rtl"] h2 { font-family: var(--arabic); }

html[dir="rtl"] body { line-height: 1.8; }
html[dir="rtl"] h1 { line-height: 1.3; letter-spacing: 0; font-weight: 700; font-size: clamp(2rem, 4.3vw, 3.3rem); }
html[dir="rtl"] h2 { line-height: 1.35; letter-spacing: 0; font-weight: 700; }
html[dir="rtl"] h3,
html[dir="rtl"] .brand { letter-spacing: 0; }
html[dir="rtl"] .eyebrow { letter-spacing: 0; font-size: 15px; }
html[dir="rtl"] dt { letter-spacing: 0; font-size: 0.9rem; }
html[dir="rtl"] .about-text { line-height: 1.8; }

/* ---------- motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero-text > *, .hero-photo { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero-text > :nth-child(2) { animation-delay: 0.06s; }
  .hero-text > :nth-child(3) { animation-delay: 0.12s; }
  .hero-text > :nth-child(4) { animation-delay: 0.18s; }
  .hero-text > :nth-child(5) { animation-delay: 0.24s; }
  .hero-text > :nth-child(6) { animation-delay: 0.3s; }
  .hero-photo { animation-delay: 0.1s; }
  .plot .curve { stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 1.6s 0.4s ease-out forwards; }
}

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

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- small screens ---------- */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 56px; padding-block: 24px 72px; }
  .hero-photo { width: min(78%, 340px); }
  .cards, .quotes { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .teaching, .voices, .about { padding-bottom: 72px; }
  .nav { display: none; }
  .top-actions { margin-inline-start: auto; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 16px; }
  .top { gap: 12px; }
  .top .btn-small { display: none; }
  .facts { flex-direction: column; gap: 4px; }
  .facts li::before,
  .facts li + li::before {
    content: "";
    width: 4px;
    height: 4px;
    margin-inline: 0 10px;
    border-radius: 50%;
    background: var(--rose-deep);
  }
  .tag { inset-inline-start: -10%; }
  .badge { width: 56px; height: 56px; font-size: 25px; }
  .about-text { font-size: 1.15rem; }
  .about dl { padding-inline: 20px; }
  .about dl > div { grid-template-columns: 92px minmax(0, 1fr); }
  .card { padding-inline: 22px; }
}
