/* ─────────────────────────────────────────────────────────────────────────
   Raqimo — marketing & trust pages design tokens.
   The ONLY place colors/scale live for the new pages. Author pages with these
   custom properties (var(--…)) — never hard-code hex. Dark is the default;
   light applies via prefers-color-scheme and an explicit [data-theme].
   See docs/landing/TOKENS.md.
   ───────────────────────────────────────────────────────────────────────── */

:root {
  /* Brand spectrum */
  --brand: #1c6fd0;
  --brand-blue: #2680eb;
  --brand-teal: #1fa6c9;
  --brand-emerald: #10b981;
  --brand-hover: #175aad;
  --brand-gradient: linear-gradient(135deg, #2680eb 0%, #1fa6c9 50%, #10b981 100%);

  /* Surfaces & text — dark (default) */
  --bg: #050505;
  --surface: #0f0f0f;
  --surface-sunken: #0a0a0a;
  --text: #f0f0f0;
  --text-muted: rgba(255, 255, 255, 0.6);
  --text-faint: rgba(255, 255, 255, 0.55);
  --border: rgba(255, 255, 255, 0.1);
  --hairline: rgba(255, 255, 255, 0.05);
  --overlay: rgba(255, 255, 255, 0.05);

  /* Link color chosen for AA on dark ground */
  --link: #1fa6c9;
  --focus-ring: #2680eb;

  /* Feedback */
  --positive: #10b981;
  --warning: #f59e0b;
  --danger: #f43f5e;

  /* Type */
  --font-latin: "Plus Jakarta Sans", "Cairo", system-ui, -apple-system, sans-serif;
  --font-arabic: "Cairo", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Menlo", monospace;

  --fs-display: clamp(2.25rem, 6vw, 3.75rem);
  --fs-h2: clamp(1.5rem, 3.5vw, 2.25rem);
  --fs-h3: 1.25rem;
  --fs-lead: clamp(1.0625rem, 1.6vw, 1.125rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-eyebrow: 0.75rem;

  --lh-display: 1.15;
  --lh-heading: 1.3;
  --lh-body: 1.6;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;
  --gutter: 16px;
  --content-max: 1152px;

  /* Radius */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 9999px;

  /* Elevation */
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-pop: 0 10px 30px rgba(38, 128, 235, 0.25);

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur-enter: 500ms;

  color-scheme: dark;
}

/* Light theme — via system preference (unless user forced dark) … */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f6f8;
    --surface: #ffffff;
    --surface-sunken: #eef1f4;
    --text: #0b1220;
    --text-muted: rgba(11, 18, 32, 0.6);
    --text-faint: rgba(11, 18, 32, 0.6);
    --border: rgba(11, 18, 32, 0.12);
    --hairline: rgba(11, 18, 32, 0.08);
    --overlay: rgba(11, 18, 32, 0.04);
    --link: #1c6fd0; /* darker for AA on light */
    color-scheme: light;
  }
}

/* … and via explicit toggle (persisted, mirrors the app's raqimo_theme). */
:root[data-theme="light"] {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-sunken: #eef1f4;
  --text: #0b1220;
  --text-muted: rgba(11, 18, 32, 0.6);
  --text-faint: rgba(11, 18, 32, 0.6);
  --border: rgba(11, 18, 32, 0.12);
  --hairline: rgba(11, 18, 32, 0.08);
  --overlay: rgba(11, 18, 32, 0.04);
  --link: #1c6fd0;
  color-scheme: light;
}

/* Base element defaults for the marketing/trust pages. */
.site {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-latin);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}
.site[dir="rtl"],
.site:lang(ar) {
  font-family: var(--font-arabic);
}
.site a {
  color: var(--link);
}
.site :focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* Raqimo marketing/trust page components. Uses tokens from tokens.css.
   Concatenated with tokens.css into /site.css at build. Logical properties for
   RTL. Mobile-first; 16px gutter; no horizontal scroll. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.site { margin: 0; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: var(--lh-heading); margin: 0 0 var(--space-3); }
p { margin: 0 0 var(--space-3); }
a { text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: 100%; max-width: var(--content-max); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 640px) { .wrap { padding-inline: var(--space-6); } }
.section { padding-block: clamp(48px, 8vw, 96px); }
.band { background: var(--surface-sunken); border-block: 1px solid var(--hairline); }
.icon { width: 24px; height: 24px; }
.logo { border-radius: 10px; }

