/**
 * ==================================================
 * Base Typography & Grid System
 * ==================================================
 */

/* Google/CDN Font Imports - Vazirmatn (Primary) */
@import url("https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css");

/* IranSans Font (Fallback) */
@font-face {
  font-family: "IRANSans";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("https://cdn.jsdelivr.net/gh/nickytonline/fonts@0.0.2/IRANSans/IRANSansWeb_Light.woff2")
      format("woff2"),
    url("https://cdn.jsdelivr.net/gh/nickytonline/fonts@0.0.2/IRANSans/IRANSansWeb_Light.woff")
      format("woff");
}

@font-face {
  font-family: "IRANSans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("https://cdn.jsdelivr.net/gh/nickytonline/fonts@0.0.2/IRANSans/IRANSansWeb.woff2")
      format("woff2"),
    url("https://cdn.jsdelivr.net/gh/nickytonline/fonts@0.0.2/IRANSans/IRANSansWeb.woff")
      format("woff");
}

@font-face {
  font-family: "IRANSans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("https://cdn.jsdelivr.net/gh/nickytonline/fonts@0.0.2/IRANSans/IRANSansWeb_Medium.woff2")
      format("woff2"),
    url("https://cdn.jsdelivr.net/gh/nickytonline/fonts@0.0.2/IRANSans/IRANSansWeb_Medium.woff")
      format("woff");
}

@font-face {
  font-family: "IRANSans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("https://cdn.jsdelivr.net/gh/nickytonline/fonts@0.0.2/IRANSans/IRANSansWeb_Bold.woff2")
      format("woff2"),
    url("https://cdn.jsdelivr.net/gh/nickytonline/fonts@0.0.2/IRANSans/IRANSansWeb_Bold.woff")
      format("woff");
}

/* English Fonts - Montserrat & Inter */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap");

/* Base Styles */
html {
  font-size: 16px;
  scroll-padding-top: var(--header-height);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-persian);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  transition: background-color var(--transition-normal),
    color var(--transition-normal);
}

/* Theme Transition */
.theme-transitioning * {
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease !important;
}

/* Typography Scale */
h1,
.h1 {
  font-size: var(--font-size-5xl);
  font-weight: 700;
  line-height: var(--line-height-tight);
  letter-spacing: -0.02em;
}

h2,
.h2 {
  font-size: var(--font-size-4xl);
  font-weight: 700;
  line-height: var(--line-height-tight);
  letter-spacing: -0.01em;
}

h3,
.h3 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  line-height: var(--line-height-snug);
}

h4,
.h4 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  line-height: var(--line-height-snug);
}

h5,
.h5 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  line-height: var(--line-height-normal);
}

h6,
.h6 {
  font-size: var(--font-size-base);
  font-weight: 600;
  line-height: var(--line-height-normal);
}

p {
  margin-bottom: var(--space-4);
}

p:last-child {
  margin-bottom: 0;
}

/* English Text */
.en,
[dir="ltr"] {
  font-family: var(--font-english);
}

/* Links */
a {
  color: var(--color-primary);
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-light);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.section-container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding: var(--space-20) var(--container-padding);
}

/* Section Styling */
.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-badge {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-english);
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.section-title {
  font-size: var(--font-size-4xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
  background: var(--gradient-neon);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--font-size-base);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--shadow-glow-primary);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(var(--color-primary-rgb), 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-lg);
}

.btn-glow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  height: 150%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.3) 0%,
    transparent 70%
  );
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.5s ease;
}

.btn-glow:hover::before {
  transform: translate(-50%, -50%) scale(1);
}

.btn-icon {
  font-size: 1.2em;
}

/* Utility Classes */
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.text-left {
  text-align: left;
}

.text-primary {
  color: var(--color-primary);
}
.text-secondary {
  color: var(--color-text-secondary);
}
.text-muted {
  color: var(--color-text-muted);
}

.font-bold {
  font-weight: 700;
}
.font-semibold {
  font-weight: 600;
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-bg);
  z-index: var(--z-preloader);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner {
  text-align: center;
}

.preloader-logo {
  width: 100px;
  height: 100px;
  margin: 0 auto var(--space-6);
}

.preloader-svg {
  width: 100%;
  height: 100%;
}

.preloader-text {
  font-family: var(--font-english);
  font-size: 48px;
  font-weight: 700;
  fill: url(#logo-gradient);
  animation: pulse 1.5s ease-in-out infinite;
}

.preloader-progress {
  width: 200px;
  height: 3px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.preloader-progress-bar {
  width: 0%;
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  animation: preload 2s ease-out forwards;
}

@keyframes preload {
  to {
    width: 100%;
  }
}
