/* Base, layout and components. Section styles are in sections.css. */
:root {
  --brand: #0f766e;
  --brand-dark: #0b5952;
  --accent: #f59e0b;
  --ink: #102a27;
  --muted: #4b6360;
  --bg: #ffffff;
  --bg-alt: #f0f7f6;
  --line: #d6e5e3;
  --radius: 14px;
  --font: "Segoe UI", Tahoma, "Noto Sans Arabic", "Geeza Pro", "Arial",
    system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}

/* Bilingual content: show only the active language. */
html[lang="ar"] body [lang="en"],
html[lang="en"] body [lang="ar"] { display: none; }

img { max-width: 100%; height: auto; }

a { color: var(--brand-dark); }

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

h1, h2, h3 { line-height: 1.3; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); text-align: center; }
h3 { font-size: 1.125rem; }

code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  background: var(--bg-alt);
  padding: 0 0.3em;
  border-radius: 4px;
  direction: ltr;
  unicode-bidi: isolate;
}

.wrap { width: min(1100px, 100% - 2rem); margin-inline: auto; }
section { padding-block: 3.5rem; }
.alt { background: var(--bg-alt); }
.center { text-align: center; }
.small { font-size: 0.925rem; color: var(--muted); }

.skip {
  position: absolute;
  inset-inline-start: 1rem;
  top: -3rem;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { top: 1rem; }

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
}
.bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
}
nav { display: flex; gap: 1.25rem; margin-inline-start: auto; }
nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
nav a:hover { color: var(--brand); }

/* Buttons */
.btn, .lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
}
.lang {
  min-height: 40px;
  padding: 0.3rem 1rem;
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.primary { background: var(--brand); color: #fff; }
.primary:hover { background: var(--brand-dark); }
.ghost { border-color: #fff; color: #fff; }
.ghost:hover { background: rgba(255, 255, 255, 0.12); }
.whatsapp { background: #1f8f4e; color: #fff; }
.whatsapp:hover { background: #18723e; }

@media (max-width: 720px) {
  nav { display: none; }
  .lang { margin-inline-start: auto; }
  section { padding-block: 2.5rem; }
}

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