@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --at-primary: #2563eb;
    --at-primary-hover: #1d4ed8;
    --at-primary-soft: #eef4ff;
    --at-accent: #f59e0b;
    --at-success: #059669;
    --at-danger: #dc2626;
    --at-bg: #f6f8fb;
    --at-surface: #ffffff;
    --at-border: #e7edf3;
    --at-text: #11203a;
    --at-text-muted: #667892;
    --at-header-bg: #0f1b30;
    --at-radius: 14px;
    --at-radius-sm: 9px;
    --at-shadow: 0 6px 28px rgb(15 23 42 / 0.07);
    --at-shadow-lg: 0 20px 48px rgb(15 23 42 / 0.12);
    --at-font: 'Inter', system-ui, -apple-system, sans-serif;
    --landing-max: 1140px;
    --landing-header-h: 72px;
}

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

html { scroll-behavior: smooth; }

body.landing-body {
    margin: 0;
    font-family: var(--at-font);
    color: var(--at-text);
    background: var(--at-bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--at-primary); text-decoration: none; }
a:hover { color: var(--at-primary-hover); }

/* Header */
.landing-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    height: var(--landing-header-h);
    background: rgb(15 27 48 / 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgb(255 255 255 / 0.06);
}

.landing-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--landing-max);
    margin: 0 auto;
    height: 100%;
    padding: 0 1.25rem;
    gap: 1rem;
}

.landing-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    color: #f8fafc;
    font-weight: 700;
    font-size: 1.05rem;
}

.landing-brand:hover { color: #fff; }

.landing-brand__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    background: var(--at-primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}

.landing-nav-toggle {
    display: none;
    border: none;
    background: transparent;
    color: #f8fafc;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
}

.landing-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem 1rem;
    flex-wrap: wrap;
}

.landing-nav__link {
    color: #cbd5e1;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.375rem 0.5rem;
    border-radius: var(--at-radius-sm);
    transition: color 0.15s, background 0.15s;
}

.landing-nav__link:hover {
    color: #fff;
    background: rgb(255 255 255 / 0.06);
}

.landing-nav__cta {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    white-space: nowrap;
}

/* Language switcher */
.lang-switcher {
    display: inline-flex;
    border: 1px solid rgb(255 255 255 / 0.12);
    border-radius: 999px;
    overflow: hidden;
    background: rgb(255 255 255 / 0.04);
}

.lang-switcher__btn {
    padding: 0.3125rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    transition: background 0.15s, color 0.15s;
}

.lang-switcher__btn:hover {
    color: #e2e8f0;
    background: rgb(255 255 255 / 0.06);
}

.lang-switcher__btn.is-active {
    background: var(--at-primary);
    color: #fff;
}

/* Sections */
.landing-section {
    padding: 5rem 1.25rem;
}

.landing-section--hero {
    padding-top: calc(var(--landing-header-h) + 3rem);
    padding-bottom: 4rem;
    background: linear-gradient(165deg, #0f1b30 0%, #1a2d4d 42%, var(--at-bg) 72%);
    color: #f8fafc;
    overflow: hidden;
    position: relative;
}

.landing-section--hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 70% 20%, rgb(37 99 235 / 0.18), transparent 60%);
    pointer-events: none;
}

.landing-wrap {
    max-width: var(--landing-max);
    margin: 0 auto;
    position: relative;
}

.landing-section__title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.75rem;
    letter-spacing: -0.02em;
}

.landing-section__subtitle {
    font-size: 1.0625rem;
    color: var(--at-text-muted);
    margin: 0 0 2rem;
    max-width: 42rem;
    line-height: 1.55;
}

.landing-section--hero .landing-section__subtitle {
    color: #94a3b8;
}

/* Hero */
.landing-hero {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 3rem;
    align-items: center;
}

.landing-hero__content {
    position: relative;
    z-index: 1;
}

