/* Industrial Professional Greys + Smart Theme Toggle */
:root {
    /* Light mode (default for professional feel) */
    --bg: #f8fafc;
    --surface: #ffffff;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --accent: #374151;
    --accent-hover: #1f2937;
    --border: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] {
    /* Dark industrial mode */
    --bg: #0f0f0f;
    --surface: #1a1a1a;
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --accent: #d1d5db;
    --accent-hover: #f3f4f6;
    --border: #374151;
    --shadow: rgba(0, 0, 0, 0.35);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.75;
    font-size: 1.05rem;
    max-width: 980px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Typography */
h1 {
    font-size: 3.8rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

h2 {
    font-size: 2.1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 4rem;
    border-bottom: 1px solid var(--border);
}

.logo {
    font-weight: 800;
    font-size: 1.65rem;
    letter-spacing: -0.03em;
    text-decoration: none;
    color: var(--text-primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2.25rem;
}

.nav-right a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s ease, border-bottom 0.2s ease;
    padding-bottom: 0.25rem;
    border-bottom: 2px solid transparent;
}

.nav-right a:hover {
    color: var(--accent-hover);
    border-bottom-color: var(--accent-hover);
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.theme-toggle:hover {
    background: var(--surface);
    border-color: var(--accent);
}

/* Hero & Buttons */
.hero {
    padding-top: 2rem;
    padding-bottom: 5rem;
}

.tagline {
    font-size: 1.45rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    max-width: 620px;
}

.btn {
    display: inline-block;
    padding: 1rem 2.25rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.primary {
    background: var(--accent);
    color: var(--bg);
}

.primary:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px var(--shadow);
}

.secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--accent);
}

.secondary:hover {
    background: var(--accent);
    color: var(--bg);
}

/* Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

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

.card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 15px 35px var(--shadow);
}

/* Footer */
footer {
    margin-top: 7rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.controls {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
}

.controls label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.controls input,
.controls select {
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.controls input:focus,
.controls select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(55, 65, 81, 0.08);
}

.controls button {
    width: min(100%, 220px);
    margin-top: 0.5rem;
    background: var(--accent);
    color: var(--bg);
    border: none;
    border-radius: 0.85rem;
    padding: 1rem 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.controls button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

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

.scenario-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.04);
}

.scenario-card h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.project-demo {
    margin-top: 2rem;
}

.chart-container {
    width: 100%;
    height: 420px;
    max-height: 60vh;
    margin: 2rem 0 1.8rem 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

canvas {
    max-width: 100% !important;
}


.results-grid {
    margin-top: 1.8rem;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.results-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
}

.results-card h3 {
    margin-bottom: 0.85rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.results-card p {
    color: var(--text-secondary);
    margin: 0.55rem 0;
}

.results p {
    margin: 0;
    color: var(--text-primary);
    font-weight: 600;
}

.nav-right a.active {
    color: var(--text-primary);
    font-weight: 700;
    border-bottom-color: var(--accent);
}

.content {
    max-width: 720px;
    margin-top: 3rem;
    line-height: 1.85;
}

.content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.content p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

.color-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 0.5rem;
    border-radius: 2px;
    vertical-align: middle;
}

.color-indicator.blue {
    background-color: #3b82f6;
}

.color-indicator.red {
    background-color: #ef4444;
}

/* Responsive */
@media (max-width: 640px) {
    h1 { font-size: 2.9rem; }
    .nav-right { gap: 1.25rem; }
}
