/* ─── RESET & BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:        #0b0c10;
    --bg2:       #111318;
    --bg3:       #181b22;
    --border:    rgba(255,255,255,.07);
    --text:      #e8eaf0;
    --muted:     #8a8fa8;
    --accent:    #7c5cfc;
    --accent2:   #c46eff;
    --accent3:   #3de8c8;
    --card-bg:   rgba(255,255,255,.04);
    --radius:    16px;
    --font-head: 'Roboto', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --nav-h:     72px;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    overflow-x: hidden;
    position: relative;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* ─── SMUDGES ─── */
.smudges { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.smudge {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: .18;
}
#s1 { width: 520px; height: 520px; background: var(--accent);  top: -160px;  left: -100px; }
#s2 { width: 400px; height: 400px; background: var(--accent2); top: 30%;     right: -80px; }
#s3 { width: 340px; height: 340px; background: var(--accent3); bottom: 10%;  left: 20%; }
#s4 { width: 300px; height: 300px; background: var(--accent);  top: 60%;     right: 25%; opacity:.12; }
#s5 { width: 260px; height: 260px; background: var(--accent2); bottom: -80px; right: -60px; opacity:.14; }

/* ─── NAV ─── */
#header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(11,12,16,.82);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    height: var(--nav-h);
}
.nav-inner {
    max-width: 1160px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0 2rem;
}
.logo {
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    flex-shrink: 0;
}
.logo span { color: var(--accent2); }

.nav-links {
    display: flex;
    gap: 0;
    margin-left: auto;
}
.nav-item {
    padding: .4rem .9rem;
    border-radius: 8px;
    font-size: .9rem;
    color: var(--muted);
    transition: color .2s, background .2s;
    font-weight: 500;
}
.nav-item:hover, .nav-item.active {
    color: var(--text);
    background: var(--card-bg);
}
.nav-cta {
    margin-left: 1.2rem;
    padding: .5rem 1.2rem;
    background: var(--accent);
    border-radius: 10px;
    font-size: .88rem;
    font-weight: 600;
    color: #fff;
    transition: background .2s, transform .15s;
    flex-shrink: 0;
}
.nav-cta:hover { background: var(--accent2); transform: translateY(-1px); }

.mob-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
    padding: 4px;
}
.mob-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .3s, opacity .3s;
}
.mob-menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mob-menu-btn.open span:nth-child(2) { opacity: 0; }
.mob-menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mob-menu {
    display: none;
    flex-direction: column;
    gap: .5rem;
    padding: 1rem 2rem 1.5rem;
    background: rgba(11,12,16,.96);
    border-bottom: 1px solid var(--border);
}
.mob-menu.open { display: flex; }
.mob-menu .nav-item { font-size: 1rem; }
.mob-cta {
    margin-left: 0;
    margin-top: .5rem;
    text-align: center;
    display: block;
}

