@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* 1. Design System & Aesthetics */
    /* Background: Deep Gunmetal/Slate */
    --bg-app: #0f172a;
    --bg-panel: #1e293b;
    --bg-glass: rgba(15, 23, 42, 0.8);

    /* Text */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Accents */
    --accent-blue: #3b82f6;
    /* Primary Actions */
    --accent-green: #10b981;
    /* Good/Cheap */
    --accent-rose: #f43f5e;
    /* Expensive */
    --border-subtle: #334155;

    /* Typography */
    --font-sans: 'Inter', system-ui, sans-serif;

    /* Spacing & Radii */
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --header-height: 4rem;
}

body {
    background-color: var(--bg-app);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.8;
}

/* 3. Component Spec: Sticky Top Nav Glassmorphism */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-height);
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    padding: 0 2rem;
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    /* Wider for SaaS look */
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-btn {
    background: var(--accent-blue);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Layout - Page Wrapper */
.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    /* Pushes footer down */
}

/* Layout - Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
    box-sizing: border-box;
}

/* Utilities (Replacing Bootstrap) */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.py-4 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.text-white {
    color: white;
}

.text-secondary {
    color: var(--text-secondary);
}

.text-sm {
    font-size: 0.875rem;
}

.text-blue {
    color: var(--accent-blue);
}

/* 3B: Hero Section */
.hero {
    text-align: center;
    padding: 6rem 1rem 4rem 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;

    /* Standard Gradient Text */
    background: linear-gradient(to right, #ffffff 20%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    /* Fallback */
    display: inline-block;
    /* Fix box rendering */
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

/* Action Button */
.btn-audit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-green);
    color: white;
    font-family: var(--font-mono);
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 0 rgba(27, 31, 35, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: all 0.2s cubic-bezier(0.3, 0, 0.5, 1);
}

.btn-audit:hover {
    background: #2ea043;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46, 160, 67, 0.4);
    /* Glow on hover */
}

/* Global Slider */
.slider-container {
    background: var(--bg-panel);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.contacts-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: block;
    font-weight: 600;
}

.contacts-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-blue);
    display: block;
    margin-bottom: 1rem;
}

/* Inputs & Sliders */
.range-slider {
    width: 100%;
    margin: var(--space-md) 0;
    accent-color: var(--accent-blue);
    cursor: pointer;
}

input[type=range] {
    width: 100%;
    height: 6px;
    background: var(--border-subtle);
    border-radius: 99px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-blue);
    cursor: pointer;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3);
    transition: transform 0.1s;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}


/* 3C: Audit Grid */
.audit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding-top: 2rem;
    padding-bottom: 4rem;
    /* Ensure space for scrolling past bottom cards */
}

.tool-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.tool-card:hover {
    transform: translateY(-2px);
    border-color: var(--text-secondary);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.card-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #fff;
    object-fit: contain;
    padding: 6px;
    /* Professional spacing for icon */
}

/* Placeholder styling */
.category-badge {
    font-size: 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-weight: 600;
}

.card-middle h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card-middle p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 1.5rem;
}

.card-bottom {
    border-top: 1px solid var(--border-subtle);
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.price-good {
    color: var(--accent-green);
}

.price-bad {
    color: var(--accent-rose);
}

/* Blazor Error UI */
#blazor-error-ui {
    background: var(--accent-rose);
    color: white;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    /* Keep hidden until real error occurs - Blazor toggles this to block */
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* 4. Article Content (Rich Text) Typography */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    color: white;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content h2 {
    font-size: 1.75rem;
    /* 2xl */
    font-weight: 700;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.5rem;
}

.article-content h3 {
    font-size: 1.5rem;
    /* xl */
    font-weight: 600;
    color: var(--accent-blue);
}

.article-content h4 {
    font-size: 1.25rem;
    /* lg */
    font-weight: 600;
}

.article-content p {
    margin-bottom: 1.5rem;
    line-height: 1.75;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.article-content strong {
    color: white;
    font-weight: 600;
}