/* ==========================================================================
   FLATTRUTHS.COM — DOSSIER THEME
   Investigative research aesthetic. Midnight navy + electric cyan + cream.
   ========================================================================== */

:root {
    /* Backgrounds */
    --bg-deep: #050817;
    --bg: #0a0e27;
    --bg-elevated: #0f1538;
    --bg-panel: #131a45;
    --bg-stamp: #1a2356;

    /* Borders & dividers */
    --border: #1f2a5e;
    --border-bright: #2a3a7a;
    --border-cyan: rgba(0, 212, 255, 0.25);

    /* Text */
    --text: #e8e6d8;
    --text-bright: #ffffff;
    --text-muted: #8a92b5;
    --text-dim: #5b6398;

    /* Accents */
    --cyan: #00d4ff;
    --cyan-dim: #0099cc;
    --cyan-glow: rgba(0, 212, 255, 0.4);
    --amber: #f59e0b;
    --red: #ef4444;
    --red-dim: #b91c1c;
    --gold: #c9a227;
    --green: #10b981;

    /* Type */
    --serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --mono: "JetBrains Mono", "Courier New", Courier, monospace;

    /* Sizing */
    --maxw: 1180px;
    --gap: 24px;
    --radius: 4px;
    --radius-lg: 8px;
}

/* Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--sans);
    background: var(--bg-deep);
    color: var(--text);
    line-height: 1.65;
    font-size: 16px;
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 20% 0%, rgba(0, 212, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 100%, rgba(245, 158, 11, 0.04) 0%, transparent 40%);
    background-attachment: fixed;
}

/* Graph-paper texture overlay */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* Document corner registration marks */
body::after {
    content: "";
    position: fixed;
    top: 16px; left: 16px; right: 16px; bottom: 16px;
    border: 1px solid rgba(0, 212, 255, 0.06);
    pointer-events: none;
    z-index: 0;
}

main, header, footer, section { position: relative; z-index: 1; }

/* ============== TYPOGRAPHY ============== */

h1, h2, h3, h4 {
    font-family: var(--serif);
    color: var(--text-bright);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--cyan); }

p { margin-bottom: 1rem; max-width: 75ch; }
p + p { margin-top: 0; }

a { color: var(--cyan); text-decoration: none; transition: all 0.15s ease; }
a:hover { color: var(--text-bright); text-shadow: 0 0 12px var(--cyan-glow); }

strong { color: var(--text-bright); font-weight: 600; }
em { color: var(--amber); font-style: italic; }

code, .mono { font-family: var(--mono); font-size: 0.9em; color: var(--cyan); background: rgba(0, 212, 255, 0.08); padding: 1px 6px; border-radius: 3px; }

ul, ol { margin: 0 0 1rem 1.5rem; max-width: 75ch; }
li { margin-bottom: 0.4rem; }

blockquote {
    border-left: 3px solid var(--cyan);
    padding: 0.5rem 0 0.5rem 1.25rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-style: italic;
    font-family: var(--serif);
}

/* ============== HEADER / NAV ============== */

.site-header {
    background: rgba(5, 8, 23, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-bright);
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand .brand-mark {
    width: 28px; height: 28px;
    border: 2px solid var(--cyan);
    border-radius: 50%;
    position: relative;
    display: inline-block;
    background: radial-gradient(circle, transparent 38%, var(--cyan) 40%, transparent 42%);
}
.brand .brand-mark::after {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: var(--cyan);
    opacity: 0.7;
}
.brand small {
    font-family: var(--mono);
    font-size: 0.65rem;
    color: var(--cyan);
    letter-spacing: 0.2em;
    margin-left: 6px;
    opacity: 0.8;
}

.nav-links {
    display: flex;
    gap: 4px;
    list-style: none;
    margin: 0;
}
.nav-links a {
    padding: 8px 14px;
    font-family: var(--mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border-radius: 3px;
    transition: all 0.15s ease;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--cyan);
    background: rgba(0, 212, 255, 0.08);
    text-shadow: none;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-bright);
    color: var(--cyan);
    padding: 6px 10px;
    font-family: var(--mono);
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 3px;
}

