/* ==========================================================
   Arabic with Your Name — styles
   Colours inspired by Moroccan zellige: deep teal, saffron, terracotta
   ========================================================== */

:root {
  --teal-900: #0d3b3e;
  --teal-700: #145a5e;
  --teal-500: #1f7a7f;
  --saffron: #e0a526;
  --terracotta: #c4633f;
  --sand-50: #fbf8f2;
  --sand-100: #f4ede0;
  --ink: #1c2526;
  --muted: #586466;
  --line: #e3dccd;
  --white: #ffffff;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(13, 59, 62, 0.08);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-ar: "Amiri", "Traditional Arabic", serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

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

img { max-width: 100%; display: block; }
a { color: var(--teal-500); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; color: var(--teal-900); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
[lang="ar"] { font-family: var(--font-ar); }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.small { font-size: 0.9rem; color: var(--muted); }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--teal-900); color: var(--white); padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--terracotta);
  color: var(--white);
  font: inherit;
  font-weight: 600;
  padding: 0.85em 1.5em;
  border: 2px solid var(--terracotta);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { background: #a9502f; border-color: #a9502f; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--teal-900); border-color: var(--teal-900); }
.btn-ghost:hover { background: var(--teal-900); border-color: var(--teal-900); color: var(--white); }
.btn-small { padding: 0.5em 1.1em; }
.btn-block { width: 100%; }

.link-arrow { font-weight: 600; text-decoration: none; color: var(--terracotta); }
.link-arrow::after { content: " →"; transition: margin 0.15s; }
.link-arrow:hover::after { margin-left: 4px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--terracotta);
  margin-bottom: 0.6em;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--teal-900); }
.brand-mark {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--teal-900); color: var(--saffron);
  font-size: 1.6rem; line-height: 1;
}
.brand-text { font-size: 1.05rem; margin: 0; }
.nav-menu { display: flex; align-items: center; gap: 26px; }
.nav-menu a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav-menu a:not(.btn):hover { color: var(--terracotta); }

.nav-toggle {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer;
}
.nav-toggle span { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--teal-900); transition: 0.2s; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(48px, 8vw, 100px) 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(224, 165, 38, 0.18), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(31, 122, 127, 0.12), transparent 40%);
}
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.accent { color: var(--terracotta); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 0.95rem; }
.hero-points li::before { content: "✓ "; color: var(--teal-500); font-weight: 700; }

.hero-art { display: flex; justify-content: center; }
.arch {
  width: min(340px, 100%);
  aspect-ratio: 3 / 4;
  border-radius: 170px 170px var(--radius) var(--radius);
  background:
    repeating-conic-gradient(from 45deg, rgba(255,255,255,0.06) 0 25%, transparent 0 50%) 0 0 / 36px 36px,
    linear-gradient(160deg, var(--teal-500), var(--teal-900));
  box-shadow: var(--shadow), inset 0 0 0 10px rgba(224, 165, 38, 0.35);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--white); text-align: center; padding: 24px;
}
.arch-word { font-size: clamp(3rem, 7vw, 4.6rem); margin: 0; color: var(--saffron); }
.arch-translit { margin: 0; opacity: 0.85; font-style: italic; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-tint { background: var(--sand-100); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head p:last-child { color: var(--muted); }

.cards { display: grid; gap: 24px; }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}

.course-ar { font-size: 1.9rem; color: var(--terracotta); margin-bottom: 0.2em; text-align: left; }
.ticks { list-style: none; padding: 0; margin: 0 0 1.4em; }
.ticks li { padding-left: 1.6em; position: relative; margin-bottom: 0.45em; }
.ticks li::before { content: "◆"; position: absolute; left: 0; color: var(--saffron); font-size: 0.8em; top: 0.25em; }

.group { text-align: center; border-top: 4px solid var(--teal-500); }
.group:nth-child(2) { border-top-color: var(--saffron); }
.group:nth-child(3) { border-top-color: var(--terracotta); }
.group-icon {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.5rem;
  background: var(--sand-100); color: var(--teal-700);
}
.meta { font-weight: 600; color: var(--terracotta); margin-bottom: 0.6em; }

/* Levels */
.levels { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: none; }
.level { position: relative; padding: 30px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }
.level-num { font-size: 2.6rem; font-weight: 700; color: var(--sand-100); -webkit-text-stroke: 1.5px var(--teal-500); display: block; margin-bottom: 8px; }
.level p { color: var(--muted); margin: 0; }

/* Steps */
.step { text-align: center; padding: 10px; }
.step span {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: var(--teal-900); color: var(--saffron); font-weight: 700; margin-bottom: 12px;
}
.step p { color: var(--muted); margin: 0; }

/* Teacher */
.teacher { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: center; }
.teacher-photo {
  aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(160deg, var(--saffron), var(--terracotta));
  display: grid; place-items: center; color: var(--white); font-size: 3.2rem; box-shadow: var(--shadow);
}
.teacher-photo img { width: 100%; height: 100%; object-fit: cover; }

/* FAQ */
details {
  background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 22px; margin-bottom: 12px;
}
summary { cursor: pointer; font-weight: 600; color: var(--teal-900); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--terracotta); }
details[open] summary::after { content: "–"; }
details p { margin: 12px 0 0; color: var(--muted); }

