/* =========================================================
   CODIGO DA HORA - Design System v2 "Aurora Dev"
   Mobile-First | HTML5 semantico | AdSense-safe | CWV-friendly
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
    --bg: #030014;
    --bg-deep: #06021c;
    --surface: rgba(13, 10, 34, 0.66);
    --surface-solid: #0d0a22;
    --primary: #22d3ee;
    --primary-soft: rgba(34, 211, 238, 0.12);
    --violet: #a78bfa;
    --violet-soft: rgba(167, 139, 250, 0.14);
    --accent: #34d399;
    --pink: #f472b6;
    --text: #e7ecf5;
    --heading: #ffffff;
    --muted: #9aa5bd;
    --border: rgba(167, 139, 250, 0.16);
    --border-strong: rgba(34, 211, 238, 0.42);
    --grad: linear-gradient(120deg, #22d3ee 0%, #a78bfa 55%, #f472b6 110%);
    --grad-soft: linear-gradient(150deg, rgba(34, 211, 238, 0.08), rgba(167, 139, 250, 0.1));
    --glow-cyan: 0 12px 40px -12px rgba(34, 211, 238, 0.45);
    --radius: 22px;
    --radius-sm: 14px;
    --max-width: 1240px;
    --header-h: 68px;
    --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-display: 'Space Grotesk', 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-code: 'Fira Code', ui-monospace, 'Cascadia Code', Consolas, monospace;
    --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.75;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Grade "dev" sutil + aurora animada (CSS puro, baixo custo) */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 90%);
    mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 90%);
}

body::after {
    content: "";
    position: fixed;
    inset: -20%;
    z-index: -3;
    background:
        radial-gradient(circle 480px at 12% 6%, rgba(34, 211, 238, 0.14), transparent 60%),
        radial-gradient(circle 560px at 88% 22%, rgba(167, 139, 250, 0.16), transparent 62%),
        radial-gradient(circle 520px at 55% 96%, rgba(52, 211, 153, 0.09), transparent 60%);
    animation: aurora-drift 46s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes aurora-drift {
    0% {
        transform: translate3d(-2%, -1%, 0) scale(1);
    }
    50% {
        transform: translate3d(2%, 2%, 0) scale(1.06);
    }
    100% {
        transform: translate3d(-1%, 1%, 0) scale(1.02);
    }
}

::selection {
    background: rgba(34, 211, 238, 0.32);
    color: #fff;
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul[class],
ol[class] {
    list-style: none;
}

button {
    font: inherit;
    cursor: pointer;
    background: none;
    border: none;
    color: inherit;
}

input,
textarea {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    color: var(--heading);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1e293b, #312e81);
    border-radius: 8px;
    border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0e7490, #6d28d9);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* ---------- Utilitarios ---------- */
.container {
    width: min(100% - 32px, var(--max-width));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--primary);
    color: #030014;
    font-weight: 800;
    padding: 10px 18px;
    border-radius: 0 0 10px 0;
    z-index: 3000;
}

.skip-link:focus {
    left: 0;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Reveal on scroll (so com JS ativo) */
html.js .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s var(--ease-spring), transform 0.7s var(--ease-spring);
    transition-delay: var(--d, 0ms);
}

html.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* Barra de progresso de leitura (artigos, injetada via JS) */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    z-index: 2500;
    background: var(--grad);
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.7);
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(3, 0, 20, 0.78);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border-bottom: 1px solid transparent;
    background-clip: padding-box;
}

.site-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.5), rgba(167, 139, 250, 0.5), transparent);
    pointer-events: none;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
}

.brand:hover {
    text-decoration: none;
}

.brand img {
    width: 40px;
    height: 33px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.45));
}

.brand span {
    background: linear-gradient(120deg, #fff 30%, #67e8f9 70%, #c4b5fd);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-toggle {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--primary);
    background: var(--surface);
    transition: border-color 0.25s, box-shadow 0.25s;
}

.nav-toggle:hover {
    border-color: var(--border-strong);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.18);
}

.nav-toggle svg {
    width: 22px;
    height: 22px;
}

.nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 2px;
    padding: 10px 0 6px;
}

.nav-menu.is-open {
    display: flex;
    border-top: 1px solid var(--border);
}

