/* ================================
   Lattice-Lab - Professional Design
   ================================ */

:root {
    /* Colors */
    --bg: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #141414;
    --border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-secondary: #999999;
    --text-tertiary: #666666;
    --accent: #3b82f6;
    --accent-hover: #2563eb;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 3.75rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    margin-bottom: var(--space-md);
}

h3 {
    font-size: 1.125rem;
    margin-bottom: var(--space-sm);
}

p {
    color: var(--text-secondary);
    line-height: 1.7;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 200ms ease;
}

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

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    padding: var(--space-3xl) 0;
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

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

/* Hero - UPDATED */
.hero {
    position: relative;
    /* Establishes a positioning context for the canvas */
    min-height: 100vh;
    width: 100%;
    /* Allows the background to span the full screen */
    display: flex;
    /* Centers the content vertically and horizontally */
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Prevents scrollbars if animations touch edges */
    border-bottom: 1px solid var(--border);
}

/* New style for the canvas */
.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Puts canvas behind the text */
    pointer-events: none;
    /* Ensures the canvas doesn't block clicks on buttons */
    opacity: 0.6;
}

/* New style for the content */
.hero-content {
    position: relative;
    z-index: 1;
    /* Ensures text sits on top of the canvas */
    max-width: 720px;
    /* The width restriction moves here */
    width: 100%;
    text-align: center;
    /* Centers the text */
    padding: 0 var(--space-lg);
}

/* Hero Title Gradient */
.hero h1 {
    background: linear-gradient(135deg, #ffffff 0%, #a5c8ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
    margin-bottom: var(--space-md);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 150ms ease;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

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

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

/* Cards */
.glass-card {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-radius: 0.75rem;
    padding: var(--space-lg);
    transition: all 200ms ease;
}

.glass-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
    transform: translateY(-5px);
}

/* Features */
#features {
    position: relative;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-2xl);
}

.feature-card h3::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 18px;
    background: var(--accent);
    margin-right: var(--space-sm);
    border-radius: 2px;
    vertical-align: middle;
}

.feature-card p {
    font-size: 0.9375rem;
}

/* Models */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-2xl);
}

.model-card h3 {
    font-size: 1rem;
    font-weight: 500;
}

.model-card p {
    font-size: 0.875rem;
}

/* Footer */
.footer {
    padding: var(--space-2xl) 0 var(--space-lg);
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer p {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

/* Text Utilities */
.text-center {
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .section {
        padding: var(--space-2xl) 0;
    }

    .hero {
        min-height: 100vh;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

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

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

/* Selection */
::selection {
    background: var(--accent);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}