/* Qareeb / Avoqia public site — static, no external dependencies */

:root {
  color-scheme: dark;
  --bg-deep: #050b14;
  --bg: #07111f;
  --bg-mid: #081728;
  --surface: #0b1728;
  --surface-raised: #0f1e33;
  --surface-muted: rgba(11, 23, 40, 0.78);
  --surface-tint: rgba(255, 255, 255, 0.035);
  --border: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(34, 211, 238, 0.25);
  --primary: #1d6fff;
  --primary-cyan: #22d3ee;
  --primary-hover: #3d84ff;
  --primary-dark: #155eef;
  --cyan-dark: #0891b2;
  --accent: var(--primary-cyan);
  --gold: #e7b941;
  --danger: #ff5c6c;
  --text: #f7fafc;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --text-subtle: #7c8aa0;
  --header-bg: rgba(7, 17, 31, 0.88);
  --footer-bg: rgba(5, 11, 20, 0.72);
  --code-bg: rgba(0, 0, 0, 0.28);
  --bubble-theirs-bg: var(--surface-raised);
  --nav-hover-bg: rgba(255, 255, 255, 0.05);
  --card-hover-border: rgba(34, 211, 238, 0.35);
  --badge-primary-text: #7dd3fc;
  --badge-cyan-text: #67e8f9;
  --gradient-primary: linear-gradient(135deg, #22d3ee 0%, #1d6fff 100%);
  --gradient-bg:
    radial-gradient(circle at 50% 15%, rgba(34, 211, 238, 0.1), transparent 38%),
    linear-gradient(180deg, #07111f 0%, #081728 45%, #050b14 100%);
  --glow-1: rgba(34, 211, 238, 0.14);
  --glow-2: rgba(29, 111, 255, 0.1);
  --glow-3: rgba(34, 211, 238, 0.06);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.22);
  --shadow-glow: 0 0 80px rgba(29, 111, 255, 0.12);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --container: 72rem;
  --content: 42rem;
  --header-h: 4.25rem;
  --font-sans: "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Noto Sans Arabic", "Tajawal", "Cairo", "Segoe UI", system-ui, sans-serif;
  --line-height-body: 1.72;
  --line-height-ar: 1.85;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg-deep: #eef4fa;
  --bg: #eef4fa;
  --bg-mid: #f4f8fc;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-muted: #f8fbff;
  --surface-tint: #f8fbff;
  --border: #d9e3f0;
  --border-subtle: #e4ebf4;
  --border-accent: rgba(29, 111, 255, 0.28);
  --primary: #1d6fff;
  --primary-cyan: #0891b2;
  --primary-hover: #155eef;
  --primary-dark: #155eef;
  --cyan-dark: #0e7490;
  --text: #0b1220;
  --text-soft: #475569;
  --text-muted: #7c8aa0;
  --text-subtle: #94a3b8;
  --header-bg: rgba(255, 255, 255, 0.94);
  --footer-bg: #f4f8fc;
  --code-bg: rgba(11, 18, 32, 0.06);
  --bubble-theirs-bg: #f0f4fa;
  --nav-hover-bg: rgba(29, 111, 255, 0.08);
  --card-hover-border: rgba(29, 111, 255, 0.35);
  --badge-primary-text: #155eef;
  --badge-cyan-text: #0e7490;
  --gradient-bg: linear-gradient(180deg, #eef4fa 0%, #f4f8fc 55%, #eef4fa 100%);
  --glow-1: rgba(29, 111, 255, 0.08);
  --glow-2: rgba(8, 145, 178, 0.06);
  --glow-3: rgba(29, 111, 255, 0.04);
  --shadow-sm: 0 1px 3px rgba(11, 18, 32, 0.08);
  --shadow-md: 0 12px 36px rgba(11, 18, 32, 0.1);
  --shadow-card: 0 2px 12px rgba(11, 18, 32, 0.07);
  --shadow-glow: 0 0 48px rgba(29, 111, 255, 0.08);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100%;
}

body {
  margin: 0;
  position: relative;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: clip;
  font-family: var(--font-sans);
  line-height: var(--line-height-body);
  color: var(--text);
  background: var(--bg);
  transition: background 0.2s ease, color 0.2s ease;
}

html[dir="rtl"] body {
  font-family: var(--font-ar);
  line-height: var(--line-height-ar);
}

.page-shell {
  padding-bottom: 4rem;
}

[lang="ar"] {
  font-family: var(--font-ar);
}

.site-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--gradient-bg);
  pointer-events: none;
}

.site-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--glow-1), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 20%, var(--glow-2), transparent 50%);
}

