/* Responsibility: the marketing homepage only (public/index.php). Reuses the
   colour variables defined per-theme in chat.css/themes.css so the homepage
   always matches whatever theme the visitor has chosen — it adds layout and
   motion, never new colours. */

.home {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 20px 48px;
}

.home-hero {
    padding: 64px 0 40px;
    text-align: center;
}

.home-hero .eyebrow {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--sunken);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 14px;
    margin-bottom: 18px;
}

.home-hero h1 {
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.15;
    margin: 0 0 16px;
    font-weight: 600;
}

.home-hero p.lead {
    font-size: 17px;
    color: var(--muted);
    max-width: 620px;
    margin: 0 auto 28px;
    line-height: 1.6;
}

.home-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.home-cta .btn-primary,
.home-cta .btn-ghost {
    font-size: 15px;
    padding: 12px 22px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--line);
}

.home-cta .btn-primary {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

.home-cta .btn-ghost {
    background: var(--btn);
    color: var(--text);
}

.home-cta .btn-ghost:hover { background: var(--btn-hover); }

.home-section {
    padding: 40px 0;
    border-top: 1px solid var(--line);
}

.home-section h2 {
    font-size: 24px;
    margin: 0 0 10px;
    font-weight: 600;
}

.home-section > p.section-lead {
    color: var(--muted);
    max-width: 640px;
    line-height: 1.6;
    margin: 0 0 28px;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.home-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 20px;
}

.home-card .icon {
    font-size: 22px;
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: var(--sunken);
    border-radius: 10px;
    margin-bottom: 12px;
}

.home-card h3 {
    font-size: 15px;
    margin: 0 0 6px;
    font-weight: 600;
}

.home-card p {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.6;
    margin: 0;
}

.home-steps {
    counter-reset: step;
    display: grid;
    gap: 14px;
}

.home-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px 18px;
}

.home-step .num {
    counter-increment: step;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.home-step h3 { margin: 0 0 4px; font-size: 14.5px; font-weight: 600; }
.home-step p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.6; }

.home-lang {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
}

.home-lang a {
    padding: 6px 14px;
    font-size: 13px;
    text-decoration: none;
    color: var(--muted);
    background: var(--btn);
}

.home-lang a[aria-current="true"] {
    background: var(--accent);
    color: var(--bg);
    font-weight: 600;
}

.home-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    max-width: 920px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.home-nav .brand {
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.home-nav .actions { display: flex; align-items: center; gap: 10px; }

.home-footer {
    border-top: 1px solid var(--line);
    padding: 28px 20px 40px;
}

.home-footer-inner {
    max-width: 920px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

.home-footer nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13.5px;
}

.home-footer nav a {
    color: var(--muted);
    text-decoration: none;
}
.home-footer nav a:hover { color: var(--text); }

.home-footer .copyright {
    font-size: 12.5px;
    color: var(--faint);
    width: 100%;
    text-align: center;
    margin-top: 8px;
}

[data-install-btn] { display: inline-flex; align-items: center; gap: 6px; }

/* ── RTL (Persian) ─────────────────────────────────────────── */
[dir="rtl"] .home-hero,
[dir="rtl"] .home-section h2 { text-align: right; }
[dir="rtl"] .home-nav,
[dir="rtl"] .home-footer-inner { direction: rtl; }
[dir="rtl"] .home-step { flex-direction: row-reverse; text-align: right; }
[dir="rtl"] .home-card { text-align: right; }
[dir="rtl"] body, [dir="rtl"] .home {
    font-family: "Vazirmatn", "Tahoma", ui-sans-serif, system-ui, sans-serif;
}

/* ── motion: minimal, professional, scroll-revealed ──────────── */
@media (prefers-reduced-motion: no-preference) {
    .home-reveal {
        opacity: 0;
        transform: translateY(14px);
        transition: opacity 480ms ease, transform 480ms ease;
    }
    .home-reveal.in-view {
        opacity: 1;
        transform: none;
    }

    .home-hero h1, .home-hero p.lead, .home-hero .home-cta, .home-hero .eyebrow {
        animation: home-hero-in 620ms cubic-bezier(0.2, 0, 0.2, 1) both;
    }
    .home-hero .eyebrow { animation-delay: 0ms; }
    .home-hero h1 { animation-delay: 60ms; }
    .home-hero p.lead { animation-delay: 140ms; }
    .home-hero .home-cta { animation-delay: 220ms; }

    @keyframes home-hero-in {
        from { opacity: 0; transform: translateY(10px); }
        to   { opacity: 1; transform: none; }
    }

    .home-card, .home-step {
        transition: transform 180ms ease, border-color 180ms ease;
    }
    .home-card:hover, .home-step:hover {
        transform: translateY(-2px);
        border-color: var(--accent);
    }
}

@media (max-width: 640px) {
    .home-hero { padding: 40px 0 28px; }
    .home-nav { padding: 14px 16px; }
}
