/* ============================================================
   Al-Muzammil School — shared stylesheet
   Palette: deep green institutional + warm gold accent on cream
   Type:    Lora (humanist serif headings) + Inter (clean body)
   ============================================================ */

:root {
  --green-900: #0f3d2e;
  --green-700: #1f5c43;
  --green-600: #277552;
  --green-50:  #eaf3ee;
  --gold:      #c08a2d;
  --gold-soft: #f3e7cf;
  --cream:     #fbf8f1;
  --paper:     #ffffff;
  --ink:       #1d2520;
  --muted:     #586159;
  --line:      #e3e0d6;
  --shadow-sm: 0 1px 2px rgba(15, 61, 46, .06), 0 2px 8px rgba(15, 61, 46, .05);
  --shadow-md: 0 8px 28px rgba(15, 61, 46, .10);
  --radius:    14px;
  --radius-lg: 22px;
  --maxw:      1140px;
  --space:     clamp(3.5rem, 8vw, 6rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

h1, h2, h3, h4 {
  font-family: "Lora", Georgia, "Times New Roman", serif;
  color: var(--green-900);
  line-height: 1.18;
  font-weight: 600;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); letter-spacing: -.5px; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1rem; max-width: 65ch; }

a { color: var(--green-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

.section { padding-block: var(--space); }

.eyebrow {
  display: inline-block;
  font-family: "Inter", sans-serif;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .6rem;
}

.lead { font-size: 1.18rem; color: var(--muted); }

.center { text-align: center; }
.center p { margin-inline: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 600;
  font-size: 1rem;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-900); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--green-900); border-color: var(--green-700); }
.btn-ghost:hover { background: var(--green-50); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #a8771f; box-shadow: var(--shadow-md); }

.btn:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 241, .9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px;
  flex: none;
  display: grid; place-items: center;
  background: var(--green-700);
  color: #fff;
  border-radius: 12px;
  font-family: "Lora", serif;
  font-weight: 600;
  font-size: 1.25rem;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: "Lora", serif; font-weight: 600; color: var(--green-900); font-size: 1.12rem; }
.brand-sub { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-block;
  padding: .5rem .85rem;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: .98rem;
  transition: background-color .2s ease, color .2s ease;
}
.nav-links a:hover { background: var(--green-50); color: var(--green-900); }
.nav-links a.active { color: var(--green-900); font-weight: 600; }
.nav-links a.active::after {
  content: ""; display: block; height: 2px; width: 60%;
  background: var(--gold); border-radius: 2px; margin-top: 2px;
}
.nav-cta { margin-left: .4rem; }

.nav-toggle {
  display: none;
  background: none; border: 1.5px solid var(--line);
  border-radius: 10px; padding: .5rem; cursor: pointer;
  color: var(--green-900);
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: .1rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: .6rem 1rem 1.1rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .8rem .85rem; font-size: 1.05rem; }
  .nav-links a.active::after { display: none; }
  .nav-cta { margin: .4rem 0 0; }
  .nav-cta .btn { width: 100%; justify-content: center; }
}

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, var(--gold-soft), transparent 60%),
    linear-gradient(180deg, var(--green-50), var(--cream) 70%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.hero-copy h1 { margin-bottom: .35em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero-media { position: relative; }
.hero-media img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.hero-badge {
  position: absolute;
  bottom: -18px; left: -10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: .8rem 1.1rem;
  display: flex; align-items: center; gap: .7rem;
  max-width: 240px;
}
.hero-badge .dot { width: 38px; height: 38px; border-radius: 10px; background: var(--green-50); color: var(--green-700); display: grid; place-items: center; flex: none; }
.hero-badge strong { display: block; color: var(--green-900); font-size: .95rem; }
.hero-badge span { font-size: .8rem; color: var(--muted); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .hero-badge { left: auto; right: 12px; }
}

/* ---------- generic page header ---------- */
.page-head {
  background: linear-gradient(180deg, var(--green-900), var(--green-700));
  color: #fff;
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
.page-head h1 { color: #fff; }
.page-head p { color: rgba(255,255,255,.85); max-width: 60ch; margin-bottom: 0; }
.page-head .eyebrow { color: var(--gold-soft); }
.crumbs { font-size: .85rem; color: rgba(255,255,255,.7); margin-bottom: 1rem; }
.crumbs a { color: rgba(255,255,255,.9); }

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 1.4rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 920px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card.hoverable:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #d6d2c4; }
.card h3 { margin-bottom: .35rem; }
.card p { color: var(--muted); margin-bottom: 0; }
.icon-badge {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--green-50);
  color: var(--green-700);
  display: grid; place-items: center;
  margin-bottom: 1rem;
}
.icon-badge.gold { background: var(--gold-soft); color: var(--gold); }

/* ---------- split media+text ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.split img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); aspect-ratio: 5/4; object-fit: cover; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat { text-align: center; padding: 1.2rem .6rem; }
.stat .num { font-family: "Lora", serif; font-size: clamp(2rem, 4vw, 2.8rem); color: var(--green-700); font-weight: 600; line-height: 1; }
.stat .label { color: var(--muted); font-size: .92rem; margin-top: .4rem; }
@media (max-width: 620px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- band / CTA ---------- */
.band {
  background:
    radial-gradient(900px 380px at 15% 120%, rgba(192,138,45,.25), transparent 60%),
    var(--green-900);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(2.2rem, 5vw, 3.4rem);
  text-align: center;
}
.band h2 { color: #fff; }
.band p { color: rgba(255,255,255,.85); margin-inline: auto; }
.band .hero-actions { justify-content: center; }

/* ---------- lists ---------- */
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.ticks li { position: relative; padding-left: 2rem; color: var(--ink); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .15rem;
  width: 1.35rem; height: 1.35rem; border-radius: 50%;
  background: var(--green-50);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231f5c43' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}

/* ---------- timeline (academics levels) ---------- */
.level { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; padding: 1.6rem 0; border-top: 1px solid var(--line); }
.level:first-child { border-top: 0; }
.level h3 { margin: 0; }
.level .grades { color: var(--gold); font-weight: 600; font-size: .9rem; margin-top: .2rem; }
.level p { margin-bottom: 0; }
@media (max-width: 700px) { .level { grid-template-columns: 1fr; gap: .5rem; } }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .92rem; color: var(--green-900); }
.field input, .field textarea, .field select {
  font: inherit;
  padding: .8rem .9rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--green-600);
  outline: none;
  box-shadow: 0 0 0 3px var(--green-50);
}
.field textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: .88rem; color: var(--muted); }
.form-status { margin-top: 1rem; padding: .9rem 1.1rem; border-radius: 10px; display: none; }
.form-status.show { display: block; }
.form-status.ok { background: var(--green-50); color: var(--green-900); border: 1px solid #bfe0cd; }

/* ---------- contact info ---------- */
.info-row { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row .icon-badge { margin: 0; flex: none; }
.info-row a { font-weight: 600; }
.info-row span.small { color: var(--muted); font-size: .9rem; }

.map-wrap { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.map-wrap iframe { display: block; width: 100%; height: 100%; min-height: 320px; border: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--green-900); color: rgba(255,255,255,.78); margin-top: var(--space); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.site-footer h4 { color: #fff; font-family: "Inter", sans-serif; font-size: .95rem; letter-spacing: .04em; margin-bottom: 1rem; }
.site-footer a { color: rgba(255,255,255,.78); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.foot-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.foot-brand .brand-mark { background: rgba(255,255,255,.12); }
.foot-brand .brand-name { color: #fff; }
.foot-brand p { color: rgba(255,255,255,.7); font-size: .95rem; margin-top: 1rem; }
.foot-contact { display: grid; gap: .55rem; font-size: .95rem; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.14); padding-block: 1.2rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: rgba(255,255,255,.6); }
.pef-chip { display: inline-flex; align-items: center; gap: .5rem; background: rgba(255,255,255,.1); padding: .4rem .8rem; border-radius: 999px; font-size: .82rem; color: #fff; font-weight: 500; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

.skip-link {
  position: absolute; left: -999px; top: .5rem;
  background: var(--green-900); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: .5rem; }
