/* ==========================================================
   ACEAIA — Página de links (bio do Instagram)
   Tokens e regras: ACEAIA Design System v1.0
   ========================================================== */

:root {
  /* oficiais da marca */
  --aceaia-green:      #00A859;
  --aceaia-yellow:     #FFF212;
  --aceaia-graphite:   #4D4D4D;
  --aceaia-white:      #FFFFFF;
  /* apoio editorial */
  --aceaia-teal:       #017067;
  --aceaia-deep-green: #034C3B;
  --aceaia-forest:     #133825;
  --aceaia-mint:       #9BCAB3;
  --aceaia-offwhite:   #F7FDFD;

  --aceaia-gradient: linear-gradient(135deg, #017067 0%, #034C3B 55%, #133825 100%);

  /* Futura no iPhone/Mac; Century Gothic no Windows; Arial como último recurso */
  --fonte-titulo: "Futura Heavy BT", Futura, "Century Gothic", Arial, sans-serif;
  --fonte-texto:  "Franklin Gothic Book", "Trebuchet MS", Arial, sans-serif;

  --largura: 480px;
  --margem: 20px;

  /* curvas de movimento */
  --suave: cubic-bezier(.22, .8, .24, 1);
  --mola: cubic-bezier(.34, 1.4, .64, 1);
}
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --mola: linear(0, .009, .035 2.1%, .141 4.4%, .723 12.9%, .938 16.7%, 1.017 19.4%, 1.067, 1.099 24.3%, 1.108 26%, 1.1 27.9%, 1.064 32.2%, 1.009 38.2%, .987 42.4%, .984 46.5%, .996 58.9%, 1.001 68.6%, 1);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }

body {
  background:
    radial-gradient(900px 500px at 50% -180px, rgba(155, 202, 179, .4), transparent 70%),
    var(--aceaia-offwhite);
  color: var(--aceaia-graphite);
  font-family: var(--fonte-texto);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* Ícones: todos lineares, mesmo traço */
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Grafismo de fundo — só no computador */
.fundo-circulos {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 1100px;
  height: 1100px;
  transform: translate(-50%, -50%);
  stroke: var(--aceaia-mint);
  stroke-width: .8;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.pagina {
  position: relative;
  z-index: 1;
  max-width: var(--largura);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--aceaia-offwhite);
}

@media (min-width: 560px) {
  .fundo-circulos { opacity: .45; animation: gira 120s linear infinite; }
  .pagina {
    margin: 40px auto;
    min-height: auto;
    border-radius: 36px;
    overflow: hidden;
    box-shadow: 0 30px 70px -30px rgba(3, 76, 59, .4), 0 2px 6px rgba(3, 76, 59, .06);
  }
}
@keyframes gira { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* ==========================================================
   Barra compacta (aparece ao rolar)
   ========================================================== */
.barra-fixa {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 8px 12px 0;
  transform: translateY(-120%);
  transition: transform .45s var(--suave);
  pointer-events: none;
}
.barra-fixa.visivel { transform: none; pointer-events: auto; }
.barra-fixa__conteudo {
  width: 100%;
  max-width: calc(var(--largura) - 24px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  border-radius: 18px;
  background: rgba(3, 76, 59, .82);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  color: var(--aceaia-white);
  box-shadow: 0 10px 30px -12px rgba(3, 76, 59, .6);
}
.barra-fixa__conteudo img { width: 28px; height: 28px; }
.barra-fixa__conteudo span {
  flex: 1;
  font-family: var(--fonte-titulo);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: .02em;
}

/* ==========================================================
   Topo
   ========================================================== */
.topo {
  position: relative;
  overflow: hidden;
  background: var(--aceaia-gradient);
  background-size: 180% 180%;
  animation: deriva 16s ease-in-out infinite alternate;
  color: var(--aceaia-white);
  text-align: center;
  padding: 40px var(--margem) 48px;
  border-radius: 0 0 36px 36px;
}
@keyframes deriva {
  from { background-position: 0% 0%; }
  to   { background-position: 100% 100%; }
}

/* conteúdo do topo reage à rolagem (parallax suave, via --rolagem 0..1) */
.topo__conteudo {
  transform: translateY(calc(var(--rolagem, 0) * 36px)) scale(calc(1 - var(--rolagem, 0) * .06));
  opacity: calc(1 - var(--rolagem, 0) * .9);
  will-change: transform, opacity;
}

.circulos {
  position: absolute;
  top: 0;
  left: 0;
  width: 120px;
  height: 120px;
  stroke: var(--aceaia-yellow);
  stroke-width: 1;
  opacity: .6;
  pointer-events: none;
}
.circulos circle {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: desenha 1.8s var(--suave) .2s forwards, respira 6s ease-in-out 2s infinite;
  transform-origin: 0 0;
}
.circulos circle:nth-child(2) { animation-delay: .35s, 2.15s; }
@keyframes desenha { to { stroke-dashoffset: 0; } }
@keyframes respira {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.07); opacity: .5; }
}

.compartilhar {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--aceaia-white);
  cursor: pointer;
  transition: background .2s, transform .35s var(--mola);
}
.compartilhar svg { width: 20px; height: 20px; }
.compartilhar:hover { background: rgba(255, 255, 255, .16); transform: translateY(-2px); }
.compartilhar:active { transform: scale(.9); transition-duration: .1s; }
.compartilhar:focus-visible { outline: 2px solid var(--aceaia-yellow); outline-offset: 2px; }
.compartilhar--mini { position: static; width: 40px; height: 40px; border-radius: 12px; }

