/* Firdous Academy design system.
   The lamp room: deep maroon, aged cream, brass. Zellige appears only in the
   band and the star ornaments. One signature element per page: the hanging
   lit fanous. Everything else stays quiet. */

:root {
  --maroon: #521c22;        /* page ground */
  --maroon-deep: #40121a;   /* footer, edges */
  --maroon-hero-1: #6f272e; /* hero radial center */
  --maroon-hero-2: #5e2026;
  --cream: #f0dfc9;         /* body text */
  --cream-bright: #f3e3cf;  /* headings */
  --cream-muted: #cfa694;   /* secondary text */
  --brass: #c09355;
  --brass-bright: #e8c98a;
  --brass-deep: #8a6a33;
  --terracotta: #b5543a;    /* zellige only */
  --blush: #d4907c;         /* zellige only */
  --line: rgba(192, 147, 85, 0.4);
  --line-soft: rgba(192, 147, 85, 0.24);
  --panel: rgba(255, 244, 228, 0.045);
  --panel-bright: rgba(255, 244, 228, 0.08);
  --glow: rgba(240, 178, 74, 0.45);
  --font-display: "Cormorant", "Iowan Old Style", Georgia, serif;
  --font-body: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  --font-arabic: "Amiri", "Scheherazade New", serif;
  --zellige: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Crect width='44' height='44' fill='%2347161c'/%3E%3Crect x='14' y='14' width='16' height='16' fill='%23b5543a'/%3E%3Crect x='14' y='14' width='16' height='16' fill='%23b5543a' transform='rotate(45 22 22)'/%3E%3Crect x='16.5' y='16.5' width='11' height='11' fill='%23d4907c' transform='rotate(45 22 22)'/%3E%3Crect x='-5' y='-5' width='10' height='10' fill='%232e0d12' transform='rotate(45 0 0)'/%3E%3Crect x='39' y='-5' width='10' height='10' fill='%232e0d12' transform='rotate(45 44 0)'/%3E%3Crect x='-5' y='39' width='10' height='10' fill='%232e0d12' transform='rotate(45 0 44)'/%3E%3Crect x='39' y='39' width='10' height='10' fill='%232e0d12' transform='rotate(45 44 44)'/%3E%3C/svg%3E");
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--maroon);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--brass); color: var(--maroon-deep); }

a { color: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

main { flex: 1 0 auto; }

/* ---------- nav ---------- */

.site-nav {
  max-width: 1060px;
  width: 100%;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--cream-bright);
}

.brand svg { display: block; }

.site-nav nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav nav a {
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-muted);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav nav a:hover { color: var(--cream-bright); border-bottom-color: var(--line); }

.site-nav nav a[aria-current="page"] { color: var(--brass); border-bottom-color: var(--brass); }

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

.hero {
  position: relative;
  text-align: center;
  padding: 26px 24px 78px;
  background: radial-gradient(1100px 560px at 50% -120px, var(--maroon-hero-1) 0%, var(--maroon-hero-2) 46%, rgba(94, 32, 38, 0) 76%);
  overflow: hidden;
}

.lantern-hang {
  position: relative;
  width: 64px;
  margin: 0 auto 6px;
  transform-origin: 32px -60px;
  animation: sway 9s ease-in-out infinite alternate;
}

.lantern-hang::before {
  content: "";
  position: absolute;
  inset: -34px -46px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, rgba(240, 178, 74, 0) 62%);
  animation: breathe 12s ease-in-out infinite alternate;
}

.lantern-hang svg { position: relative; display: block; }

@keyframes sway {
  from { transform: rotate(-1.5deg); }
  to { transform: rotate(1.5deg); }
}

@keyframes breathe {
  from { opacity: 0.72; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lantern-hang, .lantern-hang::before { animation: none; }
  .door, .lesson-row { transition: none; }
}

.hero-eyebrow {
  margin: 26px 0 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brass);
}

.hero-title {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: clamp(46px, 7vw, 66px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--cream-bright);
}

.hero-line {
  margin: 16px auto 0;
  max-width: 44ch;
  font-size: 16px;
  color: var(--cream-muted);
  text-wrap: balance;
}

.hero .btn-brass { margin-top: 28px; }

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

.btn-brass {
  display: inline-block;
  background: var(--brass);
  color: var(--maroon-deep);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 13px 28px;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-brass:hover { background: var(--brass-bright); transform: translateY(-1px); }

/* ---------- zellige band ---------- */

.zellige-band {
  height: 34px;
  background-image: var(--zellige);
  background-size: 34px 34px;
  background-repeat: repeat-x;
  background-position: center;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

/* ---------- class doors ---------- */

.doors-wrap { padding: 56px 24px 84px; }

.courses-head {
  margin: 0 0 34px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 31px;
  font-weight: 600;
  color: var(--cream-bright);
}

.doors {
  max-width: 880px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

.door {
  display: block;
  text-decoration: none;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px 999px 16px 16px;
  padding: 52px 26px 30px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.door:hover {
  transform: translateY(-4px);
  border-color: var(--brass);
  background: var(--panel-bright);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.35);
}

.star8 {
  position: relative;
  width: 15px;
  height: 15px;
  margin: 0 auto 16px;
}

.star8::before,
.star8::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--terracotta);
}

.star8::after { transform: rotate(45deg); }

.door-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 31px;
  font-weight: 600;
  color: var(--cream-bright);
}

