/* Talk2 — Landing page */

html:has(body.landing-page) {
    scroll-behavior: smooth;
    scroll-padding-top: 4.5rem;
}

body.landing-page {
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    height: auto;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    touch-action: manipulation;
}

body.landing-page main {
    flex: 1 0 auto;
}

.landing-shell {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header */
.landing-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.landing-header__inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 3.5rem;
}

.landing-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    flex-shrink: 0;
}

.landing-brand img {
    width: 28px;
    height: 28px;
}

.landing-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: 1rem;
}

.landing-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

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

.landing-header__actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.landing-menu-btn {
    display: none;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
}

.landing-mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 1.25rem;
    min-width: 11rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.35rem 0;
    z-index: 200;
}

.landing-mobile-nav.is-open {
    display: block;
}

.landing-mobile-nav a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
}

.landing-mobile-nav a:hover {
    background: var(--surface);
    color: var(--text);
}

/* Hero */
.landing-hero {
    padding: 3.5rem 0 2.5rem;
    text-align: center;
}

.landing-section,
.stats-bar {
    scroll-margin-top: 4.5rem;
}

.landing-hero__eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.landing-hero__title {
    font-size: clamp(1.875rem, 4vw, 2.75rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 1rem;
    max-width: 16ch;
    margin-left: auto;
    margin-right: auto;
}

.landing-hero__title em {
    font-style: normal;
    color: var(--accent);
}

.landing-hero__lead {
    font-size: 1.0625rem;
    color: var(--text-muted);
    max-width: 36rem;
    margin: 0 auto 2.5rem;
}

/* Join card */
.join-card {
    max-width: 28rem;
    margin: 0 auto;
    text-align: left;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.join-card:focus-within {
    border-color: var(--accent-border);
    box-shadow: var(--shadow-lg);
}

.join-card__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.join-card__row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.join-card__field {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.join-card__field:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
}

.join-card__field.is-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.join-card__prefix {
    padding: 0 0 0 0.875rem;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    user-select: none;
}

.join-card__input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 1rem;
    padding: 0.75rem 0.875rem 0.75rem 0.35rem;
    outline: none;
}

.join-card__submit {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 1.25rem;
    min-height: 2.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.join-card__submit:hover {
    background: var(--accent-hover);
}

.join-card__hint {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.join-card__error {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--danger);
}

.join-card__error.hidden {
    display: none;
}

.join-card__chips {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.join-card__chips-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.join-card__chips-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-subtle);
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.chip:hover {
    background: var(--accent-muted);
    border-color: var(--accent-border);
}

.join-card__recent {
    margin-top: 1rem;
}

.join-card__recent.hidden {
    display: none;
}

/* Sections */
.landing-section {
    padding: 3.5rem 0;
}

.landing-section:nth-of-type(even) {
    background: rgba(255, 255, 255, 0.02);
}

.landing-section__head {
    text-align: center;
    max-width: 32rem;
    margin: 0 auto 2.5rem;
}

.landing-section__head h2 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.landing-section__head p {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.step-card {
    text-align: center;
    padding: 1.25rem;
}

.step-card__num {
    width: 2rem;
    height: 2rem;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-subtle);
    border-radius: 50%;
}

.step-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.step-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.stats-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem 2.5rem;
    padding: 2.25rem 1.5rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat__value {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
}

.stat__label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.feature-tile {
    padding: 1.25rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.feature-tile__icon {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--accent);
    background: var(--accent-subtle);
    border-radius: var(--radius);
}

.feature-tile h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.feature-tile p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.faq-item {
    padding: 1.25rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.faq-item h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.faq-item p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.landing-footer {
    margin-top: auto;
    padding: 2.5rem 0;
    border-top: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
}

.landing-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.landing-footer p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.landing-footer a {
    color: var(--text-muted);
    font-size: 1.25rem;
}

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

/* Lang dropdown (landing) */
.landing-page .lang-dropdown {
    position: relative;
}

.landing-page .lang-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.65rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
}

.landing-page .lang-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 10rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 150;
}

.landing-page .lang-dropdown.open .lang-dropdown-menu {
    display: block;
}

.landing-page .lang-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    font-size: 0.8125rem;
    cursor: pointer;
    color: var(--text-muted);
}

.landing-page .lang-option:hover {
    background: var(--surface);
    color: var(--text);
}

.landing-page .lang-option.active {
    background: var(--accent-subtle);
    color: var(--accent);
}

.landing-page .lang-flag {
    width: 18px;
    height: 13px;
    border-radius: 2px;
    object-fit: cover;
}

@media (max-width: 768px) {
    html:has(body.landing-page) {
        scroll-padding-top: 4rem;
    }

    .landing-nav {
        display: none;
    }

    .landing-menu-btn {
        display: inline-flex;
        margin-left: auto;
    }

    .landing-header__actions {
        margin-left: 0;
    }

    .landing-hero {
        padding: 2.25rem 0 1.75rem;
    }

    .landing-hero__lead {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .join-card {
        padding: 1.25rem;
    }

    .join-card__row {
        flex-direction: column;
    }

    .join-card__submit {
        width: 100%;
        min-height: 2.875rem;
    }

    .landing-section {
        padding: 2.5rem 0;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stats-bar {
        gap: 1.25rem 1.75rem;
        padding: 1.75rem 1rem;
    }

    .features-grid,
    .faq-grid {
        grid-template-columns: 1fr;
    }
}
