/* ==========================================================================
   Base: fonts, design tokens, reset, background, utilities
   ========================================================================== */

@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Light.woff2") format("woff2");     font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2");   font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Medium.woff2") format("woff2");    font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-SemiBold.woff2") format("woff2");  font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2");      font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-ExtraBold.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

:root {
    color-scheme: dark;

    --bg: #070a14;
    --bg-raised: #0d1226;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.07);
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.15);

    --text: #f1f5f9;
    --text-soft: #cbd5e1;
    --muted: #94a3b8;
    --faint: #64748b;

    --brand: #8b5cf6;
    --brand-2: #d946ef;
    --brand-soft: #c4b5fd;
    --brand-gradient: linear-gradient(115deg, #7c3aed 0%, #c026d3 100%);

    --ok: #34d399;
    --ok-bg: rgba(16, 185, 129, 0.13);
    --warn: #fbbf24;
    --warn-bg: rgba(245, 158, 11, 0.13);
    --danger: #fb7185;
    --danger-bg: rgba(244, 63, 94, 0.14);
    --info: #60a5fa;
    --info-bg: rgba(59, 130, 246, 0.14);

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 26px;

    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.28);
    --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.5);
    --focus-ring: 0 0 0 3px rgba(139, 92, 246, 0.32);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: "Vazirmatn", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Static ambient background (cheap, no blur filters or animation) */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(900px 520px at 88% -8%, rgba(124, 58, 237, 0.30), transparent 62%),
        radial-gradient(760px 480px at -6% 104%, rgba(219, 39, 119, 0.20), transparent 60%),
        radial-gradient(520px 360px at 46% 52%, rgba(16, 185, 129, 0.07), transparent 70%);
}
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
    mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
}

button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
a { color: inherit; }

:focus-visible { outline: 2px solid var(--brand-soft); outline-offset: 2px; }

.hidden { display: none !important; }
.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;
}

.icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    flex: 0 0 auto;
    vertical-align: middle;
}

.ltr { direction: ltr; unicode-bidi: plaintext; }
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; direction: ltr; }

::selection { background: rgba(139, 92, 246, 0.45); }

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