/* ==========================================================================
   SPL — social-padel-league.com
   Paleta transcrita de src/lib/theme.ts:15-32 (paletaEscura). A app é escura e
   a página é a mesma marca; não há tema claro aqui.
   ========================================================================== */

:root {
  --bg: #061d3a;
  --surface: #0b2a52;
  --surface2: #113669;
  --border: #2a5188;
  --divider: #1d4274;
  --text: #f3f7fc;
  --text2: #c7d5e6;
  --muted: #8ca4c3;
  --lime: #9bc51e;
  --lime-light: #b8dd3a;
  --cyan: #2ba3f0;

  /* Escala tipográfica fluida: 390 px → 1440 px. */
  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-base: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --t-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --t-xl: clamp(1.375rem, 1.2rem + 0.75vw, 1.75rem);
  --t-2xl: clamp(1.75rem, 1.4rem + 1.5vw, 2.75rem);
  --t-3xl: clamp(2.25rem, 1.6rem + 2.8vw, 4rem);

  /* Ritmo vertical: uma única escala, usada por todas as secções. */
  --e1: 0.5rem;
  --e2: 1rem;
  --e3: 1.5rem;
  --e4: 2.5rem;
  --e5: 4rem;
  --e6: clamp(4rem, 2rem + 8vw, 7.5rem);

  --largura: 1140px;
  --medida: 65ch;
  --raio: 14px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: var(--t-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: var(--t-3xl); }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-lg); letter-spacing: -0.01em; }

p { color: var(--text2); }
strong { color: var(--text); font-weight: 700; }

a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--lime-light); }

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

.sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.salto {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--lime); color: var(--bg);
  padding: var(--e2) var(--e3); font-weight: 700; text-decoration: none;
}
.salto:focus { left: 0; }

.medida { max-width: var(--medida); }
.pequeno { font-size: var(--t-sm); color: var(--muted); }

/* --------------------------------------------------------------- cabeçalho */

.topo {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 29, 58, 0.82);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--divider);
}

.topo-interior {
  max-width: var(--largura); margin: 0 auto;
  padding: 0.75rem var(--e3);
  display: flex; align-items: center; gap: var(--e3);
}

.marca {
  display: flex; align-items: center; gap: 0.625rem;
  text-decoration: none; color: var(--text); flex: none;
}
.marca img { border-radius: 8px; display: block; }

.wordmark {
  font-weight: 900; font-size: 1.375rem; letter-spacing: 0.14em;
  color: var(--text);
}

.topo-nav {
  display: flex; gap: var(--e3); margin-left: auto;
  font-size: var(--t-sm); font-weight: 600;
}
.topo-nav a {
  color: var(--text2); text-decoration: none;
  padding: 0.25rem 0; border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.topo-nav a:hover { color: var(--text); border-bottom-color: var(--lime); }

.idioma { flex: none; margin-left: auto; }
.topo-nav + .idioma { margin-left: 0; }

select {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 0.45rem 0.6rem; font: inherit; font-size: var(--t-sm);
  font-weight: 600; cursor: pointer;
}
select:hover { border-color: var(--lime); }

/* --------------------------------------------------------------------- hero */

.hero { position: relative; overflow: hidden; isolation: isolate; }

.hero-fundo {
  position: absolute; inset: 0; z-index: -2;
  display: block;
}
.hero-fundo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 35%;
  display: block;
}
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 90% at 50% 10%, rgba(6, 29, 58, 0.25) 0%, rgba(6, 29, 58, 0.85) 55%, var(--bg) 100%),
    linear-gradient(to bottom, rgba(6, 29, 58, 0.5), rgba(6, 29, 58, 0.2) 40%, var(--bg) 96%);
}

.hero-interior {
  max-width: var(--largura); margin: 0 auto;
  padding: var(--e6) var(--e3) var(--e5);
  display: grid; gap: var(--e5);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
}

.hero-emblema { display: block; margin-bottom: var(--e3); }

.hero-copy h1 { max-width: 16ch; }
.hero-copy .lead {
  font-size: var(--t-lg); color: var(--text2);
  max-width: 48ch; margin-top: var(--e3);
}

.lojas { display: flex; flex-wrap: wrap; gap: var(--e2); margin-top: var(--e4); }

/* Os dois distintivos não são ligações — nenhuma das lojas serve a app hoje.
   O estado desactivado é visível (opacidade + cadeado), não só semântico. */
.loja {
  display: flex; flex-direction: column; gap: 0.1rem;
  padding: 0.7rem 1.1rem;
  background: rgba(11, 42, 82, 0.75);
  border: 1px solid var(--border); border-radius: 10px;
  opacity: 0.72; cursor: default;
}
.loja strong { font-size: var(--t-sm); font-weight: 700; }
.loja small { font-size: var(--t-xs); color: var(--lime); font-weight: 600; letter-spacing: 0.04em; }

.nota-lancamento {
  margin-top: var(--e3); font-size: var(--t-sm); color: var(--muted);
}

.hero-ecra { display: flex; justify-content: center; }

/* Moldura de telemóvel. O retrato é real (scripts/shot-pad829-landing.mjs). */
.telemovel {
  width: 100%; max-width: 300px;
  border: 1px solid var(--border); border-radius: 30px;
  padding: 7px; background: #04142a;
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(155, 197, 30, 0.12);
}
.telemovel picture, .telemovel img {
  display: block; width: 100%; height: auto;
  border-radius: 23px;
}
.telemovel.pequeno { max-width: 250px; }

/* ------------------------------------------------------------------ secções */

.faixa { padding: var(--e6) var(--e3); }
.faixa:nth-of-type(even) { background: linear-gradient(to bottom, rgba(11, 42, 82, 0.45), transparent); }