/* Register */
.register { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; flex: 1; }
.field-row { display: flex; gap: 16px; }
label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; color: var(--teal-900); }
.optional { font-weight: 400; color: var(--muted); }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 0.75em 0.9em; border: 1.5px solid var(--line); border-radius: 10px; background: var(--sand-50);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(31, 122, 127, 0.15);
}
.invalid { border-color: var(--terracotta); }
.form-status { min-height: 1.4em; font-size: 0.92rem; margin: 0 0 12px; }
.form-status.error { color: var(--terracotta); }
.form-status.success { color: var(--teal-500); }

/* Footer */
.site-footer { background: var(--teal-900); color: rgba(255, 255, 255, 0.85); padding: 40px 0; }
.site-footer .small { color: rgba(255, 255, 255, 0.65); margin: 0; }
.site-footer .brand-text strong { color: var(--saffron); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.footer-links a:hover { color: var(--saffron); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .cards-3, .levels { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .teacher, .register { grid-template-columns: 1fr; gap: 36px; }
  .teacher-photo { max-width: 340px; }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--sand-50); border-bottom: 1px solid var(--line);
    padding: 8px 16px 18px;
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav-menu .btn { margin-top: 14px; text-align: center; }
  .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); }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .arch { width: min(240px, 70%); }
  .cards-2 { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .cards-4 { grid-template-columns: 1fr; }
  .field-row { flex-direction: column; gap: 0; }
  .card, .form, .level { padding: 22px; }
  .brand-text { font-size: 0.95rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}

/* ==========================================================
   Version 2 — pricing & WhatsApp
   ========================================================== */
:root { --wa: #11806f; --wa-dark: #0c6457; }

/* Pricing */
.billing-toggle {
  display: flex; width: max-content; margin: -12px auto 36px;
  padding: 4px; border-radius: 999px; background: var(--sand-100); border: 1px solid var(--line);
}
.billing-toggle button {
  font: inherit; font-weight: 600; border: 0; background: transparent; color: var(--muted);
  padding: 0.55em 1.4em; border-radius: 999px; cursor: pointer;
}
.billing-toggle button.active { background: var(--teal-900); color: var(--white); }

.plans { align-items: stretch; }
.plan { display: flex; flex-direction: column; position: relative; }
.plan .ticks { flex: 1; }
.plan.featured { border: 2px solid var(--terracotta); }
.badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--terracotta); color: var(--white); font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; padding: 4px 12px; border-radius: 999px; margin: 0; white-space: nowrap;
}
.price { margin: 8px 0 2px; color: var(--teal-900); }
.price .amount { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.02em; }
.price .per { color: var(--muted); margin-left: 4px; }
.price-note { font-size: 0.9rem; color: var(--teal-500); font-weight: 600; min-height: 1.5em; }
.pricing-footnote { text-align: center; margin: 28px auto 0; max-width: 620px; }

/* WhatsApp */
.wa-icon { width: 1.25em; height: 1.25em; fill: currentColor; flex-shrink: 0; }
.btn-whatsapp {
  background: var(--wa); border-color: var(--wa);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-whatsapp:hover { background: var(--wa-dark); border-color: var(--wa-dark); }
.form-actions { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; }
.wa-link {
  display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 18px;
  font-weight: 600; color: var(--wa); text-decoration: none;
}
.wa-link:hover { text-decoration: underline; }
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wa); color: var(--white);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  transition: transform 0.15s ease, background 0.15s ease;
}
.wa-float:hover { background: var(--wa-dark); transform: scale(1.06); }
.wa-float .wa-icon { width: 30px; height: 30px; }

@media (max-width: 960px) {
  .plans { gap: 32px; }
}
@media (max-width: 520px) {
  .form-actions { grid-template-columns: 1fr; }
  .wa-float { right: 14px; bottom: 14px; width: 52px; height: 52px; }
}
