/* ============================================================
   m.dev — freelance dev landing (Arabic / RTL)
   ============================================================ */

:root {
  --bg:           #0c100e;
  --bg-2:         #0f1411;
  --surface:      #141a16;
  --surface-2:    #1a211d;
  --line:         #22292522;
  --line-2:       #2a322d;

  --text:         #e8ede9;
  --text-dim:     #a6b0a9;
  --muted:        #6f7a73;

  --accent:        #3b82f6;
  --accent-2:      #2563eb;
  --accent-rgb:    59, 130, 246;
  --accent-ink:    #ffffff;
  --accent-soft:   rgba(var(--accent-rgb), .1);

  --red:          #ff6a6a;

  /* Positive / "good" accent — used for solution/check states (e.g. "لو اشتغلنا سوا") */
  --green:        #34d399;
  --green-rgb:    52, 211, 153;
  --green-soft:   rgba(var(--green-rgb), .12);

  /* Highlighter yellow — used for scribble underline on hero "بتبيع" */
  --scribble:     #fbbf24;

  --radius:       14px;
  --radius-lg:    22px;

  --ease:         cubic-bezier(.2,.7,.2,1);
  --container:    1480px;

  --font:         'Cairo', 'Tajawal', system-ui, -apple-system, Segoe UI, sans-serif;

  --nav-blur:     rgba(12, 16, 14, .78);
  --frame-bg-1:   #141a16;
  --frame-bg-2:   #0e1310;
  --frame-stripe: #1a211d;
}

/* ========== LIGHT THEME ========== */
[data-theme="light"] {
  --bg:           #f6f7f4;
  --bg-2:         #ffffff;
  --surface:      #ffffff;
  --surface-2:    #eef1ec;
  --line:         #e5e7e4;
  --line-2:       #d7dad6;

  --text:         #0c100e;
  --text-dim:     #3a403c;
  --muted:        #7a857d;

  --accent:        #2563eb;
  --accent-2:      #1d4ed8;
  --accent-rgb:    37, 99, 235;
  --accent-ink:    #ffffff;
  --accent-soft:   rgba(var(--accent-rgb), .094);

  --red:          #d84848;

  /* Slightly darker green for readability on light backgrounds */
  --green:        #10b981;
  --green-rgb:    16, 185, 129;
  --green-soft:   rgba(var(--green-rgb), .10);

  /* Amber/gold — darker yellow keeps scribble legible on light bg */
  --scribble:     #eab308;

  --nav-blur:     rgba(255, 255, 255, .82);
  --frame-bg-1:   #f0f2ee;
  --frame-bg-2:   #e6e9e3;
  --frame-stripe: #dde1db;
}

/* ============================================================
   COLOR THEMES · pick from header palette
   Default = Cyber Blue (defined in :root above)
   Each color overrides --accent, --accent-2, --accent-rgb.
   --accent-soft auto-derives from --accent-rgb via cascade.
   ============================================================ */

/* --- DARK theme color variants --- */
[data-color="violet"] {
  --accent:        #a855f7;
  --accent-2:      #9333ea;
  --accent-rgb:    168, 85, 247;
}
[data-color="orange"] {
  --accent:        #f97316;
  --accent-2:      #ea580c;
  --accent-rgb:    249, 115, 22;
}
[data-color="green"] {
  --accent:        #22c55e;
  --accent-2:      #16a34a;
  --accent-rgb:    34, 197, 94;
}
[data-color="pink"] {
  --accent:        #ec4899;
  --accent-2:      #db2777;
  --accent-rgb:    236, 72, 153;
}

/* --- LIGHT theme color variants (darker shades for contrast on white) --- */
[data-theme="light"][data-color="violet"] {
  --accent:        #7c3aed;
  --accent-2:      #6d28d9;
  --accent-rgb:    124, 58, 237;
}
[data-theme="light"][data-color="orange"] {
  --accent:        #ea580c;
  --accent-2:      #c2410c;
  --accent-rgb:    234, 88, 12;
}
[data-theme="light"][data-color="green"] {
  --accent:        #16a34a;
  --accent-2:      #15803d;
  --accent-rgb:    22, 163, 74;
}
[data-theme="light"][data-color="pink"] {
  --accent:        #db2777;
  --accent-2:      #be185d;
  --accent-rgb:    219, 39, 119;
}

/* ---------- Reset ---------- */
*,*::before,*::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip; /* strict: prevents horizontal scroll from any overflow */
}
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  max-width: 100vw; /* never exceed viewport width */
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* modern alternative to hidden, no scroll container side-effect */
  direction: rtl;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}

/* Subtle grain overlay — adds a human-crafted feel */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .7 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  transition: opacity .4s var(--ease);
}
[data-theme="light"] body::before {
  opacity: .18;
  mix-blend-mode: multiply;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
ul, ol { list-style: none; padding: 0; margin: 0; }
h1,h2,h3,h4 { margin: 0; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0; }

::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- Utility ---------- */
.accent { color: var(--accent); }
.section-tag {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .4rem .85rem;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), .2);
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 600;
}
.section-tag::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .13);
}

/* Hand-drawn underline */
.underline-scribble { position: relative; white-space: nowrap; }
.underline-scribble::after {
  content: "";
  position: absolute;
  left: -4%; right: -4%;
  bottom: -.2em;
  height: .45em;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 20' preserveAspectRatio='none'><path d='M4 14 C 60 4, 140 18, 210 8 S 300 14, 236 6' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'/></svg>") center/100% 100% no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 20' preserveAspectRatio='none'><path d='M4 14 C 60 4, 140 18, 210 8 S 300 14, 236 6' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'/></svg>") center/100% 100% no-repeat;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: fixed; top: 0; inset-inline: 0;
  z-index: 50;
  transition: background .4s var(--ease), backdrop-filter .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
}
.nav--scrolled {
  background: var(--nav-blur);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line-2);
}

/* Nav end group: theme toggle + burger always together */
.nav__end {
  display: flex;
  align-items: center;
  gap: .6rem;
}
.nav__logo {
  font-weight: 900;
  display: inline-flex; align-items: center; gap: .6rem;
  letter-spacing: -.02em;
}
.logo__mark {
  width: 30px; height: 30px;
  color: var(--text);
  flex: 0 0 auto;
  transition: transform .45s var(--ease), color .25s var(--ease);
}
.logo__mark circle:last-of-type {
  transition: transform .45s var(--ease), fill .3s var(--ease);
  transform-origin: 29px 18px;
  fill: var(--accent);
}
/* Divider node circles (problem-solution section) */
.ps__divider svg circle { stroke: var(--accent); transition: stroke .3s var(--ease), fill .3s var(--ease); }
.ps__divider svg circle:last-of-type { fill: var(--accent); }
.nav__logo:hover .logo__mark,
.foot__brand:hover .logo__mark {
  transform: rotate(-14deg);
  color: var(--accent);
}
.nav__logo:hover .logo__mark circle:last-of-type,
.foot__brand:hover .logo__mark circle:last-of-type {
  transform: scale(1.35);
}
.logo__text {
  font-family: 'Cairo', sans-serif;
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: .09em;
  color: var(--text);
}
/* legacy fallback — kept harmless for any stray .dot */
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .16), 0 0 18px rgba(var(--accent-rgb), .53);
}
.nav__links {
  display: flex; align-items: center; gap: 2rem;
  font-size: .95rem;
  font-weight: 500;
}
.nav__links a { color: var(--text-dim); transition: color .2s var(--ease); position: relative; }
.nav__links a:hover { color: var(--text); }
.nav__links a:not(.nav__cta)::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -6px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width .25s var(--ease), left .25s var(--ease);
}
.nav__links a:not(.nav__cta):hover::after { width: 100%; left: 0; }
.nav__cta {
  background: var(--accent);
  color: var(--accent-ink) !important;
  padding: .55rem 1.1rem;
  border-radius: 100px;
  font-weight: 700;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.nav__cta:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -12px rgba(var(--accent-rgb), .47); }

/* ---------- Theme Toggle ---------- */
.theme-toggle {
  position: relative;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text);
  display: grid; place-items: center;
  cursor: pointer;
  overflow: hidden;
  transition: color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.theme-toggle svg {
  width: 18px; height: 18px;
  position: absolute;
  transition: opacity .35s var(--ease), transform .5s var(--ease);
}
.icon-sun  { opacity: 1; transform: rotate(0) scale(1); }
.icon-moon { opacity: 0; transform: rotate(-90deg) scale(.4); }
[data-theme="light"] .icon-sun  { opacity: 0; transform: rotate(90deg) scale(.4); }
[data-theme="light"] .icon-moon { opacity: 1; transform: rotate(0) scale(1); }

/* ---------- Color Palette ---------- */
.palette {
  position: relative;
}
.palette__toggle {
  position: relative;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text);
  display: grid; place-items: center;
  cursor: pointer;
  transition: color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.palette__toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.palette__toggle svg { width: 18px; height: 18px; }
.palette__toggle .palette__current {
  position: absolute;
  bottom: 4px; inset-inline-end: 4px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  pointer-events: none;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}

.palette__pop {
  position: absolute;
  top: calc(100% + .65rem);
  inset-inline-end: 0;
  transform: translateY(-8px) scale(.92);
  transform-origin: top left; /* RTL: anchor is on the physical left edge */
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 100px;
  padding: .5rem;
  display: flex;
  gap: .45rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  box-shadow: 0 25px 50px -15px rgba(0, 0, 0, .5);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  z-index: 70;
  white-space: nowrap;
}
.palette__pop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.palette__pop::before {
  content: "";
  position: absolute;
  top: -6px;
  inset-inline-end: 15px;
  transform: rotate(45deg);
  width: 12px; height: 12px;
  background: var(--surface);
  border-top: 1px solid var(--line-2);
  border-left: 1px solid var(--line-2);
}
.palette__swatch {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--swatch);
  cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
  position: relative;
}
.palette__swatch:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px -2px var(--swatch);
}
.palette__swatch.is-active {
  border-color: var(--text);
}
.palette__swatch.is-active::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--surface);
  mix-blend-mode: difference;
  opacity: .35;
}