.logo {
  display: block;
  width: min(280px, 72vw);
  height: auto;
  margin: 18px auto 26px;
}

.frase {
  font-family: var(--fonte-titulo);
  font-weight: 800;
  font-size: clamp(23px, 6.6vw, 28px);
  line-height: 1.05;
  letter-spacing: -.01em;
  margin: 0 auto 14px;
  max-width: 380px;
  text-wrap: balance;
}
/* palavras entram uma a uma (montado pelo app.js) */
.frase .palavra {
  display: inline-block;
  opacity: 0;
  transform: translateY(.45em);
  filter: blur(4px);
  animation: palavra .7s var(--suave) forwards;
  animation-delay: calc(.25s + var(--p) * 55ms);
}
@keyframes palavra { to { opacity: 1; transform: none; filter: none; } }

.cidades {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, .85);
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
}
.cidades svg { width: 15px; height: 15px; opacity: .9; }

/* ==========================================================
   Corpo
   ========================================================== */
.corpo {
  flex: 1;
  padding: 0 var(--margem) 8px;
  margin-top: -26px;          /* o card destaque "sobe" sobre o topo */
  position: relative;
}

/* ---------- Card destaque ---------- */
.destaque {
  position: relative;
  overflow: hidden;
  display: block;
  text-decoration: none;
  background: var(--aceaia-deep-green);
  color: var(--aceaia-white);
  border-radius: 26px;
  padding: 22px 20px 20px;
  margin-bottom: 22px;
  box-shadow: 0 18px 36px -18px rgba(3, 76, 59, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
  transition: transform .5s var(--mola), box-shadow .3s;
  isolation: isolate;
}
.destaque:hover { --ty: -3px; box-shadow: 0 26px 44px -20px rgba(3, 76, 59, .75), inset 0 1px 0 rgba(255, 255, 255, .06); }
.destaque.inclinando { transition: transform .12s linear, box-shadow .3s; }
.destaque:active { --ty: 1px; }
.destaque:focus-visible { outline: 2px solid var(--aceaia-green); outline-offset: 3px; }

/* reflexo que segue o dedo/mouse */
.destaque::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(260px circle at var(--x, 70%) var(--y, 0%), rgba(155, 202, 179, .2), transparent 65%);
  transition: opacity .3s;
}

