/* =========================================================
   SAFE Links — mobile-first link-in-bio · TEMA CLARO
   Base = telefone. As media queries só ampliam para telas grandes.
   ========================================================= */

:root {
  --navy: #142240;
  --navy-soft: #1f3a5f;
  --blue: #2f7fb8;      /* azul de texto/acento (contraste em fundo claro) */
  --blue-bright: #5aa9d6;
  --teal: #2f9d97;
  --teal-bright: #5bbdb8;
  --wa: #14a54b;

  --bg-top: #eef3fa;
  --bg-bottom: #f8fafc;
  --text: #16233f;
  --muted: #5b6b86;
  --white: #ffffff;

  --card: #ffffff;
  --line: rgba(20, 34, 64, 0.09);
  /* Sombras em duas camadas: contato (curta) + ambiente (difusa) */
  --shadow-sm: 0 1px 2px rgba(20, 34, 64, 0.05), 0 6px 18px rgba(20, 34, 64, 0.07);
  --shadow-md: 0 2px 4px rgba(20, 34, 64, 0.06), 0 16px 36px rgba(20, 34, 64, 0.12);
  --shadow-lg: 0 22px 60px rgba(20, 34, 64, 0.14);
  --radius: 20px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(120% 55% at 50% 0%, rgba(90, 169, 214, 0.12), transparent 60%),
    radial-gradient(90% 45% at 100% 100%, rgba(91, 189, 184, 0.10), transparent 55%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 300px);
  -webkit-font-smoothing: antialiased;
}

/* Foco visível para teclado/acessibilidade (anel azul da marca) */
a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

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

svg {
  width: 1.25em; height: 1.25em;
  fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* Glifos oficiais de marca (WhatsApp, YouTube, Instagram, LinkedIn): preenchidos */
svg.glyph {
  fill: currentColor;
  stroke: none;
}

/* ---------- Coluna central (largura de telefone) ---------- */
.shell {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px calc(40px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 26px;
}

/* ---------- Perfil ---------- */
.profile { text-align: center; }

.profile__cover {
  position: relative;
  height: 160px; /* compacto: garante o CTA da campanha acima da dobra */
  margin: 0 -16px;
  overflow: hidden;
}

.profile__cover-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.profile__cover-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20, 34, 64, 0.10) 0%,
    rgba(20, 34, 64, 0.04) 38%,
    rgba(238, 243, 250, 0.55) 82%,
    var(--bg-top) 100%
  );
}

.profile__site {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px; /* alvo de toque mínimo (Apple HIG) */
  padding: 9px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(20, 34, 64, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Anel degradê da marca (azul → teal), estilo stories */
.profile__avatar {
  width: 114px; height: 114px;
  margin: -66px auto 0;
  position: relative;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--blue-bright), var(--teal-bright));
  box-shadow: var(--shadow-md);
}

.profile__avatar img {
  width: 100%; height: 100%;
  border: 4px solid var(--white);
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.profile__id { margin-top: 12px; }

.profile__name {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--navy);
}

.profile__badge {
  width: 22px; height: 22px;
  flex: none;
  color: var(--blue);
}

.profile__handle {
  display: inline-block;
  margin: 7px 0 0;
  padding: 4px 13px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--blue);
  background: rgba(90, 169, 214, 0.12);
  border-radius: 999px;
}

.profile__bio {
  margin: 8px auto 0;
  max-width: 340px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Links empilhados ---------- */
.links {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.link {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  min-height: 70px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.link:active { transform: scale(0.98); }

@media (hover: hover) {
  .link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(47, 127, 184, 0.35);
  }
  .link:hover .link__arrow { transform: translateX(4px); color: var(--blue); }
}

.link__icon {
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, #3d8fc2, #2f9d97); /* degradê SAFE, ícone branco */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: background 0.22s ease, color 0.22s ease;
}

@media (hover: hover) {
  .link:not(.link--wa):hover .link__icon {
    background: linear-gradient(135deg, var(--navy-soft), var(--blue));
  }
}

.link__icon svg { width: 24px; height: 24px; }

.link__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  text-align: left;
}

.link__badge {
  align-self: start;
  margin-bottom: 3px;
  padding: 3px 9px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-bright), var(--teal));
  border-radius: 999px;
}