.nav__burger { display: none; width: 44px; height: 44px; position: relative; }
.nav__burger span {
  position: absolute; left: 12px; right: 12px; height: 2px; background: var(--text);
  transition: transform .3s var(--ease), top .3s var(--ease), opacity .2s;
}
.nav__burger span:nth-child(1) { top: 16px; }
.nav__burger span:nth-child(2) { top: 26px; }
.nav__burger[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }


/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .95rem 1.5rem;
  border-radius: 100px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), background .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 12px 30px -15px rgba(var(--accent-rgb), .47);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -15px rgba(var(--accent-rgb), .67); }
.btn--ghost {
  color: var(--text);
  border: 1px solid var(--line-2);
  background: transparent;
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn--dark {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line-2);
}
.btn--dark:hover { background: var(--surface); transform: translateY(-2px); border-color: var(--accent); }
.btn--wa {
  background: #25D366;
  color: #052b12;
  box-shadow: 0 12px 30px -15px #25D36677;
}
.btn--wa svg { width: 22px; height: 22px; }
.btn--wa:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -15px #25D366aa; }
.btn--inline { align-self: flex-start; }


/* ============================================================
   HERO V2 — Creative / Type-forward
   ============================================================ */
.hero--v2 {
  position: relative;
  padding: clamp(7rem, 14vh, 10rem) 0 0;
  max-width: none;
  width: 100%;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  z-index: 2;
  isolation: isolate;
  /* Smooth diagonal wash across the entire canvas (no visible edges) */
  background: linear-gradient(
    135deg,
    rgba(var(--accent-rgb), .08) 0%,
    transparent 45%,
    transparent 55%,
    rgba(var(--accent-rgb), .05) 100%
  );
}

/* Remove default ::before; use ::after for bottom fade */
.hero--v2::before { display: none; }

/* Bottom fade so the hero blends into the section below */
.hero--v2::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 35%;
  background: linear-gradient(to bottom, transparent, var(--bg) 90%);
  pointer-events: none;
  z-index: -1;
}

/* ---------- Ambient background (full-bleed, GPU-accelerated) ---------- */
.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);            /* halved from 160 — saves a lot of GPU */
  opacity: .55;
  pointer-events: none;
  z-index: -2;
  /* GPU layer hints — keeps blur off the main thread */
  backface-visibility: hidden;
  will-change: transform;
}
.hero__blob--a {
  top: -40%;
  inset-inline-end: -40%;
  width: 100vw; height: 100vw;   /* down from 130 */
  background: radial-gradient(circle at 50% 50%, rgba(var(--accent-rgb), .55), transparent);
  animation: blobFloatA 30s ease-in-out infinite;
}
.hero__blob--b {
  bottom: -45%;
  inset-inline-start: -40%;
  width: 100vw; height: 100vw;
  background: radial-gradient(circle at 50% 50%, rgba(var(--accent-rgb), .45), transparent);
  animation: blobFloatB 36s ease-in-out infinite;
}
[data-theme="light"] .hero__blob { opacity: .55; filter: blur(90px); }
/* Simpler 2-keyframe animations (cheaper than 3-keyframe) */
@keyframes blobFloatA {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(-40px, 30px, 0) scale(1.08); }
}
@keyframes blobFloatB {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(40px, -30px, 0) scale(1.12); }
}

/* Grain overlay (CSS SVG noise) */
.hero__grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="light"] .hero__grain { opacity: .25; mix-blend-mode: multiply; }

/* Faint grid lines */
.hero__grid-lines {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
[data-theme="light"] .hero__grid-lines {
  background-image:
    linear-gradient(to right, rgba(0,0,0,.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,.04) 1px, transparent 1px);
}

/* ---------- Giant watermark (fills the gutters) ---------- */
.hero__watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-weight: 900;
  font-size: clamp(15rem, 38vw, 48rem);
  letter-spacing: -.07em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px rgba(var(--accent-rgb), 1);
  opacity: .08;
  pointer-events: none;
  z-index: -1;
  user-select: none;
  white-space: nowrap;
  animation: watermarkDrift 20s ease-in-out infinite;
}
[data-theme="light"] .hero__watermark { opacity: .12; -webkit-text-stroke-width: 1.5px; }

@keyframes watermarkDrift {
  0%, 100% { transform: translateX(0) scale(1); }
  50% { transform: translateX(-2%) scale(1.02); }
}

@media (max-width: 768px) { .hero__watermark { display: none; } }

/* ---------- Vertical side labels (fill gutter) ---------- */
.hero__side {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  pointer-events: none;
  z-index: 1;
  font-family: var(--font);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .25em;
  color: var(--muted);
  text-transform: uppercase;
  opacity: .5;
}
.hero__side span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  padding: .5rem 0;
  position: relative;
}
.hero__side span::before,
.hero__side span::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 1px;
  height: 30px;
  background: linear-gradient(to bottom, transparent, var(--muted), transparent);
  transform: translateX(-50%);
  opacity: .6;
}
.hero__side span::before { top: -34px; }
.hero__side span::after { bottom: -34px; }

.hero__side--start { inset-inline-start: 1.25rem; }
.hero__side--end { inset-inline-end: 1.25rem; }

@media (max-width: 1280px) { .hero__side { display: none; } }

/* ---------- Inner wrapper (near full-bleed) ---------- */
.hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 clamp(1.25rem, 2.5vw, 3rem);
}

/* ---------- Eyebrow (floating) ---------- */
.eyebrow--float {
  align-self: start;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem 1rem .45rem .75rem;
  border: 1px solid var(--line-2);
  border-radius: 100px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: .02em;
  animation: float 6s ease-in-out infinite;
}
.eyebrow__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .2);
  animation: pulseDot 2s infinite;
  flex-shrink: 0;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .2); }
  50% { box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0); }
}

/* ---------- Stage: mega text on right, proof cards anchored to left ---------- */
.hero__stage {
  position: relative;
  width: 100%;
  min-height: 28rem;
  display: flex;
  align-items: center;
  justify-content: flex-start; /* mega flows naturally to right in RTL */
  padding-inline-end: clamp(300px, 25vw, 380px); /* leave room on physical LEFT for cards */
}
.hero__stage .hero__mega {
  width: 100%;
}
.hero__stage .hero__proof {
  position: absolute;
  inset-inline-end: 0; /* RTL: physical LEFT edge */
  top: 50%;
  transform: translateY(-50%);
  width: clamp(280px, 22vw, 340px);
  z-index: 2;
}

/* ---------- Mega typography ---------- */
.hero__mega {
  font-family: var(--font);
  font-size: clamp(3rem, 13vw, 13rem);
  line-height: 1;
  letter-spacing: -.045em;
  font-weight: 900;
  margin: 0;
  position: relative;
  user-select: none;
  width: 100%;
  text-align: right;
}
.mega-line {
  display: block;
  position: relative;
  white-space: nowrap;
}
.mega-line--1 {
  font-size: .42em;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text-dim);
  line-height: 1.1;
  margin-bottom: .4em;
  padding-inline-start: .1em;
}
.mega-line--2 {
  font-weight: 800;
}
.mega-line--3 {
  font-size: .65em;
  font-weight: 900;
  display: flex;
  align-items: baseline;
  gap: .05em;
  margin-top: .15em;
}

.mega-word--outline {
  color: transparent;
  -webkit-text-stroke: 2.5px var(--text);
  padding-inline: .05em;
  position: relative;
  transition: -webkit-text-stroke-color .4s, color .4s;
}
.mega-word--outline:hover {
  color: var(--text);
  -webkit-text-stroke-color: transparent;
}

.mega-word--hilite {
  color: var(--accent);
  position: relative;
  display: inline-block;
  padding-inline: .05em;
  /* Create a local stacking context so the scribble SVG can sit behind
     the Arabic letters (which have descenders like ع) using z-index: -1. */
  isolation: isolate;
}
.scribble--under {
  /* Overrides the text color for just the SVG, so path stroke="currentColor"
     picks up the highlighter yellow without affecting the word's blue fill. */
  color: var(--scribble);
  position: absolute;
  left: 0; right: 0;
  bottom: -.05em;
  width: 100%;
  height: .22em;
  opacity: .95;
  z-index: -1; /* sit BEHIND the Arabic letters (parent has isolation: isolate) */
  animation: scribbleDraw 1.5s ease-out .6s backwards;
}
@keyframes scribbleDraw {
  from { stroke-dasharray: 600; stroke-dashoffset: 600; opacity: 0; }
  to   { stroke-dasharray: 600; stroke-dashoffset: 0;   opacity: .95; }
}
.scribble--under path {
  stroke-dasharray: 600;
}

.mega-period {
  color: var(--accent);
  font-weight: 900;
  -webkit-text-stroke: 0;
  animation: periodBounce 1s ease-out 1.2s backwards;
}
@keyframes periodBounce {
  0% { transform: translateY(-.3em) scale(.5); opacity: 0; }
  60% { transform: translateY(.05em) scale(1.15); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* ---------- Hero bottom (sub + CTA + note) ---------- */
.hero__bottom {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
  margin-top: 1rem;
}
.hero__sub {
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  color: var(--text-dim);
  line-height: 1.5;
  max-width: 24ch;
  font-weight: 500;
  margin: 0;
}
.hero__sub b {
  color: var(--text);
  font-weight: 800;
  position: relative;
  background: linear-gradient(transparent 60%, rgba(var(--accent-rgb), .25) 60%);
  padding: 0 .15em;
}
.hero__cta {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
}
.btn--magnetic { transition: transform .4s var(--ease), box-shadow .3s; }

/* ---------- Corner annotation (now part of bottom) ---------- */
.hero__note {
  display: flex;
  align-items: center;
  gap: .4rem;
  color: var(--muted);
  font-family: 'Tajawal', var(--font);
  font-size: .78rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.35;
  max-width: 140px;
  opacity: 0;
  animation: noteIn .8s ease 1.5s forwards;
}
@keyframes noteIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: .85; transform: translateY(0); }
}
.hero__note-arrow {
  width: 38px; height: 38px;
  flex-shrink: 0;
  color: var(--accent);
  opacity: .9;
}