.network-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.55;
}

.hero-network-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  border-radius: inherit;
}

@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--primary-hover);
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  z-index: 1000;
}

.skip-link:focus,
.skip-link:focus-visible {
  position: fixed;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.5rem 1rem;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
  background: var(--surface-raised);
  border-radius: var(--radius-sm);
  color: var(--text);
  box-shadow: var(--shadow-md);
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
  min-width: 0;
}

.page-shell,
.site-header,
.header-inner,
.header-end {
  min-width: 0;
  max-width: 100%;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  flex-wrap: wrap;
}

.header-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
}

.header-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

:root[data-theme="light"] .theme-toggle {
  box-shadow: var(--shadow-sm);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme-toggle {
    box-shadow: var(--shadow-sm);
  }
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--primary);
  background: var(--surface-raised);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.lang-switch {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
}

.lang-switch a {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
}

.lang-switch a:hover {
  color: var(--text);
}

.lang-switch a[aria-current="true"] {
  color: var(--text);
  background: rgba(34, 211, 238, 0.14);
}

[dir="rtl"] .header-end {
  align-items: flex-start;
}

[dir="rtl"] .brand-link {
  flex-direction: row-reverse;
}

[dir="rtl"] .site-nav {
  direction: rtl;
}

[dir="rtl"] .legal-quick-links ul {
  direction: rtl;
}

[dir="rtl"] .store-buttons {
  direction: rtl;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.brand-link:hover {
  color: var(--text);
}

.brand-logo {
  display: block;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  object-fit: contain;
  box-shadow: var(--shadow-sm), 0 0 20px rgba(34, 211, 238, 0.15);
}

.hero-wordmark {
  display: block;
  width: min(12rem, 52vw);
  height: auto;
  margin-bottom: 1rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  box-shadow: var(--shadow-sm), 0 0 24px rgba(91, 108, 255, 0.25);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.brand-text {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-text [lang="ar"] {
  font-weight: 700;
  color: var(--text-soft);
}

.brand-byline {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-subtle);
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  row-gap: 0.45rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding-block: 0.25rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: normal;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--nav-hover-bg);
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  background: rgba(34, 211, 238, 0.12);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.28);
  font-weight: 600;
}

:root[data-theme="light"] .site-nav a[aria-current="page"] {
  background: rgba(29, 111, 255, 0.1);
  box-shadow: inset 0 0 0 1.5px rgba(29, 111, 255, 0.35);
  color: var(--primary-dark);
}

/* Policy metadata */

.policy-meta-bar,
.legal-meta-row.policy-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin: 0.75rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-muted);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.policy-meta-bar a {
  color: var(--primary);
}

.policy-meta-bar span {
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Homepage */

.page-home main {
  padding-bottom: 4rem;
}

.hero {
  position: relative;
  padding: 2.5rem 0 2rem;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
  min-width: 0;
}

.hero-copy,
.hero-visual {
  min-width: 0;
  max-width: 100%;
}

.hero-copy h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-ar-primary {
  display: block;
  font-family: var(--font-ar);
  font-size: clamp(2rem, 5.5vw, 3.1rem);
  font-weight: 800;
  line-height: 1.35;
  color: var(--text);
}

.hero-accent {
  color: var(--primary-cyan);
}

.hero-slogan {
  margin: 0 0 0.85rem;
  font-family: var(--font-ar);
  font-size: clamp(1.15rem, 2.8vw, 1.45rem);
  font-weight: 700;
  color: var(--text-soft);
  line-height: 1.5;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0 0 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.25rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s, background 0.15s;
}

.btn:focus-visible {
  outline: 2px solid var(--primary-cyan);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #041018;
  box-shadow: 0 4px 20px rgba(29, 111, 255, 0.28);
}

.btn-primary:hover {
  color: #041018;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(29, 111, 255, 0.35);
}

.btn-secondary {
  background: var(--surface-tint);
  border-color: var(--border-accent);
  color: var(--text);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  color: var(--text);
  border-color: var(--primary-cyan);
  background: rgba(34, 211, 238, 0.08);
}

.hero-trust {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 36rem;
  line-height: 1.65;
}

html[dir="rtl"] .hero-tagline-en,
html[dir="rtl"] .hero-lead {
  line-height: var(--line-height-ar);
  max-width: 44rem;
}

.hero-tagline-en {
  margin: 0 0 0.85rem;
  max-width: 36rem;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--text-soft);
  font-weight: 500;
}

.hero-ar {
  display: block;
  margin-top: 0.35rem;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  color: var(--text-soft);
}

