﻿:root {
    --bg-color: #121418; /* Very dark grey, almost black */
    --text-color: #e0e0e0; /* Light grey text for readability */
    --primary-dark: #ffffff; /* Buttons become white to pop */
    --primary-text-on-btn: #121418; /* Button text becomes dark */

    /* Map Colors */
    --accent-green: #4ade80;
    --accent-yellow: #facc15;
    --accent-orange: #fb923c;
    --accent-red: #f87171;
    --gradient: linear-gradient(90deg, #4ade80, #facc15, #fb923c, #f87171);
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    /* The CSS Grid Pattern */
    background-color: var(--bg-color);
    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; /* Size of the grid squares */
}

/* Utility */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-dark);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* Navigation */
nav {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px; /* Adds space if they do stack */
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

/* Hero Section */
.hero {
    padding: 60px 0 80px;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--primary-dark);
}

#hero-subheader {
    font-size: 1.25rem;
    color: #999;
    max-width: 700px;
    margin: 0 auto 40px;
}

.screenshot-container {
    position: relative;
    margin-top: 50px;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    line-height: 0;
}

/* Mimic a browser window */
.browser-header {
    height: 30px;
    background: #999;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    padding-left: 15px;
    gap: 6px;
    margin-bottom: 0;
}

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

.dot.red {
    background: #f87171;
}

.dot.orange {
    background: #fb923c;
}

.dot.yellow {
    background: #facc15;
}

.dot.green {
    background: #4ade80;
}

.screenshot-img {
    width: 100%;
    height: auto;
    border-radius: 0 0 8px 8px;
    display: block;
}

/* Features Grid */
.features {
    padding: 80px 0 100px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

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

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

.card {
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #eee;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    border-color: #ddd;
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 20px;
}

.card h3 {
    margin-bottom: 15px;
}

/* Deep Dive / Explain Section */
.explanation {
    padding: 80px 0;
    color: white;
}

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

.explanation h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.explanation-box {
    background: rgba(255,255,255,0.05); /* Semi-transparent */
    padding: 30px;
    border-radius: 12px;
    border-left: 5px solid var(--accent-yellow);
}

.example-time {
    font-family: monospace;
    background: rgba(0,0,0,0.3);
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--accent-green);
}

/* Footer */
footer {
    background: #111;
    color: #777;
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* ADJUSTMENT FOR BUTTONS IN DARK MODE */
.btn {
    background-color: var(--primary-dark);
    color: var(--primary-text-on-btn); /* Dark text on white button */
}

/* ADJUSTMENT FOR CARDS IN DARK MODE */
.feature-card, .example-section {
    background: #1e2025; /* Slightly lighter than background */
    border: 1px solid #2d3038;
}

.spectrum-legend {
    width: 100%;
    max-width: 500px; /* Keep it compact */
    margin: 25px auto 0;
    text-align: center;
}

.legend-title {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-color);
    opacity: 0.9;
}

.spectrum-bar {
    width: 100%;
    height: 10px;
    border-radius: 20px;
    background: linear-gradient(90deg, #4ade80, #facc15, #fb923c, #f87171);
    margin-bottom: 8px;
}

.legend-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-color);
    opacity: 0.8;
}

.legend-note {
    margin-bottom: 8px;
    font-size: 0.75rem; /* Very small text */
    color: var(--text-color);
    opacity: 0.5; /* Dimmed text */
    font-style: italic;
}

#select-city-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(6px);
    z-index: 9998;
    display: none;
}

#select-city-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(24,24,28,0.9);
    padding: 30px 40px;
    border-radius: 8px;
    z-index: 9999;
    text-align: center;
    width: 320px;
    display: none;
    color: white;
}

#select-city-window a {
    margin: 10px;
    width: 150px;
}

@media (max-width: 600px) {
    nav {
        padding: 10px 0;
        align-items: center; /* Ensures vertical alignment */
    }

    /* 1. Force the Logo Image to shrink */
    /* We use !important to override the HTML width="68" attribute */
    .logo-fixed {
        width: 35px !important;
        height: auto !important;
    }

    /* 2. Shrink the Logo Text */
    .logo {
        font-size: 1.1rem; /* Make text smaller */
        gap: 6px; /* Bring text closer to image */
    }

    /* 3. Fix the Button (The most important part) */
    .btn {
        padding: 8px 14px; /* Smaller padding */
        font-size: 0.85rem; /* Smaller font */
        white-space: nowrap; /* CRITICAL: Forces "Launch App" to stay on one line */
        width: auto; /* Prevent full width stretching */
    }
}
@media (max-width: 350px) {
    /* Hide the word "Spectrum" so the layout doesn't break on tiny phones */
    .logo span {
        display: none;
    }
}

@media (max-width: 900px) {
    /* 1. Stack the columns vertically instead of side-by-side */
    .explanation-content {
        grid-template-columns: 1fr; /* Change from 1fr 1fr to just 1fr */
        gap: 30px; /* Reduce the gap between text and box */
    }

    /* 2. Reduce the massive vertical padding */
    .explanation {
        padding: 40px 0; /* Down from 80px */
    }

    /* 3. Make the big Title fit on mobile screens */
    .explanation h2 {
        font-size: 1.8rem; /* Down from 2.5rem */
        line-height: 1.2;
    }

    /* 4. Fix the Example Box text size */
    .explanation-box {
        padding: 20px; /* Slightly less padding inside the box */
    }

    /* Optional: Ensure the "Example Scenario" header doesn't wrap awkwardly */
    .explanation-box h3 {
        font-size: 1.2rem;
    }
}
