/* =========================================================================
   Nathan Publi — link in bio
   Mobile-first, coluna única, fluida de 320px até desktop.

   Para trocar a cor de destaque do site inteiro, mude apenas --accent-rgb.
   ========================================================================= */

:root {
  /* Cor de destaque (Palatinate Blue #173DED). Componentes RGB separados para
     poder derivar transparências: rgb(var(--accent-rgb) / .4) */
  --accent-rgb: 23 61 237;          /* #173DED */
  --accent-2-rgb: 24 93 241;        /* #185DF1 */
  --accent: rgb(var(--accent-rgb));
  --accent-2: rgb(var(--accent-2-rgb));

  /* Fundo e texto — tema escuro (padrão) */
  --bg: #031130;                    /* Prussian Blue */
  --text: #ffffff;
  --text-2: #dcdee2;                /* Grey Placidity */
  --text-3: #bababa;                /* Baby Grey */
  --kicker: #8fadff;
  --badge-fg: #a9c0ff;
  --badge-bg: rgb(var(--accent-rgb) / .22);
  --badge-border: rgb(var(--accent-rgb) / .45);

  /* Cards */
  --card-bg: linear-gradient(165deg, rgb(255 255 255 / .10) 0%, rgb(255 255 255 / .035) 100%);
  --card-border: rgb(220 222 226 / .16);
  --card-shadow: 0 18px 44px rgb(3 17 48 / .55), inset 0 1px 0 rgb(255 255 255 / .10);
  --card-shadow-hover: 0 26px 56px rgb(var(--accent-rgb) / .34);
  --card-blur: blur(12px);
  --media-bg: rgb(255 255 255 / .06);

  /* Chrome (header, botões de ícone, bordas) */
  --header-scrim: linear-gradient(180deg, rgb(3 17 48 / .92) 0%, rgb(3 17 48 / .72) 60%, rgb(3 17 48 / 0) 100%);
  --hairline: rgb(220 222 226 / .16);
  --marquee-line: rgb(220 222 226 / .14);

  /* Intensidade do brilho radial atrás do topo (0 – 1) */
  --glow-strength: .55;

  /* Deslocamento do brilho (o JS mexe nestes: mouse no desktop, scroll no
     mobile). Move o GRADIENTE dentro da caixa, nunca a caixa — assim o
     elemento nunca passa da largura da tela. */
  --glow-x: 0px;
  --glow-y: 0px;

  --maxw: 520px;
  --gutter: 20px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html {
  overflow-x: hidden;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

body {
  /* overflow-x: hidden só no <html> (acima): no <body> ele faz o navegador
     tratar o body como um contêiner de rolagem próprio (que nunca rola de
     fato), e isso quebra o position: sticky do .header — ele parava de
     grudar no topo e rolava junto com a página. */
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--text);
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s ease;
}

a { color: var(--accent); text-decoration: none; }
::selection { background: var(--accent); color: #fff; }

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

.skip-link {
  /* Escondido por recorte, e não em left:-9999px — deslocar para fora da tela
     também conta como área rolável em alguns navegadores. */
  position: absolute;
  top: 0;
  left: 0;
  z-index: 50;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  padding: 10px 16px;
  border-radius: 0 0 12px 0;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.skip-link:focus {
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
}

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

/* ---------- Brilho radial do topo ---------- */
.glow {
  /* A caixa ocupa exatamente a largura da tela e o gradiente é pintado maior
     que ela (background-size). Antes o elemento é que era mais largo, e no
     mobile dava para arrastar a página de lado e ver a faixa azul sobrando —
     overflow-x: hidden não segura esse gesto no Safari do iPhone. */
  position: absolute;
  top: -260px;
  left: 0;
  width: 100%;
  height: 620px;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(50% 50% at 50% 50%,
              rgb(var(--accent-rgb) / var(--glow-strength)) 0%,
              rgb(var(--accent-rgb) / calc(var(--glow-strength) * .4)) 38%,
              rgb(3 17 48 / 0) 72%);
  background-repeat: no-repeat;
  background-size: max(120vw, min(1100px, 190vw)) 100%;
  background-position: calc(50% + var(--glow-x)) calc(50% + var(--glow-y));
  transition: background-position .6s var(--ease), opacity .4s ease;
}

/* ---------- Botão flutuante de WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: 16px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 20;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  border: 1px solid rgb(255 255 255 / .22);
  color: #fff;
  animation: wa-pulse 2.6s ease-out infinite;
  transition: background-color .2s ease, transform .2s ease;
}
.wa-float:hover { background: var(--accent-2); transform: scale(1.05); }
.wa-float:active { transform: scale(.96); }
.wa-float__icon { width: 26px; height: 26px; display: block; }

@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 10px 28px rgb(var(--accent-rgb) / .45), 0 0 0 0 rgb(var(--accent-rgb) / .45); }
  70%      { box-shadow: 0 10px 28px rgb(var(--accent-rgb) / .45), 0 0 0 16px rgb(var(--accent-rgb) / 0); }
}

/* ---------- Estrutura ---------- */
.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ----------
   Full-bleed: o degradê (--header-scrim) precisa cobrir a largura inteira da
   tela, não só a coluna de --maxw. Por isso o header fica fora da .shell e
   só o conteúdo (.header__inner) é que fica limitado e centralizado. */
.header {
  position: sticky;
  top: 0;
  z-index: 5;
  width: 100%;
  background: var(--header-scrim);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: box-shadow .3s ease;
}
.header.is-scrolled {
  box-shadow: 0 12px 30px rgb(3 17 48 / .45);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px var(--gutter) 12px;
  transition: padding .3s ease;
}
.header.is-scrolled .header__inner {
  padding: 12px var(--gutter) 10px;
}

.header__brand {
  margin: 0;
  min-width: 0;
  text-align: center;
  font-family: 'Sora', system-ui, sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -.02em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ---------- Avatar + bio ---------- */
.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 14px 0 26px;
}

.avatar {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 14px;
}
.avatar__ring {
  width: 104px;
  height: 104px;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--accent-2), rgb(var(--accent-rgb) / .15));
  box-shadow:
    0 26px 50px -12px rgb(3 17 48 / .85),
    0 16px 42px rgb(var(--accent-rgb) / .5),
    inset 0 1px 0 rgb(255 255 255 / .35);
  animation: avatar-float 5.5s ease-in-out infinite;
}
.avatar__img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.avatar__shadow {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 74px;
  height: 12px;
  border-radius: 50%;
  transform: translateX(-50%);
  filter: blur(3px);
  background: radial-gradient(50% 50% at 50% 50%, rgb(var(--accent-rgb) / .55) 0%, rgb(var(--accent-rgb) / 0) 100%);
  animation: avatar-shadow 5.5s ease-in-out infinite;
}

@keyframes avatar-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
@keyframes avatar-shadow {
  0%, 100% { transform: translateX(-50%) scaleX(1); opacity: .85; }
  50%      { transform: translateX(-50%) scaleX(.82); opacity: .5; }
}

.bio {
  margin: 0;
  max-width: 400px;
  text-align: center;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
}
.bio strong { color: var(--kicker); font-weight: 700; }

/* ---------- Faixa rolante ---------- */
.marquee {
  margin: 0 calc(var(--gutter) * -1) 26px;
  padding: 11px 0;
  overflow: hidden;
  border-top: 1px solid var(--marquee-line);
  border-bottom: 1px solid var(--marquee-line);
  background: rgb(var(--accent-rgb) / .10);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 18s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-right: 26px;
}
.marquee__word {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
}
.marquee__dot {
  flex: 0 0 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--kicker);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Cards de link ---------- */
.links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 34px;
}

