/* ─────────────────────────────────────────────────────────────
   Link na bio · estrutura comum às duas marcas.
   As cores, fontes e raios vêm dos tokens de ecovalor.css e
   esgnow.css; este arquivo só usa as variáveis.
   ───────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--fonte-texto);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; }

/* ── fundo de marca ─────────────────────────────────────────── */

.fundo {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ── coluna central ─────────────────────────────────────────── */

.pagina {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  flex: 1;
  padding: max(48px, env(safe-area-inset-top)) 16px 16px;
  animation: entrar .5s cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes entrar {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ── perfil ─────────────────────────────────────────────────── */

.perfil {
  text-align: center;
  margin-bottom: 30px;
}

/* sem anel nem borda: a foto ou o símbolo da marca aparecem limpos */
.avatar {
  width: 104px;
  height: 104px;
  margin: 0 auto 18px;
}

.avatar img {
  display: block;
  width: 100%;
  height: 100%;
}

/* foto enviada no Ecostation: recorte redondo */
.avatar-foto img {
  border-radius: 50%;
  object-fit: cover;
}

/* sem foto: o símbolo da marca inteiro, sem fundo nem recorte */
.avatar-marca img {
  object-fit: contain;
}

h1 {
  margin: 0;
  font-family: var(--fonte-titulo);
  font-weight: var(--peso-titulo);
  font-size: clamp(22px, 6vw, 28px);
  line-height: 1.2;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.arroba {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.descricao {
  max-width: 44ch;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  text-wrap: pretty;
}

/* ── redes sociais ──────────────────────────────────────────── */

.redes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.redes a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: color .15s, border-color .15s, transform .15s;
}

.redes a:hover {
  color: var(--acento);
  border-color: var(--acento);
  transform: translateY(-2px);
}

.redes .icone { width: 20px; height: 20px; }

/* ── botões ─────────────────────────────────────────────────── */

.botoes {
  display: grid;
  gap: 12px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.botao {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 14px 18px;
  border-radius: var(--raio-botao);
  border: 1px solid var(--botao-borda);
  background: var(--botao-bg);
  color: var(--botao-ink);
  box-shadow: var(--sombra);
  text-decoration: none;
  font-family: var(--fonte-botao);
  font-weight: var(--peso-botao);
  font-size: 16px;
  line-height: 1.3;
  transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
}

/* o texto fica centrado: o recuo da esquerda equilibra a seta da direita */
.botao span {
  flex: 1;
  padding-left: 32px;
  text-align: center;
  text-wrap: balance;
}

.botao .icone {
  flex: none;
  width: 20px;
  height: 20px;
  opacity: .65;
  transition: transform .15s, opacity .15s;
}

.botao:hover {
  transform: translateY(-2px);
  background: var(--botao-bg-hover);
  border-color: var(--botao-borda-hover);
  box-shadow: var(--sombra-hover);
}

.botao:hover .icone {
  opacity: 1;
  transform: translate(2px, -2px);
}

.botao:active { transform: translateY(0); }

/* ── cards com imagem ───────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

/* número ímpar de cards: o último fica centralizado, do tamanho dos outros */
.cards-impar li:last-child {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc(50% - 6px);
}

.card {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: var(--raio-card);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--sombra);
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}

.card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s cubic-bezier(.2, .7, .2, 1);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sombra-hover);
}

.card:hover img { transform: scale(1.035); }

.card-rotulo {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 10px 12px;
  border-radius: calc(var(--raio-card) - 6px);
  background: var(--card-rotulo-bg);
  color: var(--card-rotulo-ink);
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .35);
  font-family: var(--fonte-botao);
  font-weight: var(--peso-botao);
  font-size: 14px;
  line-height: 1.25;
  text-align: center;
}

@media (max-width: 340px) {
  .cards { grid-template-columns: 1fr; }
  .cards-impar li:last-child { width: auto; }
}

/* ── foco visível (teclado) ─────────────────────────────────── */

.botao:focus-visible,
.card:focus-visible,
.redes a:focus-visible,
.rodape a:focus-visible {
  outline: 3px solid var(--foco);
  outline-offset: 3px;
}

/* ── estados ────────────────────────────────────────────────── */

.vazio {
  margin: 0;
  text-align: center;
  color: var(--muted);
}

.pagina-aviso {
  padding-top: max(14vh, 48px);
  text-align: center;
}

.pagina-aviso .descricao { margin-bottom: 28px; }

/* ── rodapé ─────────────────────────────────────────────────── */

.rodape {
  position: relative;
  z-index: 1;
  padding: 28px 16px max(36px, env(safe-area-inset-bottom));
  text-align: center;
  color: var(--faint);
  font-size: 13px;
}

.rodape p { margin: 0; }

.rodape a { color: inherit; text-underline-offset: 3px; }

.rodape-marca {
  display: inline-block;
  margin-bottom: 10px;
  opacity: .85;
  transition: opacity .15s;
}

.rodape-marca:hover { opacity: 1; }

.logo { display: block; height: auto; }
.logo-escuro { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-claro { display: none; }
  :root:not([data-theme="light"]) .logo-escuro { display: block; }
}

:root[data-theme="dark"] .logo-claro { display: none; }
:root[data-theme="dark"] .logo-escuro { display: block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
