/* ============================================================
   BotBuild SA — public site styles
   Palette: deep emerald + gold accents on sand/beige (light)
   ============================================================ */

:root {
  --bg: #faf6ef;
  --bg-alt: #fffdf8;
  --surface: #ffffff;
  --text: #182d2a;
  --muted: #5c6b67;
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-soft: #d7efec;
  --gold: #c8a24b;
  --gold-soft: #f2e7cd;
  --border: #e8e1d3;
  --shadow: 0 10px 30px -12px rgba(20, 50, 45, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1120px;
}

[data-theme="dark"] {
  --bg: #0b1413;
  --bg-alt: #0f1c1a;
  --surface: #13211f;
  --text: #e8efec;
  --muted: #9bafa9;
  --primary: #19b9ab;
  --primary-dark: #0d9488;
  --primary-soft: #11302c;
  --gold: #d9b65a;
  --gold-soft: #2a2417;
  --border: #21302d;
  --shadow: 0 12px 34px -14px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Cairo", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[lang="en"] body {
  font-family: "Inter", "Cairo", system-ui, sans-serif;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 22px;
}
.container--narrow { max-width: 780px; }

/* Decorative Arabic geometric pattern */
.pattern-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='none' stroke='%230d9488' stroke-opacity='0.06' stroke-width='1'%3E%3Cpath d='M30 0l15 15-15 15-15-15z'/%3E%3Cpath d='M30 30l15 15-15 15-15-15z'/%3E%3Ccircle cx='30' cy='30' r='6'/%3E%3C/g%3E%3C/svg%3E");
}

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 8px 20px -8px var(--primary);
}
.btn--primary:hover { box-shadow: 0 12px 26px -8px var(--primary); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn--sm { padding: 9px 16px; font-size: 0.9rem; }
.btn--block { width: 100%; }

/* ───────── Navbar ───────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; }
.brand__mark {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  background: var(--primary-soft);
  border-radius: 12px;
  font-size: 1.2rem;
}
.brand__name { letter-spacing: 0.2px; }
.nav__links { display: flex; gap: 26px; font-weight: 600; }
.nav__links a { color: var(--muted); transition: color 0.15s; }
.nav__links a:hover { color: var(--primary); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  display: grid; place-items: center;
  min-width: 40px; height: 40px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer; color: var(--text);
  font-weight: 700; font-size: 0.95rem;
}
.icon-btn:hover { border-color: var(--primary); }
.theme-icon--moon { display: none; }
[data-theme="dark"] .theme-icon--sun { display: none; }
[data-theme="dark"] .theme-icon--moon { display: inline; }
.nav__burger { display: none; }

/* ───────── Hero ───────── */
.hero { position: relative; padding: 72px 0 56px; }
.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.badge {
  display: inline-block;
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
  font-weight: 700; font-size: 0.82rem;
  padding: 6px 14px; border-radius: 999px;
  margin-bottom: 18px;
}
.hero__title { font-size: clamp(2rem, 4.5vw, 3.1rem); line-height: 1.25; font-weight: 800; letter-spacing: -0.3px; }
.hero__sub { color: var(--muted); font-size: 1.12rem; margin: 18px 0 26px; max-width: 56ch; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__points { list-style: none; display: flex; flex-wrap: wrap; gap: 14px 22px; margin-top: 26px; color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.hero__points li { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }

/* Chat card visual */
.hero__visual { display: flex; justify-content: center; }
.chat-card {
  width: 100%; max-width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 18px;
  transform: rotate(-1.5deg);
}
.chat-card__head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.chat-card__avatar { width: 44px; height: 44px; display: grid; place-items: center; background: var(--primary-soft); border-radius: 50%; font-size: 1.3rem; }
.chat-card__head strong { display: block; }
.chat-card__head small { color: var(--primary); font-weight: 600; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 16px; margin-bottom: 10px; font-size: 0.95rem; }
.bubble--in { background: var(--primary-soft); border-end-start-radius: 4px; }
.bubble--out { background: var(--primary); color: #fff; margin-inline-start: auto; border-end-end-radius: 4px; }

/* ───────── Sections ───────── */
.section { padding: 72px 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section__head h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 800; }
.section__head p { color: var(--muted); margin-top: 10px; font-size: 1.05rem; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

/* Service cards */
.service-card { position: relative; transition: transform 0.2s ease, border-color 0.2s; }
.service-card:hover { transform: translateY(-4px); border-color: var(--primary); }
.service-card__icon { width: 56px; height: 56px; display: grid; place-items: center; font-size: 1.7rem; background: var(--primary-soft); border-radius: 14px; margin-bottom: 16px; }
.service-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.service-card p { color: var(--muted); margin-bottom: 18px; }
.price { font-size: 1.05rem; color: var(--text); font-weight: 600; padding-top: 14px; border-top: 1px dashed var(--border); }
.price strong { color: var(--primary); font-size: 1.4rem; }
.service-card--featured { border-color: var(--gold); box-shadow: 0 14px 40px -16px var(--gold); }
.ribbon {
  position: absolute; inset-block-start: -12px; inset-inline-end: 18px;
  background: var(--gold); color: #3a2e08;
  font-weight: 800; font-size: 0.78rem;
  padding: 5px 12px; border-radius: 999px;
}

/* Work cards */
.work-card__thumb { height: 120px; border-radius: 12px; display: grid; place-items: center; font-size: 2.6rem; margin-bottom: 16px; }
.work-card__thumb--a { background: linear-gradient(135deg, #0d9488, #14b8a6); }
.work-card__thumb--b { background: linear-gradient(135deg, #0f766e, #0d9488); }
.work-card__thumb--c { background: linear-gradient(135deg, #c8a24b, #e0c878); }
.work-card h3 { font-size: 1.12rem; margin-bottom: 6px; }
.work-card p { color: var(--muted); margin-bottom: 14px; }
.tag { display: inline-block; background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; font-size: 0.8rem; padding: 4px 12px; border-radius: 999px; }

/* Testimonials */
.testi-card .stars { color: var(--gold); letter-spacing: 2px; margin-bottom: 12px; }
.testi-card blockquote { font-size: 1.02rem; margin-bottom: 16px; }
.testi-card figcaption { display: flex; flex-direction: column; }
.testi-card figcaption strong { color: var(--primary); }
.testi-card figcaption span { color: var(--muted); font-size: 0.88rem; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq__item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 18px; }
.faq__item summary {
  cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; color: var(--primary); font-size: 1.4rem; font-weight: 700; }
.faq__item[open] summary::after { content: "−"; }
.faq__item p { color: var(--muted); padding: 0 0 16px; }

/* Contact */
.contact { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 40px; align-items: start; }
.contact__info h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
.contact__info p { color: var(--muted); margin: 12px 0 22px; }
.contact__list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.contact__list li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.contact__list span:first-child { width: 38px; height: 38px; display: grid; place-items: center; background: var(--primary-soft); border-radius: 10px; }
.contact__form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { font-weight: 700; font-size: 0.92rem; }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 1rem;
  padding: 12px 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.field textarea { resize: vertical; }
.form-status { font-weight: 700; min-height: 1.2em; text-align: center; }
.form-status--ok { color: var(--primary); }
.form-status--err { color: #d14343; }

/* Footer */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); margin-top: 24px; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1.6fr; gap: 32px; padding: 52px 0 30px; }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col h4 { font-size: 1rem; margin-bottom: 4px; }
.footer__col a { color: var(--muted); }
.footer__col a:hover { color: var(--primary); }
.brand--footer { font-size: 1.1rem; }
.footer__tag, .footer__legal { color: var(--muted); font-size: 0.92rem; }
.footer__bar { border-top: 1px solid var(--border); padding: 18px 0; text-align: center; color: var(--muted); font-size: 0.88rem; }

/* ───────── Responsive ───────── */
@media (max-width: 880px) {
  .hero__inner { grid-template-columns: 1fr; gap: 36px; }
  .hero__visual { order: -1; }
  .cards { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: 24px; }
  .nav__links {
    position: absolute; inset-inline: 0; top: 68px;
    flex-direction: column; gap: 0;
    background: var(--bg-alt); border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height 0.25s ease;
  }
  .nav__links a { padding: 14px 22px; border-top: 1px solid var(--border); }
  .nav__links--open { max-height: 320px; }
  .nav__burger { display: grid; }
  .nav__links { display: flex; }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; }
}

/* ───────── Support footer (4 columns) + contact links ───────── */
.footer__inner--4 { grid-template-columns: 1.6fr 1fr 1.3fr 1.3fr; }
.footer__col a { display: inline-flex; align-items: center; gap: 6px; }
.contact__list a { color: inherit; }
.contact__list a:hover { color: var(--primary); }

/* ───────── Legal pages ───────── */
/* Show only the block matching the current <html lang>. */
html[lang="en"] .lang-ar { display: none; }
html[lang="ar"] .lang-en { display: none; }

.legal h1 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 800; margin-bottom: 6px; }
.legal .legal-updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 22px; }
.legal h2 { font-size: 1.15rem; font-weight: 700; color: var(--primary-dark); margin: 26px 0 8px; }
.legal p { color: var(--text); margin-bottom: 10px; }
.legal ol, .legal ul { margin: 6px 0 14px; padding-inline-start: 1.4em; display: flex; flex-direction: column; gap: 8px; }
.legal li { color: var(--text); }

@media (max-width: 880px) {
  .footer__inner--4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer__inner--4 { grid-template-columns: 1fr; }
}
