/* ===================================================================
   ChalkBox — landing.css
   Landing + student page styling. ONLY .lp-* rules (plus a couple of
   layout helpers scoped under .lp-*). Sits on top of brutal.css and
   rtl.css — never overrides .nb-* selectors. Same neo-brutalist DNA:
   3px black borders, hard 5px offset shadows, chunky, FUN.
   =================================================================== */

/* -------------------------------------------------------------------
   Page wrapper
   ------------------------------------------------------------------- */
.lp-page {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.lp-wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Generic section rhythm */
.lp-section {
  padding: 64px 0;
}
.lp-section--tight { padding: 40px 0; }

.lp-section__head {
  max-width: 640px;
  margin: 0 0 36px;
}
.lp-section__kicker {
  display: inline-block;
  font-family: var(--nb-font-mono);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--nb-ink);
  background: var(--nb-lime);
  border: var(--nb-bw) solid var(--nb-ink);
  border-radius: 999px;
  box-shadow: var(--nb-shadow-sm);
  padding: 5px 14px;
  margin-bottom: 16px;
  transform: rotate(-2deg);
}
.lp-section__title {
  font-family: var(--nb-font-head);
  text-transform: uppercase;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.lp-section__sub {
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.55;
  opacity: 0.74;
  margin: 0;
}

/* -------------------------------------------------------------------
   HERO band — soft brand gradient, big chunky headline
   ------------------------------------------------------------------- */
.lp-hero {
  position: relative;
  overflow: hidden;
  border-bottom: var(--nb-bw) solid var(--nb-ink);
  background:
    linear-gradient(
      135deg,
      var(--nb-yellow) 0%,
      var(--nb-pink) 42%,
      var(--nb-cyan) 100%
    );
}
/* Subtle dotted texture echoing the body backdrop */
.lp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(26, 26, 26, 0.16) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  pointer-events: none;
  z-index: 0;
}
/* Big rotated accent blob, top-end corner */
.lp-hero::after {
  content: "";
  position: absolute;
  top: -70px;
  right: -70px;
  width: 240px;
  height: 240px;
  background: var(--nb-lime);
  border: var(--nb-bw) solid var(--nb-ink);
  border-radius: 50%;
  transform: rotate(12deg);
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
}

.lp-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 88px 20px 96px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}

.lp-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--nb-font-mono);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--nb-white);
  border: var(--nb-bw) solid var(--nb-ink);
  border-radius: 999px;
  box-shadow: var(--nb-shadow-sm);
  padding: 6px 14px;
  transform: rotate(-1.5deg);
}

.lp-hero__title {
  font-family: var(--nb-font-head);
  text-transform: uppercase;
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 16ch;
}
.lp-hero__title .lp-hl {
  background: var(--nb-white);
  border: var(--nb-bw) solid var(--nb-ink);
  border-radius: var(--nb-radius);
  box-shadow: var(--nb-shadow-sm);
  padding: 0 0.18em;
  display: inline-block;
  transform: rotate(-1.5deg);
}

.lp-hero__sub {
  font-weight: 600;
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  line-height: 1.5;
  max-width: 50ch;
  margin: 0;
}

.lp-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

.lp-hero__note {
  font-family: var(--nb-font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.78;
  margin: 4px 0 0;
}

/* -------------------------------------------------------------------
   FEATURES grid — responsive auto-fit cards
   ------------------------------------------------------------------- */
.lp-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 22px;
}

.lp-feature {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--nb-white);
  border: var(--nb-bw) solid var(--nb-ink);
  border-radius: var(--nb-radius);
  box-shadow: var(--nb-shadow);
  padding: 24px 22px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.lp-feature:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--nb-shadow-lg);
}
/* Cycle accent colors across the grid */
.lp-feature:nth-child(4n + 1) { background: var(--nb-white); }
.lp-feature:nth-child(4n + 2) { background: color-mix(in srgb, var(--nb-cyan) 35%, var(--nb-white)); }
.lp-feature:nth-child(4n + 3) { background: color-mix(in srgb, var(--nb-yellow) 38%, var(--nb-white)); }
.lp-feature:nth-child(4n + 4) { background: color-mix(in srgb, var(--nb-lime) 38%, var(--nb-white)); }

.lp-feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  font-size: 1.8rem;
  line-height: 1;
  background: var(--nb-yellow);
  border: var(--nb-bw) solid var(--nb-ink);
  border-radius: var(--nb-radius);
  box-shadow: var(--nb-shadow-sm);
  transform: rotate(-4deg);
}
.lp-feature:nth-child(2n) .lp-feature__icon { background: var(--nb-pink); transform: rotate(4deg); }
.lp-feature:nth-child(3n) .lp-feature__icon { background: var(--nb-cyan); transform: rotate(-2deg); }

