/* ============================================================
   ERYVA — Flowing Ideas, Real Impact.
   Design system · dark, flowing, bilingual (LTR/RTL)
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* brand palette */
  --bg-0: #080B14;      /* deep black — page ground */
  --bg-1: #0C1220;      /* surface step */
  --bg-2: #101731;      /* raised surface (midnight blue) */
  --ink: #F5F6FA;       /* primary ink */
  --ink-2: #A9B1C7;     /* secondary ink */
  --ink-3: #7D85A0;     /* faint ink (captions only) */
  --purple: #9254FF;
  --blue: #526BFF;
  --cyan: #36D7FF;
  --grad: linear-gradient(118deg, var(--purple) 0%, var(--blue) 52%, var(--cyan) 100%);
  --grad-soft: linear-gradient(118deg, rgba(146,84,255,.16), rgba(50,134,255,.12) 52%, rgba(54,215,255,.10));

  /* type */
  --font-display: 'Manrope', 'Vazirmatn', sans-serif;
  --font-body: 'Inter', 'Vazirmatn', sans-serif;
  --font-accent: 'Space Grotesk', sans-serif;

  /* rhythm */
  --gutter: clamp(20px, 4.5vw, 64px);
  --content: 1280px;
  --wide: 1480px;
  --sec-pad: clamp(96px, 13vh, 176px);

  /* motion */
  --ease-out: cubic-bezier(.22, .61, .2, 1);
  --dur: .7s;
}

/* RTL pages keep brand look, switch faces */
[dir="rtl"] {
  --font-display: 'Vazirmatn', sans-serif;
  --font-body: 'Vazirmatn', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background:
    linear-gradient(180deg, rgba(8, 11, 20, .68), rgba(8, 11, 20, .82)),
    url('../img/background.jpg') center / cover no-repeat fixed #080B14;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(16px, 1.05vw, 18px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg, canvas, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

::selection { background: var(--blue); color: #fff; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.025em;
  text-wrap: balance;
}
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 {
  letter-spacing: 0;
  line-height: 1.22;
}

/* ---------- Layout primitives ---------- */
.container {
  width: min(var(--content), 100% - var(--gutter) * 2);
  margin-inline: auto;
}
.container--wide {
  width: min(var(--wide), 100% - var(--gutter) * 2);
}
.section { padding-block: var(--sec-pad); position: relative; }

/* headings inside sections */
.sec-head { max-width: 720px; margin-bottom: clamp(48px, 7vh, 88px); }
.sec-head h2 {
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  margin-bottom: 18px;
}
.sec-head p { color: var(--ink-2); font-size: clamp(16px, 1.15vw, 19px); max-width: 56ch; }

/* gradient text — brand device (logo/brand requires gradient) */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: clamp(10px, .75vw + 6px, 15px) clamp(18px, 1.5vw + 8px, 30px);
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(13.5px, .35vw + 9px, 16px);
  letter-spacing: -.01em;
  white-space: nowrap;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .35s, background-color .35s;
  will-change: transform;
}
[dir="rtl"] .btn { font-weight: 700; }
.btn--primary {
  background: var(--grad);
  color: #fff;
}
.btn--primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.12);
}
.btn--ghost {
  border: 1.5px solid rgba(245, 246, 250, .22);
  color: var(--ink);
}
.btn--ghost:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
}
.btn .arrow { transition: transform .35s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }
[dir="rtl"] .btn:hover .arrow { transform: translateX(-4px) scaleX(-1); }
[dir="rtl"] .arrow { transform: scaleX(-1); }
.btn--sm { padding: clamp(8px, .55vw + 4px, 11px) clamp(14px, 1.1vw + 6px, 22px); font-size: clamp(13px, .3vw + 8.5px, 15px); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 90;
  transition: background-color .4s, box-shadow .4s;
}
.nav::after {
  /* tone step once scrolled (no hairline) */
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 11, 20, .0);
  transition: background-color .4s;
  z-index: -1;
}
.nav.is-scrolled::after { background: rgba(8, 11, 20, .92); }
.nav__inner {
  width: min(var(--wide), 100% - var(--gutter) * 2);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 48px);
  padding-block: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-inline-end: auto;
}
.brand__logo { height: 38px; width: auto; display: block; }
.brand__word {
  font-family: var(--font-accent);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -.02em;
  line-height: 1;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 34px);
  list-style: none;
  padding: 0;
}
.nav__link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--ink-2);
  transition: color .3s;
  position: relative;
  padding-block: 6px;
}
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--ink); }
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset-inline: 8px;
  bottom: -2px;
  height: 3px;
  border-radius: 3px;
  background: var(--grad);
}

