/* =========================================================
   Aaisha International Academy — Site Stylesheet
   Design concept: "Illuminated Manuscript" — warm parchment
   pages, brown ink typography, and a recurring gold flame
   motif (from the school crest) used as the one signature,
   animated element on the site.
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Colour — derived from the AIA crest (brown cover + gold flame) */
  --ink: #2A1B0E;             /* primary text */
  --cover: #4A2F1C;           /* nav / footer surface */
  --cover-deep: #33200F;      /* darker brown, gradients */
  --flame: #C9963A;           /* primary gold accent */
  --flame-light: #EBCB8C;     /* pale gold highlight */
  --ember: #8F5518;           /* deep amber — links, hover, CTA */
  --parchment: #FBF3E1;       /* page background */
  --parchment-deep: #F1E2BE;  /* alternate section background */
  --paper: #FFFDF8;           /* card surfaces */
  --line: rgba(42, 27, 14, 0.14);
  --shadow: 0 20px 40px -24px rgba(42, 27, 14, 0.45);
  --shadow-sm: 0 8px 20px -12px rgba(42, 27, 14, 0.35);

  /* Type */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

  /* Layout */
  --container: 1180px;
  --radius: 14px;
  --radius-sm: 8px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--ember); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--cover-deep); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--cover-deep);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 { font-size: clamp(2.3rem, 5vw + 1rem, 4rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3vw + 1rem, 2.6rem); }
h3 { font-size: clamp(1.2rem, 1.2vw + 1rem, 1.5rem); }
p { margin: 0 0 1em; }

.lede {
  font-size: clamp(1.05rem, 1vw + 0.9rem, 1.25rem);
  color: #4a3820;
  max-width: 62ch;
}

:focus-visible {
  outline: 3px solid var(--flame);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--alt { background: var(--parchment-deep); }
.section--dark {
  background: linear-gradient(160deg, var(--cover-deep), var(--cover) 65%);
  color: #F5E9CE;
}
.section--dark h2, .section--dark h3 { color: #FFF6E2; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 14px;
}
.section--dark .eyebrow { color: var(--flame-light); }
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: currentColor;
  display: inline-block;
}

.section-head { max-width: 68ch; margin-bottom: 44px; }
.section-head--center { margin-inline: auto; text-align: center; }

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  z-index: 200;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary {
  background: var(--flame);
  color: var(--ink);
}
.btn--primary:hover { background: var(--flame-light); color: var(--ink); }
.btn--ghost {
  background: transparent;
  color: inherit;
  border-color: currentColor;
}
.btn--ghost:hover { background: rgba(255,255,255,0.12); color: inherit; }
.section:not(.section--dark) .btn--ghost { border-color: var(--cover); color: var(--cover-deep); }
.section:not(.section--dark) .btn--ghost:hover { background: var(--cover); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cover-deep);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 12px;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #FFF6E2;
}
.nav__brand img { height: 46px; width: auto; }
.nav__brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.nav__brand-text strong {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  color: #FFF6E2;
}
.nav__brand-text span {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--flame-light);
}

.nav__toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  height: 2px;
  width: 20px;
  margin-inline: auto;
  background: #FFF6E2;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 10px 0 18px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  width: 100%;
  order: 3;
}
.nav__links.is-open { max-height: 420px; }
.nav__links a {
  display: block;
  padding: 12px 4px;
  color: #F5E9CE;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav__links a[aria-current="page"] { color: var(--flame-light); }
.nav__actions { display: none; }

@media (min-width: 900px) {
  .nav { flex-wrap: nowrap; }
  .nav__toggle { display: none; }
  .nav__links {
    flex-direction: row;
    align-items: center;
    max-height: none;
    overflow: visible;
    order: 2;
    width: auto;
    padding: 0;
    gap: 6px;
  }
  .nav__links a {
    border-bottom: none;
    padding: 8px 14px;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease;
  }
  .nav__links a:hover { background: rgba(255,255,255,0.08); color: #fff; }
  .nav__links a[aria-current="page"] {
    background: rgba(201,150,58,0.18);
  }
  .nav__actions {
    display: inline-flex;
    order: 3;
  }
}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, var(--cover-deep) 0%, var(--cover) 55%, #5a3a20 100%);
  color: #FFF6E2;
  padding: clamp(56px, 9vw, 120px) 0 clamp(70px, 10vw, 130px);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-conic-gradient(from 0deg at 82% 18%, rgba(255,214,138,0.10) 0deg 6deg, transparent 6deg 18deg);
  mask-image: radial-gradient(circle at 82% 18%, black 0%, transparent 62%);
  pointer-events: none;
}
.hero__grid {
  position: relative;
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.15fr 0.85fr; gap: 30px; }
}
.hero__eyebrow {
  color: var(--flame-light);
}
.hero p.lede { color: #EFE2C6; }
.hero h1 { color: #FFF9EC; }
.hero h1 em {
  font-style: italic;
  color: var(--flame-light);
}

.hero__flame-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero__glow {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233,181,99,0.35), transparent 70%);
  animation: pulse 4.5s ease-in-out infinite;
}
.hero__flame { width: min(220px, 55vw); position: relative; }
.hero__flame .flame-outer { transform-origin: 50% 100%; animation: flicker-a 3.6s ease-in-out infinite; }
.hero__flame .flame-inner { transform-origin: 50% 100%; animation: flicker-b 2.9s ease-in-out infinite; }

