/* Variables and Base Theme */
:root {
    --bg-light: #ffffff;
    --bg-alt: #f9fafb;
    --text-main: #111827;
    --text-muted: #4b5563;
    --text-light: #6b7280;
    --accent-primary: #059669; /* MapLead Emerald Green */
    --accent-hover: #047857;
    --border-color: #e5e7eb;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

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

/* Container System */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    width: 100%;
}

/* Typography & Components */
h1, h2, h3, h4, h5, h6, .logo, .btn-primary, .btn-secondary, .badge {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
}

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

/* Utilities */
.card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

/* Typography */
.text-accent-primary { color: var(--accent-primary); }
.text-accent-secondary { color: var(--text-main); } /* Overridden to fit light mode clean look */

.badge {
    background: var(--accent-primary);
    color: white;
    font-size: 0.6em;
    padding: 2px 6px;
    border-radius: 4px;
    vertical-align: super;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 4px;
}

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

.btn-primary {
    background: var(--accent-primary);
    color: #ffffff;
    border: 1px solid transparent;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.2);
}

.btn-primary.lg { padding: 14px 32px; font-size: 1.05rem; }

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover { 
    background: var(--bg-alt); 
    border-color: #d1d5db;
}

.btn-primary svg, .btn-secondary svg {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    flex-shrink: 0;
}

/* Navigation */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    z-index: 100;
}

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

.logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px; display: flex; align-items: center;}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

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

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

/* Hero Section */
.hero {
    min-height: 90vh;
    padding: 180px 0 80px;
    background: #0f172a;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

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

.hero-headline {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1.5px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-weight: 400;
    line-height: 1.6;
}

.hero .subtitle {
    color: #cbd5e1;
}

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

#downloadBtnHero {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.stats {
    display: flex;
    justify-content: space-around;
    padding: 24px;
    background: var(--bg-light);
}

.hero .stats {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

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

.stat-item h3 {
    font-size: 1.8rem;
    color: var(--text-main);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.hero .stat-item h3 {
    color: #f8fafc;
}

.stat-item p {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.hero .stat-item p {
    color: #94a3b8;
}

/* Mockup Window */
.hero-graphic { flex: 1; display: flex; justify-content: center; }
.mockup-window { 
    width: 100%; 
    max-width: 540px; 
    overflow: hidden; 
    background: #1e293b; 
    color: #f8fafc;
    border-radius: 16px;
    box-shadow: 0 0 60px rgba(16, 185, 129, 0.2), 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255,255,255,0.05);
}

.window-header {
    background: #0f172a;
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #334155;
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.window-body {
    padding: 24px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.code-line { margin-bottom: 12px; opacity: 0; animation: typeLine 0.5s forwards; }
.code-line:nth-child(1) { animation-delay: 0.5s; }
.code-line:nth-child(2) { animation-delay: 1.2s; }
.code-line:nth-child(3) { animation-delay: 2.0s; }
.code-line:nth-child(4) { animation-delay: 2.5s; }
.code-line:nth-child(6) { animation-delay: 4.5s; }
.code-line.success { color: #34d399; font-weight: 600; }

.progress-bar-container {
    width: 100%; height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    margin: 16px 0;
    overflow: hidden;
    opacity: 0;
    animation: typeLine 0.1s forwards;
    animation-delay: 3s;
}

.progress-bar {
    height: 100%; width: 0%;
    background: #34d399;
    animation: fillProgress 1.5s ease-out forwards;
    animation-delay: 3.2s;
}

@keyframes typeLine { to { opacity: 1; } }
@keyframes fillProgress { to { width: 100%; } }

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

.section-header { text-align: center; margin-bottom: 60px; max-width: 700px; margin-left: auto; margin-right: auto;}
.section-header h2 { font-size: 2.5rem; margin-bottom: 16px; font-weight: 800; letter-spacing: -1px; color: var(--text-main);}
.section-header p { font-size: 1.1rem; color: var(--text-muted); line-height: 1.6; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.feature-card {
    padding: 40px 32px;
    text-align: left;
    transition: all 0.3s ease;
}

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

.icon-wrapper {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 0 20px;
    background: #ecfdf5;
    color: var(--accent-primary);
    transition: all 0.3s ease;
}

.icon-wrapper svg { width: 24px; height: 24px; }

.feature-card h3 { font-size: 1.25rem; margin-bottom: 12px; font-weight: 700; color: var(--text-main);}
.feature-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6;}

/* How it Works Section */
.how-it-works { padding: 100px 0; background: var(--bg-light); }
.step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
}
.step-card {
    padding: 32px 24px;
    text-align: center;
    position: relative;
}
.step-num {
    width: 48px; height: 48px;
    background: var(--accent-primary);
    color: white;
    font-size: 1.2rem;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    margin: 0 auto 20px;
    box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.3);
}
.step-card h3 { font-size: 1.2rem; margin-bottom: 12px; font-weight: 700; color: var(--text-main);}
.step-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5;}

/* Benefits Section */
.benefits { padding: 100px 0; background: var(--bg-alt); }
.bg-white { background: var(--bg-light) !important; }

/* Footer */
.footer {
    background: var(--bg-alt); /* Off-white instead of white */
    border-top: 1px solid var(--border-color);
    padding: 60px 0 24px;
}

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

.footer-col h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-main);
}

