:root {
  --azul: #4170e3;
  --azul-escuro: #2f5bc7;
  --navy: #152b3b;
  --texto: #2b3a47;
  --suave: #5b6b78;
  --fundo: #f6f8fc;
  --cartao: #fff;
  --linha: #dfe5ee;
  --azul-claro: #eaf0fd;
  --raio: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body { margin: 0; }

body {
  background: var(--fundo);
  color: var(--texto);
  font: 400 16px/1.6 "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--azul); }

a:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--azul);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Topo */
.topo {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--linha);
}

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

.topo__logo img { display: block; height: 32px; width: auto; }

.topo__nav { display: flex; align-items: center; gap: 22px; }

.topo__nav a {
  color: var(--navy);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.topo__nav a:hover { color: var(--azul); }

.topo__nav .topo__entrar {
  padding: 7px 16px;
  border: 1.5px solid var(--navy);
  border-radius: 999px;
}

.topo__nav .topo__entrar:hover { border-color: var(--azul); }

/* Hero */
.hero {
  padding: 72px 0 64px;
  background:
    radial-gradient(900px 380px at 85% -10%, rgba(65, 112, 227, 0.16), transparent 70%),
    linear-gradient(180deg, #fff 0%, var(--fundo) 100%);
  border-bottom: 1px solid var(--linha);
}

.hero__eyebrow {
  margin: 0 0 12px;
  color: var(--azul);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 20px;
  color: var(--navy);
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.hero__lead {
  max-width: 640px;
  margin: 0 0 12px;
  font-size: 18px;
}

.hero__equipa {
  max-width: 640px;
  margin: 0 0 28px;
  color: var(--suave);
}

.hero__acoes { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn--cheio { background: var(--azul); color: #fff; border: 1.5px solid var(--azul); }
.btn--cheio:hover { background: var(--azul-escuro); border-color: var(--azul-escuro); }
.btn--linha { color: var(--navy); border: 1.5px solid var(--navy); }
.btn--linha:hover { color: var(--azul); border-color: var(--azul); }

.hero__dgert { margin: 0; color: var(--suave); font-size: 13px; }

/* Secções */
.seccao { padding: 64px 0; }

.seccao--insights { background: #fff; border-top: 1px solid var(--linha); }

.seccao h2 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  line-height: 1.2;
}

.seccao__intro { max-width: 640px; margin: 0 0 32px; color: var(--suave); }

.seccao__mais { margin: 28px 0 0; font-weight: 600; }

.grelha { display: grid; gap: 20px; }

.grelha--cursos { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.grelha--insights { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

.grelha[hidden] { display: none; }

/* Cartões de curso */
.curso {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--cartao);
  border: 1px solid var(--linha);
  border-radius: var(--raio);
  color: var(--texto);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

a.curso:hover {
  border-color: var(--azul);
  box-shadow: 0 10px 28px rgba(21, 43, 59, 0.1);
  transform: translateY(-2px);
}

.curso__tag {
  align-self: flex-start;
  margin-bottom: 14px;
  padding: 3px 10px;
  background: var(--azul-claro);
  border-radius: 999px;
  color: var(--azul);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.curso h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}

.curso p { flex: 1; margin: 0 0 20px; font-size: 15px; }

.curso__rodape {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--linha);
}

.curso__preco { color: var(--navy); font-weight: 700; }

.curso__preco small { color: var(--suave); font-size: 12px; font-weight: 400; }

.curso__cta { margin-left: auto; color: var(--azul); font-weight: 600; white-space: nowrap; }

.curso__cta::after { content: " →"; }

.curso--breve { background: transparent; border-style: dashed; }

.curso--breve h3, .curso--breve p { color: var(--suave); }

.curso__pill {
  padding: 3px 12px;
  background: var(--navy);
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

/* Cartões de Insights */
.ins {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--cartao);
  border: 1px solid var(--linha);
  border-radius: var(--raio);
  color: var(--texto);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

a.ins:hover {
  border-color: var(--azul);
  box-shadow: 0 10px 28px rgba(21, 43, 59, 0.1);
  transform: translateY(-2px);
}

.ins__capa {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  display: block;
  background: var(--navy);
}

.ins__capa--texto {
  display: flex;
  align-items: flex-end;
  padding: 16px 18px;
  background-color: var(--navy);
  background-image:
    radial-gradient(260px 160px at 90% 0%, rgba(65, 112, 227, 0.55), transparent 70%),
    radial-gradient(200px 140px at 0% 100%, rgba(255, 255, 255, 0.08), transparent 70%);
  color: #fff;
}

.ins__capa--texto span {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.9;
}

.ins__corpo { display: flex; flex: 1; flex-direction: column; padding: 16px 18px 18px; }

.ins h3 { margin: 0 0 6px; color: var(--navy); font-size: 17px; font-weight: 600; line-height: 1.3; }

.ins__desc { flex: 1; margin: 0 0 6px; color: var(--suave); font-size: 14px; }

.ins__ate { margin: 0 0 6px; color: var(--azul); font-size: 13px; font-weight: 600; }

.ins__rodape { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }

.ins--breve { opacity: 0.85; }

.estado { color: var(--suave); }

/* Rodapé */
.rodape { background: #fff; border-top: 1px solid var(--linha); }

.rodape .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.rodape__links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

.rodape__links a { color: var(--suave); font-size: 14px; text-decoration: none; }

.rodape__links a:hover { color: var(--azul); }

.rodape__copy { margin: 0; color: var(--suave); font-size: 14px; }

.rodape__prr {
  padding: 24px 16px 32px;
  border-top: 1px solid var(--linha);
  color: var(--suave);
  font-size: 13px;
  text-align: center;
}

.rodape__prr img {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin: 0 auto 12px;
}

.rodape__prr p { max-width: 640px; margin: 0 auto; }

@media (max-width: 560px) {
  .topo__nav { gap: 14px; }
  .topo__nav a:not(.topo__entrar) { display: none; }
  .hero { padding: 48px 0 44px; }
  .hero__lead { font-size: 17px; }
  .seccao { padding: 48px 0; }
  .grelha--cursos { grid-template-columns: 1fr; }
  .ins__capa { aspect-ratio: 21 / 9; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .curso, .ins { transition: none; }
  a.curso:hover, a.ins:hover { transform: none; }
}