.nav-menu a {
    display: block;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
}

.nav-menu a:hover,
.nav-menu a[aria-current="page"] {
    background: linear-gradient(120deg, var(--primary-soft), var(--violet-soft));
    color: var(--primary);
    text-decoration: none;
}

.nav-search {
    position: relative;
    width: 100%;
    order: 3;
}

.nav-search input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border-radius: 999px;
    background: rgba(6, 2, 28, 0.85);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 16px;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.nav-search input::placeholder {
    color: #64748b;
}

.nav-search input:focus {
    outline: none;
    border-color: var(--border-strong);
    box-shadow: 0 0 0 3px var(--primary-soft), 0 0 24px rgba(34, 211, 238, 0.12);
}

.nav-search .icon-search {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--primary);
    pointer-events: none;
}

@media (min-width: 1024px) {
    .nav-toggle {
        display: none;
    }

    .nav-menu {
        display: flex;
        flex-direction: row;
        width: auto;
        padding: 0;
        gap: 2px;
    }

    .nav-menu a {
        padding: 8px 13px;
        font-size: 0.88rem;
        white-space: nowrap;
        border-radius: 999px;
    }

    .nav-search {
        width: 250px;
        margin-left: auto;
        order: 0;
    }
}

/* ---------- Hero com terminal ---------- */
.hero {
    margin: 34px 0 10px;
    padding: 52px 24px;
    border-radius: 28px;
    border: 1px solid var(--border);
    background:
        radial-gradient(600px 240px at 85% -10%, rgba(167, 139, 250, 0.16), transparent 60%),
        radial-gradient(520px 260px at 8% 110%, rgba(34, 211, 238, 0.12), transparent 60%),
        var(--surface);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

@media (min-width: 1024px) {
    .hero {
        padding: 76px 56px;
    }

    .hero-grid {
        grid-template-columns: 1.12fr 0.88fr;
        gap: 56px;
    }
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--primary-soft);
    color: #67e8f9;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 22px;
}

.eyebrow .pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
    animation: pulse-dot 2.2s infinite;
}

@keyframes pulse-dot {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
    }
    70% {
        box-shadow: 0 0 0 9px rgba(52, 211, 153, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
    }
}

.hero h1 {
    font-size: clamp(2.1rem, 6vw, 3.6rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 18px;
}

.hero h1 .grad {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero .hero-sub {
    font-size: clamp(1rem, 2.2vw, 1.22rem);
    color: var(--muted);
    max-width: 560px;
    margin-bottom: 30px;
}

.hero .hero-sub strong {
    color: var(--primary);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* Terminal fake */
.terminal {
    width: min(560px, 100%);
    margin-inline: auto;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: #05010f;
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9), 0 0 60px -30px rgba(129, 140, 248, 0.5);
    overflow: hidden;
    animation: terminal-float 7s ease-in-out infinite;
}

@keyframes terminal-float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-9px);
    }
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(148, 163, 184, 0.07);
    border-bottom: 1px solid var(--border);
}

.terminal-bar .dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.terminal-bar .dot.r {
    background: #ff5f57;
}

.terminal-bar .dot.y {
    background: #febc2e;
}

.terminal-bar .dot.g {
    background: #28c840;
}

.terminal-title {
    margin-left: 8px;
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: #64748b;
}

.terminal-body {
    padding: 20px 22px 26px;
    font-family: var(--font-code);
    font-size: 0.86rem;
    line-height: 1.9;
    min-height: 230px;
}

.terminal-body .line {
    display: block;
    white-space: pre-wrap;
    color: #cbd5e1;
    opacity: 0;
    animation: line-in 0.45s var(--ease-spring) forwards;
    animation-delay: calc(var(--i, 0) * 0.32s + 0.4s);
}

@keyframes line-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.terminal-body .kw {
    color: #c084fc;
}

.terminal-body .fn {
    color: #22d3ee;
}

.terminal-body .str {
    color: #34d399;
}

.terminal-body .cm {
    color: #64748b;
    font-style: italic;
}

.terminal-body .num {
    color: #f472b6;
}

