/* ================================================================
   BASE — Reset & global styles
   ================================================================ */

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

body {
    background: radial-gradient(circle at 10% 30%, #f8fafc, #eef2f5);
    font-family: var(--sans);
    color: #0b1120;
    line-height: 1.4;
    /* smooth scroll handled by js/scroll.js — no scroll-behavior here */
}

/* Offset anchor targets so sticky navbar doesn't cover section titles */
[id] {
    scroll-margin-top: calc(var(--navbar-h, 60px) + 24px);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
}

/* ── RTL overrides (Persian) ────────────────────────────────── */

[dir="rtl"] body {
    font-family: 'KalamehWebFaNum', system-ui, sans-serif;
}

[dir="rtl"] .why-card::before {
    inset: 0 0 0 auto;
    /* move accent bar to right side */
    right: 0;
    left: auto;
}

[dir="rtl"] .product-link:hover {
    transform: translateX(-2px);
}

[dir="rtl"] .editor-titlebar {
    direction: ltr;
    /* keep code editor always LTR */
}

[dir="rtl"] .editor-body {
    direction: ltr;
}