.lp-feature__title {
  font-family: var(--nb-font-head);
  text-transform: uppercase;
  font-size: 1.2rem;
  line-height: 1.1;
  margin: 0;
}
.lp-feature__text {
  font-weight: 500;
  font-size: 0.98rem;
  line-height: 1.55;
  opacity: 0.82;
  margin: 0;
}
.lp-feature__tag {
  align-self: flex-start;
  font-family: var(--nb-font-mono);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--nb-ink);
  color: var(--nb-bg);
  border-radius: 4px;
  padding: 3px 9px;
  margin-top: auto;
}

/* -------------------------------------------------------------------
   HOW IT WORKS — 3-step row with chunky numbered badges
   ------------------------------------------------------------------- */
.lp-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.lp-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--nb-white);
  border: var(--nb-bw) solid var(--nb-ink);
  border-radius: var(--nb-radius);
  box-shadow: var(--nb-shadow);
  padding: 32px 22px 24px;
}

.lp-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  flex: 0 0 auto;
  font-family: var(--nb-font-head);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--nb-ink);
  background: var(--nb-yellow);
  border: var(--nb-bw) solid var(--nb-ink);
  border-radius: 50%;
  box-shadow: var(--nb-shadow-sm);
  transform: rotate(-5deg);
  margin-top: -52px;
  margin-bottom: 4px;
}
.lp-step:nth-child(2) .lp-step__num { background: var(--nb-pink); transform: rotate(5deg); }
.lp-step:nth-child(3) .lp-step__num { background: var(--nb-cyan); transform: rotate(-3deg); }

.lp-step__title {
  font-family: var(--nb-font-head);
  text-transform: uppercase;
  font-size: 1.2rem;
  line-height: 1.1;
  margin: 0;
}
.lp-step__text {
  font-weight: 500;
  font-size: 0.98rem;
  line-height: 1.55;
  opacity: 0.82;
  margin: 0;
}

/* Dashed connector arrows between steps (desktop only) */
.lp-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -22px;
  transform: transl(0);
  transform: translateY(-50%);
  font-family: var(--nb-font-head);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--nb-ink);
  z-index: 2;
  pointer-events: none;
}

/* -------------------------------------------------------------------
   CLOSING CTA band
   ------------------------------------------------------------------- */
.lp-cta {
  position: relative;
  overflow: hidden;
  margin: 0;
  background: var(--nb-ink);
  border-top: var(--nb-bw) solid var(--nb-ink);
}
.lp-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1.4px, transparent 1.4px);
  background-size: 28px 28px;
  pointer-events: none;
}
.lp-cta__inner {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 72px 20px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}
.lp-cta__title {
  font-family: var(--nb-font-head);
  text-transform: uppercase;
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--nb-bg);
  margin: 0;
}
.lp-cta__title .lp-hl {
  background: var(--nb-yellow);
  color: var(--nb-ink);
  border: var(--nb-bw) solid var(--nb-bg);
  border-radius: var(--nb-radius);
  padding: 0 0.18em;
  display: inline-block;
  transform: rotate(-1.5deg);
}
.lp-cta__sub {
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--nb-bg);
  opacity: 0.82;
  max-width: 46ch;
  margin: 0;
}
.lp-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 6px;
}

/* -------------------------------------------------------------------
   FOOTER strip
   ------------------------------------------------------------------- */
.lp-footer {
  background: var(--nb-bg);
  border-top: var(--nb-bw) solid var(--nb-ink);
  padding: 28px 0;
}
.lp-footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.lp-footer__brand {
  font-family: var(--nb-font-head);
  text-transform: uppercase;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.lp-footer__note {
  font-family: var(--nb-font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  opacity: 0.7;
}

/* -------------------------------------------------------------------
   STUDENT entry / exam landing (shared .lp-* surfaces)
   ------------------------------------------------------------------- */
.lp-student {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.lp-student__card {
  width: 100%;
  max-width: 460px;
  background: var(--nb-white);
  border: var(--nb-bw) solid var(--nb-ink);
  border-radius: var(--nb-radius);
  box-shadow: var(--nb-shadow-lg);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.lp-student__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}
.lp-student__badge {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--nb-font-mono);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--nb-cyan);
  border: var(--nb-bw) solid var(--nb-ink);
  border-radius: 999px;
  box-shadow: var(--nb-shadow-sm);
  padding: 5px 13px;
  transform: rotate(-2deg);
}
.lp-student__title {
  font-family: var(--nb-font-head);
  text-transform: uppercase;
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.05;
  margin: 0;
}
.lp-student__meta {
  font-weight: 600;
  font-size: 0.95rem;
  opacity: 0.75;
  margin: 0;
}

/* Exam meta stat row */
.lp-student__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}
.lp-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: color-mix(in srgb, var(--nb-yellow) 32%, var(--nb-white));
  border: var(--nb-bw) solid var(--nb-ink);
  border-radius: var(--nb-radius);
  box-shadow: var(--nb-shadow-sm);
  padding: 12px 14px;
  text-align: center;
}
.lp-stat__value {
  font-family: var(--nb-font-head);
  font-size: 1.5rem;
  line-height: 1;
}
.lp-stat__label {
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.72;
}

