/* ===== Kampfire Digital — Shared Design Tokens =====
   Used by /services/*, /case-studies/nrg/, /about/, /contact/, /404.html.
   The live homepage (index.html) keeps its own inline CSS — these tokens
   must stay in sync with the homepage :root block. */

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

:root {
    --bg: #0B0B12;
    --bg-card: #12121E;
    --bg-card-hover: #1A1A2A;
    --border-card: rgba(255,255,255,0.06);
    --border-card-strong: rgba(255,255,255,0.12);
    --primary: #E97451;
    --primary-dark: #C4572B;
    --primary-light: #F09070;
    --accent: #4ade80;
    --warn: #F5A623;
    --text: #E0E0E8;
    --text-muted: #8888A0;
    --text-dim: #5a5a70;
    --white: #FFFFFF;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --max-width: 1100px;
    --radius: 12px;
    --radius-sm: 6px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 1rem;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle grid background — matches homepage */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 40px 40px;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

/* ===== HEADER ===== */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 11, 18, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-card);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--white);
    text-decoration: none;
    font-size: 0.95rem;
}

.logo img { display: block; }

header nav ul {
    display: flex;
    gap: 1.75rem;
    list-style: none;
}

header nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

header nav a:hover,
header nav a.active { color: var(--white); }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-nav {
    display: none;
    position: fixed;
    inset: 60px 0 0 0;
    background: rgba(11,11,18,0.97);
    backdrop-filter: blur(14px);
    z-index: 99;
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 1.25rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 1.1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-card);
}

/* ===== TYPE ===== */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--white);
    letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
h2 span, h1 span { color: var(--primary); }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--primary-light); }
a:hover { color: var(--primary); }

.section-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--primary);
    margin-bottom: 1rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
}
.btn-primary {
    background: var(--primary);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(233,116,81,0.3);
    color: var(--white);
}
.btn-outline {
    border-color: var(--border-card-strong);
    color: var(--text);
    background: transparent;
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--white);
}

/* ===== SECTIONS ===== */
section {
    padding: 5rem 0;
    position: relative;
    z-index: 1;
}
section:first-of-type { padding-top: 3.5rem; }

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-header h2 { margin: 0 auto 1rem; max-width: 720px; }
.section-header p {
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* ===== CARDS / BLOCKS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius);
    padding: 2rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover {
    border-color: var(--border-card-strong);
    transform: translateY(-2px);
}

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

/* ===== PAIN POINTS / FEATURE LIST ===== */
.feature-list {
    list-style: none;
    display: grid;
    gap: 1rem;
}
.feature-list li {
    padding-left: 1.75rem;
    position: relative;
}
.feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
}

.pain-block {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-left: 3px solid var(--primary);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-sm);
    margin: 0.75rem 0;
}
.pain-block .pain-quote {
    font-style: italic;
    color: var(--text);
    margin-bottom: 0.5rem;
}
.pain-block .pain-source {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== STATS ===== */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
}
.stat-value {
    font-family: var(--font-mono);
    font-size: 2rem;
    color: var(--primary);
    font-weight: 700;
    line-height: 1;
}
.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ===== FORM ===== */
.form {
    display: grid;
    gap: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius);
    padding: 2rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.form-group input,
.form-group select,
.form-group textarea {
    background: var(--bg);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 0.75rem 0.9rem;
    font-family: inherit;
    font-size: 0.95rem;
}
.form-group textarea { resize: vertical; min-height: 110px; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* ===== CTA BLOCK ===== */
.cta-block {
    background: linear-gradient(135deg, rgba(233,116,81,0.08), rgba(233,116,81,0.02));
    border: 1px solid var(--border-card-strong);
    border-radius: var(--radius);
    padding: 2.5rem;
    text-align: center;
    margin: 3rem 0;
}
.cta-block h2 { margin-bottom: 0.75rem; }
.cta-block p {
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 1.5rem;
}

/* ===== PROSE (long-form copy on pages) ===== */
.prose { max-width: 720px; margin: 0 auto; }
.prose p { margin-bottom: 1.25rem; }
.prose h2 { margin-top: 3rem; margin-bottom: 1rem; }
.prose h3 { margin-top: 2rem; }
.prose ul { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.prose ul li { margin-bottom: 0.5rem; }
.prose strong { color: var(--white); }

/* ===== FOOTER ===== */
footer {
    border-top: 1px solid var(--border-card);
    padding: 2.5rem 0;
    position: relative;
    z-index: 1;
}
.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.footer-links a {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--primary-light); }
.footer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-card);
}
.footer-meta span {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.footer-meta a {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
}
.footer-meta a:hover { color: var(--white); }

/* ===== BREADCRUMB ===== */
.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-family: var(--font-mono);
}
.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}
.breadcrumb a:hover { color: var(--primary); }

/* ===== UTILITY ===== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mb-2 { margin-bottom: 2rem; }
.mt-2 { margin-top: 2rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    header nav { display: none; }
    .hamburger { display: flex; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    section { padding: 3.5rem 0; }
    .cta-block { padding: 2rem 1.5rem; }
    .footer-meta {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    .footer-links { justify-content: center; }
}

@media (max-width: 480px) {
    .stats { grid-template-columns: 1fr; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
}
