/* ============================================
   OKAM — Landing Page Styles
   Dark mode, glassmorphism, premium feel
   ============================================ */

/* --- Design Tokens --- */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #0d1117;
    --bg-card: rgba(22, 27, 34, 0.7);
    --bg-glass: rgba(22, 27, 34, 0.5);
    --border-subtle: rgba(99, 110, 123, 0.15);
    --border-glow: rgba(255, 202, 40, 0.25);

    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;

    --accent-yellow-premium: #ffca28;
    --accent-orange-premium: #ff7034;
    --accent-green: #3fb950;
    --accent-red: #f85149;
    --accent-orange: #f0883e;

    --gradient-primary: linear-gradient(135deg, var(--accent-yellow-premium), var(--accent-orange-premium));
    --gradient-glow: radial-gradient(ellipse at center, rgba(255, 112, 52, 0.08), transparent 70%);

    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;

    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(255, 202, 40, 0.08);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-yellow-premium);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* --- Canvas Background --- */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* --- Container --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Nav --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo {
    font-size: 24px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-name {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

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

.nav-cta {
    background: var(--gradient-primary);
    color: var(--bg-primary) !important;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px !important;
}

.nav-cta:hover {
    opacity: 0.9;
    color: var(--bg-primary) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all 0.3s;
}

/* --- Hero --- */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
}

.hero-content {
    max-width: 720px;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

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

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 56px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    transition: all 0.25s;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 8px 32px rgba(255, 112, 52, 0.25);
    color: var(--bg-primary);
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    border-color: var(--border-glow);
    background: rgba(22, 27, 34, 0.9);
    color: var(--text-primary);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 17px;
}

/* --- Hero Stats --- */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-subtle);
}

/* --- Sections --- */
.section {
    position: relative;
    z-index: 1;
    padding: 100px 0;
}

.section-dark {
    background: var(--bg-secondary);
}

.section-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-yellow-premium);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.section-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.7;
    margin-bottom: 56px;
}

/* --- Pain Grid --- */
.pain-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.pain-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.pain-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
    transform: translateY(-4px);
}

.pain-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.pain-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.pain-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- Approach --- */
.approach-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.approach-col {
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
}

.approach-bad {
    background: rgba(248, 81, 73, 0.05);
    border-color: rgba(248, 81, 73, 0.2);
}

.approach-good {
    background: rgba(63, 185, 80, 0.05);
    border-color: rgba(63, 185, 80, 0.2);
}

.approach-col h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.approach-col ul {
    list-style: none;
}

.approach-col li {
    padding: 8px 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
}

.approach-col li:last-child {
    border-bottom: none;
}

/* --- Components Grid --- */
.components-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.component-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    opacity: 0;
    transform: translateY(24px);
}

.component-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.component-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
    transform: translateY(-4px);
}

.component-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.component-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.component-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.component-file {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent-yellow-premium);
    background: rgba(255, 202, 40, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
}

/* --- Terminal --- */
.terminal {
    max-width: 700px;
    margin: 0 auto;
    background: #161b22;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(22, 27, 34, 0.8);
    border-bottom: 1px solid var(--border-subtle);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

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

.dot-red { background: #f85149; }
.dot-yellow { background: #f0883e; }
.dot-green { background: #3fb950; }

.terminal-title {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.terminal-body {
    padding: 24px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 2;
}

.terminal-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.4s;
}

.terminal-line.visible {
    opacity: 1;
    transform: translateX(0);
}

.terminal-prompt {
    color: var(--accent-green);
    font-weight: 500;
}

.terminal-command {
    color: var(--text-primary);
}

.terminal-comment {
    color: var(--text-muted);
    font-size: 12px;
}

.terminal-output {
    padding-left: 16px;
}

.terminal-success {
    color: var(--accent-green);
}

/* --- CTA Section --- */
.cta-section {
    text-align: center;
    padding: 120px 0;
    background: var(--gradient-glow), var(--bg-primary);
}

.cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
}

.cta-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.cta-actions {
    display: flex;
    justify-content: center;
}

/* --- Footer --- */
.footer {
    position: relative;
    z-index: 1;
    padding: 32px 0;
    border-top: 1px solid var(--border-subtle);
}

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

.footer-brand {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-secondary);
}

.footer-copy {
    font-size: 13px;
    color: var(--text-muted);
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* --- Graph-Driven Decay --- */
.decay-showcase {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
    margin-top: 48px;
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.decay-showcase::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-orange-premium), transparent);
    opacity: 0.5;
}

.decay-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.decay-rule {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 20px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, background-color 0.3s ease;
}

.decay-rule:hover {
    transform: translateX(8px);
    border-color: rgba(255, 112, 52, 0.3);
    background: rgba(255, 112, 52, 0.02);
}

.rule-icon {
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.rule-icon.orphan {
    color: var(--text-muted);
    background: rgba(110, 118, 129, 0.05);
    border: 1px solid rgba(110, 118, 129, 0.15);
}

.rule-icon.connected {
    color: var(--accent-orange-premium);
    background: rgba(255, 112, 52, 0.05);
    border: 1px solid rgba(255, 112, 52, 0.2);
}

.rule-icon.central {
    color: var(--accent-yellow-premium);
    background: rgba(255, 202, 40, 0.05);
    border: 1px solid rgba(255, 202, 40, 0.2);
    box-shadow: 0 0 15px rgba(255, 202, 40, 0.1);
}

.rule-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.rule-info p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.decay-diagram {
    position: relative;
    height: 380px;
    background: rgba(10, 10, 15, 0.4);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.graph-connections {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.graph-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: default;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    z-index: 2;
}

.graph-node:hover {
    transform: scale(1.08);
}

.node-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
    opacity: 0.8;
}

.node-decay {
    font-size: 16px;
    font-weight: 800;
    font-family: var(--font-mono);
}

.node-orphan {
    top: 45px;
    left: 10%;
    width: 80px;
    height: 80px;
    background: rgba(22, 27, 34, 0.8);
    border: 2px solid var(--text-muted);
    color: var(--text-muted);
}

.node-connected {
    bottom: 45px;
    left: 15%;
    width: 95px;
    height: 95px;
    background: rgba(22, 27, 34, 0.8);
    border: 2px solid var(--accent-orange-premium);
    color: var(--accent-orange-premium);
    box-shadow: 0 0 20px rgba(255, 112, 52, 0.1);
}

.node-hub {
    top: 125px;
    right: 15%;
    width: 120px;
    height: 120px;
    background: rgba(22, 27, 34, 0.8);
    border: 2px solid var(--accent-yellow-premium);
    color: var(--accent-yellow-premium);
    box-shadow: 0 0 30px rgba(255, 202, 40, 0.15);
}

/* --- Mobile --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(20px);
        padding: 24px;
        gap: 20px;
        border-bottom: 1px solid var(--border-subtle);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        min-height: auto;
        padding: 120px 24px 60px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

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

    .approach-comparison {
        grid-template-columns: 1fr;
    }

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

    .section {
        padding: 60px 0;
    }

    .decay-showcase {
        grid-template-columns: 1fr;
        padding: 24px;
        gap: 32px;
    }

    .decay-diagram {
        height: 320px;
    }

    .node-orphan {
        top: 30px;
        left: 8%;
        width: 70px;
        height: 70px;
    }

    .node-connected {
        bottom: 30px;
        left: 12%;
        width: 85px;
        height: 85px;
    }

    .node-hub {
        top: 95px;
        right: 10%;
        width: 110px;
        height: 110px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}
