/* Colours come from the school crest: green ring, red disc, white star.
   The pure crest tones are kept for decoration; slightly deeper shades are
   used for text and buttons so they pass WCAG AA contrast. */
:root {
  --green: #008c45;        /* crest green, decoration */
  --green-text: #007a3d;   /* links and text on white (5.4:1) */
  --green-deep: #00602f;   /* hero and page heads */
  --green-night: #003d20;  /* footer */
  --green-tint: #eaf6ef;
  --red: #ed1b24;          /* crest red, decoration */
  --red-strong: #c8101a;   /* buttons with white text (5.9:1) */
  --red-hover: #a90d16;
  --ink: #17231c;
  --muted: #52615a;
  --line: #d9e5de;
  --bg: #ffffff;
  --bg-alt: #f3f9f5;
  --on-green: #d7f0e2;
  --radius: 12px;
  --wrap: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --font-ur: "Jameel Noori Nastaleeq", "Noto Nastaliq Urdu", "Urdu Typesetting", "Noto Naskh Arabic", "Segoe UI", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 1rem; overflow-x: hidden; }
img, iframe { max-width: 100%; }
a { color: var(--green-text); }
a:hover { color: var(--green-deep); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 3.5vw, 1.85rem); color: var(--green-deep); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 640px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--red-strong); color: #fff; padding: .5em 1em; z-index: 10; }
.skip:focus { left: 8px; }
.plain { list-style: none; padding: 0; margin: 0 0 1em; }
.mt { margin-top: 2rem; }
.motto { font-family: var(--font-ur); font-size: 1.15em; line-height: 1.4; }

