/* ===== Design tokens ===== */
:root {
  --navy-900: #0c1938;
  --navy-800: #142a63;
  --navy-700: #1b3a7a;
  --navy-600: #26478f;
  --navy-100: #e8ecf7;
  --navy-050: #f2f4fa;
  --gold-700: #8a6a12;
  --gold-600: #ad8419;
  --gold-500: #c9a227;
  --gold-400: #d9b94f;
  --gold-300: #e8c766;
  --gold-100: #f6ecc9;
  --ivory-50: #fbf7ee;
  --ivory-100: #f4ecda;
  --ink-900: #171a23;
  --ink-600: #4a5164;
  --ink-400: #7b8194;
  --line: rgba(23, 26, 35, 0.1);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 2px 10px rgba(12, 25, 56, 0.06), 0 10px 30px rgba(12, 25, 56, 0.06);
  --font-display: "Amiri", "Times New Roman", serif;
  --font-body: "Tajawal", "Segoe UI", sans-serif;
  --font-kufi: "Reem Kufi", var(--font-body);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ivory-50);
  color: var(--ink-900);
  font-family: var(--font-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy-900);
  margin: 0 0 0.5em;
  line-height: 1.35;
}

h1 { font-size: clamp(2.1rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--ink-600); }

.eyebrow {
  font-family: var(--font-kufi);
  font-weight: 700;
  color: var(--gold-700);
  letter-spacing: 0.04em;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--gold-500);
  display: inline-block;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section--navy {
  background: var(--navy-900);
  color: var(--ivory-100);
}
.section--navy h2, .section--navy h3 { color: #fff; }
.section--navy p { color: rgba(244, 236, 218, 0.78); }
.section--tint { background: var(--navy-050); }

/* ===== Signature motif: eight-point star seam ===== */
.star-seam {
  height: 26px;
  width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='26' viewBox='0 0 52 26'%3E%3Cg fill='none' stroke='%23C9A227' stroke-width='1.4'%3E%3Cpath d='M13 3l2.4 5.2L21 10l-5.6 1.8L13 17l-2.4-5.2L5 10l5.6-1.8z'/%3E%3Ccircle cx='39' cy='13' r='4.4'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center;
  background-size: 52px 26px;
  opacity: 0.9;
}
.star-seam--dark { filter: brightness(1.4); }

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img { width: 46px; height: 46px; object-fit: contain; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy-900);
}
.brand__sub {
  font-family: var(--font-kufi);
  font-size: 0.72rem;
  color: var(--gold-700);
  margin-top: 2px;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-weight: 500;
}
.nav__links a {
  color: var(--ink-600);
  font-size: 0.98rem;
  position: relative;
  padding: 4px 0;
}
.nav__links a.active,
.nav__links a:hover { color: var(--navy-800); }
.nav__links a.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--gold-500);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.96rem;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn--gold {
  background: var(--gold-500);
  color: var(--navy-900);
}
.btn--gold:hover { background: var(--gold-400); }
.btn--outline {
  border-color: var(--navy-700);
  color: var(--navy-800);
  background: transparent;
}
.btn--outline:hover { background: var(--navy-050); }
.btn--ghost-light {
  border-color: rgba(255,255,255,0.35);
  color: #fff;
}
.btn--ghost-light:hover { background: rgba(255,255,255,0.08); }

.nav__toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--navy-800);
  cursor: pointer;
}

/* ===== Hero ===== */
.hero {
  padding: 64px 0 40px;
  background:
    radial-gradient(720px 420px at 85% -10%, rgba(201, 162, 39, 0.14), transparent 60%),
    radial-gradient(640px 420px at -10% 110%, rgba(27, 58, 122, 0.10), transparent 60%);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.hero__frame {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px;
  box-shadow: var(--shadow-card);
}
.hero__frame::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 1.5px dashed rgba(201, 162, 39, 0.55);
}
.hero__frame img { border-radius: 50%; background: #fff; padding: 18px; }

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.hero__badges .btn { font-size: 0.9rem; padding: 10px 18px; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 46px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.stat-card b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--navy-800);
}
.stat-card span {
  font-size: 0.86rem;
  color: var(--ink-400);
}

/* ===== Feature / value cards ===== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  box-shadow: var(--shadow-card);
}
.card__icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--navy-900);
  color: var(--gold-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
}

/* ===== Teacher cards ===== */
.grid-teachers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.teacher-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.teacher-card__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 14px;
  background: var(--navy-100);
  color: var(--navy-800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  border: 2px solid var(--gold-300);
}
.teacher-card h3 { font-size: 1.02rem; margin-bottom: 4px; }
.teacher-card span {
  font-size: 0.82rem;
  color: var(--ink-400);
}