/* dropdown */
.drop { position: relative; }
.drop__panel {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-start: 50%;
  translate: -50% 0;
  min-width: 300px;
  background: var(--bg-2);
  border-radius: 20px;
  padding: 10px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .7);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out), visibility 0s .3s;
}
.drop.is-open .drop__panel,
.drop:hover .drop__panel, .drop:focus-within .drop__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}
.drop__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--ink-2);
  transition: background-color .25s, color .25s;
  white-space: nowrap;
}
.drop__item:hover { background: rgba(245,246,250,.06); color: var(--ink); }
.drop__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

.nav__cta { display: flex; align-items: center; gap: 14px; }
.lang-switch {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(12.5px, .25vw + 8px, 14px);
  color: var(--ink-2);
  border: 1.5px solid rgba(245, 246, 250, .18);
  border-radius: 999px;
  padding: clamp(6px, .5vw + 3px, 8px) clamp(11px, .8vw + 5px, 14px);
  transition: color .3s, border-color .3s;
  white-space: nowrap;
}
.lang-switch:hover { color: var(--cyan); border-color: var(--cyan); }

/* burger — three gradient strokes echoing the wing mark */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 7px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  z-index: 95;
  transition: transform .3s var(--ease-out);
}
.burger:active { transform: scale(.9); }
.burger span {
  height: 3px;
  border-radius: 999px;
  background: var(--grad);
  transition: transform .55s cubic-bezier(.68, -.35, .3, 1.35), opacity .3s, width .35s var(--ease-out);
  will-change: transform;
}
.burger span:nth-child(1) { width: 26px; }
.burger span:nth-child(2) { width: 17px; }
.burger span:nth-child(3) { width: 26px; }
.burger:hover span:nth-child(1) { transform: translateX(-3px); }
.burger:hover span:nth-child(2) { transform: translateX(5px); }
.burger:hover span:nth-child(3) { transform: translateX(-2px); }
[dir="rtl"] .burger { align-items: flex-start; }
[dir="rtl"] .burger:hover span:nth-child(1) { transform: translateX(3px); }
[dir="rtl"] .burger:hover span:nth-child(2) { transform: translateX(-5px); }
[dir="rtl"] .burger:hover span:nth-child(3) { transform: translateX(2px); }
.burger.is-open span:nth-child(1) { width: 26px; transform: translateY(10px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; transform: translateX(-18px) scale(.3); }
.burger.is-open span:nth-child(3) { width: 26px; transform: translateY(-10px) rotate(-45deg); }
[dir="rtl"] .burger.is-open span:nth-child(2) { transform: translateX(18px) scale(.3); }

/* mobile drawer — sits under the nav bar so the burger stays visible/clickable */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 89;
  background: var(--bg-0);
  padding: 104px var(--gutter) 44px;
  display: none;
  flex-direction: column;
  overflow: clip;
}
.drawer::before {
  content: "";
  position: absolute;
  top: -18%;
  inset-inline-end: -35%;
  width: 80vw;
  height: 52vh;
  background: radial-gradient(50% 50% at 50% 50%, rgba(146, 84, 255, .17), transparent 70%);
  pointer-events: none;
}
.drawer::after {
  content: "Eryva";
  position: absolute;
  bottom: -2%;
  inset-inline-start: 50%;
  translate: -50% 0;
  font-family: var(--font-accent);
  font-weight: 700;
  font-size: clamp(64px, 18vw, 130px);
  line-height: .8;
  letter-spacing: -.02em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: .13;
  pointer-events: none;
  user-select: none;
}
.drawer.is-open { display: flex; }
.drawer__menu {
  width: 100%;
  max-width: 470px;
  margin: 4px auto 0;
  display: grid;
  gap: 14px;
}
/* Neon glass menu card — pure CSS recreation of the brand menu-bar artwork */
.drawer__card {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(14px, 4vw, 20px);
  padding: 17px clamp(20px, 5.5vw, 28px);
  border-radius: 26px;
  text-decoration: none;
  border: 2px solid transparent;
  background:
    linear-gradient(118deg, rgba(58, 18, 104, .95) 0%, rgba(16, 26, 64, .96) 45%, rgba(12, 36, 96, .96) 100%) padding-box,
    linear-gradient(115deg, #B02BFF 0%, #7A3BFF 28%, #2E63FF 60%, #19C2FF 100%) border-box;
  box-shadow:
    -16px 0 30px -16px rgba(146, 40, 255, .3),
    16px 0 36px -14px rgba(24, 116, 255, .6),
    0 12px 44px -12px rgba(24, 60, 255, .5),
    inset 0 1px 0 rgba(190, 215, 255, .4),
    inset 0 -10px 26px -14px rgba(0, 4, 20, .9);
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .5s var(--ease-out), transform .55s cubic-bezier(.22, .61, .2, 1),
              box-shadow .35s var(--ease-out);
}
.drawer.is-open .drawer__card { opacity: 1; transform: none; }
.drawer.is-open .drawer__card:nth-of-type(1) { transition-delay: .07s; }
.drawer.is-open .drawer__card:nth-of-type(2) { transition-delay: .13s; }
.drawer.is-open .drawer__card:nth-of-type(3) { transition-delay: .19s; }
.drawer.is-open .drawer__card:nth-of-type(4) { transition-delay: .25s; }
.drawer.is-open .drawer__card:hover {
  transform: translateY(-3px);
  transition-delay: 0s;
  box-shadow:
    -16px 0 34px -16px rgba(160, 55, 255, .38),
    16px 0 40px -12px rgba(30, 130, 255, .75),
    0 16px 52px -12px rgba(30, 70, 255, .6),
    inset 0 1px 0 rgba(200, 225, 255, .5),
    inset 0 -10px 26px -14px rgba(0, 4, 20, .9);
}
.drawer__card:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; border-radius: 26px; }
.drawer__card[aria-current="page"] { filter: brightness(1.12); }
.drawer__card .menu-card__icon {
  flex: none;
  width: clamp(38px, 10vw, 46px);
  height: clamp(38px, 10vw, 46px);
  filter: drop-shadow(0 0 7px rgba(150, 70, 255, .75)) drop-shadow(0 0 16px rgba(40, 110, 255, .45));
}
.drawer__card .menu-card__icon svg { width: 100%; height: 100%; display: block; }
.drawer__card .menu-card__divider {
  flex: none;
  width: 2px;
  align-self: stretch;
  margin-block: 5px;
  border-radius: 2px;
  background: linear-gradient(180deg, #C05AFF, #3E6CFF 70%, #2FB9FF);
  box-shadow: 0 0 10px rgba(140, 80, 255, .7);
}
.drawer__card .menu-card__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-align: center;
}
.drawer__card .menu-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 5.5vw, 25px);
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: .01em;
}
.drawer__card .menu-card__sub {
  font-family: var(--font-body, var(--font-display));
  font-weight: 500;
  font-size: clamp(12px, 3.4vw, 14.5px);
  line-height: 1.35;
  color: #9FB6E9;
}
[dir="rtl"] .drawer__card {
  flex-direction: row-reverse;
  box-shadow:
    16px 0 30px -16px rgba(146, 40, 255, .3),
    -16px 0 36px -14px rgba(24, 116, 255, .6),
    0 12px 44px -12px rgba(24, 60, 255, .5),
    inset 0 1px 0 rgba(190, 215, 255, .4),
    inset 0 -10px 26px -14px rgba(0, 4, 20, .9);
}
[dir="rtl"] .drawer.is-open .drawer__card:hover {
  box-shadow:
    16px 0 34px -16px rgba(160, 55, 255, .38),
    -16px 0 40px -12px rgba(30, 130, 255, .75),
    0 16px 52px -12px rgba(30, 70, 255, .6),
    inset 0 1px 0 rgba(200, 225, 255, .5),
    inset 0 -10px 26px -14px rgba(0, 4, 20, .9);
}
.drawer__foot { margin-top: auto; display: flex; gap: 12px; align-items: center; position: relative; z-index: 1; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: clamp(96px, 12vh, 150px);
  overflow: clip;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0;
  transition: opacity .9s ease .15s;
}
.hero__canvas.is-on { opacity: 1; }
.hero::before {
  content: "";
  position: absolute;
  inset-inline-end: 2%;
  top: 15%;
  width: 42%;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(146, 84, 255, .32), rgba(82, 107, 255, .15) 55%, transparent 75%);
  z-index: 0;
  pointer-events: none;
  filter: blur(8px);
}
.hero__infinity {
  position: absolute;
  inset-inline-end: 0;
  top: 13%;
  width: min(46%, 700px);
  aspect-ratio: 1;
  z-index: 1;
  pointer-events: none;
  animation: heroFloat 12s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes heroFloat {
  from { transform: translateY(-1.2%) rotate(.3deg); }
  to   { transform: translateY(1.6%) rotate(-.35deg); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__infinity { animation: none; }
}
@media (max-width: 1080px) {
  .hero__infinity { width: 64%; inset-inline-end: -4%; }
  .hero::before { width: 58%; }
}
@media (max-width: 768px) {
  .hero__infinity {
    width: 108%;
    inset-inline-end: -12%;
    top: 3%;
    opacity: .85;
    filter: blur(10px) saturate(1.05);
    scale: 1.1; /* hides blur edge fringing inside the clipped hero */
  }
  .hero::before { width: 100%; top: 6%; filter: blur(20px); }
}
.hero__vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(120% 90% at 78% 30%, transparent 38%, var(--bg-0) 88%),
    linear-gradient(180deg, rgba(8,11,20,.2), transparent 30%, var(--bg-0) 96%);
  pointer-events: none;
}
[dir="rtl"] .hero__vignette {
  background:
    radial-gradient(120% 90% at 22% 30%, transparent 38%, var(--bg-0) 88%),
    linear-gradient(180deg, rgba(8,11,20,.2), transparent 30%, var(--bg-0) 96%);
}
.hero__inner {
  position: relative;
  z-index: 3;
  width: min(var(--wide), 100% - var(--gutter) * 2);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 4.5vh, 56px);
}
.hero__inner + .hero__inner { margin-top: clamp(30px, 5.5vh, 64px); }
.hero__eyebrow {
  font-family: var(--font-accent);
  font-size: clamp(11px, .9vw, 13px);
  font-weight: 500;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: clamp(16px, 2.4vh, 28px);
}
[dir="rtl"] .hero__eyebrow {
  font-family: var(--font-display);
  letter-spacing: .1em;
  font-size: clamp(12.5px, 1vw, 14.5px);
}
.hero__lockup {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 30px);
}
.hero__logo {
  width: clamp(240px, 26vw, 380px);
  height: auto;
  filter: drop-shadow(0 14px 60px rgba(82, 107, 255, .35));
}
.hero h1 {
  font-size: clamp(2.4rem, 5.6vw, 4.6rem);
  max-width: 14ch;
}
[dir="rtl"] .hero h1 { max-width: 20ch; }
.hero__sub {
  margin-top: 22px;
  color: var(--ink-2);
  font-size: clamp(16px, 1.25vw, 20px);
  max-width: 52ch;
}
.hero__actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* pillar strip inside hero */
.pillars {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding-bottom: clamp(14px, 2.5vh, 28px);
}
.pillar {
  background: rgba(16, 23, 49, .55);
  border-radius: 22px;
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  transition: background-color .35s, transform .45s var(--ease-out);
}
.pillar:hover {
  background: rgba(16, 23, 49, .92);
  transform: translateY(-4px);
}
.pillar__icon {
  display: block;
  height: 72px;
  margin-bottom: 14px;
}
.pillar__icon img {
  height: 72px;
  width: auto;
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent 99%);
          mask-image: radial-gradient(closest-side, #000 55%, transparent 99%);
}
.pillar__body { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.pillar__title { font-size: 18px; font-weight: 800; font-family: var(--font-display); letter-spacing: -.01em; }
[dir="rtl"] .pillar__title { letter-spacing: 0; }
.pillar__tag { color: var(--ink-2); font-size: 13.5px; margin-top: 5px; line-height: 1.45; }
.pillar__go {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  background: rgba(245,246,250,.06);
  transition: background-color .3s, color .3s, transform .35s var(--ease-out);
}
.pillar:hover .pillar__go { background: var(--grad); color: #fff; transform: translateX(3px); }
[dir="rtl"] .pillar:hover .pillar__go { transform: translateX(-3px); }
[dir="rtl"] .pillar__go svg { transform: scaleX(-1); }

.scroll-cue {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--ink-2);
  font-size: 13.5px;
  padding-bottom: clamp(12px, 2vh, 20px);
  margin-top: clamp(-24px, -2.5vh, -10px);
  animation: heroIn 1s var(--ease-out) 1.05s both;
}
.scroll-cue__line {
  position: relative;
  width: 3px;
  height: 48px;
  border-radius: 3px;
  background: rgba(245, 246, 250, .28);
  overflow: hidden;
}
.scroll-cue__box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: cueFloat 3.6s ease-in-out infinite;
}
.scroll-cue__mouse {
  position: relative;
  width: 44px;
  height: 66px;
  color: #E9ECF5;
  filter: drop-shadow(0 4px 18px rgba(82, 107, 255, .35));
}
.scroll-cue__mouse svg { width: 100%; height: 100%; display: block; }
.scroll-cue__slot {
  position: absolute;
  left: 50%;
  top: 15px;
  width: 5px;
  height: 17px;
  margin-left: -2.5px;
  border-radius: 4px;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(54, 215, 255, .75);
  animation: slotFlow 2.2s cubic-bezier(.45, .05, .55, .95) infinite;
}
@keyframes slotFlow {
  0%   { transform: translateY(0); opacity: 0; }
  18%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(17px); opacity: 0; }
}
.scroll-cue__text {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
}
@keyframes cueFloat {
  0%, 100% { transform: translateY(-3px); }
  50%      { transform: translateY(3px); }
}
  50% { opacity: 1; }
}
.scroll-cue__dot {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  width: 5px;
  height: 16px;
  border-radius: 4px;
  background: var(--grad);
  box-shadow: 0 0 14px rgba(54, 215, 255, .75);
  animation: cueFlow 2s var(--ease-out) infinite;
}

