:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #424245;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.08);
  --accent: #ff6a14;
  --accent-2: #ff9f0a;
  --accent-deep: #e8430c;
  --frost: rgba(255, 255, 255, 0.72);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 18px 50px -18px rgba(0, 0, 0, 0.18);
  --f-display: 'Inter Tight', 'Vazirmatn', system-ui, -apple-system, sans-serif;
  --f-body: 'Inter', 'Vazirmatn', system-ui, -apple-system, sans-serif;
  --gutter: clamp(16px, 5vw, 88px);
  --radius: 24px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}
html[lang='fa'] {
  --f-display: 'Vazirmatn', system-ui, sans-serif;
  --f-body: 'Vazirmatn', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
html[lang='fa'] body { line-height: 1.9; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--f-display); margin: 0; }
p { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
svg { display: block; }
::selection { background: var(--accent); color: #fff; }

/* ---------- stage (3D / video background) ---------- */
.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(70% 70% at 70% 45%, #ffffff 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #fbfbfd 0%, #f2f2f5 100%);
}
.stage__glow {
  position: absolute;
  width: 60vmax;
  aspect-ratio: 1;
  inset-inline-end: -10vmax;
  top: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 138, 50, 0.14), rgba(255, 138, 50, 0) 65%);
}
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#bgVideo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none;
  will-change: transform;
  /* fade the clip's studio backdrop into the page background */
  filter: brightness(1.13) saturate(1.05);
  -webkit-mask-image: radial-gradient(ellipse 50% 44% at 50% 52%, #000 45%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 44% at 50% 52%, #000 45%, transparent 100%);
}
.has-video #bgVideo { display: block; }
.has-video #scene, .has-video .labels, .has-video .stage__glow { display: none; }

/* component callouts that follow the 3D model */
.labels { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.label {
  position: absolute;
  left: 0;
  top: 0;
  height: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  white-space: nowrap;
  will-change: transform, opacity;
}
.label > i {
  flex: none;
  width: 11px;
  height: 11px;
  margin-inline-start: -5.5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 106, 20, 0.2);
}
.label > span {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--frost);
  border: 1px solid rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  font: 600 0.82rem/1.2 var(--f-display);
  color: var(--ink);
}
.label.is-left { flex-direction: row-reverse; translate: -100% 0; }
.label.is-left > i { margin-inline-start: 0; margin-inline-end: -5.5px; }
[dir='rtl'] .label { direction: ltr; }
[dir='rtl'] .label > span { direction: rtl; }

main, .footer { position: relative; z-index: 2; }

