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

:root {
  --bg: #090909;
  --bg-soft: #0f0f0f;
  --surface: #161616;
  --surface-2: #1e1e1e;
  --surface-3: #282828;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #ece8e2;
  --text-soft: #c9c4bc;
  --muted: #8b8680;
  --gold: #d4a853;
  --gold-soft: rgba(212, 168, 83, 0.15);
  --violet: #9b8cff;
  --cyan: #5eead4;
  --rose: #f472b6;
  --gradient-brand: linear-gradient(135deg, #d4a853 0%, #9b8cff 45%, #5eead4 100%);
  --gradient-surface: linear-gradient(160deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.01) 100%);
  --shadow-lg: 0 32px 80px rgba(0, 0, 0, 0.55);
  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --max: 1140px;
  --nav-h: 72px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

/* ── Ambient background ── */
.scene {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
}

.scene__mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 60% at 15% -10%, rgba(155, 140, 255, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 10%, rgba(212, 168, 83, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(94, 234, 212, 0.08), transparent 55%),
    var(--bg);
}

.scene__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 85% 65% at 50% 0%, black 20%, transparent 72%);
}

.scene__grain {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scene__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  animation: float 20s ease-in-out infinite;
}

.scene__orb--1 {
  width: 420px;
  height: 420px;
  top: -120px;
  right: -80px;
  background: #7c6cf0;
}

.scene__orb--2 {
  width: 360px;
  height: 360px;
  bottom: 10%;
  left: -100px;
  background: #d4a853;
  animation-delay: -8s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-24px, 18px) scale(1.06); }
}

/* ── Layout ── */
.container {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.section {
  padding: 96px 0;
}

.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 600;
}

.section__eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

.section__title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin-bottom: 14px;
}

.section__desc {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 580px;
  margin-bottom: 52px;
}

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s, backdrop-filter 0.3s;
}

.nav.is-scrolled {
  border-color: var(--border);
  background: rgba(9, 9, 9, 0.72);
  backdrop-filter: blur(20px) saturate(1.2);
}

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1rem;
}

.brand__logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav__links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav__links a:hover { color: var(--text); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn:active { transform: scale(0.98); }

.btn--primary {
  color: #111;
  background: var(--gradient-brand);
  box-shadow: 0 10px 30px rgba(155, 140, 255, 0.25);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(155, 140, 255, 0.35);
}

.btn--ghost {
  color: var(--text);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background: rgba(255,255,255,0.07);
  border-color: var(--border-strong);
}

.btn--lg { padding: 15px 28px; font-size: 0.95rem; }

.nav__toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  cursor: pointer;
}

/* ── Hero ── */
.hero {
  padding: 72px 0 88px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  font-size: 0.8rem;
  color: var(--text-soft);
}

.pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.8);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.92); }
}

.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
}

.hero__title .highlight {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__lead {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 540px;
  margin-bottom: 36px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 40px;
}

.hero__metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 480px;
}

.metric {
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.metric__value {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.metric__label {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ── Phone mockup ── */
.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 20px;
}

.phone-glow {
  position: absolute;
  inset: 10% 5%;
  background: radial-gradient(circle, rgba(155,140,255,0.25), transparent 65%);
  filter: blur(40px);
}

.device {
  position: relative;
  width: min(300px, 100%);
  border-radius: 40px;
  padding: 10px;
  background: linear-gradient(160deg, rgba(255,255,255,0.14), rgba(255,255,255,0.03));
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.08);
  animation: rise 0.8s ease both;
}

.device__screen {
  border-radius: 32px;
  overflow: hidden;
  background: #111;
  border: 1px solid rgba(255,255,255,0.08);
}

.device__status {
  height: 28px;
  background: #0a0a0a;
}

.device__body {
  padding: 14px 12px 18px;
  min-height: 500px;
  background: linear-gradient(180deg, #121212 0%, #0e0e0e 100%);
}

.device__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 0.82rem;
  font-weight: 700;
}

.device__header span:last-child { color: var(--muted); }

.msg {
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 0.76rem;
  line-height: 1.65;
  animation: fadeUp 0.55s ease both;
}

.msg--user {
  margin-right: 36px;
  background: rgba(155, 140, 255, 0.14);
  border: 1px solid rgba(155, 140, 255, 0.22);
  color: var(--text-soft);
}

.msg--ai {
  margin-left: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
}

.msg__blocks { margin-top: 10px; display: grid; gap: 8px; }

.block-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-xs);
  background: var(--surface-3);
  border: 1px solid var(--border);
  font-size: 0.7rem;
  color: var(--text-soft);
}

