@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800;900&display=swap');

:root {
    --bg-pure: #050608;
    --bg-slate: #0d0f12;
    --glass-bg: rgba(13, 15, 18, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);

    --accent-gold: #ffcf40;
    --glow-gold: rgba(255, 207, 64, 0.15);

    --accent-cyan: #00f0ff;
    --glow-cyan: rgba(0, 240, 255, 0.15);

    --text-main: #f5f5f7;
    --text-muted: #8a8d93;

    --positive-green: #00ff9d;
    --negative-red: #ff3333;
}

html {
    scroll-behavior: smooth;
}

section[id] {
    scroll-margin-top: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body.saas-layout {
    background-color: var(--bg-pure);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-y: auto !important;
    display: block !important;
    height: auto !important;
}

/* Global Navigation */
.saas-nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    z-index: 9999;
}

.saas-nav .brand {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.saas-nav .brand span {
    font-weight: 300;
}

.saas-nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.saas-nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.saas-nav-links a:hover,
.saas-nav-links a.active {
    color: var(--text-main);
}

.btn-launch {
    background: transparent !important;
    border: 1px solid var(--accent-cyan) !important;
    color: var(--accent-cyan) !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}

.btn-launch:hover {
    background: rgba(0, 240, 255, 0.1) !important;
    box-shadow: 0 0 15px var(--glow-cyan) !important;
}

/* Page Layout */
.saas-page {
    padding-top: 100px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    max-width: 1200px;
    width: 100%;
    padding: 0 5%;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 0 4rem;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 3rem;
    font-weight: 400;
}

/* Sections */
.section {
    padding: 4rem 0;
    width: 100%;
}

.section-head {
    text-align: center;
    margin-bottom: 3rem;
}

.section-head h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-head p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Cards */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 2.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px var(--glow-gold);
    border-color: rgba(255, 207, 64, 0.3);
}

.feature-card.cyan:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px var(--glow-cyan);
    border-color: rgba(0, 240, 255, 0.3);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Docs & FAQ Layout */
.content-layout {
    display: flex;
    gap: 4rem;
    margin-top: 2rem;
}

.content-sidebar {
    width: 250px;
    flex-shrink: 0;
}

.content-sidebar ul {
    list-style: none;
    position: sticky;
    top: 100px;
}

.content-sidebar li {
    margin-bottom: 1rem;
}

.content-sidebar a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.content-sidebar a:hover,
.content-sidebar a.active {
    color: var(--accent-gold);
}

.content-main {
    flex: 1;
}

/* Pricing Page Styles */
.pricing-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 3rem;
    margin: 0 auto;
    max-width: 500px;
    text-align: left;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-cyan));
}

.pricing-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.pricing-header .price {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 2rem;
    color: var(--text-main);
    display: flex;
    align-items: flex-end;
}

.pricing-header .currency {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.pricing-header .period {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 0.5rem;
    margin-left: 0.25rem;
}

.pricing-features {
    list-style: none;
    margin-bottom: 2.5rem;
}

.pricing-features li {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.btn-checkout {
    display: block;
    width: 100%;
    margin-top: 1rem;
    padding: 18px 0;
    background: var(--accent-gold);
    color: #000;
    text-align: center;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1.1rem;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 0 20px var(--glow-gold);
}

.btn-checkout:hover {
    background: #ffdb4d;
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--glow-gold);
}

.secure-badge {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* Z-Pattern Features Styles */
.z-row {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 6rem;
}

.z-row.reverse {
    flex-direction: row-reverse;
}

.z-text {
    flex: 1;
    text-align: left;
}

.z-text h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.z-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

.z-image {
    flex: 1;
}

/* Legal & Contact Wrapper */
.legal-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 3rem;
}

.legal-text h2 {
    font-size: 1.25rem;
    color: var(--text-main);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.legal-text p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.contact-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.content-main h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.content-main .subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.step-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    background: rgba(255, 207, 64, 0.1);
    color: var(--accent-gold);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    flex-shrink: 0;
    border: 1px solid rgba(255, 207, 64, 0.3);
}

.step-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-muted);
}

.faq-item {
    margin-bottom: 2.5rem;
    background: var(--glass-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--accent-cyan);
}

