/* =========================================================
   Cauã Oliveira: painel de links
   Mobile-first · tokens no :root · sem dependências
   ========================================================= */

:root {
  --ink: #07090c;
  --surface: rgba(16, 22, 28, 0.78);
  --surface-solid: #10161c;
  --surface-2: #18212a;
  --line: rgba(220, 255, 238, 0.09);
  --line-strong: rgba(220, 255, 238, 0.18);
  --text: #f1f5f3;
  --muted: #92a39b;
  --green: #2ee59d;
  --green-deep: #0f8f5f;
  --green-ink: #03140c;

  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --gutter: 16px;
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--ink);
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--text);
  /* a cor fica no <html>; aqui ela cobriria a camada .bg */
  background: transparent;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
[hidden] { display: none !important; }

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--green);
  color: var(--green-ink);
  font-weight: 700;
  border-radius: 10px;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

/* ---------- Fundo: grade de gráfico + brilhos ---------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  height: 100lvh;
  overflow: hidden;
  background:
    radial-gradient(60% 45% at 100% 0%, rgba(46, 229, 157, 0.22), transparent 70%),
    radial-gradient(55% 40% at 0% 100%, rgba(15, 143, 95, 0.28), transparent 70%),
    var(--ink);
}
/* grade de gráfico que some nas bordas */
.bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 25%, transparent 80%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 25%, transparent 80%);
}

/* ---------- Estrutura ---------- */

.page {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

.top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) 0 14px;
}

.top__actions { display: flex; gap: 8px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-btn:hover { border-color: var(--green); color: var(--green); }
.icon-btn.is-done { background: var(--green); border-color: var(--green); color: var(--green-ink); }

/* ---------- Foto com gráfico ---------- */

.photo {
  position: relative;
  aspect-ratio: 4 / 4.4;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow:
    0 0 0 1px var(--line-strong),
    0 30px 60px -30px rgba(46, 229, 157, 0.45);
  isolation: isolate;
}
.photo__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
}
/* escurece a base para o gráfico aparecer */
.photo::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  z-index: 0;
  background: linear-gradient(to bottom, transparent, rgba(7, 9, 12, 0.85));
  pointer-events: none;
}

.photo__chart {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 34%;
}
.spark { width: 100%; height: 100%; overflow: visible; }
.spark__area { fill: url(#spark-fill); opacity: 0; animation: appear 0.8s 1.2s forwards; }
.spark__line {
  fill: none;
  stroke: var(--green);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  animation: draw 1.8s var(--ease) 0.2s forwards;
}

/* ponto final do gráfico (fora do SVG para não deformar) */
.spark-dot {
  position: absolute;
  z-index: 2;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(46, 229, 157, 0.6);
  opacity: 0;
  animation: appear 0.3s 1.8s forwards, ping 2.2s 2s ease-out infinite;
}

/* ---------- Nome e bio ---------- */

.hero { margin-top: 22px; container-type: inline-size; }

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
}
.hero__kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}

.hero__name {
  margin-top: 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 13.4cqw;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
.hero__name span {
  display: block;
  color: var(--green);
  background: linear-gradient(90deg, var(--green), #9bf7cf);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__user {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 0.86rem;
  color: var(--muted);
  transition: color 0.2s;
}
.hero__user:hover { color: var(--green); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}
.chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

/* ---------- Links ---------- */

.links { display: grid; gap: 10px; margin-top: 24px; }

.link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 10px 18px 10px 10px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
/* barra de destaque que cresce no hover */
.link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--green);
  transform: scaleY(0);
  transition: transform 0.3s var(--ease);
}
a.link[href]:hover { transform: translateX(4px); border-color: var(--line-strong); background: rgba(24, 33, 42, 0.85); }
a.link[href]:hover::before { transform: scaleY(1); }
a.link[href]:active { transform: scale(0.985); }

