/* ============================================================
   NeuricLab — Dark, technical, game-dev aesthetic
   Brand: Unreal Engine AI tools for indies & studios
   ============================================================ */

:root {
    --bg: #0a0a0d;
    --bg-elev: #111116;
    --bg-elev-2: #1a1a22;
    --surface: #14141b;
    --border: #25252f;
    --border-bright: #3a3a48;

    --text: #e8e8ec;
    --text-muted: #8a8a98;
    --text-dim: #5a5a68;

    --accent: #e85a4f;
    --accent-hot: #ed7268;
    --accent-glow: rgba(232, 90, 79, 0.25);

    --green: #4ade80;
    --gray: #6b7280;
    --red: #ef4444;

    --font-display: 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    --radius: 4px;
    --radius-lg: 8px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.5);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.6);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }

a { color: var(--accent); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-hot); }

.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 840px; margin: 0 auto; padding: 0 24px; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 13, 0.85);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.15rem;
    color: var(--text);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

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

.logo-mark {
    color: var(--accent);
    font-size: 1.4em;
    filter: drop-shadow(0 0 8px var(--accent-glow));
    transition: transform 0.3s ease;
}

.logo:hover .logo-mark { transform: rotate(90deg); }

.logo-accent { color: var(--accent); }

.logo-img {
    height: 56px;
    width: auto;
    display: block;
}

.site-footer .logo-img { height: 44px; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.main-nav a {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: relative;
    padding: 6px 0;
}

.main-nav a:hover { color: var(--text); }

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.main-nav a:hover::after { transform: scaleX(1); }

.btn-download {
    background: var(--accent) !important;
    color: white !important;
    padding: 10px 20px !important;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.btn-download:hover {
    background: var(--accent-hot) !important;
    box-shadow: 0 0 24px var(--accent-glow);
}

.btn-download::after { display: none !important; }

.admin-link {
    background: rgba(232, 90, 79, 0.1);
    border: 1px solid var(--accent);
    color: var(--accent) !important;
    padding: 6px 12px !important;
    border-radius: var(--radius);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: 0;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .main-nav { display: none; }
    .mobile-menu-toggle { display: block; }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hot);
    color: white;
    box-shadow: 0 0 32px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--border-bright);
}

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

.btn-small {
    padding: 6px 12px;
    font-size: 0.75rem;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #0a0a0d;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.35), transparent 70%),
        linear-gradient(180deg, rgba(10, 10, 13, 0.70) 0%, rgba(10, 10, 13, 0.85) 100%);
}

.hero-bg::before { display: none; }

.hero-content {
    position: relative;
    z-index: 2;
    padding: 80px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 90vh;
    width: 100%;
}

.hero-eyebrow {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    color: var(--accent);
    margin-bottom: 24px;
    padding: 6px 12px;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    background: rgba(232, 90, 79, 0.05);
}

.hero-title {
    font-family: var(--font-body);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.03em;
    text-transform: none;
    color: #ffffff;
    margin-bottom: 20px;
    max-width: 980px;
}

.hero-subtitle {
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.78);
    max-width: 640px;
    margin: 0 auto 40px;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero-socials {
    display: flex;
    justify-content: center;
    gap: 28px;
}

.hero-socials a {
    color: #ffffff;
    opacity: 0.92;
    transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
    display: inline-flex;
}

.hero-socials a:hover {
    color: var(--accent);
    opacity: 1;
    transform: translateY(-2px);
}

.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    opacity: 0.92;
    font-size: 1.75rem;
    z-index: 2;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ============================================================
   Section titles
   ============================================================ */
.section-title {
    font-family: var(--font-body);
    font-size: clamp(2.25rem, 4.5vw, 3.5rem);
    font-weight: 900;
    text-transform: none;
    letter-spacing: -0.02em;
    margin-bottom: 56px;
    display: block;
}

.section-number {
    font-size: 0.8em;
    color: var(--accent);
    -webkit-text-stroke: 1px var(--accent);
    -webkit-text-fill-color: transparent;
}

