/* =========================================
 * base.css — Reset, Typography, Global Effects
 * ====================================== */

/* 1) Modern CSS reset */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
  margin: 0;
}

ul[role="list"], ol[role="list"] {
  list-style: none;
  padding: 0;
  margin: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: 1rem;
}

button {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

/* 2) Direction & Language */
html[lang="fa"], html[lang="ar"] {
  direction: rtl;
}

html[lang="en"], html[lang="en-US"] {
  direction: ltr;
}

body {
  font-family: 'Vazirmatn', sans-serif;
  min-height: 100vh;
  background-color: var(--color-bg, #f8fafc);
  color: var(--color-text, #334155);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.5s ease, color 0.5s ease;
  overflow-x: hidden;
}

/* 3) Theme Base */
html.dark body {
  background-color: var(--color-bg-dark, #020617);
  color: var(--color-text-dark, #f1f5f9);
}

/* 4) Typography Scale */
h1, .h1 { font-size: 1.875rem; line-height: 1.4; font-weight: 900; }
h2, .h2 { font-size: 1.5rem; line-height: 1.5; font-weight: 700; }
h3, .h3 { font-size: 1.25rem; line-height: 1.6; font-weight: 600; }
p, .text-body { font-size: 0.95rem; line-height: 1.8; color: inherit; opacity: 0.8; }
small, .text-sm { font-size: 0.8rem; }
strong { font-weight: 700; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

/* 5) Global Backgrounds & Effects (Transferred from HTML) */
.neural-bg {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
  pointer-events: none; z-index: -2; opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='net' width='100' height='100' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='10' cy='10' r='2' fill='%23334155'/%3E%3Ccircle cx='90' cy='30' r='2' fill='%23334155'/%3E%3Ccircle cx='50' cy='70' r='2' fill='%23334155'/%3E%3Cpath d='M10 10 L90 30 L50 70 L10 10' stroke='%23334155' stroke-width='0.5' fill='none'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23net)'/%3E%3C/svg%3E");
}

html.dark .neural-bg { 
  opacity: 0.1; 
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='net-dark' width='100' height='100' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='10' cy='10' r='2' fill='%2394a3b8'/%3E%3Ccircle cx='90' cy='30' r='2' fill='%2394a3b8'/%3E%3Ccircle cx='50' cy='70' r='2' fill='%2394a3b8'/%3E%3Cpath d='M10 10 L90 30 L50 70 L10 10' stroke='%2394a3b8' stroke-width='0.5' fill='none'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23net-dark)'/%3E%3C/svg%3E"); 
}

/* Floating Orbs */
.orb { 
  position: fixed; border-radius: 50%; filter: blur(80px); 
  z-index: -1; animation: float 12s infinite ease-in-out; opacity: 0.5; 
}
.orb-1 { top: -10%; left: -10%; width: 600px; height: 600px; background: #cffafe; }
.orb-2 { bottom: -10%; right: 20%; width: 500px; height: 500px; background: #fae8ff; animation-delay: 2s; }
html.dark .orb { opacity: 0.15; }
html.dark .orb-1 { background: #164e63; } 
html.dark .orb-2 { background: #4a044e; }

@keyframes float { 
  0%, 100% { transform: translate(0, 0); } 
  50% { transform: translate(30px, -30px); } 
}

/* Base Animations */
.fade-enter { animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; transform: translateY(15px); }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* Mix Blend Utilities */
.blend-multiply { mix-blend-mode: multiply; }
html.dark .blend-multiply { filter: invert(1) brightness(2); mix-blend-mode: screen; }

/* 6) Common Containers */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* Language visibility helpers */
[lang="fa"] .lang-en { display: none !important; }
[lang="en"] .lang-fa { display: none !important; }