/* =========================================
   VARIABLES & THEME SETUP
   ========================================= */
:root {
    /* Dark Theme (Default) */
    --bg-color: #0d1117;
    --card-bg: #161b22;
    --card-border: #30363d;
    --text-main: #c9d1d9;
    --text-heading: #ffffff;
    --text-muted: #8b949e;
    --primary: #da3633;
    /* Red accent */
    --primary-hover: #b32b29;
    --secondary: #1f6feb;
    /* Blue accent */
    --accent-glow: rgba(218, 54, 51, 0.15);

    --nav-bg: rgba(13, 17, 23, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);

    --font-main: 'Inter', sans-serif;
    --max-width: 1200px;
    --transition: all 0.3s ease;
}

body.light-mode {
    --bg-color: #ffffff;
    --card-bg: #f6f8fa;
    --card-border: #d0d7de;
    --text-main: #24292f;
    --text-heading: #1f2328;
    --text-muted: #57606a;
    --primary: #cf222e;
    --primary-hover: #a40e26;
    --secondary: #0969da;
    --accent-glow: rgba(207, 34, 46, 0.1);

    --nav-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.1);
}

/* =========================================
   RESET & BASE STYLES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================
   UTILITIES
   ========================================= */
.btn-primary,
.btn-primary-lg {
    background-color: var(--primary);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
    border: 1px solid transparent;
}

.btn-primary:hover,
.btn-primary-lg:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46, 160, 67, 0.2);
}

.btn-secondary {
    color: var(--text-heading);
    font-weight: 600;
    padding: 10px 20px;
}

.btn-secondary:hover {
    color: var(--secondary);
}

.btn-primary-lg {
    padding: 14px 32px;
    font-size: 1.1rem;
}

.btn-outline-lg {
    padding: 14px 32px;
    font-size: 1.1rem;
    border: 1px solid var(--card-border);
    border-radius: 6px;
    color: var(--text-heading);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline-lg:hover {
    border-color: var(--text-heading);
    background: rgba(255, 255, 255, 0.05);
}

.gradient-text {
    background: linear-gradient(135deg, #da3633 0%, #2f81f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* =========================================
   NAVBAR
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -1px;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links li a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links li a:hover {
    color: var(--text-heading);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--text-heading);
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-btn {
    display: none;
    color: var(--text-heading);
    font-size: 1.5rem;
    cursor: pointer;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    padding-top: 140px;
    padding-bottom: 80px;
    display: flex;
    align-items: center;
    min-height: 90vh;
    position: relative;
    overflow: hidden;
}

/* Background Glow Effect */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
    z-index: -1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    animation: fadeInSlide 0.8s ease-out;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(56, 139, 253, 0.15);
    color: #58a6ff;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(56, 139, 253, 0.4);
    margin-bottom: 24px;
}

body.light-mode .badge {
    color: #0969da;
    background: rgba(9, 105, 218, 0.1);
    border-color: rgba(9, 105, 218, 0.3);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 24px;
    letter-spacing: -2px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-btns {
    display: flex;
    gap: 16px;
}

/* Chart Mockup Placeholder */
.chart-mockup-placeholder {
    width: 100%;
    height: 400px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    animation: float 6s ease-in-out infinite;
}

.mockup-header {
    height: 40px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.mockup-body {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--card-bg);
    overflow: hidden;
    position: relative;
}

.mockup-body img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.chart-loading {
    text-align: center;
    color: var(--text-muted);
    opacity: 0.5;
}

/* =========================================
   FEATURES SECTION
   ========================================= */
.features {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 32px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--text-muted);
}

.icon-box {
    width: 48px;
    height: 48px;
    background: var(--accent-glow);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 24px;
}

.feature-card h3 {
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* =========================================
   DEMO SECTION
   ========================================= */
.demo-section {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--bg-color) 0%, var(--card-bg) 100%);
}

.demo-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.check-list {
    margin-top: 32px;
}

.check-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 1.1rem;
    color: var(--text-heading);
}

.check-list i {
    color: var(--primary);
}

.demo-image .chart-mockup-placeholder {
    height: 350px;
}

/* =========================================
   HOW IT WORKS
   ========================================= */
.how-it-works {
    padding: 100px 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.step-card {
    text-align: center;
}

.step-number {
    font-size: 4rem;
    font-weight: 800;
    color: var(--card-border);
    opacity: 0.5;
    display: block;
    margin-bottom: -20px;
    position: relative;
    z-index: -1;
}

.step-card h3 {
    margin-bottom: 16px;
    font-size: 1.5rem;
}

.step-card p {
    color: var(--text-muted);
}

/* =========================================
   SCREENSHOTS
   ========================================= */
.screenshots {
    padding: 100px 0;
    overflow: hidden;
}

.phone-mockups {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-top: 60px;
}

.phone {
    width: 280px;
    height: 580px;
    background: #1c1c1e;
    border-radius: 40px;
    border: 8px solid #3a3a3c;
    position: relative;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.6);
    transform: scale(0.9);
}

.phone.center {
    transform: scale(1);
    z-index: 2;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.8);
}

.phone .screen {
    width: 100%;
    height: 100%;
    background: #111;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
}

.phone .screen::after {
    content: 'App Screen';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #444;
}

/* =========================================
   TESTIMONIALS
   ========================================= */
.testimonials {
    padding: 100px 0;
    background: var(--card-bg);
}

.review-card {
    background: var(--bg-color);
    padding: 32px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
}

.stars {
    color: #ffd700;
    margin-bottom: 16px;
}

.review-card p {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 24px;
    color: var(--text-main);
}

.user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--card-border);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    color: var(--text-muted);
}

.info h4 {
    font-size: 1rem;
    margin-bottom: 2px;
}

.info span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* =========================================
   CTA SECTION & FOOTER
   ========================================= */
.cta-section {
    padding: 100px 0;
    text-align: center;
}

.cta-box {
    background: radial-gradient(120% 120% at 50% 10%, #161b22 40%, #0d1117 100%);
    padding: 80px 40px;
    border-radius: 24px;
    border: 1px solid var(--card-border);
}

.cta-box h2 {
    font-size: 3rem;
    margin-bottom: 16px;
}

.cta-box p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

footer {
    border-top: 1px solid var(--card-border);
    padding-top: 80px;
    background: var(--bg-color);
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 60px;
}

.footer-col h4 {
    margin-bottom: 24px;
    font-size: 1.1rem;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.footer-col a:hover {
    color: var(--primary);
}

.social-icons {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.social-icons a {
    color: var(--text-main);
    font-size: 1.2rem;
}

.footer-bottom {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid var(--card-border);
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0);
    }
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 968px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-container,
    .demo-container,
    .steps-grid,
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-btns,
    .check-list li,
    .social-icons {
        justify-content: center;
    }

    .nav-links,
    .nav-actions {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    /* Mobile Menu Active State */
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--nav-bg);
        padding: 20px;
        border-bottom: 1px solid var(--glass-border);
    }

    .nav-actions.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 280px;
        /* Adjust based on links height */
        left: 0;
        width: 100%;
        padding-bottom: 20px;
        background: var(--nav-bg);
    }

    .phone-mockups {
        flex-direction: column;
    }

    .phone {
        transform: scale(0.8) !important;
    }

    .phone.center {
        z-index: 1;
    }
}