/* ==========================================================================
   CÓDIGO100ERROS — site institucional
   Paleta alinhada com o portal (frontend/src/styles.css): azul + branco,
   verde como acento. Sem build: CSS à mão, uma só folha.
   ========================================================================== */

:root {
  /* Marca */
  --navy:        oklch(0.27 0.06 262);
  --blue:        oklch(0.55 0.19 258);
  --blue-dark:   oklch(0.45 0.17 258);
  --blue-soft:   oklch(0.93 0.04 250);
  --green:       oklch(0.70 0.14 163);
  --green-dark:  oklch(0.55 0.12 163);

  /* Superfícies */
  --bg:          oklch(0.975 0.012 250);
  --surface:     oklch(1 0 0);
  --surface-alt: oklch(0.955 0.018 248);
  --border:      oklch(0.90 0.018 248);

  /* Texto */
  --ink:         oklch(0.27 0.06 262);
  --ink-muted:   oklch(0.53 0.035 258);
  --on-dark:     oklch(0.985 0.01 250);

  --radius:      0.7rem;
  --radius-lg:   1.1rem;
  --shadow-sm:   0 1px 2px oklch(0.27 0.06 262 / 0.06);
  --shadow:      0 4px 16px oklch(0.27 0.06 262 / 0.08);
  --shadow-lg:   0 18px 48px oklch(0.27 0.06 262 / 0.13);

  --maxw:        1120px;
  --gutter:      clamp(1.25rem, 4vw, 2.5rem);

  /* Visto usado nas listas (.checklist, .portal-card li) — SVG inline como máscara,
     para herdar a cor de fundo do elemento em vez de trazer cor própria. */
  --check-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-dark); text-underline-offset: 0.2em; }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5vw, 3.35rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.35rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1.1em; }
ul { margin: 0 0 1.1em; padding-left: 1.2em; }
li { margin-bottom: .4em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section--alt { background: var(--surface); border-block: 1px solid var(--border); }
.section__head { max-width: 46rem; margin-bottom: 3rem; }
.section__head p { color: var(--ink-muted); font-size: 1.125rem; margin-bottom: 0; }
.eyebrow {
  display: inline-block; margin-bottom: .9rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--green-dark);
}
.lead { font-size: clamp(1.075rem, 2vw, 1.28rem); color: var(--ink-muted); }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: var(--on-dark); padding: .75rem 1.25rem; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .72rem 1.35rem; border-radius: var(--radius);
  font-weight: 600; font-size: .975rem; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary  { background: var(--blue); color: var(--on-dark); box-shadow: var(--shadow-sm); }
.btn--primary:hover  { background: var(--blue-dark); color: var(--on-dark); }
.btn--portal   { background: var(--green); color: oklch(0.22 0.05 165); box-shadow: var(--shadow-sm); }
.btn--portal:hover   { background: var(--green-dark); color: var(--on-dark); }
.btn--ghost    { background: transparent; color: var(--navy); border-color: var(--border); }
.btn--ghost:hover    { background: var(--blue-soft); border-color: var(--blue); color: var(--navy); }
.btn--on-dark  { background: oklch(1 0 0 / 0.12); color: var(--on-dark); border-color: oklch(1 0 0 / 0.28); }
.btn--on-dark:hover  { background: oklch(1 0 0 / 0.2); color: var(--on-dark); }
.btn--lg { padding: .9rem 1.7rem; font-size: 1.02rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .85rem; }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: oklch(1 0 0 / 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; gap: 1rem; min-height: 4.75rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--navy); margin-right: auto; }
.brand img { height: 2.5rem; width: auto; }
.brand__name { font-weight: 800; letter-spacing: -.02em; font-size: 1.05rem; line-height: 1.1; }
.brand__tag { display: block; font-size: .72rem; font-weight: 600; color: var(--ink-muted); letter-spacing: .06em; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: .35rem; }

/* Links de topo. Child combinator (`>`) e classe própria para o link do menu, para
   que os itens do submenu NÃO herdem o aspeto de pastilha. */
.nav > a, .nav__link {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .5rem .8rem; border-radius: var(--radius); text-decoration: none;
  color: var(--ink-muted); font-weight: 600; font-size: .95rem;
  transition: background-color .15s ease, color .15s ease;
}
.nav > a:hover, .nav__link:hover { background: var(--surface-alt); color: var(--navy); }
.nav > a[aria-current="page"],
.nav__link[aria-current="page"] { color: var(--navy); background: var(--blue-soft); }

/* ---------- Submenu de Serviços ----------
   Abre com o rato (:hover) e com o teclado (:focus-within). Em toque, tocar em
   "Serviços" navega para a página completa, que é o comportamento esperado. */
.nav-item { position: relative; }
.nav__chevron { width: .85rem; height: .85rem; transition: transform .18s ease; }
.nav-item:hover .nav__chevron,
.nav-item:focus-within .nav__chevron { transform: rotate(180deg); }