/* ---------- Proof card stack ---------- */
.hero__proof {
  display: flex;
  flex-direction: column;
  gap: .9rem;
}

.proof-card {
  padding: .95rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow:
    0 25px 50px -25px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: .2rem;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .2s;
  animation: cardIn .9s cubic-bezier(.2,.9,.3,1.1) backwards;
  transform-origin: center;
}
.proof-card:hover {
  border-color: rgba(var(--accent-rgb), .4);
  box-shadow: 0 35px 70px -25px rgba(var(--accent-rgb), .35);
  z-index: 4;
}
.proof-card--1 {
  transform: rotate(-1.5deg);
  animation-delay: .3s;
}
.proof-card--2 {
  transform: rotate(1.5deg) translateX(1.5rem);
  animation-delay: .45s;
}
[dir="rtl"] .proof-card--2 {
  transform: rotate(1.5deg) translateX(-1.5rem);
}
.proof-card--3 {
  transform: rotate(-1deg);
  animation-delay: .6s;
}
.proof-card:hover { transform: translateY(-4px) rotate(0) scale(1.02); }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) rotate(0); }
  to { opacity: 1; }
}

.proof-card__top {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .72rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.proof-card__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulseDot 1.5s infinite;
  flex-shrink: 0;
}
.proof-card__kicker { color: var(--muted); }
.proof-card__metric {
  font-family: var(--font);
  font-size: 2rem;
  font-weight: 900;
  display: inline-flex;
  align-items: baseline;
  gap: .3em;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -.02em;
  margin-top: .15rem;
}
.proof-card__label {
  font-size: .82rem;
  color: var(--text-dim);
  margin-top: .2rem;
}
/* Unit next to a big metric number (e.g. "30 يوم") — smaller & dimmer */
.proof-card__unit {
  font-size: .55em;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0;
}

/* ============================================================
   HERO (Old — keep for backward compat if section lacks --v2)
   ============================================================ */
.hero {
  position: relative;
  padding: 11rem 1.5rem 5rem;
  max-width: var(--container);
  margin: 0 auto;
  min-height: 100vh;
  display: flex; flex-direction: column;
  justify-content: center;
  z-index: 2;
}
.hero::before {
  content: "";
  position: absolute;
  top: 10%; inset-inline-start: -10%;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), .13), transparent 60%);
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -10%; inset-inline-end: -10%;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), .13), transparent 60%);
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.hero__copy { position: relative; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .7rem;
  font-size: .85rem;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: .02em;
}
.eyebrow__line { width: 28px; height: 2px; background: var(--accent); }

.hero__title {
  font-size: clamp(2rem, 4.8vw, 4.25rem);
  font-weight: 900;
  letter-spacing: -.015em;
  line-height: 1.18;
  margin-bottom: 1.75rem;
}
.hero__title-line {
  display: block;
}
.hero__title-accent {
  display: inline-block;
  position: relative;
  color: var(--accent);
  margin-top: .15em;
}
.scribble {
  position: absolute;
  inset-inline-start: -2%;
  bottom: -.35em;
  width: 104%;
  height: .4em;
  /* color set by the variant class (.scribble--under uses var(--scribble)) */
  pointer-events: none;
  opacity: .95;
}

.hero__sub {
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  color: var(--text-dim);
  max-width: 32ch;
  margin-bottom: 2.25rem;
  line-height: 1.75;
}

.hero__cta {
  display: flex; gap: .9rem; flex-wrap: wrap;
  margin-bottom: 2.75rem;
}

.hero__meta {
  display: flex; gap: 2.25rem; flex-wrap: wrap;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line-2);
}
.hero__meta li {
  font-size: .85rem;
  color: var(--muted);
  display: flex; flex-direction: column;
  gap: .15rem;
}
.hero__meta strong {
  font-size: 1.55rem;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -.02em;
}

/* ---- Hero Visual ---- */
.hero__visual {
  position: relative;
  align-self: stretch;
  display: flex; align-items: center;
  min-height: 440px;
}

/* Browser frame */
.browser {
  position: relative;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 40px 80px -30px rgba(0,0,0,.75),
    0 0 0 1px rgba(var(--accent-rgb), .1) inset;
  transform: rotate(-1.3deg);
  transition: transform .5s var(--ease);
}
.hero__visual .browser { transform: rotate(-1.3deg); }
.hero__visual .browser:hover { transform: rotate(0deg) scale(1.015); }

.browser__bar {
  display: flex; align-items: center; gap: .5rem;
  padding: .75rem 1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line-2);
  direction: ltr;
}
.browser__dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: #3a4340;
}
.browser__dot:nth-child(1) { background: #ff6a6a77; }
.browser__dot:nth-child(2) { background: #ffcd5e77; }
.browser__dot:nth-child(3) { background: rgba(var(--accent-rgb), .53); }
.browser__url {
  margin-inline-start: auto;
  margin-inline-end: 1rem;
  padding: .25rem .8rem;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: .78rem;
  font-family: 'Tajawal', monospace;
  letter-spacing: .02em;
}
.browser__frame {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--surface-2);
}
/* Animated skeleton placeholder while screenshot loads */
.browser__frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, var(--surface-2), var(--bg)),
    linear-gradient(90deg,
      transparent 0%,
      rgba(var(--accent-rgb), .08) 45%,
      rgba(var(--accent-rgb), .15) 50%,
      rgba(var(--accent-rgb), .08) 55%,
      transparent 100%
    );
  background-blend-mode: normal;
  background-size: 100% 100%, 200% 100%;
  animation: shimmer 2.2s ease-in-out infinite;
  z-index: 0;
  transition: opacity .4s var(--ease);
}
@keyframes shimmer {
  0%   { background-position: 0 0, -50% 0; }
  100% { background-position: 0 0, 150% 0; }
}
.browser__frame.is-loaded::before { opacity: 0; }

.browser__img,
.browser__frame > img {
  position: relative;
  z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: saturate(1.05);
  opacity: 0;
  transition: opacity .5s var(--ease);
}
.browser__frame.is-loaded > img,
.browser__frame.is-loaded .browser__img { opacity: 1; }

/* Beautiful fallback card */
.browser__fallback {
  position: absolute; inset: 0;
  z-index: 2;
  display: none;
  flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1rem;
  text-align: center;
  padding: 2rem;
  background:
    radial-gradient(circle at 30% 20%, rgba(var(--accent-rgb), .12), transparent 60%),
    radial-gradient(circle at 70% 80%, rgba(var(--accent-rgb), .08), transparent 60%),
    var(--surface);
}
.browser__fallback::before {
  content: "";
  width: 56px; height: 56px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--text)));
  box-shadow: 0 8px 20px -6px rgba(var(--accent-rgb), .5);
  display: grid;
  place-items: center;
  position: relative;
  background-image:
    linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--text))),
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15 15 0 0 1 0 20 15 15 0 0 1 0-20'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover, 28px 28px;
  background-blend-mode: normal;
}
.browser__fallback strong {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .02em;
  font-family: 'Tajawal', monospace;
  direction: ltr;
  display: block;
}
.browser__fallback span {
  color: var(--text-dim);
  font-size: .85rem;
  font-weight: 500;
}
.browser__frame--fallback::before { display: none; }
.browser__frame--fallback .browser__fallback { display: flex; }

/* Floating badges on hero visual */
.badge {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 100px;
  padding: .55rem 1rem;
  font-size: .85rem;
  font-weight: 600;
  box-shadow: 0 20px 40px -20px rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  animation: float 6s ease-in-out infinite;
}
.badge--live {
  top: -14px;
  inset-inline-start: -18px;
  display: inline-flex; align-items: center; gap: .55rem;
  color: var(--text);
}
.badge--metric {
  bottom: -18px;
  inset-inline-end: -10px;
  display: flex; flex-direction: column; gap: 0;
  padding: .75rem 1.15rem;
  border-radius: var(--radius);
  animation-delay: -3s;
}
.badge--metric span { font-size: .72rem; color: var(--muted); font-weight: 500; }
.badge--metric strong { color: var(--accent); font-size: 1.05rem; letter-spacing: .02em; }

.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 1.6s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .53); }
  70% { box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Hero ticker — seamless marquee */
.hero__ticker {
  margin-top: 4rem;
  overflow: hidden;
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
  padding: 1rem 0;
  direction: ltr; /* ticker flows right-to-left (natural for reading flow) */
}
.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker 40s linear infinite;
  will-change: transform;
}
.ticker__group {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-inline-end: 2rem;
  flex-shrink: 0;
  color: var(--text-dim);
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  direction: rtl; /* items within a group read right-to-left */
}
.ticker__sep {
  color: var(--accent);
  font-size: 1.2em;
  font-weight: 900;
  opacity: .7;
}
@keyframes ticker {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}


/* ============================================================
   PROBLEM / SOLUTION
   ============================================================ */
.ps {
  max-width: var(--container);
  margin: 0 auto;
  padding: 6rem 1.5rem;
  position: relative;
  z-index: 2;
}
.ps__head {
  max-width: 720px;
  margin-bottom: 3.5rem;
}
.ps__head .section-tag { margin-bottom: 1.25rem; }
.ps__title {
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  line-height: 1.25;
}
.ps__title em {
  font-style: normal;
  color: var(--text-dim);
  position: relative;
  display: inline-block;
  opacity: .75;
}
.ps__title em::after {
  content: "";
  position: absolute;
  left: -3%; right: -3%;
  top: 58%;
  height: 2px;
  background: var(--muted);
  border-radius: 2px;
  transform: rotate(-1.2deg);
  opacity: .55;
}

