:root {
  --ivory: #F5F0E6;
  --ivory-deep: #EBE4D6;
  --paper: #FDFBF7;
  --graphite: #2C2C2C;
  --stone: #4A4A4A;
  --stone-soft: #6B6B6B;
  --amber: #A47216;
  --amber-deep: #8A5E10;
  --amber-light: #E4BC70;
  --petrol: #14505C;
  --petrol-deep: #0E3B45;
  --danger: #8C2F1E;
}

html { scroll-behavior: smooth; }

body {
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.prose-measure { max-width: 62ch; }

.rule-amber {
  width: 56px;
  height: 2px;
  background: var(--amber);
}

/* Foco visível em todos os controlos; invertido em fundos escuros. */
:where(a, button, summary, input, select, textarea):focus-visible {
  outline: 3px solid var(--amber-deep);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-dark :where(a, button, summary, input, select, textarea):focus-visible {
  outline-color: var(--amber-light);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 60;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  background: var(--graphite);
  color: var(--ivory);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
}

.press {
  transition: transform 140ms ease-out, background-color 180ms ease-out,
              color 180ms ease-out, border-color 180ms ease-out, opacity 180ms ease-out;
}
.press:active { transform: translateY(1px); }

/* Navegação: estado ativo controlado pelo app.js (scrollspy). */
.nav-link {
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.nav-link:hover { color: var(--graphite); border-bottom-color: var(--amber); }
.nav-link[aria-current="true"] {
  color: var(--graphite);
  border-bottom-color: var(--amber);
}

.menu-mobile-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  font-size: 16px;
  font-weight: 500;
  color: var(--graphite);
  border-bottom: 1px solid rgba(44, 44, 44, 0.08);
}
.menu-mobile-link:hover { color: var(--amber-deep); }

.link {
  color: var(--graphite);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(44, 44, 44, 0.3);
}
.link:hover { color: var(--amber-deep); text-decoration-color: var(--amber); }

/* Marcadores de imagem: ficam até entrarem as fotografias definitivas. */
.ph {
  background-color: var(--ivory-deep);
  background-image: repeating-linear-gradient(135deg, rgba(164, 114, 22, 0.05) 0 12px, transparent 12px 24px);
}
.ph-lead {
  background-image: repeating-linear-gradient(135deg, rgba(20, 80, 92, 0.05) 0 14px, transparent 14px 28px);
}

/* Linha temporal das 48 horas: horizontal no desktop, vertical no telemóvel. */
.timeline {
  display: grid;
  gap: 40px;
}
.timeline-step {
  position: relative;
  padding-top: 26px;
  border-top: 1px solid rgba(44, 44, 44, 0.15);
}
.timeline-step::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px;
  height: 9px;
  background: var(--amber);
}
.timeline-hour {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--petrol);
  font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) {
  .timeline {
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
  }
}

/* Bento assimétrico dos nichos: três blocos em cima, o quarto em faixa larga. */
.bento {
  display: grid;
  gap: 16px;
}
@media (min-width: 900px) {
  .bento {
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
  }
  .bento-lead {
    grid-column: 1;
    grid-row: 1 / span 2;
    min-height: 560px;
  }
  .bento-side { grid-column: 2; }
  .bento-wide { grid-column: 1 / -1; }
}

/* Planos de investimento (fundo escuro). */
.plano .marca {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-top: 9px;
  background: rgba(245, 240, 230, 0.55);
}
.plano .marca-amber { background: var(--amber-light); }

/* Perguntas frequentes. */
.faq-item {
  border-top: 1px solid rgba(44, 44, 44, 0.12);
}
.faq-item:last-child { border-bottom: 1px solid rgba(44, 44, 44, 0.12); }
.faq-item > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 20px 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--graphite);
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary:hover { color: var(--amber-deep); }
.faq-sign {
  position: relative;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  transition: transform 200ms ease-out;
}
.faq-sign::before,
.faq-sign::after {
  content: "";
  position: absolute;
  background: var(--amber);
}
.faq-sign::before { top: 7px; left: 0; width: 16px; height: 2px; }
.faq-sign::after { top: 0; left: 7px; width: 2px; height: 16px; }
.faq-item[open] .faq-sign { transform: rotate(45deg); }
.faq-body {
  padding: 0 0 24px;
  max-width: 62ch;
  font-size: 16px;
  line-height: 1.75;
  color: var(--stone);
}

/* Formulário. */
.field { display: flex; flex-direction: column; }
.field label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--graphite);
  margin-bottom: 8px;
}
.field .req { font-weight: 500; color: var(--stone-soft); }
.field .opt { font-weight: 400; color: var(--stone-soft); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 14px;
  font-size: 16px;
  font-family: inherit;
  color: var(--graphite);
  background: #fff;
  border: 1px solid rgba(44, 44, 44, 0.25);
  transition: border-color 180ms ease-out;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: #8A8A8A; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: rgba(44, 44, 44, 0.45); }
.field input[aria-invalid="true"],
.field select[aria-invalid="true"] { border-color: var(--danger); border-width: 2px; }
.field .erro {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--danger);
}
.field .erro::before {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  background: var(--danger);
  -webkit-mask: radial-gradient(circle at 8px 12px, #000 1.2px, transparent 1.3px),
                linear-gradient(#000, #000) center 3px / 2px 6px no-repeat,
                radial-gradient(circle at 8px 8px, #000 7.4px, transparent 7.5px);
          mask: radial-gradient(circle at 8px 12px, #000 1.2px, transparent 1.3px),
                linear-gradient(#000, #000) center 3px / 2px 6px no-repeat,
                radial-gradient(circle at 8px 8px, #000 7.4px, transparent 7.5px);
}
.field .ajuda {
  margin-top: 8px;
  font-size: 13px;
  color: var(--stone-soft);
  font-variant-numeric: tabular-nums;
}

.spinner { animation: girar 800ms linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

/* Lista de aprovação interna. */
.check {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 48px;
  padding: 10px 0;
  cursor: pointer;
  font-size: 16px;
  line-height: 1.6;
  color: var(--stone);
}
.check input {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 3px;
  accent-color: var(--petrol);
  cursor: pointer;
}
.check input:checked + span { color: var(--stone-soft); text-decoration: line-through; }
.check code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  background: var(--ivory-deep);
  padding: 1px 5px;
}

.progresso {
  height: 6px;
  width: 100%;
  background: var(--ivory-deep);
  overflow: hidden;
}
.progresso-fill {
  height: 100%;
  width: 0%;
  background: var(--petrol);
  transition: width 260ms ease-out;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  background: currentColor;
}
.pill-pendente { background: var(--ivory-deep); color: var(--stone); }
.pill-completo { background: var(--petrol); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