.skip { position: absolute; inset-inline-start: -9999px; top: 0; background: var(--brand); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { inset-inline-start: 8px; top: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: var(--fs-small); border-radius: var(--radius-pill);
  padding: 10px 18px; border: 1px solid transparent; cursor: pointer; transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-pop); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-ghost { background: var(--overlay); color: var(--text); border-color: var(--border); }
.btn-lg { padding: 14px 26px; font-size: var(--fs-body); }
.btn.block { width: 100%; }
.btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
/* Buttons are often <a>; beat the generic `.site a` link color so CTA text
   stays high-contrast (white on the primary fill, body color on ghost). */
.site a.btn-primary, .site a.btn-primary:hover { color: #fff; }
.site a.btn-ghost, .site a.btn-ghost:hover { color: var(--text); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--hairline); }
.header-inner { display: flex; align-items: center; gap: var(--space-4); height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-size: 1.05rem; }
.brand-ar { color: var(--brand-teal); font-size: .8rem; font-weight: 600; }
.site-nav { display: none; gap: var(--space-6); margin-inline-start: var(--space-6); }
.site-nav a { color: var(--text-muted); font-weight: 600; font-size: var(--fs-small); }
.site-nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.lang { color: var(--text-muted); font-weight: 700; font-size: var(--fs-small); padding: 8px 10px; border-radius: var(--radius-sm); }
.lang:hover { color: var(--text); background: var(--overlay); text-decoration: none; }
.theme-toggle { background: var(--overlay); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-pill); width: 36px; height: 36px; cursor: pointer; font-size: 15px; }
.header-actions .btn-ghost { display: none; }
@media (min-width: 860px) { .site-nav { display: flex; } .header-actions .btn-ghost { display: inline-flex; } }

/* Hero */
.hero { position: relative; overflow: hidden; padding-block: clamp(40px, 7vw, 88px); text-align: center; }
.hero::before { content: ""; position: absolute; inset-block-start: -80px; inset-inline-start: 50%; transform: translateX(-50%); width: min(680px, 90vw); height: 320px; background: var(--brand); opacity: .12; filter: blur(120px); border-radius: 50%; pointer-events: none; }
.hero-inner { position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: var(--fs-eyebrow); font-weight: 700; color: var(--link); background: color-mix(in srgb, var(--brand) 12%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); padding: 6px 14px; border-radius: var(--radius-pill); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-teal); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.hero-title { font-size: var(--fs-display); font-weight: 800; line-height: var(--lh-display); letter-spacing: -.02em; margin-block: var(--space-4) var(--space-3); }
.grad { background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* On light backgrounds the emerald end of the brand gradient fails contrast, so
   use a darker blue gradient for the headline highlight in light mode. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .grad { background-image: linear-gradient(135deg, #2680eb 0%, #1466c0 100%); }
}
:root[data-theme="light"] .grad { background-image: linear-gradient(135deg, #2680eb 0%, #1466c0 100%); }
.lead { font-size: var(--fs-lead); color: var(--text-muted); max-width: 640px; margin-inline: auto; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-block: var(--space-6); }
.hero-cta.center { justify-content: center; }
.hero-media { margin-block: var(--space-8); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); box-shadow: 0 30px 80px rgba(0,0,0,.5); animation: settle var(--dur-enter) var(--ease) both; }
@keyframes settle { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.pillars { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; color: var(--text-muted); font-weight: 600; font-size: var(--fs-small); }
.pillars .dot { color: var(--text-faint); }

/* Section headings */
.sec-title { font-size: var(--fs-h2); font-weight: 800; text-align: center; letter-spacing: -.01em; }
.sec-sub { text-align: center; color: var(--text-muted); max-width: 620px; margin-inline: auto; margin-bottom: var(--space-8); }

/* Cards */
.cards { display: grid; grid-template-columns: 1fr; gap: var(--space-4); }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .cards { grid-template-columns: 1fr 1fr 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-6); }
.cap-ic { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand-teal); margin-bottom: var(--space-3); }
.cap h3 { font-size: var(--fs-h3); }
.cap p { color: var(--text-muted); margin: 0; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-4); grid-template-columns: 1fr; max-width: 720px; margin-inline: auto; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; font-weight: 600; }
.step-n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; }

/* AI chips */
.ai-block { text-align: center; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: var(--space-4); }
.chip { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 10px 16px; font-weight: 600; color: var(--text); }
.fine { color: var(--text-faint); font-size: var(--fs-small); max-width: 640px; margin-inline: auto; }

/* Pricing */
.plans { display: grid; grid-template-columns: 1fr; gap: var(--space-4); align-items: stretch; }
@media (min-width: 860px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan { display: flex; flex-direction: column; position: relative; }
.plan-pop { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-pop); }
.badge { position: absolute; inset-block-start: -12px; inset-inline-start: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: var(--fs-eyebrow); font-weight: 800; padding: 4px 12px; border-radius: var(--radius-pill); white-space: nowrap; }
.price { margin-block: 8px; } .price b { font-size: 2rem; } .price span { color: var(--text-faint); font-size: var(--fs-small); }
.plan-blurb { color: var(--text-muted); }
.ticks { list-style: none; padding: 0; margin: var(--space-4) 0; display: grid; gap: 10px; flex: 1; }
.ticks li { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: var(--fs-small); }
.tick { width: 18px; height: 18px; color: var(--brand-emerald); flex: none; }
.pricing-note { text-align: center; color: var(--text-faint); font-size: var(--fs-small); margin-top: var(--space-6); }

