/* ============================================================
   Swift PDF — shared design system
   One theme (dark), one accent (lime), one radius scale:
     cards/panels = 18px, buttons/inputs = 10px, pills = 999px
   ============================================================ */

:root {
  --bg: #0e0e11;
  --bg-alt: #121216;
  --surface: #17171c;
  --surface2: #1f1f27;
  --surface3: #262631;
  --border: #2a2a36;
  --border2: #3a3a48;
  --text: #f0f0f4;
  --text-dim: #c7c7d1;
  --muted: #7a7a8c;
  --accent: #a8e818;
  --accent-bright: #b8f828;
  --accent2: #6fb500;
  --accent-glow: rgba(168, 232, 24, 0.35);
  --danger: #ff6b6b;
  --warn: #f4a62a;

  --r-card: 18px;
  --r-btn: 10px;
  --r-pill: 999px;

  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --nav-h: 72px;
  --container: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, canvas, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: #0e0e11; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 9px; }

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

.container { max-width: var(--container); margin-inline: auto; padding-inline: 24px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; color: var(--text); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: var(--r-btn);
  font-family: var(--font-body); font-size: 0.92rem; font-weight: 500;
  cursor: pointer; border: none; white-space: nowrap;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn svg, .btn i { flex-shrink: 0; }

.btn-primary { background: var(--accent); color: #0e0e11; font-weight: 600; }
.btn-primary:hover { background: var(--accent-bright); transform: translateY(-2px); box-shadow: 0 10px 30px var(--accent-glow); }

.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border2); }
.btn-secondary:hover { background: var(--surface3); border-color: var(--muted); transform: translateY(-2px); }

.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--border2); }

.btn-danger { background: transparent; color: var(--danger); border: 1px solid rgba(255,107,107,0.3); }
.btn-danger:hover { background: rgba(255,107,107,0.1); }

.btn-download { background: var(--accent2); color: #0e0e11; font-weight: 600; }
.btn-download:hover { background: #7fc810; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(111,181,0,0.4); }

/* ── BADGES / PILLS ── */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 15px; border-radius: var(--r-pill);
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 0.8rem; font-weight: 500;
}
.pill i { color: var(--accent); font-size: 1rem; }

.kicker {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 14px;
}

/* ── NAV ── */
.nav {
  position: sticky; top: 0; z-index: 200;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 20px;
  padding: 0 28px;
  background: rgba(14,14,17,0.82);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em;
}
.nav-logo img { height: 32px; width: auto; }
.nav-logo span { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-links a {
  padding: 9px 14px; border-radius: var(--r-btn);
  font-size: 0.9rem; font-weight: 500; color: var(--text-dim);
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: var(--surface2); }
.nav-links a.current { color: var(--text); background: var(--surface2); }

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none; margin-left: auto;
  width: 40px; height: 40px; border-radius: var(--r-btn);
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.2rem;
}

@media (max-width: 768px) {
  .nav-links { position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 199;
    background: var(--bg); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: all; }
  .nav-links a { padding: 13px 16px; }
  .nav-toggle { display: flex; }
}

/* ── HERO (split) ── */
.hero {
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 48px;
  max-width: var(--container); margin-inline: auto;
  padding: 72px 24px 96px;
  min-height: min(88vh, 720px);
}

.hero-copy h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.08; letter-spacing: -0.03em;
}
.hero-copy h1 em { font-style: normal; color: var(--accent); }

.hero-copy p {
  margin-top: 18px; max-width: 46ch;
  color: var(--text-dim); font-size: 1.05rem; font-weight: 300; line-height: 1.65;
}

.hero-cta { display: flex; align-items: center; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

.hero-visual { position: relative; aspect-ratio: 1 / 1; max-height: 520px; }
#heroCanvas { width: 100%; height: 100%; display: block; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; text-align: left; }
  .hero-visual { order: -1; max-height: 320px; aspect-ratio: 16/11; }
}

/* Trust strip (below hero, not inside it) */
.trust-strip {
  display: flex; justify-content: center; gap: 12px; flex-wrap: wrap;
  padding: 0 24px 88px;
}

/* ── SECTION SHELL ── */
.section { max-width: var(--container); margin-inline: auto; padding: 88px 24px; }
.section-tight { padding-top: 0; }

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.section-head p { margin-top: 14px; color: var(--text-dim); font-size: 1rem; line-height: 1.65; max-width: 60ch; }

