/* =========================================================================
   ESBOÇO — Landing page de gabinete de contabilidade
   Estilo: corporate moderno · claro · confiança · muito espaço em branco
   ========================================================================= */

/* ---------------------------------------------------------------------------
   TOKENS — substituir pelas cores da marca quando existirem
--------------------------------------------------------------------------- */
:root {
  --navy:        #581C28;   /* primária: Bordô Premium (nome do token mantido) */
  --navy-2:      #6E2634;
  --accent:      #C69A51;   /* secundária: Dourado Nobre — fundos/realces; texto escuro por cima */
  --accent-light:#D4AE6E;
  --accent-dark: #7D5A22;   /* dourado escuro: texto/ícones sobre fundo claro (contraste AA) */
  --accent-soft: #F6EEDF;
  --bg:          #FFFFFF;   /* Branco Puro */
  --bg-alt:      #F8F4ED;
  --surface:     #FFFFFF;
  --ink:         #2C2C2C;   /* Cinza Grafite */
  --muted:       #5E5E5E;
  --rule:        #E9E3D9;

  --display: "PT Serif", Georgia, serif;
  --sans:    "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --radius:   14px;
  --shadow:   0 1px 2px rgba(88, 28, 40, 0.04), 0 8px 24px rgba(88, 28, 40, 0.06);
  --maxw:     1180px;
  --edge:     clamp(1rem, 4vw, 2rem);
  --sec-y:    clamp(4rem, 10vw, 7rem);
  --ease:     cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------------------------------------------------------------------------
   BASE
--------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 132px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0 0 0.6em; color: var(--navy); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; }
h1 em { font-style: italic; color: var(--accent-dark); }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 3px; border-radius: 4px; }
.section--dark :focus-visible { outline-color: var(--accent); }
::selection { background: var(--accent); color: var(--navy); }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--edge); }
.container--narrow { max-width: 820px; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: 0.6rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; }

.eyebrow {
  font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent-dark); margin-bottom: 0.9rem;
}
.eyebrow--light { color: var(--accent); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 52ch; }

/* ---------------------------------------------------------------------------
   BOTÕES
--------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.4rem; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 0.95rem/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: var(--navy); }
.btn--primary:hover { background: var(--accent-light); }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--rule); }
.btn--ghost:hover { border-color: var(--navy); }
.btn--sm { padding: 0.6rem 1.1rem; font-size: 0.88rem; }

/* ---------------------------------------------------------------------------
   HEADER
--------------------------------------------------------------------------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.header.is-scrolled { border-bottom-color: var(--rule); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 120px; }

.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
/* Logótipo original (símbolo + nome) — só no header */
.brand__logo { display: block; height: 100px; width: auto; }

.nav { display: flex; align-items: center; gap: 1.8rem; }
.nav a:not(.btn) { text-decoration: none; font-size: 0.95rem; color: var(--muted); transition: color 0.2s; }
.nav a:not(.btn):hover { color: var(--navy); }

.nav-toggle { display: none; background: none; border: 0; padding: 0.5rem; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; margin: 5px 0; background: var(--navy); transition: transform 0.3s var(--ease), opacity 0.3s; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 120px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--rule);
    padding: 0.5rem var(--edge) 1.2rem;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 0.8rem 0; border-bottom: 1px solid var(--rule); }
  .nav .btn { margin-top: 1rem; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------------------------------------------------------------------------
   HERO
--------------------------------------------------------------------------- */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 var(--sec-y); }
.hero__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 2rem 0 2.5rem; }

.stats { list-style: none; margin: 0; padding: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: 2.5rem; border-top: 1px solid var(--rule); }
.stats strong { display: block; font: 700 1.8rem/1.1 var(--display); color: var(--navy); }
.stats span { font-size: 0.85rem; color: var(--muted); }