/* ---------- hero entrance (pure CSS — always completes) ---------- */
@keyframes heroIn {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
@keyframes navIn {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: none; }
}
.hero__eyebrow { animation: heroIn .9s var(--ease-out) .05s both; }
.hero__lockup { animation: heroIn .9s var(--ease-out) .16s both; }
.hero h1 { animation: heroIn .9s var(--ease-out) .3s both; }
.hero__sub { animation: heroIn .9s var(--ease-out) .45s both; }
.hero__actions { animation: heroIn .9s var(--ease-out) .58s both; }
.pillars { animation: heroIn .9s var(--ease-out) .72s both; }
.nav__inner { animation: navIn .8s var(--ease-out) both; }
@keyframes cueFlow {
  0%   { top: -14px; opacity: 0; }
  22%  { opacity: 1; }
  72%  { opacity: 1; }
  100% { top: 46px; opacity: 0; }
}

/* ---------- Home: solutions editorial rows ---------- */
.sol-rows { display: flex; flex-direction: column; gap: clamp(20px, 3vh, 32px); }
.sol-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  background: var(--bg-1);
  border-radius: 28px;
  padding: clamp(26px, 3.6vw, 48px);
  transition: background-color .4s, transform .5s var(--ease-out);
}
.sol-row:nth-child(even) {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  background: var(--bg-2);
}
.sol-row:nth-child(even) .sol-row__intro { order: 2; }
.sol-row:hover { transform: translateY(-4px); }
.sol-row__icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: var(--grad-soft);
  color: var(--cyan);
  margin-bottom: 22px;
}
.sol-row__icon svg { width: 26px; height: 26px; }
.sol-row__intro h3 {
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  margin-bottom: 12px;
}
.sol-row__intro p { color: var(--ink-2); max-width: 40ch; }
.sol-row__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--cyan);
  font-size: 15.5px;
}
.sol-row__more .arrow { transition: transform .3s var(--ease-out); }
.sol-row__more:hover .arrow { transform: translateX(4px); }
[dir="rtl"] .sol-row__more .arrow { transform: scaleX(-1); }
[dir="rtl"] .sol-row__more:hover .arrow { transform: translateX(-4px) scaleX(-1); }
.sol-row__list { list-style: none; padding: 0; display: grid; gap: 2px; }
.sol-row__list li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding-block: 11px;
  color: var(--ink);
  font-size: 16px;
}
.sol-row__list li + li { border-top: 0; }
.sol-row__list li::before {
  content: "";
  flex: none;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--grad);
  translate: 0 -1px;
}
.sol-row__list li span { color: var(--ink-2); font-size: 14.5px; }