.faq-item h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.faq-item p {
    color: var(--text-muted);
}

/* Footer */
.saas-footer {
    border-top: 1px solid var(--glass-border);
    padding: 2rem 5%;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: auto;
    width: 100%;
}

/* -------------------------------------
 * X-Ray Hero Animation 
 * ------------------------------------- */
.xray-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 400px;
    margin: 4rem auto 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: #0d0f12;
    cursor: crosshair;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.xray-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Base Level (Vanilla Chart - GETS ERASED) */
.xray-base {
    background: #151820;
    /* generic tradingview dark */
    z-index: 2;
    /* CSS Masking defaults: punch a transparent hole */
    -webkit-mask-image: radial-gradient(circle 220px at 50% 50%, transparent 10%, rgba(0, 0, 0, 1) 90%);
    mask-image: radial-gradient(circle 220px at 50% 50%, transparent 10%, rgba(0, 0, 0, 1) 90%);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    pointer-events: none;
    /* Let mouse events pass through to container */
}

/* Hidden Gamma Matrix Level (The Truth - BOTTOM) */
.xray-hidden {
    background: var(--bg-slate);
    z-index: 1;
}

/* Mock Graphics for SVG */
.xray-jwt {
    font-family: 'JetBrains Mono', monospace;
}

.gamma-wall-call {
    stroke: var(--accent-cyan);
    stroke-width: 2;
    filter: drop-shadow(0 0 8px var(--glow-cyan));
}

.gamma-wall-put {
    stroke: #ff0055;
    stroke-width: 2;
    filter: drop-shadow(0 0 8px rgba(255, 0, 85, 0.4));
}

.gamma-wall-text-call {
    fill: var(--accent-cyan);
    font-size: 13px;
    font-weight: bold;
}

.gamma-wall-text-put {
    fill: #ff0055;
    font-size: 13px;
    font-weight: bold;
}

/* -------------------------------------
 * LIVE DATA UTILITIES
 * ------------------------------------- */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--positive-green);
    background: rgba(0, 255, 157, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 157, 0.2);
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: var(--positive-green);
    border-radius: 50%;
    animation: data-pulse 2s infinite;
}

@keyframes data-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(0, 255, 157, 0.7);
    }

    70% {
        transform: scale(1.1);
        opacity: 0.8;
        box-shadow: 0 0 0 6px rgba(0, 255, 157, 0);
    }

    100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(0, 255, 157, 0);
    }
}

.updating-glow {
    animation: glow-pulse 1.5s ease-in-out;
}

@keyframes glow-pulse {
    0% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.5);
        text-shadow: 0 0 10px var(--positive-green);
    }

    100% {
        filter: brightness(1);
    }
}

/* -------------------------------------
 * MOBILE RESPONSIVENESS (max-width: 768px)
 * ------------------------------------- */
@media (max-width: 768px) {

    /* Hide non-essential nav links to prevent clipping */
    .saas-nav-links a:not(.btn-launch) {
        display: none;
    }

    .saas-nav {
        padding: 0 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .section-head h2 {
        font-size: 2rem;
    }

    /* Stack the Docs sidebar and main content */
    .content-layout {
        flex-direction: column;
        gap: 2rem;
    }

    .content-sidebar {
        width: 100%;
        margin-bottom: 2rem;
    }

    .content-sidebar ul {
        position: relative;
        /* Release sticky */
        top: 0;
        display: flex;
        gap: 1rem;
    }

    /* Steps */
    .step-card {
        flex-direction: column;
        padding: 1.5rem;
    }

    .xray-container {
        height: 250px;
        /* Shrink height on mobile so it fits screen */
    }

    .xray-base {
        -webkit-mask-image: radial-gradient(circle 120px at 50% 50%, transparent 10%, rgba(0, 0, 0, 1) 90%);
        mask-image: radial-gradient(circle 120px at 50% 50%, transparent 10%, rgba(0, 0, 0, 1) 90%);
    }

    .z-row,
    .z-row.reverse {
        flex-direction: column;
        gap: 2rem;
        margin-bottom: 4rem;
    }

    .pricing-card {
        padding: 2rem;
    }

    .pricing-header .price {
        font-size: 3.5rem;
    }
}