/* Páginas interiores do site (marca Flloat's v2).
   Mesma linguagem da página inicial (design.css: .workspace-*, .need-*, .case-*),
   mas com componentes próprios e sem depender das classes Tailwind do site antigo.
   Contrastes medidos (WCAG 2.2 AA): ver comentários junto de cada cor. */

.pg {
  --pg-bg: #101719;
  --pg-bg-2: #162122;
  --pg-ink: #f1f0e9;        /* 15,9:1 sobre --pg-bg */
  --pg-muted: #a5aeac;      /* 8,0:1 sobre --pg-bg */
  --pg-line: #394144;       /* só linhas, não texto */
  --pg-red: #B50928;        /* preenchimentos e sublinhados; como texto só sobre claro (5,5:1) */
  --pg-red-text: #F04460;   /* vermelho para texto pequeno sobre escuro (4,9:1); #B50928 dá 2,6:1 */
  --pg-red-display: #E3173E; /* palavras a vermelho em títulos grandes (3,9:1; texto grande pede 3:1) */
  --pg-sage: #e2e8df;
  --pg-sage-ink: #12201b;   /* 13,5:1 sobre sálvia */
  --pg-sage-muted: #2e3b31; /* 5,4:1 sobre sálvia */
  --pg-band: #d8ded5;
  --pg-pad: clamp(24px, 4.5vw, 64px);
  background: var(--pg-bg);
  color: var(--pg-ink);
  font-family: Manrope, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}
.pg *, .pg *::before, .pg *::after { box-sizing: border-box; }
.pg h1, .pg h2, .pg h3, .pg p, .pg ul, .pg ol, .pg dl, .pg dd, .pg figure { margin: 0; }
.pg ul, .pg ol { padding: 0; list-style: none; }
.pg a { color: inherit; }
.pg img { max-width: 100%; display: block; }
.pg :focus-visible { outline: 2px solid var(--pg-red-text); outline-offset: 3px; }

/* ---- Barra superior: caminho + ação ---- */
.pg-top {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 28px var(--pg-pad); border-bottom: 1px solid var(--pg-line);
  font-size: 14px; color: var(--pg-muted);
}
.pg-top ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pg-top li + li::before { content: "/"; margin-right: 6px; color: #6b7a75; }
.pg-top a { text-decoration: none; display: inline-block; padding: 6px 0; }
.pg-top a:hover { color: var(--pg-ink); }
.pg-top [aria-current] { color: var(--pg-ink); }

/* ---- Abertura: título à esquerda, texto e ação à direita ---- */
.pg-intro {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px); align-items: end;
  padding: clamp(48px, 7vw, 96px) var(--pg-pad) clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--pg-line);
}
.pg-eyebrow { display: block; font-size: 14px; letter-spacing: .02em; color: var(--pg-muted); margin-bottom: 20px; }
.pg-intro h1 {
  font-size: clamp(40px, 5.6vw, 76px); font-weight: 500; line-height: 1.04; letter-spacing: -.045em;
  color: var(--pg-ink); text-wrap: balance;
}
.pg-intro h1 em { font-style: normal; color: var(--pg-red-display); }
.pg-intro .pg-lead { font-size: 18px; line-height: 1.7; color: var(--pg-muted); max-width: 52ch; }
.pg-intro .pg-sign { width: 220px; height: auto; margin-bottom: 28px; }
.pg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 28px; }

