/* === CSS Reset & Base === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-primary: #050810;
    --bg-card: rgba(15, 20, 35, 0.8);
    --bg-card-hover: rgba(20, 28, 50, 0.9);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(0, 207, 145, 0.3);
    --text-primary: #f0f4ff;
    --text-secondary: #8b949e;
    --text-muted: #5a6370;
    --accent: #00CF91;
    --accent-blue: #00A3FF;
    --accent-glow: rgba(0, 207, 145, 0.15);
    --danger: #FF6B6B;
    --safe: #00CF91;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    --max-width: 1100px;
    --section-gap: 120px;
}

html {
    scroll-behavior: smooth;
}

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.85;
}

/* === Background Effects === */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 0;
}

.glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}

.glow-1 {
    width: 600px;
    height: 600px;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(0, 207, 145, 0.12) 0%, transparent 70%);
}

.glow-2 {
    width: 500px;
    height: 500px;
    top: 40%;
    right: -150px;
    background: radial-gradient(circle, rgba(0, 163, 255, 0.08) 0%, transparent 70%);
}

.glow-3 {
    width: 400px;
    height: 400px;
    bottom: 10%;
    left: -100px;
    background: radial-gradient(circle, rgba(0, 207, 145, 0.06) 0%, transparent 70%);
}

/* === Sections Common === */
.section {
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    margin-bottom: var(--section-gap);
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 32px;
}

.section-icon {
    color: var(--accent);
    margin-right: 8px;
    font-weight: 700;
}

.section-note {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 16px;
}

/* === Hero === */
.hero {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 80px 24px 60px;
    max-width: var(--max-width);
    margin: 0 auto;
    margin-bottom: var(--section-gap);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
}

.hero-badge:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.badge-label {
    background: var(--accent);
    color: var(--bg-primary);
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.badge-arrow {
    color: var(--accent);
    font-size: 1rem;
}

.hero-icon {
    margin-bottom: 24px;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.accent {
    color: var(--accent);
}

.hero-tagline {
    font-family: var(--font-display);
    font-size: clamp(0.8rem, 2vw, 1rem);
    font-weight: 600;
    letter-spacing: 0.25em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 24px;
}

.hero-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
}

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

.btn-primary:hover {
    background: #00e6a1;
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(0, 207, 145, 0.25);
    opacity: 1;
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    border-color: var(--border-hover);
    background: rgba(0, 207, 145, 0.05);
    opacity: 1;
}

/* === Flow Diagram === */
.flow-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
    margin: 0 auto;
}

.flow-step {
    display: flex;
    align-items: center;
    gap: 0;
}

.flow-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 32px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    min-width: 150px;
    transition: border-color 0.3s;
}

.flow-node:hover {
    border-color: var(--border-hover);
}

.flow-node-primary {
    border-color: rgba(0, 207, 145, 0.3);
    background: rgba(0, 207, 145, 0.05);
    box-shadow: 0 0 40px rgba(0, 207, 145, 0.08);
}

.flow-emoji {
    font-size: 2rem;
}

.flow-label {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
}

.flow-sublabel {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.flow-arrow {
    padding: 0 16px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

/* === Terminal === */
.terminal {
    background: rgba(10, 14, 28, 0.95);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    max-width: 720px;
    margin: 0 auto;
}

.terminal-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red {
    background: #ff5f57;
}

.dot-yellow {
    background: #ffbd2e;
}

.dot-green {
    background: #28c840;
}

.terminal-tabs {
    display: flex;
    gap: 4px;
    flex: 1;
}

.terminal-tab {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 4px 14px;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.terminal-tab.active {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(0, 207, 145, 0.08);
}

.terminal-tab:hover:not(.active) {
    color: var(--text-secondary);
}

.terminal-meta {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.terminal-body {
    padding: 20px 24px;
    min-height: 140px;
}

.terminal-content {
    display: none;
}

.terminal-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.terminal-line {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.terminal-prompt {
    color: var(--accent);
    margin-right: 8px;
    user-select: none;
}

.terminal-comment {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.terminal-copy {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.terminal-copy:hover {
    color: var(--accent);
    border-color: var(--border-hover);
}

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

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

.feature-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    margin-bottom: 16px;
}

.feature-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* === Integration Pills === */
.integrations-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.integration-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.25s ease;
    cursor: default;
}

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

.integration-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.integrations-note {
    text-align: center;
    margin-top: 20px;
}

.link-accent {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
}

/* === Demo Before/After === */
.demo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.demo-card {
    border-radius: 14px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: transform 0.3s;
}

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

.demo-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
}

.demo-label-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.demo-label-danger {
    background: var(--danger);
}

.demo-label-safe {
    background: var(--safe);
}

.demo-code {
    padding: 20px;
    background: rgba(8, 12, 24, 0.95);
}

.demo-code pre {
    font-family: var(--font-mono);
    font-size: 0.825rem;
    line-height: 1.8;
    overflow-x: auto;
}

.code-comment {
    color: var(--text-muted);
}

.code-key {
    color: var(--text-primary);
}

.code-danger {
    color: var(--danger);
}

.code-safe {
    color: var(--safe);
}

/* === Why Grid === */
.why-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.why-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: all 0.3s ease;
}

.why-item:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.why-check {
    flex-shrink: 0;
    margin-top: 2px;
}

.why-item h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.why-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* === CTA Cards === */
.cta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.cta-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 20px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.3s ease;
    text-align: center;
}

.cta-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    opacity: 1;
}

.cta-icon {
    opacity: 0.9;
}

.cta-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
}

.cta-desc {
    font-size: 0.825rem;
    color: var(--text-secondary);
}

/* === Newsletter === */
.newsletter-card {
    max-width: 640px;
    margin: 0 auto;
    padding: 48px 40px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    text-align: center;
}

.newsletter-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 28px;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.newsletter-input {
    flex: 1;
    min-width: 240px;
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s;
}

.newsletter-input::placeholder {
    color: var(--text-muted);
}

.newsletter-input:focus {
    border-color: var(--accent);
}

/* === Footer === */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    padding: 60px 24px 30px;
    margin-top: 40px;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 48px;
    flex-wrap: wrap;
}

.footer-brand {
    max-width: 280px;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 8px;
}

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

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col h4 {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.footer-col a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--accent);
    opacity: 1;
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* === Animations === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.7s ease forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.35s;
}

.delay-4 {
    animation-delay: 0.5s;
}

.delay-5 {
    animation-delay: 0.65s;
}

/* === Scroll Reveal === */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* === Responsive === */
@media (max-width: 900px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

    .footer-links {
        gap: 40px;
    }

    :root {
        --section-gap: 80px;
    }
}

@media (max-width: 640px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }

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

    .footer-content {
        flex-direction: column;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 32px;
    }

    .hero {
        padding: 60px 20px 40px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .flow-diagram {
        flex-direction: column;
    }

    .flow-arrow {
        transform: rotate(90deg);
        padding: 8px 0;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    .newsletter-card {
        padding: 32px 24px;
    }
}