:root {
    --bg-dark: #0a0a0c;
    --bg-darker: #050506;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.08);
    
    --brand-orange: #f27a41;
    --brand-orange-glow: rgba(242, 122, 65, 0.15);
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0a5;
    
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    
    --nav-height: 80px;
}

html {
    scroll-behavior: smooth;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Faint Grid Texture Background */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-size: 80px 80px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    z-index: -2;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 90%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 90%);
}

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

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

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); margin-bottom: 1.5rem; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }

p { font-size: 1.125rem; color: var(--text-secondary); margin-bottom: 1.5rem; }

.eyebrow {
    color: var(--brand-orange);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.text-center { text-align: center; }

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 8rem 0;
    position: relative;
    z-index: 1;
}

.bg-darker {
    background-color: var(--bg-darker);
}

.mt-4 { margin-top: 2rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: 100px;
    font-weight: 500;
    transition: var(--transition-smooth);
    cursor: pointer;
    font-size: 1rem;
}

.btn i { transition: transform var(--transition-fast); }
.btn:hover i { transform: translateX(4px); }

.btn-primary {
    background-color: var(--brand-orange);
    color: white;
    border: 1px solid var(--brand-orange);
}

.btn-primary:hover {
    background-color: transparent;
    box-shadow: 0 0 20px var(--brand-orange-glow);
}

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

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

/* Header & Nav */
.global-header {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1200px;
    height: 72px;
    background: rgba(15, 15, 18, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    z-index: 100;
    display: flex;
    align-items: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
    from { top: -100px; opacity: 0; }
    to { top: 1.5rem; opacity: 1; }
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 1.5rem 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-brand {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.2em;
}

.logo-sub {
    font-size: 0.65rem;
    color: var(--text-secondary);
    letter-spacing: 0.3em;
    margin-top: 2px;
}

.global-nav {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
    color: white;
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--bg-darker);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 1rem;
    min-width: 260px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--bg-card);
}

.dropdown-item strong {
    font-size: 0.875rem;
    color: white;
    margin-bottom: 2px;
}

.dropdown-item span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Main Content Area */
#app {
    min-height: calc(100vh - var(--nav-height));
    margin-top: var(--nav-height);
    opacity: 1;
    transition: opacity 0.4s ease;
}

#app.fade-out {
    opacity: 0;
}

/* Glass & Glow Elements */
.glass {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(10px);
    border-radius: 12px;
}

.hero-bg-glow {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--brand-orange-glow) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

/* Components */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 120px;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.section-header {
    max-width: 700px;
    margin-bottom: 4rem;
}

/* Home Flow Diagram */
.flow-diagram {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 4rem;
}

.flow-inputs, .flow-outputs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.input-card, .output-card {
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.input-card:hover, .output-card:hover {
    border-color: var(--brand-orange);
    transform: translateX(5px);
}

.output-card .step-num {
    color: var(--brand-orange);
    font-weight: 600;
    margin-right: 0.5rem;
}

.flow-core {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    border: 1px solid var(--brand-orange);
    border-radius: 50%;
    position: relative;
    background: rgba(242, 122, 65, 0.05);
}

.flow-core h3 {
    margin: 0;
    color: var(--brand-orange);
    letter-spacing: 0.2em;
}

.core-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 40px var(--brand-orange-glow);
    animation: pulse 4s infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.5; }
    100% { transform: scale(1.05); opacity: 1; }
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2.5rem;
    transition: var(--transition-smooth);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(242, 122, 65, 0.1);
    color: var(--brand-orange);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Live Dashboard Mocks */
.mock-dashboard {
    background: var(--bg-darker);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 3rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.mock-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
}

.mock-title {
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mock-title::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--brand-orange);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.mock-body {
    padding: 2rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
}

.metric-delta {
    font-size: 0.75rem;
}

.delta-up { color: #4ade80; }
.delta-down { color: #f87171; }

.mock-table {
    width: 100%;
    border-collapse: collapse;
}

.mock-table th, .mock-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-glass);
    font-size: 0.875rem;
}