.landing-hero__badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    background: rgb(37 99 235 / 0.2);
    border: 1px solid rgb(37 99 235 / 0.35);
    color: #93c5fd;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.landing-hero__title {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    line-height: 1.12;
    margin: 0 0 1.25rem;
    letter-spacing: -0.03em;
}

.landing-hero__subtitle {
    font-size: 1.125rem;
    color: #e2e8f0;
    line-height: 1.65;
    margin: 0 0 2rem;
    max-width: 34rem;
    text-shadow: 0 1px 3px rgb(15 27 48 / 0.45);
}

.landing-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.landing-hero__actions .btn-primary {
    background: var(--at-primary);
    border-color: var(--at-primary);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
}

.landing-hero__actions .btn-outline-light {
    border-color: rgb(255 255 255 / 0.45);
    color: #f8fafc;
    background: rgb(255 255 255 / 0.08);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
}

.landing-hero__actions .btn-outline-light:hover {
    background: rgb(255 255 255 / 0.16);
    border-color: rgb(255 255 255 / 0.55);
    color: #fff;
}

.landing-hero__trust {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    color: #b8c5d6;
    text-shadow: 0 1px 2px rgb(15 27 48 / 0.35);
}

.landing-hero__trust li::before {
    content: '✓ ';
    color: var(--at-success);
    font-weight: 700;
}

@media (min-width: 992px) {
    .landing-hero__trust {
        color: #f1f5f9;
        font-size: 0.9375rem;
        font-weight: 500;
        text-shadow: 0 1px 4px rgb(15 27 48 / 0.55);
        gap: 0.75rem 1rem;
    }

    .landing-hero__trust li {
        padding: 0.45rem 0.9rem;
        background: rgb(15 27 48 / 0.45);
        border: 1px solid rgb(255 255 255 / 0.12);
        border-radius: 999px;
        backdrop-filter: blur(6px);
    }

    .landing-hero__trust li::before {
        color: #4ade80;
    }
}

.landing-hero__visual {
    position: relative;
}

.landing-hero__visual img {
    width: 100%;
    height: auto;
    border-radius: var(--at-radius);
    box-shadow: var(--at-shadow-lg);
}

.landing-hero__glow {
    position: absolute;
    inset: -20% -10%;
    background: radial-gradient(circle, rgb(37 99 235 / 0.25), transparent 65%);
    z-index: -1;
    pointer-events: none;
}

/* Problem cards */
.landing-problems {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.landing-problem {
    background: var(--at-surface);
    border: 1px solid var(--at-border);
    border-radius: var(--at-radius);
    padding: 1.5rem;
    box-shadow: var(--at-shadow);
}

.landing-problem__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    background: var(--at-primary-soft);
    color: var(--at-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 1rem;
}

.landing-problem p {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--at-text-muted);
}

/* Features */
.landing-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.landing-feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: center;
    background: var(--at-surface);
    border: 1px solid var(--at-border);
    border-radius: var(--at-radius);
    padding: 1.5rem;
    box-shadow: var(--at-shadow);
}

.landing-feature:nth-child(even) .landing-feature__media { order: 2; }
.landing-feature:nth-child(even) .landing-feature__text { order: 1; }

.landing-feature__media img {
    width: 100%;
    height: auto;
    border-radius: var(--at-radius-sm);
}

.landing-feature__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.landing-feature__text {
    font-size: 0.875rem;
    color: var(--at-text-muted);
    line-height: 1.55;
    margin: 0;
}

/* How it works */
.landing-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.landing-step {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--at-surface);
    border-radius: var(--at-radius);
    border: 1px solid var(--at-border);
    box-shadow: var(--at-shadow);
}

.landing-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--at-primary);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.landing-step h3 {
    font-size: 1.0625rem;
    margin: 0 0 0.5rem;
}

.landing-step p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--at-text-muted);
    line-height: 1.5;
}

