/* AF Survey landing — the AF LAB design language (ink palette, gold accent, IBM Plex Sans Arabic). */
@font-face { font-family: "IBM Plex Sans Arabic"; src: url(/fonts/plex-arabic-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url(/fonts/plex-arabic-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
:root {
  --r-xl: 22px; --r: 16px; --r-sm: 10px; --wrap: 1200px; --gut: 16px;
  --font: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --bg: #f6f5f2; --surface: #fff; --surface-2: #efede8; --text: #16202e; --muted: #5a6372; --line: #e1ddd5;
  --brand: #0e1a2b; --accent: #a8834e; --accent-strong: #86663a; --on-accent: #fff; --accent-soft: #f1e8da; --ok: #2f7a4f; --ok-soft: #e3f1e8;
  --link: #2d5bd3; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 8px 28px rgba(16,24,40,.07); color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b121d; --surface: #111a28; --surface-2: #172234; --text: #e7ebf1; --muted: #98a2b3; --line: #233045;
  --brand: #070d17; --accent: #c39b62; --accent-strong: #d4ae77; --on-accent: #10161f; --accent-soft: #2a2418; --ok: #6cc391; --ok-soft: #14281d;
  --link: #7fb0ff; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.3); color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; z-index: 50; text-decoration: none; font-weight: 700; }
.skip:focus { top: 12px; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 22px; min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo { width: 40px; height: 40px; border-radius: 11px; background: #17251f; color: #e8eee9; display: grid; place-items: center; line-height: 1; position: relative; font-family: Arial, sans-serif; }
.logo b { font-size: 15px; letter-spacing: -1px; margin-top: 4px; }
.logo small { font-size: 7px; letter-spacing: 2px; opacity: .8; margin-top: -10px; font-weight: 700; }
.logo::after { content: ""; position: absolute; top: 5px; inset-inline-end: 6px; width: 6px; height: 6px; border-radius: 50%; background: #bd784c; }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: .3px; }
.brand-name em { font-style: normal; color: var(--accent); font-weight: 700; }
.nav { display: flex; gap: 4px; margin-inline-start: 8px; }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 10px; font-size: 15px; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; font: 700 14px var(--font); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 12px; font: 700 15px var(--font); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.gold { background: var(--accent); color: var(--on-accent); }
.btn.gold:hover { background: var(--accent-strong); }
.btn.primary { background: var(--text); color: var(--bg); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.ghost:hover { background: var(--surface-2); }

/* hero */
.hero { padding: 64px 0 40px; background:
  linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 56px 56px,
  linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 56px 56px; background-color: var(--bg); position: relative; }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 30%, transparent 0, var(--bg) 70%); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: end; }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 6px 14px; border-radius: 999px; }
h1 { font-size: clamp(34px, 5vw, 60px); line-height: 1.15; margin: 16px 0 14px; font-weight: 700; letter-spacing: -.5px; }
.lead { font-size: 18px; color: var(--muted); max-width: 640px; margin: 0 0 24px; }
.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; max-width: 620px; box-shadow: var(--shadow); color: var(--muted); }
.search input { flex: 1; border: 0; background: transparent; color: var(--text); font: 400 16px var(--font); min-height: 54px; outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 7px 15px; font: 400 14px var(--font); cursor: pointer; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); }
.stats dt { font-size: 30px; font-weight: 700; color: var(--accent); line-height: 1.2; }
.stats dd { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

/* sections */
.section { padding: 64px 0; }
.section.alt { background: var(--surface-2); }
.sec-head { margin-bottom: 26px; }
.sec-head h2, .desk h2 { font-size: 32px; margin: 0 0 6px; }
.sec-head p { color: var(--muted); margin: 0; }

/* tools */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); transition: transform .18s ease, border-color .18s ease; }
.tool:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.tool img { width: 72px; height: 72px; border-radius: 17px; box-shadow: 0 6px 18px rgba(0,0,0,.28); }
.tool h3 { margin: 0 0 6px; font-size: 20px; }
.tool h3 a { text-decoration: none; }
.tool h3 a:hover { color: var(--accent); }
.tool p { margin: 0; color: var(--muted); font-size: 15px; }
.tool .body { flex: 1; }
.io { list-style: none; direction: ltr; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 12px 0 0; }
.io li { font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); padding: 2px 10px; border-radius: 999px; color: var(--muted); direction: ltr; }
.tool .foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line); padding-top: 14px; }
.tool .foot .btn { min-height: 38px; font-size: 14px; padding: 0 14px; }
.only { font-size: 13px; color: var(--muted); }
.new { font-size: 12px; background: var(--ok-soft); color: var(--ok); padding: 2px 9px; border-radius: 999px; vertical-align: middle; margin-inline-start: 6px; }
.empty { color: var(--muted); text-align: center; padding: 30px; }

/* how */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.steps .n { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.steps h3 { margin: 12px 0 6px; font-size: 18px; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }

/* desktop */
.desk { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.desk p { color: var(--muted); margin: 0 0 20px; max-width: 520px; }
.icons { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; justify-items: center; }
.icons img { width: 92px; height: 92px; border-radius: 22px; box-shadow: 0 10px 26px rgba(0,0,0,.3); }

/* notes */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.note-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.note-card h3 { margin: 0 0 8px; font-size: 18px; }
.note-card p { margin: 0 0 8px; color: var(--muted); font-size: 15px; }
.link { color: var(--accent); font-weight: 700; }

/* footer */
.foot-site { border-top: 1px solid var(--line); padding: 34px 0 calc(34px + env(safe-area-inset-bottom)); }
.fgrid { display: grid; grid-template-columns: auto 1fr; gap: 10px 24px; align-items: center; }
.fgrid p { margin: 0; color: var(--muted); font-size: 14px; }
.flinks { display: flex; flex-wrap: wrap; gap: 6px 18px; grid-column: 1 / -1; }
.flinks a { color: var(--muted); font-size: 14px; text-decoration: none; }
.flinks a:hover { color: var(--accent); }
.copy { grid-column: 1 / -1; font-size: 13px !important; }

@media (max-width: 980px) {
  .hero-grid, .desk { grid-template-columns: 1fr; }
  .grid, .cols, .steps { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
}
@media (max-width: 640px) {
  .hero { padding: 36px 0 26px; }
  .grid, .cols, .steps { grid-template-columns: 1fr; }
  .btn.gold.hide-sm { display: none; }
  .bar { gap: 10px; }
  .brand-name em { display: none; }
  .actions .btn.gold { padding: 0 12px; font-size: 14px; }
  .section { padding: 44px 0; }
}

[dir="rtl"] .io { justify-content: flex-end; }
