/* ── Terminal Luxe Design System — Agency Website Edition ────────── */
/* Extended from the proposal system. All proposal components preserved. */

:root {
    /* Dark mode (default) — warm charcoal, aged phosphor */
    --bg-primary: #1a1612;
    --bg-secondary: #211e19;
    --bg-tertiary: #2a2520;
    --text-primary: #d4cdc4;
    --text-secondary: #9a918a;
    --text-muted: #6e6560;
    --border: #3a332c;
    --accent: #c4a44a;
    --accent-dim: color-mix(in srgb, var(--accent) 10%, transparent);
    --accent-glow: color-mix(in srgb, var(--accent) 25%, transparent);
    --amber: #c9a84c;
    --red: #b85a5a;
    --blue: #6a9ab8;
    --green: #7a9a6a;
    --shadow: #0d0a08;
    --font-display: "Chakra Petch", sans-serif;
    --font-data: "JetBrains Mono", monospace;
    --font-body: "IBM Plex Sans", sans-serif;
    --noise-opacity: 0.035;
}

/* ── Light Mode ────────────────────────────────────────────────── */

body.light-theme {
    --bg-primary: #f2ece4;
    --bg-secondary: #e8e0d6;
    --bg-tertiary: #ddd4c8;
    --text-primary: #2c2520;
    --text-secondary: #5a524a;
    --text-muted: #8a8078;
    --border: #c8bfb4;
    --accent: #8a6e2a;
    --accent-dim: color-mix(in srgb, var(--accent) 8%, transparent);
    --accent-glow: color-mix(in srgb, var(--accent) 15%, transparent);
    --amber: #8a6e2a;
    --red: #8a4040;
    --blue: #4a7a9a;
    --green: #5a7a4a;
    --shadow: #b8b0a4;
    --noise-opacity: 0.025;
}

/* ── Reset ──────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ── Noise Texture Overlay ─────────────────────────────────────── */

body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9997;
    opacity: var(--noise-opacity);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
    background-size: 256px 256px;
}

/* ── CRT Overlays ──────────────────────────────────────────────── */

.scanline-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0, 0, 0, 0.015) 3px,
        rgba(0, 0, 0, 0.015) 6px
    );
}

.dot-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.02;
    background-image: radial-gradient(circle, var(--text-muted) 1px, transparent 1px);
    background-size: 28px 28px;
}

/* ── CRT Boot Animation ───────────────────────────────────────── */

@keyframes crt-boot {
    0% { clip-path: inset(50% 0); opacity: 0; }
    20% { clip-path: inset(48% 0); opacity: 0.3; }
    40% { clip-path: inset(30% 0); opacity: 0.6; }
    60% { clip-path: inset(10% 0); opacity: 0.8; }
    80% { clip-path: inset(2% 0); opacity: 0.95; }
    100% { clip-path: inset(0 0); opacity: 1; }
}

body {
    animation: crt-boot 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ── Layout ─────────────────────────────────────────────────────── */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

@media (max-width: 640px) {
    .section { padding: 48px 0; }
}

/* ── Scroll Reveal ──────────────────────────────────────────────── */

[data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ── Navigation ─────────────────────────────────────────────────── */

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 32px;
    height: 60px;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 2px;
    flex-shrink: 0;
}

.nav-logo:hover { text-decoration: none; }

.logo-bracket {
    color: var(--text-muted);
}

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
    margin-left: auto;
}

.nav-links a {
    font-family: var(--font-data);
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent);
    text-decoration: none;
}

.nav-cta {
    font-family: var(--font-data);
    font-size: 12px;
    color: var(--bg-primary);
    background: var(--accent);
    border: none;
    padding: 8px 18px;
    cursor: pointer;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.15s;
    box-shadow: 2px 2px 0 var(--shadow);
    flex-shrink: 0;
}

.nav-cta:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--shadow);
    text-decoration: none;
    color: var(--bg-primary);
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 2px;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s, transform 0.15s, box-shadow 0.15s;
    box-shadow: 2px 2px 0 var(--shadow);
    padding: 0;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--accent);
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--shadow);
}

.theme-toggle:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 var(--shadow);
}

#toggle-icon {
    font-size: 18px;
    line-height: 1;
    color: var(--accent);
    font-family: var(--font-data);
}

.nav-hamburger {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 18px;
    padding: 6px 10px;
    cursor: pointer;
    font-family: var(--font-data);
}

/* ── Footer ──────────────────────────────────────────────────────── */

.site-footer {
    border-top: 1px solid var(--border);
    padding: 60px 0 32px;
    margin-top: 80px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 12px;
    max-width: 280px;
    line-height: 1.6;
}