/* ---------- shared ---------- */
.wrap { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: var(--gutter); }
.half { max-width: 50%; }
.half--wide { max-width: 56%; }
.half--end { margin-inline-start: auto; }
.muted { color: var(--muted); }
.lead { margin-top: 18px; font-size: 1.15rem; max-width: 520px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
html[lang='fa'] .eyebrow { letter-spacing: 0; font-size: 1rem; font-weight: 700; }
.eyebrow--light { color: var(--accent-2); }
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(255, 106, 20, 0.5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(255, 106, 20, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 106, 20, 0); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding-inline: 28px;
  border-radius: 999px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1rem;
  border: 1.5px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, .lang:focus-visible, .nav__links a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn--sm { height: 40px; padding-inline: 20px; font-size: 0.92rem; }
.btn--solid {
  background: linear-gradient(135deg, var(--accent-2), var(--accent) 55%, var(--accent-deep));
  color: #fff;
  box-shadow: 0 12px 30px -12px rgba(255, 106, 20, 0.75);
}
.btn--solid:hover { box-shadow: 0 16px 36px -10px rgba(255, 106, 20, 0.85); }
.btn--ghost { border-color: rgba(29, 29, 31, 0.22); color: var(--ink); background: rgba(255, 255, 255, 0.5); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; }
.btn--light { background: #fff; color: var(--ink); }
.btn--outline-light { border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.btn--outline-light:hover { border-color: #fff; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px var(--gutter);
  transition: padding 0.3s var(--ease), background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav--solid {
  padding-block: 12px;
  background: rgba(251, 251, 253, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-deep));
  color: #fff;
  font: 700 0.9rem/1 'Inter Tight', sans-serif;
  box-shadow: 0 8px 20px -8px rgba(255, 106, 20, 0.7);
}
.brand__name { font-family: var(--f-display); font-weight: 600; font-size: 1.12rem; letter-spacing: -0.01em; }
.brand__name b { font-weight: 700; }
html[lang='fa'] .brand__name { font-weight: 700; }
.nav__links { display: flex; gap: clamp(20px, 3vw, 44px); }
.nav__links a { font-size: 0.95rem; color: var(--ink-2); transition: color 0.2s; }
.nav__links a:hover { color: var(--accent); }
.nav__actions { display: flex; align-items: center; gap: 12px; }
.lang {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font: 600 0.78rem/1 'Inter Tight', 'Vazirmatn', sans-serif;
  cursor: pointer;
}
.lang span { padding: 8px 12px; border-radius: 999px; transition: background 0.25s, color 0.25s; }
.lang span[data-lang='fa'] { font-family: 'Vazirmatn', sans-serif; font-size: 0.9rem; padding-block: 6px; }
html[lang='en'] .lang [data-lang='en'],
html[lang='fa'] .lang [data-lang='fa'] { background: var(--ink); color: #fff; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  align-items: center;
  padding: 120px var(--gutter) 32px;
  gap: 24px 40px;
}
.hero__copy { position: relative; max-width: 620px; }
.hero__title {
  display: flex;
  flex-direction: column;
  font-weight: 700;
  font-size: clamp(3.4rem, 8vw, 7.6rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}
.hero__last {
  background: linear-gradient(95deg, var(--accent-2) 0%, var(--accent) 45%, var(--accent-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.06em;
}
html[lang='fa'] .hero__title { line-height: 1.2; letter-spacing: 0; font-weight: 800; }
.hero__tag {
  margin-top: 22px;
  font-family: var(--f-display);
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.015em;
}
html[lang='fa'] .hero__tag { letter-spacing: 0; }
.hero__lead { margin-top: 12px; max-width: 520px; color: var(--muted); font-size: 1.1rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero__visual { position: relative; height: min(66vh, 600px); }
.status {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--frost);
  border: 1px solid rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow);
  animation: float 8s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-10px); } }
.status__icon {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
}
.status__icon svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.status__body { display: flex; flex-direction: column; line-height: 1.3; }
.status__body b { font-family: var(--f-display); font-size: 0.92rem; }
.status__body small { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--muted); }
.status__body .num { font: 700 0.95rem 'Inter Tight', 'Vazirmatn', sans-serif; color: var(--ink); }
.ok { width: 7px; height: 7px; border-radius: 50%; background: #34c759; display: inline-block; }
.spark { width: 70px; height: 22px; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.status--a { top: 6%; inset-inline-start: 4%; animation-delay: -2s; }
.status--b { bottom: 6%; inset-inline-end: 0; animation-delay: -5s; }

.hero__strip {
  grid-column: 1 / -1;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-radius: var(--radius);
  padding: 22px 8px;
  background: var(--frost);
  border: 1px solid rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--shadow);
}
.hero__strip li { display: flex; align-items: center; gap: 16px; padding-inline: 22px; }
.hero__strip li + li { border-inline-start: 1px solid var(--line); }
.hero__strip .n {
  font: 700 clamp(1.8rem, 3vw, 2.6rem)/1 'Inter Tight', 'Vazirmatn', sans-serif;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, var(--accent-2), var(--accent-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__strip b { font-family: var(--f-display); font-size: 1rem; }
.hero__strip p { font-size: 0.84rem; color: var(--muted); line-height: 1.45; }

/* ---------- sections ---------- */
.section { position: relative; padding-block: clamp(110px, 18vh, 200px); }
.section__head { margin-bottom: 48px; }
.section__head--center { text-align: center; max-width: 820px; margin-inline: auto; }
.section h2 {
  font-size: clamp(2.3rem, 4.6vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 700;
}
html[lang='fa'] .section h2 { letter-spacing: 0; line-height: 1.4; font-weight: 800; }

/* about */
.about { min-height: 100vh; display: flex; align-items: center; }
.about__quote {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2rem, 3.8vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}
html[lang='fa'] .about__quote { letter-spacing: 0; line-height: 1.55; }
.about__text { margin-top: 26px; color: var(--muted); font-size: 1.12rem; }
.pillars { display: grid; gap: 0; margin-top: 44px; border-top: 1px solid var(--line); }
.pillars li { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding-block: 18px; border-bottom: 1px solid var(--line); }
.pillars__k { font-family: var(--f-display); font-weight: 700; color: var(--ink); }
.pillars li span:last-child { color: var(--muted); }

/* expertise cards */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card {
  display: flex;
  flex-direction: column;
  padding: 28px 26px 24px;
  border-radius: var(--radius);
  background: var(--frost);
  border: 1px solid rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--shadow);
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 28px 60px -20px rgba(0, 0, 0, 0.25); }
.card__icon { width: 34px; height: 34px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 20px; }
.card h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 10px; }
html[lang='fa'] .card h3 { letter-spacing: 0; }
.card p { color: var(--muted); font-size: 0.93rem; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; direction: ltr; }
[dir='rtl'] .tags { justify-content: flex-end; }
.tags li { font: 500 0.74rem 'Inter', sans-serif; padding: 5px 11px; border-radius: 999px; background: rgba(0, 0, 0, 0.05); color: var(--ink-2); }

/* stack */
.stack { padding-bottom: 60px; }
.stack__spacer { height: 46vh; }
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  direction: ltr;
}
.marquee + .marquee { border-top: 0; }
.marquee__track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee--rev .marquee__track { animation-direction: reverse; animation-duration: 60s; }
.marquee span {
  display: inline-flex;
  align-items: center;
  gap: 30px;
  padding: 20px 0 20px 30px;
  font: 700 clamp(1.4rem, 2.8vw, 2.3rem) 'Inter Tight', sans-serif;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.marquee span::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.marquee--rev span { color: var(--muted); font-weight: 600; font-size: clamp(1.05rem, 2vw, 1.6rem); }
.marquee--rev span::after { background: rgba(0, 0, 0, 0.18); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* approach */
.steps { display: flex; flex-direction: column; gap: 12px; }
.step {
  display: flex;
  gap: 22px;
  padding: 24px 26px;
  border-radius: 20px;
  background: var(--frost);
  border: 1px solid rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--shadow);
  transition: transform 0.4s var(--ease);
}
.step:hover { transform: translateX(6px); }
[dir='rtl'] .step:hover { transform: translateX(-6px); }
.step__n {
  font: 700 2.2rem/1 'Inter Tight', 'Vazirmatn', sans-serif;
  letter-spacing: -0.04em;
  min-width: 56px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.step h3 { font-size: 1.2rem; margin-bottom: 4px; }
.step p { color: var(--muted); font-size: 0.96rem; }

/* contact */
.contact { min-height: 100vh; display: flex; align-items: flex-end; padding-bottom: 80px; }
.contact__card {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding: clamp(32px, 5vw, 64px);
  border-radius: 32px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(60% 120% at 100% 0%, rgba(255, 120, 40, 0.45), transparent 60%),
    #1d1d1f;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.5);
}
.contact__copy { max-width: 620px; }
.contact__copy h2 { color: #fff; }
.contact__copy p:last-child { margin-top: 14px; font-size: 1.1rem; color: rgba(255, 255, 255, 0.7); }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* footer */
.footer { padding-block: 28px; border-top: 1px solid var(--line); background: rgba(245, 245, 247, 0.85); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.footer__in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.88rem; }

/* page progress */
.progress { position: fixed; z-index: 21; top: 0; inset-inline: 0; height: 2px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent-deep)); transform-origin: left; transform: scaleX(0); }
[dir='rtl'] .progress i { transform-origin: right; }

/* reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease) var(--d, 0ms), transform 0.9s var(--ease) var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .half, .half--wide { max-width: 58%; }
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .nav__links { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 110px; }
  .hero__visual { height: 46vh; }
  .hero__strip { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
  .hero__strip li:nth-child(3) { border-inline-start: 0; }
  .half, .half--wide {
    max-width: 100%;
    padding: 28px 22px;
    border-radius: var(--radius);
    background: rgba(245, 245, 247, 0.8);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }
  .cards { grid-template-columns: 1fr; }
  .pillars li { grid-template-columns: 1fr; gap: 4px; }
  .contact__card { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  .nav { padding-block: 16px; }
  .nav .btn--sm { display: none; }
  .hero__cta .btn { flex: 1 1 auto; }
  .status { padding: 10px 12px; }
  .status .spark { display: none; }
  .hero__strip { grid-template-columns: 1fr; padding: 6px; }
  .hero__strip li { padding: 14px; }
  .hero__strip li + li { border-inline-start: 0; border-top: 1px solid var(--line); }
  .step { flex-direction: column; gap: 10px; padding: 20px; }
  .contact__actions .btn { flex: 1 1 auto; }
}

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