/* ============================================================
   Products
   ============================================================ */
.products-section {
    padding: 120px 0;
    border-bottom: 1px solid var(--border);
}

.product-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 100px;
    padding: 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color 0.3s ease;
}

.product-card:hover { border-color: var(--border-bright); }

.product-card:nth-child(even) {
    grid-template-columns: 1fr 1.2fr;
}

.product-card:nth-child(even) .product-image { order: 2; }

.product-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
}

.product-image img {
    border-radius: var(--radius);
    transition: transform 0.6s ease;
}

.product-card:hover .product-image img { transform: scale(1.04); }

.product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--accent);
    color: white;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: var(--radius);
    z-index: 1;
}

.product-badge-wip {
    background: var(--gray);
}

.product-title {
    font-family: var(--font-body);
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    font-weight: 900;
    text-transform: none;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: var(--text);
}

.product-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 28px;
}

.product-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .product-card,
    .product-card:nth-child(even) {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 24px;
    }
    .product-card:nth-child(even) .product-image { order: 0; }
}

/* ============================================================
   News
   ============================================================ */
.news-section {
    padding: 120px 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.news-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    color: var(--text);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    color: var(--text);
}

.news-image {
    position: relative;
    aspect-ratio: 16/9;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-elev-2);
}

.news-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 10, 13, 0.15) 0%, rgba(10, 10, 13, 0.65) 100%);
    transition: opacity 0.3s ease;
}

.news-card:hover .news-image::after {
    opacity: 0.6;
}

.news-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--accent);
    opacity: 0.4;
}

.news-body { padding: 24px; flex: 1; }

.news-date {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 12px;
    display: block;
}

.news-title {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    background: #07070a;
    border-top: 1px solid var(--border);
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-tagline {
    color: var(--text-muted);
    margin-top: 16px;
}

.footer-grid h4 {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text);
    margin-bottom: 20px;
}

.footer-grid a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.footer-grid a:hover { color: var(--accent); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 32px;
    color: var(--text-dim);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ============================================================
   Flash messages
   ============================================================ */
.flash-messages { padding: 16px 0; }

.flash {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 8px;
    font-weight: 500;
    border: 1px solid;
}

.flash-success {
    background: rgba(74, 222, 128, 0.1);
    color: var(--green);
    border-color: rgba(74, 222, 128, 0.3);
}

.flash-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--red);
    border-color: rgba(239, 68, 68, 0.3);
}

/* ============================================================
   Docs index
   ============================================================ */
.docs-hero {
    padding: 100px 0 60px;
    border-bottom: 1px solid var(--border);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(232, 90, 79, 0.08), transparent 60%);
}

.eyebrow {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--accent);
    margin-bottom: 20px;
}

.docs-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 16px;
    line-height: 1.1;
}

.lead {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 32px;
}

.docs-search {
    display: flex;
    max-width: 560px;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s;
}

.docs-search:focus-within { border-color: var(--accent); }

.docs-search input {
    flex: 1;
    background: transparent;
    border: 0;
    padding: 14px 20px;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

.docs-search button {
    background: var(--accent);
    color: white;
    border: 0;
    padding: 0 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.docs-search button:hover { background: var(--accent-hot); }

.docs-categories { padding: 80px 0; }

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.category-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    color: var(--text);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(232, 90, 79, 0.08));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover {
    border-color: var(--accent);
    color: var(--text);
    transform: translateY(-4px);
}

.category-card:hover::before { opacity: 1; }

.category-card-num {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.2em;
    margin-bottom: 16px;
    font-weight: 700;
}

.category-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.category-card p {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.category-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.category-meta .arrow {
    color: var(--accent);
    font-size: 1.4em;
    transition: transform 0.2s ease;
}

.category-card:hover .arrow { transform: translateX(6px); }

/* ============================================================
   Doc page (sidebar + content)
   ============================================================ */
.doc-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 72px);
}

.doc-sidebar {
    border-right: 1px solid var(--border);
    background: #08080c;
}