.footer-col p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-col a.ext-link {
    color: var(--accent-primary);
    font-weight: 600;
}

.footer-col a.ext-link:hover {
    text-decoration: underline;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.footer-links a:hover {
    color: var(--accent-primary);
    text-decoration: none;
}

.brand h2 { font-size: 1.5rem; letter-spacing: -0.5px;}

.copyright {
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* Legal Notice Banner & Marquee */
.legal-notice {
    background: #fffbeb;
    border-top: 1px solid #fde68a;
    border-bottom: 1px solid #fde68a;
    padding: 12px 0;
    color: #92400e;
    font-size: 0.95rem;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-content {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 25s linear infinite;
}

.marquee-content:hover {
    animation-play-state: paused;
}

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

.legal-notice strong {
    color: #b45309;
}

/* Legal / Info Pages */
.page-container {
    padding: 140px 0 80px;
    min-height: calc(100vh - 200px);
}

.page-container h1 {
    font-size: 2.5rem;
    margin-bottom: 24px;
    color: var(--text-main);
}

.page-container h2 {
    font-size: 1.5rem;
    margin-top: 32px;
    margin-bottom: 16px;
    color: var(--text-main);
}

.page-container p {
    margin-bottom: 16px;
    color: var(--text-muted);
    line-height: 1.7;
}

.page-container ul, .page-container ol {
    margin-bottom: 16px;
    padding-left: 24px;
    color: var(--text-muted);
    line-height: 1.7;
}

.page-container li {
    margin-bottom: 8px;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* Responsive */
@media (max-width: 900px) {
    .hero { padding-top: 120px; }
    .hero .container { flex-direction: column; text-align: center; gap: 40px; }
    .hero-content { align-items: center; display: flex; flex-direction: column; }
    .hero-headline { font-size: 2.8rem; }
    .subtitle { font-size: 1.05rem; }
    .cta-group { justify-content: center; flex-direction: column; width: 100%; }
    .cta-group a, .cta-group button { width: 100%; text-align: center; justify-content: center; }
    .nav-links { display: none; }
    
    .glass-nav .nav-inner { flex-wrap: wrap; gap: 10px; justify-content: center; }
    #downloadBtnNav { font-size: 0.85rem; padding: 8px 16px; }

    .feature-card { text-align: center; padding: 24px 20px; }
    .icon-wrapper { margin-left: auto; margin-right: auto; }
    
    .stats { flex-direction: column; gap: 20px; padding: 16px;}
    
    .footer-content { display: flex; flex-direction: column; text-align: center; gap: 40px; }
    .footer-links { align-items: center; }
    .brand h2 { font-size: 1.3rem; }
    
    .mockup-window { max-width: 100%; width: 100%; margin: 0 auto; }
    .window-body { font-size: 0.8rem; padding: 16px; }
}

@media (max-width: 480px) {
    .hero-headline { font-size: 2.2rem; }
    .glass-nav .nav-inner { flex-direction: column; gap: 8px; }
    .features { padding: 60px 0; }
    .section-header h2 { font-size: 2rem; }
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(17, 24, 39, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-box {
    width: 90%;
    max-width: 420px;
    padding: 32px;
    position: relative;
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: var(--text-main);
}

.modal-overlay.hidden .modal-box {
    transform: scale(0.95);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.25rem;
    color: var(--text-main);
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}

.close-btn:hover {
    color: var(--text-main);
}

.modal-body {
    padding: 24px;
}

.modal-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) inset;
}

.form-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.btn-full {
    width: 100%;
    margin-top: 8px;
}

.success-msg {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 16px;
    border-radius: 8px;
    margin-top: 20px;
    font-weight: 500;
}

.success-msg.hidden {
    display: none;
}

/* Notice Blocking Modal */
#noticeModalOverlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#noticeModalOverlay.hidden {
    opacity: 0;
    pointer-events: none;
}

#noticeModalOverlay .modal-box {
    text-align: center;
}

#noticeModalOverlay h2 {
    color: #92400e;
    margin-bottom: 16px;
}

/* Changelog Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 7px;
    height: 100%;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-marker {
    position: absolute;
    top: 0;
    left: -30px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 4px solid var(--bg-light);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1);
    transform: translateX(-4px);
    z-index: 1;
}

.timeline-content {
    padding: 32px;
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.version-badge {
    background: rgba(5, 150, 105, 0.1);
    color: var(--accent-primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.release-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.changelog-list ul {
    list-style: none;
    margin-top: 12px;
}

.changelog-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.changelog-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
}

.changelog-list li strong {
    color: var(--text-main);
}
