*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #FF8824;
  --primary-light: #FFB347;
  --primary-dark: #D66500;
  --cream: #FFE3CC;
  --cream-warm: #FFF1EB;
  --cream-deep: #FFEAE0;
  --cream-bg: #FFF7EE;
  --brown: #893513;
  --brown-muted: #564336;
  --surface: #FFF8F2;
  --white: #ffffff;
  --success: #22C55E;
  --success-dark: #16A34A;
  --user-bubble: #FFE8D4;
  --user-bubble-border: #FFCC99;
  --outline: #ddc1b0;
  --shadow-soft: 0 4px 20px rgba(137, 53, 19, 0.08);
  --radius-btn: 16px;
  --font-display: 'Baloo Bhaijaan 2', 'Noto Sans Arabic', Tahoma, Arial, sans-serif;
  --font-body: 'IBM Plex Sans Arabic', 'Noto Sans Arabic', Tahoma, Arial, sans-serif;
  --max-w: 1120px;
  --header-h: 72px;
}
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--brown);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(100% - 2rem, var(--max-w)); margin-inline: auto; }

/* Wordmark */
.wordmark { display: inline-flex; align-items: center; line-height: 0; }
.wordmark svg { display: block; height: auto; }
.wordmark svg .l {
  opacity: 0;
  transform: translateY(30px);
  animation: rise .55s cubic-bezier(.2,.7,.2,1) forwards;
}
.wordmark svg .l0 { animation-delay: .05s; }
.wordmark svg .l1 { animation-delay: .14s; }
.wordmark svg .l2 { animation-delay: .23s; }
.wordmark svg .l3 { animation-delay: .32s; }
.wordmark svg .sheen {
  animation: sweep 4.5s 1.1s cubic-bezier(.4,0,.2,1) infinite;
}
@keyframes rise { to { opacity: 1; transform: translateY(0); } }
@keyframes sweep {
  0% { transform: translateX(-420px); }
  38% { transform: translateX(880px); }
  100% { transform: translateX(880px); }
}

