/* ─────────────────────────── Tokens ─────────────────────────── */
:root {
    --brand: #667eea;
    --brand-2: #764ba2;
    --brand-grad: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent: #28a745;

    --bg: #ffffff;
    --bg-soft: #f7f8fc;
    --text: #1a1f36;
    --text-soft: #5b6478;
    --border: #e7e9f2;
    --card: #ffffff;
    --shadow: 0 20px 50px rgba(30, 34, 90, 0.10);
    --shadow-sm: 0 6px 18px rgba(30, 34, 90, 0.08);
}

[data-theme="dark"] {
    --bg: #12131c;
    --bg-soft: #1a1c28;
    --text: #eef0f8;
    --text-soft: #a3a8c0;
    --border: #2a2d3d;
    --card: #1c1f2c;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.35);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s ease, color 0.3s ease;
}

.grad-text {
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ─────────────────────────── Buttons ─────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1rem;
    padding: 14px 26px;
    border-radius: 14px;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    white-space: nowrap;
}
.btn-sm { padding: 9px 18px; font-size: 0.92rem; border-radius: 11px; }
.btn-primary {
    background: var(--brand-grad);
    color: #fff;
    box-shadow: 0 10px 24px rgba(102, 126, 234, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(102, 126, 234, 0.45); }
.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--brand); color: var(--brand); }

/* ─────────────────────────── Nav ─────────────────────────── */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    /* Equal side columns keep the middle menu truly centred, while staying in
       flow so it never overlaps the brand or the action buttons. */
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    /* Center the bar content to the same max-width as the page sections (1140px). */
    padding: 14px max(24px, calc((100% - 1140px) / 2));
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.nav-brand { justify-self: start; }
.nav-links { justify-self: center; }
.nav-actions { justify-self: end; }
.nav.scrolled { border-color: var(--border); box-shadow: var(--shadow-sm); }
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
}
.nav-logo { display: block; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
    color: var(--text-soft);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--brand); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-login {
    color: var(--text-soft);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    transition: color 0.15s ease;
    white-space: nowrap;
}
.nav-login:hover { color: var(--brand); }
.theme-toggle {
    width: 40px; height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card);
    font-size: 1.1rem;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.theme-toggle:hover { border-color: var(--brand); transform: rotate(-12deg); }

/* ─────────────────────────── Hero ─────────────────────────── */
.hero {
    position: relative;
    overflow: hidden;
    padding: 96px 24px 88px;
    text-align: center;
}
.hero-glow {
    position: absolute;
    top: -220px; left: 50%;
    transform: translateX(-50%);
    width: 900px; height: 700px;
    background: radial-gradient(closest-side, rgba(102,126,234,0.35), rgba(118,75,162,0.18) 55%, transparent 75%);
    filter: blur(20px);
    z-index: 0;
    pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; }
.pill {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand) 12%, transparent);
    color: var(--brand);
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
    margin-bottom: 26px;
}
.hero-title {
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}
.hero-sub {
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    color: var(--text-soft);
    max-width: 640px;
    margin: 0 auto 36px;
}
.hero-sub strong { color: var(--text); }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 56px;
}
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong {
    font-size: 1.7rem;
    font-weight: 800;
    background: var(--brand-grad);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-stats span { font-size: 0.9rem; color: var(--text-soft); }

/* ─────────────────────────── Strip ─────────────────────────── */
.strip {
    text-align: center;
    padding: 40px 24px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-soft);
}
.strip > p { color: var(--text-soft); font-weight: 500; margin-bottom: 20px; }
.strip-icons {
    display: flex;
    gap: 14px 28px;
    justify-content: center;
    flex-wrap: wrap;
    font-weight: 600;
    color: var(--text);
}
.strip-icons span { opacity: 0.85; }

/* ─────────────────────────── Sections ─────────────────────────── */
.section { padding: 96px 24px; max-width: 1140px; margin: 0 auto; }
.section--alt { background: var(--bg-soft); max-width: none; }
.section--alt > * { max-width: 1140px; margin-left: auto; margin-right: auto; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--brand);
    margin-bottom: 14px;
}
.section-head h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}
.section-head p { color: var(--text-soft); font-size: 1.1rem; }