/* Screens strip */
.landing-screens {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.landing-screens img {
    width: 100%;
    border-radius: var(--at-radius);
    box-shadow: var(--at-shadow);
    border: 1px solid var(--at-border);
}

/* Pricing */
.landing-pricing-toggle {
    display: inline-flex;
    background: var(--at-surface);
    border: 1px solid var(--at-border);
    border-radius: 999px;
    padding: 0.25rem;
    margin-bottom: 2rem;
}

.landing-pricing-toggle__btn {
    border: none;
    background: transparent;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--at-text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.landing-pricing-toggle__btn.is-active {
    background: var(--at-primary);
    color: #fff;
}

.landing-pricing-toggle__save {
    font-size: 0.75rem;
    color: var(--at-success);
    margin-left: 0.5rem;
}

.landing-plans {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.landing-plan {
    background: var(--at-surface);
    border: 1px solid var(--at-border);
    border-radius: var(--at-radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: var(--at-shadow);
    position: relative;
}

.landing-plan--featured {
    border-color: var(--at-primary);
    box-shadow: 0 0 0 1px var(--at-primary), var(--at-shadow-lg);
}

.landing-plan__badge {
    position: absolute;
    top: -0.625rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--at-primary);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    white-space: nowrap;
}

.landing-plan__name {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.landing-plan__price {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.landing-plan__price span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--at-text-muted);
}

.landing-plan__yearly {
    font-size: 0.75rem;
    color: var(--at-text-muted);
    min-height: 1.125rem;
    margin-bottom: 1rem;
}

.landing-plan__yearly.is-hidden { visibility: hidden; }

.landing-plan__features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    flex: 1;
    font-size: 0.8125rem;
    line-height: 1.45;
}

.landing-plan__features li {
    padding: 0.3125rem 0;
    color: var(--at-text-muted);
    border-bottom: 1px solid var(--at-border);
}

.landing-plan__features li:last-child { border-bottom: none; }

.landing-plan__features li::before {
    content: '✓ ';
    color: var(--at-success);
    font-weight: 700;
}

.landing-plan__features li.is-muted::before {
    content: '○ ';
    color: #94a3b8;
}

.landing-plan .btn {
    width: 100%;
    font-weight: 600;
}

.landing-pricing-note {
    margin-top: 1.25rem;
    font-size: 0.8125rem;
    color: var(--at-text-muted);
    text-align: center;
}

/* FAQ */
.landing-faq {
    max-width: 40rem;
    margin: 0 auto;
}

.landing-faq__item {
    background: var(--at-surface);
    border: 1px solid var(--at-border);
    border-radius: var(--at-radius-sm);
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.landing-faq__q {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--at-text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.landing-faq__q::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--at-primary);
    flex-shrink: 0;
}

.landing-faq__item.is-open .landing-faq__q::after { content: '−'; }

.landing-faq__a {
    display: none;
    padding: 0 1.25rem 1rem;
    font-size: 0.875rem;
    color: var(--at-text-muted);
    line-height: 1.55;
}

.landing-faq__item.is-open .landing-faq__a { display: block; }

/* CTA */
.landing-cta {
    background: linear-gradient(135deg, var(--at-primary) 0%, #1d4ed8 100%);
    color: #fff;
    text-align: center;
    border-radius: var(--at-radius);
    padding: 3.5rem 2rem;
    box-shadow: var(--at-shadow-lg);
}

.landing-cta h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin: 0 0 0.75rem;
}

.landing-cta p {
    margin: 0 0 1.5rem;
    opacity: 0.9;
    font-size: 1.0625rem;
}

.landing-cta .btn-light {
    font-weight: 700;
    color: var(--at-primary);
    padding: 0.75rem 2rem;
}

/* Footer */
.landing-footer {
    background: var(--at-header-bg);
    color: #94a3b8;
    padding: 2.5rem 1.25rem;
    margin-top: 2rem;
}

.landing-footer__inner {
    max-width: var(--landing-max);
    margin: 0 auto;
}

.landing-footer__brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.landing-footer__brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: inherit;
    text-decoration: none;
}

.landing-footer__brand-link:hover {
    color: #e2e8f0;
}

.landing-footer__brand-link strong {
    color: #f8fafc;
}

.landing-footer__tagline {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
}

.landing-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.landing-footer__links a {
    color: #94a3b8;
    font-size: 0.875rem;
}

.landing-footer__links a:hover { color: #e2e8f0; }

.landing-footer__copy {
    margin: 0;
    font-size: 0.8125rem;
    color: #64748b;
}

/* Responsive */
@media (max-width: 991px) {
    /* Hero: text first, image below; keep dark background for readable copy */
    .landing-section--hero {
        background: linear-gradient(180deg, #0f1b30 0%, #152238 70%, #1a2d4d 100%);
        padding-top: calc(var(--landing-header-h) + 1.5rem);
        padding-bottom: 2rem;
    }

    .landing-section--hero::before {
        opacity: 0.5;
    }

    .landing-hero {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .landing-hero__content {
        order: 1;
    }

    .landing-hero__visual {
        order: 2;
        display: none;
    }

    .landing-hero__subtitle {
        color: #f1f5f9;
    }

    .landing-hero__trust {
        color: #cbd5e1;
    }

    .landing-hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .landing-hero__actions .btn {
        width: 100%;
        text-align: center;
    }

    .landing-hero__actions .btn-outline-light {
        border-color: rgb(255 255 255 / 0.45);
        color: #f8fafc;
        background: rgb(255 255 255 / 0.1);
    }

    .landing-hero__actions .btn-outline-light:hover {
        background: rgb(255 255 255 / 0.16);
        color: #fff;
    }

    .landing-features { grid-template-columns: 1fr; }
    .landing-feature { grid-template-columns: 1fr; }
    .landing-feature__text { order: 1; }
    .landing-feature__media { order: 2; }
    .landing-feature:nth-child(even) .landing-feature__media,
    .landing-feature:nth-child(even) .landing-feature__text { order: unset; }
    .landing-feature:nth-child(even) .landing-feature__text { order: 1; }
    .landing-feature:nth-child(even) .landing-feature__media { order: 2; }
    .landing-plans { grid-template-columns: repeat(2, 1fr); }
    .landing-problems { grid-template-columns: 1fr; }
    .landing-steps { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
    .landing-nav-toggle { display: block; }

    .landing-nav {
        display: none;
        position: fixed;
        top: var(--landing-header-h);
        left: 0;
        right: 0;
        z-index: 1050;
        flex-direction: column;
        align-items: stretch;
        background: var(--at-header-bg);
        padding: 1rem 1.25rem 1.5rem;
        border-bottom: 1px solid rgb(255 255 255 / 0.06);
        box-shadow: 0 12px 32px rgb(15 23 42 / 0.35);
        gap: 0.5rem;
        max-height: calc(100dvh - var(--landing-header-h));
        overflow-y: auto;
    }

    .landing-nav.is-open { display: flex; }

    .landing-header__inner { position: relative; }

    .landing-section--hero { padding-top: calc(var(--landing-header-h) + 1.25rem); }

    body.landing-body--nav-open,
    body.guest-public.landing-body--nav-open {
        overflow: hidden;
    }

    .landing-nav .lang-switcher {
        align-self: center;
        margin: 0.25rem 0;
    }

    .landing-nav__cta {
        text-align: center;
        margin-top: 0.25rem;
    }

    .landing-hero__title {
        font-size: clamp(1.625rem, 7vw, 2rem);
    }

    .landing-hero__subtitle {
        font-size: 1rem;
    }

    .landing-plans { grid-template-columns: 1fr; }
    .landing-screens { grid-template-columns: 1fr; }
    .landing-section { padding: 3.5rem 1rem; }
    .landing-section--hero { padding-top: calc(var(--landing-header-h) + 1.25rem); }
}

/* Guest app pages (login, signup, manual…) share the landing header */
body.guest-public .app-main {
    padding-top: calc(var(--landing-header-h) + 2rem);
}