.ps__cols {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: stretch;
}
.ps__col {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: 2rem 2rem 2.25rem;
  position: relative;
}
.ps__col--bad { transform: rotate(-.5deg); }
.ps__col--good { transform: rotate(.5deg); border-color: rgba(var(--green-rgb), .35); box-shadow: 0 30px 60px -30px rgba(var(--green-rgb), .18); }
.ps__label {
  display: inline-block;
  padding: .3rem .8rem;
  border-radius: 100px;
  font-size: .78rem;
  font-weight: 700;
  background: #ff6a6a22;
  color: var(--red);
  margin-bottom: 1.4rem;
}
.ps__label--good { background: var(--green-soft); color: var(--green); }
.ps__col ul { display: flex; flex-direction: column; gap: .9rem; }
.ps__col li {
  display: flex; align-items: flex-start; gap: .75rem;
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.6;
}
.ps__col li .x, .ps__col li .v {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 8px;
  font-weight: 800;
  font-size: .95rem;
  margin-top: 2px;
}
.ps__col li .x { background: #ff6a6a22; color: var(--red); }
.ps__col li .v { background: var(--green-soft); color: var(--green); }

.ps__divider {
  width: 40px;
  color: var(--muted);
  display: grid; place-items: stretch;
  padding: 1rem 0;
}
.ps__divider svg {
  width: 100%;
  height: 100%;
  min-height: 200px;
  animation: dividerPulse 3s ease-in-out infinite;
}
@keyframes dividerPulse {
  0%, 100% { opacity: .85; }
  50% { opacity: 1; }
}


/* ============================================================
   PROJECTS
   ============================================================ */
.work {
  max-width: var(--container);
  margin: 0 auto;
  padding: 6rem 1.5rem 4rem;
  position: relative;
  z-index: 2;
}
.work__intro {
  max-width: 720px;
  margin-bottom: 5rem;
}
.work__intro .section-tag { margin-bottom: 1.25rem; }
.work__intro h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.2;
}

.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: 5rem 0;
  position: relative;
  border-top: 1px dashed var(--line-2);
}
.project:first-of-type { border-top: 0; }

/* Project 1: image visually on right (start in RTL), text on left (end in RTL) */
.project--1 .project__visual { order: 1; }
.project--1 .project__copy { order: 2; }
/* Project 2: image visually on left (end in RTL), text on right (start in RTL) */
.project--2 .project__visual { order: 2; }
.project--2 .project__copy { order: 1; }

/* Huge ghost number */
.project__number {
  position: absolute;
  top: 2rem;
  inset-inline-end: 0;
  font-size: clamp(6rem, 14vw, 14rem);
  font-weight: 900;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(var(--accent-rgb), .2);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  letter-spacing: -.05em;
  opacity: .8;
}
.project__number--right {
  inset-inline-end: auto;
  inset-inline-start: 0;
}

.project__visual { position: relative; z-index: 1; }
.project__copy {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
}

.browser--sm { transform: rotate(-1deg); }
.project--2 .browser--sm { transform: rotate(1deg); }
.browser--sm:hover { transform: rotate(0) scale(1.01); }

.project__kicker {
  display: inline-block;
  color: var(--accent);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: .75rem;
}
.project__title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: 2rem;
  letter-spacing: -.02em;
}
.project__block { margin-bottom: 1.5rem; }
.project__block h4 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: .55rem;
  letter-spacing: .02em;
  display: flex; align-items: center; gap: .5rem;
}
.project__block h4::before {
  content: "";
  width: 18px; height: 2px;
  background: var(--accent);
}
.project__block p {
  color: var(--text-dim);
  font-size: 1.02rem;
  line-height: 1.75;
}
.ticks { display: flex; flex-direction: column; gap: .6rem; }
.ticks li {
  display: flex; align-items: center; gap: .6rem;
  color: var(--text);
  font-size: 1rem;
}
.ticks li::before {
  content: "✓";
  color: var(--accent);
  background: var(--accent-soft);
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 6px;
  font-weight: 800;
  font-size: .85rem;
}
.btn--inline { margin-top: 1.5rem; }

.project__actions {
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.project__actions .btn--inline { margin-top: 0; }


/* ============================================================
   PROCESS
   ============================================================ */
.process {
  max-width: var(--container);
  margin: 0 auto;
  padding: 7rem 1.5rem;
  position: relative;
  z-index: 2;
}
.process__head {
  max-width: 680px;
  margin: 0 auto 4rem;
  text-align: center;
}
.process__head .section-tag { margin-bottom: 1.25rem; }
.process__head h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.25;
}

.steps-wrap {
  position: relative;
  padding: 2rem 0;
}
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}
.steps__line {
  position: absolute;
  top: calc(2rem + 34px); /* aligns with center of 68px circle */
  inset-inline: 10%;
  height: 2px;
  background: var(--line-2);
  z-index: 0;
  border-radius: 2px;
  overflow: hidden;
}
.steps__line-fill {
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .6s var(--ease);
}
.step {
  position: relative;
  z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  gap: 1.25rem;
}
.step__num {
  width: 68px; height: 68px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface);
  border: 1px solid var(--line-2);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-dim);
  transition: background .35s var(--ease), color .35s var(--ease), transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.step.is-active .step__num {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  transform: scale(1.08);
  box-shadow: 0 15px 40px -10px rgba(var(--accent-rgb), .4);
}
.step__body h3 {
  font-size: 1.15rem;
  margin-bottom: .45rem;
}
.step__body p {
  font-size: .92rem;
  color: var(--text-dim);
  line-height: 1.65;
  max-width: 22ch;
  margin: 0 auto;
}


/* ============================================================
   TRUST
   ============================================================ */
.trust {
  max-width: var(--container);
  margin: 0 auto;
  padding: 6rem 1.5rem;
  position: relative;
  z-index: 2;
}
.trust__grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}
.trust__quote {
  position: relative;
  padding: 2.5rem 0;
}
.trust__mark {
  width: 54px; height: 54px;
  color: var(--accent);
  opacity: .25;
  margin-bottom: 1rem;
}
.trust__quote p {
  font-size: clamp(1.5rem, 2.8vw, 2.15rem);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -.01em;
}
.trust__sig {
  margin-top: 2rem;
  display: inline-flex; align-items: center; gap: .75rem;
  color: var(--text-dim);
  font-weight: 600;
}
.trust__sig-line { width: 32px; height: 2px; background: var(--accent); }

.trust__points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.trust__points li {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem;
  transition: transform .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.trust__points li:nth-child(odd) { transform: translateY(-10px); }
.trust__points li:hover { transform: translateY(-14px); border-color: rgba(var(--accent-rgb), .4); background: var(--surface-2); }
.trust__points strong {
  display: block;
  font-size: 1.15rem;
  color: var(--accent);
  margin-bottom: .35rem;
  font-weight: 800;
}
.trust__points span {
  color: var(--text-dim);
  font-size: .92rem;
  line-height: 1.6;
}


/* ============================================================
   FINAL CTA
   ============================================================ */
.cta {
  max-width: var(--container);
  margin: 3rem auto 0;
  padding: 1.5rem 1.5rem 7rem;
  position: relative;
  z-index: 2;
}
.cta__lottie {
  position: absolute;
  top: -40px;
  inset-inline-end: 4%;
  width: 220px;
  height: 220px;
  z-index: 3;
  pointer-events: none;
  opacity: .85;
  filter: drop-shadow(0 10px 30px rgba(var(--accent-rgb), .25));
}
@media (max-width: 900px) {
  .cta__lottie {
    width: 140px;
    height: 140px;
    top: -20px;
    inset-inline-end: 8%;
  }
}
@media (max-width: 540px) {
  .cta__lottie {
    width: 100px;
    height: 100px;
    top: -16px;
    inset-inline-end: 4%;
    opacity: .65;
  }
}
.cta__inner {
  background:
    radial-gradient(circle at 80% 10%, rgba(var(--accent-rgb), .13), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(var(--accent-rgb), .13), transparent 45%),
    var(--surface);
  border: 1px solid var(--line-2);
  border-radius: calc(var(--radius-lg) * 1.3);
  padding: clamp(2.5rem, 6vw, 5.5rem) clamp(1.5rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
}
.cta__inner::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(rgba(var(--accent-rgb), .07) 1px, transparent 1px);
  background-size: 24px 24px;
  mask: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent);
  pointer-events: none;
  opacity: .6;
}
.cta__inner .section-tag { margin-bottom: 1.5rem; }
.cta__title {
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
  max-width: 18ch;
}
.cta__sub {
  color: var(--text-dim);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  max-width: 48ch;
  line-height: 1.75;
  margin-bottom: 2.5rem;
}
.cta__buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.cta__micro {
  margin-top: 1.75rem;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 500;
}


/* ============================================================
   FOOTER
   ============================================================ */
.foot {
  border-top: 1px solid var(--line-2);
  padding: 2rem 1.5rem;
  position: relative;
  z-index: 2;
}
.foot__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.foot__brand {
  font-weight: 900;
  display: inline-flex; align-items: center; gap: .55rem;
  letter-spacing: .08em;
  cursor: default;
}
.foot__brand .logo__mark { width: 24px; height: 24px; }
.foot p { color: var(--muted); font-size: .88rem; }
.foot__links { display: flex; gap: 1.25rem; }
.foot__links a { color: var(--text-dim); font-size: .9rem; transition: color .2s; }
.foot__links a:hover { color: var(--accent); }


/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

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


/* ============================================================
   LIGHT THEME · targeted overrides
   ============================================================ */