/* ---------- Advantages ---------- */
.adv {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.adv__statement {
  font-size: clamp(1.35rem, 2.2vw, 2.25rem);
  line-height: 1.45;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: -.015em;
  max-width: 24ch;
}
[dir="rtl"] .adv__statement { max-width: 28ch; line-height: 1.8; }
.adv__stack { display: flex; flex-direction: column; gap: 16px; }
.adv__item {
  background: var(--bg-1);
  border-radius: 24px;
  padding: clamp(24px, 3vw, 36px);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
}
.adv__item:nth-child(2) { margin-inline-start: clamp(0px, 4vw, 56px); }
.adv__item:nth-child(3) { margin-inline-start: clamp(0px, 8vw, 112px); }
.adv__num {
  font-family: var(--font-accent);
  font-weight: 700;
  font-size: 15px;
  color: var(--cyan);
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--grad-soft);
  white-space: nowrap;
}
.adv__item h3 { font-size: 19px; margin-bottom: 8px; }
.adv__item p { color: var(--ink-2); font-size: 16px; }

/* ---------- Process ---------- */
.process { background: var(--bg-1); }
.process ol {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 36px);
  counter-reset: step;
}
.process li {
  position: relative;
  padding-top: 26px;
  counter-increment: step;
}
.process li::before {
  /* the flowing current: gradient connector */
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: var(--grad);
  opacity: calc(.25 + .75 * var(--i, 1));
}
.process li::after {
  content: "";
  position: absolute;
  top: -2.5px;
  inset-inline-start: 0;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--grad);
}
.process h3 {
  font-size: 20px;
  margin-block: 14px 10px;
}
.process p { color: var(--ink-2); font-size: 15.5px; }