.nav-menu {
  position: absolute; top: 100%; left: 0; z-index: 50;
  /* padding-top faz de ponte: o rato atravessa da pastilha para o menu sem o fechar */
  padding-top: .45rem;
  min-width: 17.5rem;
  opacity: 0; visibility: hidden; transform: translateY(-.35rem);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.nav-item:hover .nav-menu,
.nav-item:focus-within .nav-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.nav-menu__inner {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: .5rem; overflow: hidden;
}
.nav-menu__title {
  margin: .35rem .75rem .5rem; font-size: .7rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted);
}
.nav-menu a {
  display: block; padding: .55rem .75rem; border-radius: var(--radius);
  text-decoration: none; color: var(--ink); font-size: .93rem; font-weight: 500;
  line-height: 1.35; transition: background-color .13s ease, color .13s ease;
}
.nav-menu a:hover { background: var(--blue-soft); color: var(--navy); }
.nav-menu__all {
  display: block; margin-top: .35rem; padding: .6rem .75rem;
  border-top: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 650; color: var(--blue-dark) !important;
}

.header-cta { display: flex; align-items: center; gap: .6rem; margin-left: .75rem; }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; padding: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--navy); cursor: pointer;
}
.nav-toggle svg { width: 1.4rem; height: 1.4rem; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle[aria-expanded="true"] .icon-open  { display: none; }

@media (max-width: 62rem) {
  .nav-toggle { display: inline-flex; }
  .site-header__inner { flex-wrap: wrap; }
  .nav, .header-cta {
    display: none; flex-direction: column; align-items: stretch;
    width: 100%; gap: .3rem; margin: 0;
  }
  .site-header.is-open .nav { display: flex; padding-top: .5rem; }
  .site-header.is-open .header-cta { display: flex; padding-bottom: 1rem; gap: .5rem; }
  .site-header.is-open .header-cta .btn { justify-content: center; }
  .nav > a, .nav__link { padding: .7rem .8rem; }

  /* Sem rato não há hover: o submenu passa a lista indentada, sempre visível
     dentro do menu hambúrguer. */
  .nav-item { width: 100%; }
  .nav__link { justify-content: space-between; }
  .nav__chevron { display: none; }
  .nav-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    min-width: 0; padding-top: .15rem; padding-left: .8rem;
  }
  .nav-menu__inner {
    border: 0; border-left: 2px solid var(--border); border-radius: 0;
    box-shadow: none; background: transparent; padding: .1rem 0 .1rem .6rem;
  }
  .nav-menu__title { display: none; }
  .nav-menu a { padding: .5rem .6rem; font-size: .9rem; }
  .nav-menu__all { border-top: 0; margin-top: .1rem; }
}

/* O cabeçalho é sticky: sem isto, o título da secção fica escondido por baixo
   dele quando se salta para uma âncora do submenu. */
[id="contabilidade"], [id="fiscalidade"], [id="salarios"], [id="consultoria"],
[id="projetos-investimento"], [id="projetos-ia"], [id="erp-cliente"] {
  scroll-margin-top: 5.5rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(80rem 40rem at 78% -20%, oklch(0.55 0.19 258 / 0.16), transparent 60%),
    radial-gradient(50rem 30rem at 0% 110%, oklch(0.70 0.14 163 / 0.12), transparent 62%),
    linear-gradient(180deg, oklch(0.985 0.012 250), var(--bg));
  border-bottom: 1px solid var(--border);
  padding-block: clamp(3.5rem, 9vw, 7rem);
}
.hero__grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; }
@media (min-width: 60rem) { .hero__grid { grid-template-columns: 1.05fr .95fr; } }
.hero h1 { margin-bottom: .5em; }
.hero h1 .accent { color: var(--blue); }
.hero__note { font-size: .92rem; color: var(--ink-muted); margin-top: 1.4rem; margin-bottom: 0; }

/* Cartão de destaque do portal dentro do hero */
.portal-card {
  background: linear-gradient(155deg, var(--navy), oklch(0.33 0.09 258));
  color: var(--on-dark);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  box-shadow: var(--shadow-lg);
}
.portal-card h2 { font-size: 1.45rem; color: var(--on-dark); }
.portal-card p { color: oklch(0.92 0.02 250); font-size: .99rem; }
.portal-card ul { list-style: none; padding: 0; margin: 0 0 1.6rem; }
.portal-card li {
  position: relative; padding-left: 1.7rem; margin-bottom: .55rem;
  font-size: .96rem; color: oklch(0.93 0.02 250);
}
.portal-card li::before {
  content: ""; position: absolute; left: 0; top: .42em;
  width: 1.05rem; height: 1.05rem;
  background: var(--green);
  -webkit-mask: var(--check-mask); mask: var(--check-mask);
}
.portal-card__badge {
  display: inline-block; margin-bottom: 1rem; padding: .3rem .7rem;
  background: oklch(0.70 0.14 163 / 0.2); color: oklch(0.85 0.12 163);
  border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}