/* Buttons */
.btn { display: inline-block; padding: .7em 1.4em; border-radius: 999px; text-decoration: none; border: 2px solid transparent; cursor: pointer; font: inherit; font-weight: 700; transition: background-color .15s, color .15s; }
.btn-accent { background: var(--red-strong); color: #fff; }
.btn-accent:hover { background: var(--red-hover); color: #fff; }
.btn-ghost { border-color: #fff; color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--green-deep); }
.btn-ghost-dark { border-color: var(--green-text); color: var(--green-text); }
.btn-ghost-dark:hover { background: var(--green-text); color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.link-arrow { font-weight: 700; text-decoration: none; }
.link-arrow::after { content: " →"; }

/* Header: red stripe on top, green rule below, like the crest's rings */
.site-header { background: #fff; border-top: 4px solid var(--red); border-bottom: 3px solid var(--green); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 70px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); min-width: 0; flex: 1 1 0; padding: .35rem 0; }
.logo-mark { width: 52px; height: 52px; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-weight: 800; font-size: 1.02rem; line-height: 1.2; color: var(--green-deep); }
.brand-sub { font-size: .78rem; color: var(--red-strong); font-weight: 600; }
.menu-toggle { background: var(--green-tint); border: 1px solid var(--line); border-radius: 8px; padding: .45em .9em; font: inherit; font-weight: 700; color: var(--green-deep); cursor: pointer; }
.site-nav { display: none; width: 100%; padding-bottom: 1rem; }
.site-nav.open { display: block; }
.site-nav ul { list-style: none; margin: 0 0 .75rem; padding: 0; }
.site-nav li a { display: block; padding: .6em 0; text-decoration: none; color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--line); }
.site-nav a[aria-current="page"] { color: var(--green-text); }

@media (max-width: 400px) {
  .logo-mark { width: 42px; height: 42px; }
  .brand-name { font-size: .9rem; }
  .header-inner { gap: .5rem; }
}

@media (min-width: 960px) {
  .header-inner { flex-wrap: nowrap; }
  .brand { flex: 0 1 auto; }
  .menu-toggle { display: none; }
  .site-nav { display: flex; align-items: center; gap: 1.25rem; width: auto; padding: 0; }
  .site-nav ul { display: flex; gap: 1.1rem; margin: 0; }
  .site-nav li a { border: 0; padding: .3em 0; border-bottom: 3px solid transparent; }
  .site-nav li a:hover { color: var(--green-text); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--red); }
}

/* Hero: deep green with faint sunburst rays, echoing the crest */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 3.5rem 0 3rem;
  background:
    repeating-conic-gradient(from 0deg at 85% 45%, rgba(255,255,255,.045) 0deg 4deg, transparent 4deg 10deg),
    linear-gradient(135deg, var(--green) 0%, var(--green-deep) 55%, var(--green-night) 100%);
}
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.hero .lead { color: var(--on-green); max-width: 40rem; font-size: 1.1rem; }
.hero-motto { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; font-size: 1.35rem; margin-bottom: .8rem; }
.hero-motto span:not(.motto) { font-size: .9rem; color: var(--on-green); letter-spacing: .04em; }
.hero-logo { display: none; justify-self: center; }
.hero-logo img { width: 260px; height: 260px; border-radius: 50%; background: #fff; padding: 14px; box-shadow: 0 0 0 6px rgba(255,255,255,.18), 0 18px 40px rgba(0,0,0,.25); }
@media (min-width: 860px) {
  .hero { padding: 4.5rem 0 4rem; }
  .hero-grid { grid-template-columns: 1fr auto; }
  .hero-logo { display: block; }
}
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 800; color: #fff; background: var(--red-strong); padding: .3em .8em; border-radius: 999px; }

.page-head { background: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%); color: #fff; padding: 2.5rem 0 2rem; border-bottom: 4px solid var(--red); }
.page-head h1 { margin-bottom: .3em; }
.page-head .lead { color: var(--on-green); margin: 0; }

.highlight { background: var(--red-strong); color: #fff; }
.highlight-inner { padding-top: 1.1rem; padding-bottom: 1.1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; }
.highlight-kicker { margin: 0; font-weight: 800; text-transform: uppercase; font-size: .8rem; letter-spacing: .06em; background: #fff; color: var(--red-strong); padding: .2em .7em; border-radius: 999px; }
.highlight-text { margin: 0; flex: 1 1 22rem; }
.highlight .link-arrow { color: #fff; }

/* Sections */
.section { padding: 3rem 0; }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.section-head h2 { margin: 0; }
.section > .wrap > h2::after, .section-head h2::after { content: ""; display: block; width: 48px; height: 4px; margin-top: .45rem; background: var(--red); border-radius: 2px; }
.grid-2, .grid-3 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--green); border-radius: var(--radius); padding: 1.25rem; }
.card > :last-child { margin-bottom: 0; }
.card h3 { color: var(--green-deep); }
.campus { display: flex; flex-direction: column; }
.campus-address { color: var(--muted); }
.campus-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding-top: .25rem; }
.icon { width: 1.1em; height: 1.1em; flex: none; }
.btn-directions, .btn-call { display: inline-flex; align-items: center; gap: .45em; padding: .55em 1.1em; font-size: .95rem; }
.btn-directions { background: var(--green-text); color: #fff; }
.btn-directions:hover { background: var(--green-deep); color: #fff; }
.btn-call { border-color: var(--green-text); color: var(--green-text); background: #fff; }
.btn-call:hover { background: var(--green-tint); color: var(--green-deep); }
.campus-hq { border-top-color: var(--red); background: linear-gradient(135deg, #fff 60%, var(--green-tint)); }
.campus-badge { display: inline-block; align-self: flex-start; margin-bottom: .6rem; background: var(--red-strong); color: #fff; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: .2em .7em; border-radius: 999px; }
.hq-row { max-width: 560px; }
@media (min-width: 640px) { .campus-hq .campus-actions .btn { font-size: 1rem; } }
.prose { max-width: 46rem; }
.prose h2 { margin-top: 2rem; }
.prose h2:first-child { margin-top: 0; }
.prose li::marker { color: var(--red); }

/* Leadership messages */
.message { display: grid; gap: 1.5rem; align-items: start; padding: 2rem 0; }
.message + .message { border-top: 1px solid var(--line); }
.message-photo { margin: 0 14px 14px 0; position: relative; max-width: 300px; isolation: isolate; }
.message-photo img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); border-bottom: 5px solid var(--red); box-shadow: 0 12px 30px rgba(0, 61, 32, .18); }
.message-photo::before { content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 3px solid var(--green); border-radius: var(--radius); z-index: -1; }
.message-photo--director img { object-position: 28% 35%; }
.message-photo--deputy-director img { object-position: 50% 25%; }
.message-body h2 { margin-bottom: .8rem; }
.message-body p { max-width: 42rem; }
.signature { display: flex; flex-direction: column; margin-top: 1.25rem; padding-left: .9rem; border-left: 4px solid var(--red); line-height: 1.35; }
.signature strong { color: var(--green-deep); font-size: 1.05rem; }
.signature span { color: var(--muted); font-size: .92rem; }
@media (min-width: 860px) {
  .message-photo { max-width: none; }
  .message-photo img { aspect-ratio: 4 / 5; }
  .message { grid-template-columns: 340px 1fr; gap: 3rem; }
  .message-alt { grid-template-columns: 1fr 340px; }
  .message-alt .message-photo { order: 2; }
  .message-alt .message-photo::before { inset: 14px 14px -14px -14px; }
}

.director-teaser { background: linear-gradient(180deg, #fff 0%, var(--green-tint) 100%); }
.teaser-inner { display: grid; gap: 1.75rem; align-items: center; }
.director-teaser .message-photo { max-width: 300px; }
.director-teaser blockquote { margin: 1rem 0 0; font-size: 1.15rem; line-height: 1.65; color: var(--ink); position: relative; padding-left: 2.2rem; }
.director-teaser blockquote::before { content: "\201C"; position: absolute; left: 0; top: -.35em; font-size: 3.5rem; line-height: 1; color: var(--red); font-family: Georgia, serif; }
@media (min-width: 860px) { .teaser-inner { grid-template-columns: 300px 1fr; gap: 3.5rem; } }

.cta { background: var(--green-deep); color: #fff; padding: 3rem 0; text-align: center; border-top: 4px solid var(--red); }
.cta h2 { color: #fff; }
.cta p { color: var(--on-green); }

/* News */
.news-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.news-meta { font-size: .88rem; color: var(--muted); margin-bottom: .4em; }
.tag { display: inline-block; background: var(--green-tint); border: 1px solid var(--line); border-radius: 999px; padding: 0 .6em; font-weight: 700; color: var(--green-text); margin-right: .4em; }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.timeline li { display: flex; gap: 1rem; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--red); border-radius: var(--radius); padding: .9rem 1rem; }
.tl-year { font-weight: 800; color: var(--green-text); flex: none; min-width: 3.2rem; }

.steps { padding-left: 1.2rem; }
.steps li { margin-bottom: .5em; }

/* Tables */
.table-wrap { overflow-x: auto; margin-bottom: 1rem; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: .65rem .75rem; border-bottom: 1px solid var(--line); }
th { background: var(--green-deep); color: #fff; }
@media (max-width: 639px) {
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; left: -9999px; }
  tr { border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: var(--radius); margin-bottom: .75rem; padding: .5rem 0; }
  td { border: 0; padding: .25rem .9rem; }
  td:first-child { font-weight: 700; color: var(--green-deep); }
}

/* Contact */
.contact-grid { display: grid; gap: 2rem; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 3fr 2fr; } }
.map-wrap iframe { width: 100%; height: 360px; border: 0; border-radius: var(--radius); border-top: 4px solid var(--green); }

/* Form */
.form { display: grid; gap: 1rem; }
.field label { display: block; font-weight: 700; margin-bottom: .3rem; }
.field input, .field select, .field textarea { width: 100%; font: inherit; padding: .65rem .75rem; border: 1px solid #b4c4bb; border-radius: 8px; background: #fff; color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); outline: 3px solid rgba(0,140,69,.25); outline-offset: 0; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--red-strong); }
.hint { font-size: .85rem; color: var(--muted); margin: .3rem 0 0; }
.optional { font-weight: 400; color: var(--muted); }
.hp { position: absolute; left: -9999px; }
.form-status { padding: .9rem 1rem; border-radius: 8px; }
.form-status.ok { background: var(--green-tint); color: var(--green-deep); }
.form-status.err { background: #fdecec; color: #8f0d14; }
.fallback { margin-top: 1rem; color: var(--muted); }
.empty { text-align: center; padding: 2.5rem 1.25rem; }

/* Animation start state. The "anim" class is set by anim-ready.js only when
   motion is allowed, and removed if anime.js fails, so content never stays hidden. */
html.anim .hero-grid > div > *,
html.anim .page-head .wrap > *,
html.anim .hero-logo img,
html.anim :is(.teaser-inner, .messages .wrap, .highlight-inner, .hq-row, .grid-2, .grid-3, .news-list, .timeline, .prose, .form, .contact-grid, .cta-inner, .empty) > * { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  html.anim * { opacity: 1 !important; transform: none !important; }
}

/* Footer */
.site-footer { background: var(--green-night); color: var(--on-green); padding-top: 2.5rem; border-top: 4px solid var(--red); }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-logo { width: 72px; height: 72px; border-radius: 50%; background: #fff; padding: 4px; margin-bottom: .75rem; }
.footer-name { color: #fff; font-weight: 800; font-size: 1.05rem; margin-bottom: .2em; }
.footer-motto { color: var(--on-green); }
.footer-heading { color: #fff; font-weight: 800; margin-bottom: .4em; }
.footer-heading::after { content: ""; display: block; width: 32px; height: 3px; margin-top: .3rem; background: var(--red); border-radius: 2px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding-top: 1rem; padding-bottom: 1.5rem; margin-top: 1rem; font-size: .88rem; }
