/* ============================================================
   TechOneAI — base.css
   Reset، فونت، متغیرهای رنگ و پایه استایل
   ============================================================ */

/* ---------- متغیرهای سراسری ---------- */
:root {
  /* رنگ‌های اصلی برند */
  --c-indigo:   #6366f1;
  --c-violet:   #8b5cf6;
  --c-pink:     #ec4899;
  --c-blue:     #3b82f6;
  --c-cyan:     #06b6d4;
  --c-green:    #10b981;

  /* گرادیان‌ها */
  --grad-primary:    linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --grad-cool:       linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
  --grad-warm:       linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #f59e0b 100%);
  --grad-text:       linear-gradient(135deg, #a5b4fc 0%, #f0abfc 50%, #fbcfe8 100%);
  --grad-bg-animated: linear-gradient(125deg, #0f0c29 0%, #1a1147 25%, #2d1b4e 50%, #1e1b4b 75%, #0f0c29 100%);

  /* پس‌زمینه و سطح */
  --bg-body:    #0a0a14;
  --bg-elevated:#12121f;
  --surface:    rgba(255, 255, 255, 0.05);
  --surface-2:  rgba(255, 255, 255, 0.08);
  --border:     rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);

  /* متن */
  --text:       #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim:   #64748b;

  /* شیشه‌ای (Glassmorphism) */
  --glass-bg:    rgba(255, 255, 255, 0.06);
  --glass-blur:  18px;
  --glass-border:rgba(255, 255, 255, 0.12);

  /* سایه‌ها و درخشش */
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:  0 8px 24px rgba(0,0,0,0.35);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.45);
  --glow-indigo:0 0 30px rgba(99, 102, 241, 0.45);
  --glow-pink:  0 0 30px rgba(236, 72, 153, 0.40);

  /* اندازه‌ها */
  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --maxw:      1200px;
  --nav-h:     72px;
  --admin-bar-h: 0px;
  --header-offset: calc(var(--nav-h) + var(--admin-bar-h));

  /* انتقال‌ها */
  --t-fast: 0.2s ease;
  --t:      0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  /* فونت */
  --font: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
}

/* ---------- Reset مدرن ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-offset) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg-body);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* پس‌زمینه متحرک لایه ۱ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--grad-bg-animated);
  background-size: 400% 400%;
  animation: bgShift 22s ease infinite;
  z-index: -3;
}

/* پس‌زمینه لایه ۲ — blob‌های نوری */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 25%, rgba(99,102,241,0.22) 0%, transparent 35%),
    radial-gradient(circle at 85% 15%, rgba(236,72,153,0.18) 0%, transparent 35%),
    radial-gradient(circle at 50% 80%, rgba(139,92,246,0.20) 0%, transparent 40%);
  z-index: -2;
  pointer-events: none;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

::selection {
  background: rgba(139, 92, 246, 0.4);
  color: #fff;
}

/* ---------- تایپوگرافی ---------- */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); }

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

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

/* ---------- لایه‌بندی ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

section { position: relative; padding: 100px 0; }
section.compact { padding: 64px 0; }

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}
.section-head .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--c-indigo);
  margin-bottom: 18px;
}
.section-head h2 { margin-bottom: 14px; }
.section-head p  { font-size: 1.05rem; }

/* اسکرول‌بار سفارشی */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0a0a14; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--c-indigo), var(--c-pink));
  border-radius: 999px;
  border: 2px solid #0a0a14;
}

/* کاهش حرکت برای کاربرانی که ترجیح میدن */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* نوار مدیریت وردپرس — جلوگیری از همپوشانی با منوی سایت */
body.admin-bar {
  --admin-bar-h: 32px;
}
@media screen and (max-width: 782px) {
  body.admin-bar {
    --admin-bar-h: 46px;
  }
}
html[dir="rtl"] body.admin-bar {
  margin-top: 0 !important;
}