.door-grades {
  margin: 8px 0 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
}

.door-blurb {
  margin: 12px auto 0;
  max-width: 30ch;
  font-size: 14px;
  color: var(--cream-muted);
}

.door-open {
  display: inline-block;
  margin-top: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
}

.door-open::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-top: 1.5px solid var(--brass);
  border-right: 1.5px solid var(--brass);
  transform: rotate(45deg) translateY(-1px);
}

/* ---------- class pages ---------- */

.page-head {
  text-align: center;
  padding: 48px 24px 10px;
}

.page-head .hero-eyebrow { margin-top: 0; }

.page-title {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: clamp(38px, 5.5vw, 52px);
  font-weight: 600;
  line-height: 1.08;
  color: var(--cream-bright);
}

.page-blurb {
  margin: 14px auto 0;
  max-width: 46ch;
  font-size: 15px;
  color: var(--cream-muted);
}

.course-for {
  margin: 14px 0 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--brass);
}

/* ---------- course timeline ---------- */

.timeline {
  max-width: 720px;
  margin: 0 auto;
  padding: 38px 24px 80px;
}

.tl {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.tl::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--line-soft);
}

.tl-week {
  position: relative;
  padding: 0 0 30px 40px;
}

.tl-week:last-child { padding-bottom: 0; }

.tl-node {
  position: absolute;
  left: 0;
  top: 3px;
  width: 15px;
  height: 15px;
}

.tl-node::before,
.tl-node::after {
  content: "";
  position: absolute;
  inset: 2.5px;
  background: var(--terracotta);
}

.tl-node::after { transform: rotate(45deg); }

.tl-week.upcoming .tl-node::before,
.tl-week.upcoming .tl-node::after { background: rgba(212, 144, 124, 0.32); }

.tl-num {
  margin: 0;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
  display: flex;
  align-items: center;
  gap: 10px;
}

.tl-kind {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  border: 1px solid var(--brass-deep);
  border-radius: 999px;
  padding: 2px 8px;
}

.tl-title {
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--cream-bright);
}

.tl-week.upcoming .tl-title {
  color: var(--cream-muted);
  font-weight: 500;
}

.tl-lesson {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.tl-lesson:hover {
  transform: translateY(-2px);
  border-color: var(--brass);
  background: var(--panel-bright);
}

.tl-lesson .tl-title {
  margin: 0;
  flex: 1;
}

.lesson-open {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
}

.lesson-open::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 7px;
  border-top: 1.5px solid var(--brass);
  border-right: 1.5px solid var(--brass);
  transform: rotate(45deg) translateY(-1px);
}

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

.prose {
  max-width: 640px;
  margin: 0 auto;
  padding: 30px 24px 78px;
}

.prose h2 {
  margin: 44px 0 12px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--cream-bright);
}

.prose h2:first-child { margin-top: 10px; }

.prose p {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.75;
}

.prose ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

.prose li {
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 6px;
}

.prose [lang="ar"] {
  font-family: var(--font-arabic);
}

.prose a { color: var(--brass); }

.ayah-panel {
  margin: 26px 0;
  padding: 26px 24px;
  text-align: center;
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
}

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

.ayah-footer {
  flex-shrink: 0;
  margin-top: auto;
  text-align: center;
  background: var(--maroon-deep);
  border-top: 1px solid var(--line-soft);
  padding: 42px 24px 34px;
}

.ayah-ar {
  display: block;
  font-family: var(--font-arabic);
  font-size: 25px;
  line-height: 1.9;
  color: var(--cream-bright);
}

.ayah-tr {
  display: block;
  margin: 10px auto 0;
  max-width: 54ch;
  font-size: 13.5px;
  color: var(--cream-muted);
}

.ayah-ref {
  display: block;
  margin-top: 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
}

.foot-line {
  margin: 26px 0 0;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--cream-muted);
  opacity: 0.85;
}

.foot-line a {
  color: var(--brass);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.foot-line a:hover {
  color: var(--brass-bright);
  border-bottom-color: var(--brass);
}

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

.center-page {
  text-align: center;
  padding: 70px 24px 90px;
}

.center-page .lantern-hang { margin-bottom: 18px; }

.center-page h1 {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 600;
  color: var(--cream-bright);
}

.center-page p {
  margin: 12px auto 26px;
  max-width: 40ch;
  color: var(--cream-muted);
}

/* ---------- responsive ---------- */

@media (max-width: 680px) {
  .doors { grid-template-columns: 1fr; max-width: 420px; }
  .doors-wrap { padding: 44px 20px 64px; }
  .hero { padding-bottom: 62px; }
}

@media (max-width: 520px) {
  .site-nav { justify-content: center; text-align: center; padding: 18px 20px 10px; }
  .site-nav nav { gap: 18px; }
  .tl-lesson { flex-wrap: wrap; gap: 8px; }
  .tl-lesson .tl-title { flex-basis: 100%; }
}
