/* ============================================================
   BDIBBS — styles.css
   Tema escuro-tech (portal/revista)
   Paleta: #0E1116 (grafite) · #161C26 (painel) · #22D3EE (ciano)
           #94A3B8 (secundário) · #F1F5F9 (claro)
   Fontes: Bruno Ace (display) · Anek Latin (texto) · Ubuntu Mono
   Media queries ficam exclusivamente em responsive.css
   ============================================================ */

:root {
    --bg: #0E1116;
    --panel: #161C26;
    --panel-2: #1C2431;
    --cyan: #22D3EE;
    --cyan-dim: rgba(34, 211, 238, 0.14);
    --muted: #94A3B8;
    --light: #F1F5F9;
    --line: #263041;
    --radius: 12px;
    --font-display: "Bruno Ace", sans-serif;
    --font-body: "Anek Latin", sans-serif;
    --font-mono: "Ubuntu Mono", monospace;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--light);
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.75;
}

img { max-width: 100%; display: block; }

a { color: var(--cyan); }

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

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.3; font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: 14px; }
h3 { font-size: 1.15rem; line-height: 1.45; }

.eyebrow {
    font-family: var(--font-mono);
    color: var(--cyan);
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}

.section { padding: 72px 0; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.sr-only {
    position: absolute; width: 1px; height: 1px;
    clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

.mono { font-family: var(--font-mono); color: var(--cyan); margin-bottom: 8px; }

/* ---------- Header ---------- */
.site-header {
    background: rgba(14, 17, 22, 0.92);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
}
.masthead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 18px;
    padding-bottom: 18px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand-mark {
    font-family: var(--font-display);
    background: var(--cyan);
    color: var(--bg);
    padding: 8px 11px;
    border-radius: 8px;
    font-size: 0.95rem;
}
.brand-name { font-family: var(--font-display); color: var(--light); font-size: 1.4rem; letter-spacing: 0.02em; }
.brand-name em { font-style: normal; color: var(--cyan); }
.search { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--panel); }
.search input {
    background: transparent;
    border: 0;
    color: var(--light);
    padding: 10px 18px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    width: 260px;
}
.search input:focus { outline: none; }
.search button {
    background: var(--cyan);
    border: 0;
    color: var(--bg);
    font-size: 1.1rem;
    width: 44px;
    cursor: pointer;
}
.category-bar { border-top: 1px solid var(--line); }
.category-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.categories { display: flex; gap: 6px; list-style: none; padding: 10px 0; overflow-x: auto; }
.categories a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 6px 14px;
    border-radius: 999px;
    white-space: nowrap;
}
.categories a:hover { color: var(--cyan); background: var(--cyan-dim); }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; padding: 8px; flex-direction: column; gap: 4px; }
.menu-toggle span { width: 20px; height: 2px; background: var(--cyan); display: block; }

/* ---------- Featured ---------- */
.featured { padding: 56px 0 64px; background:
    radial-gradient(1200px 400px at 80% -10%, rgba(34, 211, 238, 0.08), transparent 60%),
    var(--bg);
}
.featured-grid { display: grid; grid-template-columns: 1.6fr 0.9fr; gap: 40px; align-items: start; }
.featured-media { position: relative; margin-bottom: 22px; }
.featured-media img { border-radius: var(--radius); border: 1px solid var(--line); }
.chip {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--cyan);
    background: var(--cyan-dim);
    border: 1px solid rgba(34, 211, 238, 0.4);
    border-radius: 999px;
    padding: 4px 12px;
    margin-bottom: 12px;
}
.chip-featured { position: absolute; top: 14px; left: 14px; margin: 0; background: var(--cyan); color: var(--bg); border-color: var(--cyan); }
.kicker { font-family: var(--font-mono); color: var(--muted); font-size: 0.85rem; margin-bottom: 10px; }
.featured-body h1 { font-size: clamp(1.6rem, 3.2vw, 2.5rem); margin-bottom: 18px; }
.featured-body p { color: #CBD5E1; margin-bottom: 14px; max-width: 46rem; }
.byline { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.byline img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--cyan); }
.byline strong { display: block; font-size: 0.95rem; }
.byline em { font-style: normal; color: var(--muted); font-size: 0.82rem; }

