/* =====================================================
   FAROL DO JOGO — Observatório do Jogo Online em Portugal
   Design system: "Atlântico Editorial"
   Paleta inspirada em azulejo português + luz de farol
   ===================================================== */

:root {
  /* Cores */
  --atlantico: #0d3b53;        /* azul profundo do Atlântico */
  --atlantico-escuro: #082838;
  --azulejo: #1d6a96;          /* azul azulejo */
  --azulejo-claro: #eaf3f8;
  --farol: #f2b02c;            /* luz do farol (dourado quente) */
  --farol-suave: #fdf3dd;
  --coral: #c8502e;            /* telha de Lisboa */
  --papel: #faf7f0;            /* fundo tipo papel */
  --papel-escuro: #f1ece0;
  --tinta: #22303a;
  --tinta-suave: #5a6b76;
  --verde-ok: #2e7d5b;
  --verde-ok-bg: #e6f4ed;
  --amarelo-aviso: #b07d10;
  --amarelo-aviso-bg: #fdf3dd;
  --vermelho-alerta: #b03a2e;
  --vermelho-alerta-bg: #fbeae8;
  --borda: #e2dccc;

  /* Tipografia */
  --serif: "Fraunces", "Georgia", "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;

  --largura: 1120px;
  --raio: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--papel);
  color: var(--tinta);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Utilidades ---------- */
