:root {
    /* Color System */
    --bg-base: #09090B;
    --bg-surface: #18181B;
    --bg-surface-hover: #27272A;
    --bg-elevated: #1F1F22;
    
    --text-primary: #FAFAFA;
    --text-secondary: #A1A1AA;
    --text-muted: #71717A;
    
    --accent-primary: #3b82f6; /* Vyrnest Blue */
    --accent-secondary: #10b981; /* Vyrnest Green */
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    --accent: var(--accent-primary);
    --accent-hover: #2563eb;
    --accent-glow: rgba(16, 185, 129, 0.15);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    
    /* Spacing (8pt grid) */
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-6: 48px;
    --space-8: 64px;
    --space-12: 96px;
    --space-16: 128px;
    
    /* Radii */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 700ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 { font-size: clamp(3rem, 6vw, 5.5rem); letter-spacing: -0.04em; }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -0.03em; }
h3 { font-size: 1.5rem; }

p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.text-accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--space-3) 0;
    background: rgba(9, 9, 11, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    z-index: 100;
    transition: border-color var(--transition-base), padding var(--transition-base);
}

.navbar.scrolled {
    padding: var(--space-2) 0;
    border-bottom-color: var(--border-color);
}

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

.brand {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.brand-icon {
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-large {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-base);
}

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

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

.btn-secondary:hover {
    background: var(--bg-surface);
    border-color: var(--border-hover);
}

/* Hero Section */
.hero {
    padding-top: calc(120px + var(--space-12));
    padding-bottom: var(--space-16);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-glow);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
}

.hero-subtitle {
    max-width: 600px;
    margin: var(--space-4) auto var(--space-6);
    font-size: 1.25rem;
}

.hero-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    margin-bottom: var(--space-12);
}

.hero-visual {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 400px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.abstract-shape {
    position: absolute;
    filter: blur(60px);
    opacity: 0.4;
    border-radius: 50%;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--accent-primary);
    top: -50px;
    left: -50px;
}

.shape-2 {
    width: 250px;
    height: 250px;
    background: var(--accent-secondary);
    bottom: -50px;
    right: -50px;
    opacity: 0.5;
}

.glass-panel {
    position: relative;
    width: 200px;
    height: 150px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    padding: var(--space-3);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.code-line {
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    width: 100%;
}

.code-line.short { width: 40%; }
.code-line.medium { width: 70%; }

/* Trust Section */
.trust {
    padding: var(--space-8) 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    background: var(--bg-surface);
}

.trust-title {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: var(--space-6);
}

.trust-grid {
    display: flex;
    justify-content: center;
    gap: var(--space-8);
    flex-wrap: wrap;
}

.trust-logo {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 1rem;
    transition: color var(--transition-fast);
}

.trust-logo:hover {
    color: var(--text-primary);
}

/* Features / Bento Box */
.section-header {
    margin-bottom: var(--space-12);
    text-align: center;
}

.section-header p {
    max-width: 500px;
    margin: var(--space-2) auto 0;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 300px;
    gap: var(--space-3);
}

.bento-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform var(--transition-base), border-color var(--transition-base);
    position: relative;
    overflow: hidden;
}

.bento-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

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

.bento-wide {
    grid-column: span 3;
    grid-row: span 1;
    height: 200px;
}

.bento-content h3 {
    margin-bottom: var(--space-1);
}

.bento-content p {
    font-size: 1rem;
}

.bento-icon {
    align-self: flex-end;
    color: var(--accent);
    opacity: 0.8;
}

.local-first-visual {
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 200px;
    height: 200px;
}

.node {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.node.central {
    width: 60px;
    height: 60px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--accent-glow);
    border-color: var(--accent);
}

.node.peripheral {
    width: 20px;
    height: 20px;
}

.p1 { top: 20%; left: 20%; }
.p2 { top: 80%; left: 30%; }
.p3 { top: 40%; left: 80%; }

/* Tech Deep Dive */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    align-items: center;
}

.feature-list {
    list-style: none;
    margin-top: var(--space-6);
}

.feature-list li {
    margin-bottom: var(--space-4);
    padding-left: var(--space-4);
    position: relative;
}

.feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.feature-list strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}

.code-window {
    background: #000;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.window-header {
    background: var(--bg-elevated);
    padding: 12px var(--space-3);
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
}

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

.dot.red { background: #FF5F56; }
.dot.yellow { background: #FFBD2E; }
.dot.green { background: #27C93F; }

.code-window pre {
    padding: var(--space-4);
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.875rem;
    color: #E4E4E7;
}

/* Bottom CTA */
.cta-box {
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-base) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-12) var(--space-4);
    text-align: center;
}

.cta-box p {
    margin: var(--space-2) auto var(--space-6);
    max-width: 500px;
}

.cta-form {
    display: flex;
    gap: var(--space-2);
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
}

.input-field {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 0.875rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

.input-field:focus {
    border-color: var(--accent);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: var(--space-12) 0 var(--space-4);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-8);
    margin-bottom: var(--space-12);
}

.footer-brand {
    max-width: 250px;
}

.footer-tagline {
    margin-top: var(--space-2);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: var(--space-12);
}

.link-group h4 {
    font-size: 0.875rem;
    margin-bottom: var(--space-3);
}

.link-group a {
    display: block;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: var(--space-2);
}

.link-group a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Utilities & Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 100ms; }
.delay-2 { transition-delay: 200ms; }
.delay-3 { transition-delay: 300ms; }
.delay-4 { transition-delay: 400ms; }

/* Responsive */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    
    .bento-large, .bento-wide {
        grid-column: span 1;
    }

    .split-layout {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }
}

@media (max-width: 600px) {
    .hero-actions {
        flex-direction: column;
    }
    
    .cta-form {
        flex-direction: column;
    }
}

/* Logo Animations */
.vyrnest-logo {
    overflow: visible;
}

.vyrnest-logo .logo-v {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: drawV 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.vyrnest-logo .logo-nest {
    stroke-dasharray: 120;
    stroke-dashoffset: 120;
    animation: drawNest 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.5s;
    opacity: 0;
}

.brand:hover .logo-v-group {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

.brand:hover .logo-nest-group {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

@keyframes drawV {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes drawNest {
    0% {
        opacity: 0;
        stroke-dashoffset: 120;
    }
    1% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        stroke-dashoffset: 0;
    }
}
