/* ============================================================
   AI Keyboard — public home page (landing page)
   Separate from the admin dashboard stylesheet: this one is shown to
   visitors and shares only the brand palette.
   ============================================================ */

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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-ink: #1e1b4b;
    --primary-soft: #eef2ff;
    --primary-text: #a5b4fc;
    --green: #22c55e;
    --green-dark: #16a34a;
    --green-ink: #052e16;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
    --text-muted: #475569;
    --text-dim: #64748b;
    --border: #e2e8f0;
    --footer: #0f172a;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
}

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

a {
    color: var(--primary-dark);
}

.wrap {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------------- Top bar ---------------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(8px);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 62px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.brand-mark {
    font-size: 20px;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 14.5px;
}

.topnav a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
}

.topnav a:hover {
    color: #fff;
}

.topnav .nav-cta {
    background: var(--primary);
    color: #fff;
    padding: 9px 18px;
    border-radius: 999px;
    font-weight: 600;
}

.topnav .nav-cta:hover {
    background: var(--primary-dark);
}

/* ---------------- Hero ---------------- */

.hero {
    background:
        radial-gradient(900px 420px at 82% 0%, rgba(129, 140, 248, 0.38), transparent 62%),
        linear-gradient(150deg, #4f46e5 0%, #312e81 45%, #1e1b4b 100%);
    color: #fff;
    padding: 74px 0 88px;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 56px;
    align-items: center;
}

.badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 22px;
}

.hero h1 {
    font-size: clamp(40px, 6vw, 62px);
    line-height: 1.04;
    letter-spacing: -0.025em;
    margin-bottom: 18px;
}

.lead {
    font-size: 19px;
    color: var(--primary-text);
    max-width: 46ch;
    margin-bottom: 30px;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    scroll-margin-top: 90px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 999px;
    padding: 13px 24px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

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

.btn-lg {
    padding: 16px 30px;
    font-size: 17px;
}

.btn-primary {
    background: var(--green);
    color: var(--green-ink);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.32);
}

.btn-primary:hover {
    background: var(--green-dark);
    color: var(--green-ink);
}

.btn-arrow {
    font-size: 19px;
    line-height: 1;
}

.btn-ghost {
    border: 1.5px solid rgba(255, 255, 255, 0.38);
    color: #fff;
}

.btn-ghost:hover {
    border-color: rgba(255, 255, 255, 0.7);
    color: #fff;
}

.hero-note {
    margin-top: 18px;
    font-size: 14px;
    color: var(--primary-text);
}

.hero-photo {
    margin-top: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

/* ---------------- Keyboard mock (pure CSS, no image) ---------------- */

.mock {
    justify-self: center;
    width: 100%;
    max-width: 330px;
}

.mock-phone {
    background: #0b1120;
    border: 3px solid var(--primary);
    border-radius: 42px;
    padding: 22px 18px;
    box-shadow: var(--shadow-lg);
}

.mock-field {
    display: flex;
    align-items: center;
    gap: 3px;
    background: #1e293b;
    border-radius: 12px;
    padding: 11px 14px;
}

.mock-typed {
    font-size: 18px;
    color: #fff;
}

.mock-caret {
    width: 2px;
    height: 22px;
    background: #38bdf8;
    animation: caret-blink 1.05s steps(1, end) infinite;
}

@keyframes caret-blink {
    0%, 50%   { opacity: 1; }
    50.01%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .mock-caret { animation: none; }
}

.mock-suggest {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 12px;
}

.mock-suggest span {
    background: #1e293b;
    border-radius: 10px;
    padding: 9px 2px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--primary-text);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mock-keys {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 14px;
}

.mock-row {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.mock-row b,
.mock-space {
    flex: 1 1 0;
    height: 40px;
    display: grid;
    place-items: center;
    background: #334155;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
}

.mock-space {
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
}

.mock-ai {
    flex: 0 0 56px;
    background: var(--primary);
    color: #fff;
}

.mock-caption {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--primary-text);
}

/* ---------------- Sections ---------------- */

.section {
    padding: 76px 0;
}

.section-alt {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-title {
    font-size: clamp(26px, 3.4vw, 33px);
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 14px;
}

.section-sub {
    text-align: center;
    color: var(--text-muted);
    max-width: 62ch;
    margin: 0 auto 34px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
    gap: 20px;
    margin-top: 34px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.card h3 {
    font-size: 17px;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.card p {
    color: var(--text-muted);
    font-size: 15px;
}

/* ---------------- Steps ---------------- */

.steps {
    list-style: none;
    max-width: 880px;
    margin: 30px auto 0;
    display: grid;
    gap: 16px;
}

.step {
    display: flex;
    gap: 18px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    box-shadow: var(--shadow);
}

.step-num {
    flex: 0 0 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 800;
    border-radius: 999px;
}

.step h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.step p {
    color: var(--text-muted);
    font-size: 15px;
}

/* ---------------- Plans ---------------- */

.plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
    gap: 20px;
    margin-top: 34px;
}

.plan {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 22px;
    box-shadow: var(--shadow);
}

.plan-popular {
    border: 2px solid var(--primary);
    box-shadow: 0 18px 44px rgba(99, 102, 241, 0.18);
}

.plan-tag {
    position: absolute;
    top: -13px;
    left: 22px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 999px;
}

.plan h3 {
    font-size: 17px;
    margin-bottom: 10px;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}

.plan-price strong {
    font-size: 30px;
    letter-spacing: -0.02em;
}

.plan-price span {
    font-size: 13px;
    color: var(--text-dim);
}

.plan-requests {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.plan-desc {
    font-size: 14px;
    color: var(--text-muted);
}

.plans-note {
    text-align: center;
    color: var(--text-dim);
    font-size: 14px;
    margin-top: 26px;
}

/* ---------------- Final CTA ---------------- */

.cta-final {
    background: linear-gradient(150deg, #4f46e5 0%, #1e1b4b 100%);
    color: #fff;
    padding: 68px 0;
    text-align: center;
}

.cta-final h2 {
    font-size: clamp(26px, 3.6vw, 34px);
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.cta-final p {
    color: var(--primary-text);
    margin-bottom: 26px;
}

.cta-inner .cta-row {
    justify-content: center;
}

.cta-inner .hero-note {
    margin-top: 16px;
}

/* ---------------- Footer ---------------- */

.site-footer {
    background: var(--footer);
    color: #94a3b8;
    padding: 26px 0;
    font-size: 14px;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    align-items: center;
    justify-content: space-between;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
}

.footer-links a {
    color: #cbd5e1;
}

.footer-links a:hover {
    color: #fff;
}

/* ---------------- Small screens ---------------- */

@media (max-width: 920px) {
    .hero {
        padding: 54px 0 66px;
    }

    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 44px;
    }

    .topnav {
        gap: 16px;
        font-size: 14px;
    }

    .section {
        padding: 58px 0;
    }
}

@media (max-width: 600px) {
    .topnav a:not(.nav-cta) {
        display: none;
    }

    .lead {
        font-size: 17px;
    }

    .btn-lg {
        width: 100%;
    }

    .mock-phone {
        border-radius: 34px;
        padding: 18px 14px;
    }
}
