/* ==========================================================================
   Fiveta Music — shared site styles
   Used by every page built with tools/build-site.js.

   THEMES
   Colours are tokens. Dark is the base; light is applied when
     - the visitor picked "light"     -> <html data-theme="light">
     - or picked nothing ("auto") and the OS prefers light.
   Never hard-code a text/surface colour in a component — use a token.
   ========================================================================== */

/* ---------- Tokens: shared + dark (default) ---------- */
:root {
    /* Brand (same in both themes) */
    --brand-1: #667eea;
    --brand-2: #764ba2;
    --primary-color: #6366f1;
    --secondary-color: #ec4899;
    --accent-color: #8b5cf6;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --gradient-5: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --gradient-6: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);

    /* Layout */
    --header-h: 72px;
    --container: 1200px;
    --gutter: clamp(16px, 4vw, 40px);
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --ease: cubic-bezier(.2, .7, .2, 1);

    /* Dark theme */
    --bg: #0b1020;
    --bg-elevated: #0e1426;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text-strong: #ffffff;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent-text: #a5b4fc;           /* links, eyebrow text, focus ring */
    --accent-soft: rgba(99, 102, 241, 0.14);
    --accent-border: rgba(99, 102, 241, 0.35);
    --header-bg: rgba(11, 16, 32, 0.6);
    --header-bg-scrolled: rgba(11, 16, 32, 0.88);
    --footer-bg: rgba(8, 12, 26, 0.7);
    --backdrop: rgba(2, 6, 23, 0.6);
    --card-shadow: none;
    --card-shadow-hover: 0 18px 40px rgba(2, 6, 23, 0.45);
    --shadow-glow: 0 10px 30px rgba(99, 102, 241, 0.3);
    --text-gradient: linear-gradient(135deg, #a5b4fc 0%, #c4b5fd 50%, #f9a8d4 100%);
    --success-bg: rgba(52, 211, 153, .16);
    --success-fg: #6ee7b7;
    --page-glow:
        radial-gradient(600px 400px at 85% -5%, rgba(99, 102, 241, 0.18), transparent 70%),
        radial-gradient(500px 400px at 0% 100%, rgba(236, 72, 153, 0.12), transparent 70%),
        linear-gradient(180deg, #11172b 0%, #0b1020 60%);
    --callout-bg:
        radial-gradient(400px 200px at 100% 0%, rgba(236, 72, 153, .14), transparent 70%),
        linear-gradient(135deg, rgba(102, 126, 234, .16), rgba(118, 75, 162, .16));

    /* legacy names used by older inline styles */
    --dark-bg: var(--bg);
    --light-bg: var(--bg-elevated);

    color-scheme: dark;
}

/* ---------- Light theme tokens ---------- */
/* Written twice on purpose: once for an explicit choice, once for "auto + OS light". */
:root[data-theme="light"] {
    --bg: #f6f7fb;
    --bg-elevated: #ffffff;
    --surface: #ffffff;
    --surface-hover: #f3f4fb;
    --border: rgba(15, 23, 42, 0.09);
    --border-strong: rgba(15, 23, 42, 0.18);
    --text-strong: #0b1020;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #5b6b82;
    --accent-text: #4f46e5;
    --accent-soft: rgba(99, 102, 241, 0.1);
    --accent-border: rgba(99, 102, 241, 0.3);
    --header-bg: rgba(246, 247, 251, 0.7);
    --header-bg-scrolled: rgba(255, 255, 255, 0.9);
    --footer-bg: #eef0f7;
    --backdrop: rgba(15, 23, 42, 0.35);
    --card-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(15, 23, 42, 0.04);
    --card-shadow-hover: 0 18px 40px rgba(15, 23, 42, 0.1);
    --shadow-glow: 0 10px 26px rgba(99, 102, 241, 0.28);
    --text-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
    --success-bg: rgba(16, 185, 129, .12);
    --success-fg: #047857;
    --page-glow:
        radial-gradient(600px 400px at 85% -5%, rgba(99, 102, 241, 0.14), transparent 70%),
        radial-gradient(500px 400px at 0% 100%, rgba(236, 72, 153, 0.08), transparent 70%),
        linear-gradient(180deg, #eef0fb 0%, #f6f7fb 60%);
    --callout-bg:
        radial-gradient(400px 200px at 100% 0%, rgba(236, 72, 153, .1), transparent 70%),
        linear-gradient(135deg, rgba(102, 126, 234, .1), rgba(118, 75, 162, .1));
    color-scheme: light;
}
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg: #f6f7fb;
        --bg-elevated: #ffffff;
        --surface: #ffffff;
        --surface-hover: #f3f4fb;
        --border: rgba(15, 23, 42, 0.09);
        --border-strong: rgba(15, 23, 42, 0.18);
        --text-strong: #0b1020;
        --text-primary: #0f172a;
        --text-secondary: #334155;
        --text-muted: #5b6b82;
        --accent-text: #4f46e5;
        --accent-soft: rgba(99, 102, 241, 0.1);
        --accent-border: rgba(99, 102, 241, 0.3);
        --header-bg: rgba(246, 247, 251, 0.7);
        --header-bg-scrolled: rgba(255, 255, 255, 0.9);
        --footer-bg: #eef0f7;
        --backdrop: rgba(15, 23, 42, 0.35);
        --card-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(15, 23, 42, 0.04);
        --card-shadow-hover: 0 18px 40px rgba(15, 23, 42, 0.1);
        --shadow-glow: 0 10px 26px rgba(99, 102, 241, 0.28);
        --text-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
        --success-bg: rgba(16, 185, 129, .12);
        --success-fg: #047857;
        --page-glow:
            radial-gradient(600px 400px at 85% -5%, rgba(99, 102, 241, 0.14), transparent 70%),
            radial-gradient(500px 400px at 0% 100%, rgba(236, 72, 153, 0.08), transparent 70%),
            linear-gradient(180deg, #eef0fb 0%, #f6f7fb 60%);
        --callout-bg:
            radial-gradient(400px 200px at 100% 0%, rgba(236, 72, 153, .1), transparent 70%),
            linear-gradient(135deg, rgba(102, 126, 234, .1), rgba(118, 75, 162, .1));
        color-scheme: light;
    }
}

/* Smooth colour change when the visitor switches theme (class set briefly by site.js) */
html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
    transition: background-color .3s ease, border-color .3s ease, color .3s ease, fill .3s ease !important;
}

/* English is applied by JS; hide the Persian markup for that instant (see <head> script) */
html.i18n-pending body { visibility: hidden; }

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

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

body {
    font-family: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

main { flex: 1 0 auto; }

[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; }

:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 3px;
    border-radius: 6px;
}

[tabindex="-1"]:focus { outline: none; }

::selection { background: rgba(99, 102, 241, 0.35); }

.animated-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: var(--page-glow);
}

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: fixed;
    top: 8px;
    inset-inline-start: 8px;
    z-index: 2000;
    padding: .6rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    transform: translateY(-150%);
    transition: transform .2s var(--ease);
}
.skip-link:focus { transform: none; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .85rem 1.6rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--primary {
    background: var(--gradient-1);
    color: #fff;
    box-shadow: var(--shadow-glow);
}
.btn--primary:hover { box-shadow: 0 14px 36px rgba(99, 102, 241, 0.45); }
.btn--ghost {
    background: var(--surface);
    color: var(--text-primary);
    border-color: var(--border-strong);
    box-shadow: var(--card-shadow);
}
.btn--ghost:hover { background: var(--surface-hover); border-color: var(--accent-border); }
.btn--sm { padding: .55rem 1.1rem; font-size: .9rem; }
.btn--lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* Square icon button (theme toggle, menu, back-to-top) */
.icon-button {
    width: 40px; height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.icon-button:hover { background: var(--surface-hover); color: var(--text-strong); border-color: var(--border-strong); }

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: 1000;
    height: var(--header-h);
    border-bottom: 1px solid transparent;
    transition: border-color .3s;
}
/* The blur lives on a pseudo-element: backdrop-filter on the header itself would
   become the containing block for the fixed mobile drawer and clip it. */
.site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--header-bg);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    transition: background .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }
.site-header.is-scrolled::before { background: var(--header-bg-scrolled); }
.site-header__inner {
    height: 100%;
    max-width: 1320px;
    margin-inline: auto;
    padding-inline: var(--gutter);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -.01em;
    flex-shrink: 0;
}
.site-brand img { width: 36px; height: 36px; border-radius: 10px; }
.site-brand span {
    background: var(--text-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.site-nav { flex: 1; }
.site-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: .25rem;
}
.site-nav a {
    display: block;
    padding: .5rem .85rem;
    border-radius: 999px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: .95rem;
    transition: color .2s, background .2s;
}
.site-nav a:hover { color: var(--text-strong); background: var(--surface-hover); }
.site-nav a[aria-current="page"] {
    color: var(--text-strong);
    background: var(--accent-soft);
}
.site-nav__extra { display: none; }

.site-actions {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-shrink: 0;
}

.lang-toggle {
    display: inline-flex;
    padding: 3px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
}
.lang-toggle button {
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-weight: 700;
    font-size: .8rem;
    padding: .35rem .7rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.lang-toggle button[aria-pressed="true"] { background: var(--gradient-1); color: #fff; }
.lang-toggle button:not([aria-pressed="true"]):hover { color: var(--text-strong); }

/* Theme toggle: shows the icon of the current mode */
.theme-toggle i { display: none; font-size: 1rem; }
.theme-toggle[data-mode="auto"] .ti-auto,
.theme-toggle[data-mode="light"] .ti-light,
.theme-toggle[data-mode="dark"] .ti-dark { display: inline-block; }

.site-menu-btn {
    display: none;
    width: 42px; height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
    position: relative;
}
.site-menu-btn span,
.site-menu-btn span::before,
.site-menu-btn span::after {
    position: absolute;
    left: 50%;
    width: 18px; height: 2px;
    margin-left: -9px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .25s var(--ease), opacity .2s;
}
.site-menu-btn span { top: 50%; margin-top: -1px; }
.site-menu-btn span::before, .site-menu-btn span::after { content: ''; left: 0; margin-left: 0; }
.site-menu-btn span::before { transform: translateY(-6px); }
.site-menu-btn span::after { transform: translateY(6px); }
.site-menu-btn[aria-expanded="true"] span { background: transparent; }
.site-menu-btn[aria-expanded="true"] span::before { transform: rotate(45deg); background: var(--text-primary); }
.site-menu-btn[aria-expanded="true"] span::after { transform: rotate(-45deg); background: var(--text-primary); }

.site-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 998;
    background: var(--backdrop);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity .25s;
}
.site-nav-backdrop.is-visible { opacity: 1; }

@media (max-width: 1060px) {
    .site-cta { display: none; }
}
@media (max-width: 960px) {
    .site-menu-btn { display: inline-block; }
    .site-nav {
        position: fixed;
        inset-block: 0;
        inset-inline-end: 0;
        z-index: 999;
        width: min(320px, 86vw);
        padding: calc(var(--header-h) + 8px) 1.25rem 1.5rem;
        background: var(--bg-elevated);
        border-inline-start: 1px solid var(--border);
        box-shadow: var(--card-shadow-hover);
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        overflow-y: auto;
        /* stays inside the viewport while closed so it never causes horizontal scroll */
        opacity: 0;
        transform: translateX(24px);
        visibility: hidden;
        pointer-events: none;
        transition: transform .3s var(--ease), opacity .25s, visibility 0s linear .3s;
    }
    [dir="rtl"] .site-nav { transform: translateX(-24px); }
    .site-nav.is-open {
        opacity: 1;
        transform: none !important;
        visibility: visible;
        pointer-events: auto;
        transition: transform .3s var(--ease), opacity .25s;
    }
    .site-nav ul { flex-direction: column; gap: .25rem; }
    .site-nav a { padding: .8rem 1rem; border-radius: var(--radius-sm); font-size: 1.05rem; }
    .site-nav__extra { display: flex; flex-direction: column; gap: .75rem; margin-top: auto; }
    .site-nav__extra .btn { width: 100%; display: inline-flex; padding: .85rem 1.6rem; border-radius: 999px; color: #fff; }
    .site-brand, .site-actions { position: relative; z-index: 1001; }
    .site-header__inner { justify-content: space-between; }
}
@media (max-width: 359px) {
    .site-header .site-brand span { display: none; }
    .site-actions { gap: .4rem; }
}

body.nav-open { overflow: hidden; }

/* ---------- Section primitives ---------- */
.section { padding-block: clamp(4rem, 9vw, 7rem); }
.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto clamp(2.5rem, 5vw, 4rem);
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .9rem;
    margin-bottom: 1rem;
    border-radius: 999px;
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    color: var(--accent-text);
    font-size: .85rem;
    font-weight: 600;
}
.section-title {
    font-size: clamp(1.8rem, 4.5vw, 3rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.01em;
    margin-bottom: .75rem;
    color: var(--text-strong);
}
.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-secondary);
}
.text-gradient {
    background: var(--text-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---------- FAQ (help page) ---------- */
.faq-question { width: 100%; text-align: start; color: inherit; font: inherit; }
.faq-question i { transition: transform .25s var(--ease); }
.faq-item.active .faq-question i { transform: rotate(180deg); }

/* ---------- Reveal on scroll (only when JS is running) ---------- */
.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Back to top ---------- */
.back-to-top {
    position: fixed;
    bottom: 20px;
    inset-inline-end: 20px;
    z-index: 900;
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: var(--bg-elevated);
    color: var(--text-primary);
    box-shadow: var(--card-shadow-hover);
    cursor: pointer;
    display: grid;
    place-items: center;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity .25s, transform .25s var(--ease), background .2s;
}
.back-to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.back-to-top:hover { background: var(--surface-hover); }

/* ---------- Toast (theme change feedback) ---------- */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    z-index: 1100;
    padding: .6rem 1.1rem;
    border-radius: 999px;
    background: var(--text-strong);
    color: var(--bg);
    font-size: .9rem;
    font-weight: 600;
    box-shadow: var(--card-shadow-hover);
    opacity: 0;
    transform: translate(-50%, 10px);
    pointer-events: none;
    transition: opacity .2s, transform .2s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Footer ---------- */
.site-footer {
    margin-top: 4rem;
    padding-top: clamp(3rem, 6vw, 4.5rem);
    background: var(--footer-bg);
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
}
.site-footer__grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(4, 1fr);
    gap: 2.5rem;
}
.site-footer h2 {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 1rem;
}
.site-footer ul { list-style: none; display: grid; gap: .55rem; }
.site-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: .93rem;
    transition: color .2s;
}
.site-footer a:hover { color: var(--accent-text); }
.site-footer__about p { margin-block: .9rem 1.25rem; max-width: 34ch; font-size: .95rem; }
.site-footer__social { display: flex; gap: .6rem; flex-wrap: wrap; }
.site-footer__social a {
    width: 40px; height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: background .2s, transform .2s, color .2s;
}
.site-footer__social a:hover { background: var(--gradient-1); color: #fff; transform: translateY(-2px); }
.site-footer__bottom {
    margin-top: 3rem;
    padding-block: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: .88rem;
    color: var(--text-muted);
}
@media (max-width: 960px) {
    .site-footer__grid { grid-template-columns: repeat(2, 1fr); }
    .site-footer__about { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
    .site-footer__grid { gap: 2rem 1.25rem; }
}

/* ==========================================================================
   Page components
   ========================================================================== */

.page-hero {
    padding: calc(var(--header-h) + clamp(3rem, 8vw, 5.5rem)) 0 clamp(2.5rem, 6vw, 4rem);
    text-align: center;
}
.page-hero__title {
    font-size: clamp(2.2rem, 6vw, 3.75rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.02em;
    margin-bottom: 1rem;
    color: var(--text-strong);
}
.page-hero__lead {
    font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 640px;
    margin-inline: auto;
}
.page-hero__actions {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: .9rem;
    justify-content: center;
}
.breadcrumb {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-bottom: 1.25rem;
    font-size: .88rem;
    color: var(--text-muted);
    list-style: none;
}
.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-text); }
.breadcrumb li + li::before { content: '/'; margin-inline-end: .5rem; opacity: .5; }

/* Cards & grids */
.grid {
    display: grid;
    gap: clamp(1rem, 2.5vw, 1.5rem);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}
.card {
    position: relative;
    padding: clamp(1.4rem, 3vw, 2rem);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    transition: transform .3s var(--ease), border-color .3s, background .3s, box-shadow .3s;
}
a.card { display: block; text-decoration: none; color: inherit; }
.card--hover:hover, a.card:hover {
    transform: translateY(-4px);
    background: var(--surface-hover);
    border-color: var(--accent-border);
    box-shadow: var(--card-shadow-hover);
}
.card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .4rem; line-height: 1.45; color: var(--text-strong); }
.card p { color: var(--text-secondary); font-size: .97rem; }
.icon-badge {
    width: 52px; height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: var(--gradient-1);
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 1.1rem;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.25);
}
.icon-badge--2 { background: var(--gradient-2); box-shadow: 0 8px 20px rgba(245, 87, 108, .25); }
.icon-badge--3 { background: var(--gradient-3); box-shadow: 0 8px 20px rgba(79, 172, 254, .25); }
.icon-badge--4 { background: var(--gradient-4); box-shadow: 0 8px 20px rgba(67, 233, 123, .2); color: #052e16; }
.icon-badge--5 { background: var(--gradient-5); box-shadow: 0 8px 20px rgba(250, 112, 154, .25); color: #3b0a1a; }
.icon-badge--6 { background: var(--gradient-6); box-shadow: 0 8px 20px rgba(161, 140, 209, .25); color: #2e1065; }

/* Long-form documents (terms, privacy, cookies) */
.doc {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
    max-width: 1040px;
}
.toc {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    padding: 1.25rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
}
.toc h2 {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
    margin-bottom: .75rem;
}
.toc ol { list-style: none; display: grid; gap: .15rem; }
.toc a {
    display: block;
    padding: .4rem .6rem;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: .92rem;
    line-height: 1.5;
}
.toc a:hover, .toc a.is-active { color: var(--text-strong); background: var(--accent-soft); }
.prose h2 {
    font-size: clamp(1.3rem, 2.5vw, 1.6rem);
    font-weight: 700;
    margin: 2.5rem 0 .75rem;
    line-height: 1.4;
    color: var(--text-strong);
}
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--text-secondary); font-size: 1.05rem; line-height: 1.95; margin-bottom: 1rem; }
.prose a:not(.btn), .callout p a { color: var(--accent-text); }
@media (max-width: 820px) {
    .doc { grid-template-columns: 1fr; }
    .toc { position: static; }
}

/* Call-out strip */
.callout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem 2rem;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: var(--radius-lg);
    background: var(--callout-bg);
    border: 1px solid var(--accent-border);
}
.callout h2, .callout h3 { font-size: clamp(1.2rem, 2.6vw, 1.5rem); font-weight: 700; margin-bottom: .25rem; color: var(--text-strong); }
.callout p { color: var(--text-secondary); }
.callout .btn { flex-shrink: 0; }