/* FAQ / details */
.qa { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 18px; margin-bottom: 10px; background: var(--surface); }
.qa summary { cursor: pointer; font-weight: 700; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; float: inline-end; color: var(--text-faint); font-weight: 400; }
.qa[open] summary::after { content: "\2212"; }
.qa p { color: var(--text-muted); margin: 12px 0 0; }
.faq { max-width: 760px; margin-inline: auto; }

/* Prose (legal / about / help) */
.prose { max-width: 760px; margin-inline: auto; }
.prose h1 { font-size: var(--fs-h2); }
.prose h2 { font-size: var(--fs-h3); margin-top: var(--space-8); }
.prose p, .prose li { color: var(--text-muted); }
.prose ul { padding-inline-start: 22px; display: grid; gap: 6px; margin: 0 0 var(--space-3); }
.updated { color: var(--text-faint); font-size: var(--fs-small); }
.madeby { margin-top: var(--space-6); color: var(--text); font-weight: 600; }

/* Contact */
.contact-methods { display: grid; gap: 8px; margin-bottom: var(--space-6); }
.contact-methods a { color: var(--text); }
.contact-form { display: grid; gap: var(--space-4); }
.contact-form label { display: grid; gap: 6px; font-weight: 600; font-size: var(--fs-small); }
.contact-form input, .contact-form select, .contact-form textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.consent { flex-direction: row; align-items: start; display: flex; gap: 10px; font-weight: 500; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg { min-height: 1.2em; font-size: var(--fs-small); }
.form-msg.ok { color: var(--brand-emerald); } .form-msg.err { color: var(--danger); }

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); background: var(--surface-sunken); padding-block: var(--space-12) var(--space-6); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-8); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr 1.4fr; } }
.fbrand .ftag { font-weight: 700; color: var(--text); margin-top: 10px; }
.fnote { color: var(--text-faint); font-size: var(--fs-small); max-width: 42ch; }
.fcol h3 { font-size: var(--fs-small); text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }
.fcol ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.fcol a { color: var(--text-muted); font-size: var(--fs-small); }
.fcol a:hover { color: var(--text); }
.fcontact li { color: var(--text-muted); font-size: var(--fs-small); }
.faddr { color: var(--text-faint); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: var(--space-8); padding-top: var(--space-6); border-top: 1px solid var(--hairline); color: var(--text-muted); font-size: var(--fs-small); flex-wrap: wrap; }
.footer-bottom .lang { color: var(--text); }

/* 404 */
.notfound { text-align: center; } .notfound h1 { font-size: clamp(3rem, 12vw, 6rem); margin: var(--space-4) 0 0; }
.notfound .logo { margin-inline: auto; width: 48px; height: 48px; }

/* ── Motion & interactivity ─────────────────────────────────────────────── */
.card { transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease); }
.cap-ic { transition: transform var(--dur-fast) var(--ease); }
.cap:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35); }
.cap:hover .cap-ic { transform: scale(1.08) rotate(-3deg); }
.steps li { transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.steps li:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.step-n { transition: transform var(--dur-fast) var(--ease); }
.steps li:hover .step-n { transform: scale(1.12); }
.chip { transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.chip:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.plan { cursor: pointer; transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease); }
.plan:hover { transform: translateY(-5px); }
.plan:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.plan.selected { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand), 0 18px 42px color-mix(in srgb, var(--brand) 28%, transparent); transform: translateY(-5px); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.qa { transition: border-color var(--dur-fast) var(--ease); }
.qa:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }

/* Scroll reveal — visible without JS; only hidden once .js-reveal is set. */
.js-reveal .reveal { opacity: 0; transform: translateY(18px); }
.js-reveal .reveal.in { opacity: 1; transform: none; transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js-reveal .cards .reveal:nth-child(2) { transition-delay: 0.06s; }
.js-reveal .cards .reveal:nth-child(3) { transition-delay: 0.12s; }
.js-reveal .cards .reveal:nth-child(4) { transition-delay: 0.18s; }
.js-reveal .cards .reveal:nth-child(5) { transition-delay: 0.24s; }
.js-reveal .cards .reveal:nth-child(6) { transition-delay: 0.3s; }
.js-reveal .steps .reveal:nth-child(2) { transition-delay: 0.06s; }
.js-reveal .steps .reveal:nth-child(3) { transition-delay: 0.12s; }
.js-reveal .steps .reveal:nth-child(4) { transition-delay: 0.18s; }
.js-reveal .plans .reveal:nth-child(2) { transition-delay: 0.08s; }
.js-reveal .plans .reveal:nth-child(3) { transition-delay: 0.16s; }
@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal { opacity: 1 !important; transform: none !important; }
}