.container { max-width: var(--largura); margin: 0 auto; padding: 0 24px; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Barra 18+ / aviso legal (sempre visível) ---------- */
.barra-legal {
  background: var(--atlantico-escuro);
  color: #cfe0ea;
  font-size: 12.5px;
  padding: 7px 0;
  text-align: center;
  letter-spacing: 0.01em;
}
.barra-legal strong { color: var(--farol); }
.barra-legal a { color: #fff; text-decoration: underline; }

/* ---------- Cabeçalho ---------- */
header.site {
  background: var(--papel);
  border-bottom: 3px solid var(--atlantico);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; max-width: var(--largura); margin: 0 auto;
  gap: 16px; flex-wrap: wrap;
}
.marca { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.marca-logo {
  width: 44px; height: 44px; flex-shrink: 0;
}
.marca-texto { display: flex; flex-direction: column; line-height: 1.1; }
.marca-nome {
  font-family: var(--serif); font-weight: 700; font-size: 22px;
  color: var(--atlantico); letter-spacing: -0.02em; white-space: nowrap;
}
.marca-sub {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--tinta-suave); font-weight: 600;
}
nav.principal ul { display: flex; gap: 4px; list-style: none; flex-wrap: wrap; }
nav.principal a {
  text-decoration: none; color: var(--tinta); font-weight: 600;
  font-size: 14.5px; padding: 8px 13px; border-radius: 6px;
  transition: background 0.15s;
}
nav.principal a:hover { background: var(--azulejo-claro); color: var(--azulejo); }
nav.principal a[aria-current="page"] { background: var(--atlantico); color: #fff; }

/* ---------- Faixa azulejo decorativa ---------- */
.faixa-azulejo {
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' viewBox='0 0 28 14'%3E%3Crect width='28' height='14' fill='%230d3b53'/%3E%3Cpath d='M7 1 L13 7 L7 13 L1 7 Z' fill='none' stroke='%23f2b02c' stroke-width='1.2'/%3E%3Cpath d='M21 1 L27 7 L21 13 L15 7 Z' fill='none' stroke='%235a91b0' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(ellipse 900px 420px at 85% -10%, rgba(242,176,44,0.16), transparent 60%),
    linear-gradient(180deg, var(--atlantico-escuro), var(--atlantico));
  color: #eef5f9;
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpath d='M14 2 L26 14 L14 26 L2 14 Z M42 30 L54 42 L42 54 L30 42 Z' fill='none' stroke='%23ffffff' stroke-opacity='0.05' stroke-width='1'/%3E%3C/svg%3E");
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-etiqueta {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(242,176,44,0.14); border: 1px solid rgba(242,176,44,0.45);
  color: var(--farol); font-size: 12.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 6px 14px; border-radius: 100px; margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--serif); font-size: clamp(34px, 5vw, 54px);
  font-weight: 600; line-height: 1.12; letter-spacing: -0.015em;
  max-width: 17em; margin-bottom: 20px;
}
.hero h1 em { font-style: italic; color: var(--farol); }
.hero p.lede {
  font-size: 19px; max-width: 44em; color: #c3d5e0; margin-bottom: 32px;
}
.hero-acoes { display: flex; gap: 14px; flex-wrap: wrap; }
.botao {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 15.5px; text-decoration: none;
  padding: 13px 26px; border-radius: 8px; transition: transform 0.12s, box-shadow 0.12s;
}
.botao:hover { transform: translateY(-1px); }
.botao-primario { background: var(--farol); color: var(--atlantico-escuro); box-shadow: 0 4px 14px rgba(242,176,44,0.35); }
.botao-secundario { background: transparent; color: #eef5f9; border: 1.5px solid rgba(255,255,255,0.35); }
.botao-secundario:hover { border-color: #fff; }

/* ---------- Faixa de dados (hero stats) ---------- */
.faixa-dados {
  background: var(--papel-escuro); border-bottom: 1px solid var(--borda);
}
.faixa-dados .container {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0; padding: 0 24px;
}
.dado {
  padding: 22px 18px; border-left: 1px solid var(--borda);
}
.dado:first-child { border-left: none; }
.dado .num {
  font-family: var(--serif); font-size: 34px; font-weight: 700;
  color: var(--atlantico); line-height: 1;
}
.dado .rot { font-size: 13px; color: var(--tinta-suave); margin-top: 6px; }
.dado .fonte { font-size: 11.5px; color: var(--tinta-suave); font-family: var(--mono); margin-top: 4px; }

/* ---------- Secções ---------- */
section.bloco { padding: 64px 0; }
section.bloco.alt { background: var(--papel-escuro); }
.bloco-cabeca { max-width: 640px; margin-bottom: 40px; }
.rotulo-seccao {
  font-family: var(--mono); font-size: 12.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--coral);
  display: block; margin-bottom: 10px;
}
h2.titulo {
  font-family: var(--serif); font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 600; color: var(--atlantico); line-height: 1.2;
  letter-spacing: -0.01em;
}
.bloco-cabeca p { margin-top: 14px; color: var(--tinta-suave); font-size: 17px; }

/* ---------- Cartões ---------- */
.grelha { display: grid; gap: 22px; }
.grelha-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grelha-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.cartao {
  background: #fff; border: 1px solid var(--borda); border-radius: var(--raio);
  padding: 28px; position: relative;
}
.cartao h3 {
  font-family: var(--serif); font-size: 21px; color: var(--atlantico);
  margin-bottom: 10px; font-weight: 600;
}
.cartao p { color: var(--tinta-suave); font-size: 15.5px; }
.cartao .icone {
  width: 44px; height: 44px; border-radius: 9px;
  background: var(--azulejo-claro); display: flex; align-items: center;
  justify-content: center; margin-bottom: 16px; font-size: 22px;
}

/* ---------- Tabela registo de licenças ---------- */
.tabela-envolvente {
  overflow-x: auto; background: #fff; border: 1px solid var(--borda);
  border-radius: var(--raio);
}
table.registo { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 760px; }
table.registo caption {
  text-align: left; padding: 18px 22px 6px; font-family: var(--serif);
  font-size: 19px; color: var(--atlantico); font-weight: 600;
}
table.registo thead th {
  text-align: left; padding: 12px 18px; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--tinta-suave);
  border-bottom: 2px solid var(--atlantico); white-space: nowrap;
}
table.registo tbody td { padding: 14px 18px; border-bottom: 1px solid var(--borda); vertical-align: top; }
table.registo tbody tr:last-child td { border-bottom: none; }
table.registo tbody tr:hover { background: var(--azulejo-claro); }
.nome-marca { font-weight: 700; color: var(--atlantico); }
.entidade { font-size: 12.5px; color: var(--tinta-suave); display: block; margin-top: 2px; }
.licenca { font-family: var(--mono); font-size: 13px; color: var(--tinta); }

/* Selos de estado */
.selo {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; padding: 4px 11px;
  border-radius: 100px; white-space: nowrap;
}
.selo::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.selo-ativo { background: var(--verde-ok-bg); color: var(--verde-ok); }
.selo-ativo::before { background: var(--verde-ok); }
.selo-parcial { background: var(--amarelo-aviso-bg); color: var(--amarelo-aviso); }
.selo-parcial::before { background: var(--amarelo-aviso); }
.selo-suspenso { background: var(--vermelho-alerta-bg); color: var(--vermelho-alerta); }
.selo-suspenso::before { background: var(--vermelho-alerta); }

/* Etiquetas de produto */
.produto {
  display: inline-block; font-size: 11.5px; font-weight: 600;
  background: var(--papel-escuro); border: 1px solid var(--borda);
  border-radius: 5px; padding: 2px 8px; margin: 2px 2px 2px 0;
  color: var(--tinta-suave);
}

/* ---------- Caixa de verificação de data ---------- */
.caixa-verificacao {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--farol-suave); border: 1px solid #ecd9a8;
  border-radius: var(--raio); padding: 18px 22px; margin: 22px 0;
  font-size: 14.5px;
}
.caixa-verificacao .icone-v { font-size: 22px; line-height: 1.2; }
.caixa-verificacao strong { color: var(--atlantico); }
.caixa-verificacao a { color: var(--azulejo); font-weight: 600; }

/* ---------- Nota de transparência (divulgação afiliados) ---------- */
.divulgacao {
  background: var(--azulejo-claro); border-left: 4px solid var(--azulejo);
  padding: 16px 20px; border-radius: 0 8px 8px 0; font-size: 14px;
  color: var(--tinta); margin: 26px 0;
}
.divulgacao strong { color: var(--atlantico); }

/* ---------- Diário de bordo (changelog) ---------- */
.diario { list-style: none; position: relative; padding-left: 28px; }
.diario::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px;
  width: 2px; background: var(--borda);
}
.diario li { position: relative; padding-bottom: 26px; }
.diario li::before {
  content: ""; position: absolute; left: -27px; top: 7px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--farol); border: 2.5px solid var(--papel);
  box-shadow: 0 0 0 2px var(--farol);
}
.diario time {
  font-family: var(--mono); font-size: 12.5px; color: var(--coral);
  font-weight: 600; display: block; margin-bottom: 4px;
}
.diario .titulo-entrada { font-weight: 700; color: var(--atlantico); }
.diario p { font-size: 14.5px; color: var(--tinta-suave); margin-top: 3px; }

