/* ==========================================================================
   dhdesignia — Link na Bio
   Identidade: preto / vermelho / branco
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Cores da marca */
  --ink:        #000000;   /* preto puro */
  --ink-2:      #131316;   /* degraus de superfície elevada — mantidos claros */
  --ink-3:      #1b1b1f;   /* de propósito, senão cartões somem no preto */
  --white:      #ffffff;
  --red:        #e11d20;
  --red-hot:    #ff2f32;
  --red-deep:   #7a0e10;

  /* Derivados */
  --text:       #f4f4f5;
  --muted:      #97979f;
  /* Sobre preto puro, superfície e borda foram reforçadas: um branco a 4,5%
     sobre #000 vira #0b0b0b e o botão desaparece. O peso extra ficou na
     borda, que define a forma sem encher a área de cinza. */
  --line:       rgba(255, 255, 255, 0.12);
  --line-strong:rgba(255, 255, 255, 0.20);
  --surface:    rgba(255, 255, 255, 0.065);
  --surface-hi: rgba(255, 255, 255, 0.095);

  /* Sombras */
  --glow-red:   0 0 0 1px rgba(225, 29, 32, 0.35), 0 12px 34px -10px rgba(225, 29, 32, 0.55);
  --lift:       0 18px 40px -18px rgba(0, 0, 0, 0.9);

  /* Medidas */
  --card-w:     480px;
  --radius:     18px;
  --radius-sm:  13px;

  /* Tipografia híbrida.
     Bebas Neue carrega a marca, os títulos e os rótulos curtos: caixa alta,
     condensada, um peso só (400) — nunca declare peso maior nela.
     Inter carrega tudo que se lê como frase: subtítulos, descrições, avisos. */
  --font-display: 'Bebas Neue', 'Oswald', 'Arial Narrow', sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Posição do ponteiro (atualizada pelo JS) */
  --mx: 50%;
  --my: 22%;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --------------------------------------------------------------------------
   2. RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  /* Rede de proteção da Bebas: ela tem um peso só, e sem isto qualquer
     font-weight acima de 400 que escape para um elemento dela viraria
     negrito sintético — letra engrossada e borrada. Não afeta a Inter,
     que tem os pesos 400 a 700 de verdade no arquivo. */
  font-synthesis: none;
  -webkit-font-synthesis: none;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

h1, h2 { margin: 0; font-family: var(--font-display); }

p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--red-hot);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--red); color: var(--white); }

/* --------------------------------------------------------------------------
   3. CAMADAS DE FUNDO
   -------------------------------------------------------------------------- */

/* Malha técnica sutil, apagando nas bordas */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -4;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 10%, transparent 75%);
          mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 10%, transparent 75%);
  pointer-events: none;
}

/* Brilho vermelho que segue o ponteiro / rolagem */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(520px circle at var(--mx) var(--my),
      rgba(225, 29, 32, 0.20), transparent 62%),
    radial-gradient(760px circle at 50% 0%,
      rgba(225, 29, 32, 0.13), transparent 60%),
    radial-gradient(600px circle at 50% 100%,
      rgba(122, 14, 16, 0.16), transparent 62%);
  transition: background 260ms linear;
  pointer-events: none;
}

/* Varredura diagonal lenta */
.bg-scan {
  position: fixed;
  inset: -30% -60%;
  z-index: -2;
  background: linear-gradient(
    115deg,
    transparent 42%,
    rgba(255, 255, 255, 0.035) 50%,
    transparent 58%
  );
  animation: scan 9s var(--ease) infinite;
  pointer-events: none;
}

@keyframes scan {
  0%, 100% { transform: translateX(-22%); opacity: 0; }
  35%      { opacity: 1; }
  70%      { transform: translateX(22%); opacity: 0; }
}

/* Granulado de filme */
.bg-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.05;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   4. ESTRUTURA
   -------------------------------------------------------------------------- */
.page {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  padding: clamp(20px, 6vw, 48px) 18px calc(40px + env(safe-area-inset-bottom));
}

.card {
  width: 100%;
  max-width: var(--card-w);
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* --------------------------------------------------------------------------
   5. TOPO / LOGO
   -------------------------------------------------------------------------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.logo-ring {
  position: relative;
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transform-style: preserve-3d;
  transition: transform 220ms var(--ease);
  will-change: transform;
}

/* Anel cônico girando */
.logo-ring-spin {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--red) 0deg,
    var(--red-hot) 55deg,
    rgba(255, 255, 255, 0.85) 110deg,
    transparent 190deg,
    transparent 300deg,
    var(--red) 360deg
  );
  animation: spin 6s linear infinite;
  filter: blur(0.4px);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Halo difuso atrás do anel */
