:root {
  --bg: #050505;
  --surface: #0d0d0d;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f5f5f5;
  --muted: #d0d0d0;
  --muted-2: #9a9a9a;
  --lime: #b7f54b;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
  --container: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(183, 245, 75, 0.09), transparent 34%),
    radial-gradient(circle at 85% 12%, rgba(56, 189, 248, 0.06), transparent 25%),
    linear-gradient(180deg, #030303 0%, #080808 100%);
  color: var(--text);
  font-family: "Cairo", sans-serif;
  direction: rtl;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.045;
  background-image:
    linear-gradient(rgba(183, 245, 75, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(183, 245, 75, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
}
a { color: inherit; text-decoration: none; }
code { font-family: "JetBrains Mono", monospace; }

.skip-link {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 500;
  padding: 10px 14px;
  border: 1px solid rgba(183, 245, 75, 0.25);
  border-radius: 12px;
  background: #0b0b0b;
  transform: translateY(-140%);
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: translateY(0); }

.navbar {
  position: sticky;
  top: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 3vw, 32px);
  background: rgba(2, 2, 2, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: 0 1px 0 rgba(183, 245, 75, 0.06);
  backdrop-filter: blur(28px) saturate(160%);
}

.navbar__brand { display: inline-flex; align-items: center; gap: 10px; direction: ltr; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid rgba(183, 245, 75, 0.2);
  background: linear-gradient(135deg, rgba(183, 245, 75, 0.15), rgba(183, 245, 75, 0.05));
  color: var(--lime);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 0 20px rgba(183, 245, 75, 0.1), inset 0 1px 0 rgba(183, 245, 75, 0.2);
}
.brand-text {
  font-family: "Tajawal", sans-serif;
  font-size: 15px;
  font-weight: 800;
}
.navbar__links, .navbar__actions, .hero-actions, .cta-actions, .cta-strip, .tool-list { display: flex; flex-wrap: wrap; gap: 12px; }
.navbar__links { justify-content: center; gap: 28px; }
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 800;
  transition: color 0.2s ease, transform 0.2s ease;
}
.nav-link:hover, .nav-link.is-active { color: var(--text); transform: translateY(-1px); }
.nav-link.is-active::after {
  content: "";
  position: absolute;
  bottom: -11px;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: var(--lime);
  box-shadow: 0 0 10px rgba(183, 245, 75, 0.35);
}

.section { width: min(var(--container), calc(100% - 40px)); margin: 0 auto; padding: 92px 0; }
.hero { padding-top: 56px; }
.hero-shell, .phase-block, .cta-box, .outcome-board, .read-card, .overview-card, .experience-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 100%), var(--surface);
  box-shadow: var(--shadow);
}
.hero-shell, .cta-box, .outcome-board { padding: clamp(28px, 4vw, 44px); }
.hero-shell::after, .cta-box::after, .outcome-board::after {
  content: "";
  position: absolute;
  inset: auto auto -20% -8%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(183, 245, 75, 0.13), transparent 70%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 8px 16px;
  border: 1px solid rgba(183, 245, 75, 0.18);
  border-radius: 999px;
  background: rgba(183, 245, 75, 0.06);
  color: rgba(219, 255, 162, 0.94);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.7px;
  unicode-bidi: plaintext;
}
.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px rgba(183, 245, 75, 0.7);
  animation: pulse-dot 2s infinite;
}
.eyebrow-rule { width: 1px; height: 14px; background: rgba(183, 245, 75, 0.25); }