/* ---------- Artigo ---------- */
article.artigo { max-width: 720px; margin: 0 auto; padding: 56px 24px 72px; }
.artigo-meta {
  display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center;
  font-size: 13.5px; color: var(--tinta-suave); margin: 18px 0 8px;
}
.artigo-meta .autor { display: flex; align-items: center; gap: 9px; font-weight: 600; color: var(--tinta); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--atlantico);
  color: var(--farol); display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; font-family: var(--serif);
}
article.artigo h1 {
  font-family: var(--serif); font-size: clamp(30px, 4.2vw, 42px);
  color: var(--atlantico); line-height: 1.18; font-weight: 600;
  letter-spacing: -0.015em;
}
article.artigo h2 {
  font-family: var(--serif); font-size: 26px; color: var(--atlantico);
  margin: 40px 0 14px; font-weight: 600;
}
article.artigo h3 { font-size: 19px; color: var(--atlantico); margin: 28px 0 10px; }
article.artigo p { margin-bottom: 16px; }
article.artigo ul, article.artigo ol { margin: 0 0 16px 24px; }
article.artigo li { margin-bottom: 8px; }
article.artigo a { color: var(--azulejo); }
.artigo-sumario {
  background: var(--papel-escuro); border: 1px solid var(--borda);
  border-radius: var(--raio); padding: 20px 24px; margin: 26px 0;
}
.artigo-sumario strong { font-family: var(--serif); color: var(--atlantico); font-size: 17px; }
.artigo-sumario ol { margin: 10px 0 0 22px; font-size: 15px; }
.fontes { font-size: 14px; border-top: 2px solid var(--atlantico); padding-top: 18px; margin-top: 44px; }
.fontes h2 { font-size: 18px !important; margin-top: 0 !important; }
.fontes ol { font-size: 13.5px; color: var(--tinta-suave); }

/* ---------- FAQ ---------- */
details.faq {
  background: #fff; border: 1px solid var(--borda); border-radius: 9px;
  margin-bottom: 12px; overflow: hidden;
}
details.faq summary {
  cursor: pointer; padding: 18px 22px; font-weight: 700; font-size: 16px;
  color: var(--atlantico); list-style: none; position: relative; padding-right: 48px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%;
  transform: translateY(-50%); font-size: 22px; color: var(--coral);
  font-weight: 400;
}
details.faq[open] summary::after { content: "−"; }
details.faq .resposta { padding: 0 22px 18px; color: var(--tinta-suave); font-size: 15px; }