/* ===== Detailed teacher cards (homepage preview) ===== */
.grid-teachers-detail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.teacher-detail-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.teacher-detail-card__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--navy-100);
  color: var(--navy-800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  border: 2px solid var(--gold-300);
  margin-bottom: 10px;
}
.teacher-detail-card h3 { font-size: 1.05rem; margin-bottom: 2px; }
.teacher-detail-card__role {
  font-size: 0.85rem;
  color: var(--gold-700);
  font-weight: 700;
  margin-bottom: 12px;
}
.teacher-detail-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-600);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.teacher-detail-card ul li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.teacher-detail-card ul li i {
  color: var(--gold-600);
  margin-top: 4px;
  font-size: 0.78rem;
  flex-shrink: 0;
}

/* ===== Package cards ===== */
.grid-packages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.package-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.package-card--popular {
  border: 2px solid var(--gold-500);
}
.package-card__badge {
  position: absolute;
  top: -13px;
  right: 24px;
  background: var(--gold-500);
  color: var(--navy-900);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 100px;
}
.package-card__count {
  font-family: var(--font-display);
  font-size: 2.1rem;
  color: var(--navy-800);
}
.package-card__count span {
  font-size: 1rem;
  color: var(--ink-400);
  font-family: var(--font-body);
  font-weight: 500;
}
.package-card ul {
  list-style: none;
  padding: 0;
  margin: 6px 0 14px;
  font-size: 0.92rem;
  color: var(--ink-600);
}
.package-card ul li {
  padding: 6px 0;
  border-top: 1px dashed var(--line);
  display: flex;
  gap: 8px;
  align-items: center;
}
.package-card ul li i { color: var(--gold-600); }

/* ===== Timeline / process ===== */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.process::before {
  content: "";
  position: absolute;
  top: 23px;
  right: 12%;
  left: 12%;
  height: 1px;
  background: repeating-linear-gradient(to left, var(--gold-500) 0 8px, transparent 8px 16px);
}
.process__step { text-align: center; padding: 0 12px; position: relative; }
.process__num {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--navy-900);
  color: var(--gold-400);
  font-family: var(--font-display);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  position: relative;
  z-index: 2;
}
.process__step h3 { font-size: 1.02rem; }
.process__step p { font-size: 0.9rem; }

/* ===== Contact ===== */
.contact-panel {
  background: var(--navy-900);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 46px 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 30px;
}
.contact-panel h2 { color: #fff; }
.contact-panel p { color: rgba(244, 236, 218, 0.78); }
.whatsapp-btn {
  background: #fff;
  color: var(--navy-900);
  padding: 16px 30px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  white-space: nowrap;
}
.whatsapp-btn i { color: #25D366; font-size: 1.3rem; }

.info-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 40px;
}
.info-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.info-item i {
  color: var(--gold-600);
  font-size: 1.3rem;
  margin-top: 2px;
}
.info-item h3 { font-size: 1rem; margin-bottom: 4px; }
.info-item p { font-size: 0.9rem; margin: 0; }

/* ===== Footer ===== */
.footer {
  background: var(--navy-900);
  color: rgba(244, 236, 218, 0.7);
  padding: 46px 0 26px;
}
.footer__top {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer__brand img { width: 42px; height: 42px; }
.footer__brand b { color: #fff; font-family: var(--font-display); font-size: 1.05rem; }
.footer__links {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.footer__links div { display: flex; flex-direction: column; gap: 10px; font-size: 0.92rem; }
.footer__links a:hover { color: var(--gold-400); }
.footer__bottom {
  padding-top: 22px;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ===== Page hero (inner pages) ===== */
.page-hero {
  padding: 56px 0 36px;
  text-align: center;
}
.page-hero p { max-width: 620px; margin: 0 auto; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__frame { max-width: 320px; margin: 0 auto; }
  .grid-3, .grid-2, .grid-packages { grid-template-columns: 1fr 1fr; }
  .grid-teachers { grid-template-columns: repeat(3, 1fr); }
  .grid-teachers-detail { grid-template-columns: 1fr 1fr; }
  .process { grid-template-columns: 1fr 1fr; gap: 26px; }
  .process::before { display: none; }
  .contact-panel { grid-template-columns: 1fr; text-align: center; }
  .info-row { grid-template-columns: 1fr; }
  .footer__top { flex-direction: column; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .nav.is-open .nav__links {
    display: flex;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--ivory-50);
    flex-direction: column;
    padding: 20px 28px;
    border-bottom: 1px solid var(--line);
    gap: 18px;
  }
  .grid-3, .grid-2, .grid-packages, .grid-teachers, .grid-teachers-detail { grid-template-columns: 1fr; }
  .grid-3 > *, .grid-2 > *, .grid-packages > *, .grid-teachers > *, .grid-teachers-detail > * {
    grid-column: auto !important;
    grid-row: auto !important;
  }
  .teacher-detail-card { padding: 24px 18px; }
  .teacher-detail-card ul { font-size: 0.9rem; }
  .stat-row { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 2px;
}
