/* Smart Estate web — aligned with Compose theme (OKX-inspired monochrome + lime accent) */
:root {
    color-scheme: light dark;
    --accent: #bcff5e;
    --accent-fg: #000000;
    --bg: #ffffff;
    --fg: #000000;
    --muted: #666666;
    --surface: #f6f6f6;
    --surface-high: #f0f0f0;
    --border: #dadada;
    --success: #00b07c;
    --header-bg: rgba(255, 255, 255, 0.92);
    --hero-glow: rgba(188, 255, 94, 0.18);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    --max-width: 72rem;
    --content-width: 48rem;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #000000;
        --fg: #ffffff;
        --muted: #999999;
        --surface: #121212;
        --surface-high: #1a1a1a;
        --border: #2a2a2a;
        --header-bg: rgba(0, 0, 0, 0.88);
        --hero-glow: rgba(188, 255, 94, 0.12);
        --shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    line-height: 1.6;
    color: var(--fg);
    background: var(--bg);
    overflow-x: clip;
}

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

img,
svg {
    display: block;
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--header-bg);
    backdrop-filter: blur(12px);
}

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

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--fg);
    cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
    display: block;
    width: 1.1rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle__bars {
    position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
    content: "";
    position: absolute;
    left: 0;
}

.nav-toggle__bars::before {
    top: -0.35rem;
}

.nav-toggle__bars::after {
    top: 0.35rem;
}

.site-header.is-nav-open .nav-toggle__bars {
    background: transparent;
}

.site-header.is-nav-open .nav-toggle__bars::before {
    top: 0;
    transform: rotate(45deg);
}

.site-header.is-nav-open .nav-toggle__bars::after {
    top: 0;
    transform: rotate(-45deg);
}

.site-header--borderless {
    border-bottom-color: transparent;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.brand-mark {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem 1rem;
    flex: 1;
    font-size: 0.92rem;
}

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

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    color: var(--fg);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.65rem 1.15rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-fg);
}

.btn-secondary {
    background: var(--surface);
    color: var(--fg);
    border-color: var(--border);
}

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

.page {
    width: min(100% - 2.5rem, var(--max-width));
    margin: 0 auto;
    padding: 0 0 4rem;
}

.legal-page {
    width: min(100% - 2.5rem, var(--content-width));
    padding-top: 2rem;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 4.5rem 0 3.5rem;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -20% auto auto 50%;
    width: min(42rem, 90vw);
    height: min(42rem, 90vw);
    transform: translateX(-50%);
    background: radial-gradient(circle, var(--hero-glow), transparent 68%);
    pointer-events: none;
}

.hero-grid {
    position: relative;
    display: grid;
    gap: 2.5rem;
    align-items: center;
}

@media (min-width: 900px) {
    .hero-grid {
        grid-template-columns: 1.1fr 0.9fr;
    }
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.eyebrow-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--accent);
}

.hero h1 {
    margin: 0 0 1rem;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 700;
}

.hero-lead {
    margin: 0 0 1.75rem;
    max-width: 36rem;
    font-size: 1.125rem;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-card {
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.hero-card h2 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.hero-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.stat {
    padding: 0.9rem;
    border-radius: var(--radius-md);
    background: var(--bg);
    border: 1px solid var(--border);
}

.stat strong {
    display: block;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
}

.stat span {
    color: var(--muted);
    font-size: 0.88rem;
}

.section {
    padding: 3.5rem 0;
}

.section-head {
    max-width: 40rem;
    margin-bottom: 2rem;
}

.section-head h2 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    letter-spacing: -0.03em;
}

.section-head p {
    margin: 0;
    color: var(--muted);
}

.feature-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 700px) {
    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

.feature-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.feature-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.96rem;
}

.cta-band {
    padding: 2rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-high) 100%);
    border: 1px solid var(--border);
}

.cta-band h2 {
    margin: 0 0 0.75rem;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
}

.cta-band p {
    margin: 0 0 1.25rem;
    color: var(--muted);
    max-width: 38rem;
}

.store-row {
    --store-btn-height: 2.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.75rem;
}

@media (max-width: 520px) {
    .store-row {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 899px) {
    .brand {
        order: 1;
        margin-right: auto;
    }

    .site-header__controls {
        order: 2;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        display: none;
        order: 3;
        width: 100%;
        flex: 0 0 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding-top: 0.5rem;
    }

    .site-header.is-nav-open .site-nav {
        display: flex;
    }

    .site-nav a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 44px;
        padding: 0.75rem 1rem;
        border-radius: var(--radius-md);
        border: 1px solid var(--border);
        background: var(--surface);
        color: var(--fg);
        font-size: 1rem;
        font-weight: 600;
        text-align: center;
        text-decoration: none;
        white-space: normal;
        line-height: 1.25;
        transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    }

    .site-nav a:hover,
    .site-nav a[aria-current="page"] {
        background: var(--surface-high);
        color: var(--fg);
    }

    .site-nav .btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        text-align: center;
    }

    .hero {
        padding: 2.5rem 0 2rem;
    }

    .hero-lead {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .section {
        padding: 2.5rem 0;
    }

    .cta-band {
        padding: 1.35rem;
    }

    .cta-band h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .page,
    .legal-page {
        width: min(100% - 1.25rem, var(--max-width));
    }

    .site-header {
        padding: 0.75rem 0.875rem;
    }

    .hero h1 {
        font-size: clamp(1.85rem, 8.5vw, 2.35rem);
    }

    .hero-stat-grid {
        grid-template-columns: 1fr;
    }

    .eyebrow {
        font-size: 0.75rem;
    }
}

