/* vouga.pt — sem dependências nem fontes de terceiros: a CSP só permite 'self'.
   Minimalista: tipografia, espaço e linhas finas; uma só cor de destaque.
   Claro e escuro seguem o sistema. */

:root {
  --bg: #f6f6f3;
  --surface: #ffffff;
  --text: #0e1a1c;
  --text-muted: #5c6a6c;
  --line: #e2e4e0;
  --line-strong: #c9cdc8;
  --accent: #0a6c74;
  --accent-contrast: #ffffff;
  --button: #0e1a1c;
  --button-text: #ffffff;
  --button-hover: #0a6c74;
  --focus: #0a6c74;
  --erro: #b3261e;
  --erro-bg: #fbeceb;
  --sucesso: #1d6b45;
  --sucesso-bg: #e6f3ec;

  --font: "Inter", "InterVariable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1160px;
  --gutter: clamp(20px, 5vw, 40px);
  --radius: 12px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1214;
    --surface: #111b1e;
    --text: #e7eeee;
    --text-muted: #93a3a5;
    --line: #1f2c2f;
    --line-strong: #2f4044;
    --accent: #5cc8cc;
    --accent-contrast: #0b1214;
    --button: #e7eeee;
    --button-text: #0b1214;
    --button-hover: #5cc8cc;
    --focus: #5cc8cc;
    --erro: #ff8a80;
    --erro-bg: #2a1716;
    --sucesso: #7fd6a6;
    --sucesso-bg: #12261c;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

svg {
  display: block;
}

a {
  color: inherit;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.15s, text-decoration-color 0.15s;
}

a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.9rem, 9vw, 7rem);
  letter-spacing: -0.045em;
  line-height: 0.98;
}

h2 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  letter-spacing: -0.035em;
}

h3 {
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

p {
  margin: 0 0 1em;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--button);
  color: var(--button-text);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: var(--button-text);
}

.label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.label-num {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.label-num::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  margin-left: 12px;
  vertical-align: middle;
  background: var(--line-strong);
}

.muted {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* ── Botões e ligações ──────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--button);
  color: var(--button-text);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.button:hover {
  background: var(--button-hover);
  color: var(--accent-contrast);
}

.button:active {
  transform: scale(0.98);
}

.button[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  font-weight: 500;
  text-decoration: none;
}

/* ── Cabeçalho ──────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.brand-dot {
  color: var(--accent);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.nav-list a {
  text-decoration: none;
  color: var(--text-muted);
}

.nav-list a:hover {
  color: var(--text);
}

.nav-list .nav-cta {
  color: var(--text);
  font-weight: 500;
}

.nav-list .nav-cta:hover {
  color: var(--accent);
}

@media (max-width: 640px) {
  .nav-optional {
    display: none;
  }
}

/* ── Hero ───────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: clamp(56px, 12vw, 152px) 0 clamp(72px, 10vw, 128px);
}

.hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px 64px;
  margin-top: clamp(36px, 6vw, 64px);
}

@media (max-width: 820px) {
  .hero-foot {
    grid-template-columns: minmax(0, 1fr);
  }
}

.lead {
  max-width: 34em;
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
}

.hero-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 40px;
}

.hero-line path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  opacity: 0.6;
}

/* ── Secções ────────────────────────────────────────────── */

.section {
  padding: clamp(72px, 11vw, 136px) 0;
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.section-intro {
  max-width: 36em;
  margin: 20px 0 0;
  color: var(--text-muted);
  font-size: 1.125rem;
}

.grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 0 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.grid-list li {
  padding: 24px 0 32px;
  border-top: 1px solid var(--line-strong);
}

.grid-list h3 {
  margin-bottom: 8px;
}

.grid-list p {
  margin: 0;
  color: var(--text-muted);
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 48px clamp(40px, 8vw, 112px);
}

.col-title {
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: passo;
}

.steps li {
  position: relative;
  padding: 18px 0 18px 40px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  counter-increment: passo;
}

.steps li::before {
  content: counter(passo, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 18px;
  color: var(--accent);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.75;
}

.steps strong {
  color: var(--text);
  font-weight: 500;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 7px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.9375rem;
}

/* ── Formulário ─────────────────────────────────────────── */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 48px clamp(40px, 8vw, 112px);
  align-items: start;
}

@media (max-width: 880px) {
  .contact {
    grid-template-columns: minmax(0, 1fr);
  }
}

.contact-intro {
  position: sticky;
  top: 112px;
}

@media (max-width: 880px) {
  .contact-intro {
    position: static;
  }
}

.form {
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 1.5);
  background: var(--surface);
}

.field {
  margin-bottom: 22px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 0 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--text-muted);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

[aria-invalid="true"] {
  border-color: var(--erro) !important;
}

.field-error {
  margin: 8px 0 0;
  color: var(--erro);
  font-size: 0.875rem;
}

.field-check {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 4px 12px;
}

.field-check input {
  width: 20px;
  height: 20px;
  margin: 3px 0 0;
  accent-color: var(--accent);
}

.field-check label {
  margin: 0;
  font-weight: 400;
}

.field-check .field-error {
  grid-column: 2;
}

.privacy-note {
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.button-submit {
  width: 100%;
  margin-top: 8px;
}

@media (min-width: 560px) {
  .button-submit {
    width: auto;
    min-width: 180px;
  }
}

.form-status {
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
}

.form-status:focus {
  outline: none;
}

.form-status-success {
  background: var(--sucesso-bg);
  color: var(--sucesso);
}

.form-status-error {
  background: var(--erro-bg);
  color: var(--erro);
}

/* Honeypot: fora do ecrã, nunca display:none (alguns bots ignoram-no) */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* ── Rodapé ─────────────────────────────────────────────── */

.site-footer {
  padding: 32px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  text-decoration: none;
}

/* ── Páginas de texto (privacidade, 404) ────────────────── */

.prose {
  max-width: 760px;
  padding-top: clamp(48px, 9vw, 104px);
  padding-bottom: clamp(56px, 9vw, 112px);
}

.prose h1 {
  margin-bottom: 16px;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.02;
}

.prose h2 {
  margin: 2.2em 0 0.6em;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
}

.prose p,
.prose li {
  color: var(--text-muted);
}

.prose strong {
  color: var(--text);
  font-weight: 500;
}

.prose a:not(.button) {
  color: var(--text);
}

.prose table {
  width: 100%;
  margin: 0 0 1em;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.prose th,
.prose td {
  padding: 14px 12px 14px 0;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  width: 30%;
  font-weight: 500;
}

.prose td {
  color: var(--text-muted);
}

.table-wrap {
  overflow-x: auto;
}

/* A linha do hero já separa: a primeira secção não repete o filete */
.hero + .section {
  border-top: 0;
}