[data-theme="light"] .browser {
  box-shadow:
    0 30px 60px -20px rgba(12, 16, 14, .15),
    0 0 0 1px rgba(var(--accent-rgb), .12) inset;
}
[data-theme="light"] .badge {
  box-shadow: 0 14px 30px -12px rgba(12, 16, 14, .15);
}
[data-theme="light"] .hero::before,
[data-theme="light"] .hero::after {
  opacity: .55;
}
[data-theme="light"] .project__number {
  -webkit-text-stroke: 1.5px rgba(var(--accent-rgb), .35);
  opacity: .9;
}
[data-theme="light"] .step__num {
  background: var(--bg-2);
}
[data-theme="light"] .btn--primary {
  box-shadow: 0 12px 30px -15px rgba(var(--accent-rgb), .55);
}
[data-theme="light"] .btn--primary:hover {
  box-shadow: 0 18px 40px -15px rgba(var(--accent-rgb), .7);
}
[data-theme="light"] .nav__cta:hover {
  box-shadow: 0 10px 30px -12px rgba(var(--accent-rgb), .55);
}
[data-theme="light"] .step.is-active .step__num {
  box-shadow: 0 15px 40px -10px rgba(var(--accent-rgb), .5);
}
[data-theme="light"] .trust__points li:hover {
  border-color: rgba(var(--accent-rgb), .5);
}
[data-theme="light"] .pulse {
  box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .6);
}
[data-theme="light"] .dot {
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .18), 0 0 18px rgba(var(--accent-rgb), .45);
}
[data-theme="light"] .ps__col--good {
  border-color: rgba(var(--green-rgb), .35);
  box-shadow: 0 30px 60px -30px rgba(var(--green-rgb), .2);
}
[data-theme="light"] .ps__col li .x { background: rgba(216, 72, 72, .1); }
[data-theme="light"] .ps__label { background: rgba(216, 72, 72, .1); }


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero { padding-top: 9rem; }
  .hero__grid { grid-template-columns: 1fr; gap: 4rem; }
  .hero__visual { min-height: auto; }

  /* ---- Hero V2 tablet ---- */
  .hero--v2 { padding: 7rem 0 0; min-height: auto; }
  .hero__inner { padding: 0 1.5rem 2rem; }
  .hero__stage {
    position: static;
    flex-direction: column;
    gap: 2.5rem;
    align-items: stretch;
    padding-inline-end: 0;
    min-height: 0;
  }
  .hero__stage .hero__mega { width: 100%; }
  .hero__stage .hero__proof {
    position: static;
    transform: none;
    width: 100%;
    inset: auto;
  }
  .hero__mega { font-size: clamp(3.5rem, 12vw, 6.5rem); }
  .hero__proof { flex-direction: row; flex-wrap: wrap; gap: .75rem; }
  .proof-card { flex: 1 1 calc(33.333% - .5rem); min-width: 180px; padding: .8rem 1rem; }
  .proof-card--2 { transform: rotate(1.5deg); }
  [dir="rtl"] .proof-card--2 { transform: rotate(1.5deg); }
  .proof-card__metric { font-size: 1.7rem; }
  .hero__bottom { grid-template-columns: 1fr auto; gap: 1.5rem; }
  .hero__note { display: none; }

  .project { grid-template-columns: 1fr; gap: 2rem; }
  .project--1 .project__visual,
  .project--2 .project__visual { order: 0; }
  .project--1 .project__copy,
  .project--2 .project__copy { order: 1; }
  .project__number { font-size: 7rem; top: 1rem; opacity: .5; }

  .trust__grid { grid-template-columns: 1fr; }
  .trust__points { grid-template-columns: 1fr 1fr; }

  .steps { grid-template-columns: repeat(5, 1fr); gap: .5rem; }
}

@media (max-width: 768px) {
  /* Tighten navbar so 3 controls + logo all fit */
  .nav__inner { padding: .85rem 1rem; gap: .75rem; }

  .nav__links {
    position: fixed;
    inset: 68px 1rem auto 1rem;
    background: var(--surface);
    border: 1px solid var(--line-2);
    border-radius: var(--radius-lg);
    flex-direction: column;
    align-items: stretch;
    padding: .75rem;
    gap: .15rem;
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
    transition: transform .3s var(--ease), opacity .3s var(--ease);
    box-shadow: 0 30px 60px -20px rgba(0,0,0,.5);
    z-index: 55;
  }
  .nav__links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  /* Regular menu items — full-width link rows with subtle hover */
  .nav__links a:not(.nav__cta) {
    padding: .9rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    border-radius: var(--radius);
    transition: background .2s, color .2s;
  }
  .nav__links a:not(.nav__cta):hover {
    background: var(--surface-2, rgba(var(--accent-rgb), .06));
    color: var(--accent);
  }
  /* Remove the desktop underline effect on mobile (replaced by bg hover) */
  .nav__links a:not(.nav__cta)::after { display: none; }

  /* The "كلّمنا" CTA — full-width but with proper button height & icon spacing */
  .nav__cta {
    margin-top: .5rem;
    padding: .9rem 1.25rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .01em;
    border-radius: var(--radius);
  }
  .nav__burger { display: block; }

  /* Compact controls on mobile to fit palette + theme + burger */
  .nav__end { gap: .3rem; }
  .palette__toggle, .theme-toggle { width: 38px; height: 38px; }
  .palette__toggle svg, .theme-toggle svg { width: 16px; height: 16px; }
  .palette__toggle .palette__current { width: 8px; height: 8px; bottom: 3px; inset-inline-end: 3px; border-width: 1.5px; }
  .palette__pop { padding: .35rem; gap: .3rem; max-width: calc(100vw - 2rem); }
  .palette__swatch { width: 24px; height: 24px; }
  .palette__pop::before { inset-inline-end: 13px; }

  .hero { padding: 7rem 1.25rem 3rem; }
  .hero__meta { gap: 1.25rem; }
  .hero__meta strong { font-size: 1.25rem; }

  /* ---- Hero V2 mobile ---- */
  .hero--v2 { padding: 5.5rem 0 0; min-height: auto; }
  .hero__inner { padding: 0 1.25rem 2rem; }
  .hero__mega {
    font-size: clamp(2.8rem, 14vw, 5rem);
    line-height: 1.05; /* was .92 — tight line-height caused Arabic ascenders/descenders to overlap between lines */
  }
  .mega-line--1 { margin-bottom: .25em; }
  .mega-line--3 { margin-top: .1em; }
  .hero__bottom { grid-template-columns: 1fr; gap: 1.25rem; }
  .hero__sub { font-size: 1.05rem; max-width: 100%; }
  .hero__cta .btn { flex: 1 1 auto; justify-content: center; }

  /* Compact proof cards: 2 side-by-side, hide the 3rd */
  .hero__proof { flex-direction: row; flex-wrap: wrap; gap: .6rem; }
  .proof-card { flex: 1 1 calc(50% - .3rem); min-width: 0; padding: .75rem .85rem; }
  .proof-card__metric { font-size: 1.5rem; }
  .proof-card__kicker { font-size: .65rem; }
  .proof-card--3 { display: none; }
  .proof-card { transform: rotate(0) !important; }
  [dir="rtl"] .proof-card--2 { transform: rotate(0) !important; }

  /* Shrink & constrain decorative hero blobs so they can't contribute to
     overflow on phones (viewport is narrow, blobs at 100vw exceeded it). */
  .hero__blob--a { width: 320px; height: 320px; inset-inline-end: -80px; top: -80px; }
  .hero__blob--b { width: 260px; height: 260px; inset-inline-start: -60px; bottom: -60px; }
  .hero::before, .hero::after { display: none; } /* kill ghost radial blurs on mobile */

  /* Hard-contain main sections so nothing leaks sideways. */
  .hero, .ps, .work, .process, .trust, .cta, .tmonial, .pricing, .faq {
    overflow-x: clip;
    max-width: 100%;
  }
  /* Thinner stroke on mobile — Arabic script creates double-strokes at letter
     connections with text-stroke; thinner stroke makes the effect less obvious. */
  .mega-word--outline { -webkit-text-stroke-width: 1px; }

  /* --- Project cards: make sure text doesn't spill beyond viewport --- */
  .project           { min-width: 0; overflow: hidden; }
  .project__copy     { min-width: 0; max-width: 100%; }
  .project__block    { min-width: 0; }

  /* --- Global text wrapping safety on mobile ---
     Arabic words sometimes refuse to break; this allows fallback breaking
     when a word is longer than the available width. */
  .project__block p,
  .ticks li,
  .ps__col p, .ps__col li,
  .tmonial__head p, .pricing__head p,
  .pricing__head h2, .tmonial__head h2,
  .work__intro h2, .work__intro p,
  .process__head p,
  .tcard__quote,
  .cta__sub, .cta__title,
  .hero__sub {
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .ps__cols { grid-template-columns: 1fr; gap: 1.5rem; }
  .ps__divider { display: none; } /* decorative arrow — unnecessary when columns stack vertically on mobile */
  .ps__col--bad, .ps__col--good { transform: none; }

  .steps { grid-template-columns: 1fr; gap: 2rem; }
  .steps__line { display: none; }
  .step { flex-direction: row; text-align: start; gap: 1rem; align-items: flex-start; }
  .step__num { flex: 0 0 auto; width: 52px; height: 52px; font-size: 1.2rem; }
  .step__body p { max-width: 100%; margin: 0; }

  .trust__points { grid-template-columns: 1fr; }
  .trust__points li:nth-child(odd) { transform: none; }

  .cta__buttons .btn { flex: 1 1 100%; justify-content: center; }

  .badge--live { inset-inline-start: 8px; }
  .badge--metric { inset-inline-end: 8px; bottom: -14px; }

  .hero__title { font-size: clamp(2.2rem, 9vw, 3rem); }
}

@media (max-width: 480px) {
  /* Tighter still on small phones */
  .nav__inner { padding: .75rem .85rem; gap: .5rem; }
  .logo__mark { width: 26px; height: 26px; }
  .logo__text { font-size: 1.05rem; }

  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { justify-content: center; }

  .foot__inner { flex-direction: column; text-align: center; gap: .75rem; }
}

/* ============================================================
   MOBILE SPACING FIX — consistent section padding + margins
   Fixes "مساحات فاضية" + "متشفته يمين/شمال" on phones.
   Target: 768px and below, with extra tightening at 480px.
   ============================================================ */
@media (max-width: 768px) {
  /* --- Section-level vertical padding (top/bottom) --- */
  .ps        { padding: 3.5rem 1.25rem; }
  .work      { padding: 3.5rem 1.25rem 2.5rem; }
  .process   { padding: 3.5rem 1.25rem; }
  .trust     { padding: 3.5rem 1.25rem; }
  .cta       { padding: 1rem 1.25rem 4rem; margin-top: 1.5rem; }
  .tmonial   { margin: 3rem auto 0; padding: 0 1.25rem; }
  .pricing   { margin: 3rem auto 0; padding: 0 1.25rem; }
  .foot      { padding: 1.75rem 1.25rem; }

  /* --- Intro heading margins (big gaps below headings) --- */
  .ps__head        { margin-bottom: 2rem; }
  .work__intro     { margin-bottom: 2rem; }
  .process__head   { margin-bottom: 2rem; }
  .tmonial__head   { margin-bottom: 2rem; }
  .pricing__head   { margin-bottom: 2rem; }

  /* --- Project card spacing --- */
  .project                { padding: 2.5rem 0; gap: 2rem; }
  .project:first-of-type  { padding-top: 0; }
  .project__number        { font-size: 5rem; top: .5rem; opacity: .35; }
  .project__title         { margin-bottom: 1.25rem; }

  /* --- Browser frame: kill rotation on small screens (cleaner look) --- */
  .browser--sm,
  .project--2 .browser--sm { transform: rotate(0); }

  /* --- CTA inner (big glass card) padding tighter on mobile --- */
  .cta__inner { padding: 2.5rem 1.25rem; border-radius: var(--radius-lg); }
  .cta__title { font-size: clamp(1.7rem, 7vw, 2.2rem); }

  /* --- Hero ticker margin --- */
  .hero__ticker { margin-top: 2.5rem; }

  /* --- Testimonials/Pricing card padding --- */
  .tcard  { padding: 1.5rem 1.25rem; }
  .ptier  { padding: 1.75rem 1.35rem 2rem; }
  .ptier--featured { transform: none; } /* don't scale on mobile - wastes space */
  .ptier--featured:hover { transform: translateY(-4px); }

  /* --- Contact section: tighten --- */
  .legal { padding: 4rem 1.25rem 2.5rem; }
}

/* Extra-tight for narrow phones (≤ 400px) */
@media (max-width: 400px) {
  .hero--v2 { padding: 4.5rem 0 0; }
  .hero__inner { padding: 0 1rem 1.5rem; }
  .hero__mega {
    font-size: clamp(2.2rem, 13vw, 3.6rem);
    line-height: 1.08; /* extra air on tiny screens */
  }

  /* Switch outline → low-opacity filled on tiny screens to hide
     the Arabic double-stroke artifact at connected letters. */
  .mega-word--outline {
    color: var(--text);
    opacity: .22;
    -webkit-text-stroke: 0;
  }

  .ps, .work, .process, .trust { padding-inline: 1rem; }
  .tmonial, .pricing           { padding-inline: 1rem; }
  .foot                        { padding-inline: 1rem; }
  .cta                         { padding-inline: 1rem; padding-bottom: 3rem; }
  .cta__inner                  { padding: 2rem 1rem; }
  .ps__col                     { padding: 1.5rem 1.25rem 1.75rem; }

  .tcard { padding: 1.35rem 1.1rem; }
  .ptier { padding: 1.5rem 1.15rem 1.75rem; }

  /* Fade giant ghost numbers in project cards — they overflow on tiny screens */
  .project__number { font-size: 4rem; opacity: .25; }
}

/* ============================================================
   SCROLL SNAP — light "snap to section" feel without sticky/transforms
   ============================================================ */

/* `proximity` is gentle: the page only snaps when scroll naturally settles
   close to a section start, so manual scrolling feels free. `mandatory`
   would force snap on every scroll event which is jarring. */
html {
  scroll-snap-type: y proximity;
  scroll-padding-top: 80px; /* offset so navbar doesn't cover the snapped section */
}

/* Each top-level section in <main> is a snap point.
   We also add the projects inside .work so each project gets its own snap. */
main > section,
.work .project {
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

/* Mobile: disable snap entirely — finger scrolling on touch is best left alone */
@media (max-width: 820px) {
  html { scroll-snap-type: none; }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-snap-type: none; }
}


/* ============================================================
   ACCESSIBILITY UTILITIES
   ============================================================ */

/* Skip-to-content link — visible only on keyboard focus */
.skip-link {
  position: fixed;
  top: -100px;
  inset-inline-start: 1rem;
  z-index: 10000;
  padding: .75rem 1.25rem;
  background: var(--accent);
  color: var(--accent-ink, #fff);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: .95rem;
  box-shadow: 0 8px 24px -6px rgba(var(--accent-rgb), .55);
  transition: top .2s ease;
}
.skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* Enhanced focus styles for keyboard users */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible,
.nav__cta:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Don't show focus ring on mouse clicks */
:focus:not(:focus-visible) {
  outline: none;
}

/* Screen-reader-only utility class */
.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;
}

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

/* ============================================================
   CASE STUDY PAGES
   ============================================================ */
/* Top nav specific to case study */
.cs-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--nav-blur);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.cs-nav__back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--text-dim);
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  transition: color .2s;
}
.cs-nav__back:hover { color: var(--accent); }
.cs-nav__back svg { width: 16px; height: 16px; }

