/* ===================================
   ROOT VARIABLES
=================================== */
:root {
    --bg: #0B0D12;
    --surface: #131722;
    --card: #191E2A;
    --primary: #5B7CFF;
    --secondary: #7C4DFF;
    --accent: #33D1FF;
    --success: #30D158;
    --text: #F5F7FA;
    --text-secondary: #9AA4B2;
    --border: rgba(255, 255, 255, .08);
    --radius: 20px;
    --shadow: 0 20px 60px rgba(0, 0, 0, .45);
    --container: 1200px;
}

/* ===================================
   RESET
=================================== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter",
    system-ui,
    sans-serif;
    overflow-x: hidden;
}

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

p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 16px;
}

.container {
    width: min(100% - 48px, var(--container));
    margin: auto;
}

/* ===================================
   BACKGROUND
=================================== */
.background {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(
            rgba(255, 255, 255, .03) 1px,
            transparent 1px
    ),
    linear-gradient(
            90deg,
            rgba(255, 255, 255, .03) 1px,
            transparent 1px
    );
    background-size: 60px 60px;
    mask-image: radial-gradient(
            circle at center,
            black,
            transparent 75%
    );
}

.gradient {
    position: absolute;
    filter: blur(120px);
    opacity: .45;
    border-radius: 50%;
    animation: float 12s infinite alternate;
}

.gradient-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -200px;
    left: 10%;
}

.gradient-2 {
    width: 450px;
    height: 450px;
    background: var(--secondary);
    right: 5%;
    top: 20%;
}

.gradient-3 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    bottom: -200px;
    left: 40%;
}

@keyframes float {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(80px);
    }
}

/* ===================================
   NAVBAR
=================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 24px 0;
    backdrop-filter: blur(20px);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(19, 23, 34, .55);
    border: 1px solid var(--border);
    padding: 14px 18px;
    border-radius: 18px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.logo-icon {
    width: 36px;
    height: 36px;
    display: block;
}

nav {
    display: flex;
    gap: 32px;
}

nav a {
    color: var(--text-secondary);
    transition: .3s;
}

nav a:hover {
    color: var(--text);
}

.nav-buttons {
    display: flex;
    gap: 12px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 14px;
    border: 1px solid var(--border);
    transition: .3s;
    font-weight: 500;
}

.button:hover {
    transform: translateY(-2px);
}

.button.primary {
    background: linear-gradient(
            135deg,
            var(--primary),
            var(--secondary)
    );
    box-shadow: 0 0 40px rgba(91, 124, 255, .35);
}

.button.ghost {
    background: rgba(255, 255, 255, .03);
}

.button.secondary {
    background: rgba(255, 255, 255, .04);
}

.button.large {
    padding: 16px 32px;
    font-size: 16px;
}
.button.disabled {
    opacity: .5;
    pointer-events: none;
    cursor: not-allowed;
}

/* ===================================
   HERO
=================================== */
.hero {
    padding: 100px 0 140px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: center;
}

.badge {
    display: inline-flex;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .04);
    color: var(--accent);
    font-size: 14px;
    margin-bottom: 25px;
}

.hero h1 {
    font-size: clamp(48px, 7vw, 84px);
    line-height: 1.05;
    margin: 0 0 30px;
    letter-spacing: -3px;
}

.hero h1 span {
    background: linear-gradient(
            135deg,
            var(--primary),
            var(--accent)
    );
    -webkit-background-clip: text;
    color: transparent;
}

.hero p {
    font-size: 20px;
    max-width: 560px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin: 40px 0;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-badges div {
    padding: 10px 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .03);
    border-radius: 999px;
    color: var(--text-secondary);
}

/* ===================================
   HERO PRODUCT WINDOW
=================================== */
.hero-visual {
    position: relative;
}

.window {
    background: rgba(19, 23, 34, .75);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    backdrop-filter: blur(25px);
    animation: appear 1s ease;
}

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.window-header {
    height: 45px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 18px;
    border-bottom: 1px solid var(--border);
}

.window-header span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .25);
}

.window-body {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 450px;
}

.window aside {
    padding: 25px;
    border-right: 1px solid var(--border);
}

.window aside h5 {
    color: var(--text-secondary);
}

.window aside pre {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.8;
}

.window main {
    padding: 30px;
}

