/* Primeira dobra escura com imagem de fundo, texto à esquerda e retrato à direita.
   Vale para a home e para todas as páginas internas. */

.hero-dark {
  position: relative;
  isolation: isolate;
  padding-block: clamp(2.5rem, 1rem + 5vw, 4.5rem) 0;
  background: var(--ink);
  color: var(--on-dark);
  overflow: hidden;
}

.hero-dark .hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 95% at 88% 10%, rgba(138, 87, 49, 0.5) 0%, transparent 58%),
    radial-gradient(100% 80% at 6% 95%, rgba(110, 122, 61, 0.26) 0%, transparent 62%),
    radial-gradient(70% 60% at 62% 85%, rgba(196, 91, 68, 0.22) 0%, transparent 70%),
    linear-gradient(165deg, #2a1c13 0%, #1d130d 48%, #140d09 100%);
}

/* grão fino: tira o aspecto de gradiente puro */
.hero-dark .hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
}

/* arcos dourados: eco do traço da logo */
.hero-arcs {
  position: absolute;
  z-index: -1;
  top: 50%;
  right: -6%;
  width: min(760px, 68%);
  aspect-ratio: 1;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--gold);
}
.hero-arcs svg { width: 100%; height: 100%; }
.hero-arcs circle,
.hero-arcs path { fill: none; stroke: currentColor; }
.hero-arcs .arc-dash {
  stroke-dasharray: 2 14;
  stroke-opacity: 0.55;
  transform-origin: 50% 50%;
  animation: arc-spin 90s linear infinite;
}
.hero-arcs .arc-thin { stroke-opacity: 0.28; }
.hero-arcs .arc-sweep { stroke-opacity: 0.6; stroke-width: 2.2; }

.hero-dark .hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 13, 9, 0.82) 0%, rgba(20, 13, 9, 0.5) 52%, transparent 80%),
    linear-gradient(180deg, rgba(20, 13, 9, 0.35) 0%, transparent 40%, rgba(20, 13, 9, 0.55) 100%);
}

.hero-dark .shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: end;
  gap: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  min-height: clamp(460px, 62vh, 620px);
}

.hero-dark .hero-copy {
  padding-block: clamp(2rem, 1rem + 3vw, 3.5rem) clamp(2.5rem, 1rem + 4vw, 4rem);
  max-width: 44rem;
}

.hero-dark h1 {
  font-size: clamp(1.85rem, 1.3rem + 2.1vw, 3.1rem);
  line-height: 1.12;
  color: var(--on-dark);
  max-width: 19ch;
}
.hero-dark h1 em {
  font-style: normal;
  color: var(--gold-light);
  box-shadow: none;
}

.hero-dark .lead {
  font-size: clamp(0.98rem, 0.94rem + 0.2vw, 1.1rem);
  color: #e5d9cb;
  max-width: 46ch;
  margin-top: var(--space-5, 1.25rem);
}

.hero-dark .hero-text {
  margin-top: var(--space-4);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--on-dark-70);
  max-width: 52ch;
}

.hero-dark .hero-note {
  margin-top: var(--space-6);
  padding-left: 0.9rem;
  border-left: 2px solid var(--gold);
  color: #e8dbcb;
  max-width: 46ch;
}

.hero-dark .btn-row { margin-top: var(--space-6); }

.hero-dark .btn-ghost {
  color: var(--on-dark);
  border-color: rgba(244, 236, 225, 0.4);
  backdrop-filter: blur(4px);
}
.hero-dark .btn-ghost:hover { border-color: var(--gold-light); color: var(--gold-light); }

.hero-dark .crumb { color: var(--on-dark-70); margin-bottom: var(--space-5, 1.25rem); }
.hero-dark .crumb a { color: var(--on-dark); border-bottom-color: rgba(244, 236, 225, 0.35); }
.hero-dark .crumb a:hover { color: var(--gold-light); border-bottom-color: var(--gold-light); }
.hero-dark .crumb [aria-current] { color: var(--on-dark-70); }
.hero-dark .crumb span[aria-hidden] { color: rgba(244, 236, 225, 0.35); }