.cs-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
}
.cs-nav__brand .logo__mark { width: 26px; height: 26px; }
.cs-nav__brand .logo__text { font-size: 1rem; }

.cs-nav__cta {
  background: var(--accent);
  color: var(--accent-ink, #fff);
  padding: .5rem 1.1rem;
  border-radius: 99px;
  font-weight: 700;
  font-size: .85rem;
  text-decoration: none;
  transition: all .2s;
}
.cs-nav__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -2px rgba(var(--accent-rgb), .5);
}

/* Hero */
.cs-hero {
  padding: 4rem 1.5rem 3rem;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(var(--accent-rgb), .12), transparent 70%);
}
.cs-hero__inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.cs-hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.15;
  margin: .75rem 0 1rem;
  letter-spacing: -.01em;
}
.cs-hero h1 .accent { color: var(--accent); }
.cs-hero__sub {
  color: var(--text-dim);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.65;
  max-width: 720px;
  margin: 0 auto 2rem;
}
.cs-hero__sub b { color: var(--text); font-weight: 700; }

/* Meta strip */
.cs-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 1.5rem;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--surface);
  margin-bottom: 3rem;
}
.cs-meta__item {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  text-align: center;
  min-width: 100px;
}
.cs-meta__label {
  color: var(--muted);
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.cs-meta__item strong {
  color: var(--text);
  font-weight: 800;
  font-size: .95rem;
}

/* Cover */
.cs-cover {
  max-width: 900px;
  margin: 0 auto;
}
.cs-cover .browser {
  transform: none;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.4);
}
.cs-cover .browser:hover { transform: scale(1.01); }

/* Sections */
.cs-section {
  padding: 4rem 1.5rem;
}
.cs-section--alt {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}
.cs-section__inner {
  max-width: 980px;
  margin: 0 auto;
}

.cs-block {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 2rem;
  align-items: start;
}
.cs-block__num {
  font-family: 'Tajawal', var(--font);
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  color: var(--accent);
  opacity: .4;
}
.cs-block h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  margin: 0 0 1.25rem;
  line-height: 1.2;
}
.cs-block .cs-lead {
  font-size: 1.15rem;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 1rem;
  line-height: 1.7;
}
.cs-block .cs-lead b { color: var(--accent); font-weight: 800; }
.cs-block p {
  color: var(--text-dim);
  line-height: 1.85;
  margin-bottom: 1rem;
}
.cs-block p strong,
.cs-block p b {
  color: var(--text);
  font-weight: 700;
}

.cs-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.cs-list li {
  padding-inline-start: 2rem;
  position: relative;
  color: var(--text-dim);
  line-height: 1.65;
}
.cs-list li::before {
  content: "→";
  position: absolute;
  inset-inline-start: 0;
  color: var(--accent);
  font-weight: 800;
  font-size: 1.1em;
}
.cs-list strong { color: var(--text); }