.note {
    background: rgba(255, 255, 255, .04);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.note h3 {
    margin-top: 0;
}

.graph {
    height: 220px;
    margin-top: 30px;
    position: relative;
}

.graph svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.graph line {
    stroke: rgba(91, 124, 255, .35);
    stroke-width: 2;
}

.node {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 25px var(--primary);
}

.node.a {
    top: 35px;
    left: 30px;
}

.node.b {
    top: 65px;
    left: 50%;
}

.node.c {
    top: 20px;
    right: 30px;
}

.node.d {
    bottom: 35px;
    right: 30%;
}

.node.e {
    bottom: 20px;
    left: 30%;
}

.floating-card {
    position: absolute;
    padding: 12px 20px;
    background: rgba(19, 23, 34, .85);
    border: 1px solid var(--border);
    backdrop-filter: blur(15px);
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
    animation: float-card 5s infinite alternate;
}

@keyframes float-card {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-15px);
    }
}

.sync {
    top: 80px;
    right: -40px;
    color: var(--accent);
}

.markdown {
    bottom: 120px;
    left: -40px;
}

.ai {
    bottom: 30px;
    right: 40px;
    color: #d8c7ff;
}

/* ===================================
   SECTIONS
=================================== */
.section {
    padding: 120px 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 70px;
}

.section-header h2 {
    font-size: clamp(36px, 5vw, 58px);
    letter-spacing: -2px;
    margin: 15px 0;
}

.section-header h2 span {
    background: linear-gradient(
            135deg,
            var(--primary),
            var(--accent)
    );
    -webkit-background-clip: text;
    color: transparent;
}

/* ===================================
   FEATURES
=================================== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    position: relative;
    padding: 32px;
    background: rgba(25, 30, 42, .65);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: .35s;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(91, 124, 255, .35);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(
            135deg,
            rgba(91, 124, 255, .25),
            rgba(124, 77, 255, .25)
    );
    margin-bottom: 25px;
    font-size: 22px;
}

.feature-card h3 {
    font-size: 22px;
}

.feature-preview {
    display: block;
    width: 100%;
    margin-top: 20px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .05);
}

.folder-tree {
    margin-top: 25px;
    padding: 18px;
    border-radius: 14px;
    background: rgba(0, 0, 0, .25);
}

.folder-tree pre {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.7;
}

.providers {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.providers span {
    padding: 8px 12px;
    background: rgba(255, 255, 255, .05);
    border-radius: 10px;
    font-size: 13px;
}

.coming {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(124, 77, 255, .2);
    color: #cbbcff;
    font-size: 12px;
}

/* ===================================
   LOCAL FIRST
=================================== */
.local-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.local-card {
    padding: 40px 30px;
    text-align: center;
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--border);
    border-radius: 20px;
}

.local-icon {
    font-size: 42px;
    margin-bottom: 20px;
}

/* ===================================
   WORKFLOW
=================================== */
.timeline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.step {
    width: 180px;
    padding: 30px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    text-align: center;
}

.step-number {
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 15px;
}

.connector {
    height: 1px;
    width: 50px;
    background: linear-gradient(
            90deg,
            var(--primary),
            var(--secondary)
    );
}

/* ===================================
   SCREENSHOTS
=================================== */
.screens-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

.app-window {
    background: rgba(19, 23, 34, .8);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.app-window.large {
    grid-column: span 8;
}

.app-window.editor {
    grid-column: span 4;
}

.app-window.graph-preview {
    grid-column: span 5;
}

.app-window.mobile-preview {
    grid-column: span 7;
}

.app-header {
    height: 36px;
    border-bottom: 1px solid var(--border);
}

.app-header span {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 14px 0 0 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .25);
}

.dashboard {
    display: grid;
    grid-template-columns: 180px 1fr;
    min-height: 400px;
}

.dashboard aside {
    padding: 25px;
    border-right: 1px solid var(--border);
}

