/* ==========================================================================
   Blog Page Styles — Dark Marketing Theme
   Matches get-started.html / partner.html design language

   Dependencies: None (self-contained with marketing base styles)
   Used by: /public/blog.html
   ========================================================================== */

/* --- DESIGN TOKENS --- */
:root {
    --bg-deep: #020202;
    --bg-panel: #0a0a0a;
    --text-main: #FFFFFF;
    --text-muted: #9a9a9a;
    --accent: #FF4D00;
    --border-light: rgba(255, 255, 255, 0.12);
    --border-hover: rgba(255, 255, 255, 0.25);
    --font-brand: 'Bodoni Moda', serif;
    --font-ui: 'Inter', sans-serif;
    --easing: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- RESET --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: initial; }

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: var(--font-ui);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- NOISE TEXTURE --- */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    z-index: 1;
}

/* --- THREE.JS CANVAS --- */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* --- LAYOUT --- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem;
    position: relative;
    z-index: 2;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3 {
    font-family: var(--font-brand);
    font-weight: 400;
    line-height: 1.1;
}

.display-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    letter-spacing: -0.04em;
    line-height: 0.95;
    margin-bottom: 1.5rem;
}

.text-accent {
    color: var(--accent);
    font-style: italic;
}

.text-muted {
    color: #b0b0b0;
    font-size: 1rem;
    line-height: 1.6;
}

.small-caps {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* --- BRAND LOGO --- */
.brand-logo {
    font-family: var(--font-brand);
    font-weight: 400;
    font-style: normal !important;
    text-transform: uppercase;
    font-size: 1.8rem;
    line-height: 1.4;
    text-decoration: none;
    display: inline-block;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0.15) 20%,
        rgba(255, 255, 255, 0.0) 45%,
        rgba(255, 255, 255, 0.0) 55%,
        rgba(255, 255, 255, 0.15) 80%,
        rgba(255, 255, 255, 0.7) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -webkit-text-stroke: 0.3px rgba(255, 255, 255, 0.4);
    text-shadow:
        0px 0px 8px rgba(255, 255, 255, 0.2),
        0px 0px 20px rgba(255, 255, 255, 0.15);
    letter-spacing: 0.08em;
}

/* --- NAV --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    mix-blend-mode: difference;
}

.nav-link {
    color: #888;
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: 0.3s;
}

.nav-link:hover {
    color: var(--button-text-on-color);
}

/* --- HERO --- */
.hero {
    padding: 10rem 0 4rem;
    border-bottom: 1px solid var(--border-light);
    min-height: auto;
}

.hero-lead {
    max-width: 700px;
}

/* --- SEARCH BAR --- */
.blog-search {
    margin-top: 2rem;
    position: relative;
}

.blog-search-input {
    width: 100%;
    max-width: 500px;
    padding: 1rem 1.2rem 1rem 3rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    color: var(--button-text-on-color);
    font-family: var(--font-ui);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.blog-search-input:focus {
    outline: none;
    border-color: var(--accent);
}

.blog-search-input::placeholder {
    color: #666;
}

.blog-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1rem;
    pointer-events: none;
}

/* --- CATEGORY FILTERS --- */
.category-filters {
    display: flex;
    gap: 0;
    margin-top: 2rem;
    border: 1px solid var(--border-light);
    overflow: hidden;
    width: fit-content;
}

.category-tab {
    padding: 0.8rem 2rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-ui);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s var(--easing);
    position: relative;
}

.category-tab:not(:last-child) {
    border-right: 1px solid var(--border-light);
}

.category-tab.active {
    background: var(--accent);
    color: var(--button-text-on-color);
}

.category-tab:hover:not(.active) {
    color: var(--button-text-on-color);
    background: rgba(255, 255, 255, 0.05);
}

/* --- ARTICLES SECTION --- */
.articles-section {
    padding: 4rem 0 6rem;
}

/* --- ARTICLES GRID --- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 1px solid var(--border-light);
}

.article-card {
    padding: 2.5rem;
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    position: relative;
    transition: all 0.4s var(--easing);
    display: flex;
    flex-direction: column;
    background: var(--bg-panel);
}

.article-card:nth-child(3n) {
    border-right: none;
}

.article-card:nth-last-child(-n+3) {
    border-bottom: none;
}

.article-card:hover {
    background: rgba(255, 255, 255, 0.02);
}

.article-category {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    font-weight: 600;
}

.article-title {
    font-family: var(--font-brand);
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--button-text-on-color);
}

.article-excerpt {
    color: #b0b0b0;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.8rem;
    color: #666;
}

.article-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s;
    font-weight: 500;
}

.article-link:hover {
    color: var(--button-text-on-color);
}

/* --- NO RESULTS --- */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    font-size: 1rem;
}

.no-results-title {
    font-family: var(--font-brand);
    font-size: 1.5rem;
    color: var(--button-text-on-color);
    margin-bottom: 0.5rem;
}

/* --- FULL ARTICLE VIEW --- */
.article-full {
    display: none;
    padding: 4rem 0 6rem;
    max-width: 780px;
}

.article-back-link {
    display: inline-block;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    transition: color 0.3s;
    font-weight: 500;
}

.article-back-link:hover {
    color: var(--button-text-on-color);
}

.article-full-category {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    font-weight: 600;
}

.article-full-title {
    font-family: var(--font-brand);
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.15;
    margin-bottom: 1.5rem;
    color: var(--button-text-on-color);
}

.article-full-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.article-full-heading {
    font-family: var(--font-brand);
    font-size: 1.6rem;
    line-height: 1.2;
    color: var(--button-text-on-color);
    margin-top: 3rem;
    margin-bottom: 1.2rem;
}

.article-full-body {
    color: #c0c0c0;
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 1.2rem 2.5rem;
    border: 1px solid white;
    color: var(--button-text-on-color);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    transition: all 0.3s var(--easing);
    background: transparent;
    cursor: pointer;
    font-family: var(--font-ui);
    text-align: center;
}

.btn:hover {
    background: white;
    color: black;
}

/* --- FOOTER --- */
footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border-light);
    text-align: center;
    font-size: 0.8rem;
    color: #888;
}

footer a {
    color: #999;
    text-decoration: none;
    margin: 0 1rem;
    transition: color 0.3s;
}

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

.footer-links {
    margin-top: 1rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }

    nav {
        padding: 1.5rem 2rem;
    }

    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .article-card:nth-child(3n) {
        border-right: 1px solid var(--border-light);
    }

    .article-card:nth-child(2n) {
        border-right: none;
    }

    .article-card:nth-last-child(-n+3) {
        border-bottom: 1px solid var(--border-light);
    }

    .article-card:nth-last-child(-n+2) {
        border-bottom: none;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 8rem 0 3rem;
    }

    .display-title {
        font-size: 2.5rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .article-card {
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }

    .article-card:last-child {
        border-bottom: none;
    }

    .category-filters {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .category-tab {
        flex: 1;
        text-align: center;
        padding: 0.8rem 1rem;
        white-space: nowrap;
    }

    .blog-search-input {
        max-width: 100%;
    }
}