.destaque .circulos-card {
  position: absolute;
  right: -56px;
  top: -56px;
  z-index: -1;
  width: 170px;
  height: 170px;
  stroke: var(--aceaia-yellow);
  stroke-width: 1;
  opacity: .22;
  pointer-events: none;
  animation: gira-card 40s linear infinite;
}
@keyframes gira-card { to { transform: rotate(360deg); } }

.destaque img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 16px;
}

.destaque .tag {
  display: inline-block;
  background: var(--aceaia-yellow);
  color: var(--aceaia-graphite);
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 8px;
}

.destaque .titulo {
  font-family: var(--fonte-titulo);
  font-weight: 800;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -.01em;
  margin: 14px 0 6px;
  max-width: 300px;
  text-wrap: balance;
}
.destaque .sub {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.35;
  color: rgba(255, 255, 255, .8);
}

/* contagem regressiva ao vivo */
.contagem {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 0 14px;
}
.contagem .caixa {
  text-align: center;
  padding: 9px 4px 7px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1);
}
.contagem .numero {
  display: block;
  height: 26px;
  overflow: hidden;
  font-family: var(--fonte-titulo);
  font-weight: 800;
  font-size: 24px;
  line-height: 26px;
  font-variant-numeric: tabular-nums;
}
.contagem .numero span { display: block; }
.contagem .numero span.troca { animation: troca .45s var(--suave); }
@keyframes troca {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.contagem .rotulo-tempo {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
}
.ultimo-dia {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-weight: 700;
  font-size: 14px;
}
.ultimo-dia::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--aceaia-green);
  animation: pulsa 1.6s ease-out infinite;
}
@keyframes pulsa {
  0%   { box-shadow: 0 0 0 0 rgba(0, 168, 89, .6); }
  100% { box-shadow: 0 0 0 9px rgba(0, 168, 89, 0); }
}

/* barra do prazo */
.destaque .barra {
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .1);
  margin: 0 0 18px;
  overflow: hidden;
}
.destaque .barra span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--aceaia-green), var(--aceaia-mint));
  transition: width 1.4s var(--suave) .5s;
}

.destaque .cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--aceaia-yellow);
  color: var(--aceaia-graphite);
  font-weight: 700;
  font-size: 15.5px;
  padding: 14px 18px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
/* brilho que passa pelo botão de tempos em tempos */
.destaque .cta::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  animation: passa 4.5s ease-in-out 2s infinite;
}
@keyframes passa {
  0%, 70% { left: -60%; }
  100%    { left: 130%; }
}
.destaque .cta svg { width: 18px; height: 18px; stroke-width: 2.2; transition: transform .45s var(--mola); }
.destaque:hover .cta svg { transform: translateX(5px); }

/* ---------- Botões de link ---------- */
.links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 70px;
  padding: 12px 14px 12px 12px;
  background: var(--aceaia-white);
  border: 1px solid rgba(155, 202, 179, .45);
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(3, 76, 59, .05);
  color: var(--aceaia-graphite);
  text-decoration: none;
  transition: transform .45s var(--mola), box-shadow .3s, border-color .3s;
}
/* luz que segue o cursor */
.link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(220px circle at var(--x, 50%) var(--y, 50%), rgba(0, 168, 89, .09), transparent 70%);
  opacity: 0;
  transition: opacity .3s;
}
.link:hover::before { opacity: 1; }
.link:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 168, 89, .6);
  box-shadow: 0 14px 28px -16px rgba(3, 76, 59, .4);
}
.link:active { transform: scale(.97); transition-duration: .12s; }
.link:focus-visible { outline: 2px solid var(--aceaia-green); outline-offset: 2px; }

.link .bloco-icone {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(0, 168, 89, .1);
  color: var(--aceaia-green);
  transition: background .3s, color .3s, transform .5s var(--mola);
}
.link .bloco-icone svg { width: 22px; height: 22px; }
.link:hover .bloco-icone { background: var(--aceaia-green); color: var(--aceaia-white); transform: rotate(-8deg) scale(1.06); }

