/* ==========================================================================
   Hamrah CRM — Theme CSS
   Vazirmatn font: self-hosted via assets/fonts/vazirmatn/
   Tailwind utilities: compiled subset for this theme
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. FONT — Vazirmatn Variable (self-hosted)
   دانلود فونت از: https://github.com/rastikerdar/vazirmatn/releases
   و قرار دادن فایل‌ها در assets/fonts/vazirmatn/
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/vazirmatn/Vazirmatn[wght].woff2') format('woff2 supports variations'),
       url('../fonts/vazirmatn/Vazirmatn[wght].woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. CSS RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Vazirmatn', 'Tahoma', system-ui, sans-serif;
  background: #fff;
  color: #1a1f3a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  transition: background-color .3s ease, color .3s ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* --------------------------------------------------------------------------
   3. CUSTOM PROPERTIES — Brand Colors & Shadows
   -------------------------------------------------------------------------- */
:root {
  --color-navy:      #1f2459;
  --color-navy-deep: #141838;
  --color-teal:      #3ad3b1;
  --color-coral:     #f08775;
  --color-surface:   #f7f8fb;
  --color-surface-2: #eef0f6;
  --color-border:    #e6e8ef;
  --color-muted:     #6b7088;
  --color-ink:       #1a1f3a;
  --shadow-soft: 0 10px 40px -20px rgba(31,36,89,0.35);
  --shadow-card: inset 0 1px 0 rgba(255,255,255,0.6), 0 10px 30px -18px rgba(31,36,89,0.28);
}

/* --------------------------------------------------------------------------
   4. CUSTOM COMPONENT CLASSES (from original HTML)
   -------------------------------------------------------------------------- */
