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

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

:root {
    --primary: #7C3AED;
    --primary-dark: #4C1D95;
    --primary-light: #A78BFA;
    --bg: #ffffff;
    --bg-alt: #f9f7ff;
    --text: #1E1432;
    --text-muted: #6D5D8C;
    --border: #E4DAFF;
    --white: #ffffff;
    --nav-height: 72px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--bg);
    font-size: 0.9375rem;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 3px; }

/* ── Preloader ── */
.preloader {
    position: fixed;
    inset: 0;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 9999;
    transition: opacity 0.4s ease;
}

.preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.preloader__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    animation: bounce 0.6s alternate infinite;
}

.preloader__dot:nth-child(2) { animation-delay: 0.2s; background: var(--primary-light); }
.preloader__dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    to { transform: translateY(-16px); opacity: 0.4; }
}

/* ── Back to top ── */
.go-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 200;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
}

.go-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.go-top:hover {
    transform: translateY(-3px);
}

/* ── Nav ── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 100;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

nav.scrolled {
    background: var(--white);
    box-shadow: 0 2px 24px rgba(0,0,0,0.08);
}

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

.nav__logo-dark {
    display: none;
}

nav.scrolled .nav__logo-light {
    display: none;
}

nav.scrolled .nav__logo-dark {
    display: block;
}

.nav__links {
    display: none;
    gap: 2rem;
}

.nav__links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    transition: color 0.2s;
    position: relative;
}

.nav__links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--white);
    transition: width 0.2s;
}

.nav__links a:hover::after { width: 100%; }

nav.scrolled .nav__links a {
    color: var(--text-muted);
}

nav.scrolled .nav__links a::after {
    background: var(--primary);
}

nav.scrolled .nav__links a:hover {
    color: var(--primary);
}

.nav__cta {
    display: none;
    padding: 0.5rem 1.25rem;
    background: var(--white);
    color: var(--primary);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.nav__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

nav.scrolled .nav__cta {
    background: var(--primary);
    color: var(--white);
}

.nav__hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
}

.nav__hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

nav.scrolled .nav__hamburger span {
    background: var(--text);
}

.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    background: var(--white);
    padding: 1.5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    flex-direction: column;
    gap: 1rem;
    z-index: 99;
}

.nav__mobile.open {
    display: flex;
}

.nav__mobile a {
    color: var(--text);
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.nav__mobile .nav__mobile-cta {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: var(--white);
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    border: none;
    margin-top: 0.5rem;
}

/* ── Sections shared ── */
.section {
    padding: 5rem 1.5rem;
}

.section__header {
    text-align: center;
    margin-bottom: 3rem;
}

.section__tag {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.75rem;
}

.section__title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.25;
    margin-bottom: 1rem;
}

.section__subtitle {
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto;
}

/* ── Hero ── */
#hero {
    padding-top: calc(var(--nav-height) + 4rem);
    padding-bottom: 4rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    background: var(--primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 3rem;
    min-height: 100vh;
}

.hero__text h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 1.25rem;
}

.hero__text p {
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
    margin-bottom: 2rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.hero__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

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

.btn--outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.5);
}

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

.hero__img img {
    width: 100%;
    max-width: 416px;
    margin: 0 auto;
    drop-shadow(0 24px 48px rgba(0,0,0,0.3));
}

/* ── Features ── */
#features {
    background: var(--bg);
}

.features__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.feature-card {
    padding: 1.75rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    transition: box-shadow 0.2s, transform 0.2s;
}

.feature-card:hover {
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.1);
    transform: translateY(-3px);
}

.feature-card__icon {
    width: 48px;
    height: 48px;
    background: #EDE9FF;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

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

/* ── Overview ── */
#overview {
    background: var(--bg-alt);
}

.overview__row {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    align-items: center;
    margin-bottom: 4rem;
}

.overview__row:last-child {
    margin-bottom: 0;
}

.overview__text {
    flex: 1;
}

.overview__icon {
    width: 52px;
    height: 52px;
    background: #EDE9FF;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.375rem;
    margin-bottom: 1.25rem;
}

.overview__text h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 1rem;
}