/* Cartão ilustrativo (placeholder visual) */
.mock-card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 20px;
  padding: 1.6rem; box-shadow: 0 30px 60px -20px rgba(88, 28, 40, 0.25);
  transform: rotate(1.5deg);
}
.mock-card__head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; color: var(--navy); margin-bottom: 1rem; }
.mock-card__row { display: flex; justify-content: space-between; padding: 0.75rem 0; border-top: 1px solid var(--rule); font-size: 0.92rem; }
.check { color: var(--accent-dark); font-weight: 500; }
.pill { font-size: 0.75rem; font-weight: 600; padding: 0.25rem 0.65rem; border-radius: 999px; background: var(--bg-alt); color: var(--muted); }
.pill--ok { background: var(--accent-soft); color: var(--accent-dark); }
.mock-card__bars { display: flex; align-items: flex-end; gap: 0.6rem; height: 90px; margin-top: 1.2rem; }
.mock-card__bars span { flex: 1; height: var(--h); border-radius: 6px 6px 2px 2px; background: linear-gradient(var(--accent), #E6CC9C); opacity: 0.85; }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .mock-card { transform: none; }
}

/* ---------------------------------------------------------------------------
   SECÇÕES GENÉRICAS
--------------------------------------------------------------------------- */
.section { padding: var(--sec-y) 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--navy); color: #EFE2DF; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section__head { max-width: 680px; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section__sub { color: var(--muted); }

/* Para quem */
.audience { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.audience__item { border-top: 2px solid var(--accent); padding-top: 1.2rem; }
.audience__item p { color: var(--muted); font-size: 0.95rem; }

/* Serviços */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1.8rem; box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(88, 28, 40, 0.1); }
.card p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.card__icon { width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; margin-bottom: 1.2rem; }
.card__icon svg { width: 24px; height: 24px; fill: none; stroke: var(--accent-dark); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Como funciona */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; counter-reset: s; }
.steps li { position: relative; padding-top: 1.2rem; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.steps__num { display: block; font: 700 2.4rem/1 var(--display); color: var(--accent); margin-bottom: 0.8rem; }
.steps p { font-size: 0.95rem; margin: 0; }

/* Porquê nós */
.why { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.why__copy p:last-child { color: var(--muted); }
.why__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.why__list li {
  display: grid; gap: 0.2rem; padding: 1.2rem 1.4rem 1.2rem 3.2rem; position: relative;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
}
.why__list li::before {
  content: "✓"; position: absolute; left: 1.2rem; top: 1.2rem;
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--navy); font-size: 0.75rem; font-weight: 700;
}
.why__list strong { color: var(--navy); }
.why__list span { color: var(--muted); font-size: 0.93rem; }

/* Planos */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: stretch; }
.plan {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 18px; padding: 2rem;
}
.plan ul { list-style: none; padding: 0; margin: 1.2rem 0 2rem; flex: 1; display: grid; gap: 0.6rem; align-content: start; }
.plan li { padding-left: 1.6rem; position: relative; font-size: 0.95rem; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-dark); font-weight: 700; }
.plan__price { color: var(--muted); margin: 0; }
.plan__price strong { font: 700 2rem/1 var(--display); color: var(--navy); }
.plan--featured { border: 2px solid var(--accent); box-shadow: 0 24px 50px -20px rgba(198, 154, 81, 0.4); }
.plan__badge {
  position: absolute; top: -0.8rem; left: 2rem;
  background: var(--accent); color: var(--navy); font-size: 0.75rem; font-weight: 600;
  padding: 0.3rem 0.8rem; border-radius: 999px;
}

/* Testemunhos */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.quote { margin: 0; padding: 1.8rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); display: flex; flex-direction: column; justify-content: space-between; }
.quote blockquote { margin: 0 0 1.5rem; font: 400 1.08rem/1.55 var(--display); color: var(--navy); }
.quote figcaption { display: grid; font-size: 0.88rem; }
.quote figcaption span { color: var(--muted); }

/* FAQ */
.faq { display: grid; gap: 0.8rem; }
.faq details { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 0 1.4rem; }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.2rem 2rem 1.2rem 0; position: relative;
  font-weight: 600; color: var(--navy);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--accent-dark); transition: transform 0.3s var(--ease); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 1.2rem; margin: 0; }

