/* =============================================================
   HELPREX Knowledge Base — REXSUITE brand system
   Hero dark ink, leitura em paper, Geist + Geist Mono.
   ============================================================= */

:root {
    --ink:       #0A0A0B;
    --ink-2:     #131316;
    --ink-3:     #1E1E22;
    --line:      #2E2E34;
    --muted:     #6B6B72;
    --muted-2:   #9A9AA1;
    --paper:     #F4F1EA;
    --paper-2:   #E9E4D9;
    --paper-3:   #D9D3C5;

    --coral:     #FF4D2E;
    --coral-glow:rgba(255,77,46,.20);
    --coral-dark:#B82A12;

    --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --mono: "Geist Mono", ui-monospace, monospace;
    --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}
::selection { background: var(--coral); color: var(--ink); }

a { color: var(--coral-dark); text-decoration: none; transition: opacity .12s var(--ease-out); }
a:hover { opacity: .75; }

/* ---- Hero ---- */
header.kb-hero {
    background: var(--ink);
    color: var(--paper);
    padding: 100px 24px 88px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
header.kb-hero::before {
    content: "";
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 30% 25%, var(--coral-glow), transparent 50%),
        radial-gradient(circle at 75% 70%, rgba(255,77,46,.08), transparent 55%);
    pointer-events: none;
}
header.kb-hero .brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    text-decoration: none;
    position: relative;
}
header.kb-hero .rex-icon {
    width: 36px; height: 36px;
    background: var(--coral);
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
}
header.kb-hero .rex-icon img { width: 80%; height: 80%; object-fit: contain; }
header.kb-hero .wm {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--paper);
    line-height: 1;
}
header.kb-hero .wm .pre { font-weight: 400; opacity: .45; }
header.kb-hero .wm .rex { font-weight: 800; color: var(--coral); }

header.kb-hero h1 {
    font-family: var(--font);
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: .95;
    margin: 0 auto 16px;
    color: var(--paper);
    position: relative;
    max-width: 20ch;
}
header.kb-hero h1 .accent { color: var(--coral); }
header.kb-hero .tagline {
    color: var(--muted-2);
    font-size: 1rem;
    max-width: 40ch;
    margin: 0 auto 36px;
    position: relative;
}
header.kb-hero form { position: relative; max-width: 560px; margin: 0 auto; }
header.kb-hero input {
    width: 100%;
    padding: 15px 22px 15px 50px;
    font-size: 1rem;
    border: 1px solid var(--ink-3);
    background: rgba(255,255,255,.05);
    color: var(--paper);
    border-radius: 999px;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
header.kb-hero input::placeholder { color: var(--muted); }
header.kb-hero input:focus {
    outline: none;
    background: rgba(255,255,255,.08);
    border-color: var(--coral);
    box-shadow: 0 0 0 4px rgba(255,77,46,.15);
}
header.kb-hero form::before {
    content: "";
    position: absolute;
    left: 20px; top: 50%;
    width: 18px; height: 18px;
    transform: translateY(-50%);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B6B72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E") no-repeat;
    pointer-events: none;
}

main { max-width: 760px; margin: 56px auto; padding: 0 24px; }

/* ---- Article list ---- */
article {
    padding: 32px 0;
    border-bottom: 1px solid var(--paper-3);
}
article:last-child { border-bottom: 0; }
article a {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
    display: inline-block;
    line-height: 1.25;
}
article a:hover { color: var(--coral); opacity: 1; }
article p { color: var(--muted-2); margin: 8px 0 0; font-size: .9rem; font-family: var(--mono); letter-spacing: .04em; }

/* ---- Article page ---- */
.breadcrumb {
    font-family: var(--mono);
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted-2);
    margin-bottom: 28px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--coral); opacity: 1; }

main h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0 0 12px;
}
main h1 + p {
    font-family: var(--mono);
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted-2);
    margin: 0 0 48px;
}

.article-content {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #2A2A30;
}
.article-content > * + * { margin-top: 1.15em; }
.article-content h2, .article-content h3 {
    font-family: var(--font);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-top: 2em;
}
.article-content h2 { font-size: 1.5rem; }
.article-content h3 { font-size: 1.2rem; }
.article-content img { max-width: 100%; border-radius: 12px; }
.article-content a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; color: var(--coral-dark); }
.article-content pre {
    background: var(--ink-2);
    color: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px;
    overflow-x: auto;
    font-family: var(--mono);
    font-size: .85rem;
    line-height: 1.55;
}
.article-content code {
    font-family: var(--mono);
    font-size: .85em;
    background: var(--paper-2);
    padding: 2px 6px;
    border-radius: 4px;
}
.article-content blockquote {
    border-left: 3px solid var(--coral);
    padding-left: 20px;
    color: var(--muted);
    margin: 1.6em 0;
}

footer.kb-foot {
    text-align: center;
    padding: 56px 24px;
    font-family: var(--mono);
    font-size: .68rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted-2);
    border-top: 1px solid var(--paper-3);
    margin-top: 96px;
}