/* ─────────────────────────── Feature cards ─────────────────────────── */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.card-icon {
    width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem;
    border-radius: 16px;
    background: color-mix(in srgb, var(--brand) 12%, transparent);
    margin-bottom: 18px;
}
.card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.card p { color: var(--text-soft); font-size: 0.98rem; }
.card--highlight {
    background: var(--brand-grad);
    border: none;
    color: #fff;
    box-shadow: 0 18px 40px rgba(102, 126, 234, 0.4);
}
.card--highlight .card-icon { background: rgba(255,255,255,0.18); }
.card--highlight h3 { color: #fff; }
.card--highlight p { color: rgba(255,255,255,0.9); }

/* ─────────────────────────── Steps ─────────────────────────── */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
}
.step {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px 28px;
    position: relative;
}
.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px; height: 46px;
    border-radius: 14px;
    background: var(--brand-grad);
    color: #fff;
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 18px;
    box-shadow: 0 8px 18px rgba(102, 126, 234, 0.35);
}
.step h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--text-soft); font-size: 0.98rem; }

/* ─────────────────────────── Hardware ─────────────────────────── */
.hw-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}
.hw-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--card);
    transition: transform 0.18s ease, border-color 0.18s ease;
}
.hw-item:hover { transform: translateY(-4px); border-color: var(--brand); }
.hw-emoji { font-size: 1.9rem; }
.hw-item h3 { font-size: 1.05rem; font-weight: 700; }
.hw-item p { color: var(--text-soft); font-size: 0.92rem; }

/* ─────────────────────────── CTA ─────────────────────────── */
.cta { padding: 30px 24px 96px; }
.cta-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 64px 32px;
    border-radius: 28px;
    background: var(--brand-grad);
    color: #fff;
    box-shadow: 0 30px 60px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}
.cta-inner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(600px 200px at 80% -10%, rgba(255,255,255,0.25), transparent);
    pointer-events: none;
}
.cta-inner h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; margin-bottom: 12px; position: relative; }
.cta-inner p { font-size: 1.15rem; opacity: 0.92; margin-bottom: 30px; position: relative; }
.cta-actions { display: flex; gap: 18px; align-items: center; justify-content: center; flex-wrap: wrap; position: relative; }
.cta .btn-primary { background: #fff; color: var(--brand-2); box-shadow: 0 10px 24px rgba(0,0,0,0.2); }
.cta .btn-primary:hover { transform: translateY(-2px); }
.cta-mail { color: #fff; font-weight: 600; text-decoration: none; border-bottom: 2px solid rgba(255,255,255,0.5); }
.cta-mail:hover { border-color: #fff; }

/* ─────────────────────────── FAQ ─────────────────────────── */
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.faq details {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 4px 24px;
    transition: border-color 0.18s ease;
}
.faq details[open] { border-color: var(--brand); }
.faq summary {
    list-style: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 18px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    font-size: 1.4rem;
    color: var(--brand);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-soft); padding: 0 0 20px; }

/* ─────────────────────────── Footer ─────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 56px 24px 32px; background: var(--bg-soft); }
.footer-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px 40px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; }
.footer-tag { color: var(--text-soft); flex: 1; min-width: 200px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--text-soft); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.footer-links a:hover { color: var(--brand); }
.footer-copy { text-align: center; color: var(--text-soft); font-size: 0.88rem; margin-top: 32px; }

/* ─────────────────────────── Reveal animation ─────────────────────────── */
.card, .step, .hw-item, .faq details { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
    .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
    .reveal.in { opacity: 1; transform: none; }
}

/* ─────────────────────────── Responsive ─────────────────────────── */
@media (max-width: 860px) {
    .nav-links { display: none; }
    .section { padding: 72px 20px; }
    .hero { padding: 72px 20px 64px; }
    .hero-stats { gap: 32px; margin-top: 40px; }
}
@media (max-width: 520px) {
    .nav { padding: 12px 18px; }
    .nav-actions .btn { display: none; }
    .hero-cta .btn { width: 100%; }
    .cta-inner { padding: 44px 22px; }
}