.menu-item {
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.menu-item.active {
    background: rgba(91, 124, 255, .15);
    color: var(--text);
}

.dashboard main {
    padding: 30px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stats div {
    padding: 20px;
    background: rgba(255, 255, 255, .04);
    border-radius: 16px;
}

.stats h4 {
    font-size: 30px;
    margin: 0;
}

.chart {
    margin-top: 40px;
    display: flex;
    align-items: flex-end;
    gap: 15px;
    height: 150px;
}

.chart div {
    width: 35px;
    background: linear-gradient(
            var(--primary),
            var(--accent)
    );
    border-radius: 10px 10px 0 0;
}

.chart div:nth-child(1) {
    height: 40%;
}

.chart div:nth-child(2) {
    height: 80%;
}

.chart div:nth-child(3) {
    height: 55%;
}

.chart div:nth-child(4) {
    height: 95%;
}

/* EDITOR */
.editor-content {
    padding: 35px;
    font-family: monospace;
    line-height: 2;
}

.line {
    color: var(--text-secondary);
}

.line.title {
    color: var(--accent);
    font-size: 18px;
}

/* KNOWLEDGE GRAPH */
.knowledge-graph {
    height: 350px;
    position: relative;
}

.knowledge-graph svg {
    position: absolute;
    width: 100%;
    height: 100%;
}

.knowledge-graph line {
    stroke: rgba(91, 124, 255, .4);
    stroke-width: 2;
}

.point {
    position: absolute;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 30px var(--primary);
}

.p1 {
    top: 50px;
    left: 70px;
}

.p2 {
    top: 90px;
    right: 90px;
}

.p3 {
    bottom: 80px;
    left: 45%;
}

.p4 {
    bottom: 40px;
    right: 40%;
}

.p5 {
    top: 40%;
    left: 40%;
}

/* PHONE MOCKUP */
.phone {
    width: 260px;
    margin: 40px auto;
    padding: 18px;
    border: 8px solid #090b10;
    border-radius: 40px;
    background: var(--surface);
}

.phone-header {
    height: 15px;
    width: 80px;
    background: rgba(255, 255, 255, .1);
    border-radius: 20px;
    margin: auto;
}

.phone-note,
.phone-card {
    margin-top: 25px;
    padding: 18px;
    background: rgba(255, 255, 255, .05);
    border-radius: 15px;
}

/* ===================================
   ROADMAP
=================================== */
.roadmap-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.roadmap-item {
    padding: 35px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 22px;
}

.roadmap-status {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .05);
    margin-bottom: 20px;
    font-size: 13px;
}

.completed .roadmap-status {
    color: var(--success);
}

.progress .roadmap-status {
    color: var(--accent);
}

.planned .roadmap-status {
    color: #cbbcff;
}

.roadmap-item li {
    margin: 12px 0;
    color: var(--text-secondary);
}

/* ===================================
   FINAL CTA
=================================== */
.final-cta {
    position: relative;
    text-align: center;
    padding: 140px 0;
    overflow: hidden;
}

.final-cta .container {
    position: relative;
    z-index: 1;
}

.final-cta h2 {
    font-size: clamp(42px, 6vw, 72px);
    margin: 0 0 20px;
}

.cta-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--primary);
    filter: blur(150px);
    opacity: .25;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 0;
}

/* ===================================
   FOOTER
=================================== */
.footer {
    border-top: 1px solid var(--border);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer a {
    display: block;
    margin: 12px 0;
    color: var(--text-secondary);
}

.copyright {
    margin-top: 50px;
    text-align: center;
    color: var(--text-secondary);
}

/* ===================================
   RESPONSIVE
=================================== */
@media (max-width: 1100px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-content {
        text-align: center;
    }

    .hero-buttons,
    .hero-badges {
        justify-content: center;
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .timeline {
        flex-direction: column;
    }

    .connector {
        width: 1px;
        height: 40px;
    }

    .screens-grid {
        display: flex;
        flex-direction: column;
    }

    .roadmap-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .container {
        width: min(100% - 30px, var(--container));
    }

    nav {
        display: none;
    }

    .logo span {
        display: none;
    }

    .hero {
        padding-top: 50px;
    }

    .hero h1 {
        font-size: 48px;
    }

    .window-body {
        grid-template-columns: 1fr;
    }

    .window aside {
        display: none;
    }

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

    .nav-buttons .ghost {
        display: none;
    }

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

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

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

/* ===================================
   JS ANIMATIONS
=================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .8s ease,
    transform .8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card,
.local-card,
.roadmap-item,
.app-window {
    position: relative;
    overflow: hidden;
}

.feature-card::before,
.local-card::before,
.roadmap-item::before,
.app-window::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
            300px circle at var(--mouse-x) var(--mouse-y),
            rgba(91, 124, 255, .15),
            transparent 40%
    );
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
}

.feature-card:hover::before,
.local-card:hover::before,
.roadmap-item:hover::before,
.app-window:hover::before {
    opacity: 1;
}

.hero-visual {
    transition: transform .2s ease-out;
}