.logo-ring::after {
  content: '';
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(225, 29, 32, 0.45), transparent 68%);
  filter: blur(14px);
  z-index: -1;
  animation: pulse-halo 3.4s ease-in-out infinite;
}

@keyframes pulse-halo {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 0.95; transform: scale(1.07); }
}

/* Disco interno preto */
.logo-inner {
  position: relative;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  border-radius: 50%;
  background: linear-gradient(160deg, var(--ink-3), var(--ink));
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Monograma: alternativa à foto. Para usar, troque a <img class="logo-img">
   no index.html por <span class="logo-monogram">dh</span>. */
.logo-monogram {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 42px;
  letter-spacing: 0.02em;
  color: var(--white);
  line-height: 1;
  padding-bottom: 2px;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Marca nominal */
.wordmark {
  font-size: clamp(40px, 12vw, 54px);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--white);
  margin-top: 4px;
}

.dot {
  color: var(--red);
  text-shadow: 0 0 18px rgba(225, 29, 32, 0.85);
}

/* Nome da pessoa por trás da marca */
.eyebrow {
  margin-top: -4px;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--red-hot);
}

.tagline {
  max-width: 32ch;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.45;
}

/* Selo de disponibilidade */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  backdrop-filter: blur(8px);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red-hot);
  box-shadow: 0 0 0 0 rgba(255, 47, 50, 0.7);
  animation: ping 2s ease-out infinite;
}

@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(255, 47, 50, 0.7); }
  70%  { box-shadow: 0 0 0 7px rgba(255, 47, 50, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 47, 50, 0); }
}

/* --------------------------------------------------------------------------
   6. BOTÕES DE LINK
   -------------------------------------------------------------------------- */
.links {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(10px);
  overflow: hidden;
  isolation: isolate;
  transition: transform 220ms var(--ease),
              border-color 220ms var(--ease),
              background 220ms var(--ease),
              box-shadow 220ms var(--ease);
}

/* Barra vermelha que cresce na lateral esquerda */
.btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  background: var(--red);
  border-radius: 0 3px 3px 0;
  transform: translateY(-50%);
  transition: height 260ms var(--ease);
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  background: var(--surface-hi);
  border-color: var(--line-strong);
  box-shadow: var(--lift);
}

.btn:hover::before,
.btn:focus-visible::before { height: 62%; }

.btn:active { transform: translateY(0) scale(0.99); }

/* Caixa do ícone */
.btn-icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--white);
  transition: background 220ms var(--ease),
              color 220ms var(--ease),
              transform 220ms var(--ease);
}

.btn-icon svg { width: 20px; height: 20px; }

.btn:hover .btn-icon {
  background: var(--red);
  border-color: var(--red-hot);
  color: var(--white);
  transform: scale(1.06) rotate(-4deg);
}

/* Selo da comunidade BASE2.
   O PNG já traz o próprio anel branco sobre disco preto e é transparente fora
   do círculo — então a caixa não pode desenhar fundo nem borda por baixo, ou
   um quadrado claro aparece atrás do círculo. Vale no repouso e no hover,
   que normalmente pinta essa caixa de vermelho (ou de branco no principal). */
.btn-icon.has-badge,
.btn-primary .btn-icon.has-badge,
.btn:hover .btn-icon.has-badge,
.btn-primary:hover .btn-icon.has-badge {
  background: none;
  border-color: transparent;
}

.btn-icon.has-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Só amplia no hover: girar um selo com texto em anel parece defeito. */
.btn:hover .btn-icon.has-badge { transform: scale(1.08); }

/* Textos */
.btn-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.btn-text strong {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.15;
  color: var(--white);
}

.btn-text small {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.35;
}

/* Selo e seta */
.btn-badge {
  flex: 0 0 auto;
  padding: 4px 11px 2px;
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
}

.btn-arrow {
  flex: 0 0 auto;
  color: var(--muted);
  display: grid;
  place-items: center;
  transition: transform 220ms var(--ease), color 220ms var(--ease);
}

.btn-arrow svg { width: 19px; height: 19px; fill: currentColor; }

.btn:hover .btn-arrow {
  color: var(--white);
  transform: translateX(4px);
}