.bg-hero {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(58,211,177,0.22), transparent 60%),
    radial-gradient(900px 500px at 0% 10%, rgba(240,135,117,0.18), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f7f8fb 100%);
}
.bg-cta { background: linear-gradient(135deg, #141838, #1f2459); }
.text-gradient {
  background: linear-gradient(135deg, #141838, #2a8a8a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.22,1,0.36,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.icon { width: 22px; height: 22px; stroke-width: 2; }

/* Theme toggle */
.theme-toggle {
  width: 40px; height: 40px; border-radius: 9999px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #e6e8ef; background: rgba(255,255,255,0.7); color: #1f2459;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}
.theme-toggle:hover { transform: translateY(-1px); }
.theme-toggle .i-sun { display: none; }
.theme-toggle .i-moon { display: block; }

/* --------------------------------------------------------------------------
   5. TAILWIND UTILITY CLASSES — Compiled Subset
   -------------------------------------------------------------------------- */

/* --- Layout --- */
.relative   { position: relative; }
.absolute   { position: absolute; }
.sticky     { position: sticky; }
.inset-0    { inset: 0; }
.top-0      { top: 0; }
.-top-20    { top: -5rem; }
.-left-20   { left: -5rem; }
.-bottom-24 { bottom: -6rem; }
.-right-16  { right: -4rem; }
.z-40       { z-index: 40; }
.overflow-hidden  { overflow: hidden; }
.overflow-x-auto  { overflow-x: auto; }

/* --- Display --- */
.flex        { display: flex; }
.inline-flex { display: inline-flex; }
.grid        { display: grid; }
.block       { display: block; }
.hidden      { display: none; }

/* --- Flexbox --- */
.flex-1         { flex: 1 1 0%; }
.flex-col       { flex-direction: column; }
.flex-wrap      { flex-wrap: wrap; }
.items-center   { align-items: center; }
.items-end      { align-items: flex-end; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.min-w-max      { min-width: max-content; }
.place-items-center { place-items: center; }

/* --- Grid --- */
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.col-span-2  { grid-column: span 2 / span 2; }

/* --- Gap --- */
.gap-1\.5 { gap: 0.375rem; }
.gap-2    { gap: 0.5rem; }
.gap-3    { gap: 0.75rem; }
.gap-4    { gap: 1rem; }
.gap-5    { gap: 1.25rem; }
.gap-6    { gap: 1.5rem; }
.gap-8    { gap: 2rem; }
.gap-10   { gap: 2.5rem; }
.gap-12   { gap: 3rem; }

/* --- Sizing --- */
.w-full    { width: 100%; }
.w-px      { width: 1px; }
.w-1\.5    { width: 0.375rem; }
.w-2       { width: 0.5rem; }
.w-2\.5    { width: 0.625rem; }
.w-3       { width: 0.75rem; }
.w-10      { width: 2.5rem; }
.w-11      { width: 2.75rem; }
.w-12      { width: 3rem; }
.w-16      { width: 4rem; }
.w-80      { width: 20rem; }
.h-full    { height: 100%; }
.h-px      { height: 1px; }
.h-1\.5    { height: 0.375rem; }
.h-2       { height: 0.5rem; }
.h-2\.5    { height: 0.625rem; }
.h-3       { height: 0.75rem; }
.h-8       { height: 2rem; }
.h-10      { height: 2.5rem; }
.h-11      { height: 2.75rem; }
.h-12      { height: 3rem; }
.h-20      { height: 5rem; }
.h-80      { height: 20rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-7xl { max-width: 80rem; }

/* --- Margin --- */
.mx-auto   { margin-left: auto; margin-right: auto; }
.ms-3      { margin-inline-start: 0.75rem; }
.mt-0\.5   { margin-top: 0.125rem; }
.mt-1      { margin-top: 0.25rem; }
.mt-2      { margin-top: 0.5rem; }
.mt-3      { margin-top: 0.75rem; }
.mt-4      { margin-top: 1rem; }
.mt-5      { margin-top: 1.25rem; }
.mt-6      { margin-top: 1.5rem; }
.mt-8      { margin-top: 2rem; }
.mt-10     { margin-top: 2.5rem; }
.mt-12     { margin-top: 3rem; }
.mb-3      { margin-bottom: 0.75rem; }
.mb-4      { margin-bottom: 1rem; }

/* --- Padding --- */
.px-3    { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4    { padding-left: 1rem; padding-right: 1rem; }
.px-5    { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-7    { padding-left: 1.75rem; padding-right: 1.75rem; }
.py-1    { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3    { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.py-4    { padding-top: 1rem; padding-bottom: 1rem; }
.py-5    { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-10   { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-12   { padding-top: 3rem; padding-bottom: 3rem; }
.py-20   { padding-top: 5rem; padding-bottom: 5rem; }
.pt-20   { padding-top: 5rem; }
.pb-24   { padding-bottom: 6rem; }
.p-3     { padding: 0.75rem; }
.p-4     { padding: 1rem; }
.p-5     { padding: 1.25rem; }
.p-6     { padding: 1.5rem; }
.p-7     { padding: 1.75rem; }
.p-8     { padding: 2rem; }

/* --- Space --- */
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }

/* --- Typography --- */
.text-\[11px\]  { font-size: 11px; line-height: 1rem; }
.text-xs        { font-size: 0.75rem; line-height: 1rem; }
.text-sm        { font-size: 0.875rem; line-height: 1.25rem; }
.text-base      { font-size: 1rem; line-height: 1.5rem; }
.text-lg        { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl        { font-size: 1.25rem; line-height: 1.75rem; }
.text-3xl       { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl       { font-size: 2.25rem; line-height: 2.5rem; }
.font-medium    { font-weight: 500; }
.font-semibold  { font-weight: 600; }
.font-bold      { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.leading-tight     { line-height: 1.25; }
.leading-\[1\.15\] { line-height: 1.15; }
.leading-relaxed   { line-height: 1.625; }
.tracking-tight    { letter-spacing: -0.025em; }
.tracking-widest   { letter-spacing: 0.1em; }
.uppercase    { text-transform: uppercase; }
.text-center  { text-align: center; }
.whitespace-nowrap { white-space: nowrap; }
.outline-none { outline: 2px solid transparent; outline-offset: 2px; }

/* --- Colors — Text --- */
.text-white         { color: #ffffff; }
.text-white\/65     { color: rgba(255,255,255,0.65); }
.text-white\/70     { color: rgba(255,255,255,0.70); }
.text-white\/75     { color: rgba(255,255,255,0.75); }
.text-navy-deep     { color: #141838; }
.text-navy          { color: #1f2459; }
.text-muted         { color: #6b7088; }
.text-ink           { color: #1a1f3a; }
.text-teal          { color: #3ad3b1; }
.text-coral         { color: #f08775; }

/* --- Colors — Background --- */
.bg-white           { background-color: #ffffff; }
.bg-white\/5        { background-color: rgba(255,255,255,0.05); }
.bg-white\/10       { background-color: rgba(255,255,255,0.10); }
.bg-white\/15       { background-color: rgba(255,255,255,0.15); }
.bg-white\/70       { background-color: rgba(255,255,255,0.70); }
.bg-white\/75       { background-color: rgba(255,255,255,0.75); }
.bg-navy            { background-color: #1f2459; }
.bg-navy-deep       { background-color: #141838; }
.bg-surface         { background-color: #f7f8fb; }
.bg-surface-2       { background-color: #eef0f6; }
.bg-teal            { background-color: #3ad3b1; }
.bg-teal\/15        { background-color: rgba(58,211,177,0.15); }
.bg-teal\/70        { background-color: rgba(58,211,177,0.70); }
.bg-coral\/10       { background-color: rgba(240,135,117,0.10); }
.bg-coral\/70       { background-color: rgba(240,135,117,0.70); }
.bg-amber-300\/70   { background-color: rgba(252,211,77,0.70); }

/* --- Borders --- */
.border     { border-width: 1px; border-style: solid; border-color: transparent; }
.border-b   { border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: transparent; }
.border-t   { border-top-width: 1px; border-top-style: solid; border-top-color: transparent; }
.border-border      { border-color: #e6e8ef; }
.border-white\/10   { border-color: rgba(255,255,255,0.10); }

/* --- Border Radius --- */
.rounded-full   { border-radius: 9999px; }
.rounded-t-md   { border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; }
.rounded-xl     { border-radius: 0.75rem; }
.rounded-2xl    { border-radius: 1rem; }
.rounded-3xl    { border-radius: 1.5rem; }
.rounded-\[2rem\] { border-radius: 2rem; }

/* --- Shadows --- */
.shadow-soft { box-shadow: var(--shadow-soft); }
.shadow-card { box-shadow: var(--shadow-card); }

/* --- Opacity --- */
.opacity-30 { opacity: 0.3; }
.opacity-80 { opacity: 0.8; }

/* --- Backdrop --- */
.backdrop-blur-md { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.backdrop-blur    { backdrop-filter: blur(8px);  -webkit-backdrop-filter: blur(8px); }

/* --- Transitions --- */
.transition {
  transition-property: color, background-color, border-color, opacity, box-shadow, transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* --- Hover States --- */
.hover\:opacity-95:hover         { opacity: 0.95; }
.hover\:text-navy:hover          { color: #1f2459; }
.hover\:bg-surface:hover         { background-color: #f7f8fb; }
.hover\:bg-white\/10:hover       { background-color: rgba(255,255,255,0.10); }
.hover\:shadow-card:hover        { box-shadow: var(--shadow-card); }
.hover\:border-coral\/50:hover   { border-color: rgba(240,135,117,0.50); }
.hover\:border-teal\/60:hover    { border-color: rgba(58,211,177,0.60); }
.hover\:border-navy\/40:hover    { border-color: rgba(31,36,89,0.40); }
.hover\:underline:hover          { text-decoration-line: underline; }
.hover\:border-navy:hover        { border-color: #1f2459; }

/* --- Focus States --- */
.focus\:border-navy:focus   { border-color: #1f2459; }
.focus\:outline-none:focus  { outline: none; }

/* --------------------------------------------------------------------------
   6. DARK MODE
   -------------------------------------------------------------------------- */
html.dark body { background: #0b0e22; color: #e8eaf2; }

html.dark .bg-white           { background-color: #131736 !important; }
html.dark .bg-surface         { background-color: #0f1330 !important; }
html.dark .bg-surface-2       { background-color: #1a1f47 !important; }
html.dark .bg-navy            { background-color: #3a4396 !important; }
html.dark .bg-navy-deep       { background-color: #0b0e22 !important; }
html.dark .bg-white\/75       { background-color: rgba(13,16,40,0.75) !important; }
html.dark .bg-white\/70       { background-color: rgba(19,23,54,0.70) !important; }
html.dark .bg-white\/5        { background-color: rgba(255,255,255,0.05) !important; }
html.dark .bg-white\/10       { background-color: rgba(255,255,255,0.10) !important; }

html.dark .text-navy-deep     { color: #f1f3fb !important; }
html.dark .text-navy          { color: #cfd3ea !important; }
html.dark .text-muted         { color: #9aa0c4 !important; }
html.dark .text-ink           { color: #e8eaf2 !important; }
html.dark a.hover\:text-navy:hover { color: #ffffff !important; }

html.dark .border-border      { border-color: #2a3060 !important; }
html.dark .hover\:border-coral\/50:hover { border-color: rgba(240,135,117,0.5) !important; }
html.dark .hover\:border-teal\/60:hover  { border-color: rgba(58,211,177,0.6) !important; }
html.dark .focus\:border-navy:focus      { border-color: #7a83c8 !important; }

html.dark .bg-hero {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(58,211,177,0.18), transparent 60%),
    radial-gradient(900px 500px at 0% 10%, rgba(240,135,117,0.14), transparent 60%),
    linear-gradient(180deg, #0b0e22 0%, #0f1330 100%) !important;
}
html.dark .bg-cta { background: linear-gradient(135deg, #0b0e22, #1a1f47) !important; }
html.dark .text-gradient {
  background: linear-gradient(135deg, #9aa6ff, #3ad3b1);
  -webkit-background-clip: text; background-clip: text; color: transparent !important;
}

html.dark .shadow-card { box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 30px -18px rgba(0,0,0,0.6) !important; }
html.dark .shadow-soft { box-shadow: 0 10px 40px -20px rgba(0,0,0,0.7) !important; }

html.dark input, html.dark textarea, html.dark select {
  background-color: #1a1f47 !important;
  color: #e8eaf2 !important;
  border-color: #2a3060 !important;
}
html.dark input::placeholder, html.dark textarea::placeholder { color: #7a82a8 !important; }
html.dark #demoForm { background-color: #131736 !important; color: #e8eaf2 !important; }

html.dark .theme-toggle { background: rgba(26,31,71,0.7); color: #e8eaf2; border-color: #2a3060; }
html.dark .theme-toggle .i-sun  { display: block; }
html.dark .theme-toggle .i-moon { display: none; }

html.dark .hover\:bg-white\/10:hover { background-color: rgba(255,255,255,0.12) !important; }

/* --------------------------------------------------------------------------
   7. RESPONSIVE — sm (640px)
   -------------------------------------------------------------------------- */
@media (min-width: 640px) {
  .sm\:px-8    { padding-left: 2rem; padding-right: 2rem; }
  .sm\:py-28   { padding-top: 7rem; padding-bottom: 7rem; }
  .sm\:pt-28   { padding-top: 7rem; }
  .sm\:pb-32   { padding-bottom: 8rem; }
  .sm\:p-14    { padding: 3.5rem; }
  .sm\:p-7     { padding: 1.75rem; }
  .sm\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .sm\:text-5xl { font-size: 3rem; line-height: 1; }
  .sm\:block   { display: block; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:w-16    { width: 4rem; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   8. RESPONSIVE — md (768px)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  .md\:flex         { display: flex; }
  .md\:grid-cols-3  { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4  { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:col-span-2   { grid-column: span 2 / span 2; }
  .hidden.md\:flex  { display: flex; }
}

/* --------------------------------------------------------------------------
   9. RESPONSIVE — lg (1024px)
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
  .lg\:grid-cols-3  { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4  { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .lg\:col-span-5   { grid-column: span 5 / span 5; }
  .lg\:col-span-7   { grid-column: span 7 / span 7; }
  .lg\:col-span-2   { grid-column: span 2 / span 2; }
  .lg\:text-6xl     { font-size: 3.75rem; line-height: 1; }
  .lg\:block        { display: block; }
}

/* --------------------------------------------------------------------------
   10. RESPONSIVE HIDDEN + FLEX COMBOS
   -------------------------------------------------------------------------- */
/* nav: hidden on mobile, flex on md */
@media (min-width: 768px) {
  .hidden.md\:flex,
  nav.hidden { display: flex; }
}
/* stat block: hidden on mobile, block on sm */
@media (min-width: 640px) {
  .hidden.sm\:block { display: block; }
}

/* --------------------------------------------------------------------------
   11. FORM & INPUT STYLES
   -------------------------------------------------------------------------- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  background-color: #ffffff;
  border: 1px solid #e6e8ef;
  border-radius: 0.75rem;
  outline: none;
  transition: border-color 150ms ease;
  color: #1a1f3a;
}
input:focus, textarea:focus, select:focus { border-color: #1f2459; }

/* --------------------------------------------------------------------------
   12. WORDPRESS ALIGNMENT (Gutenberg compat)
   -------------------------------------------------------------------------- */
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft   { float: left; margin-right: 1.5rem; }
.alignright  { float: right; margin-left: 1.5rem; }
.wp-caption  { max-width: 100%; }
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
}
