/* Shared by every AskTali page: brand tokens, base, header, buttons, footer. */

:root {
  --paper: #F6F0E5;
  --paper-deep: #EDE3D3;
  --surface: #FFFAF1;
  --recessed: #F4ECDF;
  --petrol-950: #052C32;
  --petrol-800: #0B5159;
  --ink: #17373A;
  --muted: #5D6F6C;
  --faint: #77847E;
  --mint: #69E1C1;
  --mint-soft: #D6F5EA;
  --on-petrol: #E9F4F0;
  --line: rgba(23, 55, 58, 0.14);
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 20px;
  --gutter: clamp(16px, 4vw, 32px);
  --max: 1160px;
  --font-ar: 'IBM Plex Sans Arabic', Tahoma, Arial, sans-serif;
  --font-mark: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ar);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { color: var(--petrol-950); line-height: 1.5; font-weight: 700; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100;
  background: var(--petrol-950); color: var(--on-petrol); padding: 10px 16px; border-radius: var(--radius-sm);
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Brand lockup (LTR so the Latin wordmark sits beside the mark) ── */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  direction: ltr; text-decoration: none; color: var(--petrol-950);
}
.brand img { width: 40px; height: 40px; border-radius: 14px 14px 8px 6px; }
.brand span { font-family: var(--font-mark); font-weight: 800; font-size: 25px; line-height: 1; letter-spacing: -1.13px; }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 240, 229, 0.86);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.nav { display: flex; gap: 28px; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; transition: color .15s; }
.nav a:hover { color: var(--petrol-950); }
@media (max-width: 760px) { .nav { display: none; } }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-ar); font-weight: 700; font-size: 17px; line-height: 1.5;
  text-decoration: none; border-radius: var(--radius-sm);
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-sm { font-size: 15px; padding: 9px 16px; background: var(--petrol-950); color: var(--on-petrol); }
.btn-sm:hover { background: var(--petrol-800); }

.appstore {
  background: var(--petrol-950); color: var(--on-petrol);
  padding: 10px 22px 10px 26px; min-height: 60px;
  box-shadow: 0 10px 24px -12px rgba(5, 44, 50, .55);
}
.appstore:hover { background: var(--petrol-800); }
.appstore svg { width: 26px; height: 26px; flex: none; fill: currentColor; }
.appstore .label { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.appstore small { font-size: 12px; font-weight: 600; opacity: .8; }
.appstore strong { font-size: 20px; direction: ltr; font-weight: 700; }
.appstore.on-dark { background: var(--mint); color: var(--petrol-950); box-shadow: none; }
.appstore.on-dark:hover { background: #8BEBD2; }

.link-arrow { font-weight: 600; color: var(--petrol-950); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; padding: 8px 4px; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 6px; }

/* ── Footer ── */
.site-footer { background: var(--paper-deep); color: var(--muted); padding-block: 56px 32px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
.footer-about p { margin-top: 14px; max-width: 26em; line-height: 1.8; }
.footer-col h2 { font-size: 15px; color: var(--petrol-950); margin-bottom: 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-col a { text-decoration: none; font-weight: 600; }
.footer-col a[dir="ltr"] { unicode-bidi: isolate; }
.footer-col a:hover { color: var(--petrol-950); text-decoration: underline; text-underline-offset: 5px; }
.footer-bottom {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: var(--faint); font-size: 13px;
}
.footer-bottom [dir="ltr"] { unicode-bidi: isolate; }