.hero-lead {
  margin: 0 0 1.25rem;
  max-width: 36rem;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.hero-lead [lang="ar"] {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.98rem;
  line-height: 1.75;
}

/* Store CTA — replace disabled buttons with <a href="..."> when URLs are live */

.store-cta {
  margin: 0;
  padding: 1.5rem 1.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-accent);
  background: var(--surface-muted);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.store-soon {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.01em;
}

.store-note {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

:root[data-theme="light"] .store-cta {
  border-color: var(--border);
  background: var(--surface);
}

:root[data-theme="light"] .store-soon {
  color: var(--primary-dark);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text-soft);
}

.store-cta-wrap {
  padding-top: 1rem;
}

.badge-cyan {
  border-color: rgba(34, 211, 238, 0.35);
  color: var(--badge-cyan-text);
}

.badge-primary {
  border-color: rgba(29, 111, 255, 0.35);
  color: var(--badge-primary-text);
}

.hero-visual {
  display: grid;
  place-items: center;
  position: relative;
}

.phone-mockup.hero-float {
  animation: hero-float 5s ease-in-out infinite;
}

.phone-mockup {
  position: relative;
  width: min(100%, 16.5rem);
  padding: 0.65rem;
  border-radius: 2.25rem;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow-md), 0 0 48px rgba(34, 211, 238, 0.12);
}

.phone-mockup::before {
  content: "";
  position: absolute;
  top: 0.45rem;
  left: 50%;
  transform: translateX(-50%);
  width: 4.5rem;
  height: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.phone-screen {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.65rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.preview-grid {
  display: grid;
  gap: 1.25rem;
  align-items: center;
}

.preview-card {
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface-muted);
  box-shadow: var(--shadow-card);
}

.preview-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.preview-caption {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
}

.why-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
}

.why-card {
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-muted);
  box-shadow: var(--shadow-card);
}

.why-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-cyan);
}

.why-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.section-title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-intro {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  max-width: 40rem;
  line-height: 1.75;
}

html[dir="rtl"] .section-intro {
  max-width: 44rem;
  line-height: var(--line-height-ar);
}

.trust-grid,
.legal-grid,
.feature-grid,
.steps-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
}

.trust-card,
.legal-card,
.feature-card,
.step-card {
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-muted);
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.trust-card:hover,
.legal-card:hover,
.feature-card:hover,
.step-card:hover {
  border-color: var(--card-hover-border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(34, 211, 238, 0.12);
  color: var(--primary-cyan);
  font-size: 1rem;
}

.card-icon-blue {
  background: rgba(29, 111, 255, 0.14);
  color: #93c5fd;
}

.trust-card h3,
.legal-card h3,
.feature-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 700;
}

.trust-card p,
.legal-card p,
.feature-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.legal-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.legal-card a:hover h3 {
  color: var(--primary-cyan);
}

.legal-card .card-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
}

.contact-card {
  margin-top: 0;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
}

.contact-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.contact-card p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
}

