/* Two Chat Landing — human, not AI-generated */
:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #d1fae5;
    --accent: #f59e0b;
    --accent-dim: rgba(245, 158, 11, 0.12);
    --bg: #0a0e1a;
    --bg-card: #111827;
    --bg-elevated: #1f2937;
    --text: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.15);
    --radius: 10px;
    --radius-lg: 14px;
    --nav-h: 60px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    direction: rtl;
}

/* subtle dot grid — brand signature */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle, rgba(16, 185, 129, 0.06) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 0;
}

/* decorative corner arc */
body::after {
    content: '';
    position: fixed;
    top: -180px;
    left: -180px;
    width: 400px;
    height: 400px;
    border: 1.5px solid rgba(245, 158, 11, 0.08);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

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

.container {
    width: min(1080px, calc(100% - 32px));
    margin-inline: auto;
    position: relative;
    z-index: 1;
}

/* ===== FAB ===== */
.fab-github {
    position: fixed;
    bottom: calc(20px + var(--safe-bottom));
    left: 20px;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 0;
    height: 46px;
    width: 46px;
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1), gap 0.3s ease, padding 0.3s ease, transform 0.12s ease, border-color 0.15s ease;
}

.fab-github:hover,
.fab-github:focus-visible {
    width: auto;
    padding: 0 14px 0 12px;
    gap: 8px;
    transform: translateY(-2px);
    border-color: var(--primary);
    outline: none;
}

.fab-github:active { transform: translateY(0) scale(0.97); }

.fab-github__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin: auto;
    transition: margin 0.3s ease;
}

.fab-github:hover .fab-github__icon { margin: 0; }

.fab-github__text {
    max-width: 0;
    opacity: 0;
    white-space: nowrap;
    overflow: hidden;
    transition: max-width 0.3s ease, opacity 0.2s ease;
}

.fab-github:hover .fab-github__text { max-width: 60px; opacity: 1; }

@media (max-width: 480px) {
    .fab-github { bottom: 14px; left: 14px; height: 42px; width: 42px; }
    .fab-github__icon { width: 18px; height: 18px; }
}

/* ===== NAV ===== */
.nav {
    position: sticky;
    top: 0;
    z-index: 900;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    background: rgba(10, 14, 26, 0.88);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.nav__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.01em;
}

.nav__logo { width: 36px; height: 36px; }

.nav__links {
    display: none;
    align-items: center;
    gap: 22px;
    list-style: none;
}

.nav__links a {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.15s;
}

.nav__links a:hover { color: var(--text); }

@media (min-width: 768px) { .nav__links { display: flex; } }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.1s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn:active { transform: scale(0.97); }

.btn--primary {
    background: var(--primary);
    color: #fff;
}

.btn--primary:hover {
    background: var(--primary-dark);
}

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

.btn--ghost:hover {
    border-color: var(--primary);
    color: var(--primary-light);
}

.btn svg { width: 17px; height: 17px; }

/* ===== HERO ===== */
.hero {
    padding: 56px 0 64px;
    position: relative;
}

.hero__grid {
    display: grid;
    gap: 36px;
    align-items: center;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 18px;
}

.hero__badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
}

.hero__title {
    font-size: clamp(1.7rem, 4.2vw, 2.6rem);
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.hero__title span {
    color: var(--accent);
}

.hero__desc {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 460px;
    margin-bottom: 26px;
    line-height: 1.85;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.hero__stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero__stat strong {
    font-size: 18px;
    font-weight: 700;
}

.hero__stat span {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Phone mockup */
.hero__visual {
    display: flex;
    justify-content: center;
}

.phone {
    width: min(100%, 280px);
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 24px;
    overflow: hidden;
}

.phone::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 3px;
    z-index: 5;
}

.phone__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 24px 12px 10px;
    border-bottom: 1px solid var(--border);
}

.phone__avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    position: relative;
}

.phone__avatar::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 8px;
    height: 8px;
    background: #34d399;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

.phone__meta h3 { font-size: 13px; font-weight: 600; }
.phone__meta p { font-size: 10px; color: #34d399; }

.phone__messages {
    padding: 12px 8px 14px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-height: 260px;
}

.msg {
    max-width: 80%;
    padding: 8px 11px;
    border-radius: 12px;
    font-size: 11.5px;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(6px);
    animation: msgIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.msg--in {
    align-self: flex-start;
    background: var(--bg-elevated);
    color: var(--text);
    border: 1px solid var(--border);
    border-bottom-right-radius: 4px;
}

.msg--out {
    align-self: flex-end;
    background: var(--primary);
    color: #fff;
    border-bottom-left-radius: 4px;
}

.msg__meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 3px;
    font-size: 9px;
    opacity: 0.65;
}

.msg__ticks { color: #d1fae5; font-size: 10px; }

.msg__reactions { display: flex; gap: 3px; margin-top: 3px; }

.msg__reaction {
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
}

.msg--typing {
    align-self: flex-start;
    padding: 8px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-bottom-right-radius: 4px;
}

.typing-dots { display: flex; gap: 3px; }

.typing-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: typingBounce 1.2s ease infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }

.phone__composer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border-top: 1px solid var(--border);
}

