:root {
    --bg-dark: #000212;
    /* Linear-style deep navy/black */
    --bg-card: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
    /* Extremely subtle border */
    --primary: #5e6ad2;
    --primary-glow: rgba(94, 106, 210, 0.5);
    --text-main: #f7f8f8;
    --text-muted: #8a8f98;
    --accent: #b4abd4;
}

h1,
h2,
h3,
.hero-title,
.logo {
    letter-spacing: -0.03em;
    /* Tighter headings */
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
    /* Tighten body text */
}

/* Noise Texture Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Transparent noise SVG */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: overlay;
}

/* --- Backgrounds --- */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

/* 3D Perspective Grid */
.grid-background {
    position: fixed;
    bottom: -30%;
    left: -50%;
    width: 200%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    transform: perspective(500px) rotateX(60deg);
    animation: gridMove 20s linear infinite;
    z-index: -2;
    mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, transparent 60%);
    -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, transparent 60%);
    pointer-events: none;
}

@keyframes gridMove {
    0% {
        transform: perspective(500px) rotateX(60deg) translateY(0);
    }

    100% {
        transform: perspective(500px) rotateX(60deg) translateY(40px);
    }
}

/* Existing Stars (Keep simple) */
.stars {
    width: 2px;
    height: 2px;
    background: white;
    box-shadow: 100px 200px white, 400px 300px white, 900px 100px white;
    animation: twinkle 5s infinite alternate;
    opacity: 0.2;
}

@keyframes twinkle {
    0% {
        opacity: 0.1;
    }

    100% {
        opacity: 0.4;
    }
}

.spotlight {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1200px;
    height: 700px;
    background: radial-gradient(circle at top, rgba(94, 106, 210, 0.25), transparent 60%);
    z-index: -1;
    pointer-events: none;
    filter: blur(60px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

/* --- Entrance Animations --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

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

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

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

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

/* --- Navbar --- */
.navbar {
    padding: 24px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(0, 2, 18, 0.8);
    /* Darker */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    letter-spacing: -0.02em;
}

.logo-icon {
    color: var(--primary);
    filter: drop-shadow(0 0 10px rgba(94, 106, 210, 0.8));
}

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

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

.nav-links a:hover {
    color: #fff;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 99px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-primary {
    background: #fff;
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.05);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* --- Hero --- */
.hero {
    padding-top: 180px;
    padding-bottom: 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* containment for grid */
}

.pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    background: rgba(94, 106, 210, 0.1);
    border: 1px solid rgba(94, 106, 210, 0.3);
    border-radius: 100px;
    font-size: 0.8rem;
    color: #b4abd4;
    margin-bottom: 32px;
    backdrop-filter: blur(4px);
    box-shadow: 0 0 15px rgba(94, 106, 210, 0.1);
}

.pill-badge:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.pill-new {
    background: var(--primary);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.hero-title {
    font-size: 5rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
    background: linear-gradient(180deg, #fff 20%, #777 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

.gradient-text {
    background: linear-gradient(90deg, #8E2DE2 0%, #4A00E0 100%);
    /* Strong purple */
    background: linear-gradient(to right, #a78bfa, #2dd4bf);
    /* Modern Purple-Teal */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-right: 0.1em;
    /* Fix cut-off italics if any */
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 540px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

/* Hero Actions */
.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.glow-btn {
    padding: 14px 40px;
    font-size: 1rem;
    position: relative;
    background: linear-gradient(180deg, #5e6ad2 0%, #4650a8 100%);
    color: white;
    border: none;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.glow-btn:hover {
    box-shadow: 0 0 30px rgba(94, 106, 210, 0.4);
    background: linear-gradient(180deg, #6875e5 0%, #515cb8 100%);
}

.sub-text {
    font-size: 0.8rem;
    color: #555;
}

/* --- App Visual (Floating Window) --- */
.hero-visual {
    margin-top: 80px;
    perspective: 2000px;
}

.app-window {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    background: #111;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.7);
    overflow: hidden;
}

/* --- Hero Visual (Nesting Animation) --- */
/* --- Hero Visual (Nesting Animation) --- */
/* --- Hero Visual (Nesting Animation) --- */
.hero-visual {
    position: fixed;
    /* Global background floor */
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    perspective: 800px;
    z-index: -10;
    /* Behind absolutely everything */
    pointer-events: none;
    overflow: hidden;
    /* Fade out the top so it doesn't clash with text */
    -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, transparent 60%);
    mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, transparent 60%);
}

#nesting-animation-container {
    width: 2000px;
    height: 1200px;
    position: relative;
    transform: rotateX(65deg) translateY(100px);
    transform-style: preserve-3d;
    transition: transform 0.2s ease-out;
    opacity: 0.4;
    /* Very subtle texture */
}

#nesting-animation-container svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    /* Allow parts to fly in from outside */
}

/* Parts Styling */
#nesting-animation-container path {
    vector-effect: non-scaling-stroke;
    fill: rgba(255, 255, 255, 0.05);
    /* Glassy fill */
    stroke-width: 1px;
    stroke-opacity: 0.8;
    transition: all 1.8s cubic-bezier(0.16, 1, 0.3, 1);
    /* Apple-style ease out */
    will-change: transform, opacity;
}

/* Hover effect on parts once assembled */
#nesting-animation-container path:hover {
    fill: rgba(255, 255, 255, 0.2);
    filter: drop-shadow(0 0 8px currentColor);
    cursor: pointer;
}

.glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(94, 106, 210, 0.15), transparent 70%);
    filter: blur(60px);
    z-index: -1;
    pointer-events: none;
}


/* --- Bento Grid Features --- */
.features-section {
    padding: 120px 0;
}

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

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(300px, auto);
    gap: 24px;
}

.bento-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: none;
    /* Removed solid border */
    border-radius: 24px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Gradient Border (Top-down light) */
.bento-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 4;
    /* Above the spotlight */
}

.bento-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

/* Spotlight Effect on Bento Cards */
.bento-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    padding: 1px;
    /* border width */
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y),
            rgba(255, 255, 255, 0.4),
            transparent 40%);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    /* Hidden by default, script will update coords */
    transition: opacity 0.5s;
}

.bento-card:hover::before {
    opacity: 1;
}

.span-2 {
    grid-column: span 2;
}

.span-1 {
    grid-column: span 1;
}

.card-content {
    position: relative;
    z-index: 2;
}

.icon-box {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.bento-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: #fff;
    font-weight: 600;
}

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

/* Internal Visuals for Bento Cards */
.card-visual {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to top, rgba(94, 106, 210, 0.1), transparent);
    z-index: 1;
}

.visual-graph {
    background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255, 255, 255, 0.03) 10px, rgba(255, 255, 255, 0.03) 20px);
}

/* --- CTA Section --- */
.cta-section {
    padding: 100px 0;
    text-align: center;
}

.cta-card {
    background: radial-gradient(circle at center, #1a1b26 0%, #000212 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
}

.glow-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(94, 106, 210, 0.2), transparent 70%);
    filter: blur(80px);
    pointer-events: none;
}

/* --- Footer --- */
footer {
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 40px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    color: #666;
    font-size: 0.9rem;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr;
        /* Stack everything */
    }

    .span-2,
    .span-1 {
        grid-column: span 1;
    }

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