.block-row__icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
}

.block-row__icon--table { background: rgba(52, 211, 153, 0.2); color: #6ee7b7; }
.block-row__icon--diagram { background: rgba(212, 168, 83, 0.2); color: #fbbf24; }
.block-row__icon--doc { background: rgba(96, 165, 250, 0.2); color: #93c5fd; }

.float-card {
  position: absolute;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: rgba(22, 22, 22, 0.88);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
  font-size: 0.75rem;
  animation: floatCard 6s ease-in-out infinite;
}

.float-card--left {
  top: 18%;
  left: -8%;
}

.float-card--right {
  bottom: 16%;
  right: -10%;
  animation-delay: -3s;
}

.float-card strong {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 2px;
}

.float-card span { color: var(--muted); }

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.msg:nth-child(2) { animation-delay: 0.12s; }
.msg:nth-child(3) { animation-delay: 0.24s; }

/* ── Features grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
}

.feature-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 220px;
  padding: 28px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--gradient-surface);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(212,168,83,0.08), transparent 45%);
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  margin-bottom: 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.45;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.75;
  flex: 1;
}

/* ── Blocks strip ── */
.blocks-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.block-tile {
  position: relative;
  padding: 24px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
  transition: transform 0.25s, background 0.25s;
}

.block-tile:hover {
  transform: translateY(-3px);
  background: var(--surface-2);
}

.block-tile__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}

.block-tile strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.block-tile span {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ── Timeline panel ── */
.panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 40px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.03), transparent),
    var(--surface);
}

.timeline {
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.timeline li:last-child { border-bottom: none; }

.timeline__dot {
  width: 14px;
  height: 14px;
  margin-top: 6px;
  border-radius: 50%;
  border: 2px solid var(--violet);
  background: transparent;
}

.timeline__dot.is-done {
  background: var(--violet);
  box-shadow: 0 0 14px rgba(155, 140, 255, 0.55);
}

.timeline__dot.is-running {
  border-color: var(--cyan);
  animation: pulse 1.2s ease-in-out infinite;
}

.timeline__title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.timeline__cmd {
  font-family: ui-monospace, 'SF Mono', monospace;
  font-size: 0.76rem;
  color: var(--muted);
  direction: ltr;
  text-align: left;
}

.panel__copy {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.85;
}

.panel__copy strong { color: var(--text); }

/* ── CTA ── */
.cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 72px 40px;
  border-radius: 28px;
  border: 1px solid rgba(155, 140, 255, 0.22);
  background:
    radial-gradient(circle at 50% 0%, rgba(155,140,255,0.16), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
}

.cta__title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.cta__desc {
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 28px;
}

/* ── Footer ── */
.footer {
  padding: 36px 0 56px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer p {
  font-size: 0.84rem;
  color: var(--muted);
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__links a {
  text-decoration: none;
  font-size: 0.84rem;
  color: var(--muted);
  transition: color 0.2s;
}

.footer__links a:hover { color: var(--text); }

/* ── Reveal on scroll ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Mobile nav drawer ── */
.mobile-menu {
  display: none;
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 150;
  padding: 24px;
  background: rgba(9, 9, 9, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
}

.mobile-menu.is-open { display: block; }

.mobile-menu ul {
  list-style: none;
  display: grid;
  gap: 8px;
}

.mobile-menu a {
  display: block;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 48px;
  }

  .hero__lead,
  .section__desc { margin-inline: auto; }

  .hero__actions,
  .hero__metrics { justify-content: center; margin-inline: auto; }

  .hero__visual { order: -1; }

  .float-card { display: none; }

  .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .blocks-strip { grid-template-columns: repeat(2, 1fr); }

  .panel { grid-template-columns: 1fr; padding: 28px; }

  .nav__links,
  .nav__actions .btn--ghost { display: none; }

  .nav__toggle { display: grid; place-items: center; }
}

@media (max-width: 520px) {
  .container { width: calc(100% - 28px); }

  .hero__metrics { grid-template-columns: 1fr; max-width: 280px; }

  .features-grid { grid-template-columns: 1fr; }

  .blocks-strip { grid-template-columns: 1fr; }

  .section { padding: 72px 0; }
}