/* ---------- Grelhas e cartões ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.75rem; box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card--link:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--blue); }
.card h3 { margin-bottom: .5rem; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--ink-muted); font-size: .97rem; }
.card__icon {
  display: grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: 1.1rem;
  border-radius: var(--radius); background: var(--blue-soft); color: var(--blue-dark);
}
.card__icon svg { width: 1.5rem; height: 1.5rem; }
.card__icon--green { background: oklch(0.70 0.14 163 / 0.16); color: var(--green-dark); }

/* Lista de verificação.
   NB: o visto é um ::before ABSOLUTO, não um item flex. Com `display:flex` no <li>,
   um <strong> no início do texto passa a ser um item flex próprio e o resto da frase
   salta para uma segunda coluna. */
.checklist { list-style: none; padding: 0; }
.checklist li {
  position: relative; padding-left: 1.85rem; margin-bottom: .7rem;
  color: var(--ink-muted);
}
.checklist li strong { color: var(--ink); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .36em;
  width: 1.15rem; height: 1.15rem;
  background: var(--green);
  -webkit-mask: var(--check-mask); mask: var(--check-mask);
}

/* Passos numerados */
.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 1.5rem; }
.steps li { counter-increment: step; padding-left: 3.75rem; position: relative; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
  border-radius: var(--radius); background: var(--navy); color: var(--on-dark);
  font-weight: 700; font-size: .95rem;
}
.steps h3 { margin-bottom: .3rem; }
.steps p { color: var(--ink-muted); margin-bottom: 0; font-size: .97rem; }

/* Números / provas */
.stats { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.stat__value { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 800; color: var(--blue); letter-spacing: -.03em; line-height: 1.1; }
.stat__label { color: var(--ink-muted); font-size: .93rem; }

/* Faixa CTA */
.cta-band {
  background: linear-gradient(135deg, var(--navy), oklch(0.36 0.11 258));
  color: var(--on-dark);
}
.cta-band h2 { color: var(--on-dark); }
.cta-band p { color: oklch(0.9 0.02 250); max-width: 42rem; }
.cta-band .wrap { padding-block: clamp(3rem, 6vw, 4.5rem); }

/* Contactos */
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; }
.contact-item__label {
  font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted);
  margin-bottom: .25rem;
}
.contact-item__value { font-size: 1.15rem; font-weight: 600; color: var(--navy); text-decoration: none; }
a.contact-item__value:hover { color: var(--blue); text-decoration: underline; }

/* Tabela de horário */
.hours { width: 100%; border-collapse: collapse; font-size: .97rem; }
.hours th, .hours td { text-align: left; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.hours th { font-weight: 600; color: var(--ink); }
.hours td { color: var(--ink-muted); text-align: right; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }

/* FAQ */
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.35rem; margin-bottom: .85rem;
}
.faq summary { font-weight: 650; cursor: pointer; color: var(--navy); list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--blue); line-height: 1; flex: 0 0 auto; }
.faq details[open] summary::after { content: "\2212"; }
.faq details[open] summary { margin-bottom: .75rem; }
.faq p:last-child { margin-bottom: 0; color: var(--ink-muted); }

/* Conteúdo corrido (privacidade, etc.) */
.prose { max-width: 44rem; }
.prose h2 { margin-top: 2.5rem; font-size: 1.5rem; }
.prose h3 { margin-top: 1.75rem; }
.prose li { color: var(--ink-muted); }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--navy); color: oklch(0.88 0.02 250); font-size: .94rem; }
.site-footer .wrap { padding-block: clamp(2.75rem, 5vw, 4rem); }
.site-footer__grid { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.site-footer h4 { color: var(--on-dark); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer a { color: oklch(0.88 0.02 250); text-decoration: none; }
.site-footer a:hover { color: var(--on-dark); text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5rem; }
.site-footer img { height: 2.4rem; width: auto; margin-bottom: 1rem; }
.site-footer__bottom {
  border-top: 1px solid oklch(1 0 0 / 0.14); margin-top: 2.5rem; padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; justify-content: space-between;
  font-size: .87rem; color: oklch(0.78 0.02 250);
}

/* ---------- Marcador de conteúdo por confirmar ----------
   Tudo o que eu inventei/assumi fica a vermelho. Grep: class="todo"
   Ver site/README.md para a lista e como remover a marcação.            */
.todo {
  color: oklch(0.55 0.22 27);
  background: oklch(0.55 0.22 27 / 0.08);
  border-bottom: 2px dotted oklch(0.55 0.22 27);
  padding: 0 .15em; font-weight: 600;
}
.site-footer .todo, .portal-card .todo, .cta-band .todo { color: oklch(0.82 0.16 22); background: oklch(0.82 0.16 22 / 0.14); }
