/* ============================================================
   tokens.css — design tokens, reset, typography, utilities
   ============================================================ */

:root {
  /* surfaces */
  --ink:        #070B18;
  --ink-2:      #0A0F1F;
  --ink-3:      #0D1426;
  --surface:    rgba(255, 255, 255, .035);
  --surface-2:  rgba(255, 255, 255, .055);
  --line:       rgba(255, 255, 255, .085);
  --line-2:     rgba(255, 255, 255, .16);

  /* text */
  --text:       #EBEFFA;
  --text-2:     #B6C0D8;
  --muted:      #8D97B2;

  /* accents */
  --cyan:       #4CC9F0;
  --violet:     #7B61FF;
  --gold:       #E8C86A;
  --grad:       linear-gradient(135deg, var(--cyan) 0%, var(--violet) 100%);
  --grad-soft:  linear-gradient(135deg, rgba(76, 201, 240, .16), rgba(123, 97, 255, .16));

  /* type */
  --font-display: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  --font-body:    "IBM Plex Sans Arabic", "Tajawal", "Segoe UI", Tahoma, sans-serif;

  --fs-eyebrow: clamp(.72rem, .68rem + .2vw, .82rem);
  --fs-body:    clamp(.98rem, .94rem + .25vw, 1.08rem);
  --fs-lede:    clamp(1.02rem, .96rem + .55vw, 1.28rem);
  --fs-h3:      clamp(1.12rem, 1.02rem + .5vw, 1.38rem);
  --fs-h2:      clamp(1.7rem, 1.35rem + 2vw, 3rem);
  --fs-h1:      clamp(2.1rem, 1.5rem + 4.2vw, 4.6rem);

  /* space */
  --shell:      1180px;
  --gutter:     clamp(1rem, .6rem + 2.4vw, 2.5rem);
  --section-y:  clamp(4rem, 3rem + 6vw, 8.5rem);

  /* radii + shadow */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --shadow:    0 24px 60px -28px rgba(0, 0, 0, .85);
  --shadow-lg: 0 40px 90px -34px rgba(0, 0, 0, .9);

  /* motion */
  --ease:  cubic-bezier(.22, .68, .28, 1);
  --fast:  .22s var(--ease);
  --mid:   .4s var(--ease);
  --slow:  .8s var(--ease);
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.85;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ambient page backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 620px at 88% -8%, rgba(123, 97, 255, .16), transparent 62%),
    radial-gradient(900px 560px at 6% 12%, rgba(76, 201, 240, .11), transparent 60%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 55%, var(--ink) 100%);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.28;
  margin: 0;
  font-weight: 800;
  letter-spacing: -.01em;
}

p  { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--fast);
}

img, svg, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

::selection { background: rgba(123, 97, 255, .42); color: #fff; }

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

/* ---------- layout utilities ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.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;
}

/* Latin fragments inside Arabic text keep LTR run */
.num, .price__num, .metric__num { direction: ltr; unicode-bidi: isolate; }

/* ---------- scroll reveal ----------
   Hidden start state applies only when JS can reveal it again. */
.has-js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity .75s var(--ease),
    transform .75s var(--ease);
  transition-delay: calc(var(--rd, 0) * 90ms);
  will-change: opacity, transform;
}
.has-js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .has-js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
