/* ========================================
   SOMA STACKS — Design System
   ======================================== */

:root {
    /* Colors */
    --color-bg: #0a0a0b;
    --color-bg-elevated: #111113;
    --color-bg-card: #161619;
    --color-surface: #1c1c20;
    
    --color-text: #f0f0f2;
    --color-text-muted: #8a8a8f;
    --color-text-subtle: #5a5a60;
    
    --color-accent: #00e5c7;
    --color-accent-glow: rgba(0, 229, 199, 0.3);
    --color-accent-subtle: rgba(0, 229, 199, 0.1);
    
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-hover: rgba(255, 255, 255, 0.15);
    
    /* Typography */
    --font-display: 'Syne', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 5rem;
    --space-3xl: 8rem;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
    
    /* Layout */
    --max-width: 1200px;
    --nav-height: 80px;
}

/* ========================================
   Reset & Base
   ======================================== */

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

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

body {
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input {
    font-family: inherit;
    border: none;
    outline: none;
}

/* ========================================
   Animated Grid Background
   ======================================== */

.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, black 40%, transparent 100%);
}

.grid-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, var(--color-accent-subtle), transparent 50%);
}

/* ========================================
   Navigation
   ======================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
}

.logo-mark {
    font-size: 1.4rem;
    color: var(--color-accent);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        filter: drop-shadow(0 0 8px var(--color-accent-glow));
        opacity: 1;
    }
    50% { 
        filter: drop-shadow(0 0 20px var(--color-accent-glow));
        opacity: 0.8;
    }
}

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

.nav-links a {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.nav-links a:hover {
    color: var(--color-text);
}

.nav-cta {
    padding: 0.6rem 1.2rem;
    background: var(--color-accent-subtle);
    border: 1px solid var(--color-accent);
    border-radius: 6px;
    color: var(--color-accent) !important;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.nav-cta:hover {
    background: var(--color-accent);
    color: var(--color-bg) !important;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 1rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all var(--transition-base);
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-bg);
    box-shadow: 0 0 30px var(--color-accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 50px var(--color-accent-glow);
}

.btn-primary svg {
    transition: transform var(--transition-fast);
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

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

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

/* ========================================
   Hero Section
   ======================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(var(--nav-height) + var(--space-3xl)) var(--space-lg) var(--space-3xl);
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
}

.hero-content {
    flex: 1;
    max-width: 700px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.5rem 1rem;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-lg);
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1;
        box-shadow: 0 0 0 0 var(--color-accent-glow);
    }
    50% { 
        opacity: 0.6;
        box-shadow: 0 0 0 8px transparent;
    }
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-lg);
}

.hero-title .line {
    display: block;
}

.hero-title .line-1 {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.1s;
    opacity: 0;
}

.hero-title .line-2 {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-title em {
    font-style: normal;
    color: var(--color-accent);
    position: relative;
}

.hero-title em::after {
    content: '';
    position: absolute;
    bottom: 0.1em;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--color-accent);
    opacity: 0.3;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: var(--space-xl);
    max-width: 540px;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

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

/* Hero Visual - 3D Cube */
.hero-visual {
    position: absolute;
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
    width: 500px;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

.cube-container {
    width: 120px;
    height: 120px;
    perspective: 600px;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 20s linear infinite;
}

@keyframes rotateCube {
    from { transform: rotateX(-20deg) rotateY(0deg); }
    to { transform: rotateX(-20deg) rotateY(360deg); }
}

.cube-face {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 1px solid var(--color-accent);
    background: var(--color-accent-subtle);
    opacity: 0.6;
}

.front  { transform: rotateY(0deg) translateZ(60px); }
.back   { transform: rotateY(180deg) translateZ(60px); }
.right  { transform: rotateY(90deg) translateZ(60px); }
.left   { transform: rotateY(-90deg) translateZ(60px); }
.top    { transform: rotateX(90deg) translateZ(60px); }
.bottom { transform: rotateX(-90deg) translateZ(60px); }

.orbit {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    animation: orbit 30s linear infinite;
}

.orbit::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px var(--color-accent-glow);
}

.orbit-1 {
    width: 300px;
    height: 300px;
    animation-duration: 25s;
}

.orbit-2 {
    width: 400px;
    height: 400px;
    animation-duration: 35s;
    animation-direction: reverse;
}

.orbit-3 {
    width: 500px;
    height: 500px;
    animation-duration: 45s;
}

@keyframes orbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   Section Styles
   ======================================== */

.section-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-3xl) var(--space-lg);
}

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

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    max-width: 600px;
}

/* ========================================
   About Section
   ======================================== */

.about {
    background: var(--color-bg-elevated);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.about-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

.about-label {
    position: sticky;
    top: calc(var(--nav-height) + var(--space-lg));
}

.label-number {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-accent);
    margin-bottom: var(--space-xs);
}

.label-text {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.about-content h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--space-lg);
    letter-spacing: -0.02em;
}

.about-content p {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.about-content strong {
    color: var(--color-text);
}

/* ========================================
   Platform Section
   ======================================== */

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.feature-card {
    padding: var(--space-xl);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    transition: all var(--transition-base);
}

.feature-card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    width: 56px;
    height: 56px;
    margin-bottom: var(--space-md);
}

.feature-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--color-accent);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

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

/* ========================================
   Stats Section
   ======================================== */

.stats {
    background: linear-gradient(to bottom, var(--color-bg), var(--color-bg-elevated));
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    text-align: center;
}

.stat {
    padding: var(--space-xl);
}

.stat-value {
    display: block;
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 800;
    color: var(--color-accent);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: var(--space-sm);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* ========================================
   CTA Section
   ======================================== */

.cta {
    background: var(--color-bg-elevated);
    border-top: 1px solid var(--color-border);
}

.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}

.cta-content > p {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

.cta-form {
    margin-bottom: var(--space-lg);
}

.input-group {
    display: flex;
    gap: var(--space-sm);
    max-width: 480px;
    margin: 0 auto;
}

.input-group input {
    flex: 1;
    padding: 1rem 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.input-group input::placeholder {
    color: var(--color-text-subtle);
}

.input-group input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-subtle);
}

.cta-note {
    font-size: 0.9rem;
    color: var(--color-text-subtle);
}

.cta-note a {
    color: var(--color-accent);
    transition: opacity var(--transition-fast);
}

.cta-note a:hover {
    opacity: 0.8;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    border-top: 1px solid var(--color-border);
}

.footer .section-container {
    padding: var(--space-xl) var(--space-lg);
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
}

.footer-brand .logo-mark {
    font-size: 1.2rem;
}

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

.footer-links a {
    font-size: 0.85rem;
    color: var(--color-text-subtle);
    transition: color var(--transition-fast);
}

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

.footer-copy {
    font-size: 0.8rem;
    color: var(--color-text-subtle);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1024px) {
    .hero-visual {
        display: none;
    }
    
    .hero {
        justify-content: center;
        text-align: center;
    }
    
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-subtitle {
        max-width: 100%;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .about-label {
        position: static;
    }
}

@media (max-width: 768px) {
    :root {
        --space-3xl: 5rem;
    }
    
    .nav-links a:not(.nav-cta) {
        display: none;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .stat {
        padding: var(--space-lg);
        border-bottom: 1px solid var(--color-border);
    }
    
    .stat:last-child {
        border-bottom: none;
    }
    
    .footer-content {
        flex-direction: column;
        gap: var(--space-lg);
        text-align: center;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-group .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   Utility: Scroll Reveal Animation
   ======================================== */

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

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