/* Steps grid */
.cs-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.cs-step {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: relative;
  transition: transform .3s var(--ease), border-color .3s;
}
.cs-step:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), .4);
}
.cs-step__num {
  position: absolute;
  top: -10px;
  inset-inline-end: 1rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink, #fff);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: .85rem;
  font-family: 'Tajawal', var(--font);
}
.cs-step h3 {
  margin: 0 0 .4rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.cs-step p {
  margin: 0;
  font-size: .88rem;
  color: var(--text-dim);
  line-height: 1.65;
}

/* Features grid */
.cs-feats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.cs-feat {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.cs-feat:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--accent-rgb), .4);
  box-shadow: 0 10px 24px -10px rgba(var(--accent-rgb), .25);
}
.cs-feat__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(var(--accent-rgb), .12);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}
.cs-feat__icon svg { width: 22px; height: 22px; }
.cs-feat h3 {
  margin: 0 0 .4rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.cs-feat p {
  margin: 0;
  font-size: .9rem;
  color: var(--text-dim);
  line-height: 1.65;
}

/* Metrics */
.cs-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.cs-metric {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: transform .3s var(--ease);
}
.cs-metric:hover { transform: translateY(-3px); }
.cs-metric strong {
  display: block;
  font-family: 'Tajawal', var(--font);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900;
  line-height: 1;
  color: var(--accent);
  margin-bottom: .35rem;
}
.cs-metric span {
  display: block;
  font-size: .85rem;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Quote */
.cs-quote {
  margin: 3rem 0 0;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  position: relative;
  border-inline-start: 4px solid var(--accent);
}
.cs-quote svg {
  width: 32px;
  height: 32px;
  color: var(--accent);
  opacity: .5;
  margin-bottom: 1rem;
}
.cs-quote p {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.75;
  margin: 0 0 1rem;
}
.cs-quote footer {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cs-quote footer strong {
  font-weight: 700;
  color: var(--text);
}
.cs-quote footer span {
  font-size: .85rem;
  color: var(--text-dim);
}

/* Tech stack */
.cs-stack {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1.5rem;
}
.cs-stack__item {
  background: var(--surface);
  border: 1px solid var(--line-2);
  padding: .55rem 1rem;
  border-radius: 99px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
  transition: all .2s;
}
.cs-stack__item:hover {
  background: var(--accent);
  color: var(--accent-ink, #fff);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* CTA bottom */
.cs-cta {
  background:
    radial-gradient(60% 50% at 50% 100%, rgba(var(--accent-rgb), .15), transparent 70%),
    var(--bg-2);
  padding: 5rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--line);
}
.cs-cta__inner {
  max-width: 720px;
  margin: 0 auto;
}
.cs-cta h2 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  margin: 0 0 1rem;
  line-height: 1.25;
}
.cs-cta h2 .accent { color: var(--accent); }
.cs-cta p {
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.65;
  margin-bottom: 2rem;
}
.cs-cta__actions {
  display: flex;
  gap: .75rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .cs-block { grid-template-columns: 1fr; gap: .5rem; }
  .cs-block__num { font-size: 3rem; }
  .cs-section { padding: 3rem 1.5rem; }
  .cs-meta { gap: 1rem; padding: 1rem; }
  .cs-meta__item { min-width: 80px; }
  .cs-quote { padding: 1.5rem; }
}

/* ============================================================
   LEGAL PAGES — privacy / terms
   ============================================================ */
.legal {
  max-width: 820px;
  margin: 0 auto;
  padding: 6rem 1.5rem 4rem;
  position: relative;
  z-index: 2;
}
.legal__head {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line-2);
  text-align: center;
}
.legal__back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--text-dim);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 1.25rem;
  transition: color .2s;
}
.legal__back:hover { color: var(--accent); }
.legal__back svg { width: 16px; height: 16px; }

.legal__head h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 .75rem;
}
.legal__head h1 .accent { color: var(--accent); }

.legal__updated {
  display: inline-block;
  color: var(--text-dim);
  font-size: .85rem;
  font-weight: 500;
  padding: .35rem .85rem;
  background: var(--surface-2);
  border-radius: 99px;
}

.legal__body {
  color: var(--text);
  line-height: 1.85;
  font-size: 1rem;
}
.legal__body section {
  margin-bottom: 2.5rem;
}
.legal__body h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: .65rem;
}
.legal__body h2::before {
  content: "";
  width: 4px;
  height: 22px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}
.legal__body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.25rem 0 .5rem;
  color: var(--text);
}
.legal__body p {
  margin: 0 0 1rem;
  color: var(--text-dim);
}
.legal__body strong {
  color: var(--text);
  font-weight: 700;
}
.legal__body ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.legal__body ul li {
  padding-inline-start: 1.6rem;
  position: relative;
  color: var(--text-dim);
  margin-bottom: .65rem;
}
.legal__body ul li::before {
  content: "✓";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  color: var(--accent);
  font-weight: 800;
}
.legal__body a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
  transition: opacity .2s;
}
.legal__body a:hover { opacity: .8; }
.legal__body code {
  font-family: 'Tajawal', monospace;
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: .9em;
  color: var(--accent);
}

.legal__contact {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 2.5rem 0;
}
.legal__contact h3 {
  margin: 0 0 .5rem;
  font-size: 1.05rem;
  color: var(--text);
}
.legal__contact p { margin: 0 0 .25rem; color: var(--text-dim); font-size: .95rem; }
.legal__contact a { word-break: break-all; }

.legal__foot {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line-2);
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  font-size: .9rem;
}
.legal__foot a {
  color: var(--text-dim);
  font-weight: 600;
  text-decoration: none;
  transition: color .2s;
}
.legal__foot a:hover { color: var(--accent); }

@media (max-width: 600px) {
  .legal { padding-top: 4rem; }
  .legal__body h2 { font-size: 1.2rem; }
}

/* ============================================================
   CONTACT FORM — inside CTA section
   ============================================================ */
.cta__divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2.5rem auto 1.5rem;
  max-width: 640px;
  color: var(--text-dim);
  font-size: .85rem;
  font-weight: 600;
}
.cta__divider::before,
.cta__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-2);
}
.cta__divider span {
  padding: 0 .5rem;
  white-space: nowrap;
}

.cform {
  max-width: 640px;
  margin: 0 auto;
  text-align: start;
}
.cform__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 600px) {
  .cform__row { grid-template-columns: 1fr; gap: 0; }
}

.cfield {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: 1rem;
}
.cfield__label {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text);
}
.cfield__label em {
  color: var(--accent);
  font-style: normal;
  margin: 0 .15rem;
}
.cfield input,
.cfield select,
.cfield textarea {
  width: 100%;
  padding: .8rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  color: var(--text);
  font-family: var(--font);
  font-size: .95rem;
  transition: border-color .15s, box-shadow .15s, background .15s;
  resize: vertical;
}
.cfield input::placeholder,
.cfield textarea::placeholder {
  color: var(--muted);
}
.cfield input:hover:not(:focus),
.cfield select:hover:not(:focus),
.cfield textarea:hover:not(:focus) {
  border-color: var(--text-dim);
}
.cfield input:focus,
.cfield select:focus,
.cfield textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .15);
  background: var(--surface);
}
.cfield textarea { min-height: 110px; line-height: 1.6; }

.cfield select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237a857d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: left 1rem center;
  padding-inline-start: 2.5rem;
}

.cfield--invalid input,
.cfield--invalid select,
.cfield--invalid textarea {
  border-color: var(--red);
  background: rgba(255, 106, 106, .05);
}
.cfield__err {
  font-size: .78rem;
  color: var(--red);
  font-weight: 600;
  min-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .2s, transform .2s, min-height .2s;
}
.cfield--invalid .cfield__err {
  opacity: 1;
  transform: translateY(0);
  min-height: 1rem;
}

.cform__actions {
  margin-top: 1.5rem;
  text-align: center;
}
.cform__hint {
  display: block;
  margin-top: .85rem;
  font-size: .78rem;
  color: var(--muted);
}

/* Success state */
.cform.is-success {
  text-align: center;
  padding: 2.5rem 1rem;
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  animation: cformSuccess .4s var(--ease);
}
.cform.is-success > *:not(.cform__success) { display: none; }
.cform__success {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.cform.is-success .cform__success { display: flex; }
.cform__success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(34, 197, 94, .15);
  color: #22c55e;
  display: grid;
  place-items: center;
  animation: cformPop .5s var(--ease);
}
.cform__success-icon svg { width: 32px; height: 32px; }
.cform__success h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
}
.cform__success p {
  margin: 0;
  color: var(--text-dim);
  font-size: .95rem;
}
@keyframes cformSuccess {
  from { opacity: 0; transform: scale(.96); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes cformPop {
  0% { transform: scale(0); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ============================================================
   TESTIMONIALS — social proof cards
   ============================================================ */
.tmonial {
  max-width: var(--container);
  margin: 5rem auto 0;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}
.tmonial__head {
  text-align: center;
  margin-bottom: 3rem;
}
.tmonial__head h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  margin: .75rem 0;
  line-height: 1.2;
}
.tmonial__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
}

.tcard {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.tcard::before {
  content: "❝";
  position: absolute;
  top: -.6rem;
  inset-inline-start: 1.5rem;
  font-size: 4rem;
  line-height: 1;
  color: var(--accent);
  opacity: .25;
  font-family: 'Tajawal', serif;
}
.tcard:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--accent-rgb), .35);
  box-shadow: 0 12px 32px -12px rgba(var(--accent-rgb), .2);
}

.tcard--featured {
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), .08), transparent),
    var(--surface);
  border-color: rgba(var(--accent-rgb), .4);
}
.tcard--featured::before {
  opacity: .5;
}

.tcard__stars {
  margin-bottom: 1rem;
  color: #f59e0b;
  font-size: 1.05rem;
  letter-spacing: 2px;
  display: flex;
  gap: 1px;
}

.tcard__quote {
  flex: 1;
  margin: 0 0 1.5rem 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.85;
  font-weight: 500;
}

.tcard__foot {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-2);
}
.tcard__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, var(--text)));
  color: var(--accent-ink, #fff);
  font-weight: 800;
  font-size: 1.25rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px -2px rgba(var(--accent-rgb), .35);
}
.tcard__person {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.tcard__person strong {
  font-weight: 700;
  font-size: .98rem;
  color: var(--text);
}
.tcard__person span {
  color: var(--text-dim);
  font-size: .82rem;
  margin-top: 2px;
}

.tmonial__foot {
  margin-top: 2.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 1rem;
  font-weight: 500;
}
.tmonial__foot strong {
  color: var(--accent);
  font-weight: 800;
  font-size: 1.15em;
}

@media (max-width: 960px) {
  .tmonial__grid {
    grid-template-columns: 1fr;
    max-width: 540px;
  }
}

/* ============================================================
   PRICING — 3 tiers
   ============================================================ */
.pricing {
  max-width: var(--container);
  margin: 5rem auto 0;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}
.pricing__head {
  text-align: center;
  margin-bottom: 3rem;
}
.pricing__head h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  margin: .75rem 0 1rem;
  line-height: 1.2;
}
.pricing__head p {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto;
}
.pricing__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
}

