/* ==========================================================================
   LAQEENI — landing design system
   Premium consumer-product site: dark navy hero, light working sections,
   restrained indigo/violet accent. Every value is a token.
   ========================================================================== */

:root {
  /* ---- brand ---- */
  --brand-600: #4338ca;
  --brand-500: #4f46e5;
  --brand-400: #6366f1;
  --brand-300: #a5b4fc;
  --brand-100: #e0e7ff;
  --violet-500: #7c3aed;
  --violet-300: #c4b5fd;
  --green-500: #22c55e;
  --amber-500: #f59e0b;

  /* ---- dark surfaces ---- */
  --ink-950: #070a15;
  --ink-900: #0b0e1c;
  --ink-800: #141834;
  --ink-700: #1e1b4b;
  --ink-600: #2a2f5c;

  /* ---- light surfaces ---- */
  --paper: #ffffff;
  --paper-2: #fafbfe;
  --paper-3: #f2f4fa;
  --line: #e5e8f2;
  --line-strong: #d3d8e8;

  /* ---- text ---- */
  --text-1: #0d1024;
  --text-2: #4b5268;
  --text-3: #7c8399;
  --on-dark-1: #f4f6ff;
  --on-dark-2: #b6bdd9;
  --on-dark-3: #868db0;

  /* ---- spacing: 8 / 12 / 16 / 24 / 32 / 48 / 64 / 96 ---- */
  --s-1: 8px;
  --s-2: 12px;
  --s-3: 16px;
  --s-4: 24px;
  --s-5: 32px;
  --s-6: 48px;
  --s-7: 64px;
  --s-8: 96px;

  --section-y: clamp(56px, 9vw, 112px);

  /* ---- radius ---- */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* ---- elevation (restrained) ---- */
  --e-1: 0 1px 2px rgba(13, 16, 36, 0.05);
  --e-2: 0 6px 20px rgba(13, 16, 36, 0.07);
  --e-3: 0 20px 48px rgba(13, 16, 36, 0.16);

  /* ---- type ---- */
  --font:
    system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'SF Arabic', 'Geeza Pro',
    'Noto Sans Arabic', 'Noto Naskh Arabic', 'Segoe UI', Tahoma, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  --t-display: clamp(2.7rem, 1.4rem + 4.6vw, 5rem);
  --t-h2: clamp(1.5rem, 1.15rem + 1.5vw, 2.3rem);
  --t-h3: 1.0625rem;
  --t-lead: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  --t-body: 1rem;
  --t-sm: 0.9375rem;
  --t-xs: 0.8125rem;

  --measure: 62ch;
  --shell: 1240px;
  --shell-narrow: 720px;
  --measure-h: 20ch;
}

/* Arabic: more leading, no negative tracking (it breaks cursive joining),
   slightly tighter display size, longer measure. */
[dir='rtl'] body {
  line-height: 1.9;
}
[dir='rtl'] h1,
[dir='rtl'] h2,
[dir='rtl'] h3 {
  letter-spacing: 0;
  line-height: 1.4;
}
[dir='rtl'] .hero-title {
  font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.7rem);
  line-height: 1.3;
}
[dir='rtl'] .section-title {
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
}
[dir='rtl'] .closing-title {
  font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.1rem);
}
[dir='rtl'] .step-index,
[dir='rtl'] .fork-index {
  letter-spacing: 0;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text-1);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--text-1);
  font-weight: 700;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--brand-600);
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--brand-500);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  z-index: 100;
  background: var(--brand-500);
  color: #fff;
  padding: var(--s-2) var(--s-4);
  font-weight: 600;
  border-radius: 0 0 var(--r-sm) 0;
}

.skip-link:focus {
  inset-inline-start: 0;
}

/* ============================== layout ================================= */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--s-4);
}

.container-narrow {
  max-width: var(--shell-narrow);
}

.section {
  padding-block: var(--section-y);
}

.section-title {
  font-size: var(--t-h2);
  max-width: var(--measure-h);
  text-wrap: balance;
}

.section-dark {
  background: var(--ink-900);
  color: var(--on-dark-1);
}

