:root {
  color-scheme: dark;
  --bg: #070b17;
  --bg-deep: #040712;
  --surface: rgba(16, 23, 43, 0.72);
  --surface-strong: #10182c;
  --surface-soft: rgba(255, 255, 255, 0.035);
  --line: rgba(162, 180, 229, 0.14);
  --line-strong: rgba(162, 180, 229, 0.24);
  --text: #f6f7fc;
  --muted: #a2abc1;
  --muted-2: #707b96;
  --primary: #8b5cf6;
  --primary-2: #4f7cff;
  --cyan: #1ed6ff;
  --green: #42e59d;
  --orange: #ffb35a;
  --yellow: #ffd34d;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --container: 1180px;
}

html[data-theme='light'] {
  color-scheme: light;
  --bg: #f4f7ff;
  --bg-deep: #e9effb;
  --surface: rgba(255, 255, 255, 0.76);
  --surface-strong: #ffffff;
  --surface-soft: rgba(29, 70, 150, 0.045);
  --line: rgba(52, 78, 137, 0.14);
  --line-strong: rgba(52, 78, 137, 0.24);
  --text: #111a2e;
  --muted: #59667f;
  --muted-2: #7a879f;
  --primary: #6d4ee8;
  --primary-2: #2563eb;
  --cyan: #0284c7;
  --green: #07895c;
  --orange: #d97706;
  --yellow: #b77900;
  --shadow: 0 24px 70px rgba(50, 75, 130, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 10% 12%, rgba(49, 101, 244, 0.09), transparent 28%),
    radial-gradient(circle at 90% 45%, rgba(124, 58, 237, 0.08), transparent 24%),
    var(--bg);
  color: var(--text);
  font-family: 'IRANSansWeb', Tahoma, Arial, sans-serif;
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

html[data-theme='light'] body {
  background:
    radial-gradient(circle at 10% 12%, rgba(37, 99, 235, 0.1), transparent 28%),
    radial-gradient(circle at 90% 45%, rgba(109, 78, 232, 0.09), transparent 24%),
    var(--bg);
}

body.menu-open {
  overflow: hidden;
}

::selection {
  color: white;
  background: rgba(116, 80, 255, 0.72);
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  border: 2px solid var(--bg-deep);
  border-radius: 999px;
  background: linear-gradient(180deg, #3b82f6, #0ea5e9);
  box-shadow: 0 0 12px rgba(14, 165, 233, .28);
}

button,
a,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

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

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

ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.35;
  letter-spacing: -0.025em;
}

p {
  color: var(--muted);
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

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

.section {
  position: relative;
  padding: 112px 0;
}

.section--muted {
  border-top: 1px solid rgba(255, 255, 255, 0.045);
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 22%, transparent 78%, rgba(255, 255, 255, 0.016)),
    rgba(3, 7, 18, 0.4);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.75s cubic-bezier(.2, .7, .2, 1) var(--reveal-delay, 0ms),
    transform 0.75s cubic-bezier(.2, .7, .2, 1) var(--reveal-delay, 0ms);
}

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

.scroll-progress {
  position: fixed;
  z-index: 200;
  top: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #0ea5e9);
  box-shadow: 0 0 16px rgba(14, 165, 233, 0.48);
}

.back-to-top {
  position: fixed;
  z-index: 70;
  left: 24px;
  bottom: 24px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  opacity: 0;
  color: white;
  background: rgba(13, 20, 38, 0.82);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  transform: translateY(12px) scale(.94);
  pointer-events: none;
  cursor: pointer;
  transition: .25s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.back-to-top:hover {
  border-color: rgba(139, 92, 246, .65);
  transform: translateY(-3px);
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