/* ─── SHARED ─── */
section { position: relative; z-index: 1; }
.section-label {
    display: inline-block;
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--accent3);
    margin-bottom: .8rem;
    padding: .25rem .75rem;
    border: 1px solid rgba(61,232,200,.25);
    border-radius: 99px;
}
h2 {
    font-family: var(--font-head);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
    color: var(--text);
}
.gradient-text {
    background: linear-gradient(120deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── HERO ─── */
#main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1160px;
    margin: 0 auto;
    padding: calc(var(--nav-h) + 4rem) 2rem 5rem;
}
#left_main { flex: 1; min-width: 0; }
.badge {
    display: inline-block;
    font-size: .82rem;
    font-weight: 600;
    padding: .3rem .9rem;
    background: rgba(124,92,252,.15);
    border: 1px solid rgba(124,92,252,.35);
    border-radius: 99px;
    color: var(--accent2);
    margin-bottom: 1.4rem;
    letter-spacing: .03em;
}
h1 {
    font-family: var(--font-head);
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.03em;
    margin-bottom: 1.2rem;
}
.hero-sub {
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 520px;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

/* Signup form */
.signup-area { max-width: 480px; }
#demo_form {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}
.email-input {
    flex: 1;
    min-width: 200px;
    padding: .75rem 1.1rem;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: .95rem;
    outline: none;
    transition: border-color .2s;
}
.email-input:focus { border-color: var(--accent); }
.email-input::placeholder { color: var(--muted); }
.signup-btn {
    padding: .75rem 1.6rem;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-body);
    font-size: .95rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background .2s, transform .15s;
    white-space: nowrap;
}
.signup-btn:hover { background: var(--accent2); transform: translateY(-2px); }
.form-message {
    margin-top: .75rem;
    font-size: .88rem;
    min-height: 1.2em;
}
.form-message.success { color: var(--accent3); }
.form-message.error   { color: #ff6b6b; }

/* Mockup */
#right_main {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: center;
}
.mockup-wrapper {
    position: relative;
    width: 100%;
    max-width: 460px;
}
.mockup-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.04);
}
.mockup-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: .75rem 1rem;
    background: rgba(255,255,255,.03);
    border-bottom: 1px solid var(--border);
}
.mockup-bar span {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
}
.mockup-bar span:nth-child(1) { background: #ff5f57; }
.mockup-bar span:nth-child(2) { background: #febc2e; }
.mockup-bar span:nth-child(3) { background: #28c840; }
.mockup-body { padding: 1.25rem; display: flex; flex-direction: column; gap: .8rem; }

.chat-bubble {
    padding: .65rem 1rem;
    border-radius: 12px;
    font-size: .88rem;
    line-height: 1.55;
    max-width: 88%;
    animation: fadeUp .5s ease both;
}
.chat-bubble.user {
    background: rgba(124,92,252,.18);
    border: 1px solid rgba(124,92,252,.25);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    animation-delay: .1s;
}
.chat-bubble.ai {
    background: var(--card-bg);
    border: 1px solid var(--border);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    animation-delay: .35s;
}
.ai-label {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    color: var(--accent2);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .3rem;
}
.chat-bubble.typing .dot {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--muted);
    margin: 0 2px;
    animation: bounce .9s infinite;
}
.chat-bubble.typing .dot:nth-child(2) { animation-delay: .15s; }
.chat-bubble.typing .dot:nth-child(3) { animation-delay: .3s; }

/* Float chips */
.float-chip {
    position: absolute;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .4rem .85rem;
    font-size: .8rem;
    font-weight: 600;
    color: var(--text);
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
    animation: floatChip 3.5s ease-in-out infinite;
    cursor: default;
    user-select: none;
}
#chip-pdf    { top: -18px; left: -24px;  animation-delay: 0s;    animation-duration: 3.8s; }
#chip-code   { top: 30%;   right: -28px; animation-delay: .6s;   animation-duration: 4.2s; }
#chip-github { bottom: 22%; left: -32px; animation-delay: 1.1s;  animation-duration: 3.6s; }
#chip-word   { bottom: -16px; right: 20%; animation-delay: 1.7s; animation-duration: 4s; }

/* ─── FEATURES ─── */
#features {
    max-width: 1160px;
    margin: 0 auto;
    padding: 6rem 2rem;
    text-align: center;
}
#features h2 { margin-bottom: 3rem; }
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.75rem;
    text-align: left;
    transition: transform .25s, border-color .25s, box-shadow .25s;
    animation: fadeUp .6s ease var(--delay, 0s) both;
}
.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(124,92,252,.3);
    box-shadow: 0 20px 50px rgba(124,92,252,.12);
}
.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}
.feature-card h3 {
    font-family: var(--font-head);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: .7rem;
    color: var(--text);
}
.feature-card p { color: var(--muted); font-size: .92rem; line-height: 1.7; }

/* ─── HOW IT WORKS ─── */
#howto {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 6rem 2rem;
    text-align: center;
}
#howto h2 { margin-bottom: 3rem; }
.steps-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: .5rem;
}
.step-card {
    flex: 1;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: left;
    transition: border-color .25s;
}
.step-card:hover { border-color: rgba(61,232,200,.3); }
.step-num {
    font-family: var(--font-head);
    font-size: 2.5rem;
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--accent);
    line-height: 1;
    margin-bottom: 1rem;
}
.step-card h3 {
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: .6rem;
}
.step-card p { color: var(--muted); font-size: .9rem; line-height: 1.7; }
.step-connector {
    font-size: 1.5rem;
    color: var(--accent);
    padding-top: 3.2rem;
    flex-shrink: 0;
    opacity: .5;
}