/* ---------- Bloco jogo responsável ---------- */
.faixa-jr {
  background: linear-gradient(135deg, var(--atlantico-escuro), var(--atlantico));
  color: #dfeaf1; border-radius: 14px; padding: 40px;
  display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center;
}
.faixa-jr h2 { font-family: var(--serif); font-size: 27px; color: #fff; margin-bottom: 10px; }
.faixa-jr p { font-size: 15.5px; max-width: 46em; }
.faixa-jr .contactos { display: flex; flex-direction: column; gap: 10px; min-width: 240px; }
.contacto-jr {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18);
  border-radius: 9px; padding: 12px 16px; text-decoration: none; color: #fff;
  font-size: 14px;
}
.contacto-jr strong { display: block; color: var(--farol); font-size: 15px; }

/* ---------- Rodapé ---------- */
footer.site {
  background: var(--atlantico-escuro); color: #a9bfcc; padding: 56px 0 0;
  font-size: 14px;
}
.rodape-grelha {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px; padding-bottom: 40px;
}
footer.site h4 {
  color: #fff; font-size: 13px; text-transform: uppercase;
  letter-spacing: 0.1em; margin-bottom: 14px;
}
footer.site ul { list-style: none; }
footer.site li { margin-bottom: 9px; }
footer.site a { color: #a9bfcc; text-decoration: none; }
footer.site a:hover { color: var(--farol); }
.rodape-marca { font-family: var(--serif); font-size: 22px; color: #fff; font-weight: 700; }
.rodape-legal {
  border-top: 1px solid rgba(255,255,255,0.12); padding: 22px 0 30px;
  font-size: 12.5px; line-height: 1.7; color: #7e97a6;
}
.selo-18 {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%; border: 2.5px solid var(--coral);
  color: #fff; font-weight: 800; font-size: 14px; background: var(--coral);
  margin-right: 12px; vertical-align: middle;
}

/* ---------- Breadcrumb ---------- */
.migalhas {
  font-size: 13px; color: var(--tinta-suave); padding: 18px 0 0;
}
.migalhas a { color: var(--azulejo); text-decoration: none; }
.migalhas span[aria-current] { color: var(--tinta); font-weight: 600; }

/* ---------- Cartões de marcas (logos editoriais) ---------- */
.grelha-marcas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}
.marca-cartao {
  background: #fff;
  border: 1px solid var(--borda);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 268px;
  transition: transform 0.12s, box-shadow 0.12s;
}
.marca-cartao:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(13, 59, 83, 0.08);
}
.marca-cartao-topo { display: flex; align-items: center; gap: 14px; }
.logo-marca {
  width: 58px; height: 58px; flex-shrink: 0;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.03em;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 -5px 0 rgba(0,0,0,0.12);
}
.logo-marca::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M10 1 L19 10 L10 19 L1 10 Z' fill='none' stroke='%23ffffff' stroke-opacity='0.18' stroke-width='1'/%3E%3C/svg%3E");
  pointer-events: none;
}
.marca-cartao h3 {
  font-family: var(--serif); font-size: 18px; color: var(--atlantico);
  font-weight: 600; line-height: 1.15; margin: 0;
}
.marca-cartao .entidade { font-size: 12px; color: var(--tinta-suave); margin: 3px 0 0; }
.marca-cartao .meta-marca { font-family: var(--mono); font-size: 12px; color: var(--tinta-suave); }
.marca-acoes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.marca-acoes a, .marca-acoes span {
  font-size: 13px; font-weight: 700; text-decoration: none;
  padding: 8px 12px; border-radius: 7px;
}
.btn-ficha { background: var(--azulejo-claro); color: var(--azulejo); }
.btn-oficial { background: var(--atlantico); color: #fff; }
.btn-oficial:hover { background: var(--azulejo); }
.btn-off { background: var(--papel-escuro); color: var(--tinta-suave); cursor: not-allowed; }
.nota-18 { font-size: 11px; color: var(--tinta-suave); }

/* ---------- Responsivo ---------- */
@media (max-width: 860px) {
  .rodape-grelha { grid-template-columns: 1fr 1fr; }
  .faixa-jr { grid-template-columns: 1fr; }
  .header-inner { justify-content: center; }
}
@media (max-width: 560px) {
  .rodape-grelha { grid-template-columns: 1fr; }
  .dado { border-left: none; border-top: 1px solid var(--borda); }
}