.terminal-caret {
    display: inline-block;
    width: 9px;
    height: 17px;
    vertical-align: text-bottom;
    background: var(--primary);
    animation: caret-blink 1.1s steps(1) infinite;
}

@keyframes caret-blink {
    50% {
        opacity: 0;
    }
}

/* ---------- Stats ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 34px 0 8px;
}

@media (min-width: 768px) {
    .stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    padding: 22px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--grad-soft);
}

.stat-num {
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 700;
    background: linear-gradient(120deg, #67e8f9, #c4b5fd);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 600;
}

/* ---------- Chips ---------- */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 26px 0 22px;
}

.chips a {
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--surface);
    transition: all 0.25s var(--ease-spring);
}

.chips a:hover {
    color: var(--primary);
    border-color: var(--border-strong);
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 8px 24px -12px rgba(34, 211, 238, 0.5);
}

.chips a.is-active {
    background: var(--grad);
    border-color: transparent;
    color: #030014;
}

.search-status {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
    min-height: 1.5em;
}

/* ---------- Layout ---------- */
.page-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
    padding-bottom: 24px;
}

@media (min-width: 1024px) {
    .page-grid {
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 36px;
    }

    .sidebar {
        position: sticky;
        top: calc(var(--header-h) + 20px);
        display: flex;
        flex-direction: column;
        gap: 22px;
    }
}

.section-title {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 30px 0 6px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-strong), transparent);
}

/* ---------- Cards (bento glass + spotlight) ---------- */
.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    margin-bottom: 40px;
}

@media (min-width: 640px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    color: inherit;
    overflow: hidden;
    transition: transform 0.35s var(--ease-spring), border-color 0.3s, box-shadow 0.35s;
}

html.js .card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), rgba(34, 211, 238, 0.13), transparent 45%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

html.js .card:hover::before {
    opacity: 1;
}

.card:hover {
    transform: translateY(-7px);
    border-color: var(--border-strong);
    box-shadow: var(--glow-cyan), 0 24px 60px -30px rgba(167, 139, 250, 0.4);
    text-decoration: none;
}

.card .badge {
    align-self: flex-start;
    padding: 4px 13px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(167, 139, 250, 0.18));
    border: 1px solid rgba(34, 211, 238, 0.28);
    color: #67e8f9;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.card h2,
.card h3 {
    font-size: 1.24rem;
    font-weight: 700;
    line-height: 1.32;
    letter-spacing: -0.01em;
}

.card p {
    color: var(--muted);
    font-size: 0.95rem;
    flex-grow: 1;
}

.card .btn-read {
    color: var(--primary);
    font-weight: 800;
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.25s var(--ease-spring), color 0.2s;
}

.card:hover .btn-read {
    gap: 12px;
    color: #7dd3fc;
}

.no-results {
    display: none;
    text-align: center;
    color: var(--muted);
    padding: 44px 20px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.no-results.is-visible {
    display: block;
}

/* ---------- Sidebar destaque ---------- */
.rail-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
}