/* Anti-cheat / warning callout used on the student exam screen */
.lp-warn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.45;
  background: color-mix(in srgb, var(--nb-yellow) 55%, var(--nb-white));
  border: var(--nb-bw) solid var(--nb-ink);
  border-radius: var(--nb-radius);
  box-shadow: var(--nb-shadow-sm);
  padding: 12px 14px;
}
.lp-warn::before {
  content: "⚠️";
  font-size: 1.2rem;
  line-height: 1.2;
  flex: 0 0 auto;
}
.lp-warn--lock {
  background: var(--nb-red);
}

/* -------------------------------------------------------------------
   RTL adjustments — read well in Arabic (default language)
   ------------------------------------------------------------------- */
[dir="rtl"] .lp-section__head { margin-left: auto; }

[dir="rtl"] .lp-section__kicker { transform: rotate(2deg); }

[dir="rtl"] .lp-hero__inner { align-items: flex-start; }
[dir="rtl"] .lp-hero__badge { transform: rotate(1.5deg); }
[dir="rtl"] .lp-hero__title .lp-hl,
[dir="rtl"] .lp-cta__title .lp-hl { transform: rotate(1.5deg); }

/* Mirror the hero accent blob to the start (left) side */
[dir="rtl"] .lp-hero::after {
  right: auto;
  left: -70px;
  transform: rotate(-12deg);
}
/* Mirror the hero gradient sweep */
[dir="rtl"] .lp-hero {
  background:
    linear-gradient(
      225deg,
      var(--nb-yellow) 0%,
      var(--nb-pink) 42%,
      var(--nb-cyan) 100%
    );
}

/* Flip the step connector arrow to point right-to-left */
[dir="rtl"] .lp-step:not(:last-child)::after {
  content: "←";
  right: auto;
  left: -22px;
}

[dir="rtl"] .lp-feature__icon { transform: rotate(4deg); }
[dir="rtl"] .lp-feature:nth-child(2n) .lp-feature__icon { transform: rotate(-4deg); }

[dir="rtl"] .lp-step__num { transform: rotate(5deg); }
[dir="rtl"] .lp-step:nth-child(2) .lp-step__num { transform: rotate(-5deg); }
[dir="rtl"] .lp-step:nth-child(3) .lp-step__num { transform: rotate(3deg); }

[dir="rtl"] .lp-feature__tag,
[dir="rtl"] .lp-footer__note { font-family: 'Tajawal', var(--nb-font-mono); }

/* -------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------- */
@media (max-width: 960px) {
  .lp-steps { grid-template-columns: 1fr; gap: 32px; }
  /* Stacked steps: drop side arrows, center the numbered badges */
  .lp-step:not(:last-child)::after,
  [dir="rtl"] .lp-step:not(:last-child)::after { display: none; }
}

@media (max-width: 720px) {
  .lp-section { padding: 48px 0; }
  .lp-hero__inner { padding: 64px 18px 72px; }
  .lp-hero::after { width: 160px; height: 160px; top: -50px; right: -50px; }
  [dir="rtl"] .lp-hero::after { left: -50px; right: auto; }

  .lp-features { grid-template-columns: 1fr; gap: 18px; }

  .lp-cta__inner { padding: 56px 18px 64px; }

  .lp-footer__inner { justify-content: center; text-align: center; }
}

@media (max-width: 460px) {
  .lp-hero__title { font-size: clamp(2rem, 9vw, 2.6rem); }
  .lp-hero__actions .lp-btn,
  .lp-hero__actions .nb-btn,
  .lp-cta__actions .lp-btn,
  .lp-cta__actions .nb-btn { width: 100%; }
  .lp-student__card { padding: 24px 18px; }
}

/* -------------------------------------------------------------------
   Reduced motion — kill the hover lifts
   ------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .lp-feature,
  .lp-feature:hover { transition: none; transform: none; }
}