:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #ec4899;
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-main: #0f172a;
    --text-muted: #475569;
    --border-color: rgba(0, 0, 0, 0.1);
    
    --radius: 12px;
    --radius-lg: 24px;
    
    --font-main: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}
h1 span {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
}
h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
p {
    margin-bottom: 1rem;
}
.lead, .subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-muted);
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.5rem;
    font-weight: 900;
    text-decoration: none;
    color: var(--text-main);
    letter-spacing: -1px;
}
.logo span {
    color: var(--primary);
}

/* Nav */
.nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}
.nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}
.nav a:hover {
    color: var(--text-main);
}
.nav-toggle, .nav-toggle-label {
    display: none;
}

/* Layout Utilities */
.grid {
    display: grid;
    gap: 2rem;
}
.cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.mt-x {
    margin-top: 4rem;
}

/* Cards & Glassmorphism */
.card, .glass-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    backdrop-filter: blur(10px);
}
.hover-up {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s;
}
.hover-up:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}
.hover-border {
    transition: border-color 0.3s;
}
.hover-border:hover {
    border-color: var(--secondary);
}

/* Sections */
.hero {
    padding: 6rem 0 4rem;
    text-align: center;
}
.hero-content {
    max-width: 800px;
}

/* Simulator Form */
.simulator-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}
input, select {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}
input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Results Panel */
.results-panel {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(236, 72, 153, 0.1));
    border-radius: var(--radius);
    padding: 2rem;
    margin-top: 2rem;
    border: 1px solid var(--primary);
}
.budget-total {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
}

/* Button */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: opacity 0.2s;
    cursor: pointer;
    border: none;
}
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    opacity: 0.9;
}
.btn-block {
    display: block;
    width: 100%;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
.table th, .table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.table th {
    font-weight: 600;
    color: var(--text-muted);
}

/* Graphic bars */
.bar-chart {
    width: 100%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 1rem;
    display: flex;
}
.bar-segment {
    height: 100%;
    transition: width 0.5s ease;
}

/* Footer */
.footer {
    background: #e2e8f0;
    padding: 4rem 0 2rem;
    margin-top: 5rem;
    border-top: 1px solid var(--border-color);
}
.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}
.footer h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}
.footer ul {
    list-style: none;
}
.footer ul li {
    margin-bottom: 0.5rem;
}
.footer a {
    color: var(--text-muted);
    text-decoration: none;
}
.footer a:hover {
    color: var(--secondary);
}
.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(248, 250, 252, 0.95);
        backdrop-filter: blur(10px);
        padding: 1rem;
        flex-direction: column;
        border-bottom: 1px solid var(--border-color);
    }
    .nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    .nav-toggle:checked ~ .nav {
        display: flex;
    }
    .nav-toggle-label {
        display: block;
        cursor: pointer;
        padding: 0.5rem;
    }
    .nav-toggle-label span {
        display: block;
        width: 25px;
        height: 3px;
        background: var(--text-main);
        position: relative;
    }
    .hero { padding: 3rem 0; }
}
