/* BayanAI landing pages (/ in Arabic, /en in English). Plain HTML + this file: no JavaScript, so search engines and
   slow phones get the whole page at once. Colours are Bayan's (frontend/src/index.css). */
:root {
  --ink: #051c1c;
  --deep: #0c2222;
  --mid: #1e3a3a;
  --mint: #5cb894;
  --mint-soft: rgba(92, 184, 148, .14);
  --logo-green: #193725;
  --page: #f4f6f5;
  --card: #ffffff;
  --text: #111827;
  --text-2: #374151;
  --text-3: #6b7280;
  --line: #e3e8e6;
  --radius: 18px;
  --wrap: 1120px;
  --font: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, Arial, sans-serif;
}
html[lang="en"] { --font: 'Inter', 'Segoe UI', Helvetica, Arial, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.35; margin: 0; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: max(20px, env(safe-area-inset-left));
}
.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  background: var(--mint);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 10px;
  z-index: 10;
}
.skip:focus { top: 12px; }

/* ─── buttons ─────────────────────────────────────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 14px;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }
.btn-primary { background: var(--mint); color: var(--ink); }
.btn-primary:hover { background: #6cc6a2; }
.btn-ghost { color: #fff; border: 1px solid rgba(255, 255, 255, .28); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .55); }
.btn-dark { background: var(--mid); color: #fff; }
.btn-dark:hover { background: #2a4d4d; }

/* ─── header + hero (dark teal) ───────────────────────────────────────────────────────────────────────────────── */
.hero {
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(92, 184, 148, .18), transparent 60%),
    linear-gradient(180deg, var(--deep) 0%, var(--ink) 100%);
  color: #e8eef0;
  padding-top: env(safe-area-inset-top);
}
.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 72px;
}
.nav-logo { flex-shrink: 0; }
.nav-logo img { width: 150px; }
.nav-links {
  display: flex;
  gap: 22px;
  margin-inline-start: 18px;
  font-size: 15px;
}
.nav-links a { color: #aec6c6; text-decoration: none; }
.nav-links a:hover { color: #fff; }
.nav-end {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-lang { color: #aec6c6; text-decoration: none; font-size: 15px; padding: 8px 6px; }
.nav-lang:hover { color: #fff; }
.nav .btn { min-height: 40px; padding: 8px 16px; font-size: 15px; border-radius: 12px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
  padding-block: 56px 88px;
}
.eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--mint);
  background: var(--mint-soft);
  border: 1px solid rgba(92, 184, 148, .3);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(32px, 4.6vw, 50px);
  font-weight: 700;
  color: #fff;
  letter-spacing: -.01em;
}
html[lang="en"] .hero h1 { letter-spacing: -.025em; }
.hero h1 em { font-style: normal; color: var(--mint); }
.hero-lead {
  margin-top: 18px;
  font-size: clamp(17px, 1.9vw, 19px);
  color: #c7d9d9;
  max-width: 34em;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-note { margin-top: 14px; font-size: 14px; color: #8fb0ac; }

/* the example conversation */
.demo {
  margin: 0;                       /* <figure> has side margins by default */
  background: var(--card);
  color: var(--text);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .08);
}
.demo-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-3);
}
.demo-bar img { width: 30px; height: 30px; border-radius: 50%; background: var(--deep); padding: 5px; }
.demo-q {
  margin-inline-start: auto;
  width: fit-content;
  max-width: 88%;
  background: var(--mid);
  color: #fff;
  padding: 10px 16px;
  border-radius: 18px;
  border-end-end-radius: 6px;
  font-size: 16px;
}
.demo-a {
  margin-top: 14px;
  background: #f7f9f8;
  border: 1px solid var(--line);
  padding: 14px 16px;
  border-radius: 18px;
  border-end-start-radius: 6px;
  font-size: 15.5px;
  line-height: 1.9;
}
.demo-a p + p { margin-top: 8px; }
.cite {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5em;
  height: 1.5em;
  margin-inline-start: 3px;
  border-radius: 999px;
  border: 1px solid rgba(30, 58, 58, .35);
  background: rgba(30, 58, 58, .08);
  color: var(--mid);
  font-size: .68em;
  font-weight: 700;
  vertical-align: super;
  line-height: 1;
}
.demo-src {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-3);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.demo-src b { color: var(--text-2); font-weight: 600; }

/* ─── sections ────────────────────────────────────────────────────────────────────────────────────────────────── */
section { padding-block: 84px; }
section.alt { background: var(--card); }
.section-head { max-width: 680px; margin-bottom: 42px; }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker { font-size: 14px; font-weight: 700; color: var(--mid); letter-spacing: .02em; margin-bottom: 10px; }
html[lang="en"] .kicker { text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
h2 { font-size: clamp(26px, 3.2vw, 36px); font-weight: 700; color: var(--ink); }
.section-head p { margin-top: 12px; color: var(--text-2); font-size: 18px; }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
section.alt .feature { background: var(--page); }
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--mint-soft);
  color: var(--mid);
  margin-bottom: 14px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 19px; font-weight: 700; color: var(--ink); }
.feature p { margin-top: 8px; color: var(--text-2); font-size: 16px; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 24px;
  counter-increment: step;
}
.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--mid);
  color: #fff;
  font-weight: 700;
  margin-bottom: 14px;
}
.step h3 { font-size: 19px; color: var(--ink); }
.step p { margin-top: 8px; color: var(--text-2); font-size: 16px; }

