:root {
  --bg: #F3EFEC;
  --card: #DAD6CD;
  --surface: #FBF9F7;
  --text: #1F1E1C;
  --muted: #6B6F76;
  --primary: #3A4FD1;
  --primary-dark: #1B2578;
  --info: #4C93C9;
  --accent: #E2664B;
  --warn: #E0A23A;
  --ok: #6E8A6A;
  --radius: 18px;
  --max: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Noto Sans Arabic", "Geeza Pro", Tahoma, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--warn); outline-offset: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(243, 239, 236, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--card);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 21px; color: var(--text); text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.top nav { display: flex; gap: 22px; }
.top nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.top nav a:hover { color: var(--primary); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px; border-radius: 14px;
  font-weight: 700; font-size: 16px; text-decoration: none;
  border: 2px solid transparent; transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { border-color: var(--text); color: var(--text); }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.btn small { display: block; font-weight: 500; font-size: 12px; line-height: 1.2; opacity: .85; }
.btn span { line-height: 1.25; text-align: start; }
.btn svg { width: 24px; height: 24px; flex: none; }

/* Hero */
.hero { padding: 72px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-block; background: var(--surface); color: var(--primary);
  font-weight: 700; font-size: 14px; padding: 4px 14px; border-radius: 999px;
  border: 1px solid var(--card);
}
h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.3; margin: 18px 0 14px; letter-spacing: -.5px; }
h1 em { font-style: normal; color: var(--primary); }
.lead { font-size: 19px; color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.note { font-size: 14px; color: var(--muted); margin-top: 14px; }

/* Phone mockup */
.phone {
  justify-self: center; width: 290px; aspect-ratio: 9 / 18.5;
  background: var(--text); border-radius: 44px; padding: 12px;
  box-shadow: 0 30px 60px -20px rgba(27, 37, 120, .45);
}
.screen {
  height: 100%; background: var(--bg); border-radius: 34px; overflow: hidden;
  display: flex; flex-direction: column; padding: 22px 14px 14px; gap: 10px; font-size: 13px;
}
.screen .bar { text-align: center; font-weight: 800; font-size: 15px; }
.bubble { padding: 9px 13px; border-radius: 16px; max-width: 86%; line-height: 1.6; }
.bubble.ai { background: var(--surface); align-self: flex-start; border-bottom-right-radius: 4px; }
.bubble.me { background: var(--primary); color: #fff; align-self: flex-end; border-bottom-left-radius: 4px; direction: ltr; }
.bubble .en { direction: ltr; display: block; text-align: left; font-weight: 600; }
.bubble .fix { display: block; color: var(--accent); font-size: 12px; margin-top: 4px; }
.mic {
  margin-top: auto; align-self: center; width: 54px; height: 54px; border-radius: 50%;
  background: var(--accent); display: grid; place-items: center;
}
.mic svg { width: 26px; height: 26px; fill: #fff; }

/* Sections */
section { padding: 64px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 8px; }
.section-title p { color: var(--muted); margin: 0; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--card);
  border-radius: var(--radius); padding: 26px;
}
.card h3 { margin: 12px 0 6px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
}
.icon svg { width: 24px; height: 24px; fill: #fff; }

/* Levels */
.levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.level { border-radius: var(--radius); padding: 22px; color: #fff; }
.level b { display: block; font-size: 13px; opacity: .85; letter-spacing: 1px; direction: ltr; text-align: right; }
.level h3 { margin: 4px 0 6px; font-size: 18px; }
.level p { margin: 0; font-size: 15px; opacity: .92; line-height: 1.7; }
.level small { display: block; margin-top: 10px; font-size: 13px; opacity: .8; }

/* Steps */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { position: relative; padding-top: 52px; }
.step::before {
  counter-increment: s; content: counter(s, arabic-indic);
  position: absolute; top: 0; right: 0; width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 800; display: grid; place-items: center;
}
.step h3 { margin: 0 0 4px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); }

/* Final CTA */
.final { background: var(--primary); color: #fff; border-radius: 28px; padding: 48px 32px; text-align: center; }
.final h2 { margin: 0 0 8px; font-size: clamp(24px, 3vw, 32px); }
.final p { margin: 0 0 24px; opacity: .9; }
.final .cta { justify-content: center; }
.final .btn-primary { background: #fff; color: var(--primary); }
.final .btn-ghost { border-color: #fff; color: #fff; }

/* Footer */
footer { padding: 40px 0; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 26px; justify-content: space-between; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--primary); }

/* Document pages (delete account, 404) */
.doc { max-width: 760px; padding: 48px 22px 24px; margin: 0 auto; }
.doc h1 { font-size: clamp(28px, 4vw, 38px); margin-top: 0; }
.doc h2 { font-size: 22px; margin: 36px 0 10px; }
.doc ol, .doc ul { padding-inline-start: 1.3em; }
.doc li { margin-bottom: 6px; }
.callout {
  background: var(--surface); border: 1px solid var(--card);
  border-inline-start: 5px solid var(--warn); border-radius: 12px; padding: 14px 18px; margin: 18px 0;
}

@media (max-width: 880px) {
  .hero { padding-top: 40px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .phone { width: 250px; }
  .grid, .steps { grid-template-columns: 1fr 1fr; }
  .levels { grid-template-columns: 1fr 1fr; }
  .top nav { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .grid, .steps, .levels { grid-template-columns: 1fr; }
  .cta .btn { flex: 1 1 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}

/* Background helpers (no inline styles: keeps the CSP strict) */
.bg-primary { background: var(--primary); }
.bg-primary-dark { background: var(--primary-dark); }
.bg-info { background: var(--info); }
.bg-accent { background: var(--accent); }
.bg-warn { background: var(--warn); }
.bg-ok { background: var(--ok); }
