/* Base & Reset */
:root {
    --primary: #0066FF;
    --primary-hover: #0052CC;
    --primary-light: #EFF6FF;
    --text-main: #0F172A;
    --text-muted: #475569;
    --text-light: #94A3B8;
    --border: #E2E8F0;
    --bg: #FFFFFF;
    --bg-gray: #F8FAFC;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-blue: 0 10px 25px -5px rgba(0, 102, 255, 0.3);
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    background-color: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-blue { color: var(--primary); }
.text-gray { color: var(--text-light); }

/* Typography */
h1, h2, h3, h4 {
    color: var(--text-main);
    line-height: 1.2;
    font-weight: 700;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-muted);
}

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

.section-header p {
    font-size: 1.125rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-blue);
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border-color: var(--border);
}

.btn-outline:hover {
    border-color: var(--text-main);
    background-color: var(--bg-gray);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    height: 72px;
    display: flex;
    align-items: center;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-main);
}

.logo i {
    color: var(--primary);
    font-size: 2rem;
}

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

.nav-links a {
    font-weight: 500;
    color: var(--text-muted);
}

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

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

.sign-in {
    font-weight: 600;
    color: var(--text-main);
}

.sign-in:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 180px 0 100px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-light) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: -1;
}

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

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: white;
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.875rem;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.hero-content p {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Dashboard Mockup Illustration */
.hero-image {
    position: relative;
    width: 100%;
    perspective: 1000px;
}

.mockup-window {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
    z-index: 2;
    transform: rotateY(-10deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.hero-image:hover .mockup-window {
    transform: rotateY(0) rotateX(0);
}

.mockup-header {
    background: var(--bg-gray);
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

.dots span:nth-child(1) { background: #FF5F56; }
.dots span:nth-child(2) { background: #FFBD2E; }
.dots span:nth-child(3) { background: #27C93F; }

.search-bar {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.25rem 1rem;
    font-size: 0.75rem;
    color: var(--text-light);
    width: 150px;
}

.mockup-body {
    display: flex;
    height: 350px;
}

.sidebar {
    width: 120px;
    background: var(--primary);
    padding: 1rem 0;
    color: white;
}

.nav-item {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    opacity: 0.7;
}

.nav-item.active {
    opacity: 1;
    background: rgba(255,255,255,0.1);
    border-left: 3px solid white;
}

.content {
    flex: 1;
    padding: 1.5rem;
    background: #F8FAFC;
}

.stats-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    background: white;
    padding: 0.75rem;
    border-radius: var(--radius);
    font-size: 0.65rem;
    color: var(--text-muted);
    flex: 1;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.stat-box strong {
    display: block;
    font-size: 1rem;
    color: var(--text-main);
    margin-top: 0.25rem;
}

.chart-area {
    background: white;
    height: 150px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1rem;
    display: flex;
    align-items: flex-end;
    gap: 10%;
    box-shadow: var(--shadow-sm);
}

.chart-bar {
    width: 15%;
    background: var(--primary-light);
    border-radius: 4px 4px 0 0;
    transition: height 1s ease;
}

.chart-bar:hover {
    background: var(--primary);
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 1;
    opacity: 0.5;
}

.blob-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: -50px;
    right: -50px;
}

.blob-2 {
    width: 200px;
    height: 200px;
    background: #38bdf8;
    bottom: -50px;
    left: -50px;
}

/* Features Section */
.features {
    padding: 100px 0;
    background-color: var(--bg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: white;
    transition: all 0.3s ease;
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.icon-wrapper {
    width: 48px;
    height: 48px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Pricing Section */
.pricing {
    padding: 100px 0;
    background-color: var(--bg-gray);
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.pricing-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-5px);
}

.pricing-card.popular {
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-lg);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.card-header {
    margin-bottom: 2rem;
}

.plan-desc {
    margin-top: 0.5rem;
}

.price {
    margin-top: 1.5rem;
    display: flex;
    align-items: flex-end;
    gap: 0.25rem;
}

.currency {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.amount {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

.period {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.plan-features {
    margin-top: 2rem;
    flex: 1;
}

.plan-features ul {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.plan-features i {
    margin-top: 0.25rem;
}

/* Compare Section */
.compare {
    padding: 100px 0;
    background: white;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.compare-table {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    border-collapse: collapse;
}

.compare-table th,
.compare-table td {
    padding: 1.25rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.compare-table th:first-child,
.compare-table td:first-child {
    text-align: left;
    width: 50%;
}

.compare-table th {
    background: var(--bg-gray);
    position: sticky;
    top: 72px; /* Navbar height */
    z-index: 10;
}

.compare-table th span {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 400;
}

.compare-table .section-row td {
    background: var(--bg-gray);
    font-weight: 600;
    color: var(--text-main);
    text-align: left;
    padding: 0.75rem 1rem;
}

.compare-table i {
    font-size: 1.25rem;
}

/* Testimonials Section */
.testimonials {
    padding: 100px 0 50px;
    background-color: var(--bg-gray);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stars {
    color: var(--primary);
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
}

.quote {
    font-size: 1.125rem;
    color: var(--text-main);
    flex-grow: 1;
    margin-bottom: 2rem;
}

.author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-info strong {
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.2;
}

.author-info span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* CTA Section */
.cta {
    padding: 50px 0 100px;
    background-color: var(--bg-gray);
}

.cta-container {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    border-radius: var(--radius-xl);
    padding: 5rem 2rem;
    text-align: center;
    color: white;
    box-shadow: var(--shadow-lg);
}

.cta-container h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-container p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0 auto 2.5rem;
    font-size: 1.125rem;
    max-width: 600px;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-white {
    background-color: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.btn-white:hover {
    background-color: #f8fafc;
    color: var(--primary-hover);
    transform: translateY(-1px);
}

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

.btn-outline-white:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* Footer */
.footer {
    background: white;
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
}

.footer-links a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

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

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive Layouts */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-content p {
        margin: 0 auto 2.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    /* Navbar Responsive design using flexbox wrap and class toggle */
    .nav-links, .nav-actions {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        font-size: 1.75rem;
        color: var(--text-main);
        cursor: pointer;
        padding: 0.5rem;
        transition: color 0.2s ease, transform 0.2s ease;
    }

    .mobile-menu-btn:hover {
        color: var(--primary);
    }

    .navbar.active {
        height: auto;
        background-color: var(--bg);
        box-shadow: var(--shadow-lg);
    }

    .navbar.active .nav-container {
        flex-wrap: wrap;
    }

    .navbar.active .nav-links {
        display: flex;
        flex-direction: column;
        width: 100%;
        align-items: center;
        gap: 1.25rem;
        padding: 1.5rem 0 1rem;
        border-top: 1px solid var(--border);
        margin-top: 1rem;
        animation: slideDownMenu 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    .navbar.active .nav-actions {
        display: flex;
        flex-direction: column;
        width: 100%;
        align-items: center;
        gap: 1rem;
        padding: 0 0 1.5rem;
        animation: slideDownMenu 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    .navbar.active .nav-actions .btn {
        width: 100%;
        max-width: 300px;
    }

    @keyframes slideDownMenu {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Hero section refinements */
    .hero {
        padding: 130px 0 60px;
    }

    h1 {
        font-size: 2.25rem;
    }

    /* Disable 3D mockup rotation on mobile to prevent clipping and layout overflow */
    .mockup-window {
        transform: none !important;
        max-width: 100%;
    }

    .hero-image {
        perspective: none;
    }

    .blob {
        display: none; /* Hide background blobs on mobile to simplify visual hierarchy and prevent overlaps */
    }

    /* Pricing Section adjustments */
    .pricing-cards {
        grid-template-columns: 1fr;
        max-width: 450px;
    }

    /* Table Responsiveness adjustments */
    .compare-table {
        min-width: 600px;
    }

    .compare-table th {
        top: 0; /* Align with no-navbar overlay on mobile scroll */
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.85rem;
    }

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

    .hero-actions .btn, .cta-actions .btn {
        width: 100%;
    }

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

    .feature-card, .testimonial-card {
        padding: 1.5rem;
    }

    .pricing-card {
        padding: 2rem 1.5rem;
    }

    .price .amount {
        font-size: 2.75rem;
    }
}
