/* Premium SaaS Design System */

:root {
    /* Dynamic Accent Color (Changed dynamically via JS) */
    --accent-h: 250;
    /* Start with Purple/Blue */
    --accent-s: 100%;
    --accent-l: 60%;

    --color-accent: hsl(var(--accent-h), var(--accent-s), var(--accent-l));
    --color-accent-glow: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.5);

    /* Dark Theme Palette */
    --bg-body: #0a0a0a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-glass: rgba(20, 20, 20, 0.6);

    --text-main: #ffffff;
    --text-muted: #a1a1aa;

    --border-light: rgba(255, 255, 255, 0.1);

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --trans-color: color 0.5s ease, background-color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent) var(--bg-body);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.1;
    padding-top: 10px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.8;
}

/* --- Buttons --- */
.btn-primary {
    background: var(--color-accent);
    color: var(--accent-text, #fff);
    /* Dynamic Contrast */
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    transition: var(--trans-color), transform 0.2s;
    box-shadow: 0 0 20px var(--color-accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--color-accent-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-light);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    border-color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.btn-primary.large,
.btn-secondary.large {
    padding: 0.9rem 2.8rem;
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 200px;
    /* Ensure substantial width */
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    white-space: nowrap;
    /* Force 1 line */
}

.btn-primary.small {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

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

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0.95), transparent);
    backdrop-filter: blur(5px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.05em;
}

.logo-mark {
    width: 12px;
    height: 12px;
    background: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--color-accent);
    transition: var(--trans-color);
}

.logo-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    margin-top: 2px;
    transition: transform 0.3s var(--ease-out);
}

.logo:hover .logo-img {
    transform: scale(1.1) rotate(-5deg);
}

.desktop-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
}

.nav-menu a {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
}

.nav-menu a:hover {
    color: var(--text-main);
}

@media (max-width: 1150px) and (min-width: 901px) {
    .nav-menu {
        gap: 1rem;
    }

    .desktop-actions {
        gap: 1rem;
    }

    .nav-menu a {
        font-size: 0.85rem;
    }

    .navbar {
        padding: 0 1rem;
    }
}

/* --- Hero Section (Cinematic) --- */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 800px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Dynamic Background */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.bg-gradient {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 60%);
    opacity: 0.15;
    filter: blur(80px);
    transition: var(--trans-color);
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    font-weight: 600;
    /* Bolded badge */
    margin-bottom: 2rem;
    color: var(--color-accent);
    transition: var(--trans-color);
}

h1#hero-title {
    font-size: 4.5rem;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

p#hero-desc {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.trust-metrics {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.metric {
    display: flex;
    flex-direction: column;
}

.metric .value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
}

.metric .label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