/* --- Variante principal: WhatsApp --- */
.btn-primary {
  background: linear-gradient(135deg, var(--red) 0%, #b81417 55%, var(--red-deep) 100%);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: var(--glow-red);
  padding: 15px;
}

.btn-primary .btn-icon {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-primary .btn-text strong { font-size: 20px; }
.btn-primary .btn-text small  { color: rgba(255, 255, 255, 0.78); }

/* Selo opcional: use <span class="btn-badge">Novo</span> em qualquer botão. */
.btn-primary .btn-badge {
  background: var(--white);
  color: var(--red);
}

.btn-primary .btn-arrow { color: rgba(255, 255, 255, 0.8); }

.btn-primary::before { display: none; }

.btn-primary:hover {
  box-shadow: 0 0 0 1px rgba(225, 29, 32, 0.5),
              0 22px 46px -14px rgba(225, 29, 32, 0.75);
}

.btn-primary:hover .btn-icon {
  background: var(--white);
  color: var(--red);
}

/* Brilho que atravessa o botão principal */
.btn-shine {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    100deg,
    transparent 35%,
    rgba(255, 255, 255, 0.30) 50%,
    transparent 65%
  );
  transform: translateX(-100%);
  animation: shine 4.5s ease-in-out infinite;
}

@keyframes shine {
  0%, 55%  { transform: translateX(-100%); }
  85%, 100%{ transform: translateX(100%); }
}

/* Ícones dos botões secundários */
.icon-instagram,
.icon-whatsapp,
.icon-mail { color: var(--white); }

/* --------------------------------------------------------------------------
   7. LINK AINDA NÃO CONFIGURADO (marcado pelo JS)
   -------------------------------------------------------------------------- */
.is-pending {
  border-style: dashed;
  border-color: rgba(225, 29, 32, 0.45);
  opacity: 0.72;
  cursor: not-allowed;
}

.is-pending:hover,
.is-pending:focus-visible {
  transform: none;
  box-shadow: none;
  background: var(--surface);
  border-color: rgba(225, 29, 32, 0.45);
}

.is-pending:hover .btn-icon {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
  color: var(--white);
  transform: none;
}

.is-pending:hover svg { transform: none; }

.is-pending .btn-badge,
.is-pending .btn-arrow { display: none; }

.pending-tag {
  flex: 0 0 auto;
  padding: 5px 10px;
  border: 1px dashed rgba(225, 29, 32, 0.6);
  border-radius: 999px;
  color: var(--red-hot);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   8. SERVIÇOS
   -------------------------------------------------------------------------- */
.services {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-head { text-align: center; }

.section-title {
  font-size: 25px;
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.1;
  color: var(--white);
}

.section-title::after {
  content: '';
  display: block;
  width: 34px;
  height: 2px;
  margin: 8px auto 0;
  background: var(--red);
  border-radius: 2px;
}

.section-sub {
  margin-top: 7px;
  font-size: 12px;
  color: var(--muted);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.service {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 18px 10px;
  min-height: 96px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.1;
  color: var(--text);
  transition: transform 220ms var(--ease),
              border-color 220ms var(--ease),
              background 220ms var(--ease);
}

.service svg {
  width: 24px;
  height: 24px;
  color: var(--red-hot);
  transition: transform 220ms var(--ease);
}

.service:hover,
.service:focus-visible {
  transform: translateY(-3px);
  background: var(--surface-hi);
  border-color: rgba(225, 29, 32, 0.45);
}

.service:hover svg { transform: scale(1.15) translateY(-1px); }

/* --------------------------------------------------------------------------
   9. RODAPÉ
   -------------------------------------------------------------------------- */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer-mark {
  margin-top: 18px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: 0.05em;
  color: var(--white);
}

.footer p {
  font-size: 11.5px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   10. AVISO FLUTUANTE
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 50;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--red);
  border-radius: 12px;
  background: rgba(19, 19, 22, 0.94);
  backdrop-filter: blur(12px);
  box-shadow: var(--lift);
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  transform: translate(-50%, 24px);
  opacity: 0;
  visibility: hidden;
  transition: transform 300ms var(--ease), opacity 300ms var(--ease), visibility 300ms;
}

.toast.is-open {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
}

/* --------------------------------------------------------------------------
   11. ENTRADA DOS ELEMENTOS
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 620ms var(--ease), transform 620ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   12. RESPONSIVO
   -------------------------------------------------------------------------- */
@media (max-width: 380px) {
  .logo-ring { width: 96px; height: 96px; }
  .logo-monogram { font-size: 32px; }
  .btn { padding: 12px 13px; gap: 11px; }
  .btn-icon { width: 38px; height: 38px; }
  .btn-text strong { font-size: 17.5px; }
  .btn-text small  { font-size: 11px; }
  .btn-badge { padding: 4px 9px 2px; font-size: 13px; }
  .service { min-height: 88px; padding: 15px 8px; }
}

/* Telas largas: o cartão sobe um pouco */
@media (min-width: 900px) and (min-height: 780px) {
  .page { align-items: center; }
}

/* --------------------------------------------------------------------------
   13. MOVIMENTO REDUZIDO
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .bg-scan,
  .btn-shine,
  .logo-ring::after,
  .status-dot { animation: none; }

  .logo-ring-spin { animation-duration: 30s; }

  .reveal { opacity: 1; transform: none; transition: none; }

  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
}