.overview__text p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.overview__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: gap 0.2s;
}

.overview__link:hover {
    gap: 0.75rem;
}

.overview__img {
    flex: 1;
    width: 100%;
    max-width: 420px;
}

.overview__img img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(124, 58, 237, 0.15);
}

/* ── Install CTA ── */
#install {
    background: var(--primary);
    text-align: center;
    padding: 5rem 1.5rem;
}

#install h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.3;
}

#install p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 2rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

/* ── FAQ ── */
#faq {
    background: var(--bg);
}

.faq__list {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq__item {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    user-select: none;
    gap: 1rem;
}

.faq__question-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.faq__count {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 28px;
}

.faq__question p {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9375rem;
}

.faq__question i {
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.faq__item.open .faq__question i {
    transform: rotate(45deg);
}

.faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.3s;
    padding: 0 1.5rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.7;
}

.faq__item.open .faq__answer {
    max-height: 400px;
    padding: 0 1.5rem 1.25rem 1.5rem;
}

/* ── Footer ── */
footer {
    background: var(--text);
    color: #a0a0b8;
    padding: 4rem 1.5rem 2rem;
}

.footer__top {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer__brand img {
    height: 32px;
    width: auto;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.footer__brand p {
    font-size: 0.875rem;
    line-height: 1.7;
    max-width: 280px;
    margin-bottom: 1.25rem;
}

.footer__social {
    display: flex;
    gap: 0.75rem;
}

.footer__social a {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0a0b8;
    font-size: 0.875rem;
    transition: background 0.2s, color 0.2s;
}

.footer__social a:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.footer__links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.footer__col h4 {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.footer__col ul {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer__col ul a {
    font-size: 0.875rem;
    color: #a0a0b8;
    transition: color 0.2s;
}

.footer__col ul a:hover {
    color: var(--white);
}

.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 1.5rem;
    font-size: 0.8125rem;
    color: #666680;
    text-align: center;
}

/* ── Animations ── */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: none;
}

.fade-left {
    opacity: 0;
    transform: translateX(-32px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-left.visible {
    opacity: 1;
    transform: none;
}

.fade-right {
    opacity: 0;
    transform: translateX(32px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-right.visible {
    opacity: 1;
    transform: none;
}

/* ── Responsive: 768px ── */
@media (min-width: 768px) {
    .features__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer__links {
        grid-template-columns: repeat(3, 1fr);
    }

    .section__title {
        font-size: 2rem;
    }
}

/* ── Responsive: 1024px ── */
@media (min-width: 1024px) {
    nav {
        padding: 0 3rem;
    }

    .nav__links {
        display: flex;
    }

    .nav__cta {
        display: inline-flex;
    }

    .nav__hamburger {
        display: none;
    }

    #hero {
        flex-direction: row;
        text-align: left;
        justify-content: center;
        gap: 4rem;
        min-height: 100vh;
        padding-left: 3rem;
        padding-right: 3rem;
    }

    .hero__text {
        flex: 1;
        max-width: 520px;
    }

    .hero__text h1 {
        font-size: 2.75rem;
    }

    .hero__text p {
        margin-left: 0;
        margin-right: 0;
    }

    .hero__buttons {
        justify-content: flex-start;
    }

    .hero__img {
        flex: 1;
        max-width: 546px;
    }

    .hero__img img {
        max-width: 100%;
    }

    .features__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .overview__row {
        flex-direction: row;
        gap: 5rem;
    }

    .overview__row.reverse {
        flex-direction: row-reverse;
    }

    .section {
        padding: 6rem 3rem;
    }

    #install {
        padding: 6rem 3rem;
    }

    #install h2 {
        font-size: 2.25rem;
    }

    .footer__top {
        flex-direction: row;
        justify-content: space-between;
    }

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

/* ── Responsive: 1280px ── */
@media (min-width: 1280px) {
    nav {
        padding: 0 5rem;
    }

    .section {
        padding: 7rem 5rem;
    }

    #install {
        padding: 7rem 5rem;
    }

    #hero {
        padding-left: 5rem;
        padding-right: 5rem;
    }
}
