/* ==========================================================================
   Niuton Welcome Page — Dark Theme
   ========================================================================== */

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

:root {
    --bg: #0a0a0f;
    --bg-subtle: #111118;
    --bg-card: #16161e;
    --bg-card-hover: #1c1c26;
    --border: #2a2a3a;
    --border-subtle: #1e1e2e;
    --text: #e4e4ed;
    --text-muted: #8888a0;
    --text-dim: #5a5a72;
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --accent: #8b5cf6;
    --accent-light: #a78bfa;
    --gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa);
    --glow: 0 0 60px rgba(99, 102, 241, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.3px;
}

.nav-logo img {
    border-radius: 6px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

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

.nav-btn {
    background: var(--primary) !important;
    color: white !important;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: background 0.2s !important;
}

.nav-btn:hover {
    background: var(--primary-dark) !important;
}

.nav-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--text-dim);
    transform: translateY(-1px);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    position: relative;
    padding: 140px 24px 80px;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    min-height: 90vh;
}

.hero-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 800px 600px at 20% 20%, rgba(99, 102, 241, 0.08), transparent),
        radial-gradient(ellipse 600px 400px at 80% 80%, rgba(139, 92, 246, 0.06), transparent);
    pointer-events: none;
    z-index: -1;
}

.hero-content {
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--primary-light);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 24px;
    letter-spacing: 0.3px;
}

.hero h1 {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 520px;
    margin-bottom: 32px;
}

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

/* Hero Window Mock */
.hero-visual {
    z-index: 1;
}

.hero-window {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--glow), 0 20px 60px rgba(0,0,0,0.4);
    transform: perspective(1000px) rotateY(-3deg) rotateX(2deg);
    transition: transform 0.4s;
}

.hero-window:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.hero-window-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot.sm { width: 7px; height: 7px; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #28c840; }

.hero-window-title {
    margin-left: 8px;
    font-size: 12px;
    color: var(--text-dim);
    font-weight: 500;
}

.hero-window-content {
    padding: 16px;
    min-height: 320px;
    position: relative;
}

/* Mock Dock */
.mock-dock {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(30, 30, 46, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    border: 1px solid var(--border-subtle);
}

.mock-dock-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-muted);
    transition: all 0.2s;
    cursor: default;
}

.mock-dock-icon svg {
    width: 18px;
    height: 18px;
}

.mock-dock-icon.active {
    background: var(--primary);
    color: white;
}

.mock-dock-icon:hover {
    transform: translateY(-2px);
}

/* Mock Windows */
.mock-windows {
    position: relative;
    height: 260px;
}

.mock-win {
    position: absolute;
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--bg-card);
}

.mock-win-back {
    top: 0;
    left: 0;
    width: 55%;
    height: 75%;
    opacity: 0.6;
}

.mock-win-front {
    top: 20px;
    right: 0;
    width: 65%;
    height: 85%;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.mock-win-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.mock-win-t {
    margin-left: 6px;
    font-size: 10px;
    color: var(--text-dim);
    font-weight: 500;
}

.mock-win-body {
    padding: 10px;
    font-size: 11px;
}

.mock-file-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mock-file {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 11px;
}

.mock-file:hover {
    background: rgba(99, 102, 241, 0.1);
}

.mock-file-icon {
    font-size: 13px;
}

.mock-chat {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: calc(100% - 26px);
}

.mock-msg {
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.5;
    max-width: 85%;
}

.mock-msg-user {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.mock-msg-ai {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.15);
    color: var(--text);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.mock-ai-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 600;
    color: var(--accent-light);
    background: rgba(139, 92, 246, 0.15);
    padding: 1px 6px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.mock-input {
    margin-top: auto;
    padding: 8px 10px;
    border-radius: 6px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    color: var(--text-dim);
    font-size: 11px;
}

/* ==========================================================================
   Section Headers
   ========================================================================== */

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header h2 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    letter-spacing: -0.8px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    color: var(--text-muted);
    font-size: 17px;
    max-width: 560px;
    margin: 0 auto;
}

/* ==========================================================================
   Features Section
   ========================================================================== */

.features {
    padding: 100px 0;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 28px;
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: var(--border);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.feature-card-large {
    grid-column: span 3;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto;
    gap: 0 20px;
    padding: 36px;
    border-color: rgba(99, 102, 241, 0.15);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04), rgba(139, 92, 246, 0.02));
}

.feature-card-large .feature-icon {
    grid-row: span 2;
    width: 56px;
    height: 56px;
    align-self: start;
}

.feature-card-large .feature-tags {
    grid-column: 1 / -1;
}

.feature-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    margin-bottom: 16px;
    color: var(--primary-light);
}

.feature-icon svg {
    width: 20px;
    height: 20px;
}

.feature-card-large .feature-icon svg {
    width: 28px;
    height: 28px;
}

.feature-card h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.feature-tags {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.tag {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
    border: 1px solid rgba(99, 102, 241, 0.15);
}

/* ==========================================================================
   Apps Section
   ========================================================================== */

.apps-section {
    padding: 80px 0;
    background: var(--bg-subtle);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.apps-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.app-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    transition: all 0.2s;
}

.app-item:hover {
    border-color: var(--border);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.app-icon {
    font-size: 18px;
}

/* ==========================================================================
   Tech Stack Section
   ========================================================================== */

.tech {
    padding: 100px 0;
}

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

.tech-item {
    text-align: center;
    padding: 32px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.tech-item:hover {
    border-color: var(--border);
    transform: translateY(-1px);
}

.tech-name {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 4px;
}

.tech-desc {
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 500;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */

.cta {
    padding: 100px 0;
}

.cta-content {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.04));
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-lg);
}

.cta-content h2 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.cta-content p {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 28px;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 32px 0;
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 15px;
}

.footer-brand img {
    border-radius: 4px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-muted);
}

.footer-copy {
    color: var(--text-dim);
    font-size: 13px;
}

/* ==========================================================================
   Animations
   ========================================================================== */

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

.hero-content,
.hero-visual {
    animation: fadeInUp 0.6s ease-out both;
}

.hero-visual {
    animation-delay: 0.2s;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: 100px;
        min-height: auto;
    }

    .hero-visual {
        max-width: 600px;
        margin: 0 auto;
    }

    .hero-window {
        transform: none;
    }

    .hero-window:hover {
        transform: none;
    }

    .feature-card-large {
        grid-column: span 3;
        grid-template-columns: 1fr;
    }

    .feature-card-large .feature-icon {
        grid-row: auto;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-mobile-toggle {
        display: flex;
    }

    .hero {
        padding-top: 90px;
        gap: 40px;
    }

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

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

    .feature-card-large {
        grid-column: span 1;
    }

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

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
    }

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

    .cta-content {
        padding: 40px 20px;
    }
}
