/* ==========================================
   Henry Hub Trap 2026 - Main Stylesheet
   Intelligence Report Design System
   ========================================== */

/* CSS Variables */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;

    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;

    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;

    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;

    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;

    --border-color: #374151;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: background var(--transition-base), color var(--transition-base);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader .pulse {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.3;
    }
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Reading Progress */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 101;
    transform-origin: left;
    transition: transform 0.1s linear;
}

/* Theme Toggle - Hidden */
.theme-toggle {
    display: none;
    /* Hidden - Removed theme toggle feature */
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-fast);
    z-index: 90;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

[data-theme="dark"] .sun-icon {
    display: inline;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

[data-theme="light"] .sun-icon {
    display: none;
}

[data-theme="light"] .moon-icon {
    display: inline;
}

/* Main Container */
.report-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    max-width: 1600px;
    margin: 0 auto;
    gap: 3rem;
    padding: 2rem;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.sidebar-header {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.sidebar-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-nav .nav-link {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.sidebar-nav .nav-link:hover {
    background: var(--bg-secondary);
}

.sidebar-nav .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.sidebar-nav .toolkit-link {
    margin-top: 1rem;
    background: var(--warning-color);
    color: white;
    font-weight: 600;
}

/* Metrics Widget */
.metrics-widget {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.metrics-widget h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.metric-item:last-child {
    border-bottom: none;
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.metric-value {
    font-weight: 700;
    color: var(--success-color);
    font-family: var(--font-mono);
}

.metric-value.negative {
    color: var(--danger-color);
}

/* Main Content */
.main-content {
    max-width: 900px;
}

/* Hero Section */
.hero-section {
    margin-bottom: 4rem;
}

.classification-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
    border-radius: 4px;
    margin-bottom: 2rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.report-metadata {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sector-badge {
    background: #dbeafe;
    color: #1e40af;
}

.type-badge {
    background: #fef3c7;
    color: #92400e;
}

.priority-badge {
    background: #fee2e2;
    color: #991b1b;
}

.hero-title {
    margin-bottom: 1.5rem;
}

.title-main {
    display: block;
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-sub {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.hero-abstract {
    margin: 2rem 0;
}

.lead-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Stats Dashboard */
.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.stat-card {
    padding: 2rem;
    border-radius: 12px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-primary {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.stat-warning {
    border-color: var(--warning-color);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.1));
}

.stat-success {
    border-color: var(--success-color);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
}

.stat-danger {
    border-color: var(--danger-color);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-unit {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Sources Banner */
.sources-banner {
    margin-top: 3rem;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
}

.sources-label {
    font-weight: 600;
    color: var(--text-secondary);
    margin-right: 1rem;
}

.source-logos {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.source-tag {
    padding: 0.375rem 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Section Main */
.section-main {
    margin-bottom: 5rem;
    padding-top: 2rem;
}

.section-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 900;
}

.section-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
}

.reading-time,
.section-priority {
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    font-weight: 500;
}

/* Content Blocks */
.content-block {
    margin-bottom: 2rem;
}

.lead-paragraph {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.highlight-block {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
}

.block-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.check-list,
.arrow-list,
.detailed-list {
    list-style: none;
    padding-left: 0;
}

.check-list li::before {
    content: "✓ ";
    color: var(--success-color);
    font-weight: 700;
    margin-right: 0.5rem;
}

.arrow-list li::before {
    content: "→ ";
    color: var(--primary-color);
    font-weight: 700;
    margin-right: 0.5rem;
}

.detailed-list li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.detailed-list li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Grids */
.content-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

.stats-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Alert Boxes */
.alert-box {
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid;
    margin: 2rem 0;
}

.alert-box.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--warning-color);
}

.alert-box.info {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--info-color);
}

.alert-box h5 {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

/* Timeline */
.timeline-block {
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.timeline-events {
    position: relative;
    padding-left: 2rem;
}

.timeline-events::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-event {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 2rem;
}

.timeline-event::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid var(--bg-secondary);
}

.timeline-event.crisis::before {
    background: var(--danger-color);
}

.timeline-event.recovery::before {
    background: var(--warning-color);
}

.timeline-event.milestone::before {
    background: var(--success-color);
}

.event-date {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
}

.data-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.total-row {
    background: var(--bg-tertiary);
    font-weight: 700;
}

.status-startup {
    color: var(--warning-color);
    font-weight: 600;
}

.status-ramp {
    color: var(--info-color);
    font-weight: 600;
}

.status-operational {
    color: var(--success-color);
    font-weight: 600;
}

/* CTA Buttons */
.next-section-cta {
    margin: 3rem 0;
    padding: 2rem;
    text-align: center;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    margin-top: 1rem;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* Footer */
.report-footer {
    margin-top: 5rem;
    padding: 3rem 0;
    border-top: 2px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 1024px) {
    .report-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        top: 0;
        max-height: none;
    }

    .content-grid-2,
    .stats-grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .title-main {
        font-size: 2rem;
    }

    .title-sub {
        font-size: 1.25rem;
    }

    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .stats-dashboard {
        grid-template-columns: 1fr;
    }
}