.site-footer {
    margin-top: 2rem;
    padding: 2rem 0 3rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 700px) {
    .footer-grid {
        grid-template-columns: 1.4fr 1fr 1fr;
    }
}

.footer-grid h3 {
    margin: 0 0 0.75rem;
    color: var(--fg);
    font-size: 0.95rem;
}

.footer-links {
    display: grid;
    gap: 0.45rem;
}

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

.footer-links a:hover {
    color: var(--fg);
}

.lang-switch {
    display: inline-flex;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
    padding: 0.25rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.lang-switch a {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.88rem;
    color: var(--muted);
}

.lang-switch a:hover {
    color: var(--fg);
}

.lang-switch--header {
    margin-bottom: 0;
}

.lang-switch-btn {
    border: none;
    background: transparent;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font: inherit;
    font-size: 0.88rem;
    color: var(--muted);
    cursor: pointer;
}

.lang-switch-btn:hover {
    color: var(--fg);
}

.lang-switch-btn[aria-pressed="true"] {
    background: var(--accent);
    color: var(--accent-fg);
    font-weight: 600;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    box-sizing: border-box;
    min-height: var(--store-btn-height);
    height: var(--store-btn-height);
    padding: 0 0.9rem 0 0.7rem;
    border-radius: 0.4rem;
    background: #000;
    color: #fff;
    text-decoration: none;
    border: 1px solid #a6a6a6;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    white-space: nowrap;
    flex: 0 1 auto;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.store-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.store-btn__icon {
    flex: 0 0 auto;
    width: 1.35rem;
    height: 1.35rem;
}

.store-btn__icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.store-btn__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.12rem;
    line-height: 1;
    min-width: 0;
}

.store-btn__line1 {
    font-size: 0.5rem;
    font-weight: 400;
    letter-spacing: 0.05em;
}

.store-btn--google .store-btn__line1 {
    text-transform: uppercase;
}

.store-btn--apple .store-btn__line1 {
    letter-spacing: 0;
    text-transform: none;
    font-size: 0.56rem;
}

html[lang="uk"] .store-btn--apple .store-btn__line1 {
    font-size: 0.5rem;
}

.store-btn__line2 {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.store-btn--apple .store-btn__line2 {
    font-weight: 500;
}

@media (max-width: 520px) {
    .store-btn {
        justify-content: center;
        width: 100%;
        max-width: 16rem;
    }
}

.support-dialog[hidden] {
    display: none !important;
}

body.support-dialog-open {
    overflow: hidden;
}

.support-dialog {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 1.25rem;
}

.support-dialog__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.support-dialog__panel {
    position: relative;
    width: min(100%, 28rem);
    max-height: min(92vh, 40rem);
    overflow: auto;
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: var(--bg);
    box-shadow: var(--shadow);
}

.support-dialog__panel h2 {
    margin: 0 2rem 0.5rem 0;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
}

.support-dialog__lead {
    margin: 0 0 1.25rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.support-dialog__close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--fg);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.support-form {
    display: grid;
    gap: 1rem;
}

.support-form__field {
    display: grid;
    gap: 0.4rem;
    font-size: 0.92rem;
    font-weight: 600;
}

.support-form__field input,
.support-form__field textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--fg);
    font: inherit;
    font-weight: 400;
    line-height: 1.4;
    resize: vertical;
}

.support-form__field input:focus,
.support-form__field textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.support-form__honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.support-form__captcha {
    min-height: 4.75rem;
}

.support-form__captcha[hidden] {
    display: none !important;
}

.support-form__submit {
    width: 100%;
}

.support-form__submit:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

.support-form__status {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.support-form__status:not([hidden]) {
    color: var(--fg);
}

.legal-page [data-legal-lang][hidden] {
    display: none !important;
}

.legal-page h1 {
    font-size: 1.75rem;
    margin: 0 0 0.35rem;
    letter-spacing: -0.03em;
}

.legal-page h2 {
    font-size: 1.125rem;
    margin-top: 2rem;
    letter-spacing: -0.02em;
}

.legal-page .meta {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.legal-page ul {
    padding-left: 1.25rem;
}

.legal-page hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 3rem 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
