:root {
    --space-dark: #1a1410;
    --space-mid: #2a2218;
    --titan-surface: #b08038;
    --titan-surface-light: #d4b070;
    --titan-surface-dark: #8a6a30;
    --titan-dune: #a08040;
    --titan-ice: #7aacd0;
    --titan-haze: #c4a880;
    --titan-bg: #ece4d4;
    --white: #ffffff;
    --text: #0d0a08;
    --text-muted: #3a2a1a;
    --text-light: #5a4a32;
    --border: #d4c8b4;
    --card-bg: rgba(236, 228, 212, 0.85);
    --card-border: rgba(196, 148, 74, 0.2);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --glow: 0 0 20px rgba(196, 148, 74, 0.1);
    --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', 'Courier New', monospace;

    --ice-blue: var(--titan-ice);
    --ice-blue-light: #9ac4e0;
    --ice-blue-dark: #4a8aaa;
    --cyan-accent: var(--titan-ice);
    --cyan-deep: #5a9abb;

    --titan-gold: var(--titan-surface);
    --titan-gold-light: var(--titan-surface-light);
    --titan-gold-dark: var(--titan-surface-dark);
    --saturn-amber: var(--titan-dune);
    --titan-orange: var(--titan-dune);
    --titan-haze: var(--titan-haze);
}

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

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-image: linear-gradient(rgba(236, 228, 212, 0.65), rgba(236, 228, 212, 0.65)), url('assets/titan-infrared-global.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
}

/* ── Header ─────────────────────────────────────────── */
header {
    background: linear-gradient(180deg, var(--space-dark) 0%, rgba(26, 20, 16, 0.97) 100%);
    border-bottom: 3px solid var(--titan-surface);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.header-brand {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.header-logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--titan-surface);
    text-shadow: 0 0 20px rgba(196, 148, 74, 0.25);
}

.header-subtitle {
    font-size: 0.85rem;
    opacity: 0.75;
    font-weight: 400;
    color: #b8a888;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

nav a {
    color: #b8a888;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.2s;
}

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

/* ── Hero ───────────────────────────────────────────── */
.hero {
    background: linear-gradient(180deg, #1a1410 0%, #2a2218 20%, #6a5a42 45%, #b8a888 70%, #ece4d4 100%);
    color: var(--text);
    padding: 6rem 2rem 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse 500px 300px at 50% 20%, rgba(196, 148, 74, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 400px 200px at 30% 60%, rgba(122, 172, 208, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 300px 150px at 70% 75%, rgba(212, 176, 112, 0.12) 0%, transparent 50%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(0deg, rgba(236, 228, 212, 0.92) 0%, transparent 100%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 5rem;
    font-weight: 900;
    letter-spacing: 8px;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--titan-surface), var(--titan-dune));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.8rem;
    color: var(--titan-surface-light);
    margin-bottom: 1.5rem;
    font-weight: 300;
    letter-spacing: 4px;
}

.hero-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0d0a08;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.85;
    text-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* ── Layout ─────────────────────────────────────────── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

h2 {
    font-size: 2.2rem;
    color: var(--text);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    font-weight: 800;
    letter-spacing: 1px;
}

.accent-bar {
    display: inline-block;
    width: 10px;
    height: 32px;
    background: linear-gradient(180deg, var(--titan-surface), var(--titan-surface-dark));
    margin-right: 16px;
    border-radius: 2px;
    flex-shrink: 0;
}

.section-intro {
    font-size: 1.15rem;
    color: #3a2a1a;
    margin-bottom: 2.5rem;
    line-height: 1.9;
}

/* ── E-E-A-T Header ─────────────────────────────────── */
.eeat-header {
    border-bottom: 1px solid var(--border);
    padding-top: 1.5rem !important;
    padding-bottom: 1rem !important;
    font-size: 0.85rem;
    color: #3a2a1a;
    line-height: 1.5;
}

.eeat-header strong {
    color: var(--titan-surface-dark);
}

/* ── Cards ──────────────────────────────────────────── */
.cards-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 2rem;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(196, 148, 74, 0.12);
}

.card h3 {
    color: var(--ice-blue-dark);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.card p {
    color: #2a1a0a;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ── Comparison Section ─────────────────────────────── */
.compare-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.compare-row {
    display: grid;
    grid-template-columns: 200px 1fr 1fr;
    gap: 16px;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow);
}

.compare-row:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(196, 148, 74, 0.08);
}

.compare-param {
    font-weight: 700;
    color: var(--titan-surface-dark);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.compare-cell {
    font-size: 0.95rem;
    line-height: 1.5;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.compare-cell.titan {
    color: var(--titan-surface-dark);
    border-left: 3px solid var(--titan-surface);
}

.compare-cell.mars {
    color: #3a2a1a;
    border-left: 3px solid #b0c8d8;
}

.compare-cell .highlight {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.compare-cell .titan-win {
    background: rgba(196, 148, 74, 0.15);
    color: var(--titan-surface-dark);
}

.compare-cell .mars-win {
    background: rgba(160, 140, 120, 0.12);
    color: var(--text-muted);
}

.compare-cell .draw {
    background: rgba(196, 148, 74, 0.08);
    color: var(--titan-dune);
}

.compare-cell small {
    display: block;
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 2px;
}

/* ── Graphics Section ───────────────────────────────── */
.graphics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.graphic-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow);
}

.graphic-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(196, 148, 74, 0.12);
}

.graphic-svg {
    width: 100%;
    display: block;
    background: #070b15;
}

.graphic-card figcaption {
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    color: #2a1a0a;
    border-top: 1px solid var(--border);
    line-height: 1.5;
}

.graphic-card figcaption strong {
    color: var(--ice-blue-dark);
}

/* ── Resources Section ──────────────────────────────── */
.resource-flow {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 2rem;
}

.resource-step {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow);
}

.resource-step::after {
    content: '→';
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--titan-surface);
    font-size: 1.5rem;
    font-weight: 700;
}

