/* ═══════════════════════════════════════════
   AILoopLabs – Open Source Product Showcase
   Same palette as ClipVault dark theme
   ═══════════════════════════════════════════ */

:root {
    --bg-primary: #06080d;
    --bg-secondary: #0d1117;
    --bg-card: #161b22;
    --bg-card-hover: #1c2128;
    --border: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(139, 92, 246, 0.3);
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-tertiary: #6e7681;
    --accent: #8b5cf6;
    --accent-hover: #a78bfa;
    --accent-glow: rgba(139, 92, 246, 0.25);
    --green: #3fb950;
    --green-glow: rgba(63, 185, 80, 0.15);
    --cyan: #06b6d4;
    --pink: #ec4899;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

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

a:hover {
    color: var(--accent-hover);
}

/* ═══ Navigation ═══ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 24px;
    transition: all 0.3s;
    background: rgba(6, 8, 13, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
}

.nav.scrolled {
    border-bottom-color: var(--border);
    background: rgba(6, 8, 13, 0.92);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.nav-logo .logo-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    font-weight: 900;
}

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

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

.btn-nav-cta {
    background: var(--accent) !important;
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem !important;
    transition: background 0.2s, transform 0.15s !important;
}

.btn-nav-cta:hover {
    background: var(--accent-hover) !important;
    transform: translateY(-1px);
}

/* ═══ Hero ═══ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    top: -100px;
    left: -150px;
    animation: float 12s infinite ease-in-out;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--cyan), transparent 70%);
    bottom: -100px;
    right: -100px;
    animation: float 15s infinite ease-in-out reverse;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--pink), transparent 70%);
    top: 30%;
    right: 15%;
    animation: float 10s infinite ease-in-out 3s;
}

@keyframes float {

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

    33% {
        transform: translate(30px, -30px);
    }

    66% {
        transform: translate(-20px, 20px);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 780px;
}

.hero-badge {
    display: inline-block;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.25);
    color: var(--accent-hover);
    padding: 6px 18px;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 28px;
}

.hero h1 {
    font-size: clamp(2.8rem, 5.5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
    margin-bottom: 22px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--cyan), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-family: var(--font);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 40px var(--accent-glow), 0 4px 16px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 0 60px var(--accent-glow), 0 8px 24px rgba(0, 0, 0, 0.4);
}

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

.btn-ghost:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
}

/* ═══ Stats Bar ═══ */
.stats-bar {
    padding: 60px 24px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.stats-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 32px;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.stat-value .gradient-text {
    font-size: inherit;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ═══ Sections Common ═══ */
.section-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

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

.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

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

/* ═══ Products Grid ═══ */
.products {
    padding: 120px 0;
    background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(139, 92, 246, 0.04) 0%, transparent 100%);
}

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

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0;
    overflow: hidden;
    transition: all 0.35s;
    opacity: 0;
    transform: translateY(24px);
    display: flex;
    flex-direction: column;
}

.product-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.product-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), 0 0 40px var(--accent-glow);
}

.product-card-header {
    padding: 28px 28px 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.product-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.product-icon.clipboard {
    background: rgba(139, 92, 246, 0.12);
    color: var(--accent);
}

.product-icon.ai {
    background: rgba(6, 182, 212, 0.12);
    color: var(--cyan);
}

.product-icon.data {
    background: rgba(63, 185, 80, 0.12);
    color: var(--green);
}

.product-icon.workflow {
    background: rgba(236, 72, 153, 0.12);
    color: var(--pink);
}

.product-icon.monitor {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
}

.product-icon.deploy {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.product-card-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.product-card-header .product-status {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 100px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.status-live {
    background: var(--green-glow);
    color: var(--green);
    border: 1px solid rgba(63, 185, 80, 0.3);
}

.status-beta {
    background: rgba(6, 182, 212, 0.1);
    color: var(--cyan);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.status-soon {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-hover);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.product-card-body {
    padding: 16px 28px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    flex: 1;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.product-tag {
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-tertiary);
    border: 1px solid var(--border);
}

.product-card-footer {
    padding: 16px 28px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s;
}

.product-link:hover {
    gap: 10px;
    color: var(--accent-hover);
}

.product-stars {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ═══ Why Open Source ═══ */
.why-section {
    padding: 120px 0;
}

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

.why-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: all 0.3s;
    opacity: 0;
    transform: translateY(20px);
}

.why-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.why-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.why-card .why-emoji {
    font-size: 2rem;
    margin-bottom: 16px;
}

.why-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}

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

/* ═══ CTA ═══ */
.cta {
    position: relative;
    padding: 120px 0;
    text-align: center;
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.orb-4 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.15;
    filter: blur(140px);
}

.orb-5 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--cyan), transparent 70%);
    bottom: 0;
    left: 20%;
    opacity: 0.1;
    filter: blur(100px);
}

.cta h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    position: relative;
}

.cta p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 520px;
    margin: 0 auto 36px;
    position: relative;
}

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

/* ═══ Footer ═══ */
.footer {
    border-top: 1px solid var(--border);
    padding: 32px 24px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

.footer-left span {
    color: var(--text-primary);
    font-weight: 600;
}

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

.footer-right a {
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

.footer-right a:hover {
    color: var(--text-primary);
}

/* ═══ Responsive ═══ */
@media (max-width: 900px) {

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

    .stats-inner {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .nav-links a:not(.btn-nav-cta) {
        display: none;
    }

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

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

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

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

    .stats-inner {
        flex-direction: column;
        align-items: center;
    }
}