@media (max-width: 880px) {
    .nav-links { display: none; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: var(--bg-deep);
        border-bottom: 1px solid var(--border);
        padding: 12px;
    }
    .nav-toggle { display: inline-block; }
}

/* ============== LAYOUT ============== */

main { padding: 0 24px; }
.container { max-width: var(--maxw); margin: 0 auto; }
.narrow { max-width: 760px; margin: 0 auto; }

section { padding: 64px 0; }

/* ============== HERO ============== */

.hero {
    padding: 80px 0 64px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.classification-bar {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 6px 14px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--red);
    color: var(--red);
    font-family: var(--mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 600;
    margin-bottom: 24px;
    border-radius: 3px;
}
.classification-bar::before {
    content: "●";
    color: var(--red);
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.hero h1 {
    font-family: var(--serif);
    font-weight: 700;
    margin-bottom: 24px;
}
.hero h1 .accent { color: var(--cyan); }
.hero h1 .redacted {
    background: var(--text-bright);
    color: var(--text-bright);
    padding: 0 0.4em;
    user-select: none;
    cursor: help;
    transition: all 0.3s ease;
}
.hero h1 .redacted:hover {
    background: transparent;
    color: var(--text-bright);
}

.hero .lede {
    font-size: 1.2rem;
    color: var(--text);
    max-width: 70ch;
    margin-bottom: 32px;
    line-height: 1.6;
}

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    font-family: var(--mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    border-radius: 3px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
}
.btn-primary {
    background: var(--cyan);
    color: var(--bg-deep);
}
.btn-primary:hover {
    background: var(--text-bright);
    color: var(--bg-deep);
    text-shadow: none;
    box-shadow: 0 0 24px var(--cyan-glow);
}
.btn-ghost {
    background: transparent;
    color: var(--cyan);
    border-color: var(--cyan);
}
.btn-ghost:hover {
    background: rgba(0, 212, 255, 0.1);
    color: var(--text-bright);
}
.btn-amber {
    background: var(--amber);
    color: var(--bg-deep);
}

/* ============== SECTION HEADERS ============== */

.section-header {
    margin-bottom: 40px;
    border-left: 3px solid var(--cyan);
    padding-left: 20px;
}
.section-header .label {
    font-family: var(--mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--cyan);
    margin-bottom: 8px;
    display: block;
}
.section-header h2 { margin-bottom: 8px; }
.section-header p { color: var(--text-muted); max-width: 70ch; }

/* ============== STAMPS / TAGS ============== */

.stamp {
    display: inline-block;
    padding: 5px 12px;
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    border: 2px solid currentColor;
    border-radius: 2px;
    transform: rotate(-2deg);
}
.stamp-classified { color: var(--red); border-color: var(--red); }
.stamp-declassified { color: var(--green); border-color: var(--green); }
.stamp-suppressed { color: var(--amber); border-color: var(--amber); }
.stamp-evidence { color: var(--cyan); border-color: var(--cyan); transform: rotate(0); }

.tag {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(0, 212, 255, 0.1);
    color: var(--cyan);
    font-family: var(--mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 3px;
    border: 1px solid var(--border-cyan);
}

/* ============== CARDS / FILES ============== */

.grid {
    display: grid;
    gap: 20px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) {
    .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
}

.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}
.card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 0; height: 2px;
    background: var(--cyan);
    transition: width 0.3s ease;
}
.card:hover::before { width: 100%; }
.card:hover {
    border-color: var(--border-bright);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.card .file-id {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card h3 { margin-bottom: 12px; }
.card .meta {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}
.card a.card-link {
    color: var(--cyan);
    font-family: var(--mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Tool cards */
.tool-card {
    background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-panel) 100%);
    border: 1px solid var(--border-bright);
    padding: 32px 24px;
    text-align: left;
}
.tool-card h3 { color: var(--cyan); }
.tool-card .tool-icon {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--cyan);
    margin-bottom: 12px;
    letter-spacing: 0.2em;
}

/* ============== EVIDENCE TABLE / FILE LIST ============== */

.file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--border);
}
.file-list li {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 16px;
    padding: 16px 4px;
    border-bottom: 1px solid var(--border);
    align-items: center;
    transition: all 0.15s;
}
.file-list li:hover {
    background: rgba(0, 212, 255, 0.04);
    padding-left: 12px;
}
.file-list .file-num {
    font-family: var(--mono);
    color: var(--cyan);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
}
.file-list .file-title {
    font-family: var(--serif);
    color: var(--text-bright);
    font-weight: 500;
    font-size: 1.05rem;
}
.file-list .file-action {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
@media (max-width: 640px) {
    .file-list li { grid-template-columns: 70px 1fr; }
    .file-list .file-action { grid-column: 2; padding-top: 4px; }
}

/* ============== CALLOUTS / PANELS ============== */

.callout {
    background: var(--bg-elevated);
    border-left: 3px solid var(--cyan);
    padding: 20px 24px;
    margin: 24px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}
.callout.warn { border-left-color: var(--amber); }
.callout.danger { border-left-color: var(--red); }
.callout .label {
    font-family: var(--mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--cyan);
    margin-bottom: 8px;
    display: block;
}
.callout.warn .label { color: var(--amber); }
.callout.danger .label { color: var(--red); }

.panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin: 24px 0;
}