/* ---------- Solution builder (live thing) ---------- */
.builder {
  background:
    radial-gradient(90% 130% at 85% 0%, rgba(146,84,255,.14), transparent 55%),
    radial-gradient(70% 120% at 10% 100%, rgba(54,215,255,.08), transparent 55%),
    var(--bg-2);
  border-radius: 32px;
  padding: clamp(32px, 5vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.builder h2 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); margin-bottom: 14px; }
.builder__lead { color: var(--ink-2); max-width: 46ch; margin-bottom: 30px; }
.builder__chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  border: 1.5px solid rgba(245,246,250,.2);
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 15.5px;
  color: var(--ink-2);
  transition: border-color .3s, color .3s, background-color .3s, transform .3s var(--ease-out);
}
.chip:hover { color: var(--ink); transform: translateY(-2px); }
.chip[aria-pressed="true"] {
  border-color: transparent;
  background: var(--grad);
  color: #fff;
}
.builder__result {
  background: rgba(8, 11, 20, .55);
  border-radius: 24px;
  padding: clamp(24px, 3vw, 40px);
}
.builder__result h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--cyan);
  font-family: var(--font-display);
  margin-bottom: 16px;
}
.builder__out { list-style: none; padding: 0; display: grid; gap: 12px; margin-bottom: 26px; min-height: 96px; align-content: start; }
.builder__out li { display: flex; gap: 12px; align-items: baseline; font-size: 16px; }
.builder__out li::before {
  content: "";
  flex: none;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--grad);
}
.builder__out li span { color: var(--ink-2); font-size: 14px; }
.builder__empty { color: var(--ink-3); font-size: 15px; }