.section-dark .section-title {
  color: var(--on-dark-1);
}

.section-faq {
  background: var(--paper-2);
}

/* Title and note read as one editorial block. An earlier version used
   `justify-content: space-between`, which flung the note against the far
   viewport edge and left the section looking unbalanced. */
.section-head {
  display: grid;
  gap: var(--s-3);
  max-width: 720px;
}

.section-note {
  color: var(--on-dark-2);
  max-width: 52ch;
  font-size: var(--t-sm);
}

.kicker {
  display: block;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-500);
  margin-bottom: var(--s-2);
}

/* ============================== buttons ================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.6rem;
  border-radius: var(--r-pill);
  font-weight: 620;
  font-size: 1rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--brand-500);
  color: #fff;
  box-shadow: 0 8px 22px rgba(79, 70, 229, 0.26);
}

.btn-primary:hover {
  background: var(--brand-600);
}

.btn-quiet {
  background: transparent;
  color: var(--on-dark-1);
  border-color: var(--ink-600);
}

.btn-quiet:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* =============================== header ================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(7, 10, 21, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  color: #fff;
  font-weight: 800;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex: 0 0 auto;
}

.brand-word {
  font-size: 0.98rem;
  letter-spacing: 0.1em;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: var(--s-5);
}

.primary-nav ul {
  display: flex;
  gap: var(--s-4);
}

.primary-nav a {
  color: var(--on-dark-2);
  font-size: 0.9rem;
  transition: color 0.15s ease;
}

.primary-nav a:hover {
  color: #fff;
}

.lang-toggle {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  border-radius: var(--r-pill);
  padding: 0.4rem 0.9rem;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 40px;
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-sm);
  cursor: pointer;
}

.nav-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
}

/* ================================ hero ================================= */
.hero {
  background: var(--ink-900);
  color: var(--on-dark-1);
  padding-block: clamp(56px, 8vw, 104px);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset-inline-start: 50%;
  inset-block-start: -30%;
  width: 720px;
  height: 720px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(79, 70, 229, 0.16) 0%, rgba(79, 70, 229, 0) 68%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero-title {
  font-size: var(--t-display);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.035em;
  max-width: 14ch;
  margin-bottom: var(--s-4);
  text-wrap: balance;
}

.hero-sub {
  font-size: var(--t-lead);
  color: var(--on-dark-2);
  max-width: 48ch;
  margin-bottom: var(--s-5);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.hero-art {
  display: grid;
  place-items: center;
}

.hero-art svg {
  width: min(520px, 100%);
  height: auto;
}

/* Concept-art motion: a slow scan sweep. Purely decorative. */
.scan,
.scan-glow {
  animation: sweep 6s ease-in-out infinite alternate;
}

@keyframes sweep {
  from {
    transform: translateY(-40px);
  }
  to {
    transform: translateY(200px);
  }
}

.uncertain {
  animation: blink 2.8s ease-in-out infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

/* ============================ how it works ============================= */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--s-5);
  margin-top: var(--s-6);
}

.step {
  position: relative;
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
}

.step-index {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--brand-400);
  margin-bottom: var(--s-3);
}

.step-icon {
  width: 34px;
  height: 34px;
  color: var(--brand-500);
  margin-bottom: var(--s-3);
}

.step h3 {
  font-size: var(--t-h3);
  margin-bottom: var(--s-1);
}

.step p {
  color: var(--text-2);
  font-size: var(--t-sm);
  max-width: 34ch;
}

/* ============================== difference ============================= */
.fork {
  margin-top: var(--s-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.fork-node {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.25rem;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--ink-600);
  color: var(--on-dark-1);
  font-size: var(--t-sm);
  font-weight: 600;
  white-space: nowrap;
}

.fork-start {
  background: rgba(99, 102, 241, 0.16);
  border-color: var(--brand-500);
}

.fork-connector {
  width: 1px;
  height: var(--s-5);
  background: linear-gradient(to bottom, var(--brand-500), var(--ink-600));
}

.fork-branches {
  display: grid;
  gap: var(--s-4);
  justify-items: center;
  width: 100%;
}

.fork-branch {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--ink-700);
  width: min(560px, 100%);
}