.phone__input {
    flex: 1;
    padding: 7px 10px;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-muted);
}

.phone__send {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

@media (min-width: 960px) {
    .hero__grid { grid-template-columns: 5fr 7fr; gap: 48px; }
    .hero { padding: 72px 0 88px; }
}

/* ===== SECTIONS ===== */
.section {
    padding: 64px 0;
    position: relative;
    z-index: 1;
}

.section--alt {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section__header {
    text-align: center;
    max-width: 520px;
    margin: 0 auto 40px;
}

.section__tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 8px;
}

.section__title {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.section__desc {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Feature cards */
.features-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }

.feature-card {
    padding: 22px 18px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: border-color 0.18s ease, transform 0.12s ease;
    opacity: 0;
    transform: translateY(12px);
}

.feature-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    border-color: rgba(16, 185, 129, 0.35);
    transform: translateY(-2px);
}

.feature-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 12px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.18);
}

.feature-card__title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 5px;
}

.feature-card__text {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.7;
}

code {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.84em;
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.18);
    color: var(--primary-light);
    direction: ltr;
    display: inline-block;
}

/* Showcase */
.showcase {
    display: grid;
    gap: 28px;
    align-items: center;
}

@media (min-width: 900px) {
    .showcase { grid-template-columns: 5fr 7fr; gap: 44px; }
    .showcase--reverse .showcase__content { order: 2; }
    .showcase--reverse .showcase__panel { order: 1; }
}

.showcase__content h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.showcase__content p {
    color: var(--text-secondary);
    margin-bottom: 14px;
    font-size: 13.5px;
}

.showcase__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.showcase__list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-secondary);
}

.showcase__list li::before {
    content: '';
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    margin-top: 2px;
}

.showcase__panel {
    padding: 22px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
}

/* Demo panels */
.demo-reactions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.demo-reaction-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.1s, border-color 0.12s;
}

.demo-reaction-btn:hover,
.demo-reaction-btn.is-active {
    transform: scale(1.08);
    border-color: var(--primary);
}

.demo-bubble {
    padding: 12px 14px;
    border-radius: 12px 12px 4px 12px;
    background: var(--primary);
    color: #fff;
    font-size: 12.5px;
    max-width: 240px;
    margin-right: auto;
}

.demo-bubble__reactions {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    min-height: 22px;
}

.demo-presence {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.presence-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}

.presence-row__user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.presence-row__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34d399;
}

.presence-row__dot--offline { background: var(--text-muted); }

.presence-row__status {
    font-size: 11px;
    color: var(--text-secondary);
}

.demo-archive {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
}

.demo-archive__thumb {
    aspect-ratio: 1;
    border-radius: 6px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: transform 0.12s;
}

.demo-archive__thumb:hover { transform: scale(1.04); }

/* Tech stack */
.tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.tech-pill {
    padding: 7px 14px;
    border-radius: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: border-color 0.12s, color 0.12s;
}

.tech-pill:hover {
    border-color: var(--primary);
    color: var(--text);
}

/* Architecture */
.arch-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 24px 14px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.arch-box {
    padding: 10px 20px;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    min-width: 170px;
}

.arch-box--muted {
    background: var(--bg-elevated);
    border-color: var(--border);
    font-weight: 500;
    color: var(--text-secondary);
}

.arch-arrow {
    width: 1px;
    height: 20px;
    background: var(--primary);
    position: relative;
}

.arch-arrow::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 4px solid var(--primary);
}

.arch-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* CTA */
.cta {
    text-align: center;
    padding: 48px 24px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.cta__title {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.cta__desc {
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto 22px;
    font-size: 13.5px;
}

.cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* Footer */
.footer {
    padding: 28px 0 calc(28px + var(--safe-bottom));
    border-top: 1px solid var(--border);
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
    font-weight: 700;
    font-size: 14px;
}

.footer__brand img { width: 28px; height: 28px; }

.footer__text {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.footer__links {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

.footer__links a {
    font-size: 12px;
    color: var(--text-secondary);
    transition: color 0.12s;
}

.footer__links a:hover,
.footer__links button:hover { color: var(--primary); }

.footer__links button {
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 12px;
    transition: color 0.12s;
}

/* ===== ANIMATIONS ===== */
@keyframes msgIn {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-3px); }
}

.msg:nth-child(1) { animation-delay: 0.4s; }
.msg:nth-child(2) { animation-delay: 0.85s; }
.msg:nth-child(3) { animation-delay: 1.3s; }
.msg:nth-child(4) { animation-delay: 1.75s; }
.msg:nth-child(5) { animation-delay: 2.2s; }
.msg--typing { animation-delay: 2.7s; }

.feature-card:nth-child(3n+1) { transition-delay: 0ms; }
.feature-card:nth-child(3n+2) { transition-delay: 50ms; }
.feature-card:nth-child(3n) { transition-delay: 100ms; }
