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

:root {
    /* OKLCH Color System - Emerald hue (150) */
    --bg-base: oklch(18% 0.01 150);
    --surface: oklch(24% 0.015 150);
    --surface-hover: oklch(30% 0.02 150);
    --primary: oklch(70% 0.15 150);
    --primary-hover: oklch(60% 0.15 150);
    --text-main: oklch(97% 0.005 150);
    --text-muted: oklch(75% 0.01 150);
    --border: oklch(32% 0.015 150);
    
    /* Typography */
    --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
    --font-body: 'Chivo', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Modular Fluid Type Scale */
    --text-xs: clamp(0.75rem, 0.8vw, 0.875rem);
    --text-sm: clamp(0.8125rem, 1vw, 1rem);
    --text-base: clamp(1rem, 1.2vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1.5vw, 1.5rem);
    --text-xl: clamp(1.5rem, 2.5vw, 2.25rem);
    --text-2xl: clamp(2rem, 4vw, 3.5rem);
    --text-3xl: clamp(2.5rem, 6vw, 5.5rem);

    /* Modular Fluid Spacing Scale */
    --space-xs: clamp(0.25rem, 0.4vw, 0.5rem);
    --space-sm: clamp(0.5rem, 0.8vw, 0.75rem);
    --space-md: clamp(1rem, 1.5vw, 1.25rem);
    --space-lg: clamp(1.25rem, 2vw, 2rem);
    --space-xl: clamp(1.5rem, 3.5vw, 3rem);
    --space-2xl: clamp(2.5rem, 5vw, 5rem);
    --space-3xl: clamp(4rem, 8vw, 10rem);

    /* Polish Utilities */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s var(--ease-out-expo);
}

/* Accessibility Focus States */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    position: relative;
}

.text-green { color: var(--primary); }
.text-muted { color: var(--text-muted); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--text-sm);
    border-radius: 4px;
    transition: all 0.3s var(--ease-out-expo);
    cursor: pointer;
    border: 1px solid transparent;
    text-align: center;
}

.btn:active {
    transform: scale(0.97);
}

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

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

.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border-color: var(--border);
}

.btn-outline:hover {
    background-color: var(--surface);
    border-color: var(--text-muted);
}

.btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-base);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 72px;
    background: rgba(18, 25, 22, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: var(--text-lg);
    font-weight: 800;
}

.nav-links {
    position: fixed;
    top: 72px; left: 0; right: 0; bottom: 0;
    background: var(--bg-base);
    display: flex;
    flex-direction: column;
    padding: var(--space-2xl);
    gap: var(--space-lg);
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
}

.nav-links.active {
    transform: translateX(0);
}

.nav-links a {
    font-size: var(--text-xl);
    font-family: var(--font-display);
    color: var(--text-main);
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.4s var(--ease-out-expo);
}

.nav-links.active a {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered load for mobile links */
.nav-links.active a:nth-child(1) { transition-delay: 0.1s; }
.nav-links.active a:nth-child(2) { transition-delay: 0.15s; }
.nav-links.active a:nth-child(3) { transition-delay: 0.2s; }
.nav-links.active .mobile-only-actions { transition-delay: 0.25s; opacity: 1; transform: translateY(0); }

.mobile-only-actions { transition: all 0.4s var(--ease-out-expo); opacity: 0; transform: translateY(10px); }

@media(min-width: 1024px) {
    .nav-links {
        position: static;
        flex-direction: row;
        padding: 0;
        transform: none;
        background: transparent;
        gap: var(--space-xl);
    }
    .nav-links a {
        font-size: var(--text-sm);
        color: var(--text-muted);
        font-family: var(--font-body);
        opacity: 1;
        transform: none;
    }
    .nav-links a:hover { color: var(--primary); }
}

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

.mobile-toggle {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-toggle .bar {
    width: 24px;
    height: 1.5px;
    background-color: var(--text-main);
    transition: 0.4s var(--ease-out-expo);
}

.mobile-toggle.active .bar:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.mobile-toggle.active .bar:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

@media(min-width: 1024px) {
    .mobile-toggle { display: none; }
}

/* Base Sections */
section {
    padding: var(--space-2xl) 0;
}

@media(min-width: 768px) {
    section { padding: var(--space-3xl) 0; }
}

.section-header {
    margin-bottom: var(--space-2xl);
}

.section-header h2 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-md);
}

@media(min-width: 768px) {
    .section-header h2 { font-size: var(--text-3xl); }
}

.section-header p {
    font-size: var(--text-base);
    color: var(--text-muted);
    max-width: 60ch;
}

/* Hero Section */
.hero {
    padding-top: calc(72px + var(--space-3xl));
    padding-bottom: var(--space-3xl);
    min-height: 85vh;
    display: flex;
    align-items: center;
}

.hero h1 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-lg);
    max-width: 14ch;
}

.hero-subtitle {
    font-size: var(--text-lg);
    color: var(--text-muted);
    max-width: 45ch;
    margin-bottom: var(--space-2xl);
    line-height: 1.4;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

@media(min-width: 480px) {
    .hero-actions { flex-direction: row; }
}

/* The Green Line (Structural Detail) - Polished */
.structural-accent {
    display: none;
    position: absolute;
    right: 0; top: 45%;
    width: 25vw;
    height: 35vh;
    border-left: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transform: translateY(-50%);
    z-index: -1;
    pointer-events: none;
}

.structural-accent::after {
    content: '';
    position: absolute;
    bottom: -1px; right: 0;
    width: 20%;
    height: 4px;
    background: var(--primary);
}

.structural-accent::before {
    content: '[ GATE-01 :: VERIFIED ]';
    position: absolute;
    bottom: var(--space-sm);
    right: var(--space-sm);
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    opacity: 0.4;
    letter-spacing: 0.1em;
}

@media(min-width: 1440px) {
    .structural-accent { display: block; right: 5%; }
}

/* Arena Grid */
.arena-section {
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.battle-mockup {
    border: 1px solid var(--border);
    background: var(--bg-base);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    transition: border-color 0.3s var(--ease-out-expo);
}

.battle-mockup:hover { border-color: var(--primary); }

@media(min-width: 768px) {
    .battle-mockup { padding: var(--space-xl); }
}

.battle-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media(min-width: 1024px) {
    .battle-grid { grid-template-columns: 1fr 1fr; }
}

.battle-output {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    background: var(--surface);
    padding: var(--space-md);
    border-left: 2px solid var(--primary);
    color: var(--text-muted);
    line-height: 1.4;
}

/* Pricing */
.pricing-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media(min-width: 1024px) {
    .pricing-layout { grid-template-columns: 1fr 1fr; max-width: 900px; margin: 0 auto; }
}

.plan-tier {
    border: 1px solid var(--border);
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    transition: transform 0.4s var(--ease-out-expo);
}

.plan-tier:hover { transform: translateY(-8px); }
.plan-tier.pro { border-color: var(--primary); background: var(--surface); }

/* Polish Detail */
footer {
    padding: var(--space-3xl) 0 var(--space-xl);
    border-top: 1px solid var(--border);
    background: var(--bg-base);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-3xl);
}

@media(min-width: 768px) {
    .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

/* Mobile Visibility Utilities (Moved to end for specificity) */
.hide-mobile { display: none !important; }
.hide-desktop { display: inline-flex !important; }

@media(min-width: 1024px) {
    .hide-mobile { display: inline-flex !important; }
    .hide-desktop { display: none !important; }
}

/* Reveal Animations */
.reveal-up {
    opacity: 0;
    transform: translateY(20px);
    animation: revealUp 0.8s var(--ease-out-expo) forwards;
}

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