.rail-card h3 {
    font-size: 1rem;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rail-card ol {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rail-card li a {
    display: flex;
    gap: 12px;
    align-items: baseline;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.rail-card li a:hover {
    background: var(--primary-soft);
    color: var(--primary);
    text-decoration: none;
}

.rail-card .n {
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: var(--violet);
    font-weight: 700;
}

/* ---------- Ads (AdSense-safe) ---------- */
.ad-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 120px;
    margin: 24px 0;
    padding: 8px;
    border: 1px dashed rgba(148, 163, 184, 0.22);
    border-radius: var(--radius-sm);
    background: rgba(148, 163, 184, 0.03);
    overflow: hidden;
}

.ad-box .ad-label {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #526079;
}

.ad-box ins {
    max-width: 100%;
}

.ad-box--leaderboard {
    min-height: 110px;
}

@media (min-width: 768px) {
    .ad-box--leaderboard {
        min-height: 96px;
    }
}

.ad-box--sidebar {
    min-height: 260px;
    margin: 0;
}

@media (min-width: 1024px) {
    .ad-box--sidebar {
        min-height: 600px;
    }
}

.ad-box--in-article {
    min-height: 250px;
    margin: 42px 0;
}

/* ---------- Artigos ---------- */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    font-size: 0.85rem;
    color: var(--muted);
    margin: 24px 0 10px;
}

.breadcrumbs a {
    color: var(--muted);
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumbs [aria-current="page"] {
    color: var(--text);
    font-weight: 600;
}

.breadcrumbs .sep {
    color: #475569;
}

.article-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 26px;
    padding: 28px 22px;
    margin-bottom: 40px;
    overflow: hidden;
}

.article-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

@media (min-width: 768px) {
    .article-card {
        padding: 52px;
    }
}

.article-card h1 {
    font-size: clamp(1.8rem, 4.6vw, 2.9rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.025em;
    margin-bottom: 18px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: center;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    padding-bottom: 18px;
    margin-bottom: 14px;
}

.article-meta a {
    color: var(--primary);
}

.article-meta time {
    color: var(--muted);
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
}

.article-meta .badge {
    padding: 3px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(167, 139, 250, 0.18));
    border: 1px solid rgba(34, 211, 238, 0.28);
    color: #67e8f9;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
}

/* Corpo do artigo */
.article-body h2 {
    font-size: clamp(1.4rem, 3.4vw, 2.05rem);
    font-weight: 700;
    color: var(--heading);
    line-height: 1.22;
    letter-spacing: -0.015em;
    border-left: 4px solid transparent;
    border-image: linear-gradient(180deg, var(--primary), var(--violet)) 1;
    padding-left: 18px;
    margin: 50px 0 22px;
    scroll-margin-top: calc(var(--header-h) + 18px);
}

.article-body h3 {
    font-size: clamp(1.15rem, 3vw, 1.5rem);
    font-weight: 700;
    margin: 36px 0 16px;
    scroll-margin-top: calc(var(--header-h) + 18px);
}

.article-body p {
    margin-bottom: 20px;
    color: #ccd4e3;
    font-size: 1.08rem;
}

.article-body ul,
.article-body ol {
    margin: 0 0 24px 26px;
    color: #ccd4e3;
}

.article-body li {
    margin-bottom: 10px;
}

.article-body li::marker {
    color: var(--primary);
}

.article-body a {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(34, 211, 238, 0.45);
}

.article-body a:hover {
    text-decoration-color: var(--primary);
}

.article-body strong {
    color: #fff;
}

/* Blocos de codigo */
.article-body pre {
    position: relative;
    background: #05010f;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 22px 20px;
    margin: 32px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: inset 3px 0 12px -6px rgba(34, 211, 238, 0.6);
}

.article-body pre code {
    font-family: var(--font-code);
    color: #a5f3fc;
    font-size: 0.94rem;
    line-height: 1.75;
    white-space: pre;
    display: block;
}

.article-body :not(pre) > code {
    font-family: var(--font-code);
    background: rgba(34, 211, 238, 0.1);
    color: #7dd3fc;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.92em;
    border: 1px solid rgba(34, 211, 238, 0.18);
}

/* Botao copiar (injetado via JS) */
.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--border);
    border-radius: 999px;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.25s var(--ease-spring);
}

.article-body pre:hover .copy-btn,
.copy-btn:focus-visible {
    opacity: 1;
    transform: none;
}

.copy-btn:hover {
    color: var(--primary);
    border-color: var(--border-strong);
    background: var(--primary-soft);
}

.copy-btn.copied {
    color: var(--accent);
    border-color: rgba(52, 211, 153, 0.5);
    opacity: 1;
}

/* Author box */
.author-box {
    display: flex;
    gap: 16px;
    align-items: center;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.07), rgba(167, 139, 250, 0.09));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-top: 50px;
}

.author-box .avatar {
    flex-shrink: 0;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--grad);
    color: #030014;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glow-cyan);
}

.author-box h4 {
    font-size: 1rem;
}

.author-box p {
    font-size: 0.88rem;
    color: var(--muted);
    margin: 0;
}

.article-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    margin-top: 34px;
}

