:root {
    /* Gritty Geopolitics Palette (Strictly No Blue) */
    --bg-canvas: #0b0b0d; /* Near-black */
    --bg-surface: #121215;
    --bg-surface-hover: #1a1a1f;
    --text-primary: #ffffff;
    --text-muted: #c0c4cc; /* Silver details */
    --accent-primary: #dc2626; /* Crimson accents */
    --accent-secondary: #991b1b;
    --border-subtle: #2d2d33;
    
    /* Kinematics & Depth */
    --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-elevation: 0 12px 32px -4px rgba(0, 0, 0, 0.6);
    --glow-accent: 0 0 24px -4px var(--accent-primary);
    --glass-backdrop: blur(12px);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    padding: 2vw; /* Wide outer margin */
    min-height: 100vh;
    overflow-wrap: anywhere;
    hyphens: auto;
}

/* Inset Frame */
.page-frame {
    border: 1px solid var(--border-subtle);
    min-height: calc(100vh - 4vw);
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: var(--bg-canvas);
}

/* Typography */
h1, h2, h3, h4, h5, h6, .brand-name, .top-bar, .nav-link {
    font-family: "Arial Narrow", "Helvetica Neue", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 5rem); line-height: 1.1; margin-bottom: 1rem; }
h2 { font-size: clamp(2rem, 3.5vw, 3.5rem); line-height: 1.2; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
p { color: var(--text-muted); margin-bottom: 1.25rem; max-width: 72ch; }

/* Header & Top Bar */
.top-bar {
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.5rem 1.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
    z-index: 100;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    margin-right: auto;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}

/* Desktop Nav */
.desktop-nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--text-muted);
    border-bottom: 1px solid transparent;
    transition: all 0.3s var(--ease-kinetic);
    padding-bottom: 0.25rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent-primary);
}

/* Mobile Nav */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(11, 11, 13, 0.95);
    backdrop-filter: var(--glass-backdrop);
    border-bottom: 1px solid var(--border-subtle);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease-kinetic);
    z-index: 99;
}

.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Buttons & Links */
.btn-main {
    display: inline-block;
    background-color: var(--accent-primary);
    color: var(--text-primary);
    padding: 1rem 2rem;
    font-family: "Arial Narrow", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s var(--ease-kinetic), box-shadow 0.3s var(--ease-kinetic);
}

.btn-main:hover {
    transform: translateY(-3px);
    box-shadow: var(--glow-accent);
}

.text-link {
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--text-muted);
    transition: border-bottom-width 0.2s var(--ease-kinetic), color 0.2s;
}

.text-link:hover {
    color: var(--accent-primary);
    border-bottom: 2px solid var(--accent-primary);
}

/* Action Trigger Link (Form) */
.action-trigger {
    color: var(--accent-primary);
    text-decoration: none;
    border-bottom: 2px solid var(--accent-primary);
    font-weight: bold;
    cursor: pointer;
    transition: border-bottom-width 0.2s var(--ease-kinetic);
}
.action-trigger:hover {
    border-bottom-width: 4px;
}

.btn-square {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-family: "Arial Narrow", sans-serif;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: background 0.3s, color 0.3s;
}
.btn-square:hover {
    background: var(--text-muted);
    color: var(--bg-canvas);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 2rem;
    border-bottom: 1px solid var(--border-subtle);
}

.hero-img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: grayscale(40%) brightness(0.6);
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(11, 11, 13, 0.3), rgba(11, 11, 13, 0.9));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
}

/* Bento Grid System */
.main-content {
    padding: 4rem 2rem;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    grid-auto-flow: dense;
}

.bento-span-2 { grid-column: span 2; }
.bento-span-3 { grid-column: span 3; }

@media (max-width: 768px) {
    .bento-span-2, .bento-span-3 { grid-column: span 1; }
}

/* Bento Tiles / Cards */
.bento-tile {
    background: rgba(18, 18, 21, 0.7);
    backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--border-subtle);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s var(--ease-kinetic), border-color 0.4s;
}

.bento-tile:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: rgba(192, 196, 204, 0.3);
}

.bento-img-wrapper {
    margin: -2rem -2rem 1.5rem -2rem;
    height: 250px;
    position: relative;
    border-bottom: 1px solid var(--border-subtle);
}

.bento-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%);
}

.badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent-primary);
    color: #fff;
    padding: 0.25rem 0.75rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 999px; /* Round badges per spec */
}

/* Horizontal Scroll Area (Photo Stories) */
.horizontal-scroll {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) var(--bg-surface);
}

.horizontal-scroll::-webkit-scrollbar {
    height: 6px;
}
.horizontal-scroll::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
}

.scroll-item {
    flex: 0 0 300px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
}
.scroll-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.scroll-item-content {
    padding: 1.5rem;
}

/* Content Container for Articles */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.article-container p {
    font-size: 1.125rem;
}

.article-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border: 1px solid var(--border-subtle);
    margin: 2rem 0;
}

/* Table Wrapper */
.table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid var(--border-subtle);
}
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
th, td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}
th {
    background: var(--bg-surface);
    font-family: "Arial Narrow", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Form block */
.form-block {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.input-group label {
    font-family: "Arial Narrow", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}
.input-group input, .input-group textarea {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 1rem;
    font-family: inherit;
}
.input-group input:focus, .input-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}
.form-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 1rem;
}
#compiled-output {
    display: none;
    background: #000;
    padding: 1rem;
    border: 1px dashed var(--text-muted);
    font-family: monospace;
    white-space: pre-wrap;
    margin-top: 1rem;
}

/* Footer (Bento Style) */
.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    padding: 3rem 2rem;
}

.footer-bento {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-legal {
    border-top: 1px solid var(--border-subtle);
    margin-top: 3rem;
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-legal-links {
    display: flex;
    gap: 1.5rem;
}

/* Scroll Reveal Classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-kinetic);
}
.reveal.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .mobile-toggle { display: block; }
    body { padding: 1rem; }
    .page-frame { min-height: calc(100vh - 2rem); }
}

@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
