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

:root {
    --primary: #003B73;
    --primary-light: #004f99;
    --primary-dark: #00254a;
    --secondary: #FF7A00;
    --secondary-hover: #e06c00;
    --accent: #2E8B57;
    --accent-light: #3cb371;
    --bg-main: #ffffff;
    --bg-section: #f4f7fa;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --card-shadow: 0 4px 20px -2px rgba(0, 59, 115, 0.08), 0 2px 8px -1px rgba(0, 0, 0, 0.04);
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 12px;
}

[data-theme="dark"] {
    --primary: #3b82f6;
    --primary-light: #60a5fa;
    --primary-dark: #1d4ed8;
    --secondary: #ff983d;
    --secondary-hover: #ffad66;
    --accent: #10b981;
    --accent-light: #34d399;
    --bg-main: #0b0f19;
    --bg-section: #111827;
    --bg-card: #1f2937;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #374151;
    --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--primary);
}

[data-theme="dark"] h1, 
[data-theme="dark"] h2, 
[data-theme="dark"] h3, 
[data-theme="dark"] h4 {
    color: var(--text-main);
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* Header & Navigation */
header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    transition: background 0.3s, border-color 0.3s;
}

[data-theme="dark"] header {
    background: rgba(11, 15, 25, 0.85);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
    text-decoration: none;
}

.logo span {
    color: var(--secondary);
}

nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

nav a:hover {
    color: var(--secondary);
}

.theme-toggle-btn {
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    background: var(--bg-section);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    border: none;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

[data-theme="dark"] .btn-outline {
    border-color: var(--primary-light);
    color: var(--primary-light);
}

[data-theme="dark"] .btn-outline:hover {
    background: var(--primary-light);
    color: white;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 8rem 2rem;
    background: radial-gradient(circle at 10% 20%, rgba(0, 59, 115, 0.05) 0%, rgba(255, 122, 0, 0.03) 90%), var(--bg-main);
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-content .subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    line-height: 1.5;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-visual {
    position: relative;
    border-radius: var(--radius);
    background: var(--bg-card);
    padding: 2rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.hero-overlay-chart {
    height: 300px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 1rem;
    padding-top: 2rem;
}

.hero-chart-bar {
    width: 45px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 4px 4px 0 0;
    position: relative;
    animation: bar-grow 1.5s ease-out forwards;
    transform-origin: bottom;
}

.hero-chart-bar:nth-child(even) {
    background: linear-gradient(180deg, var(--secondary) 0%, var(--secondary-hover) 100%);
}

.hero-chart-bar::after {
    content: attr(data-label);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--text-muted);
}

.hero-chart-bar::before {
    content: attr(data-value);
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-main);
}

@keyframes bar-grow {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

/* Sections General */
section {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* Cards & Layout Grid */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
}

/* Why Cost Analysis Matters Infographic */
.tco-infographic {
    background: linear-gradient(135deg, rgba(0, 59, 115, 0.02) 0%, rgba(255, 122, 0, 0.02) 100%), var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.tco-bar-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tco-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tco-label {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.tco-bar-track {
    height: 35px;
    background: var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
}

.tco-bar-segment {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    transition: var(--transition);
}

.segment-purchase { background: var(--secondary); }
.segment-labor { background: var(--primary); }
.segment-air { background: #475569; }
.segment-maintenance { background: #0ea5e9; }
.segment-waste { background: #b91c1c; }

/* Interactive Calculator */
.calc-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
}

.calc-inputs {
    padding: 3rem;
    border-right: 1px solid var(--border-color);
    background: var(--bg-section);
}

.calc-outputs {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 59, 115, 0.15);
}

.output-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.output-card {
    background: var(--bg-section);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
}

.output-card label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.output-value {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
}

.output-value.highlight {
    color: var(--accent);
}

.alternative-media-box {
    border: 1px dashed var(--accent);
    background: rgba(46, 139, 87, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
}

.alternative-media-box h4 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

/* Database Comparison Cards */
.db-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.db-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.db-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary);
}

.db-card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.db-card-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.db-spec-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.db-spec-value {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text-main);
}

.db-score {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-section);
    padding: 0.75rem 1rem;
    border-radius: 8px;
}

.db-score-val {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--secondary);
}

/* Abrasive Lifecycle Analysis Stages */
.lifecycle-flow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    position: relative;
    padding: 2rem 0;
}

.lifecycle-node {
    background: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: 50%;
    width: 110px;
    height: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.lifecycle-node:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.lifecycle-node h4 {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    color: inherit;
}

.lifecycle-node svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
    color: var(--primary);
}

.lifecycle-node:hover svg {
    color: white;
}

/* Comparison Center Tab styles */
.comp-tabs-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.tab-btn.active, .tab-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.comp-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow-x: auto;
    box-shadow: var(--card-shadow);
}

.comp-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
    text-align: left;
}

.comp-table th, .comp-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.comp-table th {
    background: var(--bg-section);
    font-weight: 700;
    color: var(--primary);
}

/* Pillar Content Tabs & Layout */
.pillar-tabs {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.pillar-nav {
    display: flex;
    overflow-x: auto;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    gap: 1.5rem;
}

.pillar-nav-item {
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: var(--transition);
}

.pillar-nav-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.pillar-pane {
    display: none;
    max-width: 900px;
    margin: 0 auto;
}

.pillar-pane.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

/* Benchmarks Grid */
.benchmark-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.benchmark-card:hover {
    border-color: var(--primary);
}

.benchmark-card h3 {
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.benchmark-card .badge {
    background: rgba(0, 59, 115, 0.08);
    color: var(--primary);
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

[data-theme="dark"] .benchmark-card .badge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

/* Accordion for Cost Breakdown */
.accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.accordion-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.accordion-trigger {
    background: var(--bg-section);
    width: 100%;
    text-align: left;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
    background: var(--bg-card);
}

.accordion-item.active .accordion-content {
    max-height: 1000px;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Resource Center */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.resource-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.resource-card:hover {
    transform: translateY(-3px);
}

.resource-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Article grid */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-img {
    height: 180px;
    background: #003B73;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
}

.article-body {
    padding: 1.5rem;
}

.article-tag {
    display: inline-block;
    background: rgba(255, 122, 0, 0.1);
    color: var(--secondary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.article-body h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.article-body p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.article-readmore {
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: #0b0f19;
    color: #94a3b8;
    padding: 6rem 2rem 2rem;
    border-top: 1px solid #1e293b;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr);
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-logo span {
    color: var(--secondary);
}

.footer-col h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid #1e293b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsiveness */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .calc-container {
        grid-template-columns: 1fr;
    }
    .calc-inputs {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }
    .grid-4 {
        grid-template-columns: 1fr 1fr;
    }
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .grid-2 {
        grid-template-columns: 1fr;
    }
    .grid-3 {
        grid-template-columns: 1fr;
    }
    .grid-4 {
        grid-template-columns: 1fr;
    }
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    .lifecycle-flow {
        justify-content: center;
    }
}
