:root {
    /* Premium SaaS Color Palette */
    --bg-base: #030509;
    --bg-deep: #05070a;
    --bg-gradient: radial-gradient(circle at top right, #0a0f1d 0%, #030509 100%);
    
    --indigo-primary: #6366f1;
    --indigo-glow: rgba(99, 102, 241, 0.4);
    --cyan-secondary: #06b6d4;
    --cyan-glow: rgba(6, 182, 212, 0.4);
    --purple-accent: #a855f7;
    --purple-glow: rgba(168, 85, 247, 0.4);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --glass-bg: rgba(15, 23, 42, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-mid: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    scroll-padding-top: 120px;
}

body {
    background: var(--bg-base);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; transition: var(--transition-fast); }

/* --- Global Typography --- */
h1, h2, h3, h4 { color: #fff; font-weight: 800; line-height: 1.1; margin-bottom: 1rem; }
h1 { font-size: clamp(3rem, 8vw, 5rem); letter-spacing: -2px; }
h2 { font-size: clamp(2.2rem, 5vw, 3.5rem); letter-spacing: -1px; }
h3 { font-size: 1.6rem; }
p { color: var(--text-muted); font-size: 1.05rem; }

span.badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.3);
    color: var(--cyan-secondary);
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* --- Layout Utilities --- */
.container {
    width: 90%;
    max-width: 1300px;
    margin: 0 auto;
}

section {
    padding: 120px 0;
    position: relative;
}

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

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    transition: var(--transition-mid);
}

/* --- Navigation (Capsule) --- */
.sticky-nav {
    position: fixed;
    top: 1.5rem;
    left: 0;
    width: 100%;
    z-index: 10000;
}

.nav-capsule-wrapper {
    display: flex;
    justify-content: center;
}

.nav-capsule {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1000px;
    padding: 0.6rem 0.6rem 0.6rem 2.5rem;
    background: rgba(13, 17, 23, 0.6);
    backdrop-filter: blur(30px);
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5);
}

.logo-mini span {
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-muted);
}

.nav-links a:hover, .nav-links a.active {
    color: #fff;
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 160px;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero h1 span {
    color: var(--indigo-primary);
    text-shadow: 0 0 30px var(--indigo-glow);
}

.hero p {
    font-size: 1.3rem;
    max-width: 600px;
    margin-bottom: 3rem;
}

.hero-bg-spheres {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: floatContinuous 20s infinite alternate;
}

.sphere-1 { width: 500px; height: 500px; background: var(--indigo-glow); top: -10%; right: -5%; }
.sphere-2 { width: 400px; height: 400px; background: var(--cyan-glow); bottom: 10%; left: -5%; }
.sphere-3 { width: 250px; height: 250px; background: var(--purple-glow); top: 30%; left: 30%; }

@keyframes floatContinuous {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 40px) scale(1.1); }
}

/* Dashboard Stack in Hero */
.dashboard-stack-modern {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: flex-end;
}

.modern-dash-card {
    width: 340px;
    padding: 2rem;
}

.metric-val {
    font-size: 2.8rem;
    font-weight: 900;
    color: #fff;
}

.mini-graph-svg svg { stroke-linecap: round; }

/* --- Buttons & Badges --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 32px;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
}

.btn-primary { background: var(--indigo-primary); color: #fff; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 30px var(--indigo-glow); }

.btn-blue-glow { background: #3b82f6; box-shadow: 0 0 15px rgba(59, 130, 246, 0.4); }
.btn-blue-glow:hover { box-shadow: 0 0 30px rgba(59, 130, 246, 0.6); }

.btn-large { padding: 18px 44px; font-size: 1.1rem; border-radius: 18px; }

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: #fff;
}

.btn-outline:hover { background: rgba(255,255,255,0.05); border-color: #fff; }

/* --- About & Journey (Corrected Overlap) --- */
.page-main { padding-top: 20px; }

.experience-flow-v2 {
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
}

.timeline-v2 {
    position: relative;
    max-width: 1100px;
    margin: 6rem auto;
}

.timeline-v2::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 50%;
    width: 2px;
    background: linear-gradient(180deg, transparent, var(--indigo-primary), var(--cyan-secondary), transparent);
    transform: translateX(-50%);
    opacity: 0.2;
}

.timeline-node {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 10rem;
    position: relative;
}

.timeline-node:nth-child(even) { flex-direction: row-reverse; }

.node-content {
    width: 44%;
    padding: 3rem;
    z-index: 10;
}

.node-meta {
    width: 44%;
    padding: 0 60px;
    text-align: right;
}

.timeline-node:nth-child(even) .node-meta { text-align: left; }

.node-period { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.5rem; display: block; }
.node-duration { 
    display: inline-block; padding: 6px 16px; border-radius: 99px;
    background: rgba(6, 182, 212, 0.1); border: 1px solid var(--cyan-secondary);
    color: var(--cyan-secondary); font-size: 0.85rem; font-weight: 800;
}

.node-list {
    display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.5rem;
}

.node-list li {
    padding: 8px 16px; background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border); border-radius: 10px;
    font-size: 0.8rem; font-weight: 700;
}

.timeline-node::after {
    content: ''; position: absolute; top: 50%; left: 50%; width: 18px; height: 18px;
    background: var(--bg-base); border: 4px solid var(--indigo-primary);
    border-radius: 50%; transform: translate(-50%, -50%); z-index: 20;
    box-shadow: 0 0 20px var(--indigo-primary);
}