/* ---------- Agent-flow UI fragment (services) ---------- */
.flow-ui {
  margin-top: 4px;
  background: #0A0F1E;
  border-radius: 18px;
  padding: 18px 22px 22px;
}
.flow-ui__bar {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 16px;
}
.flow-ui__bar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--grad); flex: none; }
.flow-ui__lane { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.flow-node {
  background: var(--bg-2);
  border-radius: 12px;
  padding: 10px 15px;
  font-size: 13.5px;
  line-height: 1.35;
  display: flex;
  gap: 9px;
  align-items: center;
}
.flow-node i { font-style: normal; color: var(--ink-3); }
.flow-node em { font-style: normal; display: block; font-size: 12px; color: var(--ink-3); }
.flow-link { color: var(--cyan); font-size: 15px; flex: none; }

/* ---------- Media band (client's own brand imagery) ---------- */
.media-band {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 16px;
  align-items: stretch;
}
.media-band__stack { display: grid; gap: 16px; align-content: stretch; }
.media-band figure { margin: 0; border-radius: 24px; overflow: hidden; background: var(--bg-2); }
.media-band img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-band__main img { aspect-ratio: 16 / 10.6; }
.media-band__stack img { aspect-ratio: 16 / 6.9; }
.media-cap {
  color: var(--ink-3);
  font-size: 13.5px;
  margin-top: 14px;
}
.media-band--single { grid-template-columns: 1fr; }
.media-band--single img { aspect-ratio: 21 / 9; }
@media (max-width: 768px) {
  .media-band, .media-band--single { grid-template-columns: 1fr; }
  .media-band__main img, .media-band__stack img, .media-band--single img { aspect-ratio: 16 / 10; }
}

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  max-width: 16ch;
  margin-inline: auto;
  margin-bottom: 28px;
}
[dir="rtl"] .cta-band h2 { max-width: 22ch; }
.cta-band p { color: var(--ink-2); max-width: 52ch; margin: 0 auto 36px; font-size: 17px; }
.cta-band .hero__actions { justify-content: center; margin-top: 0; }

/* ---------- Page hero (subpages) ---------- */
.page-hero {
  padding-top: clamp(150px, 20vh, 220px);
  padding-bottom: clamp(56px, 9vh, 110px);
  position: relative;
  overflow: clip;
}
.page-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .5;
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 3; }
.page-hero h1 {
  font-size: clamp(2.1rem, 6vw, 4.8rem);
  max-width: 18ch;
}
[dir="rtl"] .page-hero h1 { max-width: 24ch; }
.page-hero__sub {
  margin-top: 22px;
  color: var(--ink-2);
  font-size: clamp(16px, 1.2vw, 19px);
  max-width: 58ch;
}