.featured-side { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.side-title { font-size: 1.05rem; margin-bottom: 18px; }
.most-read { list-style: none; counter-reset: mr; display: grid; gap: 16px; }
.most-read li { counter-increment: mr; padding-left: 40px; position: relative; }
.most-read li::before {
    content: counter(mr, decimal-leading-zero);
    position: absolute; left: 0; top: 2px;
    font-family: var(--font-mono);
    color: var(--cyan);
    font-size: 1.05rem;
}
.most-read a { color: var(--light); text-decoration: none; font-weight: 600; line-height: 1.4; display: block; }
.most-read a:hover { color: var(--cyan); }
.most-read span { color: var(--muted); font-size: 0.8rem; font-family: var(--font-mono); }
.side-note { margin-top: 24px; border-top: 1px dashed var(--line); padding-top: 18px; }
.side-note p { color: var(--muted); font-size: 0.9rem; }

/* ---------- Artigos ---------- */
.articles { background: var(--bg); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.filter-btn {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--panel);
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.filter-btn:hover { color: var(--cyan); border-color: var(--cyan); }
.filter-btn.active { background: var(--cyan); color: var(--bg); border-color: var(--cyan); font-weight: 700; }

.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.article-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, border-color 0.25s ease;
}
.article-card:hover { transform: translateY(-6px); border-color: var(--cyan); }
.article-card img { height: 190px; width: 100%; object-fit: cover; }
.article-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.article-body h3 { color: var(--light); font-size: 1.05rem; }
.article-body p { color: var(--muted); font-size: 0.93rem; flex: 1; }
.meta { font-family: var(--font-mono); font-size: 0.8rem; color: var(--cyan); }
.article-card.hidden { display: none; }
.empty-note { text-align: center; color: var(--muted); font-family: var(--font-mono); padding: 30px 0; }

/* ---------- Pulse ---------- */
.pulse { background: var(--panel-2); }
.pulse-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.pulse-item { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.pulse-number {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--cyan);
    display: block;
    margin-bottom: 10px;
}
.pulse-item h3 { margin-bottom: 8px; }
.pulse-item p { color: var(--muted); font-size: 0.92rem; }

/* ---------- Autores ---------- */
.authors { background: var(--bg); }
.authors-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.author {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    text-align: center;
}
.author img {
    width: 96px; height: 96px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 16px;
    border: 3px solid var(--cyan);
}
.author strong { display: block; font-family: var(--font-display); font-size: 1.05rem; }
.author em { display: block; color: var(--cyan); font-style: normal; font-size: 0.82rem; font-family: var(--font-mono); margin: 4px 0 12px; }
.author p { color: var(--muted); font-size: 0.9rem; text-align: left; }

/* ---------- Referências ---------- */
.references { background: var(--cyan-dim); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.references p { color: #CBD5E1; max-width: 52rem; }
.references a { color: var(--cyan); font-weight: 700; text-decoration: none; border-bottom: 1px dashed var(--cyan); }

/* ---------- Boletim ---------- */
.newsletter { background: var(--bg); }
.newsletter-box {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
    background: linear-gradient(120deg, var(--panel) 0%, var(--panel-2) 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 42px;
}
.newsletter-box p { color: var(--muted); margin-top: 8px; }
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter-form input {
    flex: 1;
    min-width: 200px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--light);
    padding: 13px 20px;
    font-family: var(--font-body);
}
.newsletter-form input:focus { outline: 2px solid var(--cyan); }
.btn-cyan {
    background: var(--cyan);
    color: var(--bg);
    border: 0;
    border-radius: 999px;
    padding: 13px 26px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}
.btn-cyan:hover { background: #fff; }
.form-feedback { width: 100%; color: var(--cyan); font-family: var(--font-mono); font-size: 0.9rem; }

/* ---------- Glossário ---------- */
.glossario { background: var(--bg); }
.glossario-lista { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.glossario-item {
    background: var(--panel);
    border: 1px solid var(--line);
    border-left: 4px solid var(--cyan);
    border-radius: 10px;
    padding: 18px 22px;
}
.glossario-item dt { font-family: var(--font-mono); color: var(--cyan); font-size: 0.95rem; margin-bottom: 4px; }
.glossario-item dd { color: var(--muted); font-size: 0.93rem; }

/* ---------- Sobre o portal ---------- */
.sobre-portal { background: var(--panel-2); }
.sobre-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.sobre-bloco { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.sobre-bloco h3 { margin-bottom: 10px; }
.sobre-bloco p { color: var(--muted); font-size: 0.94rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--panel); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 0.75fr 0.75fr; gap: 36px; padding: 52px 0 36px; }
.footer-brand .brand-mark { display: inline-block; margin-bottom: 12px; }
.footer-name { font-family: var(--font-display); font-size: 1.3rem; color: var(--light); margin-bottom: 10px; }
.footer-name em { font-style: normal; color: var(--cyan); }
.footer-brand p:not(.footer-name) { color: var(--muted); font-size: 0.93rem; max-width: 30rem; }
.footer-nav, .footer-links { display: grid; gap: 10px; align-content: start; }
.footer-nav h4, .footer-links h4 { font-size: 0.95rem; color: var(--light); margin-bottom: 6px; }
.footer-nav a, .footer-links a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.footer-nav a:hover, .footer-links a:hover { color: var(--cyan); }
.footer-bottom {
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    border-top: 1px solid var(--line);
    padding-top: 18px; padding-bottom: 24px;
    font-size: 0.82rem; color: var(--muted);
}
.mono-footer { font-family: var(--font-mono); }