/* retrato encostado na base da secção */
.hero-portrait {
  position: relative;
  align-self: end;
  justify-self: center;
  width: 100%;
  max-width: 420px;
  margin: 0;
}
.hero-portrait img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 34px 48px rgba(0, 0, 0, 0.55));
}
.hero-portrait::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: 0;
  width: 116%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 999px;
  border: 1px solid rgba(216, 196, 104, 0.3);
  background: radial-gradient(58% 58% at 50% 62%, rgba(138, 87, 49, 0.45), transparent 72%);
}

.hero-dark .hero-cue {
  position: static;
  margin-top: var(--space-6);
  color: #cbb9a5;
  padding: 0;
  gap: 0.75rem;
}
.hero-dark .hero-cue i { height: 26px; }
.hero-dark .hero-cue i { background: linear-gradient(var(--gold-light), transparent); }

/* a seguir ao hero escuro, a secção clara começa sem emenda dura */
.hero-dark + section { position: relative; }

@media (max-width: 860px) {
  .hero-dark .shell {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 0;
  }
  .hero-dark .hero-copy { padding-bottom: var(--space-8); }
  .hero-dark h1 { max-width: 100%; }
  .hero-portrait { max-width: 260px; justify-self: center; }
  .hero-portrait img { filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.5)); }
}

/* ---------- cartões de solução com imagem ---------- */
.solution-media {
  display: block;
  margin: calc(-1 * clamp(1.75rem, 1rem + 2vw, 2.75rem)) calc(-1 * clamp(1.75rem, 1rem + 2vw, 2.75rem)) var(--space-2);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--sand-deep);
}
.solution-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.4s var(--ease);
  filter: saturate(0.9) brightness(0.98);
}
.solution:hover .solution-media img { filter: saturate(1.05) brightness(1.02); }
.solution h3 { font-size: var(--step-1); }
.solution .solution-kicker { font-size: 1.02rem; }
.solution p { font-size: 0.92rem; line-height: 1.6; }

/* ---------- imagem de apoio em secções internas ---------- */
.section-media {
  margin-top: var(--space-12);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 1rem + 3vw, 4rem);
  align-items: center;
}
.section-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.section-media .prose p { font-size: 0.97rem; }

@media (max-width: 860px) {
  .section-media { grid-template-columns: 1fr; }
}

/* ---------- cabeçalho de secção empilhado (título e instrução por baixo) ---------- */
.section-head-stack { display: block; }
.section-head-stack .section-head-text { max-width: 60ch; margin-top: var(--space-4); }

/* ---------- hierarquia: título de secção acima dos blocos ---------- */
.section-head > h2 { position: relative; padding-top: var(--space-4); }
.section-head > h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 46px;
  height: 2px;
  background: var(--gold);
}
.section-dark .section-head > h2::before { background: var(--gold-light); }
.offer h3 { font-size: var(--step-2); }
.offer-head h3 { padding-top: 0; }

/* ---------- sobre: texto mais contido ---------- */
.about-copy p { font-size: 0.95rem; line-height: 1.62; }
.about-copy h2 { font-size: var(--step-2); }

/* ---------- diagnóstico: grelha de cartões ---------- */
.check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-12);
  padding: 0;
  list-style: none;
}
.check-grid li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-6);
  background: var(--paper);
  border: 1px solid var(--sand-line);
  font-size: 0.97rem;
  line-height: 1.5;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.check-grid li:hover {
  transform: translateY(-3px);
  border-color: var(--brown);
  box-shadow: var(--shadow-card);
}
.check-grid svg { flex: 0 0 auto; margin-top: 0.2rem; color: var(--terracotta); }

