@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@700;800&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@500&display=swap');

/* Tokens: ver DESIGN.md. Azul-marinho e verde-folha do logo. */
:root {
    --ink: #0E1830;
    --paper: #F6F6F2;
    --white: #FFFFFF;
    --muted: #4B5563;
    --rule: #CFD3CB;
    --on-ink: #E6EAF2;
    --on-ink-muted: #B4BED1;
    --rule-ink: #2E3C61;
    --lime: #BEE36E;
    --lime-hover: #CDEB8A;
    --green: #3F6F1A;
    --green-tint: #E4EFD3;
    --st-yellow: #D9A21B;
    --st-red: #B3261E;
    --st-blue: #1F5FA8;
    --st-gray: #8A919E;

    --font-display: 'Archivo', 'IBM Plex Sans', sans-serif;
    --font-text: 'IBM Plex Sans', -apple-system, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

    --radius: 6px;
    --max: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    font-family: var(--font-text);
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    text-wrap: balance;
}
h2 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); letter-spacing: -0.015em; line-height: 1.15; }
h3 { font-size: 1.2rem; line-height: 1.2; }
p { text-wrap: pretty; }

a { color: var(--green); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.site-nav a:focus-visible, .site-nav button:focus-visible,
.hero a:focus-visible, .cta a:focus-visible, .site-footer a:focus-visible,
.modal button:focus-visible { outline-color: var(--lime); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Nav ── */
.site-nav { background: var(--ink); color: var(--on-ink); }
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.wordmark {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: 0.06em;
    color: var(--white);
    text-decoration: none;
}
.wordmark span { color: var(--lime); }
.site-nav ul { display: flex; gap: 28px; list-style: none; align-items: center; }
.site-nav ul a, .site-nav button.link {
    color: var(--on-ink-muted);
    text-decoration: none;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    background: none;
    border: 0;
    cursor: pointer;
    transition: color 150ms ease-out;
}
.site-nav ul a:hover, .site-nav button.link:hover { color: var(--white); }
.site-nav ul a[aria-current="page"] { color: var(--white); box-shadow: 0 2px 0 var(--lime); }
.site-nav ul a.nav-contact { color: var(--lime); font-weight: 600; }
.site-nav .show-md { display: none; }

/* ── Botões ── */
.btn-primary {
    display: inline-block;
    background: var(--lime);
    color: var(--ink);
    padding: 15px 26px;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: background-color 150ms ease-out;
}
.btn-primary:hover { background: var(--lime-hover); }
.link-ink { color: var(--white); font-weight: 500; text-underline-offset: 4px; }
.link-ink:hover { color: var(--lime); }
.text-link { font-weight: 600; text-underline-offset: 4px; }

/* ── Hero ── */
.hero { background: var(--ink); color: var(--on-ink); padding: 72px 0 0; }
.hero h1 {
    color: var(--white);
    font-size: clamp(2.3rem, 5.6vw, 4.75rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
    max-width: 21ch;
    margin-bottom: 32px;
}
.hero mark {
    background: var(--lime);
    color: var(--ink);
    padding: 0 0.12em;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
.hero .lead { font-size: 1.25rem; color: var(--on-ink-muted); max-width: 58ch; margin-bottom: 36px; }
.hero .actions { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; margin-bottom: 72px; }

/* As três respostas que o cliente procura */
.ficha { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule-ink); }
.ficha > div { padding: 28px 32px 56px 0; }
.ficha > div + div { padding-left: 32px; border-left: 1px solid var(--rule-ink); }
.ficha dt {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--lime);
    margin-bottom: 10px;
}
.ficha dd { color: var(--on-ink); font-size: 1rem; max-width: 40ch; }

/* ── Seções: título na margem, conteúdo ao lado ── */
.row { border-top: 1px solid var(--rule); padding: 80px 0; }
.row:first-of-type { border-top: 0; }
.row .wrap { display: grid; grid-template-columns: 3fr 9fr; gap: 64px; }
.row--flat .wrap { display: block; }
.rail { align-self: start; position: sticky; top: 28px; }
.rail p { color: var(--muted); font-size: 0.95rem; margin-top: 12px; max-width: 30ch; }

/* ── Ledger: sem o sistema / com o sistema ── */
.ledger { width: 100%; border-collapse: collapse; }
.ledger th {
    text-align: left;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0 32px 12px 0;
    border-bottom: 1px solid var(--ink);
}
.ledger th + th { color: var(--green); }
.ledger td { padding: 20px 32px 20px 0; vertical-align: top; border-bottom: 1px solid var(--rule); width: 50%; }
.ledger td:first-child { color: var(--muted); }
.ledger td:last-child { font-weight: 500; padding-right: 0; }

/* ── Documento com definição (Resíduos) ── */
.docrow { display: grid; grid-template-columns: 2fr 5fr; gap: 48px; padding: 32px 0; border-bottom: 1px solid var(--rule); }
.docrow:first-child { padding-top: 0; }
.docrow .acronym { font-family: var(--font-display); font-weight: 800; font-size: clamp(3rem, 6vw, 4.5rem); line-height: 0.95; letter-spacing: -0.03em; }
.docrow .full { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }
.docrow .def { font-size: 1.15rem; max-width: 52ch; margin-bottom: 20px; }
.docrow .label {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 8px;
}
.docrow ul { padding-left: 20px; }
.docrow li { margin-bottom: 6px; max-width: 58ch; }

/* ── Passos em sequência ── */
.vsteps { list-style: none; counter-reset: v; }
.vsteps li {
    counter-increment: v;
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 16px;
    padding: 24px 0;
    border-top: 1px solid var(--rule);
}
.vsteps li:last-child { border-bottom: 1px solid var(--rule); }
.vsteps li::before { content: counter(v); font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; line-height: 1; color: var(--green); }
.vsteps strong { display: block; font-size: 1.1rem; margin-bottom: 4px; }
.vsteps p { color: var(--muted); max-width: 58ch; }

/* ── Tabelas de referência ── */
.rules { width: 100%; border-collapse: collapse; border-top: 1px solid var(--ink); }
.rules th, .rules td { text-align: left; vertical-align: top; padding: 16px 24px 16px 0; border-bottom: 1px solid var(--rule); }
.rules th { width: 32%; font-weight: 600; }
.rules td { color: var(--muted); }

.table-scroll { overflow-x: auto; }
.matrix { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 0.95rem; }
.matrix th, .matrix td { text-align: left; padding: 14px 20px 14px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.matrix thead th {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--ink);
}
.matrix tbody th { font-weight: 600; white-space: nowrap; }
.matrix tbody th small { display: block; font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.matrix .yes { color: var(--green); font-weight: 600; }
.matrix-note { margin-top: 16px; font-size: 0.92rem; color: var(--muted); max-width: 64ch; }
.lead-in { font-size: 1.1rem; max-width: 56ch; margin-bottom: 28px; }

.facts { border-top: 1px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-weight: 600; }
.facts dd { color: var(--muted); }
.facts-label {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 10px;
}
.stack > * + * { margin-top: 40px; }

.prose p { max-width: 62ch; margin-bottom: 16px; }
.prose p:last-child { margin-bottom: 0; }

/* ── Home: produtos explicados ── */
.product { border-top: 1px solid var(--ink); padding: 48px 0; display: grid; grid-template-columns: 5fr 7fr; gap: 64px; }
.product h2 { font-size: clamp(2rem, 3.6vw, 3rem); letter-spacing: -0.025em; line-height: 1; margin-bottom: 20px; }
.product .more { display: inline-block; margin-top: 4px; }
.product dl > div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.product dl > div:last-child { border-bottom: 0; }
.product dt {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--green);
    padding-top: 4px;
}
.product dd { max-width: 58ch; }
.product--minor { padding: 28px 0; }
.product--minor h2 { font-size: 1.5rem; margin-bottom: 0; }

/* ── Chamada final ── */
.cta { background: var(--ink); color: var(--on-ink); padding: 96px 0; }
.cta .wrap { display: grid; grid-template-columns: 8fr 4fr; gap: 64px; align-items: end; }
.cta h2 { color: var(--white); font-size: clamp(1.9rem, 3.6vw, 3rem); letter-spacing: -0.025em; line-height: 1.05; max-width: 20ch; }
.cta p { color: var(--on-ink-muted); margin-top: 16px; max-width: 52ch; }

.site-footer { background: var(--ink); border-top: 1px solid var(--rule-ink); padding: 28px 0; font-size: 0.9rem; color: var(--on-ink-muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--white); }

/* Modal do vídeo institucional */
.modal { display: none; position: fixed; inset: 0; z-index: 10; background: rgba(14, 24, 48, 0.94); }
.modal.open { display: grid; place-items: center; }
.modal-inner { width: min(900px, 90vw); }
.modal video { width: 100%; display: block; border-radius: var(--radius); }
.modal-close { display: block; margin: 0 0 12px auto; background: none; border: 0; color: var(--white); font: inherit; font-weight: 600; cursor: pointer; }

/* ── Responsivo ── */
@media (max-width: 960px) {
    .site-nav ul .hide-md { display: none; }
    .site-nav ul .show-md { display: list-item; }
    .row .wrap, .product, .cta .wrap, .docrow { grid-template-columns: 1fr; gap: 32px; }
    .rail { position: static; }
    .row { padding: 56px 0; }
    .ficha { grid-template-columns: 1fr; }
    .ficha > div, .ficha > div + div { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--rule-ink); }
    .ficha > div:last-child { border-bottom: 0; padding-bottom: 48px; }
    .ledger, .ledger tbody, .ledger tr, .ledger td { display: block; width: 100%; }
    .ledger thead { display: none; }
    .ledger tr { padding: 20px 0; border-bottom: 1px solid var(--rule); }
    .ledger td { border: 0; padding: 4px 0; width: 100%; }
    .ledger td::before { content: attr(data-label); display: block; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
    .ledger td:last-child::before { color: var(--green); }
    .rules th { width: auto; display: block; padding-bottom: 4px; border-bottom: 0; }
    .rules td { display: block; padding-top: 0; }
}
@media (max-width: 600px) {
    .wrap { padding: 0 20px; }
    .hero { padding-top: 48px; }
    .hero .actions { margin-bottom: 48px; }
    .site-nav ul { gap: 16px; }
    .site-nav ul .hide-sm { display: none; }
    .facts div, .product dl > div { grid-template-columns: 1fr; gap: 2px; }
    .vsteps li { grid-template-columns: 48px 1fr; }
    .cta { padding: 64px 0; }
}

/* ── Caminho de menu no Odoo ── */
.path { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-family: var(--font-mono); font-size: 0.82rem; }
.path span { border: 1px solid var(--rule); background: var(--white); padding: 3px 10px; border-radius: var(--radius); }
.path i { font-style: normal; color: var(--muted); }
.path b { font-weight: 500; color: var(--muted); }

/* ── Tarefas em poucos passos ── */
.task { padding: 28px 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 4fr 8fr; gap: 32px; }
.task:last-child { border-bottom: 1px solid var(--rule); }
.task h3 { margin-bottom: 12px; }
.task ol { padding-left: 22px; }
.task li { margin-bottom: 6px; max-width: 58ch; }
.task li::marker { color: var(--green); font-weight: 600; }

/* ── Cobertura por plataforma: tudo preenchido ── */
.cover { width: 100%; min-width: 640px; border-collapse: separate; border-spacing: 6px; margin: -6px; }
.cover thead th {
    text-align: left;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0 12px 6px;
}
.cover tbody th { text-align: left; font-weight: 600; padding: 12px 12px 12px 0; white-space: nowrap; vertical-align: middle; }
.cover tbody th small { display: block; font-weight: 400; color: var(--muted); font-size: 0.82rem; }
.cover td { background: var(--green-tint); padding: 12px 14px; border-radius: var(--radius); vertical-align: top; font-size: 0.92rem; }
.cover td strong { display: block; font-size: 0.95rem; }
.cover td span { color: var(--muted); font-size: 0.85rem; }
.cover td.strong { background: var(--green); color: var(--white); }
.cover td.strong span { color: #E4EFD3; }

/* ── Legenda de situações ── */
.legend { list-style: none; border-top: 1px solid var(--ink); }
.legend li { display: grid; grid-template-columns: 24px 140px 1fr; gap: 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.legend .sw { width: 12px; height: 12px; display: inline-block; }
.legend .sw--green { background: var(--green); }
.legend .sw--yellow { background: var(--st-yellow); }
.legend .sw--red { background: var(--st-red); }
.legend .sw--blue { background: var(--st-blue); }
.legend .sw--gray { background: var(--st-gray); }
.legend strong { font-weight: 600; }
.legend span:last-child { color: var(--muted); }

@media (max-width: 960px) {
    .task { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 600px) {
    .legend li { grid-template-columns: 24px 1fr; }
    .legend span:last-child { grid-column: 2; }
}
