/* ==========================================================================
   کسبوکار.com — Design Tokens
   یک منبع واحد برای رنگ، تایپوگرافی، فاصله و افکت‌ها.
   هر دو تجربه (جزیره و وب‌سایت) از این فایل تغذیه می‌شوند.
   ========================================================================== */

/* --- فونت‌ها ---------------------------------------------------------------
   اگر فایل‌های فونت را در assets/fonts/ قرار دهید، به صورت محلی لود می‌شوند.
   در غیر این صورت CDN و سپس فونت سیستم جایگزین می‌شود.
--------------------------------------------------------------------------- */
@font-face {
  font-family: "Estedad Local";
  src: url("../fonts/Estedad-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Estedad Local";
  src: url("../fonts/Estedad-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Estedad Local";
  src: url("../fonts/Estedad-Black.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn Local";
  src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn Local";
  src: url("../fonts/Vazirmatn-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  /* ---- رنگ پایه ---- */
  --ink: #03050c;
  --navy: #071022;
  --teal: #63e6f3;
  --violet: #9d8cff;
  --pink: #ff3f92;
  --mint: #56f2c5;
  --amber: #ffd268;
  --text: #ffffff;
  --muted: #9faec4;

  /* ---- سطوح شیشه‌ای ---- */
  --glass-1: rgba(7, 16, 34, 0.55);
  --glass-2: rgba(7, 16, 34, 0.78);
  --glass-3: rgba(10, 22, 44, 0.92);
  --line: rgba(159, 174, 196, 0.16);
  --line-strong: rgba(99, 230, 243, 0.32);
  --line-soft: rgba(159, 174, 196, 0.08);

  /* ---- گرادیان‌ها ---- */
  --grad-drive: linear-gradient(135deg, #63e6f3 0%, #4b83ff 52%, #9d8cff 100%);
  --grad-site: linear-gradient(135deg, #9d8cff 0%, #ff3f92 100%);
  --grad-mint: linear-gradient(135deg, #56f2c5 0%, #63e6f3 100%);
  --grad-text: linear-gradient(100deg, #ffffff 0%, #cfe9f5 40%, #9d8cff 100%);

  /* ---- سایه ---- */
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 18px 44px rgba(0, 0, 0, 0.48);
  --shadow-lg: 0 36px 90px rgba(0, 0, 0, 0.62);
  --glow-teal: 0 0 0 1px rgba(99, 230, 243, 0.28), 0 18px 46px rgba(30, 140, 190, 0.28);
  --glow-violet: 0 0 0 1px rgba(157, 140, 255, 0.3), 0 18px 46px rgba(120, 80, 220, 0.26);

  /* ---- شعاع ---- */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;
  --r-pill: 999px;

  /* ---- فاصله ---- */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;

  /* ---- تایپوگرافی ---- */
  --font-display: "Estedad Local", "Estedad", "Vazirmatn Local", "Vazirmatn",
    "IRANSans", "Segoe UI", Tahoma, sans-serif;
  --font-body: "Vazirmatn Local", "Vazirmatn", "Estedad Local", "Estedad",
    "IRANSans", "Segoe UI", Tahoma, sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", "Cascadia Mono",
    Menlo, Consolas, monospace;

  --t-hero: clamp(2rem, 1.15rem + 3.6vw, 4.1rem);
  --t-h1: clamp(1.75rem, 1.1rem + 2.6vw, 3.1rem);
  --t-h2: clamp(1.45rem, 1.05rem + 1.7vw, 2.3rem);
  --t-h3: clamp(1.15rem, 0.98rem + 0.8vw, 1.5rem);
  --t-body: clamp(0.95rem, 0.9rem + 0.24vw, 1.075rem);
  --t-sm: 0.875rem;
  --t-xs: 0.75rem;

  /* ---- چیدمان ---- */
  --wrap: 1240px;
  --wrap-narrow: 940px;
  --nav-h: 74px;

  /* ---- حرکت ---- */
  --ease: cubic-bezier(0.22, 0.68, 0.31, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-1: 160ms;
  --dur-2: 320ms;
  --dur-3: 620ms;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 18px);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.85;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.32;
  letter-spacing: -0.01em;
  margin: 0;
}

p {
  margin: 0;
}

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

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* اعداد لاتین و کدها همیشه LTR بمانند */
.ltr,
code,
kbd,
samp {
  direction: ltr;
  unicode-bidi: isolate;
  font-family: var(--font-mono);
}

/* ==========================================================================
   الگوهای مشترک
   ========================================================================== */
.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.wrap-narrow {
  width: min(100% - 2.5rem, var(--wrap-narrow));
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  direction: ltr;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal));
}

.muted {
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--glass-1);
  font-size: var(--t-xs);
  color: var(--muted);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(86, 242, 197, 0.16);
}

/* دکمه‌ها */
.btn {
  --btn-bg: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  padding: 0.9rem 1.6rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--btn-bg);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--dur-1) var(--ease), box-shadow var(--dur-2) var(--ease),
    border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  --btn-bg: var(--grad-drive);
  border-color: transparent;
  color: #04121c;
  box-shadow: var(--glow-teal);
}

.btn-accent {
  --btn-bg: var(--grad-site);
  border-color: transparent;
  color: #14041a;
  box-shadow: var(--glow-violet);
}

.btn-ghost {
  --btn-bg: var(--glass-1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.btn-ghost:hover {
  border-color: var(--line-strong);
}

/* کارت شیشه‌ای */
.glass {
  background: var(--glass-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}

/* ==========================================================================
   دسترس‌پذیری
   ========================================================================== */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

.skip-link {
  position: absolute;
  inset-inline-start: 50%;
  top: -80px;
  transform: translateX(50%);
  z-index: 999;
  padding: 0.7rem 1.2rem;
  background: var(--teal);
  color: #04121c;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  font-weight: 700;
  transition: top var(--dur-2) var(--ease);
}

.skip-link:focus {
  top: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
