:root {
    --bg: #0a0015;
    --panel: #150025;
    --glass: rgba(20, 0, 40, 0.7);
    --card: rgba(255, 255, 255, 0.03);
    --accent: #ff6ec7;
    --accent2: #7b68ee;
    --accent3: #00ffd5;
    --text: #f0e6ff;
    --muted: #a090c0;
    --border: rgba(255, 110, 199, 0.15);
    --glow: rgba(255, 110, 199, 0.4);
    --shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
    font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
}

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

body {
    background:
        radial-gradient(ellipse at 20% 0%, rgba(255, 110, 199, 0.15), transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(123, 104, 238, 0.15), transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 255, 213, 0.08), transparent 60%),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animated particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: float 15s infinite ease-in-out;
}

.particle:nth-child(1) { left: 10%; top: 20%; background: var(--accent); animation-delay: 0s; }
.particle:nth-child(2) { left: 80%; top: 40%; background: var(--accent2); animation-delay: 2s; }
.particle:nth-child(3) { left: 30%; top: 70%; background: var(--accent3); animation-delay: 4s; }
.particle:nth-child(4) { left: 60%; top: 10%; background: var(--accent); animation-delay: 6s; }
.particle:nth-child(5) { left: 90%; top: 80%; background: var(--accent2); animation-delay: 8s; }

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
    50% { transform: translateY(-30px) scale(1.5); opacity: 1; }
}

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

/* Hero Section */
.hero {
    padding: 3rem clamp(1.5rem, 4vw, 4rem) 4rem;
    position: relative;
    z-index: 1;
}

.topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.2rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(255, 110, 199, 0.2), rgba(123, 104, 238, 0.2));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    font-size: 1.3rem;
}

.pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.eyebrow::before {
    content: "";
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 999px;
}

.hero-copy h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, var(--text), var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lede {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 500px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin: 2rem 0 1.5rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.6rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    box-shadow: 0 0 30px var(--glow), 0 10px 40px rgba(0, 0, 0, 0.3);
}

.btn.primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 50px var(--glow), 0 20px 50px rgba(0, 0, 0, 0.4);
}

.btn.primary.large {
    padding: 1.1rem 2rem;
    font-size: 1.05rem;
}

.btn.ghost {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text);
    backdrop-filter: blur(10px);
}

.btn.ghost:hover {
    border-color: var(--accent);
    background: rgba(255, 110, 199, 0.1);
    transform: translateY(-2px);
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.hero-badges span {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
}

/* Robot Image Card */
.glass-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
}

.robot-image {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.reachy-img {
    max-width: 100%;
    max-height: 350px;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(255, 110, 199, 0.3));
    animation: float-robot 4s ease-in-out infinite;
}

@keyframes float-robot {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        filter: drop-shadow(0 20px 40px rgba(255, 110, 199, 0.3));
    }
    50% {
        transform: translateY(-15px) rotate(2deg);
        filter: drop-shadow(0 30px 50px rgba(123, 104, 238, 0.4));
    }
}

.caption {
    text-align: center;
    color: var(--muted);
    font-size: 0.95rem;
    margin-top: 1.5rem;
}

/* Sections */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem clamp(1.5rem, 4vw, 4rem);
    position: relative;
    z-index: 1;
}

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

.section-header h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: 0.5rem;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
}

.feature-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    backdrop-filter: blur(15px);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 30px rgba(255, 110, 199, 0.1);
}

.feature-card .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 110, 199, 0.15), rgba(123, 104, 238, 0.15));
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.feature-card p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Code Card */
.code-card {
    background: #0d0d1a;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: var(--shadow);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
}

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

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca40; }

.code-title {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.8rem;
}

.code-card pre {
    padding: 1.5rem;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.8;
}

.code-card code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: var(--text);
}

.code-card .comment {
    color: #6a737d;
}

.quickstart-note {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--muted);
}

.quickstart-note strong {
    color: var(--accent3);
}

/* Story Cards */
.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.story-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(15px);
}

.story-card.accent {
    background: linear-gradient(145deg, rgba(123, 104, 238, 0.1), rgba(255, 110, 199, 0.08));
}

.story-card h3 {
    margin-bottom: 1.2rem;
}

.story-list {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.story-list li {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    color: var(--muted);
    line-height: 1.5;
}

.story-list li span {
    flex-shrink: 0;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.chip {
    padding: 0.5rem 1rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    font-size: 0.85rem;
}

/* CTA */
.cta-card {
    text-align: center;
    background: linear-gradient(145deg, rgba(255, 110, 199, 0.1), rgba(123, 104, 238, 0.1));
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 3rem 2rem;
    backdrop-filter: blur(15px);
}

.cta-card h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.cta-card p {
    color: var(--muted);
    margin-bottom: 1.5rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 1.5rem;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.footer a {
    color: var(--accent);
    transition: color 0.2s;
}

.footer a:hover {
    color: var(--accent3);
}

.footer-sub {
    margin-top: 0.8rem;
    font-size: 0.85rem;
    color: var(--muted);
}

/* Responsive */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .lede {
        margin: 0 auto;
    }

    .hero-actions {
        justify-content: center;
    }

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

    .topline {
        justify-content: center;
    }

    .eyebrow::before {
        display: none;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 2rem 1rem 3rem;
    }

    .btn {
        width: 100%;
    }

    .hero-actions {
        flex-direction: column;
    }

    .pill {
        font-size: 0.75rem;
        padding: 0.5rem 0.8rem;
    }
}