.hero-title, .section-title, .cta-title {
  margin: 0;
  font-family: "Noto Kufi Arabic", sans-serif;
  font-size: clamp(30px, 5vw, 58px);
  line-height: 1.28;
  font-weight: 900;
}
.hero-copy, .section-copy, .cta-copy, .phase-subtitle, .prompt-preview, .outcome-note, .lesson-card p, .read-card p, .experience-card p, .overview-card p, .overview-output, .term-item span, .output-list span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.95;
  unicode-bidi: plaintext;
}
.section-header { max-width: 860px; margin-bottom: 28px; }
.accent { color: var(--lime); text-shadow: 0 0 28px rgba(183, 245, 75, 0.3); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  font: inherit;
  font-weight: 900;
  transition:
    transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.15s cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-ghost {
  padding: 8px 16px;
  border-color: rgba(255, 255, 255, 0.08);
  background: transparent;
  color: var(--muted);
}
.btn-ghost:hover {
  border-color: #333333;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}
.btn-primary {
  background: linear-gradient(180deg, #c6ff5a 0%, #a3e635 55%, #8fd11e 100%);
  color: #010101;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.34), 0 0 34px rgba(183, 245, 75, 0.28), inset 0 1px 0 rgba(255,255,255,.28);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #d2ff73 0%, #b5f53f 55%, #99de25 100%);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.34), 0 0 42px rgba(183, 245, 75, 0.34), inset 0 1px 0 rgba(255,255,255,.34);
}
.btn-secondary { border-color: rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.025); }
.btn-sm {
  padding: 8px 20px;
  border-radius: 9px;
  font-size: 13px;
}
.btn-lg { padding: 15px 22px; }
.navbar__actions .btn, .hero-actions .btn, .cta-actions .btn { min-height: 46px; }

.hero-stats, .read-grid, .overview-grid, .phase-grid, .lesson-grid, .experience-grid, .outcome-list { display: grid; gap: 16px; }
.hero-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 34px; }
.read-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.overview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.experience-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.outcome-board { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 18px; }
.outcome-list { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 22px; }
.read-card, .overview-card, .experience-card, .phase-panel, .lesson-card { padding: 22px; }

.stat-chip { padding: 18px 16px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, 0.025); }
.stat-chip strong { display: block; margin-bottom: 6px; color: var(--lime); font-size: 22px; font-weight: 900; }
.stat-chip span { color: var(--muted); font-size: 13px; font-weight: 800; line-height: 1.75; }
.read-card h3, .experience-card h3, .overview-card h3, .phase-panel h4, .subhead, .lesson-card h5 {
  margin: 0 0 10px;
  font-family: "Noto Kufi Arabic", sans-serif;
  font-weight: 900;
}
.read-card h3, .experience-card h3, .overview-card h3 { font-size: 18px; }
.overview-card {
  min-height: 196px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.overview-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(var(--phase-color), .9), rgba(var(--phase-color), .18));
}
.overview-card-wide { grid-column: 2 / span 2; }
.overview-number, .phase-kicker, .term-item strong, .tool { font-family: "JetBrains Mono", monospace; }
.overview-number, .phase-kicker { font-size: 11px; font-weight: 700; letter-spacing: 2px; }
.overview-output { margin-top: auto; color: var(--text); }

.phase-lime { --phase-color: 183, 245, 75; }
.phase-orange { --phase-color: 251, 146, 60; }
.phase-blue { --phase-color: 56, 189, 248; }
.phase-purple { --phase-color: 167, 139, 250; }
.phase-red { --phase-color: 248, 113, 113; }
.phase-teal { --phase-color: 52, 211, 153; }
.phase-amber { --phase-color: 251, 191, 36; }
.overview-card, .phase-block { border-color: rgba(var(--phase-color), 0.18); background: linear-gradient(180deg, rgba(var(--phase-color), 0.08), transparent 30%), var(--surface); }
.phases { display: flex; flex-direction: column; gap: 24px; }
.phase-jump {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 24px;
}
.phase-jump__link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  transition: transform 0.18s var(--ease), border-color 0.18s ease, background-color 0.18s ease;
}
.phase-jump__link span {
  color: rgba(var(--phase-color), 1);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
}
.phase-jump__link strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.7;
}
.phase-jump__link:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--phase-color), 0.24);
  background: rgba(var(--phase-color), 0.08);
}
.phase-block { padding: 28px; }
.phase-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 22px; }
.phase-title { margin: 0; font-family: "Noto Kufi Arabic", sans-serif; font-size: 28px; line-height: 1.45; font-weight: 900; }
.phase-kicker, .term-item strong { color: rgba(var(--phase-color), 1); }
.phase-transform {
  flex: 0 0 310px;
  padding: 13px 15px;
  border: 1px solid rgba(var(--phase-color), 0.18);
  border-radius: 16px;
  background: rgba(var(--phase-color), 0.08);
  color: rgb(var(--phase-color));
  font-size: 13px;
  font-weight: 900;
  line-height: 1.8;
}
.phase-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.phase-panel { border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 18px; background: rgba(0, 0, 0, 0.18); }
.phase-panel-wide { grid-column: 1 / -1; }
.phase-panel ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.phase-panel li {
  position: relative;
  padding-right: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.9;
}
.phase-panel li::before {
  content: "";
  position: absolute;
  top: 11px;
  right: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(var(--phase-color));
  box-shadow: 0 0 12px rgba(var(--phase-color), 0.45);
}
.term-list, .output-list { display: flex; flex-direction: column; gap: 10px; }
.tool-list { direction: ltr; gap: 8px; }
.tool, .output-list span { display: inline-flex; width: fit-content; padding: 6px 10px; border-radius: 10px; }
.tool { border: 1px solid rgba(var(--phase-color), 0.18); background: rgba(var(--phase-color), 0.08); color: var(--text); font-size: 10px; font-weight: 700; }
.output-list span { border: 1px solid rgba(var(--phase-color), 0.14); background: rgba(var(--phase-color), 0.06); }
.lesson-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; }
.lesson-card { border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 16px; background: rgba(255, 255, 255, 0.025); }
.lesson-card h5 { font-size: 15px; line-height: 1.65; }
.prompt-preview { margin: 16px 0 0; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.outcome-list span {
  padding: 16px 18px;
  border: 1px solid rgba(183, 245, 75, 0.16);
  border-radius: 16px;
  background: rgba(183, 245, 75, 0.06);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.85;
}
.outcome-note {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  color: #efffd2;
}
.cta-title { font-size: clamp(28px, 4.5vw, 46px); }
.cta-strip { margin-top: 22px; }
.cta-strip span {
  padding: 8px 12px;
  border: 1px solid rgba(183, 245, 75, 0.13);
  border-radius: 999px;
  background: rgba(183, 245, 75, 0.05);
  color: #edffc4;
  font-size: 12px;
  font-weight: 800;
}

.reveal { opacity: 1; transform: none; transition: none; }
.reveal.is-visible { opacity: 1; transform: none; }
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(183, 245, 75, 0.4); }
  70% { box-shadow: 0 0 0 9px rgba(183, 245, 75, 0); }
  100% { box-shadow: 0 0 0 0 rgba(183, 245, 75, 0); }
}