/* ---- Ligações e botões ---- */
.pg-link {
  display: inline-flex; align-items: center; gap: 14px; min-height: 44px;
  font-size: 15px; font-weight: 500; text-decoration: none;
  border-bottom: 1px solid var(--pg-red); padding: 8px 0;
}
.pg-link::after { content: "↗"; color: var(--pg-red-text); font-size: 18px; }
.pg-link:hover { color: var(--pg-red-text); }
.pg .pg-btn {
  display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 12px 24px;
  border-radius: 999px; background: var(--pg-red); color: #fff; font-size: 15px; font-weight: 600;
  text-decoration: none; border: 0; cursor: pointer;
}
.pg .pg-btn:hover { background: #9a0822; color: #fff; }

/* ---- Secções ---- */
.pg-sec { padding: clamp(56px, 7vw, 104px) var(--pg-pad); }
.pg-sec + .pg-sec { border-top: 1px solid var(--pg-line); }
.pg-sec--deep { background: var(--pg-bg-2); border-top: 0 !important; }
.pg-sec--sage, .pg-sec--band {
  --pg-ink: var(--pg-sage-ink); --pg-muted: var(--pg-sage-muted); --pg-line: #b6c1b3;
  --pg-red-text: var(--pg-red); --pg-red-display: var(--pg-red);
  background: var(--pg-sage); color: var(--pg-ink); border-top: 0 !important;
}
.pg-sec--band { background: var(--pg-band); }

.pg-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(32px, 4vw, 56px); }
.pg-head--single { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
.pg-head h2 { font-size: clamp(30px, 3.6vw, 48px); font-weight: 500; line-height: 1.12; letter-spacing: -.035em; text-wrap: balance; }
.pg-head p { font-size: 17px; color: var(--pg-muted); max-width: 60ch; }
.pg h3 { font-size: 20px; font-weight: 500; line-height: 1.3; letter-spacing: -.015em; }
.pg-prose p { font-size: 17px; color: var(--pg-muted); max-width: 65ch; }
.pg-prose p + p { margin-top: 16px; }
.pg-split .pg-prose p:first-child { color: var(--pg-ink); font-size: 19px; }

/* ---- Lista numerada (como as escolhas da página inicial) ---- */
.pg-list { border-top: 1px solid var(--pg-line); counter-reset: pg; }
.pg-list > li {
  counter-increment: pg; display: grid; grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 8px 32px; padding: 28px 0; border-bottom: 1px solid var(--pg-line); align-items: baseline;
}
.pg-list > li::before { content: counter(pg, decimal-leading-zero); font-size: 14px; color: var(--pg-muted); }
.pg-list > li > p { color: var(--pg-muted); font-size: 16px; }
.pg-list > li > ul { grid-column: 3; }
.pg-list--plain > li::before { content: none; }
.pg-list--plain > li { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }

/* ---- Colunas com linha por cima (pilares, vantagens) ---- */
.pg-cols { display: grid; grid-template-columns: repeat(var(--pg-n, 3), minmax(0, 1fr)); gap: 40px 32px; }
.pg-cols > * { border-top: 1px solid var(--pg-line); padding-top: 24px; }
.pg-cols h3 { margin: 14px 0 10px; }
.pg-cols p { font-size: 16px; color: var(--pg-muted); }
.pg-ico { width: 22px; height: 22px; color: var(--pg-red-text); display: block; }
.pg-ico svg { width: 100%; height: 100%; }

/* ---- Lista com marcas ---- */
.pg-checks { display: grid; gap: 10px; margin-top: 16px; }
.pg-checks li { position: relative; padding-left: 26px; font-size: 15px; color: var(--pg-muted); }
.pg-checks li::before { content: ""; position: absolute; left: 0; top: .62em; width: 12px; height: 2px; background: var(--pg-red); }
.pg-checks--cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 32px; }

/* ---- Painel sálvia (destaque dentro de secção escura) ---- */
.pg-panel {
  background: var(--pg-sage); color: var(--pg-sage-ink); border-radius: 0 44px 0 0;
  padding: clamp(28px, 3.5vw, 44px);
  --pg-ink: var(--pg-sage-ink); --pg-muted: var(--pg-sage-muted); --pg-line: #b6c1b3; --pg-red-text: var(--pg-red);
}
.pg-panel .pg-eyebrow { color: var(--pg-sage-muted); }
.pg-panel h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 500; line-height: 1.2; letter-spacing: -.025em; margin-bottom: 12px; }
.pg-panel > p, .pg-panel > div > p { font-size: 16px; color: var(--pg-muted); }
.pg-panel > p + *, .pg-panel h2 + p { margin-bottom: 20px; }

/* ---- Texto + imagem ---- */
.pg-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.pg-split--rev > :first-child { order: 2; }
.pg-figure figcaption { margin-top: 12px; font-size: 14px; color: var(--pg-muted); }
.pg-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0 44px 0 0; filter: saturate(.6); }