.doc-sidebar-inner {
    position: sticky;
    top: 72px;
    padding: 40px 24px;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    /* Thin, dark-themed scrollbar so it blends with the sidebar */
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    transition: scrollbar-color 0.3s ease;
}

.doc-sidebar-inner:hover {
    scrollbar-color: var(--border-bright) transparent;
}

.doc-sidebar-inner::-webkit-scrollbar {
    width: 6px;
}

.doc-sidebar-inner::-webkit-scrollbar-track {
    background: transparent;
}

.doc-sidebar-inner::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.doc-sidebar-inner:hover::-webkit-scrollbar-thumb {
    background: var(--border-bright);
}

.doc-sidebar-inner::-webkit-scrollbar-thumb:hover {
    background: var(--text-dim);
}

.back-to-docs {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 24px;
}

.back-to-docs:hover { color: var(--accent); }

.doc-sidebar-title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.doc-nav {
    display: flex;
    flex-direction: column;
}

.doc-nav a {
    display: block;
    color: var(--text-muted);
    padding: 8px 12px;
    margin-left: -12px;
    font-size: 0.9rem;
    border-left: 2px solid transparent;
    transition: all 0.15s ease;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.doc-nav a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
}

.doc-nav a.active {
    color: var(--accent);
    border-left-color: var(--accent);
    background: rgba(232, 90, 79, 0.05);
    font-weight: 500;
}

.doc-content {
    padding: 48px 56px 80px;
    max-width: 880px;
}

.doc-breadcrumb {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.doc-breadcrumb a { color: var(--text-muted); }
.doc-breadcrumb a:hover { color: var(--accent); }
.doc-breadcrumb span { color: var(--text-dim); }

.doc-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.15;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 24px;
}