/* --- Results Formation --- */
.results-stack {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 4rem;
}

.formation-card {
    flex: 1;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.card-metric { font-size: 3.5rem; font-weight: 900; margin-bottom: 0.5rem; }
.card-label { text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }

.tilt-left { transform: rotate(-4deg); }
.tilt-right { transform: rotate(4deg); }
.tilt-center { transform: scale(1.1); z-index: 2; border-color: var(--indigo-primary); }

/* --- Marquee --- */
.testimonial-marquee { overflow: hidden; position: relative; padding: 2rem 0; width: 100vw; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; }
.marquee-track { display: flex; gap: 2rem; width: max-content; animation: marquee 60s linear infinite; }
.marquee-row-reverse .marquee-track { animation-direction: reverse; }

@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- Case Study Grid --- */
.case-study-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.case-img { height: 260px; overflow: hidden; position: relative; }
.case-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s ease; }
.case-study-box:hover .case-img img { transform: scale(1.15); }

/* --- Tools Section --- */
.software-ui-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.ui-panel { padding: 2rem; }
.ui-panel:first-child { grid-column: span 2; }

/* --- Footer --- */
.footer { background: #05070A; padding: 100px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 5rem; padding-bottom: 80px; }
.footer-giant-wrapper { padding: 4rem 0; border-top: 1px solid var(--glass-border); overflow: hidden; }
.giant-text { font-size: 15vw; font-weight: 900; text-align: center; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,0.1); opacity: 0; transform: translateY(50px); }
.giant-text.active { opacity: 1; transform: translateY(0); transition: 1s cubic-bezier(0.16, 1, 0.3, 1); }

/* --- Responsive --- */
@media (max-width: 1200px) {
    .container { width: 92%; }
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-text { margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
    .dashboard-stack-modern { align-items: center; padding-right: 0; flex-direction: row; flex-wrap: wrap; justify-content: center; }
}

/* --- Mobile Menu Restoration --- */
@media (max-width: 992px) {
    .mobile-menu-btn { 
        display: block; 
        cursor: pointer;
        font-size: 1.2rem;
        padding: 0.5rem;
        z-index: 10001;
    }
    
    .nav-links {
        display: flex;
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100vh;
        background: rgba(5, 7, 13, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transform: translateY(-100%);
        transition: var(--transition-mid);
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
    }
    
    .sticky-nav.mobile-active .nav-links {
        transform: translateY(0);
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }
    
    .nav-links a { font-size: 1.5rem; }
    .nav-cta { display: none; } /* Hide in small capsule, move to links if needed */
}

/* --- Results Section Refinement --- */
.results-formation-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.results-text {
    max-width: 800px;
    margin: 0 auto;
}

/* --- Final Spacing Fixes --- */
.hero { padding-bottom: 60px; }
.about-preview, .tools-section, .case-studies, .results-stats, .blog, .pricing, .testimonials-section, .contact-cta {
    padding: 100px 0;
}

/* Capsule Nav Shadow Fix */
.nav-capsule {
    box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 20px rgba(99, 102, 241, 0.1);
}

/* Smooth Scroll Padding */
:target {
    scroll-margin-top: 120px;
}
/* --- Service Selection Modal --- */
.selection-modal {
    position: fixed;
    inset: 0;
    z-index: 20000;
    background: var(--bg-base);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-mid);
}

.selection-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    max-width: 1000px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.modal-content h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 2rem;
    background: linear-gradient(90deg, #fff, var(--indigo-primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.service-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.option-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 3rem 2rem;
    cursor: pointer;
    transition: var(--transition-mid);
}

.option-card:hover {
    transform: translateY(-8px);
    background: rgba(15, 23, 42, 0.6);
}

.option-card i {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

/* Service Filtering Logic */
.service-seo-content, .service-website-content {
    display: none;
}

body.user-seo .service-seo-content {
    display: block;
}

body.user-website .service-website-content {
    display: block;
}

/* Purple Theme Override for Website Dashboard */
body.user-website {
    --indigo-primary: var(--purple-accent);
    --indigo-glow: var(--purple-glow);
}

body.user-website .logo-mini span, 
body.user-website .logo span:first-child {
    color: var(--purple-accent);
}

body.user-website .btn-primary {
    background: var(--purple-accent);
}

/* Floating Service Switcher */
.floating-service-btn {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 9999;
    padding: 12px 24px;
    font-size: 0.85rem;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.1);
    transform: scale(0.95);
    transition: var(--transition-mid);
}

.floating-service-btn:hover {
    transform: scale(1);
    background: rgba(255,255,255,0.1);
    border-color: #fff;
}

@media (max-width: 992px) { 
    .case-study-grid, .footer-grid, .results-stack { grid-template-columns: 1fr; } 
    .about-grid { grid-template-columns: 1fr; text-align: center; } 
    .timeline-node, .timeline-node:nth-child(even) { flex-direction: column; align-items: flex-start; padding-left: 60px; margin-bottom: 6rem; } 
    .timeline-v2::before { left: 24px; } 
    .timeline-node::after { left: 24px; top: 0; transform: translateX(-50%); } 
    .node-content, .node-meta { width: 100%; text-align: left !important; padding: 0; } .node-meta { margin-bottom: 1.5rem; } 
}

@media (max-width: 768px) {
    .service-options { grid-template-columns: 1fr; }
    .floating-service-btn { 
        bottom: 1rem; 
        left: 1rem; 
        padding: 10px 18px;
        font-size: 0.75rem; 
    }
}