/* ─── FAQ ─── */
#faq {
    max-width: 760px;
    margin: 0 auto;
    padding: 6rem 2rem;
    text-align: center;
}
#faq h2 { margin-bottom: 2.5rem; }
.faq-list { display: flex; flex-direction: column; gap: .75rem; text-align: left; }
.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .25s;
}
.faq-item:has(.accordion[aria-expanded="true"]) { border-color: rgba(124,92,252,.35); }

.accordion {
    width: 100%;
    background: none;
    border: none;
    padding: 1.1rem 1.4rem;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    text-align: left;
    transition: color .2s;
}
.accordion::after {
    content: '+';
    font-size: 1.4rem;
    color: var(--accent);
    transition: transform .3s;
    flex-shrink: 0;
    line-height: 1;
}
.accordion[aria-expanded="true"] { color: var(--accent2); }
.accordion[aria-expanded="true"]::after { transform: rotate(45deg); }

.panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
}
.panel p {
    padding: 0 1.4rem 1.2rem;
    color: var(--muted);
    font-size: .93rem;
    line-height: 1.7;
}
.panel.open { max-height: 400px; }

/* ─── CONTACT ─── */
#contact {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 6rem 2rem;
    text-align: center;
}
.contact-inner { max-width: 700px; margin: 0 auto; }
.contact-sub {
    color: var(--muted);
    font-size: 1.05rem;
    margin-top: .8rem;
    margin-bottom: 2.5rem;
}
.contact-cards {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
}
.contact-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem 1.5rem;
    flex: 1;
    min-width: 240px;
    max-width: 320px;
    text-align: left;
    transition: border-color .25s, transform .2s, box-shadow .2s;
    cursor: pointer;
}
.contact-card:hover {
    border-color: rgba(196,110,255,.4);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(196,110,255,.1);
}
.contact-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: .85rem;
    color: #fff;
    flex-shrink: 0;
}
.contact-info { flex: 1; min-width: 0; }
.contact-info strong { display: block; font-size: .95rem; font-weight: 600; margin-bottom: .15rem; }
.contact-info span { font-size: .8rem; color: var(--muted); word-break: break-all; }
.contact-arrow { font-size: 1.1rem; color: var(--accent2); transition: transform .2s; }
.contact-card:hover .contact-arrow { transform: translate(3px,-3px); }

/* ─── FOOTER ─── */
#footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 2rem;
}
.footer-inner {
    max-width: 1160px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.footer-copy { color: var(--muted); font-size: .85rem; flex: 1; }
.footer-links { display: flex; gap: 1.2rem; }
.footer-links a { color: var(--muted); font-size: .85rem; transition: color .2s; }
.footer-links a:hover { color: var(--text); }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes floatChip {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-10px); }
}
@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30%            { transform: translateY(-5px); }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
    .nav-links, .nav-cta { display: none; }
    .mob-menu-btn { display: flex; }

    #main {
        flex-direction: column;
        padding-top: calc(var(--nav-h) + 3rem);
        padding-bottom: 4rem;
        text-align: center;
    }
    .hero-sub, .signup-area { margin-left: auto; margin-right: auto; }
    #demo_form { justify-content: center; }
    #right_main { width: 100%; }
    .mockup-wrapper { max-width: 360px; margin: 0 auto; }

    .features-grid { grid-template-columns: 1fr; }

    .steps-grid {
        flex-direction: column;
        align-items: stretch;
    }
    .step-connector { transform: rotate(90deg); padding: .2rem 0; align-self: center; }
}

@media (max-width: 600px) {
    #main { padding: calc(var(--nav-h) + 2rem) 1.2rem 3rem; }
    #features, #howto, #faq, #contact { padding: 4rem 1.2rem; }
    .contact-cards { flex-direction: column; align-items: center; }
    .contact-card { max-width: 100%; width: 100%; }
}