:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    
    --background: #ffffff;
    --foreground: #000000;
    
    --muted: #f5f5f5;
    --muted-foreground: #737373;
    
    --border: #e5e5e5;
    --border-hover: #d4d4d4;
    
    --radius: 0.5rem;
    --header-height: 4rem;
    
    --grid-size: 2.5rem;
    --grid-color: rgba(147, 51, 234, 0.05);
    --grid-highlight: rgba(147, 51, 234, 0.08);
    --grid-accent: rgba(168, 85, 247, 0.1);
    --grid-accent-2: rgba(192, 132, 252, 0.08);
    --animation-duration: 20s;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #000000;
        --foreground: #ffffff;
        
        --muted: #171717;
        --muted-foreground: #a3a3a3;
        
        --border: #262626;
        --border-hover: #404040;
        
        --grid-color: rgba(147, 51, 234, 0.1);
        --grid-highlight: rgba(168, 85, 247, 0.15);
        --grid-accent: rgba(192, 132, 252, 0.12);
        --grid-accent-2: rgba(216, 180, 254, 0.1);
    }
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

header {
    height: var(--header-height);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--background);
    z-index: 100;
    backdrop-filter: blur(10px);
}

nav {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.badge {
    background-color: var(--muted);
    color: var(--muted-foreground);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    letter-spacing: 0.025em;
}

main {
    flex: 1;
    margin-top: var(--header-height);
    width: 100%;
    padding: 3rem 1.5rem;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 3rem 0 6rem;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(to right, #9333ea, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    color: var(--muted-foreground);
    max-width: 36rem;
    margin: 0 auto 4rem;
    line-height: 1.6;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1024px;
}

.feature {
    padding: 2rem;
    background-color: var(--muted);
    border-radius: var(--radius);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

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

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    background-color: var(--background);
    color: var(--foreground);
    margin-bottom: 1.5rem;
}

.feature h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

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

footer {
    border-top: 1px solid var(--border);
    padding: 2rem 1.5rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.footer-copyright {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--muted-foreground);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.15s ease;
}

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

/* Modern Background Grid */
@import url('modern-grid.css');

.grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(
        60deg,
        var(--hex-color),
        var(--hex-color) 1px,
        transparent 1px,
        transparent calc(var(--hex-size) * 0.866)
    );
    mask-image: radial-gradient(circle at center, black 60%, transparent 100%);
    animation: hexAnimation 60s linear infinite;
}

@keyframes gridAnimation {
    0% {
        transform: translate3d(0, 0, 0) rotateX(60deg);
    }
    100% {
        transform: translate3d(-2rem, -2rem, 0) rotateX(60deg);
    }
}

@keyframes hexAnimation {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: calc(var(--hex-size) * 2) calc(var(--hex-size) * 1.732);
    }
}

/* Animations */
@keyframes gradientMove {
    0% {
        background-position: 
            0% 0%,
            0% 0%,
            0% 0%,
            0% 0%,
            0% 0%,
            0% 0%;
    }
    100% {
        background-position: 
            20% 20%,
            -15% -10%,
            5% -15%,
            -10% 15%,
            15% -20%,
            -20% 10%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .grid {
        animation: none;
    }
    .grid::before {
        animation: none;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero > * {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

.hero h1 {
    animation-delay: 0.1s;
}

.hero .subtitle {
    animation-delay: 0.3s;
}

.features {
    animation: fadeIn 0.5s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

/* Grid container and lines styling */
.grid-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

/* Modern Grid System */
.background {
    position: fixed;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.grid-modern {
    position: fixed;
    top: -50%;
    left: -50%;
    height: 200%;
    width: 200%;
    transform-style: preserve-3d;
    will-change: transform;
}

.grid-content {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px),
        radial-gradient(circle at 20% 30%, var(--grid-accent) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, var(--grid-accent-2) 0%, transparent 40%);
    background-size: 
        var(--grid-size) var(--grid-size),
        var(--grid-size) var(--grid-size),
        100% 100%,
        100% 100%;
    transform: perspective(1000px) rotateX(60deg);
    transform-origin: center;
    animation: gridFloat var(--animation-duration) ease-in-out infinite;
    opacity: 0.9;
}

.grid-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        var(--background) 85%,
        var(--background) 100%
    );
}

@keyframes gridFloat {
    0%, 100% {
        transform: perspective(1000px) rotateX(60deg) translateZ(0);
        background-position: 
            0 0,
            0 0,
            0% 0%,
            100% 100%;
    }
    50% {
        transform: perspective(1000px) rotateX(60deg) translateZ(30px);
        background-position: 
            0 0,
            0 0,
            20% -10%,
            80% 110%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .grid-content {
        animation: none;
    }
}

/* Responsive styles */
@media (max-width: 768px) {
    .features {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2rem;
    }
    
    .hero {
        margin: 2rem 0 4rem;
    }
}