/* ---------- Services page ---------- */
.svc {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.svc__intro { position: sticky; top: 120px; }
.svc__intro .icon {
  width: 56px; height: 56px;
  border-radius: 18px;
  background: var(--grad-soft);
  color: var(--cyan);
  display: grid; place-items: center;
  margin-bottom: 22px;
}
.svc__intro .icon svg { width: 28px; height: 28px; }
.svc__intro h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); margin-bottom: 14px; }
.svc__intro p { color: var(--ink-2); max-width: 38ch; }
.svc__body { display: grid; gap: 6px; }
.svc-card {
  background: transparent;
  border-radius: 18px;
  padding: clamp(20px, 2.4vw, 30px) clamp(18px, 2vw, 28px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 24px;
  align-items: baseline;
  transition: background-color .3s, transform .35s var(--ease-out);
}
.svc-card:hover { background: rgba(245, 246, 250, .05); transform: translateX(6px); }
[dir="rtl"] .svc-card:hover { transform: translateX(-6px); }
.svc-card h3 { font-size: 18.5px; }
.svc-card p { grid-column: 1 / -1; color: var(--ink-2); font-size: 16px; max-width: 76ch; }
.svc-card .tools {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.tool {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  background: rgba(245,246,250,.06);
  padding: 6px 13px;
  border-radius: 999px;
}

/* ---------- About page ---------- */
.story { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 88px); align-items: start; }
.story__text p { color: var(--ink-2); margin-bottom: 20px; font-size: clamp(16px, 1.15vw, 18.5px); }
.story__text p strong { color: var(--ink); font-weight: 700; }
.story__panel {
  background: var(--bg-1);
  border-radius: 28px;
  padding: clamp(26px, 3vw, 44px);
  display: grid;
  gap: 26px;
}
.story__panel .row { display: grid; gap: 6px; }
.story__panel .row h3 { font-size: 15px; color: var(--cyan); font-family: var(--font-display); }
.story__panel .row p { color: var(--ink-2); font-size: 15.5px; }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.value {
  background: var(--bg-1);
  border-radius: 24px;
  padding: clamp(24px, 3vw, 40px);
  transition: background-color .35s, transform .45s var(--ease-out);
}
.value:hover { background: var(--bg-2); transform: translateY(-5px); }
.value .icon { width: 44px; height: 44px; color: var(--cyan); margin-bottom: 20px; }
.value .icon svg { width: 100%; height: 100%; }
.value h3 { font-size: 19px; margin-bottom: 10px; }
.value p { color: var(--ink-2); font-size: 15.5px; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
}
.form { display: grid; gap: 20px; }
.form .field { display: grid; gap: 8px; }
.form label { font-weight: 700; font-family: var(--font-display); font-size: 15px; }
.form input, .form textarea, .form select {
  background: var(--bg-1);
  border: 1.5px solid transparent;
  border-radius: 16px;
  padding: 15px 18px;
  transition: border-color .3s, background-color .3s;
  width: 100%;
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--bg-2);
}
.form textarea { min-height: 140px; resize: vertical; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form__note { color: var(--ink-3); font-size: 13.5px; }
.contact-side { display: grid; gap: 16px; }
.contact-side .card {
  background: var(--bg-1);
  border-radius: 22px;
  padding: 28px;
}
.contact-side .card h3 { font-size: 16px; margin-bottom: 8px; }
.contact-side .card p, .contact-side .card a { color: var(--ink-2); font-size: 16px; }
.contact-side .card a.mail { color: var(--cyan); font-weight: 700; font-size: 17px; }
.contact-side .card a.mail:hover { text-decoration: underline; }
.socials { display: flex; gap: 10px; margin-top: 14px; }
.socials a {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(245,246,250,.06);
  color: var(--ink-2);
  transition: background-color .3s, color .3s, transform .3s var(--ease-out);
}
.socials a:hover { background: var(--grad); color: #fff; transform: translateY(-3px); }
.socials svg { width: 18px; height: 18px; }

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-1);
  padding-top: clamp(64px, 9vh, 110px);
  overflow: clip;
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 2fr) minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(28px, 4vw, 56px);
  padding-bottom: clamp(48px, 7vh, 80px);
}
.footer__about p { color: var(--ink-2); font-size: 16px; max-width: 34ch; margin-top: 16px; }
.footer h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-3);
  font-family: var(--font-display);
  margin-bottom: 16px;
  letter-spacing: .02em;
}
.footer ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.footer ul a { color: var(--ink-2); font-size: 15.5px; transition: color .3s; }
.footer ul a:hover { color: var(--cyan); }
.footer__word {
  display: block;
  width: clamp(280px, 42vw, 620px);
  height: auto;
  margin-inline: auto;
  padding-block: clamp(20px, 4vw, 44px);
  user-select: none;
}
.footer__bar {
  position: relative;
  background: var(--bg-0);
  padding-block: 22px;
}
.footer__bar .container {
  width: min(var(--wide), 100% - var(--gutter) * 2);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-3);
  font-size: 13.5px;
}