.ptier {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem 2.25rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.ptier:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--accent-rgb), .35);
  box-shadow: 0 12px 32px -12px rgba(var(--accent-rgb), .2);
}

.ptier--featured {
  background:
    radial-gradient(ellipse at top right, rgba(var(--accent-rgb), .12), transparent 60%),
    var(--surface);
  border-color: rgba(var(--accent-rgb), .55);
  box-shadow: 0 20px 50px -20px rgba(var(--accent-rgb), .35);
  transform: scale(1.03);
}
.ptier--featured:hover {
  transform: scale(1.03) translateY(-4px);
}

.ptier__badge {
  position: absolute;
  top: -12px;
  inset-inline-end: 1.5rem;
  background: var(--accent);
  color: var(--accent-ink, #fff);
  font-size: .72rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 99px;
  letter-spacing: .5px;
  box-shadow: 0 6px 16px -4px rgba(var(--accent-rgb), .55);
}

.ptier__head {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px dashed var(--line-2);
}
.ptier__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: rgba(var(--accent-rgb), .12);
  color: var(--accent);
  margin-bottom: .85rem;
  transition: transform .3s var(--ease);
}
.ptier__icon svg { width: 24px; height: 24px; }
.ptier:hover .ptier__icon { transform: rotate(-6deg) scale(1.05); }
.ptier--featured .ptier__icon {
  background: var(--accent);
  color: var(--accent-ink, #fff);
  box-shadow: 0 8px 20px -6px rgba(var(--accent-rgb), .55);
}
.ptier__name {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: .25rem;
}
.ptier--featured .ptier__name { color: var(--accent); }
.ptier__sub {
  color: var(--muted);
  font-size: .9rem;
  margin: 0;
  line-height: 1.6;
  font-weight: 500;
}
/* Keep readable on featured card */
.ptier--featured .ptier__sub { color: var(--text-dim); }

.ptier__feats {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  flex: 1;
}
.ptier__feats li {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  font-size: .92rem;
  color: var(--text);
  line-height: 1.5;
}
.ptier__feats li.is-muted {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--muted);
  text-decoration-thickness: 1px;
}
.ptier__feats b {
  color: var(--text);
  font-weight: 700;
}
.ptier--featured .ptier__feats b { color: var(--accent); }
.ptier__check {
  width: 20px;
  height: 20px;
  background: rgba(var(--accent-rgb), .15);
  color: var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: .75rem;
  font-weight: 900;
  margin-top: 1px;
}
.ptier__cross {
  width: 20px;
  height: 20px;
  background: var(--surface-2);
  color: var(--muted);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: .75rem;
  font-weight: 900;
  margin-top: 1px;
}

.btn--block { width: 100%; justify-content: center; }

.pricing__foot {
  margin-top: 2.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: .95rem;
}
.pricing__foot b {
  color: var(--text);
  font-weight: 700;
}

@media (max-width: 960px) {
  .pricing__grid {
    grid-template-columns: 1fr;
    max-width: 480px;
  }
  .ptier--featured {
    transform: none;
    order: -1;
  }
  .ptier--featured:hover {
    transform: translateY(-4px);
  }
}

/* ============================================================
   FAQ — accordion section
   ============================================================ */
.faq {
  max-width: 1100px;
  margin: 5rem auto 0;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}
.faq__head {
  text-align: center;
  margin-bottom: 3rem;
}
.faq__head h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  margin: .75rem 0 1rem;
  line-height: 1.2;
}
.faq__head p {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 540px;
  margin: 0 auto;
}
.faq__list {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  max-width: 820px;
  margin: 0 auto;
}
.faq__item {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.faq__item[open] {
  border-color: rgba(var(--accent-rgb), .4);
  box-shadow: 0 8px 24px -10px rgba(var(--accent-rgb), .25);
}
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.15rem 1.5rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background .15s;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover {
  background: var(--surface-2);
}
.faq__q {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  line-height: 1.5;
}
.faq__icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--text-dim);
  transition: transform .3s var(--ease), background .2s, color .2s;
}
.faq__icon svg {
  width: 16px;
  height: 16px;
}
.faq__item[open] .faq__icon {
  transform: rotate(45deg);
  background: var(--accent);
  color: var(--accent-ink, #fff);
}
.faq__a {
  padding: 0 1.5rem 1.4rem;
  color: var(--text-dim);
  line-height: 1.8;
  font-size: .98rem;
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
}
.faq__a p { margin: 0; }
.faq__a b {
  color: var(--text);
  font-weight: 700;
}
.faq__foot {
  margin-top: 2.5rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.faq__foot span {
  color: var(--text-dim);
  font-size: 1rem;
  font-weight: 500;
}

@media (max-width: 640px) {
  .faq { margin-top: 3.5rem; }
  .faq__item summary { padding: 1rem 1.1rem; gap: .85rem; }
  .faq__q { font-size: .95rem; }
  .faq__a { padding: 1rem 1.1rem 1.2rem; font-size: .92rem; }
}

/* ============================================================
   SPLASH SCREEN — first paint loading screen
   ============================================================ */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: grid;
  place-items: center;
  pointer-events: none;
  transition: opacity .6s var(--ease), visibility .6s var(--ease);
}
.splash::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 50% 50%, rgba(var(--accent-rgb), .12), transparent 70%);
}
.splash__content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: splashFloat 2s var(--ease) infinite alternate;
}
.splash__logo {
  width: 64px;
  height: 64px;
  color: var(--text);
}
.splash__c {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: splashDraw 1.2s var(--ease) forwards;
}
.splash__dot {
  opacity: 0;
  transform-origin: center;
  animation: splashDot .4s var(--ease) 1s forwards;
}
.splash__word {
  font-family: var(--font);
  font-weight: 800;
  font-size: 2.5rem;
  letter-spacing: -.02em;
  color: var(--text);
  opacity: 0;
  transform: translateX(-12px);
  animation: splashWord .6s var(--ease) 1.1s forwards;
}
.splash__bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--text)));
  animation: splashBar 1.6s var(--ease) forwards;
}
.splash.is-leaving {
  opacity: 0;
  visibility: hidden;
}
.splash.is-leaving .splash__content {
  animation: splashExit .5s var(--ease) forwards;
}
@keyframes splashDraw {
  to { stroke-dashoffset: 0; }
}
@keyframes splashDot {
  0%   { opacity: 0; transform: scale(0); }
  60%  { transform: scale(1.4); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes splashWord {
  to { opacity: 1; transform: translateX(0); }
}
@keyframes splashBar {
  to { width: 100%; }
}
@keyframes splashFloat {
  from { transform: translateY(0); }
  to   { transform: translateY(-6px); }
}
@keyframes splashExit {
  to { transform: scale(.92); opacity: 0; }
}

/* Lock body scroll while splash visible */
body.is-loading {
  overflow: hidden;
}

/* Skip splash for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .splash__c,
  .splash__dot,
  .splash__word,
  .splash__bar,
  .splash__content {
    animation: none !important;
  }
  .splash__c { stroke-dashoffset: 0; }
  .splash__dot,
  .splash__word { opacity: 1; transform: none; }
}

/* ============================================================
   CUSTOM CURSOR — desktop only
   ============================================================ */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9998;
  display: none;
  --cursor-color: var(--text);
}
@media (hover: hover) and (pointer: fine) {
  .cursor.is-active { display: block; }
  /* Hide system cursor only when ours is active */
  body.cursor-active,
  body.cursor-active a,
  body.cursor-active button,
  body.cursor-active [role="button"],
  body.cursor-active input,
  body.cursor-active textarea,
  body.cursor-active select,
  body.cursor-active label { cursor: none !important; }
}
.cursor__dot,
.cursor__ring,
.cursor__label {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
}
.cursor__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cursor-color);
  transition: width .2s var(--ease), height .2s var(--ease), opacity .2s;
  will-change: transform;
}
.cursor__ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--cursor-color);
  border-radius: 50%;
  transition: width .25s var(--ease), height .25s var(--ease),
              border-color .2s, background .2s, opacity .2s, border-radius .2s;
  will-change: transform;
}
.cursor__label {
  font-family: var(--font);
  font-size: .72rem;
  font-weight: 700;
  color: var(--accent-ink, #fff);
  background: var(--accent);
  padding: 4px 12px;
  border-radius: 99px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .2s;
  box-shadow: 0 4px 12px -4px rgba(0,0,0,.3);
  will-change: transform;
}

/* States */
.cursor.is-link .cursor__ring {
  width: 52px;
  height: 52px;
  background: rgba(var(--accent-rgb), .15);
  border-color: var(--accent);
}
.cursor.is-link .cursor__dot {
  width: 0;
  height: 0;
  opacity: 0;
}
.cursor.has-label .cursor__label {
  opacity: 1;
}
.cursor.is-text .cursor__ring {
  width: 3px;
  height: 28px;
  border-radius: 2px;
  border-width: 0;
  background: var(--cursor-color);
}
.cursor.is-text .cursor__dot { opacity: 0; }
.cursor.is-pressed .cursor__ring {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), .25);
}
.cursor.is-hidden .cursor__ring,
.cursor.is-hidden .cursor__dot,
.cursor.is-hidden .cursor__label { opacity: 0; }

/* ============================================================
   MAGNETIC BUTTONS — smooth follow-cursor effect
   ============================================================ */
.magnetic {
  display: inline-flex;
  transition: transform .3s var(--ease);
  will-change: transform;
}
.magnetic > * {
  display: inline-flex;
  align-items: center;
  gap: inherit;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .magnetic { transform: none !important; }
}
