@font-face {
    font-family: Kalameh;
    font-weight: 400;
    src: url("../fonts/kalameh/Kalameh-Regular.ttf") format("truetype");
}

@font-face {
    font-family: Kalameh;
    font-weight: 600;
    src: url("../fonts/kalameh/Kalameh-Bold.ttf") format("truetype");
}

@font-face {
    font-family: Kalameh;
    font-weight: 900;
    src: url("../fonts/kalameh/Kalameh-Black.ttf") format("truetype");
}

/* =========================================================
           DESIGN TOKENS
           ========================================================= */
        :root {
            --font-display: Kalameh;
            --font-body: Kalameh;

            --fs-xs: 13px;
            --fs-sm: 14.5px;
            --fs-base: 16px;
            --fs-md: 18px;
            --fs-lg: 24px;
            --fs-xl: 34px;
            --fs-2xl: clamp(38px, 7vw, 60px);

            --radius-sm: 12px;
            --radius-md: 20px;
            --radius-lg: 30px;

            --space-2: 8px;
            --space-3: 14px;
            --space-4: 20px;
            --space-5: 32px;
            --space-6: 48px;
            --space-7: 80px;
            --space-8: 128px;

            --container: 1160px;
            

            /* dark (default) — deep espresso ground, brass + wine accents (khatam / minâkâri palette) */
            --bg: #17130F;
            --logo-color: invert(1);
            --bg-soft: #1D1712;
            --surface: #221B14;
            --surface-2: #2A2118;
            --border: #3A2F22;
            --text: #F4ECE0;
            --text-muted: #B3A692;
            --accent: #CE9A4A;       /* روشن‌تر برای کنتراست روی زمینه تیره */
            --accent-strong: #E4B15C;
            --accent-ink: #2C1B10;
            --wine: #A23B4B;
            --wine-soft: rgba(162, 59, 75, 0.18);
            --shadow: 0 24px 60px rgba(0,0,0,0.35);
        }

        [data-theme="light"] {
            --bg: #F3ECE1;
            --bg-soft: #EEE4D4;
            --surface: #FFFFFF;
            --surface-2: #F7F0E4;
            --border: #E2D5BE;
            --text: #241A10;
            --text-muted: #7A6C57;
            --accent: #A8712A;
            --accent-strong: #8C5B1E;
            --accent-ink: #FFF6E8;
            --wine: #8C2F3D;
            --wine-soft: rgba(140, 47, 61, 0.10);
            --shadow: 0 20px 50px rgba(60, 45, 20, 0.12);
            --logo-color: none;
        }

        * { box-sizing: border-box; }
        html { scroll-behavior: smooth; }
        body {
            margin: 0;
            background: var(--bg);
            color: var(--text);
            font-family: var(--font-body);
            font-size: var(--fs-base);
            line-height: 1.8;
            overflow-x: hidden;
            transition: background 300ms ease, color 300ms ease;
        }

        img { max-width: 100%; display: block; }
        a { color: inherit; text-decoration: none; }

        .container { max-width: var(--container); margin: 0 auto; padding: 0 var(--space-5); }

        @media (prefers-reduced-motion: reduce) {
            *, .reveal { animation: none !important; transition: none !important; }
        }

        @media (max-width: 600px) {
            :root {
                --space-5: 18px;
                --space-6: 30px;
                --space-7: 52px;
                --fs-xl: 26px;
                --fs-lg: 20px;
            }
        }

        /* ---------------- Header ---------------- */
        header.site-header {
            position: sticky;
            top: 0;
            z-index: 50;
            backdrop-filter: blur(14px);
            background: color-mix(in srgb, var(--bg) 78%, transparent);
            border-bottom: 1px solid var(--border);
        }

        .nav-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: var(--space-3) 0;
            gap: var(--space-4);
            width: 90%;
        }

        .brand { display: flex; align-items: center; gap: var(--space-2); font-family: var(--font-display); font-size: var(--fs-md);font-weight: bold; }
        .brand img { width: 40px; height: 34px; border-radius: 8px;filter: var( --logo-color); }

        .nav-links { display: flex; align-items: center; gap: var(--space-5); font-size: var(--fs-sm); }
        .nav-links a { color: var(--text-muted); transition: color 200ms ease; white-space: nowrap; }
        .nav-links a:hover { color: var(--accent-strong); }

        .nav-actions { display: flex; align-items: center; gap: var(--space-3); }

        .btn {
            position: relative;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-family: var(--font-body);
            font-weight: 700;
            font-size: var(--fs-sm);
            padding: 11px 22px;
            border-radius: var(--radius-sm);
            border: 1.5px solid transparent;
            cursor: pointer;
            overflow: hidden;
            transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
        }
        .btn:hover { transform: translateY(-2px); }
        .btn::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
            transform: translateX(-120%);
            transition: transform 550ms ease;
            pointer-events: none;
        }
        .btn:hover::after { transform: translateX(120%); }

        .btn-accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 24px rgba(206,154,74,0.28); }
        .btn-accent:hover { background: var(--accent-strong); }

        .btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
        .btn-outline:hover { border-color: var(--accent); color: var(--accent-strong); }

        #themeToggle {
            width: 40px; height: 40px;
            border-radius: 50%;
            border: 1.5px solid var(--border);
            background: var(--surface);
            display: flex; align-items: center; justify-content: center;
            cursor: pointer;
        }
        #themeToggle svg { width: 17px; height: 17px; stroke: var(--text); }
        [data-theme="dark"] .icon-moon { display: none; }
        [data-theme="light"] .icon-sun { display: none; }

        .nav-toggle {
            display: none;
            flex-direction: column;
            justify-content: center;
            gap: 5px;
            width: 40px;
            height: 40px;
            border-radius: 10px;
            border: 1.5px solid var(--border);
            background: var(--surface);
            cursor: pointer;
        }
        .nav-toggle span {
            display: block;
            width: 18px;
            height: 2px;
            margin: 0 auto;
            background: var(--text);
            transition: transform 250ms ease, opacity 250ms ease;
        }
        .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
        .nav-toggle.open span:nth-child(2) { opacity: 0; }
        .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

        .mobile-menu {
            display: flex;
            flex-direction: column;
            max-height: 0;
            overflow: hidden;
            transition: max-height 380ms ease;
            border-top: 1px solid transparent;
        }
        .mobile-menu.open {
            max-height: 420px;
            border-top-color: var(--border);
        }
        .mobile-menu a {
            padding: 14px var(--space-5);
            font-size: var(--fs-sm);
            color: var(--text-muted);
            border-bottom: 1px solid var(--border);
        }
        .mobile-menu a:hover { color: var(--accent-strong); }
        .mobile-menu .mobile-cta {
            margin: var(--space-3) var(--space-5);
            text-align: center;
            justify-content: center;
            border-bottom: none;
        }

        @media (max-width: 880px) {
            .nav-links { display: none; }
            .nav-actions .btn-outline { display: none; }
            .nav-toggle { display: flex; }
        }
        @media (min-width: 881px) {
            .mobile-menu { display: none; }
        }
        @media (max-width: 480px) {
            .nav-actions .btn-accent { display: none; }
            .brand span { display: none; }
        }

        /* ---------------- Hero ---------------- */
        .hero {
            position: relative;
            padding: var(--space-7) 0 var(--space-6);
            overflow: hidden;
        }

        .hero-pattern {
            position: absolute;
            inset: -10%;
            width: 120%;
            height: 120%;
            z-index: 0;
            opacity: 0.5;
            pointer-events: none;
            animation: drift 40s linear infinite;
        }
        [data-theme="light"] .hero-pattern { opacity: 0.35; }
        @keyframes drift {
            from { transform: translate(0, 0); }
            to { transform: translate(-70px, 70px); }
        }

        .hero-inner { position: relative; z-index: 1; margin: 0 auto; }

        .eyebrow {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-size: var(--fs-xs);
            color: var(--accent-strong);
            background: var(--wine-soft);
            border: 1px solid var(--border);
            padding: 6px 16px;
            border-radius: 999px;
            margin-bottom: var(--space-4);
        }

        .hero h1 {
            font-family: var(--font-display);
            font-size: var(--fs-2xl);
            line-height: 1.25;
            margin: 0 0 var(--space-4);
        }

        .hero h1 span { color: var(--accent-strong); }

        .hero p.lead {
            color: var(--text-muted);
            font-size: var(--fs-md);
            max-width: 520px;
            margin: 0 0 var(--space-5);
        }

        .hero-ctas { display: flex; justify-content: flex-start; gap: var(--space-3); flex-wrap: wrap; }
        .btn-lg { padding: 15px 30px; font-size: var(--fs-base); }

        /* ---------------- Hero: two-column layout ---------------- */
        .hero-grid {
            display: grid;
            grid-template-columns: 1.15fr 0.85fr;
            gap: var(--space-6);
            align-items: center;
        }

        .hero-text .eyebrow { text-align: initial; }

        .hero-stats {
            display: flex;
            flex-wrap: wrap;
            gap: var(--space-5);
            margin-top: var(--space-6);
            padding-top: var(--space-5);
            border-top: 1px solid var(--border);
        }
        .hero-stats .stat b {
            display: block;
            font-family: var(--font-display);
            font-size: var(--fs-lg);
            color: var(--accent-strong);
        }
        .hero-stats .stat span {
            font-size: var(--fs-xs);
            color: var(--text-muted);
        }

        .hero-visual { position: relative; height: 380px; }

        .mock-card {
            position: absolute;
            inset: 0;
            margin: auto;
            width: 100%;
            max-width: 320px;
            height: fit-content;
            top: 50%;
            transform: translateY(-50%);
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow);
            padding: var(--space-4);
        }

        .mock-card .mock-head {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: var(--fs-xs);
            color: var(--text-muted);
            margin-bottom: var(--space-3);
        }

        .mock-days {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 6px;
            margin-bottom: var(--space-3);
        }
        .mock-days span {
            aspect-ratio: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            border-radius: 8px;
            color: var(--text-muted);
        }
        .mock-days span.picked {
            background: var(--accent);
            color: var(--accent-ink);
            font-weight: 700;
        }
        .mock-days span.busy { color: var(--wine); opacity: 0.55; }

        .mock-slots { display: flex; gap: 8px; flex-wrap: wrap; }
        .mock-slots span {
            font-size: 12px;
            padding: 7px 12px;
            border-radius: 999px;
            border: 1px solid var(--border);
            color: var(--text-muted);
        }
        .mock-slots span.on {
            background: var(--accent-strong);
            color: var(--accent-ink);
            border-color: transparent;
            font-weight: 700;
        }

        .toast {
            position: absolute;
            display: flex;
            align-items: center;
            gap: 8px;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 14px;
            padding: 10px 14px;
            font-size: 12.5px;
            box-shadow: var(--shadow);
            white-space: nowrap;
            animation: float 5s ease-in-out infinite;
        }
        .toast .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-strong); flex-shrink: 0; }
        .toast-1 { top: 6%; right: -4%; animation-delay: 0s; }
        .toast-2 { bottom: 10%; left: -6%; animation-delay: 1.2s; }
        .toast-3 { top: 44%; left: -10%; animation-delay: 2.4s; }

        @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

        @media (max-width: 980px) {
            .hero-grid { grid-template-columns: 1fr; }
            .hero-inner, .hero-text { text-align: center; }
            .hero-ctas { justify-content: center; }
            .hero-stats { justify-content: center; }
            .hero-visual { height: 340px; margin-top: var(--space-5); }
            .toast-2, .toast-3 { left: 2%; }
            .toast-1 { right: 2%; }
        }

        /* ---------------- Category marquee ---------------- */
        .marquee {
            border-top: 1px solid var(--border);
            border-bottom: 1px solid var(--border);
            background: var(--bg-soft);
            overflow: hidden;
            padding: var(--space-3) 0;
        }
        .marquee-track {
            display: flex;
            gap: var(--space-5);
            width: max-content;
            animation: marquee-scroll 26s linear infinite;
        }
        .marquee:hover .marquee-track { animation-play-state: paused; }
        .marquee-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: var(--fs-sm);
            color: var(--text-muted);
            white-space: nowrap;
        }
        .marquee-item svg { width: 16px; height: 16px; stroke: var(--accent); flex-shrink: 0; }
        @keyframes marquee-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

        /* ---------------- Kilim divider (signature element) ---------------- */
        .kilim-divider { display: block; width: 100%; height: 26px; margin: var(--space-6) 0; }
        .kilim-divider path {
            stroke: var(--accent);
            stroke-width: 2;
            fill: none;
            stroke-dasharray: 1400;
            stroke-dashoffset: 1400;
        }
        .kilim-divider.drawn path,
        @supports (animation-timeline: view()) {
            .kilim-divider path { animation: draw-line linear; animation-timeline: view(); animation-range: entry 0% cover 60%; }
        }
        .kilim-divider.drawn path { animation: none; stroke-dashoffset: 0; transition: stroke-dashoffset 1200ms ease; }
        @keyframes draw-line { to { stroke-dashoffset: 0; } }

        /* ---------------- Section shell ---------------- */
        section { padding: var(--space-7) 0; }
        .section-head { text-align: center; max-width: 640px; margin: 0 auto var(--space-6); }
        .section-head .eyebrow { margin-bottom: var(--space-3); }
        .section-head h2 { font-family: var(--font-display); font-size: var(--fs-xl); margin: 0 0 var(--space-2); }
        .section-head p { color: var(--text-muted); margin: 0; }

        /* ---------------- Reveal on scroll ---------------- */
        .reveal {
            opacity: 0;
            transform: translateY(36px);
        }
        .reveal.is-visible { transition: opacity 700ms ease, transform 700ms ease; opacity: 1; transform: none; }

        @supports (animation-timeline: view()) {
            .reveal {
                animation: rise-in linear both;
                animation-timeline: view();
                animation-range: entry 0% cover 35%;
            }
            .reveal.is-visible { transition: none; }
        }
        @keyframes rise-in { from { opacity: 0; transform: translateY(36px) rotate(-0.6deg); } to { opacity: 1; transform: none; } }

        /* ---------------- Category grid ---------------- */
        .cat-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: var(--space-4);
        }
        @media (max-width: 980px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
        @media (max-width: 520px) { .cat-grid { grid-template-columns: 1fr; } }

        .cat-card {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius-md);
            padding: var(--space-5) var(--space-4);
            display: flex;
            flex-direction: column;
            gap: var(--space-3);
            transition: border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
        }
        .cat-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }

        .cat-icon {
            width: 46px; height: 46px;
            border-radius: 12px;
            background: var(--wine-soft);
            display: flex; align-items: center; justify-content: center;
            transition: transform 400ms ease;
        }
        .cat-card:hover .cat-icon { transform: rotate(-8deg) scale(1.08); }
        .cat-icon svg { width: 22px; height: 22px; stroke: var(--wine); }

        .cat-card h3 { font-size: var(--fs-base); margin: 0; }
        .cat-card p { font-size: var(--fs-xs); color: var(--text-muted); margin: 0; flex: 1; }
        .cat-card .cat-link { font-size: var(--fs-xs); color: var(--accent-strong); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }

        /* ---------------- Features ---------------- */
        .feature-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: var(--space-4);
        }
        @media (max-width: 980px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
        @media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }

        .feature { text-align: center; padding: var(--space-5) var(--space-3); transition: transform 300ms ease; }
        .feature:hover { transform: translateY(-3px); }
        .feature .cat-icon { margin: 0 auto var(--space-3); background: transparent; border: 1.5px solid var(--border); }
        .feature .cat-icon svg { stroke: var(--accent); }
        .feature:hover .cat-icon { transform: rotate(8deg) scale(1.1); border-color: var(--accent); }
        .feature h4 { font-size: var(--fs-base); margin: 0 0 6px; }
        .feature p { font-size: var(--fs-xs); color: var(--text-muted); margin: 0; }

        /* staggered entrance for grid items */
        .cat-grid .reveal:nth-child(4n+1), .feature-grid .reveal:nth-child(4n+1) { animation-delay: 0ms; transition-delay: 0ms; }
        .cat-grid .reveal:nth-child(4n+2), .feature-grid .reveal:nth-child(4n+2) { animation-delay: 90ms; transition-delay: 90ms; }
        .cat-grid .reveal:nth-child(4n+3), .feature-grid .reveal:nth-child(4n+3) { animation-delay: 180ms; transition-delay: 180ms; }
        .cat-grid .reveal:nth-child(4n+4), .feature-grid .reveal:nth-child(4n+4) { animation-delay: 270ms; transition-delay: 270ms; }

        /* ---------------- CTA band ---------------- */
        .cta-band {
            background: linear-gradient(135deg, var(--surface), var(--surface-2));
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            padding: var(--space-7) var(--space-5);
            text-align: center;
            position: relative;
            overflow: hidden;
        }
        .cta-band::before {
            content: '';
            position: absolute;
            top: 50%; left: 50%;
            width: 700px; height: 700px;
            background: conic-gradient(from 0deg, var(--wine-soft), transparent 30%, var(--accent) 0%, transparent 60%);
            opacity: 0.25;
            transform: translate(-50%, -50%);
            animation: spin-slow 22s linear infinite;
            pointer-events: none;
        }
        .cta-band > * { position: relative; z-index: 1; }
        @keyframes spin-slow { to { transform: translate(-50%, -50%) rotate(360deg); } }
        .cta-band h2 { font-family: var(--font-display); font-size: var(--fs-xl); margin: 0 0 var(--space-3); }
        .cta-band p { color: var(--text-muted); margin: 0 0 var(--space-5); }
        .cta-row { display: flex; justify-content: center; gap: var(--space-3); flex-wrap: wrap; }

        /* ---------------- Footer ---------------- */
        footer {
            border-top: 1px solid var(--border);
            padding: var(--space-6) 0 var(--space-5);
        }
        .footer-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: var(--space-4);
        }
        .footer-links { display: flex; gap: var(--space-4); font-size: var(--fs-xs); color: var(--text-muted); flex-wrap: wrap; }
        .footer-links a:hover { color: var(--accent-strong); }
        .socials { display: flex; gap: var(--space-2); }
        .socials a {
            width: 36px; height: 36px;
            border-radius: 50%;
            border: 1px solid var(--border);
            display: flex; align-items: center; justify-content: center;
        }
        .socials a svg { width: 15px; height: 15px; stroke: var(--text-muted); }
        .socials a:hover { border-color: var(--accent); }
        .socials a:hover svg { stroke: var(--accent-strong); }
        .copyright { font-size: var(--fs-xs); color: var(--text-muted); text-align: center; margin-top: var(--space-5); }