@media (max-width: 1100px) {
  .hero-stats,
  .read-grid,
  .overview-grid,
  .phase-grid,
  .lesson-grid,
  .experience-grid,
  .phase-jump {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .outcome-board {
    grid-template-columns: 1fr;
  }

  .overview-card-wide,
  .phase-panel-wide {
    grid-column: 1 / -1;
  }

  .phase-header {
    flex-direction: column;
  }

  .phase-transform {
    width: 100%;
    flex-basis: auto;
  }

  .overview-card {
    min-height: 0;
    border-color: rgba(var(--phase-color), 0.24);
    box-shadow: 0 14px 32px rgba(0,0,0,.24), inset 0 1px 0 rgba(var(--phase-color), .08);
  }
}

@media (max-width: 780px) {
  html { scroll-padding-top: 132px; }

  .navbar {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .navbar__brand {
    flex: 1 1 100%;
    justify-content: center;
  }

  .navbar__links {
    display: none;
  }

  .navbar__actions {
    width: 100%;
    justify-content: center;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .navbar__actions .btn {
    width: 100%;
  }
}
@media (max-width: 640px) {
  html { scroll-padding-top: 150px; }
  .section { width: min(var(--container), calc(100% - 22px)); padding: 72px 0; }
  .hero { padding-top: 28px; }
  .hero-title, .section-title, .cta-title { font-size: clamp(26px, 8.8vw, 40px); }
  .hero-copy, .section-copy, .cta-copy, .phase-subtitle, .prompt-preview, .outcome-note, .lesson-card p, .read-card p, .experience-card p, .overview-card p, .overview-output, .term-item span, .output-list span, .phase-panel li { font-size: 13px; line-height: 1.88; }
  .hero-shell, .cta-box, .outcome-board, .phase-block, .read-card, .overview-card, .experience-card, .phase-panel, .lesson-card { padding: 18px; }
  .hero-stats, .read-grid, .overview-grid, .phase-grid, .lesson-grid, .experience-grid, .outcome-list { grid-template-columns: 1fr; }
  .overview-card-wide, .phase-panel-wide { grid-column: auto; }
  .navbar {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 14px 14px 12px;
  }
  .navbar__brand {
    justify-content: center;
  }
  .phase-jump {
    display: flex;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 20px;
    scroll-snap-type: x proximity;
  }
  .phase-jump__link {
    min-width: 180px;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
  .overview-card {
    gap: 8px;
    min-height: 0;
    border-radius: 18px;
    background:
      linear-gradient(180deg, rgba(var(--phase-color), .12), transparent 30%),
      linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,0)),
      var(--surface);
  }
  .overview-output strong {
    display: block;
    margin-top: 4px;
    overflow-wrap: anywhere;
  }
  .navbar__actions {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin: 0 auto;
  }
  .hero-actions .btn, .cta-actions .btn { width: 100%; }
}

@media (max-width: 720px), (hover: none) and (pointer: coarse) {
  body {
    background:
      radial-gradient(circle at top, rgba(183, 245, 75, 0.12), transparent 32%),
      radial-gradient(circle at 85% 12%, rgba(56, 189, 248, 0.06), transparent 22%),
      linear-gradient(180deg, #030303 0%, #090909 100%);
  }

  .navbar {
    backdrop-filter: none;
  }

  body::before {
    opacity: 0.04;
  }

  .eyebrow-dot {
    animation: none !important;
  }

  .btn:hover,
  .nav-link:hover {
    transform: none;
  }

  .reveal,
  .phase-block,
  .overview-card,
  .read-card,
  .experience-card {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