/* Plain link styled in the accent colour */
.link { color: var(--accent-text); }

/* ==========================================================================
   Product components (features, AI, location, FAQ pages)
   ========================================================================== */

/* Feature status — every capability is labelled honestly */
.status {
    --status-fg: #047857;
    --status-bg: rgba(16, 185, 129, .12);
    --status-bd: rgba(16, 185, 129, .3);
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .2rem .65rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.6;
    white-space: nowrap;
    color: var(--status-fg);
    background: var(--status-bg);
    border: 1px solid var(--status-bd);
}
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--planned {
    --status-fg: #b45309;
    --status-bg: rgba(245, 158, 11, .12);
    --status-bd: rgba(245, 158, 11, .32);
}
.status--planned::before { background: transparent; border: 2px solid currentColor; width: 8px; height: 8px; box-sizing: border-box; }
:root:not([data-theme="light"]) .status { --status-fg: #6ee7b7; }
:root:not([data-theme="light"]) .status--planned { --status-fg: #fcd34d; }
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .status { --status-fg: #047857; }
    :root:not([data-theme="dark"]) .status--planned { --status-fg: #b45309; }
}
.card .status { margin-bottom: .9rem; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.card-head .icon-badge { margin-bottom: 1rem; }

.status-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem 1.5rem;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: .9rem;
}
.status-legend > span { display: inline-flex; align-items: center; gap: .5rem; }

/* Honest "in development" notice */
.notice {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.1rem 1.3rem;
    border-radius: var(--radius);
    background: rgba(245, 158, 11, .08);
    border: 1px solid rgba(245, 158, 11, .3);
    color: var(--text-secondary);
    max-width: 820px;
    margin-inline: auto;
}
.notice i { color: #f59e0b; font-size: 1.15rem; margin-top: .3rem; }
.notice strong { color: var(--text-strong); }
.notice--info { background: var(--accent-soft); border-color: var(--accent-border); }
.notice--info i { color: var(--accent-text); }

/* Feature group heading (features page) */
.feature-group { scroll-margin-top: calc(var(--header-h) + 16px); }
.feature-group + .feature-group { margin-top: clamp(4rem, 8vw, 6rem); }
.group-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin-bottom: 1.75rem;
}
.group-head h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 800; color: var(--text-strong); line-height: 1.3; }
.group-head p { color: var(--text-secondary); max-width: 560px; margin-top: .35rem; }
.group-head .btn { flex-shrink: 0; }

/* In-page section tabs (jump links) */
.jump-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem;
    margin-top: 2rem;
}
.jump-nav a {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem 1.1rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: .93rem;
    box-shadow: var(--card-shadow);
    transition: border-color .2s, color .2s, background .2s;
}
.jump-nav a:hover { border-color: var(--accent-border); color: var(--text-strong); background: var(--surface-hover); }

/* Flow diagram: ordered list rendered as connected steps */
.flow {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    counter-reset: flow;
    position: relative;
}
.flow > li {
    counter-increment: flow;
    position: relative;
    padding: 1.4rem 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
}
.flow > li::before {
    content: counter(flow);
    position: absolute;
    top: -12px;
    inset-inline-start: 1.25rem;
    min-width: 24px; height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--gradient-1);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
}
[dir="rtl"] .flow > li::before { content: counter(flow, persian); }
/* connector arrow between steps */
.flow > li + li::after {
    content: '';
    position: absolute;
    top: 50%;
    inset-inline-end: calc(100% + 2px);
    width: calc(1.25rem - 4px);
    height: 2px;
    background: linear-gradient(90deg, var(--brand-1), var(--brand-2));
    opacity: .7;
}
.flow h3 { font-size: 1.05rem; font-weight: 700; color: var(--text-strong); margin-bottom: .35rem; }
.flow p { color: var(--text-secondary); font-size: .93rem; }
.flow .icon-badge { width: 44px; height: 44px; font-size: 1.05rem; border-radius: 13px; margin-bottom: .9rem; }
.flow-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .75rem; }
.flow-chips span {
    padding: .15rem .55rem;
    border-radius: 999px;
    font-size: .76rem;
    background: var(--accent-soft);
    color: var(--accent-text);
}
@media (max-width: 960px) {
    .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.75rem; }
    .flow > li:nth-child(3)::after { display: none; }
}
@media (max-width: 560px) {
    .flow { grid-template-columns: 1fr; }
    .flow > li + li::after {
        top: auto;
        bottom: calc(100% + 2px);
        inset-inline-end: auto;
        inset-inline-start: 50%;
        width: 2px;
        height: calc(1.75rem - 4px);
        display: block !important;
    }
}

