@import "tailwindcss";

@theme {
  --color-primary: #1E40AF;
  --color-accent: #10B981;
  --color-surface: #FFFFFF;
  --color-ink: #0F172A;
  --font-sans: "Vazirmatn", system-ui, sans-serif;
  --font-display: "Estedad", "Vazirmatn", system-ui, sans-serif;
}

:root {
  --primary: #1E40AF;
  --accent: #10B981;
  --surface: #FFFFFF;
  --ink: #0F172A;
  --primary-dark: #1e3a8a;
  --primary-light: #dbeafe;
  --accent-light: #d1fae5;
  --accent-dark: #059669;
  --ink-muted: #475569;
  --border: #e2e8f0;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(10,37,64,0.08);
  --shadow-md: 0 4px 16px rgba(10,37,64,0.10);
  --shadow-lg: 0 12px 40px rgba(10,37,64,0.14);
  --shadow-xl: 0 24px 64px rgba(10,37,64,0.18);
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-pill: 9999px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: "Vazirmatn", system-ui, sans-serif;
  background: var(--surface);
  color: var(--ink);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: "Estedad", "Vazirmatn", system-ui, sans-serif;
  line-height: 1.3;
  font-weight: 800;
}

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

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2); opacity: 0; }
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-fade-up {
  animation: fadeUp 0.7s var(--ease-out) both;
}
.animate-fade-in {
  animation: fadeIn 0.5s var(--ease-out) both;
}
.animate-float {
  animation: float 3.5s ease-in-out infinite;
}
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }

.scroll-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}
.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Hover effects */
.hx-lift {
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.hx-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ── Primary button — #1E40AF trust-blue ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  background: #1E40AF;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  font-family: "Vazirmatn", sans-serif;
  letter-spacing: 0;
}
.btn-primary:hover {
  background: #1e3a8a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30,64,175,0.38);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  background: transparent;
  color: #1E40AF;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-pill);
  border: 2px solid #1E40AF;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  font-family: "Vazirmatn", sans-serif;
}
.btn-secondary:hover {
  background: #dbeafe;
  transform: translateY(-2px);
}

/* ── Accent button — #10B981 emerald ── */
.btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  background: #10B981;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  font-family: "Vazirmatn", sans-serif;
}
.btn-accent:hover {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16,185,129,0.38);
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  padding: 1.75rem;
  transition: box-shadow 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-title {
  font-family: "Estedad", "Vazirmatn", sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--ink-muted);
  line-height: 1.8;
  max-width: 600px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
}

/* badge-primary از #1E40AF استفاده می‌کند */
.badge-primary {
  background: #dbeafe;
  color: #1E40AF;
}
/* badge-accent از #10B981 استفاده می‌کند */
.badge-accent {
  background: #d1fae5;
  color: #059669;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}

/* FAB — accent color #10B981, RTL-aware position */
.fab {
  position: fixed;
  bottom: 2rem;
  inset-inline-end: 2rem;
  width: 56px;
  height: 56px;
  background: #10B981;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(16,185,129,0.4);
  cursor: pointer;
  z-index: 100;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
}
.fab:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 32px rgba(16,185,129,0.5);
}

/* Stats counter */
.counter-num {
  font-family: "Estedad", "Vazirmatn", sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  font-feature-settings: 'ss01';
}

/* Table styles — header از #635BFF */
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: right;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
th {
  background: #1E40AF;
  color: #ffffff;
  font-weight: 700;
  font-family: "Estedad", "Vazirmatn", sans-serif;
}
tr:nth-child(even) td { background: #fafafa; }
tr:hover td { background: #ede9fe; }

/* Form styles */
.form-input {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus {
  border-color: #1E40AF;
  box-shadow: 0 0 0 3px rgba(30,64,175,0.15);
}
.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

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