.mock-table th {
    color: var(--text-secondary);
    font-weight: 500;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active { background: rgba(74, 222, 128, 0.1); color: #4ade80; }
.status-warning { background: rgba(242, 122, 65, 0.1); color: var(--brand-orange); }
.status-error { background: rgba(248, 113, 113, 0.1); color: #f87171; }

/* Sub-feature Tabs */
.tabs-nav {
    display: flex;
    gap: 2rem;
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 2rem;
    overflow-x: auto;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    padding: 1rem 0;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
}

.tab-btn.active {
    color: white;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--brand-orange);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-pane.active {
    display: block;
}

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

/* 3-Step Chain Component */
.chain-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 4rem;
}

.chain-node {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    position: relative;
    transition: var(--transition-smooth);
}

.chain-node.active {
    border-color: var(--brand-orange);
    background: rgba(242, 122, 65, 0.05);
}

.chain-num {
    font-size: 2rem;
    font-weight: 700;
    color: var(--border-glass);
}

.chain-node.active .chain-num {
    color: var(--brand-orange);
}

/* Forms */
.contact-form {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 1rem;
    background: var(--bg-darker);
    border: 1px solid var(--border-glass);
    border-radius: 4px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-orange);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.global-footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border-glass);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand .footer-tagline {
    color: var(--brand-orange);
    font-style: italic;
    margin: 1rem 0;
}

.footer-links h4 {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 2rem;
    border-top: 1px solid var(--border-glass);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Custom Cursor — desktop only */
@media (hover: hover) and (pointer: fine) {
    * {
        cursor: none !important;
    }

    #cursor-glow {
        position: fixed;
        width: 400px;
        height: 400px;
        background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9998;
        transform: translate(-50%, -50%);
        transition: background 0.3s;
    }

    #cursor-dot {
        position: fixed;
        width: 10px;
        height: 10px;
        background-color: var(--brand-orange);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        transform: translate(-50%, -50%);
        transition: width 0.2s, height 0.2s, background-color 0.2s;
        mix-blend-mode: difference;
    }

    #cursor-dot.hovering {
        width: 40px;
        height: 40px;
        background-color: rgba(242, 122, 65, 0.4);
        border: 1px solid var(--brand-orange);
        backdrop-filter: blur(2px);
    }
}

/* Hide custom cursor elements on touch devices */
@media (hover: none), (pointer: coarse) {
    #cursor-glow,
    #cursor-dot {
        display: none !important;
    }
}

/* Big Pop Up Animation */
.perspective-container {
    perspective: 1200px;
    width: 100%;
    max-width: 1000px;
    margin: 4rem auto -8rem;
    position: relative;
    z-index: 3;
}

.hero-dashboard-mock {
    width: 100%;
    height: 600px;
    background: var(--bg-darker);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: 0 40px 100px -20px rgba(242, 122, 65, 0.4), 0 0 40px rgba(0,0,0,0.8);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.hero-dashboard-mock::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.mock-topbar {
    height: 48px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 0.5rem;
    background: rgba(255,255,255,0.02);
}

.mock-dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--border-glass);
}
.mock-dot:nth-child(1) { background: #f87171; }
.mock-dot:nth-child(2) { background: #fbbf24; }
.mock-dot:nth-child(3) { background: #4ade80; }

.mock-content-area {
    flex: 1;
    padding: 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.mock-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 1.5rem;
}

.mock-graph {
    height: 200px;
    border-bottom: 1px solid var(--border-glass);
    border-left: 1px solid var(--border-glass);
    position: relative;
    margin-top: 1rem;
    overflow: hidden;
}

.mock-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(242, 122, 65, 0.2), transparent);
    clip-path: polygon(0 100%, 0 60%, 20% 40%, 40% 70%, 60% 30%, 80% 50%, 100% 10%, 100% 100%);
}

.big-pop-up {
    opacity: 0;
    transform: rotateX(20deg) translateY(150px) scale(0.9);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: bottom center;
}

.big-pop-up.visible {
    opacity: 1;
    transform: rotateX(0deg) translateY(0) scale(1);
}

/* Responsive */
@media (max-width: 992px) {
    .flow-diagram { flex-direction: column; }
    .flow-connector { transform: rotate(90deg); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
    .global-nav { display: none; } /* Add mobile menu later if needed */
    .hero { min-height: 60vh; }
    .footer-grid { grid-template-columns: 1fr; }
    .chain-node { flex-direction: column; gap: 1rem; }
}