.resource-step:last-child::after {
    display: none;
}

.resource-step h4 {
    color: var(--ice-blue-dark);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.resource-step p {
    font-size: 0.85rem;
    color: #2a1a0a;
}

/* ── Tables ─────────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

.data-table th {
    background: var(--space-dark);
    color: var(--titan-surface-light);
    padding: 12px 16px;
    text-align: left;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--titan-surface);
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: #2a1a0a;
    font-size: 0.95rem;
    background: var(--card-bg);
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.95);
}

.data-table .titan-highlight td {
    border-left: 3px solid var(--titan-surface);
}

/* ── Inline info boxes ──────────────────────────────── */
.info-box {
    margin-top: 2.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.info-box h3 {
    color: var(--ice-blue-dark);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

strong[style*="titan-surface"] {
    background: rgba(13, 10, 8, 0.12);
    padding: 0.08rem 0.35rem;
    border-radius: 3px;
    font-weight: 700;
    color: #5a3a12 !important;
}

.info-box p {
    color: #2a1a0a;
    font-size: 0.95rem;
    line-height: 1.8;
}

/* ── Lists ──────────────────────────────────────────── */
.check-list {
    list-style: none;
    margin: 1.5rem 0;
}

.check-list li {
    padding: 0.5rem 0 0.5rem 2rem;
    position: relative;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--titan-surface);
    font-weight: 700;
}

/* ── Footer ─────────────────────────────────────────── */
footer {
    background: var(--space-dark);
    color: var(--text-light);
    text-align: center;
    padding: 2.5rem 2rem;
    border-top: 1px solid rgba(200, 220, 232, 0.15);
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

footer strong {
    color: var(--ice-blue-light);
}

.footer-credits {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(200, 220, 232, 0.12);
    font-size: 0.72rem;
    line-height: 1.7;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.footer-credits p {
    margin-bottom: 0.3rem;
    color: rgba(200, 220, 232, 0.5);
}

.footer-credits strong {
    color: rgba(200, 220, 232, 0.7);
    font-size: 0.75rem;
}

.footer-credits a {
    color: rgba(196, 148, 74, 0.6);
    text-decoration: none;
}

.footer-credits a:hover {
    color: var(--titan-surface);
    text-decoration: underline;
}

/* ── Lightbox ───────────────────────────────────────── */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.lightbox:target {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2.5rem;
    font-weight: 300;
    text-decoration: none;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

.graphic-card img {
    cursor: zoom-in;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-content h1 {
        font-size: 3rem;
        letter-spacing: 4px;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .cards-three {
        grid-template-columns: 1fr;
    }

    .compare-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 1rem;
    }

    .compare-param {
        font-size: 0.8rem;
        border-bottom: 1px solid var(--border);
        padding-bottom: 0.5rem;
    }

    .graphics-grid {
        grid-template-columns: 1fr;
    }

    .resource-flow {
        grid-template-columns: 1fr 1fr;
    }

    .resource-step::after {
        display: none;
    }

    nav ul {
        gap: 12px;
    }

    nav a {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }

    .resource-flow {
        grid-template-columns: 1fr;
    }
}