.link__title {
  font-size: 1.03rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.link__sub {
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
}

.link__arrow {
  font-size: 1.2rem;
  color: #aab4c8;
  transition: transform 0.18s ease, color 0.18s ease;
}

/* Destaque WhatsApp — CTA dominante: verde sólido, texto branco */
.link--wa {
  border-color: transparent;
  background: linear-gradient(135deg, #23c25f, #128c4b);
  box-shadow: 0 12px 30px rgba(18, 140, 75, 0.35);
  overflow: hidden; /* contém o brilho deslizante */
}

/* Reflexo de luz que atravessa o botão a cada ~4,5s */
.link--wa::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.32) 50%, transparent 58%);
  transform: translateX(-160%) skewX(-18deg);
  animation: wa-sheen 4.5s ease-in-out infinite;
}

@keyframes wa-sheen {
  0%, 72% { transform: translateX(-160%) skewX(-18deg); }
  88%, 100% { transform: translateX(160%) skewX(-18deg); }
}

.link--wa .link__icon {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

.link--wa .link__title { color: var(--white); }

.link--wa .link__sub { color: rgba(255, 255, 255, 0.88); }

.link--wa .link__badge {
  background: var(--white);
  color: #0f7a41;
}

.link--wa .link__arrow { color: var(--white); }

@media (hover: hover) {
  .link--wa:hover {
    border-color: transparent;
    box-shadow: 0 16px 38px rgba(18, 140, 75, 0.45);
  }
}

/* WhatsApp secundário: card branco, só o ícone e a seta em verde */
.link--wa-soft .link__icon {
  color: var(--white);
  background: linear-gradient(135deg, #25d366, #12934a);
}

.link--wa-soft .link__arrow { color: var(--wa); }

/* Destaque pulsante do botão de campanha */
.link--pulse { animation: wa-pulse 2.6s ease-in-out infinite; }

@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 12px 30px rgba(18, 140, 75, 0.30); }
  50% { box-shadow: 0 14px 38px rgba(18, 140, 75, 0.55); }
}

/* ---------- Prova social / credibilidade ---------- */
.proof {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.proof__item {
  padding: 20px 16px;
  text-align: center;
  background: var(--card);
}

.proof__item strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--navy), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.proof__item span {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
}

/* ---------- Trilha de voo (divisor decorativo) ---------- */
.flightpath {
  display: flex;
  justify-content: center;
  margin: -6px 0;
  color: rgba(20, 34, 64, 0.28);
}

.flightpath svg {
  width: 230px;
  height: 46px;
}

/* ---------- Redes ---------- */
.socials {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.socials a {
  width: 50px; height: 50px;
  display: grid;
  place-items: center;
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.socials a svg { width: 22px; height: 22px; }

.socials a:active { transform: scale(0.94); }

@media (hover: hover) {
  .socials a:hover {
    color: var(--blue);
    border-color: rgba(47, 127, 184, 0.40);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
  }
}

/* ---------- Rodapé ---------- */
.foot {
  text-align: center;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--muted); /* contraste AA */
}

.foot p { margin: 0; }

/* ---------- Reveal (com stagger) ----------
   Só esconde quando html.js existe (classe definida pelo app.js).
   Sem JS, o conteúdo permanece visível — nunca uma página em branco. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.links .reveal:nth-child(1).is-visible { transition-delay: 0.02s; }
.links .reveal:nth-child(2).is-visible { transition-delay: 0.07s; }
.links .reveal:nth-child(3).is-visible { transition-delay: 0.12s; }
.links .reveal:nth-child(4).is-visible { transition-delay: 0.17s; }
.links .reveal:nth-child(5).is-visible { transition-delay: 0.22s; }
.links .reveal:nth-child(6).is-visible { transition-delay: 0.27s; }

/* ---------- Telas maiores: só respira mais ---------- */
@media (min-width: 600px) {
  .profile__cover { height: 220px; }
  .profile__name { font-size: 1.65rem; }
  .link { padding: 16px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
