/* ============================================================================
   OITO — sistema visual
   Grafite arquitetônico + terracota + verde-represa. Claro e escuro.
   ========================================================================== */

:root {
    --bg:           #FFFFFF;
    --surface:      #F6F5F2;
    --surface-2:    #EDEBE5;
    --text:         #16181D;
    --muted:        #565B63;
    --border:       #E3E1DA;
    --primary:      #A4552E;   /* terracota — cor de marca */
    --on-primary:   #FFFFFF;
    --accent:       #2E6F63;   /* verde-represa */
    --accent-text:  #245A50;
    --grid:         #E7E4DC;   /* linhas de desenho técnico */
    --ink:          #2A2D34;   /* traço de planta */
    --water:        #4FA3C7;
    --shadow:       0 1px 2px rgba(22,24,29,.05), 0 8px 24px rgba(22,24,29,.06);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:          #0E0F12;
        --surface:     #17191E;
        --surface-2:   #1F222A;
        --text:        #ECEAE4;
        --muted:       #9BA0A8;
        --border:      #272B33;
        --primary:     #E08A5B;
        --on-primary:  #16181D;
        --accent:      #56B8A4;
        --accent-text: #56B8A4;
        --grid:        #22262D;
        --ink:         #C9CDD4;
        --water:       #5FB6DC;
        --shadow:      0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 7.5rem; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; animation: none !important; }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }
.wrap-wide { max-width: 84rem; margin: 0 auto; padding: 0 1.25rem; }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.55rem, 3vw, 2.05rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }
p { color: var(--muted); }
a { color: var(--primary); }
strong { color: var(--text); }
section { padding: 4.5rem 0; }
hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ header */
header.site {
    position: sticky; top: 0; z-index: 40;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 4rem; gap: 1rem; }
.logo {
    display: flex; align-items: center; gap: 0.6rem; text-decoration: none;
    font-weight: 800; font-size: 1.15rem; letter-spacing: 0.04em; color: var(--text);
    white-space: nowrap;
}
.logo b { color: var(--primary); font-weight: 800; letter-spacing: 0; }
.logo svg { flex: none; }
.nav > nav { display: flex; align-items: center; }
.nav ul { display: flex; gap: 1.4rem; list-style: none; }
.nav ul a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav ul a:hover { color: var(--text); }
.nav ul a.active { color: var(--text); }
#navToggle {
    display: none; background: none; border: 1px solid var(--border);
    border-radius: 8px; padding: 0.35rem 0.55rem; color: var(--text);
    cursor: pointer; font-size: 1rem; line-height: 1;
}
@media (max-width: 900px) {
    #navToggle { display: block; }
    .nav ul {
        display: none; position: absolute; top: 4rem; left: 0; right: 0;
        flex-direction: column; gap: 0; background: var(--bg);
        border-bottom: 1px solid var(--border); padding: 0.5rem 1.25rem 1rem;
    }
    .nav ul.open { display: flex; }
    .nav ul li { padding: 0.5rem 0; }
}