.admin-edit-bar {
    background: rgba(232, 90, 79, 0.08);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-edit-bar .btn-small {
    background: var(--accent);
    color: white;
    padding: 6px 14px;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ============================================================
   Doc body content
   ============================================================ */
.doc-body {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text);
}

.doc-body h1, .doc-body h2, .doc-body h3, .doc-body h4 {
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    margin: 48px 0 16px;
    color: var(--text);
    letter-spacing: 0.01em;
}

.doc-body h2 {
    font-size: 1.65rem;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.doc-body h3 { font-size: 1.25rem; color: var(--accent); }
.doc-body h4 { font-size: 1.05rem; }

.doc-body p { margin-bottom: 20px; color: #d0d0d8; }

.doc-body ul, .doc-body ol {
    margin: 0 0 24px 28px;
    color: #d0d0d8;
}

.doc-body li { margin-bottom: 8px; }

.doc-body img,
.doc-body video,
.article-body img,
.article-body video {
    max-width: 100%;
    height: auto;
    margin: 24px 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.doc-body a {
    color: var(--accent);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.doc-body a:hover { border-bottom-color: var(--accent); }

.doc-body strong {
    color: var(--text);
    font-weight: 700;
}

.doc-body code {
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 3px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.9em;
    color: var(--accent);
}

.doc-body pre {
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 24px 0;
}

.doc-body pre code {
    background: none;
    border: 0;
    padding: 0;
    color: var(--text);
}

.doc-body mark {
    background: rgba(232, 90, 79, 0.15);
    color: var(--accent-hot);
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
    border: 1px solid rgba(232, 90, 79, 0.3);
}

.doc-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.doc-body th, .doc-body td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.doc-body th {
    background: var(--bg-elev-2);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
}

.doc-body tr:last-child td { border-bottom: 0; }

.doc-body hr {
    border: 0;
    height: 1px;
    background: var(--border);
    margin: 40px 0;
}

.doc-body blockquote {
    border-left: 3px solid var(--accent);
    padding: 8px 0 8px 20px;
    margin: 24px 0;
    color: var(--text-muted);
    font-style: italic;
}

.doc-meta {
    margin-top: 56px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.85rem;
}

.doc-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 48px;
}

.doc-pager a {
    display: block;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: all 0.2s ease;
}

.doc-pager a:hover {
    border-color: var(--accent);
    color: var(--text);
    transform: translateY(-2px);
}

.pager-next { text-align: right; }

.pager-label {
    display: block;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 6px;
}

.pager-title {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
}

@media (max-width: 1024px) {
    .doc-layout { grid-template-columns: 1fr; }
    .doc-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
    .doc-sidebar-inner {
        position: static;
        max-height: none;
        padding: 24px;
    }
    .doc-content { padding: 32px 24px; }
}

/* ============================================================
   News article page
   ============================================================ */
.news-article { padding: 60px 0 100px; }

.back-link {
    display: inline-block;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 24px;
}

.back-link:hover { color: var(--accent); }

.article-date {
    display: block;
    font-family: var(--font-display);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 16px;
}

.article-title {
    font-family: var(--font-body);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    text-transform: none;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 32px;
}

.article-byline {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: -16px 0 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.byline-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-bright);
    background: var(--bg-elev);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--accent);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.byline-text { display: flex; flex-direction: column; line-height: 1.3; }
.byline-name { color: var(--text); font-weight: 600; font-size: 0.95rem; }
.byline-title { color: var(--text-muted); font-size: 0.8rem; }

.article-hero {
    margin: 32px 0 48px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.article-hero img { width: 100%; }

/* ============================================================
   Contact page
   ============================================================ */
.contact-section { padding: 100px 0; }

.contact-section h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.contact-channels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 48px;
}

.contact-channel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    color: var(--text);
    transition: all 0.3s ease;
    text-align: center;
}

.contact-channel:hover {
    border-color: var(--accent);
    color: var(--text);
    transform: translateY(-4px);
}

.channel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    color: var(--accent);
    margin: 0 auto 16px;
    transition: transform 0.3s ease;
}

.channel-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.contact-channel:hover .channel-icon { transform: translateY(-2px) scale(1.05); }

/* Brand colors for each channel — overridden on hover by var(--accent) for emphasis */
.channel-discord .channel-icon { color: #5865F2; }
.channel-youtube .channel-icon { color: #FF0000; }

.contact-channel h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.contact-channel p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Contact form */
.contact-form-wrap {
    margin-top: 80px;
    padding-top: 48px;
    border-top: 1px solid var(--border);
}

.contact-form-title {
    font-family: var(--font-body);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.contact-form-lead {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.contact-form .field { display: flex; flex-direction: column; gap: 6px; }
.contact-form .field-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}
.contact-form .field-label small {
    color: var(--text-dim);
    font-weight: 400;
    margin-left: 4px;
}

.contact-form input,
.contact-form textarea {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text);
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    width: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232, 90, 79, 0.18);
}

.contact-form textarea { resize: vertical; min-height: 140px; line-height: 1.5; }

.contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 640px) {
    .contact-row { grid-template-columns: 1fr; }
}

.contact-form .btn { align-self: flex-start; padding: 12px 28px; }

/* Honeypot — must never be visible or focusable for real users */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* ============================================================
   Search page
   ============================================================ */
.search-page { padding: 80px 0; }
.search-page h1 {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: 2.5rem;
    margin-bottom: 32px;
}

.search-meta {
    color: var(--text-muted);
    margin: 32px 0 24px;
    font-size: 0.9rem;
}

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

.search-result {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    color: var(--text);
    transition: all 0.2s ease;
}

.search-result:hover {
    border-color: var(--accent);
    color: var(--text);
    transform: translateX(4px);
}

.search-result-cat {
    font-family: var(--font-display);
    font-size: 0.7rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 6px;
}

.search-result h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.search-result p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================================================
   Error pages
   ============================================================ */
.error-page {
    padding: 120px 0;
    text-align: center;
}

.error-code {
    font-family: var(--font-display);
    font-size: clamp(6rem, 18vw, 12rem);
    font-weight: 900;
    -webkit-text-stroke: 2px var(--accent);
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 16px;
}

.error-page h1 {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.error-page p { color: var(--text-muted); margin-bottom: 32px; }

.error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.empty-state {
    padding: 60px 24px;
    text-align: center;
    color: var(--text-muted);
}