.home-section {
  padding: 2.5rem 0 0;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.home-section-muted {
  padding-top: 3rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.home-section-muted .section-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.step-card {
  position: relative;
}

.step-num {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.75rem;
  border-radius: 999px;
  background: var(--gradient-primary);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
}

.step-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 700;
}

.step-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.faq-list {
  display: grid;
  gap: 0.65rem;
  max-width: 44rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.faq-item summary {
  padding: 1rem 1.15rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: background 0.15s;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  background: var(--nav-hover-bg);
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.faq-item p {
  margin: 0;
  padding: 0 1.15rem 1rem;
  color: var(--text-muted);
  line-height: 1.75;
}

html[dir="rtl"] .faq-item p {
  line-height: var(--line-height-ar);
}

/* Legal pages */

.page-legal main {
  padding-bottom: 4rem;
}

.legal-hero {
  padding-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.legal-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.legal-subtitle {
  margin: 0.5rem 0 0;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--text-soft);
  max-width: 42rem;
}

.legal-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin-top: 0.75rem;
}

.legal-quick-links {
  margin-bottom: 1.5rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-muted);
  box-shadow: var(--shadow-card);
}

.legal-quick-links h2 {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
}

.legal-quick-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-quick-links a {
  display: inline-block;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.legal-quick-links a:hover {
  color: var(--text);
  border-color: rgba(34, 211, 238, 0.4);
}

.legal-quick-links a[aria-current="page"] {
  color: var(--text);
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.3);
}

.action-card {
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
  margin-bottom: 1.5rem;
  padding: 1.35rem 1.3rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.action-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.action-badge {
  display: none;
}

.action-card ol,
.action-card ul {
  margin: 0.5rem 0 0;
  padding-inline-start: 1.25rem;
}

.action-card li {
  margin: 0.4rem 0;
  color: var(--text-soft);
}

.action-card p {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
}

.support-fallback {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.legal-layout {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.legal-toc,
.toc-card {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-muted);
  box-shadow: var(--shadow-card);
}

.legal-toc h2,
.toc-card h2 {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
}

.legal-toc ol,
.toc-card ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.legal-toc li,
.toc-card li {
  margin: 0.2rem 0;
}

.legal-toc a,
.toc-card a {
  display: block;
  padding: 0.35rem 0;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 1.35;
}

.legal-toc a:hover,
.toc-card a:hover {
  color: var(--text);
}

.legal-content {
  min-width: 0;
  font-size: 0.98rem;
  line-height: 1.72;
}

.section-card,
.content-card {
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-muted);
  box-shadow: var(--shadow-card);
}

.section-card:last-child,
.content-card:last-child {
  margin-bottom: 0;
}

.section-card h2,
.content-card h2 {
  margin: 0 0 0.65rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.section-card h3,
.content-card h3 {
  margin: 1rem 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-soft);
}

.section-card p,
.section-card ul,
.section-card ol,
.content-card p,
.content-card ul,
.content-card ol {
  margin: 0.55rem 0 0;
}

.section-card p:last-child,
.section-card ul:last-child,
.section-card ol:last-child,
.content-card p:last-child,
.content-card ul:last-child,
.content-card ol:last-child {
  margin-bottom: 0;
}

.section-card ul,
.section-card ol,
.content-card ul,
.content-card ol {
  padding-inline-start: 1.25rem;
}

.section-card li,
.content-card li {
  margin: 0.35rem 0;
  color: var(--text-soft);
}

.section-card li strong,
.content-card li strong {
  color: var(--text);
}

.callout {
  margin-top: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 92, 108, 0.35);
  background: rgba(255, 92, 108, 0.08);
  font-size: 0.9rem;
  color: var(--text-soft);
}

.callout-warn {
  border-color: rgba(231, 185, 65, 0.4);
  background: rgba(231, 185, 65, 0.08);
}

.callout-info {
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.08);
}

code {
  padding: 0.12rem 0.4rem;
  border-radius: 6px;
  background: var(--code-bg);
  font-size: 0.88em;
  color: var(--text-soft);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-top: 0.75rem;
}

th,
td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.7rem;
  text-align: start;
  vertical-align: top;
}

th {
  background: var(--surface-raised);
  font-weight: 600;
  color: var(--text-soft);
}

td {
  color: var(--text-muted);
}

/* Scroll reveal */

.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.hero.reveal {
  opacity: 1;
  transform: none;
}

.hero.reveal .hero-copy,
.hero.reveal .hero-visual {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero.reveal.is-visible .hero-copy,
.hero.reveal.is-visible .hero-visual {
  opacity: 1;
  transform: none;
}

.hero.reveal.is-visible .hero-visual {
  transition-delay: 0.12s;
}

/* Footer */

.site-footer {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border-subtle);
  background: var(--footer-bg);
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
}

.footer-brand p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 22rem;
}

.footer-links h3 {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
}

.footer-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links li {
  margin: 0.3rem 0;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-subtle);
  font-size: 0.82rem;
}

/* Responsive */

@media (max-width: 899px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .header-end {
    width: 100%;
    align-items: stretch;
  }

  [dir="rtl"] .header-end {
    align-items: stretch;
  }

  .site-nav {
    justify-content: flex-start;
  }
}

@media (min-width: 640px) {
  .container {
    width: min(100% - 2.5rem, var(--container));
  }

  .trust-grid,
  .legal-grid,
  .steps-grid,
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .header-end {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
  }

  .header-tools {
    flex-shrink: 0;
  }

  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
  }

  .hero {
    padding: 3.5rem 0 2.5rem;
  }

  .steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .legal-layout {
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 2rem;
  }

  .trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

@media (min-width: 1100px) {
  .site-nav a {
    font-size: 0.86rem;
    padding: 0.45rem 0.85rem;
  }

  .trust-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .steps-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .why-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  .hero-float,
  .network-bg {
    animation: none;
  }

  .reveal,
  .hero.reveal .hero-copy,
  .hero.reveal .hero-visual {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .trust-card,
  .legal-card,
  .feature-card,
  .step-card {
    transition: none;
  }

  .trust-card:hover,
  .legal-card:hover,
  .feature-card:hover,
  .step-card:hover {
    transform: none;
  }
}