/* ---------- Reveal animations (JS adds .in) ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
  transition-delay: calc(var(--d, 0) * 80ms);
}
[data-reveal].in { opacity: 1; transform: none; }
html.no-js [data-reveal], .reduced [data-reveal] {
  opacity: 1;
  transform: none;
  transition: none;
}

/* ---------- Persian type scale (Estedad) — slightly smaller, calmer ---------- */
[dir="rtl"] body { font-size: clamp(15px, 1vw, 16.5px); }
[dir="rtl"] .hero h1 { font-size: clamp(1.95rem, 4.7vw, 3.7rem); line-height: 1.3; }
[dir="rtl"] .page-hero h1 { font-size: clamp(1.8rem, 4.7vw, 3.8rem); }
[dir="rtl"] .sec-head h2 { font-size: clamp(1.6rem, 3.3vw, 2.6rem); }
[dir="rtl"] .builder h2 { font-size: clamp(1.55rem, 2.9vw, 2.3rem); }
[dir="rtl"] .cta-band h2 { font-size: clamp(1.9rem, 4.4vw, 3.7rem); }
[dir="rtl"] .adv__statement { font-size: clamp(1.15rem, 1.9vw, 1.9rem); }
[dir="rtl"] .sol-row__intro h3 { font-size: clamp(1.25rem, 2.2vw, 1.85rem); }
[dir="rtl"] .hero__sub, [dir="rtl"] .sec-head p, [dir="rtl"] .page-hero__sub,
[dir="rtl"] .builder__lead, [dir="rtl"] .cta-band p {
  font-size: clamp(15px, 1.08vw, 16.5px);
}
[dir="rtl"] .pillar__title { font-size: 16.5px; }
[dir="rtl"] .pillar__tag { font-size: 13px; }
[dir="rtl"] .nav__link { font-size: 15px; }
[dir="rtl"] .btn { font-size: 15px; }
[dir="rtl"] .hero__word { font-size: clamp(52px, 8.6vw, 112px); }
[dir="rtl"] .hero__mark { width: clamp(56px, 7.6vw, 106px); }
[dir="rtl"] .sol-row__list li { font-size: 15px; }
[dir="rtl"] .sol-row__list li span { font-size: 13.5px; }
[dir="rtl"] .svc-card h3 { font-size: 17px; }
[dir="rtl"] .svc-card p { font-size: 15px; max-width: 40rem; }
[dir="rtl"] .story__text p { max-width: 40rem; }
[dir="rtl"] .adv__item h3 { font-size: 17.5px; }
[dir="rtl"] .adv__item p { font-size: 15px; }
[dir="rtl"] .process h3 { font-size: 18.5px; }
[dir="rtl"] .process p { font-size: 15px; }
[dir="rtl"] .value h3 { font-size: 17.5px; }
[dir="rtl"] .value p { font-size: 15px; }
[dir="rtl"] .story__text p { font-size: clamp(15px, 1.05vw, 17px); }
[dir="rtl"] .footer ul a { font-size: 14.5px; }
[dir="rtl"] .footer__about p { font-size: 15px; }

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

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .sol-row, .sol-row:nth-child(even) { grid-template-columns: 1fr; }
  .sol-row:nth-child(even) .sol-row__intro { order: 0; }
  .process ol { grid-template-columns: repeat(2, 1fr); }
  .svc { grid-template-columns: 1fr; }
  .svc__intro { position: static; }
  .values { grid-template-columns: 1fr 1fr; }
  .story, .contact-grid { grid-template-columns: 1fr; }
  .builder { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav__links, .nav__cta .lang-switch { display: none; }
  .burger { display: flex; }
  .pillars { grid-template-columns: 1fr; }
  .adv { grid-template-columns: 1fr; }
  .adv__item:nth-child(2), .adv__item:nth-child(3) { margin-inline-start: 0; }
  .process ol { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr; }
  .form .two { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .scroll-cue { display: none; }
  .hero { min-height: auto; }
}