/* the library */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 30px;
}
.stat {
  background: var(--deep);
  color: #fff;
  border-radius: var(--radius);
  padding: 22px 20px;
}
.stat b { display: block; font-size: 34px; line-height: 1.1; color: var(--mint); font-weight: 700; }
.stat span { display: block; margin-top: 6px; color: #c7d9d9; font-size: 15px; }
.books {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.books li {
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 15px;
  color: var(--text-2);
}
.books li small { color: var(--text-3); font-size: 13px; }
.books-note { margin-top: 18px; color: var(--text-3); font-size: 15px; }

/* plans (no prices: they follow the visitor's country inside the app) */
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.plan {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
}
.plan.featured { border: 2px solid var(--mid); }
.plan h3 { font-size: 20px; color: var(--ink); }
.plan p { margin-top: 8px; color: var(--text-2); font-size: 16px; flex: 1; }
.plan .tag { align-self: flex-start; font-size: 13px; font-weight: 700; color: var(--mid); background: var(--mint-soft); border-radius: 999px; padding: 3px 10px; margin-bottom: 12px; }
.plans-note { margin-top: 18px; color: var(--text-3); font-size: 15px; text-align: center; }

/* developers */
.dev {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--deep);
  color: #e8eef0;
  border-radius: 22px;
  padding: 32px;
}
.dev h2 { color: #fff; font-size: clamp(22px, 2.6vw, 28px); }
.dev p { margin-top: 8px; color: #c7d9d9; max-width: 40em; }
.dev .btn { flex-shrink: 0; }

/* questions */
.faq { max-width: 820px; margin-inline: auto; }
.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 20px;
  margin-bottom: 12px;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 0;
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--mid); font-size: 22px; line-height: 1; flex-shrink: 0; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: 18px; color: var(--text-2); font-size: 16px; }

/* last call */
.cta {
  text-align: center;
  background: linear-gradient(180deg, var(--deep), var(--ink));
  color: #fff;
}
.cta h2 { color: #fff; }
.cta p { margin-top: 12px; color: #c7d9d9; }
.cta .hero-cta { justify-content: center; }

footer {
  background: var(--ink);
  color: #8fb0ac;
  font-size: 15px;
  padding-block: 40px calc(32px + env(safe-area-inset-bottom));
}
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.foot img { width: 112px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot nav a { color: #aec6c6; text-decoration: none; }
.foot nav a:hover { color: #fff; }
.foot-note { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 14px; line-height: 1.7; }

/* ─── tablets and phones ──────────────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; padding-block: 36px 64px; }
  .features, .steps, .plans { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .dev { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  section { padding-block: 60px; }
  .features, .steps, .plans { grid-template-columns: 1fr; }
  .nav { min-height: 64px; gap: 10px; }
  .nav-logo img { width: 124px; }
  .nav .btn-ghost { display: none; }
  .hero-cta .btn { flex: 1 1 100%; }
  .demo { padding: 16px; }
  .stat { padding: 18px 16px; }
  .stat b { font-size: 28px; }
  .dev { padding: 24px 20px; }
  .dev .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
