/* Daftarak official site. Colours mirror the app theme (olive, sugar, charcoal). */
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("/assets/fonts/IBMPlexSansArabic-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("/assets/fonts/IBMPlexSansArabic-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --olive: #355e3b;
  --olive-dark: #284a2d;
  --olive-soft: #e8efe6;
  --sugar: #faf7f0;
  --card: #ffffff;
  --charcoal: #252525;
  --muted: #5c5a55;
  --border: #e4ded1;
  --warning: #8a4f00;
  --warning-soft: #fbf1e1;
  --radius: 14px;
  --max: 920px;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--sugar);
  color: var(--charcoal);
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.85;
  overflow-wrap: break-word;
}

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

a { color: var(--olive); text-underline-offset: 3px; }
a:hover { color: var(--olive-dark); }
a:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--olive);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 16px;
}

/* Header */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding-block: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--charcoal);
  font-weight: 700;
  font-size: 1.35rem;
  text-decoration: none;
}
.brand img { width: 40px; height: 40px; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--charcoal);
  text-decoration: none;
  font-size: 0.98rem;
}
.site-nav a:hover { background: var(--olive-soft); }
.site-nav a[aria-current="page"] {
  background: var(--olive);
  color: #fff;
}

/* Hero */
.hero {
  padding-block: 48px 36px;
  text-align: center;
}
.hero img { width: 96px; height: 96px; }
.hero h1 {
  margin: 12px 0 4px;
  font-size: clamp(2.2rem, 7vw, 3rem);
  line-height: 1.3;
}
.tagline {
  margin: 0 0 16px;
  color: var(--olive);
  font-weight: 700;
  font-size: clamp(1.2rem, 4vw, 1.5rem);
}
.lead {
  max-width: 640px;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 1.12rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 10px;
  border: 2px solid var(--olive);
  font-weight: 700;
  text-decoration: none;
  min-height: 48px;
}
.btn-primary { background: var(--olive); color: #fff; }
.btn-primary:hover { background: var(--olive-dark); border-color: var(--olive-dark); color: #fff; }
.btn-secondary { background: transparent; color: var(--olive); }
.btn-secondary:hover { background: var(--olive-soft); }

/* Sections */
main { padding-bottom: 40px; }
section { margin-block: 28px; }
h2 {
  margin: 0 0 12px;
  font-size: 1.45rem;
  line-height: 1.5;
}
h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  line-height: 1.5;
}
p { margin: 0 0 12px; }
ul.list, ol.list { margin: 0 0 12px; padding-inline-start: 1.3em; }
ul.list li, ol.list li { margin-bottom: 6px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
}
.card-highlight {
  border-color: var(--olive);
  border-width: 2px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.features li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.features p { margin: 0; color: var(--muted); }

.note {
  background: var(--warning-soft);
  border-inline-start: 4px solid var(--warning);
  border-radius: 8px;
  padding: 12px 16px;
}

code, .mono {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92em;
  direction: ltr;
  unicode-bidi: isolate;
  overflow-wrap: anywhere;
  background: var(--olive-soft);
  padding: 1px 6px;
  border-radius: 6px;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.contact-grid .card { display: flex; flex-direction: column; gap: 8px; }
.contact-grid .btn { align-self: flex-start; }

/* Support */
.faq .card + .card { margin-top: 12px; }
.spaced { margin-top: 12px; }

/* Legal documents */
.doc-head { padding-block: 36px 8px; }
.doc-head h1 {
  margin: 0 0 6px;
  font-size: clamp(1.9rem, 6vw, 2.4rem);
  line-height: 1.35;
}
.meta { color: var(--muted); margin: 0; }
.toc ol { margin: 0; padding-inline-start: 1.4em; columns: 2 220px; column-gap: 24px; }
.toc li { margin-bottom: 4px; break-inside: avoid; }
.doc section { scroll-margin-top: 16px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 0.95rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  padding-block: 20px;
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer p { margin: 0; }

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

@media print {
  .site-header nav, .skip-link, .actions { display: none; }
  body { background: #fff; }
  .card, .features li { border-color: #999; }
}