/* ---- Números ---- */
.pg-stats { display: grid; grid-template-columns: repeat(var(--pg-n, 4), minmax(0, 1fr)); border-top: 1px solid var(--pg-line); }
.pg-stats > div { padding: 28px 24px 8px 0; }
.pg-stats dt { order: 2; font-size: 14px; color: var(--pg-muted); }
.pg-stats dd { font-size: clamp(32px, 3.4vw, 48px); font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.pg-stats > div { display: flex; flex-direction: column-reverse; gap: 8px; }

/* ---- Etiquetas (tecnologias) ---- */
.pg-tags { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.pg-sec > .pg-tags { margin: 32px 0 56px; }
.pg-tags li { font-size: 15px; padding: 8px 18px; border: 1px solid var(--pg-line); border-radius: 999px; color: var(--pg-muted); }

/* ---- Chamada final (faixa vermelha) ---- */
.pg-cta { background: var(--pg-red); color: #fff; padding: clamp(56px, 7vw, 96px) var(--pg-pad); }
.pg-cta h2 { font-size: clamp(32px, 4.6vw, 64px); font-weight: 400; line-height: 1.12; letter-spacing: -.04em; max-width: 18ch; text-wrap: balance; }
.pg-cta p { font-size: 17px; max-width: 56ch; margin-top: 20px; color: #ffffff; } /* 5,7:1 */
.pg .pg-cta .pg-btn { background: #fff; color: var(--pg-red); }
.pg .pg-cta .pg-btn:hover { background: #ffffff; color: var(--pg-red); }
.pg-cta .pg-link { border-color: #fff; }
.pg-cta .pg-link::after { color: #fff; }
.pg-cta .pg-link:hover { color: #fff; opacity: .85; }
.pg-cta :focus-visible { outline-color: #fff; }

/* ---- Formulários ---- */
.pg-form { display: grid; gap: 22px; }
.pg-form .pg-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.pg-form label { display: block; font-size: 14px; color: var(--pg-muted); margin-bottom: 6px; }
.pg-form input, .pg-form select, .pg-form textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--pg-ink); background: transparent;
  border: 0; border-bottom: 1px solid #6b7a75; border-radius: 0; padding: 10px 0; min-height: 44px;
}
.pg-form select { appearance: auto; }
.pg-form select option { color: #12201b; }
.pg-form textarea { min-height: 140px; resize: vertical; }
.pg-form input:focus, .pg-form select:focus, .pg-form textarea:focus { outline: none; border-bottom: 2px solid var(--pg-red-text); }
.pg-form .pg-req { color: var(--pg-red-text); }
.pg-form button[aria-busy="true"], .pg-form[aria-busy="true"] button { opacity: .6; cursor: progress; }
.pg-panel .pg-form input, .pg-panel .pg-form select, .pg-panel .pg-form textarea { border-bottom-color: #8a9a8c; }

/* ---- Detalhes / contactos ---- */
.pg-facts { display: grid; gap: 0; border-top: 1px solid var(--pg-line); }
.pg-facts > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--pg-line); }
.pg-facts dt { font-size: 14px; color: var(--pg-muted); }
.pg-facts dd { font-size: 16px; }
.pg-facts a { text-decoration: none; border-bottom: 1px solid var(--pg-red); display: inline-block; padding: 4px 0; }

/* ---- Responsivo ---- */
@media (max-width: 999px) {
  .pg-intro, .pg-head, .pg-split { grid-template-columns: minmax(0, 1fr); }
  .pg-split--rev > :first-child { order: 0; }
  .pg-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-list > li { grid-template-columns: 40px minmax(0, 1fr); }
  .pg-list > li > p, .pg-list > li > ul, .pg-list > li > div { grid-column: 2; }
  .pg-list--plain > li { grid-template-columns: minmax(0, 1fr); }
  .pg-list--plain > li > p, .pg-list--plain > li > ul, .pg-list--plain > li > div { grid-column: 1; }
}
@media (max-width: 649px) {
  .pg-cols, .pg-checks--cols, .pg-form .pg-row, .pg-facts > div { grid-template-columns: minmax(0, 1fr); }
  .pg-top { flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 20px; padding-bottom: 20px; }
}

/* Mapas e outros embebidos: nunca mais largos do que a coluna (o iframe trazia width=600) */
.pg iframe { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 4 / 3; border: 0; }
.pg-list > li > h2 { font-size: 20px; font-weight: 500; line-height: 1.3; letter-spacing: -.015em; }
.pg-figure--marca img { filter: none; }
