/* CSS Variables */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #06b6d4;
    --accent: #8b5cf6;
    --dark: #0f172a;
    --dark-lighter: #1e293b;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --light: #f1f5f9;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--dark);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

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

ul {
    list-style: none;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 1.75rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-accent {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--gray-light);
    font-weight: 500;
    font-size: 0.95rem;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.btn-nav {
    padding: 10px 20px;
    background: var(--gradient);
    color: var(--white);
    border-radius: 6px;
}

.btn-full {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding: 140px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 24px;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--gray-light);
    margin-bottom: 32px;
    max-width: 520px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.hero-stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--gray);
}

/* Dashboard Preview */
.hero-visual {
    display: flex;
    justify-content: center;
}

.dashboard-preview {
    background: var(--dark-lighter);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 500px;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.dashboard-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dashboard-dots {
    display: flex;
    gap: 6px;
}

.dashboard-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray);
}

.dashboard-dots span:first-child { background: #ef4444; }
.dashboard-dots span:nth-child(2) { background: #f59e0b; }
.dashboard-dots span:last-child { background: #22c55e; }

.dashboard-title {
    font-size: 0.8rem;
    color: var(--gray);
}

.dashboard-content {
    padding: 24px;
}

.mini-chart-container {
    margin-bottom: 20px;
}

.mini-chart-label {
    font-size: 0.75rem;
    color: var(--gray);
    margin-bottom: 12px;
}

.mini-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 120px;
    padding-bottom: 20px;
}

.mini-bar {
    flex: 1;
    height: var(--height);
    background: var(--gray);
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: all 0.3s ease;
    animation: grow 1s ease-out forwards;
    transform-origin: bottom;
}

@keyframes grow {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

.mini-bar.highlight {
    background: var(--gradient);
}

.mini-bar span {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: var(--gray);
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.metric-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 16px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.metric-value.down {
    color: #22c55e;
}

.metric-name {
    font-size: 0.75rem;
    color: var(--gray);
}

/* Section Styles */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--primary);
    margin-bottom: 16px;
    font-weight: 500;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--gray-light);
    font-size: 1.1rem;
}

/* Features Section */
.features {
    background: linear-gradient(180deg, var(--dark) 0%, var(--dark-lighter) 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-4px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: var(--white);
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--gray-light);
    font-size: 0.95rem;
}

/* Charts Section */
.savings {
    background: var(--dark-lighter);
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}

.chart-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 32px;
}

.chart-card.wide {
    grid-column: span 2;
}

.chart-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 24px;
}

/* Bar Chart */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bar-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bar-label {
    width: 120px;
    font-size: 0.9rem;
    color: var(--gray-light);
}

.bar-track {
    flex: 1;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: var(--width);
    background: var(--gradient);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
    animation: fillBar 1.5s ease-out forwards;
    transform-origin: left;
}

@keyframes fillBar {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.bar-value {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Pie Chart */
.pie-chart-container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.pie-chart {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: conic-gradient(
        var(--primary) 0deg 100.8deg,
        var(--secondary) 100.8deg 187.2deg,
        var(--accent) 187.2deg 266.4deg,
        #64748b 266.4deg 320.4deg,
        #94a3b8 320.4deg 360deg
    );
    position: relative;
    animation: rotatePie 1s ease-out forwards;
}

@keyframes rotatePie {
    from { transform: rotate(-90deg); opacity: 0; }
    to { transform: rotate(0deg); opacity: 1; }
}

.pie-chart::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--dark-lighter);
    border-radius: 50%;
}

.pie-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--gray-light);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: var(--color);
}

/* Timeline Chart */
.timeline-chart {
    position: relative;
    padding: 20px 0;
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%);
}

.timeline-points {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.timeline-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.point-marker {
    width: 40px;
    height: 40px;
    background: var(--dark-lighter);
    border: 2px solid var(--gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.timeline-point.highlight .point-marker {
    background: var(--gradient);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.point-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.point-time {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 500;
}

.point-title {
    font-size: 1rem;
    font-weight: 600;
}

.point-desc {
    font-size: 0.85rem;
    color: var(--gray-light);
    max-width: 150px;
}

/* Big Stats */
.big-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

.big-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.big-label {
    color: var(--gray-light);
    font-size: 0.95rem;
}

/* How It Works */
.how-it-works {
    background: var(--dark);
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.step {
    display: grid;
    grid-template-columns: auto 1fr 200px;
    gap: 40px;
    align-items: center;
}

.step-number {
    font-size: 4rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.5;
}

.step-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.step-content p {
    color: var(--gray-light);
    font-size: 1.05rem;
}

/* Step Visuals */
.step-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.node-diagram {
    position: relative;
    width: 120px;
    height: 120px;
}

.node {
    position: absolute;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.center-node {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
}

.small-node {
    width: 20px;
    height: 20px;
    background: var(--secondary);
    animation: orbit 4s linear infinite;
}

.n1 { top: 0; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.n2 { bottom: 10px; left: 10px; animation-delay: -1.33s; }
.n3 { bottom: 10px; right: 10px; animation-delay: -2.66s; }

@keyframes orbit {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

.ai-brain {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brain-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid;
    animation: spin 8s linear infinite;
}

.ring1 {
    width: 100%;
    height: 100%;
    border-color: var(--primary);
    opacity: 0.3;
}

.ring2 {
    width: 75%;
    height: 75%;
    border-color: var(--secondary);
    opacity: 0.5;
    animation-direction: reverse;
    animation-duration: 6s;
}

.ring3 {
    width: 50%;
    height: 50%;
    border-color: var(--accent);
    opacity: 0.7;
    animation-duration: 4s;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.brain-core {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    z-index: 2;
}

.savings-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.savings-arrow {
    width: 40px;
    height: 60px;
    background: var(--gradient);
    clip-path: polygon(50% 100%, 0 40%, 20% 40%, 20% 0, 80% 0, 80% 40%, 100% 40%);
    animation: bounce 1.5s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.savings-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #22c55e;
}

/* Demo Section */
.demo-section {
    background: linear-gradient(180deg, var(--dark-lighter) 0%, var(--dark) 100%);
}

.demo-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.demo-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.demo-content p {
    color: var(--gray-light);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.demo-benefits {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.demo-benefits li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
}

.check-icon {
    width: 24px;
    height: 24px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #22c55e;
    font-size: 0.8rem;
}

/* Demo Form */
.demo-form-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px;
}

.demo-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-light);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--white);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.form-group select option {
    background: var(--dark);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 8px;
}

/* Footer */
.footer {
    background: var(--dark);
    padding: 60px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--gray);
    margin-top: 16px;
    font-size: 0.95rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-column h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-column ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-column a {
    color: var(--gray);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--white);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.footer-bottom p {
    color: var(--gray);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        order: 1;
    }

    .hero-visual {
        order: 2;
    }

    .hero-subtitle {
        margin: 0 auto 32px;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .demo-wrapper {
        grid-template-columns: 1fr;
    }

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

    .demo-benefits {
        align-items: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links {
        justify-items: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

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

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

    .chart-card.wide {
        grid-column: span 1;
    }

    .pie-chart-container {
        flex-direction: column;
    }

    .timeline-points {
        flex-direction: column;
        gap: 40px;
    }

    .timeline-line {
        display: none;
    }

    .big-stats {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .step {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .step-number {
        font-size: 2.5rem;
    }

    .step-visual {
        order: -1;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}