/* 3D Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-btn);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  text-align: center;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 3px;
}
.btn--primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary-dark);
  box-shadow: 0 4px 0 var(--primary-dark);
}
.btn--primary:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--primary-dark);
}
.btn--secondary {
  background: var(--white);
  color: var(--brown);
  border-color: var(--outline);
  box-shadow: 0 4px 0 #c4a48a;
}
.btn--secondary:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 #c4a48a;
}
.btn--sm { font-size: 0.875rem; padding: 0.5rem 1rem; }
.btn--lg { font-size: 1.125rem; padding: 1rem 1.75rem; width: 100%; max-width: 340px; }
.btn--invert-primary {
  background: var(--white);
  color: var(--primary-dark);
  border-color: rgba(255,255,255,0.4);
  box-shadow: 0 4px 0 rgba(0,0,0,0.15);
}
.btn--invert-primary:active { box-shadow: 0 0 0 rgba(0,0,0,0.15); }
.btn--invert-secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
  box-shadow: 0 4px 0 rgba(0,0,0,0.2);
}
.btn--invert-secondary:active { box-shadow: 0 0 0 rgba(0,0,0,0.2); }
.btn svg { width: 1.25em; height: 1.25em; flex-shrink: 0; }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 248, 242, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(137, 53, 19, 0.08);
  height: var(--header-h);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

/* Hero */
.hero {
  padding: 3rem 0 4rem;
  background: linear-gradient(180deg, var(--cream-bg) 0%, var(--surface) 100%);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.hero__mascot {
  display: flex;
  justify-content: center;
  order: -1;
}
.hero__mascot img {
  width: min(320px, 80vw);
  animation: bob 3.5s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  line-height: 1.35;
  color: var(--brown);
  margin-bottom: 1.5rem;
}
.hero__title .accent { color: var(--primary); }
.hero__ctas {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.hero__note {
  font-size: 0.9rem;
  color: var(--brown-muted);
  font-weight: 500;
}
.subjects {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.subject-chip {
  background: var(--white);
  border: 2px solid rgba(221, 193, 176, 0.45);
  color: var(--brown);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  box-shadow: 0 2px 0 rgba(196, 164, 138, 0.35);
}
.subject-chip--soon {
  background: transparent;
  border-style: dashed;
  color: var(--brown-muted);
  box-shadow: none;
  font-weight: 600;
}

/* Trust strip */
.trust {
  background: var(--cream-bg);
  border-block: 1px solid rgba(137, 53, 19, 0.06);
  padding: 1rem 0;
}
.trust__text {
  text-align: center;
  font-weight: 600;
  font-size: clamp(0.8rem, 2.5vw, 0.95rem);
  color: var(--brown-muted);
  line-height: 1.8;
}
.trust__dot { color: var(--primary); margin-inline: 0.35rem; }

/* Features */
.feature {
  padding: 4rem 0;
}
.feature--exams { background: var(--white); }
.feature__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.feature--reverse .feature__grid { direction: ltr; }
.feature--reverse .feature__copy { direction: rtl; }
.feature__tag {
  display: inline-block;
  background: rgba(255, 136, 36, 0.12);
  color: var(--primary-dark);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}
.feature__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.75rem;
  color: var(--brown);
}
.feature__desc {
  color: var(--brown-muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

/* Phone mock */
.phone-mock {
  background: var(--brown);
  border-radius: 28px;
  padding: 12px;
  box-shadow: var(--shadow-soft), 0 20px 50px rgba(137, 53, 19, 0.15);
  max-width: 320px;
  margin-inline: auto;
  transform: scale(1.02);
}
.phone-mock__screen {
  background: var(--surface);
  border-radius: 20px;
  padding: 1.15rem;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.feature--tutor {
  padding: 5rem 0;
  background: linear-gradient(180deg, var(--cream-bg) 0%, var(--white) 55%, var(--surface) 100%);
}
.feature--tutor .feature__title {
  font-size: clamp(1.65rem, 3.5vw, 2.25rem);
}
.chat-bubble {
  max-width: 88%;
  padding: 0.7rem 0.9rem;
  border-radius: 16px;
  font-size: 0.85rem;
  line-height: 1.55;
}
.chat-bubble--user {
  align-self: flex-start;
  background: var(--user-bubble);
  border: 1px solid var(--user-bubble-border);
  color: var(--brown);
}
.chat-bubble--bot {
  align-self: flex-end;
  background: var(--cream-warm);
  border: 1px solid var(--outline);
  color: var(--brown);
}
.typing {
  align-self: flex-end;
  display: flex;
  gap: 4px;
  padding: 0.65rem 0.85rem;
  background: var(--cream-warm);
  border-radius: 16px;
  border: 1px solid var(--outline);
}
.typing span {
  width: 6px; height: 6px;
  background: var(--brown-muted);
  border-radius: 50%;
  animation: typing 1.2s ease-in-out infinite;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

/* Exam cards mock */
.exam-cards { display: flex; flex-direction: column; gap: 0.75rem; max-width: 320px; margin-inline: auto; }
.exam-card {
  background: var(--white);
  border-radius: 20px;
  border: 2px solid rgba(221, 193, 176, 0.3);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
}
.exam-card__bar { width: 6px; background: var(--primary); flex-shrink: 0; }
.exam-card__body { padding: 1rem; flex: 1; }
.exam-card__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.exam-card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  text-align: right;
  flex: 1;
}
.exam-card__badge {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: var(--success-dark);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}
.exam-card__meta {
  display: inline-block;
  margin-top: 0.5rem;
  background: rgba(255, 136, 36, 0.1);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.soon-note {
  font-size: 0.9rem;
  color: var(--brown-muted);
  font-weight: 500;
}
.cta-band .soon-note { color: rgba(255,255,255,0.85); }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 3.5rem 0;
  text-align: center;
}
.cta-band__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  color: var(--white);
  margin-bottom: 1.5rem;
}
.cta-band__buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.download-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.9);
  text-align: center;
  max-width: 36rem;
  line-height: 1.7;
}
.download-note code {
  font-size: 0.85em;
  background: rgba(0,0,0,0.15);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

/* Footer */
.footer {
  background: var(--brown);
  color: var(--cream-warm);
  padding: 2.5rem 0 2rem;
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.5rem;
}
.footer__links a {
  font-size: 0.9rem;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.footer__links a:hover { opacity: 1; }
.footer__links a:focus-visible {
  outline: 2px solid var(--cream-warm);
  outline-offset: 3px;
  border-radius: 4px;
}
.footer__social {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.footer__social-title {
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.9;
}
.footer__social-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1rem;
  list-style: none;
}
.footer__social-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  opacity: 0.85;
  transition: opacity 0.2s;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 241, 235, 0.25);
}
.footer__social-list a:hover { opacity: 1; }
.footer__social-list a:focus-visible {
  outline: 2px solid var(--cream-warm);
  outline-offset: 3px;
  border-radius: 8px;
}
.footer__social-list svg {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
}
.footer__copy {
  font-size: 0.8rem;
  opacity: 0.65;
}

/* Scroll reveal — visible by default; JS adds html.js-enabled for animation */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
html.js-enabled .reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(24px);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__mascot img,
  .wordmark svg .l,
  .wordmark svg .sheen,
  .typing span { animation: none !important; opacity: 1 !important; transform: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Responsive */
@media (max-width: 768px) {
  .hero__grid,
  .feature__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero__mascot { order: -1; }
  .feature--reverse .feature__grid { direction: rtl; }
  .btn--lg { max-width: 100%; }
}
@media (max-width: 360px) {
  .container { width: min(100% - 1.25rem, var(--max-w)); }
  .header__inner .btn--sm { font-size: 0.75rem; padding: 0.4rem 0.65rem; }
}