.footer-links h4 {
    font-family: var(--font-data);
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 16px;
}

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

.footer-links li + li {
    margin-top: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent);
    text-decoration: none;
}

.footer-bottom {
    max-width: 1200px;
    margin: 32px auto 0;
    padding: 24px 24px 0;
    border-top: 1px solid var(--border);
    font-family: var(--font-data);
    font-size: 12px;
    color: var(--text-muted);
}

/* ── Availability Badge ──────────────────────────────────────────── */

.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-data);
    font-size: 12px;
    color: var(--green);
    letter-spacing: 0.5px;
}

.avail-dot {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
    flex-shrink: 0;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ── Vertical Pill Cards ─────────────────────────────────────────── */

.vertical-pills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.vertical-pill {
    border: 1px solid var(--border);
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--bg-secondary);
}

.vertical-pill:hover, .vertical-pill.active {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.vertical-pill .pill-label {
    font-family: var(--font-data);
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.vertical-pill .pill-headline {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.vertical-pill .pill-body {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    display: none;
}

.vertical-pill.active .pill-body {
    display: block;
}

/* ── Terminal Readout ────────────────────────────────────────────── */

.terminal-readout {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    padding: 24px;
    font-family: var(--font-data);
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.terminal-readout .readout-header {
    color: var(--accent);
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.terminal-readout .redacted {
    background: var(--text-muted);
    color: transparent;
    border-radius: 2px;
}

/* ── Framework Card ──────────────────────────────────────────────── */

.framework-card {
    border: 1px solid var(--border);
    padding: 24px;
    background: var(--bg-secondary);
    transition: border-color 0.2s;
}

.framework-card:hover {
    border-color: var(--accent);
}

.framework-card .card-label {
    font-family: var(--font-data);
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.framework-card .card-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.framework-card .card-body {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ── Work Teasers ────────────────────────────────────────────────── */

.work-teasers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.work-teaser {
    border: 1px solid var(--border);
    padding: 28px;
    background: var(--bg-secondary);
    text-decoration: none;
    display: block;
    transition: all 0.2s;
}

.work-teaser:hover {
    border-color: var(--accent);
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 var(--shadow);
    text-decoration: none;
}

.teaser-tag {
    font-family: var(--font-data);
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.teaser-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.teaser-body {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.teaser-link {
    font-family: var(--font-data);
    font-size: 12px;
    color: var(--accent);
    margin-top: 16px;
    display: block;
    letter-spacing: 0.5px;
}

/* ── Hero ────────────────────────────────────────────────────────── */

.page-hero {
    padding: 140px 0 80px;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(90deg, transparent, transparent 80px, var(--border) 80px, var(--border) 81px),
        repeating-linear-gradient(0deg, transparent, transparent 80px, var(--border) 80px, var(--border) 81px);
    opacity: 0.03;
}

.hero-overline {
    font-family: var(--font-data);
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 24px;
    text-shadow: 0 0 40px var(--accent-dim);
}

.hero-sub {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-secondary);
    max-width: 680px;
    line-height: 1.6;
}

.hero-cursor {
    display: inline-block;
    color: var(--accent);
    animation: blink 1s step-end infinite;
    font-family: var(--font-data);
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 700;
    line-height: 1.1;
    vertical-align: baseline;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ── Section Styling ─────────────────────────────────────────────── */

.section-label {
    font-family: var(--font-data);
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 16px;
    display: block;
}

.section-headline {
    font-family: var(--font-display);
    font-size: clamp(24px, 4vw, 40px);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.2;
}

.section-body {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 680px;
    line-height: 1.7;
    margin-bottom: 48px;
}

/* ── CTA Section ─────────────────────────────────────────────────── */

.cta-section {
    text-align: center;
    padding: 100px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 80px 0 0;
}

.cta-headline {
    font-family: var(--font-display);
    font-size: clamp(28px, 5vw, 52px);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.2;
}

.cta-sub {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 32px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.cta-button {
    display: inline-block;
    background: var(--accent);
    color: var(--bg-primary);
    font-family: var(--font-data);
    font-size: 14px;
    letter-spacing: 1px;
    padding: 14px 36px;
    text-decoration: none;
    box-shadow: 4px 4px 0 var(--shadow);
    transition: all 0.15s;
}

.cta-button:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--shadow);
    text-decoration: none;
    color: var(--bg-primary);
}

.cta-button:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--shadow);
}

/* ── Step Cards ──────────────────────────────────────────────────── */

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.step {
    padding: 32px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}

.step:hover {
    border-color: var(--accent);
}

.step-number {
    font-family: var(--font-data);
    font-size: 36px;
    color: var(--accent);
    opacity: 0.4;
    margin-bottom: 16px;
    display: block;
}

.step-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.step-body {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ── Scoreboard — Segmented Bars ────────────────────────────────── */
/* (Preserved from proposal system, used in diagnostic section) */

.scoreboard {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.score-row {
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 2px;
    box-shadow: 3px 3px 0 var(--shadow);
    transition: transform 0.15s, box-shadow 0.15s;
}

.score-row:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 var(--shadow);
}

.score-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.score-area {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
}

.score-value {
    font-family: var(--font-data);
    font-weight: 700;
    font-size: 15px;
}

.seg-bar {
    display: flex;
    gap: 3px;
    margin-bottom: 8px;
    height: 10px;
}

.seg-block {
    flex: 1;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 1px;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.seg-block.filled {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.seg-block.filled.active {
    opacity: 1;
}

.score-row[data-status="good"] .seg-block.filled { background: var(--green); box-shadow: 0 0 4px color-mix(in srgb, var(--green) 30%, transparent); }
.score-row[data-status="good"] .score-value { color: var(--green); }

.score-row[data-status="warning"] .seg-block.filled { background: var(--amber); box-shadow: 0 0 4px color-mix(in srgb, var(--amber) 30%, transparent); }
.score-row[data-status="warning"] .score-value { color: var(--amber); }

.score-row[data-status="critical"] .seg-block.filled { background: var(--red); box-shadow: 0 0 4px color-mix(in srgb, var(--red) 30%, transparent); }
.score-row[data-status="critical"] .score-value { color: var(--red); }

.score-verdict {
    font-family: var(--font-data);
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.scoreboard-summary {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 24px;
    padding: 16px 20px;
    border-left: 3px solid var(--accent);
    background: var(--accent-dim);
}

/* ── Section divider ─────────────────────────────────────────────── */

.section-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0;
}

/* ── Scroll arrow ────────────────────────────────────────────────── */

.scroll-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-data);
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-decoration: none;
    margin-top: 48px;
    animation: arrow-bob 2s ease-in-out infinite;
    transition: color 0.2s;
}

.scroll-arrow:hover {
    color: var(--accent);
    text-decoration: none;
}

@keyframes arrow-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* ── Diagnostic section ──────────────────────────────────────────── */

.diagnostic-context {
    font-family: var(--font-data);
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 32px;
    letter-spacing: 0.5px;
}

/* ── Easter egg — complex buying cycles ──────────────────────────── */

.easter-hover-cycles {
    position: relative;
    cursor: help;
}

.easter-hover-cycles::after {
    content: '// avg. 90–180 day consideration cycle. not a typo.';
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: var(--font-data);
    font-size: 11px;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 100;
    box-shadow: 2px 2px 0 var(--shadow);
}

.easter-hover-cycles:hover::after {
    opacity: 1;
}

/* ── Highlight / callout ─────────────────────────────────────────── */

.callout {
    border-left: 3px solid var(--accent);
    padding: 16px 20px;
    background: var(--accent-dim);
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 32px 0;
    font-family: var(--font-data);
}

/* ── Finding Card (from proposal — preserved) ───────────────────── */

.finding-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 2px;
    margin-bottom: 12px;
    box-shadow: 3px 3px 0 var(--shadow);
    overflow: hidden;
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.15s;
}

.finding-card:hover {
    border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 var(--shadow);
}

.finding-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    cursor: pointer;
    user-select: none;
}

.finding-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    flex: 1;
}

.finding-toggle {
    font-family: var(--font-data);
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    transition: transform 0.3s;
    width: 24px;
    text-align: center;
}

.finding-card.expanded .finding-toggle {
    transform: rotate(45deg);
}

.finding-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.finding-card.expanded .finding-body {
    max-height: 2000px;
}

.finding-section {
    padding: 0 20px 20px 20px;
}

.finding-section h5 {
    font-family: var(--font-data);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 6px;
}

.finding-text {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
    white-space: pre-line;
}

/* ── Mobile Responsive ───────────────────────────────────────────── */

@media (max-width: 768px) {
    .nav-links, .nav-cta { display: none; }
    .nav-hamburger { display: block; }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border);
        padding: 24px;
        gap: 20px;
        z-index: 9999;
    }

    .vertical-pills, .work-teasers, .steps {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .container {
        padding: 0 16px;
    }

    .page-hero {
        padding: 100px 0 60px;
    }

    .hero-headline {
        font-size: clamp(30px, 8vw, 52px);
    }

    .cta-section {
        padding: 64px 0;
    }
}
