:root{
  --bg: #0b1220;
  --card: rgba(255,255,255,.06);
  --card2: rgba(255,255,255,.08);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);
  --stroke: rgba(255,255,255,.14);

  /* Cores da bandeira Portuguesa */
  --accent: #006600;
  --accent2: #D10000;

  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --radius: 24px;
}

@media (prefers-color-scheme: light){
  :root{
    --bg: #f6f7fb;
    --card: rgba(0,0,0,.05);
    --card2: rgba(0,0,0,.06);
    --text: rgba(5,10,20,.92);
    --muted: rgba(5,10,20,.70);
    --stroke: rgba(5,10,20,.12);
    --shadow: 0 18px 60px rgba(0,0,0,.12);
  }
}

*{ box-sizing: border-box; }
html, body{ width: 100%; height: 100%; margin: 0; padding: 0; }

body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background:
    radial-gradient(900px 500px at 10% 10%, rgba(0,102,0,.25), transparent 60%),
    radial-gradient(800px 480px at 90% 20%, rgba(209,0,0,.22), transparent 55%),
    radial-gradient(900px 540px at 50% 100%, rgba(0,102,0,.12), transparent 65%),
    var(--bg);
  color: var(--text);

  /* Sem barra lateral */
  overflow-x: hidden;

  /* Se o layout estiver correto, evita barra vertical */
  overflow-y: hidden;
}

/* Layout 100% (não usar 100vw para evitar scroll horizontal por causa da largura do scrollbar) */
.wrap{
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header{
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  flex: 0 0 auto;
}

.brand{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.logo{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: none;
}

.logo img{
  height: 40px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,.30));
}

.brand strong{
  font-size: 18px;
  letter-spacing: .2px;
}

.tagline{
  font-size: 12px;
  color: var(--muted);
}

.pill{
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, var(--card), transparent);
  padding: 9px 11px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(0,102,0,.12);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse{
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: .7; }
}

/* Main ocupa a altura restante */
main{
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;                 /* crucial para não forçar overflow */
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
  background: linear-gradient(180deg, var(--card2), transparent);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
}

/* Conteúdo */
.content{
  padding: 18px 28px;
  display: grid;
  gap: 10px;
  align-content: center;
  min-height: 0;
}

.main-logo{
  width: min(360px, 100%);
  height: auto;
  margin-bottom: 2px;
  filter: drop-shadow(0 14px 30px rgba(0,0,0,.35));
}

h1{
  margin: 0;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.6px;
}

p{
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
  max-width: 60ch;
}

.actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.btn{
  appearance: none;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 11px 13px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.btn:hover{
  transform: translateY(-1px);
  border-color: rgba(0,102,0,.45);
  background: rgba(0,102,0,.12);
}

.btn.primary{
  border-color: rgba(0,102,0,.55);
  background: linear-gradient(135deg, rgba(0,102,0,.98), rgba(209,0,0,.92));
  color: #ffffff;
}

.btn.primary:hover{ filter: brightness(1.03); }

.btn.secondary{
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  color: #fff;
}

.fine{
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* Coluna direita */
.side{
  border-left: 1px solid var(--stroke);
  padding: 16px 18px;
  display: grid;
  align-content: center;
  gap: 10px;
  min-height: 0;
  background:
    radial-gradient(420px 320px at 50% 20%, rgba(0,102,0,.18), transparent 60%),
    radial-gradient(420px 320px at 50% 70%, rgba(209,0,0,.14), transparent 55%);
}

.card{
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: rgba(255,255,255,.05);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.label{
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .22px;
  text-transform: uppercase;
}

.progress{
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
  border: 1px solid var(--stroke);
}

.bar{
  height: 100%;
  width: 62%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0,102,0,1), rgba(209,0,0,1));
  animation: move 2.4s ease-in-out infinite;
  transform-origin: left center;
}

@keyframes move{
  0%,100%{ transform: scaleX(.86); opacity: .95; }
  50%{ transform: scaleX(1); opacity: 1; }
}

.hero{
  border-radius: 18px;
  border: 1px dashed rgba(255,255,255,.22);
  background: rgba(0,0,0,.12);
  overflow: hidden;
}

/* Altura fixa para garantir que o rodapé aparece em 768px */
.hero svg{
  width: 100%;
  height: 250px;
  display: block;
}

/* Rodapé: sempre visível */
footer{
  width: 100%;
  background: #000;
  color: #fff;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

footer .footer-left{
  display: grid;
  gap: 6px;
  max-width: 90ch;
  color: rgba(255,255,255,.92);
}

footer .footer-left .muted{
  color: rgba(255,255,255,.75);
  line-height: 1.45;
}

.links{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.links a{
  color: rgba(255,255,255,.88);
  text-decoration: none;
  border-bottom: 1px dotted transparent;
}
.links a:hover{
  color: #ffffff;
  border-bottom-color: #ffffff;
}

/* Cookie banner */
.cookie-banner{
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  background: rgba(0,0,0,.92);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(0,0,0,.45);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.cookie-banner p{
  margin: 0;
  color: rgba(255,255,255,.85);
  font-size: 13px;
  line-height: 1.5;
  max-width: none;
}

.cookie-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

/* Se o ecrã for mesmo baixo, encolhe mais um pouco */
@media (max-height: 740px){
  header{ padding: 10px 18px; }
  .content{ padding: 14px 22px; }
  .side{ padding: 12px 14px; }
  .main-logo{ width: min(320px, 100%); }
  h1{ font-size: 28px; }
  .hero svg{ height: 220px; }
  footer{ padding: 10px 18px; font-size: 11px; }
}

/* Responsivo */
@media (max-width: 900px){
  body{ overflow-y: auto; } /* em mobile, deixa rolar */
  main{ grid-template-columns: 1fr; }
  .side{ border-left: none; border-top: 1px solid var(--stroke); }
  .hero svg{ height: auto; }
}

@media (prefers-reduced-motion: reduce){
  .dot, .bar{ animation: none !important; }
  .btn{ transition: none; }
  .btn:hover{ transform: none; }
}