.link__thumb {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.link__thumb picture, .link__thumb img { width: 100%; height: 100%; object-fit: cover; }
.link__thumb--ig {
  color: var(--text);
  background: linear-gradient(135deg, #1d2a24, #10161c);
}
.link__thumb--ig svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.link__thumb--logo picture { width: 62%; height: 62%; }
.link__thumb--logo img { object-fit: contain; }

.link__body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.link__title { font-size: 1.02rem; font-weight: 700; line-height: 1.2; }
.link__desc { font-size: 0.84rem; color: var(--muted); line-height: 1.3; }

.link__num {
  flex: none;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  transition: color 0.3s;
}
a.link[href]:hover .link__num { color: var(--green); }

/* Destaque: WhatsApp */
.cta {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-block: 4px;
  min-height: 86px;
  padding: 14px 14px 14px 16px;
  border-radius: 20px;
  background: linear-gradient(120deg, var(--green), #8ef5c6);
  color: var(--green-ink);
  overflow: hidden;
  box-shadow: 0 18px 40px -18px rgba(46, 229, 157, 0.7);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
/* brilho que atravessa o botão */
.cta::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  animation: shine 4.5s ease-in-out 1.5s infinite;
  pointer-events: none;
}
a.cta[href]:hover { transform: translateY(-2px); box-shadow: 0 24px 46px -18px rgba(46, 229, 157, 0.85); }
a.cta[href]:active { transform: scale(0.985); }

.cta__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--green-ink);
  color: var(--green);
}
.cta__icon { position: relative; }
.cta__icon picture, .cta__icon img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
/* selo do WhatsApp no canto da foto */
.cta__badge {
  position: absolute;
  right: -6px;
  bottom: -6px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--green-ink);
  color: var(--green);
  border: 2px solid var(--green);
}
.cta__badge svg { width: 14px; height: 14px; fill: currentColor; }

.cta__body { flex: 1; min-width: 0; display: grid; gap: 1px; }
.cta__title { font-family: var(--display); font-weight: 700; font-size: 1.02rem; letter-spacing: -0.02em; text-transform: uppercase; }
.cta__desc { font-size: 0.86rem; font-weight: 500; opacity: 0.8; }

.cta__go {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid rgba(3, 20, 12, 0.35);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.cta__go svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
a.cta[href]:hover .cta__go { background: var(--green-ink); border-color: var(--green-ink); color: var(--green); }

/* Sem destino configurado */
.is-soon { cursor: default; }
.is-soon .link__num,
.is-soon .cta__go {
  width: auto;
  height: auto;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px dashed currentColor;
  background: none;
  opacity: 0.75;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

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

.foot {
  margin-top: 32px;
  padding-bottom: max(26px, env(safe-area-inset-bottom));
  text-align: center;
}
.foot__line {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.foot__copy { margin-top: 8px; font-size: 0.74rem; color: var(--muted); opacity: 0.8; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 50;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--green);
  color: var(--green-ink);
  font-size: 0.84rem;
  font-weight: 700;
  transform: translate(-50%, 160%);
  opacity: 0;
  transition: transform 0.35s var(--ease), opacity 0.35s;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Entrada ---------- */

.photo, .hero, .links > *, .foot { animation: rise 0.7s var(--ease) both; }
.hero { animation-delay: 0.08s; }
.links > :nth-child(1) { animation-delay: 0.16s; }
.links > :nth-child(2) { animation-delay: 0.22s; }
.links > :nth-child(3) { animation-delay: 0.28s; }
.links > :nth-child(4) { animation-delay: 0.34s; }
.links > :nth-child(5) { animation-delay: 0.4s; }
.foot { animation-delay: 0.46s; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(46, 229, 157, 0.6); }
  100% { box-shadow: 0 0 0 16px rgba(46, 229, 157, 0); }
}
@keyframes shine {
  0%, 60% { left: -40%; }
  100% { left: 130%; }
}

/* ---------- Desktop: foto à esquerda, conteúdo à direita ---------- */

@media (min-width: 960px) {
  .page { max-width: 1040px; padding-inline: 32px; }
  .top { padding-top: 28px; }
  .layout {
    display: grid;
    grid-template-columns: minmax(0, 440px) minmax(0, 480px);
    justify-content: space-between;
    align-items: start;
    gap: 64px;
    padding-top: 12px;
  }
  .photo { position: sticky; top: 24px; aspect-ratio: 4 / 5; }
  .hero { margin-top: 0; }
  .foot { text-align: left; }
}

/* ---------- Movimento reduzido ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.001ms !important;
  }
  .spark__line { stroke-dashoffset: 0; }
  .spark-dot, .spark__area { opacity: 1; }
  .cta::after { display: none; }
}