/* ---------- Botoes ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.92rem;
    font-family: var(--font-display);
    letter-spacing: 0.01em;
    transition: transform 0.25s var(--ease-spring), box-shadow 0.25s, filter 0.2s;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--grad);
    color: #030014;
    box-shadow: var(--glow-cyan);
}

.btn-primary:hover {
    filter: brightness(1.08);
    box-shadow: 0 16px 44px -12px rgba(34, 211, 238, 0.6);
}

.btn-ghost {
    border: 1px solid var(--border-strong);
    color: var(--primary);
    background: var(--surface);
}

.btn-ghost:hover {
    border-color: var(--primary);
    box-shadow: 0 0 22px rgba(34, 211, 238, 0.18);
}

/* ---------- Paginas institucionais ---------- */
.legal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 26px;
    padding: 28px 22px;
    margin: 28px 0 48px;
}

@media (min-width: 768px) {
    .legal-card {
        padding: 52px;
    }
}

.legal-card h1 {
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    background: linear-gradient(120deg, #fff 20%, #67e8f9 65%, #c4b5fd);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.legal-card .updated {
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 30px;
}

.legal-card h2 {
    font-size: 1.28rem;
    margin: 34px 0 12px;
}

.legal-card h3 {
    font-size: 1.06rem;
    margin: 22px 0 10px;
}

.legal-card p,
.legal-card li {
    color: #ccd4e3;
    margin-bottom: 14px;
}

.legal-card ul,
.legal-card ol {
    margin: 0 0 18px 24px;
}

.legal-card li::marker {
    color: var(--primary);
}

.legal-card a {
    font-weight: 700;
}

/* ---------- Contato ---------- */
.contact-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
}

@media (min-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-info .info-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--grad-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color 0.25s, transform 0.25s var(--ease-spring);
}

.contact-info .info-item:hover {
    border-color: var(--border-strong);
    transform: translateY(-3px);
}

.contact-info .info-item svg {
    width: 22px;
    height: 22px;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 4px;
}

.contact-info .info-item h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.contact-info .info-item p {
    color: var(--muted);
    font-size: 0.92rem;
    margin: 0;
}

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

.contact-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 700;
}

.contact-form input,
.contact-form textarea {
    background: rgba(6, 2, 28, 0.85);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 16px;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--border-strong);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

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

.contact-form .form-note {
    font-size: 0.8rem;
    color: var(--muted);
}

/* ---------- Consentimento ---------- */
.consent-bar {
    position: fixed;
    inset-inline: 12px;
    bottom: 12px;
    z-index: 2000;
    display: none;
    gap: 14px;
    flex-direction: column;
    background: rgba(8, 5, 26, 0.96);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7), 0 0 40px -20px rgba(34, 211, 238, 0.4);
}

.consent-bar.is-visible {
    display: flex;
}

@media (min-width: 900px) {
    .consent-bar {
        flex-direction: row;
        align-items: center;
        inset-inline: auto;
        left: 50%;
        transform: translateX(-50%);
        width: min(92%, 980px);
    }
}

.consent-bar p {
    font-size: 0.9rem;
    color: var(--muted);
    flex: 1;
}

.consent-bar .consent-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.site-footer {
    position: relative;
    margin-top: 72px;
    padding: 56px 0 42px;
    text-align: center;
    border-top: 1px solid transparent;
    background: linear-gradient(180deg, transparent, rgba(13, 10, 34, 0.6));
}

.site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.5), rgba(34, 211, 238, 0.5), transparent);
}

.site-footer .footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    margin-bottom: 10px;
}

.site-footer .footer-brand img {
    height: 30px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.4));
}

.site-footer .footer-tagline {
    color: var(--muted);
    font-size: 0.9rem;
    max-width: 560px;
    margin: 0 auto 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 1.4fr 1fr 1fr 1fr;
        text-align: left;
    }
}

.footer-col h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary);
    margin-bottom: 14px;
}

.footer-col a {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 5px 0;
    transition: color 0.2s, transform 0.2s var(--ease-spring);
}

.footer-col a:hover {
    color: var(--primary);
    text-decoration: none;
    transform: translateX(3px);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 22px;
    margin-bottom: 24px;
}

.footer-links a {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-cats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
    margin-bottom: 26px;
}

.footer-cats a {
    color: #64748b;
    font-size: 0.82rem;
}

.footer-cats a:hover {
    color: var(--primary);
}

.footer-copy {
    color: #64748b;
    font-size: 0.82rem;
}
