/* =========================================================
   Arabic AI Voice — main stylesheet
   Colours, fonts and spacing are set once below (:root).
   ========================================================= */

:root {
  --night: #0E1B2C;      /* dark sections, footer */
  --ink: #10213A;        /* headings, main text, outlines */
  --text: #2B3A4E;       /* body text */
  --muted: #556274;      /* secondary text (passes 4.5:1 on white) */
  --line: #DDE2E8;       /* borders */
  --mist: #F2F5F7;       /* alternate section background */
  --white: #FFFFFF;
  --teal: #0A6B63;       /* buttons, links */
  --teal-dark: #074E48;
  --teal-soft: #E3F2EF;
  --saffron: #F2B73A;    /* highlights, contributor banner */
  --on-dark: #C9D3DE;    /* body text on dark */
  --on-dark-muted: #9FB0C3;
  --dark-line: #2A3E58;

  --font-display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-arabic: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --wrap: 1200px;
  --radius: 12px;
  --section-pad: clamp(56px, 8vw, 96px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

[dir="rtl"] body, body[dir="rtl"], [lang="ar"] {
  font-family: var(--font-arabic);
}

img, svg { max-width: 100%; }

a { color: var(--teal); }
a:hover { color: var(--teal-dark); }

:focus-visible {
  outline: 3px solid var(--saffron);
  outline-offset: 2px;
}

h1, h2, h3 { margin: 0; color: inherit; }
p { margin: 0; }

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { top: 12px; }

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

.section { padding-block: var(--section-pad); }
.section--mist { background: var(--mist); }
.section--dark { background: var(--night); color: #E8EDF2; }
.section--saffron { background: var(--saffron); }
.section--narrow .wrap { max-width: 860px; }

.kicker {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}
.section--dark .kicker { color: var(--saffron); }

.h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(38px, 5.2vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 3.6vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  max-width: 820px;
}
.h3 { font-size: 20px; font-weight: 600; line-height: 1.3; }

[lang="ar"] .h1, [lang="ar"] .h2, [dir="rtl"] .h1, [dir="rtl"] .h2 {
  font-family: var(--font-arabic);
  letter-spacing: 0;
  line-height: 1.35;
}

.lead { font-size: 19px; max-width: 620px; margin-top: 20px; }
.muted { color: var(--muted); }
.body-text { color: var(--text); margin-top: 16px; }
.section--dark .body-text { color: var(--on-dark); }
.mono { font-family: var(--font-mono); }
.arabic { font-family: var(--font-arabic); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--teal); color: var(--white); }
.btn--primary:hover { background: var(--teal-dark); color: var(--white); }
.btn--saffron { background: var(--saffron); color: var(--ink); }
.btn--saffron:hover { background: #E2A522; color: var(--ink); }
.btn--ink { background: var(--ink); color: var(--white); }
.btn--ink:hover { background: #1C3557; color: var(--white); }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--white); }
.btn--ghost-light { border-color: #5B6E86; color: var(--white); background: transparent; }
.btn--ghost-light:hover { background: rgba(255,255,255,.08); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand img { width: 34px; height: 34px; }
.brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.nav { display: flex; align-items: center; gap: 22px; }
.nav a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
}
.nav a:not(.btn):hover { color: var(--teal); }
.nav .btn { min-height: 44px; padding: 10px 18px; font-size: 15px; }
.lang-switch { display: flex; gap: 6px; font-size: 14px; color: var(--muted); }
.lang-switch a { color: var(--muted) !important; }
.lang-switch [aria-current="true"] { color: var(--ink); font-weight: 600; }

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1060px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 20px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 17px;
  }
  .nav .lang-switch { padding: 14px 0; }
  .nav .btn { margin-top: 12px; }
}

/* ---------- Hero ---------- */
.hero { background: var(--night); color: #E8EDF2; }
.hero .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
  padding-block: clamp(64px, 9vw, 96px);
}
.hero__text { flex: 1 1 520px; min-width: 0; }
.hero__text .h1 { color: var(--white); }
.hero__text .lead { color: var(--on-dark); }
.hero__text .kicker { color: var(--saffron); }
.hero__arabic { margin-top: 18px; font-family: var(--font-arabic); font-size: 22px; color: var(--on-dark); }
.hero__visual { flex: 1 1 400px; min-width: 0; }

.clip-card {
  margin: 0;
  background: #16283F;
  border: 1px solid var(--dark-line);
  border-radius: 14px;
  padding: 24px;
}
.clip-card__head {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--on-dark-muted);
}
.clip-card__wave { display: block; width: 100%; height: 70px; margin: 18px 0; }
.clip-card__text {
  font-family: var(--font-arabic);
  font-size: 22px;
  line-height: 1.7;
  color: var(--white);
}
.clip-card__text .cs { color: #4FB3A9; }
.clip-card__meta {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--dark-line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--on-dark-muted);
}
.clip-card__meta b { color: #E8EDF2; font-weight: 400; }
.clip-card figcaption { margin-top: 14px; font-size: 13px; color: var(--on-dark-muted); }

/* ---------- Trust strip ---------- */
.trust { border-bottom: 1px solid var(--line); }
.trust ul {
  list-style: none;
  margin: 0;
  padding: 24px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}
.trust li { display: flex; align-items: center; gap: 8px; }
.trust svg { color: var(--teal); flex: 0 0 auto; }

/* ---------- Layout helpers ---------- */
.split { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.split > * { flex: 1 1 420px; min-width: 0; }
.grid { display: grid; gap: 20px; margin-top: 40px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid--5 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.section--mist .card { border-color: transparent; }
.card p { color: var(--text); margin-top: 10px; }
.card--dark { background: transparent; border-color: var(--dark-line); }
.card--dark .h3 { color: var(--white); }
.card--dark p { color: var(--on-dark); }
.card--soft { background: var(--mist); border: 0; }

.stat {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 48px;
  line-height: 1;
}
.source { margin-top: 12px; font-size: 13px; color: var(--muted); }

/* Dialects */
.dialect { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.dialect--active { border: 2px solid var(--ink); }
.dialect__name { font-weight: 600; font-size: 20px; }
.dialect__code { font-family: var(--font-mono); font-size: 14px; color: var(--muted); margin-top: 2px; }
.badge {
  display: inline-block;
  margin-top: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  background: #EEF1F4;
  color: var(--text);
}
.badge--live { background: var(--teal-soft); color: var(--teal-dark); }

/* Steps */
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.steps li { border-top: 3px solid var(--ink); padding-top: 16px; }
.steps .num { font-family: var(--font-mono); color: var(--muted); }
.steps .title { font-weight: 600; font-size: 19px; margin-top: 4px; }
.steps p { color: var(--text); font-size: 16px; margin-top: 6px; }
.steps--cards li { border-top: 0; background: var(--mist); border-radius: var(--radius); padding: 24px; }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.checklist li { background: var(--mist); border-radius: 10px; padding: 18px; }
.checklist strong { display: block; }
.checklist span { color: var(--text); font-size: 16px; }

/* Specs table */
.table-box { margin-top: 32px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table-box table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 16px; }
.table-box th, .table-box td { padding: 16px 20px; text-align: start; vertical-align: top; }
.table-box tr + tr { border-top: 1px solid var(--line); }
.table-box th { width: 220px; background: var(--mist); }

/* Offer cards */
.offer { display: flex; flex-direction: column; gap: 10px; }
.offer .step { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.offer .h3 { font-size: 22px; }
.offer .price { margin-top: auto; padding-top: 10px; font-weight: 600; color: var(--ink); }
.offer--featured { outline: 2px solid var(--ink); }

/* Team */
.person { display: flex; gap: 20px; align-items: flex-start; }
.person__photo {
  flex: 0 0 88px;
  width: 88px; height: 88px;
  border-radius: 50%;
  background: var(--line);
  object-fit: cover;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; color: var(--text);
}
.person p { color: var(--text); font-size: 16px; margin-top: 10px; }
.person .role { color: var(--muted); margin-top: 2px; font-size: 16px; }

/* Banner */
.banner .wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding-block: 56px; }
.banner .h2 { font-size: clamp(26px, 3vw, 34px); }

/* Contact block */
.contact-list p + p { margin-top: 18px; }
.contact-list strong { color: var(--ink); }
.contact-list { color: var(--text); font-size: 16px; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(20px, 4vw, 32px);
}
.form-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 500; }
.field input, .field select, .field textarea {
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  padding: 12px 14px;
  min-height: 48px;
  border: 1px solid #8796A8;
  border-radius: 8px;
  background: var(--white);
  width: 100%;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); outline: 2px solid var(--teal-soft); }
.field .req { color: #A0331F; }
fieldset.group { border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin: 0; }
fieldset.group legend { font-weight: 500; padding: 0 6px; }
.options { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; font-weight: 400; cursor: pointer; }
.check input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--teal); }
.consent { align-items: flex-start; font-size: 16px; color: var(--text); }
.consent input { margin-top: 3px; }
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.form-status { margin-top: 16px; padding: 14px 16px; border-radius: 8px; font-size: 16px; display: none; }
.form-status.is-error { display: block; background: #FBEAE6; color: #7A2414; }
.form-status.is-info { display: block; background: var(--teal-soft); color: var(--teal-dark); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #A0331F; }

/* Photo placeholder */
.photo-placeholder {
  min-height: 320px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--on-dark);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 24px;
  font-size: 15px;
}
.photo { width: 100%; border-radius: 14px; object-fit: cover; aspect-ratio: 4 / 3; }

/* Bullets */
.list { margin: 18px 0 0; padding-inline-start: 22px; color: var(--text); }
.list li + li { margin-top: 6px; }

/* WhatsApp floating button (contributor pages) */
.wa-btn {
  position: fixed;
  inset-inline-end: 20px;
  bottom: 20px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #1F7A4D;
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(16, 33, 58, .25);
}
.wa-btn:hover { background: #17603C; color: var(--white); }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: var(--on-dark-muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; padding-block: 40px; }
.site-footer p { max-width: 560px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--on-dark); }
.site-footer a:hover { color: var(--white); }

/* ---------- Simple pages (legal, thank-you) ---------- */
.page { padding-block: var(--section-pad); }
.page .wrap { max-width: 820px; }
.page h2 { font-family: var(--font-display); font-size: 26px; margin-top: 40px; }
.page p, .page li { color: var(--text); }
.page p { margin-top: 12px; }
.todo { background: #FFF6E0; border: 1px dashed #C98A12; border-radius: 8px; padding: 12px 14px; color: #6B4A06; }

/* ---------- RTL adjustments ---------- */
[dir="rtl"] .steps .num,
[dir="rtl"] .dialect__code { direction: ltr; text-align: right; }
[dir="rtl"] .brand span { font-family: var(--font-display); }
[dir="rtl"] input[type="tel"] { direction: ltr; text-align: right; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .clip-card__meta { grid-template-columns: 1fr; }
  .wa-btn span { display: none; }
  .wa-btn { padding: 14px; }
}

@media print {
  .site-header, .wa-btn, .nav-toggle { display: none; }
}
