/* ==========================================================================
   TENZO RaaS Platform - Master Stylesheet (Vercel-Aesthetic)
   Architecture: Mobile-First, CSS Grid, Hardware Accelerated
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens (CSS Variables)
   -------------------------------------------------------------------------- */
:root {
    /* Color Palette */
    --bg-base: #000000;
    --bg-surface: #0a0a0a;
    --bg-card: rgba(15, 15, 15, 0.6);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.2);
    
    --text-main: #ededed;
    --text-muted: #888888;
    
    --accent-cyan: #00E5FF;
    --accent-glow: 0 0 40px rgba(0, 229, 255, 0.15);
    --status-green: #10B981;
    --status-red: #EF4444;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    
    /* Layout & Spacing */
    --container-max: 1200px;
    --nav-height: 72px;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
    
    /* Transitions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 150ms var(--ease-out-expo);
    --transition-base: 300ms var(--ease-out-expo);
    --transition-slow: 800ms var(--ease-out-expo);
}

/* --------------------------------------------------------------------------
   2. Base Reset & Accessibility
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Screen Reader Only (a11y) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    clip: auto;
    background: var(--accent-cyan);
    color: var(--bg-base);
    padding: 8px;
    z-index: 9999;
}

/* --------------------------------------------------------------------------
   3. Typography & Utility Classes
   -------------------------------------------------------------------------- */
.heading-xl { font-size: clamp(3rem, 8vw, 5rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.04em; }
.heading-lg { font-size: clamp(2rem, 5vw, 3rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.03em; }
.heading-md { font-size: 1.25rem; font-weight: 500; color: var(--text-main); margin-bottom: 0.5rem; }

.body-lg { font-size: clamp(1.125rem, 2vw, 1.25rem); }
.body-md { font-size: 1rem; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.max-w-2xl { max-width: 42rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.w-full { width: 100%; }

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --------------------------------------------------------------------------
   4. Buttons & Interactions
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all var(--transition-base);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.125rem; }

.btn-primary {
    background-color: var(--text-main);
    color: var(--bg-base);
    box-shadow: 0 0 0 rgba(0, 229, 255, 0);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--accent-cyan);
    box-shadow: var(--accent-glow);
    transform: translateY(-1px);
    outline: none;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border-color: var(--border-subtle);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
}

.icon-right { margin-left: 0.5rem; transition: transform var(--transition-base); }
.group:hover .group-hover { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   5. Site Header & Navigation (Glassmorphism)
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 50;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-main);
}

.brand-text { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }
.nav-link { color: var(--text-muted); text-decoration: none; font-size: 0.875rem; transition: color var(--transition-fast); margin-right: 1.5rem; }
.nav-link:hover { color: var(--text-main); }

/* --------------------------------------------------------------------------
   6. Hero Section & Kinetic Ambient Background
   -------------------------------------------------------------------------- */
.kinetic-canvas {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle at 50% 0%, rgba(0, 229, 255, 0.08) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

.section-hero {
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.hero-grid { max-width: 800px; }

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--status-green);
    box-shadow: 0 0 10px var(--status-green);
    animation: pulse 2s infinite;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.availability-text { font-size: 0.875rem; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   7. Marquee (Infinite Trust Indicators)
   -------------------------------------------------------------------------- */
.section-marquee {
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1rem 0;
    overflow: hidden;
    background: var(--bg-surface);
    white-space: nowrap;
}

.marquee-track {
    display: inline-flex;
    animation: marquee-scroll 30s linear infinite;
    /* Hardware acceleration */
    transform: translate3d(0, 0, 0); 
}

.marquee-items {
    display: inline-flex;
    align-items: center;
}

.marquee-items span {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.separator { margin: 0 2rem; color: #333 !important; }

/* --------------------------------------------------------------------------
   8. System Architecture (Bento Grid)
   -------------------------------------------------------------------------- */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .bento-grid { grid-template-columns: repeat(3, 1fr); }
    .bento-large { grid-column: span 3; }
}

@media (min-width: 1024px) {
    .bento-large { grid-column: span 2; grid-row: span 2; }
}

.bento-cell {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-base), border-color var(--transition-base);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.bento-cell:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(0, 229, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 229, 255, 0.1);
}

/* --------------------------------------------------------------------------
   9. The "Black Box" Intake Terminal
   -------------------------------------------------------------------------- */
.intake-terminal {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    overflow: hidden;
}

.terminal-header {
    background: #111;
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.terminal-dots { display: flex; gap: 0.375rem; }
.terminal-dots span { width: 10px; height: 10px; border-radius: 50%; background: #333; }
.terminal-dots span:nth-child(1) { background: #ff5f56; } /* Apple Red */
.terminal-dots span:nth-child(2) { background: #ffbd2e; } /* Apple Yellow */
.terminal-dots span:nth-child(3) { background: #27c93f; } /* Apple Green */

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.terminal-body { padding: 2.5rem; }
.terminal-intro { margin-bottom: 2rem; text-align: center; }

.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.5rem; }

.form-control {
    width: 100%;
    background: #000;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.875rem 1rem;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.2);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.status-message { margin-top: 1rem; text-align: center; font-size: 0.875rem; font-family: var(--font-mono); height: 20px; }
.status-success { color: var(--status-green); }
.status-error { color: var(--status-red); }

/* Button Loading State */
.btn-primary.loading { color: transparent; position: relative; pointer-events: none; }
.loader {
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 20px; height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.hidden { display: none; }
.btn-primary.loading .loader { display: block; }

/* --------------------------------------------------------------------------
   10. Footer
   -------------------------------------------------------------------------- */
.site-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 4rem 0 2rem;
    background: var(--bg-surface);
}

.footer-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 768px) {
    .footer-grid { flex-direction: row; justify-content: space-between; align-items: flex-end; }
}

.footer-links { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; }
.hover-white { transition: color var(--transition-fast); text-decoration: none; }
.hover-white:hover { color: var(--text-main); }

.status-indicator { display: flex; align-items: center; gap: 0.5rem; border: 1px solid var(--border-subtle); padding: 0.25rem 0.75rem; border-radius: 999px; }
.dot-green { width: 8px; height: 8px; border-radius: 50%; background: var(--status-green); }

/* --------------------------------------------------------------------------
   11. Hardware-Accelerated Animations
   -------------------------------------------------------------------------- */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes marquee-scroll {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Scroll Reveal Classes (Triggered by JS) */
.reveal-on-load {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    animation: reveal-up 1s var(--ease-out-expo) forwards;
    animation-delay: 0.2s;
}

.reveal-scroll {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    transition: opacity 1s var(--ease-out-expo), transform 1s var(--ease-out-expo);
    will-change: opacity, transform;
}

.reveal-scroll.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* Delays */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }

@keyframes reveal-up {
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Mobile Adjustments */
@media (max-width: 640px) {
    .hero-actions { flex-direction: column; align-items: stretch; gap: 1rem; }
    .availability-text { text-align: center; margin-top: -0.5rem; }
    .terminal-body { padding: 1.5rem; }
}