/* Example prompts (AI page) */
.prompt {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .9rem 1.1rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px dashed var(--border-strong);
    color: var(--text-primary);
    font-size: .98rem;
}
.prompt i { color: var(--accent-text); }
.prompt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: .75rem; }

/* Comparison table */
.compare-wrap {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--card-shadow);
}
.compare { width: 100%; border-collapse: collapse; min-width: 560px; }
.compare caption { text-align: start; padding: 1rem 1.25rem 0; color: var(--text-muted); font-size: .9rem; }
.compare th, .compare td { padding: .95rem 1.25rem; text-align: start; border-bottom: 1px solid var(--border); vertical-align: middle; }
.compare thead th { font-size: .85rem; color: var(--text-muted); font-weight: 600; }
.compare tbody th { font-weight: 600; color: var(--text-strong); }
.compare td { color: var(--text-secondary); }
.compare tr:last-child > * { border-bottom: 0; }
.compare .yes { color: var(--success-fg); }
.compare .no { color: var(--text-muted); }

/* Map illustration card (location page) */
.map-card {
    position: relative;
    border-radius: 28px;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    box-shadow: var(--card-shadow-hover);
    overflow: hidden;
}
.map-card svg { width: 100%; height: auto; display: block; }
.map-land { fill: var(--accent-soft); stroke: var(--accent-border); stroke-width: 1.5; }
.map-grid { stroke: var(--border); stroke-width: 1; }
.map-route { fill: none; stroke: url(#routeGrad); stroke-width: 2; stroke-dasharray: 5 6; opacity: .8; }
.map-pin circle.pulse { fill: var(--primary-color); opacity: .25; transform-box: fill-box; transform-origin: center; animation: pin-pulse 2.4s ease-out infinite; }
.map-pin circle.dot { fill: var(--primary-color); stroke: var(--bg-elevated); stroke-width: 2.5; }
.map-pin text { fill: var(--text-strong); font-size: 13px; font-weight: 700; font-family: inherit; }
.map-pin text.sub { fill: var(--text-muted); font-size: 11px; font-weight: 500; }
.map-pin:nth-of-type(2) circle.pulse { animation-delay: .6s; }
.map-pin:nth-of-type(3) circle.pulse { animation-delay: 1.2s; }
.map-pin:nth-of-type(4) circle.pulse { animation-delay: 1.8s; }
@keyframes pin-pulse { 0% { transform: scale(.6); opacity: .45; } 100% { transform: scale(2.2); opacity: 0; } }
.map-caption { margin-top: .75rem; font-size: .82rem; color: var(--text-muted); text-align: center; }

/* Region tiles (location page) */
.region-card { display: flex; gap: 1rem; align-items: flex-start; }
.region-card .icon-badge { flex-shrink: 0; margin: 0; width: 46px; height: 46px; font-size: 1.05rem; }

/* Permission steps (location page) */
.perm-steps { list-style: none; display: grid; gap: .9rem; counter-reset: perm; }
.perm-steps li {
    counter-increment: perm;
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 1rem;
    align-items: start;
}
.perm-steps li::before {
    content: counter(perm);
    width: 36px; height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    color: var(--accent-text);
    font-weight: 700;
}
[dir="rtl"] .perm-steps li::before { content: counter(perm, persian); }
.perm-steps h3 { font-size: 1.02rem; color: var(--text-strong); margin-bottom: .15rem; }
.perm-steps p { color: var(--text-secondary); font-size: .95rem; }

/* Mock permission dialog — clearly labelled as an illustration */
.mock-dialog {
    max-width: 340px;
    margin-inline: auto;
    padding: 1.4rem;
    border-radius: 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    box-shadow: var(--card-shadow-hover);
    text-align: center;
}
.mock-dialog__icon { width: 54px; height: 54px; margin: 0 auto .9rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-size: 1.3rem; }
.mock-dialog h3 { font-size: 1.05rem; color: var(--text-strong); margin-bottom: .35rem; }
.mock-dialog p { font-size: .9rem; color: var(--text-secondary); margin-bottom: 1.1rem; }
.mock-dialog__actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.mock-dialog__actions span { padding: .6rem; border-radius: 12px; font-weight: 600; font-size: .9rem; background: var(--surface-hover); border: 1px solid var(--border); color: var(--text-primary); }
.mock-dialog__actions span:last-child { background: var(--gradient-1); color: #fff; border-color: transparent; }
.illustration-label { display: block; text-align: center; margin-top: .75rem; font-size: .8rem; color: var(--text-muted); }

/* Two-column split section */
.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}
.split h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 800; color: var(--text-strong); line-height: 1.3; margin-bottom: .9rem; }
.split > div > p { color: var(--text-secondary); font-size: 1.05rem; margin-bottom: 1rem; }
.check-list { list-style: none; display: grid; gap: .7rem; margin-top: 1.25rem; }
.check-list li { display: flex; gap: .7rem; align-items: flex-start; color: var(--text-secondary); }
.check-list i { color: var(--success-fg); margin-top: .35rem; flex-shrink: 0; }
@media (max-width: 860px) {
    .split { grid-template-columns: 1fr; }
}

/* ---------- FAQ accordion (help + FAQ pages) ---------- */
.faq { max-width: 820px; margin-inline: auto; }
.faq > h2, .faq-group > h2 { color: var(--text-strong); font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 800; margin-bottom: 1.25rem; }
.faq-group + .faq-group { margin-top: 3rem; }
.faq-item {
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
    margin-bottom: .75rem;
    transition: border-color .2s, background .2s;
}
.faq-item.active { border-color: var(--accent-border); background: var(--surface-hover); }
.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.4rem;
    cursor: pointer;
    border-radius: var(--radius);
}
.faq-question h3 { color: var(--text-strong); font-size: 1.05rem; font-weight: 600; line-height: 1.5; }
.faq-question i { color: var(--text-muted); flex-shrink: 0; }
.faq-answer { padding: 0 1.4rem 1.25rem; color: var(--text-secondary); line-height: 1.9; }
.faq-answer p + p { margin-top: .6rem; }
/* answers stay visible without JS; collapse only when the accordion script runs */
.js .faq-answer { display: none; }
.js .faq-item.active .faq-answer { display: block; }
.faq-answer a { color: var(--accent-text); }
.faq-empty { display: none; text-align: center; color: var(--text-muted); padding: 2rem 1rem; }
.faq-empty.is-visible { display: block; }

