/* ============================================================
   THEME TOKENS — tweak colors here.
   ============================================================ */
:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --card: #ffffff;
  --text: #1a1d21;
  --muted: #5b6572;
  --border: #e6e8ec;
  --brand: #1f7a4d;
  --brand-ink: #ffffff;
  --shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .05);
  --radius: 14px;
  --maxw: 1080px;
}
:root[data-theme="dark"] {
  --bg: #0f1115;
  --surface: #151922;
  --card: #171b23;
  --text: #e8ebf0;
  --muted: #9aa4b2;
  --border: #262c38;
  --brand: #4ade80;
  --brand-ink: #0b0e14;
  --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
}

* { 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(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin: .2em 0 .4em; letter-spacing: -.02em; }
h3 { margin: 0 0 .4em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 600; color: var(--brand); }
.bismillah { font-size: clamp(1.1rem, 5vw, 1.6rem); color: var(--brand); margin: 0 0 .35rem; line-height: 1.4; text-align: center; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--text); font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand-mark { font-size: 1.25rem; }
.brand-logo { height: 40px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--text); padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .95rem; }
.nav a:hover { background: var(--surface); text-decoration: none; }
.nav a.active { color: var(--brand); }
.nav-controls { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  width: 40px; height: 40px; border-radius: 10px; cursor: pointer; font-size: 1.1rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--surface); }
.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 11px 18px; border-radius: 10px; font-weight: 600; cursor: pointer; border: 1px solid transparent; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface); }
.nav-cta { padding: 8px 14px; }

/* ---------- Layout blocks ---------- */
main { min-height: 60vh; padding: 40px 20px 64px; }
.page { max-width: 820px; }
.hero { display: grid; gap: 20px; padding: 48px 0 24px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }

.cards, .grade-grid, .team-grid { display: grid; gap: 18px; margin-top: 32px; }
.cards { grid-template-columns: repeat(3, 1fr); }
.grade-grid { grid-template-columns: repeat(2, 1fr); }
.team-grid { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
}
.checklist { padding-left: 0; list-style: none; }
.checklist li { padding-left: 28px; position: relative; margin: 8px 0; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }

/* ---------- Team ---------- */
.team-card { text-align: center; }
.avatar { font-size: 2.4rem; }

/* ---------- Calculator ---------- */
.calculator { max-width: 480px; margin-top: 24px; }
.calculator label { display: block; font-weight: 600; margin-bottom: 8px; }
.stepper { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.stepper input {
  width: 90px; text-align: center; font-size: 1.1rem; padding: 9px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text);
}
.calc-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border); color: var(--muted); }
.calc-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.2rem; margin-top: 14px; }

/* ---------- Calendar ---------- */
.calendar-list { display: grid; gap: 12px; margin-top: 24px; }
.event { display: flex; gap: 16px; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); }
.event-date { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 56px; padding: 8px; background: var(--surface); border-radius: 10px; }
.event-mon { font-size: .75rem; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.event-day { font-size: 1.4rem; font-weight: 800; line-height: 1; }
.event-tag { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 999px; background: var(--surface); color: var(--muted); vertical-align: middle; }
.event-tag.holiday { background: #fde68a33; color: #b45309; }
.event-tag.event { background: #bfdbfe33; color: #1d4ed8; }
.event-tag.exam { background: #fecaca33; color: #b91c1c; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 24px; }
.gallery-item { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--card); }
.gallery-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.gallery-item figcaption { padding: 8px 12px; font-size: .85rem; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { margin-top: 24px; display: grid; gap: 10px; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; }
.faq-item summary { cursor: pointer; font-weight: 600; }
.faq-item[open] summary { margin-bottom: 8px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 36px 20px 12px; }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-bottom { padding: 12px 20px 28px; font-size: .85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .cards, .grade-grid, .team-grid, .footer-inner { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 12px 20px;
    margin: 0; display: none; box-shadow: var(--shadow); max-height: calc(100vh - 64px); overflow-y: auto;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }              /* larger tap targets */
  .nav .nav-cta { text-align: center; margin-top: 6px; }
}

/* Small phones: keep the header on one tidy line */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  main { padding: 28px 16px 48px; }
  .brand-text { font-size: .95rem; line-height: 1.1; }
  .brand-logo { height: 34px; }
  .hero { padding: 32px 0 16px; }
  .hero-actions .btn { flex: 1 1 auto; text-align: center; }  /* full-width stacked buttons */
  .gallery-grid { grid-template-columns: 1fr; }
  .event-date { min-width: 48px; }
}

/* Very narrow (<360px): abbreviate the brand so nothing overflows */
@media (max-width: 360px) {
  .brand-text { font-size: .85rem; }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