/* Contacto */
.contact { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.contact__info > p { color: var(--muted); }
.section--dark .contact__info > p { color: #EFE2DF; }
.section--dark .contact__details dt { color: var(--accent); }
.section--dark .contact__details a { color: #fff; text-decoration: none; overflow-wrap: anywhere; transition: color 0.2s; }
.section--dark .contact__details a:hover { color: var(--accent); }
/* Aviso legal de custo da chamada (DL 59/2021) */
.tel-note { display: block; font-size: .75rem; opacity: .8; }
.section--dark .form :focus-visible { outline-color: var(--accent-dark); }  /* cartão branco dentro da secção bordô */
.contact__details { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem 1.5rem; margin: 2rem 0 0; }
.contact__details dt { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding-top: 0.15rem; }
.contact__details dd { margin: 0; }
.contact__details a { color: var(--navy); font-weight: 500; }

.form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 20px;
  padding: clamp(1.4rem, 4vw, 2.4rem); box-shadow: var(--shadow);
}
.field { display: grid; gap: 0.4rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 0.85rem; font-weight: 500; color: var(--navy); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 0.95rem; color: var(--ink);
  padding: 0.75rem 0.9rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field.is-invalid input, .field.is-invalid select { border-color: #C0392B; }
.consent { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.86rem; color: var(--muted); cursor: pointer; }
.consent input { margin-top: 0.25rem; accent-color: var(--accent-dark); width: 16px; height: 16px; flex: none; }
.form__feedback { margin: 0; padding: 0.9rem 1rem; border-radius: 10px; background: var(--accent-soft); color: var(--accent-dark); font-weight: 500; }
.form__feedback.is-error { background: #FBEAEA; color: #8E1D17; }
.form button[disabled] { opacity: 0.7; cursor: wait; }
/* Campo-armadilha anti-spam: fora do ecrã, nunca visível */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------------------
   FOOTER
--------------------------------------------------------------------------- */

/* Rodapé — logótipo à esquerda + 2 colunas; fundo claro (logótipo nas cores originais) */
.footer { background: var(--bg-alt); color: var(--muted); border-top: 3px solid var(--accent); padding: 3rem 0 1.25rem; font-size: 0.92rem; }
.footer__bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 4rem; align-items: start; padding-bottom: 2.5rem; }
.footer__logo { justify-self: center; }
.footer__logo img { display: block; width: 200px; height: auto; }
.footer h4 { color: var(--navy); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; margin: 0.4rem 0 1rem; }
.footer__col address { font-style: normal; }
.footer__col p { margin: 0 0 0.8rem; line-height: 1.5; }
.footer__col a { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; transition: color 0.2s; }
.footer__col a:hover { color: var(--navy); }
.footer__note { display: block; font-size: 0.75rem; font-style: italic; }
.footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; border-top: 1px solid var(--rule); padding-top: 1.25rem; font-size: 0.8rem; }
.footer__legal p { margin: 0; }
.footer__legal nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer__legal a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer__legal a:hover { color: var(--navy); text-decoration: underline; }
@media (max-width: 860px) {
  .footer__bar { grid-template-columns: 1fr 1fr; }
  .footer__logo { grid-column: 1 / -1; }
}
@media (max-width: 520px) { .footer__bar { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------------
   RESPONSIVO
--------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .audience, .steps { grid-template-columns: repeat(2, 1fr); }
  .services { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .why, .contact { grid-template-columns: 1fr; }
  .plans, .quotes { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
}
@media (max-width: 600px) {
  .audience, .steps, .services { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .stats { gap: 1.5rem; }
}

/* ---------------------------------------------------------------------------
   REVEAL ON SCROLL
--------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}

.req { color: var(--accent-dark); }

/* Planos — a quem se destina */
.plan__for { margin: 0; font-size: .9rem; color: var(--muted); }

/* Nome da empresa no cabeçalho — cabe em ecrãs pequenos */
.header .brand { min-width: 0; }
@media (max-width: 480px) {
  .header__inner { height: 96px; }
  .header .brand__logo { height: 80px; }
  .nav { top: 96px; }
}

/* Rodapé — contactos e informação legal */


/* Páginas legais (Política de Privacidade, Termos) */
.legal h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: .3em; }
.legal h2 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); margin: 2.2em 0 .6em; }
.legal p, .legal li { max-width: 68ch; }
.legal ul { padding-left: 1.25em; margin: 0 0 1em; }
.legal li { margin-bottom: .35em; }
.legal__back { margin-bottom: 2rem; font-size: .9rem; }
.legal__back a, .legal p a { text-decoration: underline; text-underline-offset: 3px; }
.legal__updated { font-size: .9rem; opacity: .75; margin-bottom: 2rem; }

/* Aviso de privacidade junto ao formulário */
.form__note { margin: 0; font-size: .85rem; line-height: 1.5; opacity: .85; }
.form__note a { text-decoration: underline; text-underline-offset: 3px; }