@keyframes flicker-a {
  0%, 100% { transform: scale(1, 1) rotate(0deg); }
  30% { transform: scale(1.02, 0.97) rotate(-1.2deg); }
  60% { transform: scale(0.98, 1.03) rotate(1deg); }
  85% { transform: scale(1.01, 0.99) rotate(-0.6deg); }
}
@keyframes flicker-b {
  0%, 100% { transform: scale(1, 1) rotate(0deg); }
  35% { transform: scale(0.97, 1.03) rotate(1.4deg); }
  65% { transform: scale(1.03, 0.96) rotate(-1deg); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.08); }
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  background: linear-gradient(165deg, var(--cover-deep), var(--cover) 80%);
  color: #FFF6E2;
  padding: 56px 0 68px;
}
.page-hero .eyebrow { color: var(--flame-light); }
.page-hero h1 { color: #FFF9EC; margin-bottom: 12px; }
.page-hero p { color: #EFE2C6; max-width: 60ch; margin: 0; }
.breadcrumb {
  font-size: 0.85rem;
  color: var(--flame-light);
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--flame-light); }

/* ---------- Facts strip ---------- */
.facts {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.facts__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  padding-block: 34px;
}
@media (min-width: 700px) {
  .facts__grid { grid-template-columns: repeat(4, 1fr); }
}
.facts__item { text-align: center; }
.facts__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2vw + 1rem, 2.1rem);
  color: var(--ember);
  font-weight: 600;
}
.facts__label {
  font-size: 0.85rem;
  color: #5a4326;
  letter-spacing: 0.01em;
}

/* ---------- Divider (flame emblem) ---------- */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 0 auto 44px;
  max-width: 340px;
}
.divider__line { flex: 1; height: 1px; background: var(--line); }
.divider img { width: 18px; height: auto; opacity: 0.9; }
.section--dark .divider__line { background: rgba(255,255,255,0.18); }

/* ---------- Cards & grids ---------- */
.grid {
  display: grid;
  gap: 26px;
}
@media (min-width: 640px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  height: 100%;
}
.card__icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--parchment-deep);
  color: var(--ember);
  margin-bottom: 18px;
}
.card__icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card--tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ember);
  background: var(--parchment-deep);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

/* Split (image + text) layout */
.split {
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 60px; }
  .split--reverse .split__media { order: 2; }
}
.split__media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  height: auto;
}
.split__media figcaption {
  font-size: 0.85rem;
  color: #5a4326;
  margin-top: 10px;
}

/* ---------- Values / feature list ---------- */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.checklist svg {
  flex-shrink: 0;
  width: 20px; height: 20px;
  margin-top: 3px;
  color: var(--ember);
}

/* ---------- Steps (admissions) ---------- */
.steps { display: grid; gap: 22px; counter-reset: step; }
@media (min-width: 780px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 24px 26px;
}
.step__index {
  font-family: var(--font-display);
  font-size: 2.1rem;
  color: var(--flame);
  display: block;
  margin-bottom: 10px;
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 700px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item figcaption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 14px;
  font-size: 0.82rem;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(20,12,4,0.82));
}
.gallery-item--wide { grid-column: span 2; }
.gallery-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 100%;
  width: 100%;
  color: var(--ember);
  background:
    repeating-linear-gradient(135deg, var(--parchment-deep), var(--parchment-deep) 10px, #EADFC0 10px, #EADFC0 20px);
  font-size: 0.8rem;
  text-align: center;
  padding: 16px;
}
.gallery-placeholder svg { width: 30px; height: 30px; opacity: 0.75; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--cover-deep), var(--cover));
  color: #FFF6E2;
  border-radius: var(--radius);
  padding: clamp(34px, 5vw, 56px);
  display: grid;
  gap: 24px;
  align-items: center;
  text-align: center;
}
@media (min-width: 780px) {
  .cta-band { grid-template-columns: 1.4fr auto; text-align: left; }
}
.cta-band h2 { color: #FFF9EC; margin-bottom: 6px; }
.cta-band p { color: #EFE2C6; margin: 0; }
.cta-band .btn-row { margin-top: 0; justify-content: center; }
@media (min-width: 780px) { .cta-band .btn-row { justify-content: flex-end; } }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  gap: 30px;
}
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.1fr; } }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-list .card__icon { margin-bottom: 0; flex-shrink: 0; }
.contact-list h3 { margin-bottom: 4px; font-size: 1.05rem; }
.contact-list p { margin: 0; color: #4a3820; }
.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  height: 100%;
  min-height: 340px;
}
.map-frame iframe { width: 100%; height: 100%; min-height: 340px; border: 0; display: block; }
.note-flag {
  font-size: 0.82rem;
  color: var(--ember);
  background: var(--parchment-deep);
  border: 1px dashed var(--flame);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 10px;
}

/* ---------- Table (academics) ---------- */
.stage-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.stage-table th, .stage-table td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.stage-table th {
  background: var(--cover-deep);
  color: #FFF6E2;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.stage-table tr:last-child td { border-bottom: none; }
.table-scroll { overflow-x: auto; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--cover-deep);
  color: #E8D9B8;
  padding: 56px 0 26px;
}
.footer__grid {
  display: grid;
  gap: 36px;
}
@media (min-width: 700px) { .footer__grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer__brand { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.footer__brand img { height: 42px; }
.footer__brand strong { font-family: var(--font-display); color: #FFF6E2; font-size: 1.1rem; }
.site-footer h4 {
  color: #FFF6E2;
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: #E8D9B8; text-decoration: none; }
.site-footer a:hover { color: var(--flame-light); }
.footer__bottom {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #C9B78C;
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.stack { display: grid; gap: 16px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #FFF6E2;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
}
.section:not(.section--dark) .badge {
  background: var(--parchment-deep);
  border-color: var(--line);
  color: var(--cover-deep);
}
