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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

[id] {
  scroll-margin-top: calc(var(--nav-h) + 20px);
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ar);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[dir='ltr'] body {
  font-family: var(--font-en);
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

::selection {
  background: rgba(46, 230, 121, 0.28);
  color: #fff;
}

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

/* ---------- ambient background ---------- */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}

.orb-a {
  width: 620px;
  height: 620px;
  top: -180px;
  inset-inline-start: -120px;
  background: radial-gradient(circle, rgba(46, 230, 121, 0.32), transparent 68%);
  animation: drift-a 26s var(--ease) infinite alternate;
}

.orb-b {
  width: 520px;
  height: 520px;
  top: 30%;
  inset-inline-end: -160px;
  background: radial-gradient(circle, rgba(95, 200, 255, 0.18), transparent 68%);
  animation: drift-b 32s var(--ease) infinite alternate;
}

.orb-c {
  width: 560px;
  height: 560px;
  bottom: -200px;
  inset-inline-start: 30%;
  background: radial-gradient(circle, rgba(25, 204, 99, 0.2), transparent 70%);
  animation: drift-c 38s var(--ease) infinite alternate;
}

#net-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  opacity: 0.5;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  position: relative;
  padding-block: 96px;
}

.section-head {
  max-width: 680px;
  margin-bottom: 56px;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(46, 230, 121, 0.06);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 10px var(--brand);
  animation: pulse-dot 2s ease-in-out infinite;
}

.section-title {
  font-size: clamp(28px, 4.4vw, 46px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.section-sub {
  margin-top: 16px;
  color: var(--muted);
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.85;
}

.gradient-text {
  background: linear-gradient(120deg, #46f08e, #2ee679 45%, #5fc8ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding-inline: 26px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease), border-color 0.25s var(--ease);
  will-change: transform;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: linear-gradient(120deg, #46f08e, #19cc63);
  color: #04150a;
  box-shadow: var(--shadow-brand);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 30px 80px -26px rgba(46, 230, 121, 0.7);
}

.btn-ghost {
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--brand);
  background: rgba(46, 230, 121, 0.07);
  transform: translateY(-3px);
}

.btn-sm {
  height: 42px;
  padding-inline: 18px;
  font-size: 13px;
  border-radius: 11px;
}

/* ---------- cards / badges ---------- */
.card {
  background: linear-gradient(180deg, rgba(16, 30, 20, 0.72), rgba(10, 18, 13, 0.72));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(8px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(46, 230, 121, 0.07);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

.badge svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.mono {
  font-family: 'Inter', ui-monospace, 'Cascadia Code', monospace;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .section {
    padding-block: 68px;
  }
  .container {
    padding-inline: 18px;
  }
}