.fork-branch-people {
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.4);
}

.fork-tag {
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: var(--r-pill);
}

.fork-tag-yes {
  background: rgba(34, 197, 94, 0.14);
  color: #6ee7a0;
}

.fork-tag-unsure {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
}

.fork-arrow {
  color: var(--on-dark-3);
  font-size: var(--t-sm);
}

/* In RTL the flow reads right-to-left, so the connector must point left. */
[dir='rtl'] .fork-arrow {
  display: inline-block;
  transform: scaleX(-1);
}

/* ================================ trust ================================= */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s-5);
  margin-top: var(--s-6);
}

.trust-item {
  padding-top: var(--s-3);
  border-top: 2px solid var(--brand-500);
}

.trust-item h3 {
  font-size: var(--t-h3);
  margin-bottom: var(--s-1);
}

.trust-item p {
  color: var(--text-2);
  font-size: var(--t-sm);
  max-width: 36ch;
}

/* ================================= faq ================================== */
.faq {
  margin-top: var(--s-5);
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding-block: var(--s-3);
  font-weight: 620;
  font-size: 1.02rem;
  color: var(--text-1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}

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

.faq-item summary::after {
  content: '+';
  flex: 0 0 auto;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--brand-500);
}

.faq-item[open] summary::after {
  content: '\2212';
}

.faq-item p {
  padding-bottom: var(--s-3);
  color: var(--text-2);
  max-width: var(--measure);
}

/* =============================== closing =============================== */
.closing {
  background: var(--paper);
  padding-block: var(--section-y);
  text-align: center;
}

.closing-title {
  font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.1rem);
  font-weight: 750;
  letter-spacing: -0.025em;
  max-width: 24ch;
  margin: 0 auto var(--s-4);
  text-wrap: balance;
}

/* =============================== footer ================================= */
.site-footer {
  background: var(--ink-900);
  color: var(--on-dark-2);
  padding-block: var(--s-6);
  font-size: var(--t-sm);
}

.footer-inner {
  display: grid;
  gap: var(--s-4);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
}

.footer-brand .brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.footer-claim {
  color: var(--on-dark-3);
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
}

.footer-nav a {
  color: var(--on-dark-2);
}

.footer-nav a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  flex-wrap: wrap;
  padding-top: var(--s-3);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-copy {
  color: var(--on-dark-3);
}

/* ================================ 404 =================================== */
.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--s-4);
  background: var(--ink-900);
  color: var(--on-dark-1);
}

.error-page h1 {
  color: #fff;
  font-size: clamp(3rem, 12vw, 5.5rem);
}

.error-page h2 {
  color: #fff;
  font-size: 1.3rem;
  margin-block: var(--s-2);
}

.error-page p {
  color: var(--on-dark-2);
  max-width: 42ch;
  margin: 0 auto var(--s-4);
}

/* ============================= breakpoints ============================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--s-5);
  }
  .hero-art {
    order: -1;
  }
  .hero-art svg {
    width: min(320px, 78vw);
  }
  .hero-title {
    max-width: 18ch;
  }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-3);
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }
  .primary-nav {
    position: absolute;
    inset-inline: 0;
    top: 64px;
    flex-direction: column;
    align-items: stretch;
    gap: var(--s-3);
    padding: var(--s-3) var(--s-4) var(--s-4);
    background: var(--ink-950);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: none;
  }
  .primary-nav.is-open {
    display: flex;
  }
  .primary-nav ul {
    flex-direction: column;
    gap: 0;
  }
  .primary-nav a {
    display: block;
    padding-block: var(--s-2);
    font-size: 0.98rem;
  }
  .lang-toggle {
    align-self: flex-start;
  }
}

@media (max-width: 560px) {
  .container {
    padding-inline: var(--s-3);
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    width: 100%;
  }
  .fork-branch {
    flex-direction: column;
    gap: var(--s-1);
  }
  .fork-arrow {
    transform: rotate(90deg);
  }
  [dir='rtl'] .fork-arrow {
    transform: rotate(-90deg);
  }
  .footer-brand,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