/* Hero Visual Column (Right) */
.hero-visual-col {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Glassmorphism Card */
.visual-card {
    width: 420px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 2;
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: transform 0.5s var(--ease-out);
}

.visual-card:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

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

.dot.red {
    background: #ff5f57;
}

.dot.yellow {
    background: #febc2e;
}

.dot.green {
    background: #28c840;
}

.card-title {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.chat-interface {
    min-height: 250px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Messages */
.msg-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    animation: fadeUp 0.3s ease-out;
}

.msg-bubble {
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
    max-width: 90%;
}

.bot .msg-bubble {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border-bottom-left-radius: 2px;
}

.user {
    align-items: flex-end;
}

.user .msg-bubble {
    background: var(--color-accent);
    color: var(--accent-text, #fff);
    /* Dynamic Contrast */
    border-bottom-right-radius: 2px;
    transition: var(--trans-color);
}

.chat-input-area {
    margin-top: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50px;
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-light);
}

.input-fake {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.send-icon {
    width: 32px;
    height: 32px;
    background: var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--accent-text, #fff);
    /* Dynamic Contrast */
    transition: var(--trans-color);
}

/* Scenario Navigator */
.scenario-nav {
    position: absolute;
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.nav-track {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav-item {
    font-family: 'Space Grotesk', sans-serif;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    padding-left: 20px;
    transition: all 0.3s;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 0px;
    height: 2px;
    background: var(--color-accent);
    transition: all 0.3s;
}

.nav-item.active {
    color: var(--color-accent);
    font-weight: 700;
    font-size: 1.5rem;
    /* Larger active state */
}

.nav-item.active::before {
    width: 12px;
}

.nav-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* --- Sections High-End Redesign --- */
section {
    padding: 2rem 0;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 4rem;
    background: linear-gradient(to right, #fff, #9ca3af);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

/* --- Steps Section (Process) --- */
.steps-section {
    background: #050505;
    /* Slightly lighter than black */
    padding: 80px 0;
}



.section-header {
    text-align: center;
    margin-bottom: 5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #9ca3af);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    position: relative;
}

@media (max-width: 900px) {
    .steps-grid {
        grid-template-columns: 1fr;
    }
}

/* Connector Line */
.steps-grid::before {
    content: '';
    position: absolute;
    top: 50px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    z-index: 0;
    opacity: 0.3;
}

.step-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3rem 2rem;
    border-radius: 32px;
    text-align: center;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.step-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Background Number */
.step-number-bg {
    position: absolute;
    top: -20px;
    right: 20px;
    font-size: 10rem;
    font-weight: 800;
    font-family: 'Space Grotesk', sans-serif;
    color: rgba(255, 255, 255, 0.03);
    pointer-events: none;
    transition: all 0.4s;
    line-height: 1;
    z-index: -1;
}

.step-card:hover .step-number-bg {
    color: rgba(255, 255, 255, 0.08);
    transform: translateY(-10px) scale(1.1);
}

.step-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 2rem;
    background: #000;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    position: relative;
    z-index: 2;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.step-icon i {
    z-index: 2;
    position: relative;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Individual Gradient Styles */
.step-icon.icon-1 {
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 10px 30px -10px rgba(59, 130, 246, 0.5);
}

.step-icon.icon-2 {
    background: radial-gradient(circle at center, rgba(168, 85, 247, 0.2) 0%, transparent 70%);
    border-color: rgba(168, 85, 247, 0.3);
    box-shadow: 0 10px 30px -10px rgba(168, 85, 247, 0.5);
}

.step-icon.icon-3 {
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 10px 30px -10px rgba(16, 185, 129, 0.5);
}

.step-card:hover .step-icon {
    transform: scale(1.1) rotate(5deg);
}

.step-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.step-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.step-arrow {
    display: none;
    /* Removed old arrows */
}


/* --- Features Section (Premium Bento Grid) --- */
.features-section {
    background: #0a0a0a;
    padding: 80px 0;
}



.tag {
    display: inline-block;
    color: var(--color-accent);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    letter-spacing: 0.2em;
    font-size: 0.8rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.section-desc {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 1.5rem auto 0;
    line-height: 1.6;
}

.features-grid-premium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 Columns */
    grid-auto-rows: minmax(280px, auto);
    /* Flexible height */
    gap: 1.5rem;
}

/* Card Base */
.bento-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 32px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.bento-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.bento-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.bento-card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--color-accent);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s ease;
}

.bento-card:hover .card-icon {
    transform: scale(1.1) rotate(-5deg);
    border-color: rgba(255, 255, 255, 0.3);
}

.bento-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
    font-weight: 700;
}

.bento-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* Specific Card Accents */
.bento-card:nth-child(1) .card-icon {
    color: #f87171;
    /* Red */
    background: radial-gradient(circle at center, rgba(248, 113, 113, 0.15), transparent);
    box-shadow: 0 0 20px rgba(248, 113, 113, 0.2);
    border-color: rgba(248, 113, 113, 0.3);
}

.bento-card:nth-child(2) .card-icon {
    color: #fbbf24;
    /* Amber */
    background: radial-gradient(circle at center, rgba(251, 191, 36, 0.15), transparent);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.2);
    border-color: rgba(251, 191, 36, 0.3);
}

.bento-card:nth-child(3) .card-icon {
    color: #38bdf8;
    /* Sky */
    background: radial-gradient(circle at center, rgba(56, 189, 248, 0.15), transparent);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.3);
}

/* Wide Card Spotlight (Marketing) */
.wide-card.marketing-card {
    grid-column: span 3;
    /* Takes full width */
    background: linear-gradient(135deg, #0f1014 0%, #050608 100%);
    border: 1px solid rgba(66, 133, 244, 0.2);
    /* Blueish tint */
    flex-direction: row;
    /* Side by side layout */
    align-items: center;
    justify-content: space-between;
    padding: 0;
    /* Custom padding inside */
    height: 400px;
}

/* Spotlight Content (Left) */
.marketing-content {
    flex: 1;
    padding: 3.5rem;
    z-index: 2;
}

.marketing-badge {
    display: inline-block;
    color: #60a5fa;
    background: rgba(66, 133, 244, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(66, 133, 244, 0.2);
}

.marketing-card h3 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #93c5fd);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.marketing-desc {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 500px;
}

.feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.f-item {
    font-size: 0.9rem;
    color: #e0e7ff;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    white-space: nowrap;
    transition: all 0.3s;
}

.f-item:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #fff;
    transform: translateY(-2px);
}

.f-item i {
    color: #60a5fa;
}

/* Spotlight Visual (Right) */
.marketing-visual {
    flex: 1;
    height: 100%;
    position: relative;
    background: radial-gradient(circle at center, rgba(66, 133, 244, 0.1) 0%, transparent 60%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Flow Animation Container */
.flow-container {
    display: flex;
    align-items: center;
    gap: 0;
}

.flow-node {
    width: 60px;
    height: 60px;
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    z-index: 2;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.bot-node {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.gtm-node {
    width: 80px;
    height: 80px;
    background: #0f3568;
    border-color: #3b82f6;
    font-size: 1.2rem;
    position: relative;
}

/* Connecting Lines */
.flow-line {
    width: 80px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
}

.flow-dot {
    position: absolute;
    top: -2px;
    left: 0;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px #fff;
    /* Main dot runs for 2s total, visible for 1s */
    animation: flowMove 2s infinite linear;
}

/* Branch Dots with Delay */
.branch-dot {
    animation: flowMoveBranch 2s infinite linear;
    animation-delay: 0.8s;
    /* Starts after main dot reaches GTM */
    opacity: 0;
    /* Hidden initially */
}

@keyframes flowMove {
    0% {
        left: 0;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    40% {
        opacity: 1;
    }

    50% {
        left: 100%;
        /* Reaches GTM */
        opacity: 0;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

@keyframes flowMoveBranch {
    0% {
        left: 0;
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

/* Branches */
.flow-branches {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-left: 40px;
    position: relative;
    justify-content: center;
}

/* Horizontal line from GTM to branches */
.gtm-node::after {
    content: '';
    position: absolute;
    right: -42px;
    /* Connects to the spine */
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
}

/* Vertical Spine */
.flow-branches::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.branch {
    display: flex;
    align-items: center;
    position: relative;
}

.flow-line.small {
    width: 30px;
    /* Remove background here to avoid double lines if we use pseudo-elements, 
       but currently this is an explicit div. Let's keep it but ensure it connects. */
    background: rgba(255, 255, 255, 0.1);
}

.platform-icon {
    width: 40px;
    height: 40px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-left: -5px;
    opacity: 0.7;
    transition: all 0.3s;
}

.platform-icon.ga4 {
    color: #fca5a5;
}

.platform-icon.ads {
    color: #93c5fd;
}

.platform-icon.meta {
    color: #60a5fa;
}

/* Hover Effect: Light up path */
.marketing-card:hover .platform-icon {
    opacity: 1;
    transform: scale(1.1);
    background: #1a1a1a;
}

.marketing-card:hover .gtm-node {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .features-grid-premium {
        grid-template-columns: 1fr;
    }

    .wide-card.marketing-card {
        grid-column: span 1;
        flex-direction: column;
        height: auto;
    }

    .marketing-content {
        padding: 2.5rem 2rem;
        text-align: center;
    }

    .feature-list {
        flex-direction: column;
        gap: 0.8rem;
        align-items: center;
    }

    .marketing-visual {
        padding: 3rem 0;
        width: 100%;
        background: radial-gradient(circle at center, rgba(66, 133, 244, 0.05) 0%, transparent 70%);
    }

    .flow-container {
        transform: scale(0.9);
    }
}


/* --- Integrations (Infinite Marquee) --- */
.integrations-section {
    padding: 4rem 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    background: #080808;
    overflow: hidden;
}

.integrations-section h3 {
    text-align: center;
    font-size: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.logos-marquee {
    display: flex;
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* Masking edges */
.logos-marquee::before,
.logos-marquee::after {
    content: '';
    position: absolute;
    top: 0;
    width: 200px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.logos-marquee::before {
    left: 0;
    background: linear-gradient(to right, #080808, transparent);
}

.logos-marquee::after {
    right: 0;
    background: linear-gradient(to left, #080808, transparent);
}

.logos-slide {
    display: flex;
    gap: 4rem;
    animation: slide 30s linear infinite;
    padding-left: 4rem;
    /* Offset start */
}

/* Duplicate slide will be added in HTML */
.logos-slide span {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    opacity: 0.3;
    white-space: nowrap;
    transition: opacity 0.3s;
}

.logos-slide span:hover {
    opacity: 1;
    color: var(--color-accent);
}

@keyframes slide {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}


/* --- FAQ Section (Accordion) --- */
.faq-section {
    background: #0a0a0a;
    padding: 80px 0;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-light);
}

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    padding: 1.5rem 0;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: #fff;
    font-weight: 500;
    transition: color 0.3s;
}

.faq-question:hover {
    color: var(--color-accent);
}

.faq-question i {
    transition: transform 0.3s;
    font-size: 1rem;
    color: var(--text-muted);
}

.faq-question.active i {
    transform: rotate(180deg);
    color: var(--color-accent);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer p {
    padding-bottom: 2rem;
    padding-top: 1rem;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}


/* --- CRM Section --- */
.crm-section {
    padding: 8rem 0;
    position: relative;
    /* Blend with hero or clean background */
    background: linear-gradient(180deg, #000 0%, #050505 100%);
    overflow: hidden;
    /* Prevent visual from spilling */
}

.reversed-layout {
    flex-direction: row-reverse;
}

/* Fix generic hero container if it lacks gap */
.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6rem;
    /* Increased to allow space for Nav in the middle */
}

.badge.purple {
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    border-color: rgba(139, 92, 246, 0.2);
}

.text-left {
    text-align: left;
    margin-left: 0;
    margin-right: auto;
}

.hero-content .hero-desc {
    margin: 1.5rem 0 2.5rem 0;
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 500px;
}

.checklist-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #e4e4e7;
    font-size: 1.1rem;
}

.check-item i {
    color: var(--color-success);
}

/* CRM Visual Card */
.crm-card {
    height: auto;
    min-height: 400px;
    /* Taller */
    width: 520px;
    /* Wider */
    max-width: 100%;
    padding-bottom: 2rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* Restore Float Animation */
    animation: float-card 8s ease-in-out infinite;
    transform: none;
    /* Override default tilt */
}

.card-body.no-padding {
    padding: 0;
}

.crm-table {
    display: flex;
    flex-direction: column;
    width: 100%;
    font-size: 0.65rem;
    /* Compact text */
}

.crm-header-row {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1fr 1.5fr;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.crm-row {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1fr 1.5fr;
    padding: 0.6rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    align-items: center;
    transition: background 0.2s;
}

.crm-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.crm-row .col {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-muted);
    padding-right: 0.5rem;
}

.crm-row .text-white {
    color: #fff;
    font-weight: 500;
}

/* Status Badges in CRM Visual */
.badge-crm {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-crm.done {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.badge-crm.todo {
    background: rgba(113, 113, 122, 0.2);
    color: #a1a1aa;
}

.badge-crm.new-glow {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
    animation: pulse-blue 2s infinite;
}

/* Animations */
@keyframes pulse-blue {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(59, 130, 246, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

@keyframes float-card {
    0% {
        transform: translateY(0px) perspective(1000px) rotateY(-2deg);
    }

    50% {
        transform: translateY(-15px) perspective(1000px) rotateY(1deg);
    }

    100% {
        transform: translateY(0px) perspective(1000px) rotateY(-2deg);
    }
}

.slide-in-1 {
    animation: slideIn 0.5s ease-out 0.2s backwards;
}

.slide-in-2 {
    animation: slideIn 0.5s ease-out 0.4s backwards;
}

.slide-in-3 {
    animation: slideIn 0.6s ease-out 0.8s backwards;
    border-left: 2px solid #60a5fa;
    background: rgba(59, 130, 246, 0.05);
}


@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.crm-nav .nav-item {
    font-size: 0.9rem;
    gap: 0.5rem;
}


/* Mobile Tweaks */
@media (max-width: 900px) {
    .reversed-layout {
        flex-direction: column;
        gap: 4rem;
    }

    .crm-section .hero-content {
        text-align: center;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .crm-section .checklist-grid {
        align-items: center;
    }

    .crm-section .section-title {
        text-align: center;
    }

    .crm-header-row,
    .crm-row {
        grid-template-columns: 1.5fr 1fr;
    }

    .crm-row .col:nth-child(3),
    .crm-row .col:nth-child(4),
    .crm-header-row .col:nth-child(3),
    .crm-header-row .col:nth-child(4) {
        display: none;
    }
}


/* --- CTA Section (Finale) --- */
.cta-section {
    padding: 10rem 0;
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* Background Glow */
.cta-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 70%);
    opacity: 0.3;
    filter: blur(100px);
    z-index: -1;
}

.cta-container h2 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.cta-container p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}


/* --- Mobile Adjustments --- */
@media (max-width: 900px) {
    .section-title {
        font-size: 2.2rem;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .steps-grid::before {
        display: none;
        /* Hide connector on mobile */
    }

    .features-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .feature-card:nth-child(1),
    .feature-card:nth-child(4) {
        grid-column: span 1;
    }

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

    .cta-container h2 {
        font-size: 2.5rem;
    }
}


/* --- Footer (Redesign) --- */
footer {
    border-top: 1px solid var(--border-light);
    background: #050505;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.footer-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    color: #fff;
}

.footer-links {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 640px) {
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
        text-align: center;
    }
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color 0.3s;
}

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

.footer-copyright {
    color: #52525b;
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* --- Pricing Section (NEW) --- */
.pricing-section {
    background: #050505;
    padding: 8rem 0;
}

.pricing-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2.5rem;
    width: 380px;
    /* Fixed width for balance */
    position: relative;
    transition: all 0.3s;
}

.pricing-card.competitor {
    opacity: 0.6;
    transform: scale(0.95);
}

.pricing-card.cortex {
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.9) 0%, rgba(10, 10, 10, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
    z-index: 2;
    padding: 3rem;
}

/* Glow Effect for Hero Card */
.pricing-card.cortex::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 22px;
    background: linear-gradient(45deg, transparent, var(--color-accent), transparent);
    z-index: -1;
    opacity: 0.3;
    animation: borderGlow 4s linear infinite;
}

@keyframes borderGlow {
    0% {
        opacity: 0.1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 0.1;
    }
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-accent);
    color: var(--accent-text, #fff);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    letter-spacing: 0.1em;
    box-shadow: 0 4px 20px var(--color-accent-glow);
}

.p-header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1.5rem;
}

.p-header h3 {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.cortex .p-header h3 {
    color: #fff;
    font-size: 1.4rem;
}

.price-display {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.2rem;
    color: #fff;
}

.price-display .currency {
    font-size: 1.5rem;
    font-weight: 400;
}

.price-display .amount {
    font-size: 3.5rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1;
}

.competitor .price-display .amount {
    font-size: 2.5rem;
}

.price-display .period {
    color: var(--text-muted);
    font-size: 1rem;
}

.p-sub {
    font-size: 0.85rem;
    color: var(--color-accent);
    margin-top: 0.5rem;
    font-weight: 500;
}

.p-features {
    list-style: none;
    margin-bottom: 2.5rem;
}

.p-features li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.cortex .p-features li {
    color: #e4e4e7;
    font-size: 1.05rem;
}

.p-features li i {
    width: 20px;
    text-align: center;
}

.positive i {
    color: #4ade80;
}

.negative i {
    color: #ef4444;
}

.full-width {
    width: 100%;
    margin-top: 1rem;
}

.p-guarantee {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 1rem;
    opacity: 0.7;
}

@media (max-width: 900px) {
    .pricing-container {
        flex-direction: column;
        gap: 4rem;
    }

    .pricing-card {
        width: 100%;
        max-width: 400px;
    }

    .pricing-card.competitor {
        transform: none;
        order: 2;
    }
}

/* --- Mobile Menu Overlay (NEW) --- */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 200;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    z-index: 150;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
    width: 100%;
    align-items: center;
}

.mobile-nav-links a {
    font-size: 1.5rem;
    font-family: 'Space Grotesk', sans-serif;
    color: #fff;
    font-weight: 500;
}

.mobile-nav-links a:hover {
    color: var(--color-accent);
}

/* --- Mobile Fixes --- */
@media (max-width: 900px) {
    .mobile-menu-toggle {
        display: block;
    }

    .navbar {
        padding: 1rem;
    }

    /* Hide desktop link container on mobile */
    .desktop-actions {
        display: none !important;
    }


    /* Adjust layout */
    .hero-section {
        height: auto;
        min-height: auto;
        padding: 8rem 0 4rem 0;
    }

    .hero-container {
        flex-direction: column;
        gap: 3rem;
        text-align: center;
        padding-top: 0;
        width: 100%;
        /* Explicit width */
        overflow: hidden;
        /* Force containment */
    }

    .hero-content {
        margin: 0 auto;
        width: 100%;
        /* Ensure content respects container */
    }

    .hero-visual-col {
        justify-content: center;
        width: 100%;
        margin-top: 2rem;
        padding: 0 1rem;
        /* Safety padding */
    }

    .visual-card {
        width: 100%;
        max-width: 340px;
        /* Reduced from 360px to fit 375px-2.5rem padding */
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        width: 100%;
        min-width: unset;
        white-space: normal;
        /* Allow text wrapping on small screens */
        height: auto;
        padding: 0.8rem 1rem;
    }

    /* Scale down the entire visual part to fit mobile width while keeping layout */
    .hero-visual-col {
        justify-content: center;
        width: 100%;
        margin-top: 1rem;
        transform: scale(0.65);
        /* Shrink to fit */
        transform-origin: center top;
        margin-bottom: -100px;
        /* Compensate for empty space after scaling */
        padding: 0;
    }

    .visual-card {
        width: 420px;
        /* Restore original width for scaling */
        max-width: none;
    }

    /* Keep nav absolute but scaled with parent */
    .scenario-nav {
        position: absolute;
        right: -50px;
        top: 50%;
        transform: translateY(-50%);
        flex-direction: column;
        width: auto;
        margin-top: 0;
    }

    .scenario-nav .nav-track {
        flex-direction: column;
        gap: 1rem;
        flex-wrap: nowrap;
    }

    .scenario-nav .nav-label {
        display: block;
        /* Restore label */
        writing-mode: vertical-rl;
    }

    .trust-metrics {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Typography Scaling */
    h1#hero-title {
        font-size: 2.5rem !important;
        line-height: 1.1;
        overflow-wrap: break-word;
        word-break: normal;
        padding: 0 1rem;
    }

    p#hero-desc {
        font-size: 1rem;
        margin-left: auto;
        margin-right: auto;
        padding: 0 1rem;
        max-width: 90%;
    }

    .section-title {
        font-size: 2rem;
        padding: 0 1rem;
    }

    /* Navbar Tweaks */
    .navbar .btn-primary {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .logo {
        font-size: 1.1rem;
        /* Slightly smaller logo text */
    }

    /* Ensure Logo Size */
    .logo img,
    .logo-img {
        width: 20px !important;
        height: 20px !important;
        margin-top: 2px;
    }
}