/* ── BENTO FEATURES ── */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 18px;
}
.bento-item {
  border-radius: var(--r-card);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 32px;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.bento-item:hover { border-color: var(--border2); transform: translateY(-3px); }

.bento-lg {
  grid-column: span 2; grid-row: span 2;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 320px;
  background:
    radial-gradient(circle at 18% 12%, var(--accent-glow), transparent 45%),
    var(--surface);
}
.bento-sm { min-height: 148px; }

.bento-item .b-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: rgba(168,232,24,0.12); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 18px; font-size: 1.3rem;
}
.bento-lg .b-icon { width: 54px; height: 54px; font-size: 1.5rem; }

.bento-item h3 { font-size: 1.15rem; margin-bottom: 8px; }
.bento-lg h3 { font-size: 1.5rem; }
.bento-item p { color: var(--text-dim); font-size: 0.92rem; line-height: 1.65; max-width: 42ch; }

@media (max-width: 860px) {
  .bento { grid-template-columns: 1fr; }
  .bento-lg { grid-column: span 1; grid-row: span 1; min-height: 220px; }
}

/* ── CROSS-PROMO SPLIT ── */
.promo {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 56px;
  border-radius: var(--r-card);
  border: 1px solid var(--border);
  background: linear-gradient(150deg, var(--surface2), var(--surface));
  padding: 56px;
}
.promo-icon {
  aspect-ratio: 1; display: grid; place-items: center;
  font-size: 8rem; color: var(--accent); opacity: 0.9;
}
.promo-copy h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 14px; }
.promo-copy p { color: var(--text-dim); font-size: 1rem; line-height: 1.65; margin-bottom: 26px; max-width: 46ch; }

@media (max-width: 780px) {
  .promo { grid-template-columns: 1fr; padding: 36px 28px; gap: 28px; }
  .promo-icon { order: -1; font-size: 5rem; }
}

/* ── FAQ ── */
.faq-list { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.faq-item {
  border-radius: var(--r-card); border: 1px solid var(--border); background: var(--surface);
  padding: 22px 26px;
}
.faq-item h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; font-family: var(--font-body); }
.faq-item p { color: var(--text-dim); font-size: 0.92rem; line-height: 1.65; }

/* ── ARABIC BLOCK ── */
.lang-ar {
  max-width: 760px; border-radius: var(--r-card); border: 1px solid var(--border);
  background: var(--surface); padding: 30px 32px;
  direction: rtl; text-align: right;
}
.lang-ar h2 { font-size: 1.2rem; margin-bottom: 10px; font-family: var(--font-body); }
.lang-ar p { color: var(--text-dim); font-size: 0.95rem; line-height: 1.9; }
.lang-ar a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.lang-ar a:hover { color: var(--accent-bright); }

/* ── FOOTER ── */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-alt); }
.footer-inner {
  max-width: var(--container); margin-inline: auto; padding: 48px 24px 28px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
}
.footer-brand { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; }
.footer-brand span { color: var(--accent); }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--text-dim); font-size: 0.88rem; transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }
.footer-meta { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-meta a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-dim); font-size: 0.85rem; transition: color 0.15s;
}
.footer-meta a:hover { color: var(--accent); }
.footer-bottom {
  max-width: var(--container); margin-inline: auto; padding: 0 24px 32px;
  color: var(--muted); font-size: 0.8rem;
}
.footer-bottom a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.footer-bottom a:hover { color: var(--text-dim); }

/* ── SIMPLE CONTENT PAGE (privacy) ── */
.prose { max-width: 720px; margin-inline: auto; padding: 56px 24px 100px; }
.prose h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 8px; }
.prose .updated { color: var(--muted); font-size: 0.85rem; margin-bottom: 40px; }
.prose h2 { font-size: 1.25rem; margin-top: 40px; margin-bottom: 12px; }
.prose p, .prose li { color: var(--text-dim); font-size: 0.98rem; line-height: 1.75; }
.prose ul { padding-left: 22px; margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ── SCROLL-REVEAL (paired with motion.js) ── */
[data-reveal] { opacity: 0; transform: translateY(28px); }
[data-reveal].is-visible { opacity: 1; transform: none; transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