.caixa { max-width: var(--largura); margin: 0 auto; }
.caixa > h2 + .lead { margin-top: var(--e3); }
.caixa > * + * { margin-top: var(--e3); }

.lead { font-size: var(--t-lg); color: var(--text2); }

.lista-marcas { list-style: none; display: grid; gap: var(--e2); max-width: var(--medida); }
.lista-marcas li {
  position: relative; padding-left: 1.75rem; color: var(--text2);
}
.lista-marcas li::before {
  content: ''; position: absolute; left: 0; top: 0.6em;
  width: 10px; height: 10px; border-radius: 2px;
  background: var(--lime);
}

.destaque {
  color: var(--lime-light); font-weight: 700; font-size: var(--t-lg);
  border-left: 3px solid var(--lime); padding-left: var(--e2);
}

.aviso {
  color: var(--text2); font-size: var(--t-sm);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--raio); padding: var(--e2) var(--e3);
}

.colunas {
  display: grid; gap: var(--e3);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: var(--e4) !important;
}

.cartao {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--raio); padding: var(--e3);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.cartao:hover { border-color: var(--lime); transform: translateY(-2px); }
.cartao h3 { color: var(--lime); margin-bottom: var(--e1); }
.cartao p { font-size: var(--t-sm); }

.dupla-ecra {
  display: flex; flex-wrap: wrap; gap: var(--e4);
  justify-content: center; margin-top: var(--e5) !important;
}

/* ------------------------------------------------------------------- preço */

.caixa.preco {
  background: var(--surface); border: 1px solid var(--lime);
  border-radius: 20px; padding: var(--e5) var(--e4);
  box-shadow: 0 0 60px rgba(155, 197, 30, 0.07);
}

.gigante {
  font-size: var(--t-xl); font-weight: 800; color: var(--lime);
  letter-spacing: -0.015em; line-height: 1.2;
}

.exemplo {
  background: rgba(155, 197, 30, 0.08);
  border-left: 4px solid var(--lime);
  border-radius: 0 var(--raio) var(--raio) 0;
  padding: var(--e3);
  max-width: var(--medida);
}
.exemplo h3 { font-size: var(--t-sm); text-transform: uppercase; letter-spacing: 0.09em; color: var(--lime); }
.exemplo p { margin-top: var(--e1); font-size: var(--t-sm); }

.etiqueta { font-size: var(--t-sm); color: var(--muted); max-width: var(--medida); }
.etiqueta-valor {
  font-weight: 700; color: var(--text);
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.1rem 0.45rem;
}

.ligacao { font-weight: 700; }

/* ------------------------------------------------------------------- rodapé */

.rodape {
  border-top: 1px solid var(--divider);
  background: var(--surface);
  padding: var(--e5) var(--e3);
  margin-top: var(--e5);
}

.rodape-interior {
  max-width: var(--largura); margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: var(--e4);
  justify-content: space-between; align-items: flex-start;
}

.rodape-marca .wordmark { display: block; margin-top: var(--e1); }
.rodape-marca img { display: block; }

.rodape-ligacoes { display: grid; gap: var(--e1); font-size: var(--t-sm); }
.rodape-ligacoes a { color: var(--text2); text-decoration: none; }
.rodape-ligacoes a:hover { color: var(--lime-light); text-decoration: underline; }

/* ------------------------------------------- páginas de texto (legal/apoio) */

.documento {
  max-width: 760px; margin: 0 auto;
  padding: var(--e5) var(--e3) var(--e6);
}
.documento h1 { font-size: var(--t-2xl); }
.documento h2 {
  font-size: var(--t-xl); margin-top: var(--e5); margin-bottom: var(--e2);
  color: var(--lime);
}
.documento h3 {
  font-size: var(--t-base); margin-top: var(--e3); margin-bottom: var(--e1);
  color: var(--text);
}
.documento p { margin-bottom: var(--e2); }
.documento ul { list-style: none; display: grid; gap: var(--e2); margin-bottom: var(--e2); }
.documento ul li { position: relative; padding-left: 1.5rem; color: var(--text2); }
.documento ul li::before {
  content: ''; position: absolute; left: 0; top: 0.62em;
  width: 8px; height: 8px; border-radius: 2px; background: var(--cyan);
}
.documento .datado { font-size: var(--t-sm); color: var(--muted); margin-top: var(--e1); }

.qa {
  border-top: 1px solid var(--divider);
  padding-top: var(--e3); margin-top: var(--e3);
}
.qa h3 { margin-top: 0; font-size: var(--t-lg); color: var(--text); }

.contacto {
  display: inline-block; margin-bottom: var(--e2);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--raio); padding: var(--e2) var(--e3);
  font-weight: 700; font-size: var(--t-lg); text-decoration: none;
}
.contacto:hover { border-color: var(--lime); }

/* ------------------------------------------------------------------- 390 px */

@media (max-width: 900px) {
  .hero-interior { grid-template-columns: 1fr; gap: var(--e4); }
  .hero-copy h1 { max-width: none; }
  .topo-nav { display: none; }
  .idioma { margin-left: auto; }
}

@media (max-width: 560px) {
  .topo-interior { padding: 0.625rem var(--e2); }
  .faixa { padding: var(--e5) var(--e2); }
  .caixa.preco { padding: var(--e4) var(--e3); }
  .rodape { padding: var(--e4) var(--e2); }
  .documento { padding: var(--e4) var(--e2) var(--e5); }
  .lojas { flex-direction: column; align-items: stretch; }
  .dupla-ecra { gap: var(--e3); }
  .telemovel.pequeno { max-width: 210px; }
}

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