/* =========================================================
   GA | Link na bio
   Cores, fontes e medidas principais ficam nas variáveis abaixo.
   Textos e links ficam em config.js.
   ========================================================= */

:root {
  --bg: #050404;
  --coral: #ff3b3b;
  --crimson: #8a1c1c;

  --text: #ffffff;
  --text-soft: #d4cccc;
  --muted: #b9afaf;
  --faint: #8c8383;

  /* Vidro dos cards: translúcido, deixa passar um pouco do brilho do fundo */
  --glass: linear-gradient(180deg, rgba(255, 220, 220, 0.08), rgba(255, 220, 220, 0.04));
  --glass-blur: blur(8px) saturate(140%);
  --line: rgba(255, 59, 59, 0.5);
  --line-strong: rgba(255, 59, 59, 0.95);
  --radius: 14px;
  --radius-sm: 10px;

  --gradient: linear-gradient(100deg, #ff3b3b 0%, #d92828 22%, #b02020 62%, #8a1c1c 100%);

  --font-title: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --page-max: 480px;
  --gutter: 16px;
  --logo-w: clamp(156px, 46vw, 208px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

/* O fundo fica só no <html>; assim o brilho dos cantos (z-index: -1) aparece por baixo do conteúdo. */
html {
  background-color: var(--bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

/* Brilho vermelho sutil nos cantos da tela */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vmax 42vmax at 0% 0%, rgba(138, 28, 28, 0.42), transparent 62%),
    radial-gradient(60vmax 42vmax at 100% 0%, rgba(138, 28, 28, 0.42), transparent 62%),
    radial-gradient(52vmax 36vmax at 0% 100%, rgba(138, 28, 28, 0.3), transparent 62%),
    radial-gradient(52vmax 36vmax at 100% 100%, rgba(138, 28, 28, 0.3), transparent 62%);
}

/* Fundo de partículas: fixo atrás de tudo, sem receber cliques */
.particulas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.particulas canvas {
  display: block;
  width: 100%;
  height: 100%;
}

[hidden] {
  display: none !important;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

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

/* ---------- Coluna ---------- */

.page {
  width: 100%;
  max-width: var(--page-max);
  margin: auto;
  padding:
    calc(40px + env(safe-area-inset-top, 0px))
    calc(var(--gutter) + env(safe-area-inset-right, 0px))
    calc(20px + env(safe-area-inset-bottom, 0px))
    calc(var(--gutter) + env(safe-area-inset-left, 0px));
}

/* ---------- Topo ---------- */

/* Importante: .hero e .page não podem ganhar opacity, transform, filter, isolation ou z-index.
   Isso isolaria a logo e o mix-blend-mode deixaria de "ver" o fundo (o preto do vídeo apareceria). */
.hero {
  position: relative;
}

/* Halo vermelho centralizado atrás da logo (como na arte) */
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 0;
  right: 0;
  height: 300px;
  margin-top: -150px;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 59, 59, 0.17), rgba(138, 28, 28, 0.08) 55%, transparent);
}

/* A caixa .logo tem o tamanho da logo; o vídeo é maior (tem margem preta) e transborda sem aparecer. */
.logo {
  position: relative;
  width: var(--logo-w);
  aspect-ratio: 535 / 310;
  margin: 0 auto;
  mix-blend-mode: screen;
}

.logo__media {
  position: absolute;
  /* posição do contorno dentro do quadro 768x576 do vídeo (x 119–654, y 132–442) */
  left: -22.24%;
  top: -42.58%;
  width: 143.55%;
  height: auto;
  aspect-ratio: 768 / 576;
  display: block;
  mix-blend-mode: screen;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.logo__still {
  display: none;
}

.logo.is-still .logo__video {
  display: none;
}

/* escondida enquanto a página está em segundo plano (o logo.js recria o vídeo quando ela volta) */
.logo.is-oculta {
  visibility: hidden;
  transition: none !important;   /* esconde na hora, mesmo com "reduzir movimento" ligado */
}

.logo.is-still .logo__still {
  display: block;
}

/* ---------- Redes sociais ---------- */

/* Mesmo espaço do topo da página até a logo (40px), para a logo ficar centralizada no seu bloco */
.social {
  margin-top: 40px;
}

.social__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: clamp(6px, 2.4vw, 11px);
}

/* Cada ícone tem até 56px e encolhe junto em telas estreitas */
.social__list > li {
  flex: 0 1 56px;
  min-width: 0;
}

.social__link {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  color: #f7eaea;
  background: radial-gradient(120% 120% at 50% 0%, #2c1818 0%, #150d0d 55%, #0c0909 100%);
  border: 1.5px solid var(--line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 18px -8px rgba(255, 59, 59, 0.55);
  text-decoration: none;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    background-color 0.2s var(--ease),
    color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.social__link svg {
  width: 45%;
  height: 45%;
  fill: currentColor;
}

/* ---------- Botões / cards ---------- */

.links {
  margin-top: 20px;
}

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

.card {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: clamp(10px, 3.4vw, 14px);
  min-height: 72px;
  padding: 12px clamp(10px, 3.2vw, 14px) 12px clamp(12px, 3.6vw, 16px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: var(--text);
  text-decoration: none;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    transform 0.2s var(--ease);
}

/* Camada do preenchimento vermelho no hover/toque */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(100deg, rgba(255, 59, 59, 0.2), rgba(138, 28, 28, 0.14));
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}

.card__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(32px, 9.4vw, 40px);
  aspect-ratio: 1 / 1;
  color: var(--coral);
}

.card__icon svg {
  width: 82%;
  height: 82%;
  fill: currentColor;
}

.card__body {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 1px;
}

.card__title {
  font: 500 clamp(16px, 4.6vw, 20px) / 1.2 var(--font-title);
  letter-spacing: -0.005em;
}

.card__subtitle {
  color: var(--muted);
  font-size: clamp(12px, 3.35vw, 14px);
  line-height: 1.3;
}

.card__arrow {
  flex: none;
  width: 18px;
  height: 18px;
  fill: var(--coral);
  transition: transform 0.2s var(--ease);
}

/* Botão em destaque (gradiente) */
.card--featured {
  border-color: rgba(255, 140, 140, 0.55);
  background: var(--gradient);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 12px 30px -12px rgba(255, 59, 59, 0.7);
}

.card--featured::before {
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
}

.card--featured .card__icon {
  color: #ffffff;
}

.card--featured .card__subtitle {
  color: #ffffff;
}

.card--featured .card__arrow {
  fill: #ffffff;
}

/* Hover (mouse) */
@media (hover: hover) {
  .social__link:hover {
    color: #ffffff;
    border-color: var(--line-strong);
    background-color: #2a1212;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.1),
      0 0 22px -4px rgba(255, 59, 59, 0.75);
    transform: translateY(-2px);
  }

  .card:hover {
    border-color: var(--line-strong);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      0 0 0 1px rgba(255, 59, 59, 0.25),
      0 12px 32px -14px rgba(255, 59, 59, 0.75);
    transform: translateY(-1px);
  }

  .card:hover::before {
    opacity: 1;
  }

  .card:hover .card__arrow {
    transform: translateX(3px);
  }

  .card--featured:hover {
    border-color: rgba(255, 170, 170, 0.8);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.3),
      0 14px 36px -12px rgba(255, 59, 59, 0.9);
  }
}

/* Toque (celular) */
.social__link:active {
  border-color: var(--line-strong);
  box-shadow: 0 0 22px -4px rgba(255, 59, 59, 0.75);
}

.card:active {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 1px rgba(255, 59, 59, 0.25), 0 10px 28px -14px rgba(255, 59, 59, 0.75);
  transform: scale(0.99);
}

.card:active::before {
  opacity: 1;
}

/* Foco de teclado bem visível */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.card:focus-visible {
  border-color: var(--line-strong);
}

.card:focus-visible::before {
  opacity: 1;
}

/* ---------- Rodapé ---------- */

.footer {
  margin-top: 16px;
  text-align: center;
  color: var(--faint);
  font-size: 13px;
}

.footer p {
  margin: 0;
}

.noscript,
.config-error {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  text-align: center;
  font-size: 14px;
}

/* ---------- Entrada suave (desligada com "reduzir movimento") ---------- */

@media (prefers-reduced-motion: no-preference) {
  .social__link,
  .card,
  .footer {
    animation: rise 0.6s var(--ease) backwards;
    animation-delay: calc(120ms + var(--i, 0) * 55ms);
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
  }
}

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