/* Search field (help + FAQ pages) */
.search-field { position: relative; max-width: 560px; margin: 2rem auto 0; }
.search-field i {
    position: absolute;
    top: 50%;
    inset-inline-start: 1.1rem;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}
.search-field input {
    width: 100%;
    padding: 1rem 1.25rem;
    padding-inline-start: 3rem;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text-primary);
    font: inherit;
    font-size: 1rem;
    box-shadow: var(--card-shadow);
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.search-field input::placeholder { color: var(--text-muted); }
.search-field input:focus {
    outline: none;
    border-color: var(--accent-border);
    background: var(--surface-hover);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Print ---------- */
@media print {
    .site-header, .site-footer, .back-to-top, .animated-bg, .toc, .callout .btn { display: none !important; }
    body { background: #fff; color: #000; }
    .page-hero { padding-top: 1rem; }
}

/* Compact horizontal card (icon + text) */
.mini-cards { list-style: none; display: grid; gap: .9rem; }
.mini-card { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem 1.4rem; }
.mini-card .icon-badge { margin: 0; flex-shrink: 0; width: 44px; height: 44px; font-size: 1rem; border-radius: 13px; }
.mini-card h3 { margin-bottom: .2rem; font-size: 1.05rem; }
.mini-card .status { margin-bottom: .4rem; }

/* Footer statement about creators & intellectual property */
.site-footer__ip {
    margin-top: 2.5rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: .88rem;
    color: var(--text-muted);
    text-align: center;
}
.site-footer__ip a { color: var(--accent-text); }
.site-footer__ip + .site-footer__bottom { margin-top: 1.5rem; }