.link .textos { flex: 1; min-width: 0; }
.link .rotulo {
  display: block;
  font-size: 16.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link .sub {
  display: block;
  font-size: 13.5px;
  line-height: 1.35;
  color: rgba(77, 77, 77, .68);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link .seta {
  flex: none;
  width: 32px;
  height: 32px;
  padding: 7px;
  border-radius: 50%;
  color: rgba(77, 77, 77, .45);
  transition: transform .45s var(--mola), color .3s, background .3s;
}
.link:hover .seta { transform: translateX(3px); color: var(--aceaia-green); background: rgba(0, 168, 89, .1); }

/* Onda de toque (ripple) */
.onda {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  background: rgba(0, 168, 89, .16);
  transform: scale(0);
  animation: onda .65s var(--suave) forwards;
  pointer-events: none;
}
.destaque .onda { background: rgba(255, 255, 255, .16); }
@keyframes onda { to { transform: scale(1); opacity: 0; } }

/* ---------- Redes ---------- */
.redes {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 34px 0 8px;
}
.redes a {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  color: var(--aceaia-green);
  background: var(--aceaia-white);
  border: 1px solid rgba(155, 202, 179, .45);
  border-radius: 50%;
  transform: translate(var(--mx, 0px), var(--my, 0px));
  transition: transform .5s var(--mola), background .3s, color .3s, border-color .3s, box-shadow .3s;
}
.redes a:hover {
  background: var(--aceaia-green);
  border-color: var(--aceaia-green);
  color: var(--aceaia-white);
  box-shadow: 0 10px 22px -10px rgba(0, 168, 89, .7);
}
.redes a.magnetico { transition: transform .15s linear, background .3s, color .3s, border-color .3s, box-shadow .3s; }
.redes a:active { transform: scale(.9); }
.redes a:focus-visible { outline: 2px solid var(--aceaia-green); outline-offset: 2px; }
.redes svg { width: 22px; height: 22px; }

/* ---------- Rodapé ---------- */
.rodape {
  padding: 18px var(--margem) 32px;
  text-align: center;
  font-size: 12.5px;
  color: rgba(77, 77, 77, .6);
}
.rodape p { margin: 0; text-wrap: balance; }

/* ---------- Aviso "Link copiado" ---------- */
.aviso {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translate(-50%, 24px) scale(.96);
  background: var(--aceaia-deep-green);
  color: var(--aceaia-white);
  font-size: 14px;
  padding: 12px 18px;
  border-radius: 16px;
  box-shadow: 0 12px 28px -10px rgba(3, 76, 59, .6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .5s var(--mola);
}
.aviso svg { width: 18px; height: 18px; color: var(--aceaia-green); stroke-width: 2.4; }
.aviso.visivel { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ==========================================================
   Entradas
   ========================================================== */
.topo .logo    { animation: aparece .8s var(--suave) both; }
.topo .cidades { animation: aparece .8s var(--suave) .7s both; }
@keyframes aparece {
  from { opacity: 0; transform: translateY(12px) scale(.97); filter: blur(4px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* elementos revelados ao entrar na tela (classe .visivel posta pelo app.js) */
.revela {
  opacity: 0;
  transform: translateY(22px) scale(.98);
  transition: opacity .6s var(--suave), transform .8s var(--mola);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.revela.visivel { opacity: 1; transform: none; }
/* depois de revelado, as interações voltam ao tempo normal */
.revela.pronto { transition-delay: 0s; }
.destaque.revela.visivel { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px)); }
.link.revela.pronto:hover { transform: translateY(-3px); }
.link.revela.pronto:active { transform: scale(.97); }

/* Quem pede menos movimento no sistema não vê animações */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .revela, .frase .palavra { opacity: 1; transform: none; filter: none; }
  .circulos circle { stroke-dashoffset: 0; }
  .topo__conteudo { transform: none; opacity: 1; }
}