/* Stat numbers */
.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    margin: 32px 0;
}
.stat {
    border-left: 2px solid var(--cyan);
    padding-left: 16px;
}
.stat .num {
    font-family: var(--serif);
    font-size: 2.4rem;
    color: var(--text-bright);
    font-weight: 700;
    line-height: 1;
}
.stat .label {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 6px;
}

/* ============== FORMS ============== */

input, textarea, select {
    width: 100%;
    background: var(--bg-deep);
    border: 1px solid var(--border-bright);
    color: var(--text);
    padding: 12px 14px;
    font-family: var(--sans);
    font-size: 1rem;
    border-radius: 3px;
    transition: all 0.15s;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}
label {
    display: block;
    font-family: var(--mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.form-group { margin-bottom: 20px; }

/* ============== FOOTER ============== */

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-deep);
    padding: 48px 24px 32px;
    margin-top: 80px;
}
.footer-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}
@media (max-width: 880px) {
    .footer-inner { grid-template-columns: 1fr 1fr; }
}
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; }
.footer-col h4 {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.footer-col a:hover { color: var(--cyan); text-shadow: none; }

.footer-bottom {
    max-width: var(--maxw);
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ============== UTILS ============== */

.text-cyan { color: var(--cyan); }
.text-amber { color: var(--amber); }
.text-red { color: var(--red); }
.text-muted { color: var(--text-muted); }
.text-mono { font-family: var(--mono); }
.text-serif { font-family: var(--serif); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-bright), transparent);
    margin: 48px 0;
    border: none;
}

/* Document footnote / source citation */
.source {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 4px;
    display: block;
}
.source::before { content: "↳ "; color: var(--cyan); }

/* Image frames */
img, svg.figure {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
figure {
    margin: 24px 0;
    background: var(--bg-elevated);
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
figcaption {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.95rem;
}
th, td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
th {
    font-family: var(--mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--cyan);
    background: var(--bg-elevated);
    border-bottom: 2px solid var(--border-bright);
}
tr:hover td { background: rgba(0, 212, 255, 0.04); }

/* FAQ */
details {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    background: var(--bg-elevated);
}
summary {
    padding: 16px 20px;
    cursor: pointer;
    font-family: var(--serif);
    font-weight: 500;
    color: var(--text-bright);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}
summary::after {
    content: "+";
    color: var(--cyan);
    font-family: var(--mono);
    font-size: 1.4rem;
    transition: transform 0.2s;
}
details[open] summary::after { content: "−"; }
details[open] summary { border-bottom: 1px solid var(--border); }
details > div { padding: 16px 20px; color: var(--text-muted); }

/* Progress / data viz */
.progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-family: var(--mono);
    font-size: 0.85rem;
}
.progress-label { width: 200px; color: var(--text-muted); }
.progress-bar { flex: 1; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--cyan-dim), var(--cyan)); border-radius: 3px; }
.progress-val { color: var(--cyan); width: 50px; text-align: right; }

/* Selection */
::selection { background: var(--cyan); color: var(--bg-deep); }

/* Print */
@media print {
    body::before, body::after { display: none; }
    .site-header, .site-footer, .nav-links, .cta-row { display: none !important; }
}