.card {
  display: block;
  padding: 14px;
  border: 1px solid var(--card-border);
  border-radius: 28px;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  -webkit-backdrop-filter: var(--card-blur);
  backdrop-filter: var(--card-blur);
  color: inherit;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease,
              background .3s ease;
}
@media (hover: hover) {
  .card:hover {
    transform: translateY(-3px);
    border-color: rgb(var(--accent-rgb) / .6);
    box-shadow: var(--card-shadow-hover);
  }
}
.card.is-visible:active { transform: scale(.985); }

.card__media {
  width: 100%;
  /* 16/10 é a proporção das duas capas (1536 x 943). Fica aqui, e não num
     style= no HTML, porque o CSP do site bloqueia estilo inline. */
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 20px;
  background: var(--media-bg);
}
.card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 4px 2px;
}
.card__body--flush { padding: 4px 4px 2px; }

.card__kicker {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--kicker);
}

.card__title {
  margin: 0;
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 19px;
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
  text-wrap: pretty;
}

.card__badge {
  align-self: flex-start;
  padding: 5px 11px;
  border: 1px solid var(--badge-border);
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-fg);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
}

.card__cta {
  position: relative;
  overflow: hidden;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 12px 26px rgb(var(--accent-rgb) / .42);
}
.card__cta-label {
  display: flex;
  align-items: center;
  gap: 9px;
}
.card__cta-icon { width: 19px; height: 19px; display: block; }
.card__arrow { font-size: 17px; line-height: 1; }

/* Brilho que atravessa o botão ao passar o mouse no card (ou ao tocar) */
.card__cta::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 38%;
  height: 100%;
  pointer-events: none;
  transform: translateX(-120%) skewX(-18deg);
  background: linear-gradient(90deg, rgb(255 255 255 / 0), rgb(255 255 255 / .35), rgb(255 255 255 / 0));
}
@media (hover: hover) {
  .card:hover .card__cta::after { animation: shine 1.1s ease-out; }
}
.card.is-shining .card__cta::after { animation: shine 1.1s ease-out; }

@keyframes shine {
  from { transform: translateX(-120%) skewX(-18deg); }
  to   { transform: translateX(320%) skewX(-18deg); }
}

/* ---------- Rodapé ---------- */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 28px 0 calc(96px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--hairline);
}

.social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.social__link {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  background: rgb(var(--accent-rgb) / .10);
  color: var(--text);
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.social__link:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}
.social__icon { width: 19px; height: 19px; display: block; }

.footer__credit {
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
}

/* ---------- Revelação em sequência ao rolar ----------
   A entrada é uma animação (e não uma transição) para ter a própria curva de
   .7s sem brigar com o transform de .28s do hover. Quando ela termina, o JS
   marca .is-done e remove a animação — aí o hover volta a mandar no transform. */
.js .reveal { opacity: 0; }
.js .reveal.is-visible {
  opacity: 1;
  animation: reveal .7s var(--ease) var(--reveal-delay, 0ms) both;
}
.js .reveal.is-done { animation: none; }

@keyframes reveal {
  from { opacity: 0; transform: translateY(26px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Telas maiores ---------- */
@media (min-width: 600px) {
  .header__brand { font-size: 21px; }
  .card__title { font-size: 20px; }
}

/* ---------- Respeita "reduzir movimento" ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