/* ---------- checklist interactivo ---------- */
.checksteps { max-width: 44rem; margin-top: var(--space-10, 2.5rem); }
.checksteps-progress {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--step--1);
  color: var(--ink-60);
  margin-bottom: var(--space-6);
}
.checksteps-progress .bar {
  flex: 1 1 auto;
  height: 2px;
  background: var(--sand-line);
  position: relative;
  overflow: hidden;
}
.checksteps-progress .bar i {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--gold), var(--terracotta));
  transform: scaleX(var(--done, 0));
  transform-origin: 0 50%;
  transition: transform 0.5s var(--ease);
}
.checkstep {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  width: 100%;
  text-align: left;
  padding: var(--space-5, 1.25rem) var(--space-6);
  background: var(--paper);
  border: 1px solid var(--sand-line);
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease), opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.checkstep + .checkstep { margin-top: var(--space-3); }
.checkstep[hidden] { display: none !important; }
.checkstep.is-new { animation: answer-in 0.45s var(--ease) both; }
.checkstep:hover { border-color: var(--brown); }
.checkstep .box {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 0.15rem;
  border: 1px solid var(--brown);
  border-radius: 2px;
  display: grid;
  place-items: center;
  color: transparent;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.checkstep[aria-pressed="true"] { border-color: var(--terracotta); background: #fff; }
.checkstep[aria-pressed="true"] .box { background: var(--terracotta); border-color: var(--terracotta); color: #fff; }
.checkstep h3 { font-size: var(--step-1); margin-bottom: 0.3rem; }
.checkstep p { font-size: 0.93rem; color: var(--ink-80); }
.checksteps-done {
  margin-top: var(--space-6);
  padding: var(--space-6);
  background: var(--ink);
  color: var(--on-dark);
  display: grid;
  gap: var(--space-4);
  justify-items: start;
  animation: answer-in 0.5s var(--ease) both;
}
.checksteps-done p { color: var(--on-dark-70); max-width: 52ch; }
.checksteps-done[hidden] { display: none !important; }

/* ---------- WhatsApp estático ---------- */
.footer-cta {
  display: flex;
  justify-content: center;
  margin-top: var(--space-12);
}
.btn-wa {
  background: #128040;
  color: #fff;
  border-radius: 999px;
  padding: 1rem 2rem;
}
.btn-wa:hover { background: #0f6c36; transform: translateY(-2px); }

@media (max-width: 860px) {
  .check-grid { grid-template-columns: 1fr; }
}

.checksteps-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(1.5rem, 1rem + 3vw, 4rem);
  align-items: start;
  margin-top: var(--space-10, 2.5rem);
}
.checksteps-grid .checksteps { margin-top: 0; max-width: none; }
.checksteps-media { margin: 0; }
.checksteps-media {
  position: sticky;
  top: 110px;
}
.checksteps-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
@media (max-width: 860px) {
  .checksteps-grid { grid-template-columns: 1fr; }
  .checksteps-media { order: -1; }
  .checksteps-media img { aspect-ratio: 3 / 2; }
}

.offer-media { margin: 0 0 var(--space-2); }
.offer-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: filter 0.4s var(--ease);
}
.offer:hover .offer-media img { filter: brightness(1.03) saturate(1.04); }

/* ---------- botões: linha equilibrada ---------- */
.hero-dark .btn-row {
  gap: 0.75rem;
  align-items: stretch;
}
.hero-dark .btn {
  min-height: 54px;
  padding: 1rem 1.9rem;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  border-radius: 3px;
}
.hero-dark .btn-primary {
  box-shadow: 0 16px 30px -18px rgba(0, 0, 0, 0.9);
}
.hero-dark .btn-ghost {
  border-color: rgba(216, 196, 104, 0.55);
  color: #f0e6d9;
  background: rgba(244, 236, 225, 0.06);
}
.hero-dark .btn-ghost:hover {
  background: rgba(216, 196, 104, 0.14);
  border-color: var(--gold-light);
  color: #fff;
}

@media (max-width: 560px) {
  .hero-dark .btn-row { flex-direction: column; }
  .hero-dark .btn { width: 100%; }
}

/* o clareado da base vem do hero claro antigo; no hero escuro não entra */
.hero-dark::after { content: none !important; }
.hero-dark .hero-cue { color: #d9c9b6; }
.hero-dark .hero-cue:hover { color: var(--gold-light); }

/* fases sobre fundo escuro: descrição estava a herdar o castanho do tema claro */
.section-dark .step p,
.section-dark .feature p,
.section-dark .prose p,
.section-dark .offer-list li,
.section-dark .check-grid li { color: #dccbb8; }
.section-dark .check-grid li { background: rgba(244, 236, 225, 0.06); border-color: rgba(244, 236, 225, 0.18); }