/* -------------------------------------------------------------- primitivos */
.kicker {
    color: var(--accent-text); font-weight: 700; font-size: 0.82rem;
    text-transform: uppercase; letter-spacing: 0.1em;
}
.section-head { max-width: 42rem; margin-bottom: 2.5rem; }
.section-head p { margin-top: 0.75rem; }
.band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.btn {
    display: inline-block; padding: 0.8rem 1.4rem; border-radius: 10px;
    font-weight: 600; text-decoration: none; font-size: 1rem;
    transition: filter .15s ease; border: 1px solid transparent; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-ghost { border-color: var(--border); color: var(--text); background: transparent; }
.cta-row { display: flex; gap: 0.85rem; flex-wrap: wrap; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.4rem; }
.cards-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(21rem, 1fr)); gap: 1.4rem; }
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; padding: 1.5rem;
}
.band .card, .card-plain { background: var(--bg); }
.card h3 { margin-bottom: 0.5rem; }
.card p { font-size: 0.98rem; }
.card .num { font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.card svg { display: block; margin: 0.9rem 0; color: var(--accent); }

.pill {
    display: inline-block; padding: 0.2rem 0.62rem; border-radius: 999px;
    border: 1px solid var(--border); background: var(--surface);
    font-size: 0.78rem; font-weight: 600; color: var(--muted);
}
.pill-accent { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.pills { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ------------------------------------------------------------------ tabelas */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; margin: 1.25rem 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; min-width: 34rem; }
caption { caption-side: top; text-align: left; padding: 0.75rem 0.9rem; font-size: 0.85rem;
    color: var(--muted); background: var(--surface); border-bottom: 1px solid var(--border); }
thead th {
    text-align: left; background: var(--surface); color: var(--text);
    font-weight: 700; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border);
}
tbody td { padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--border); color: var(--muted); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
tbody td:first-child { color: var(--text); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
tfoot td { padding: 0.65rem 0.9rem; border-top: 2px solid var(--border); color: var(--text); font-weight: 700;
    font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------- listas */
/* The marker is absolute, not a flex child: with `display:flex` on the item,
   a <b> inside the text became a second flex item and broke onto its own line. */
.checklist { list-style: none; display: grid; gap: 0.7rem; }
.checklist li {
    position: relative; padding-left: 1.45rem;
    color: var(--muted); font-size: 0.98rem;
}
.checklist li::before {
    content: "\2713"; position: absolute; left: 0; top: 0;
    color: var(--accent); font-weight: 800; font-size: 0.95rem; line-height: 1.6;
}
.datalist { list-style: none; display: grid; gap: 0.5rem; }
.datalist li { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
    border-bottom: 1px dashed var(--border); padding-bottom: 0.5rem; font-size: 0.95rem; color: var(--muted); }
.datalist li b { color: var(--text); font-weight: 600; }
.datalist li span { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* --------------------------------------------------------------------- nota */
.note {
    border-left: 3px solid var(--accent); background: var(--surface);
    padding: 1rem 1.15rem; border-radius: 0 10px 10px 0; margin: 1.5rem 0;
}
.note p { font-size: 0.95rem; }
.note p + p { margin-top: 0.6rem; }
.note b { color: var(--text); }
.note-warning { border-left-color: var(--primary); }

/* ---------------------------------------------------------------- desenhos */
.sheet {
    border: 1px solid var(--border); border-radius: 14px; background: var(--bg);
    overflow: hidden; margin: 1.75rem 0;
}
.sheet-head {
    display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
    padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--border);
    background: var(--surface); flex-wrap: wrap;
}
.sheet-head h3 { font-size: 0.98rem; }
.sheet-head .sheet-scale { font-size: 0.78rem; color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.sheet-body { overflow-x: auto; padding: 0.6rem; }
.sheet svg { display: block; min-width: 46rem; width: 100%; height: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 0.45rem 1.2rem; padding: 0.85rem 1.1rem;
    border-top: 1px solid var(--border); font-size: 0.82rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.legend i { width: 0.85rem; height: 0.85rem; border-radius: 3px; display: inline-block; flex: none;
    border: 1px solid var(--border); }

/* ------------------------------------------------------------- sub-navegação */
.subnav { border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 4rem; z-index: 30; }
.subnav-inner { display: flex; gap: 0.25rem; overflow-x: auto; padding: 0.5rem 0; }
.subnav a {
    white-space: nowrap; text-decoration: none; color: var(--muted);
    font-size: 0.9rem; font-weight: 600; padding: 0.45rem 0.8rem; border-radius: 8px;
}
.subnav a:hover { background: var(--surface); color: var(--text); }
.subnav a.active { background: var(--primary); color: var(--on-primary); }

/* ------------------------------------------------------------------- rodapé */
footer.site { border-top: 1px solid var(--border); padding: 2.5rem 0; margin-top: 2rem; }
.foot { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; align-items: flex-start; }
.foot p, .foot a { font-size: 0.9rem; color: var(--muted); }
.foot nav { display: flex; flex-direction: column; gap: 0.55rem; }
.foot .logo { font-size: 1.05rem; margin-bottom: 0.5rem; }

/* --------------------------------------------------------------------- FAQ */
.faq details { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 0.8rem; background: var(--bg); }
.faq summary {
    cursor: pointer; padding: 1rem 1.2rem; font-weight: 600; list-style: none;
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary); font-weight: 700; font-size: 1.2rem; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { padding: 0 1.2rem 1.1rem; font-size: 0.98rem; }

/* ------------------------------------------------------------------ figuras */
figure { margin: 1.5rem 0; }
figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.6rem; }

/* ------------------------------------------------------------------ código */
code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88em; background: var(--surface-2); padding: 0.12em 0.38em;
    border-radius: 5px; color: var(--text);
}

/* ------------------------------------------------------------------ utils */
.visually-hidden {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
}
.skip {
    position: absolute; left: 0.5rem; top: -4rem; z-index: 100;
    background: var(--primary); color: var(--on-primary);
    padding: 0.6rem 1rem; border-radius: 8px; text-decoration: none; font-weight: 600;
}
.skip:focus { top: 0.5rem; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px;
}
.stack > * + * { margin-top: 1rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.75rem; }
.mt-2 { margin-top: 1.5rem; }
.mt-3 { margin-top: 2.25rem; }

/* --------------------------------------------------------------- layouts */
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 2.25rem; } }

.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 860px) { .badges { grid-template-columns: 1fr; } }

.project-split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; align-items: stretch; }
@media (max-width: 860px) { .project-split { grid-template-columns: 1fr; } }

.badge { display: flex; gap: 0.8rem; align-items: center; padding: 1rem 1.15rem; }
.badge svg { margin: 0; flex: none; color: var(--accent); }
.badge b { font-size: 0.95rem; }

/* ----------------------------------------------------------- language link */
.nav ul a.lang {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.22rem 0.7rem;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}
.nav ul a.lang:hover { background: var(--surface); color: var(--text); }
@media (max-width: 900px) {
    .nav ul a.lang { display: inline-block; margin-top: 0.35rem; }
}

/* ------------------------------------------------------------- sheet notes */
.sheet-note { padding: 0.75rem 1.1rem; border-top: 1px solid var(--border);
    font-size: 0.85rem; color: var(--muted); }
