/*
 * Página de links da Dra. Jordana (Espaço Psiquê): o "link na bio" do Instagram.
 * Site à parte, com a mesma identidade do site principal. A página já é estreita (até 460 px), por isso não tem @media de largura.
 * IDENTIDADE: cores, fontes e cantos só nas variáveis do :root (os mesmos valores do css/style.css do site).
 */

:root {
  /* Fundos */
  --cor-fundo: #FBF8F2;
  --cor-fundo-icone: #FBF5EA;
  --fundo-pagina: radial-gradient(ellipse 90% 40% at 50% 0%, #FFFDF8 0%, #F6EFE3 55%, #F1E8DA 100%);

  /* Textos */
  --cor-titulo: #2A231D;
  --cor-texto-link: #6E645A;          /* linha de baixo dos links brancos */
  --cor-texto-botao: #1F180F;         /* texto do link dourado e fundo do círculo do WhatsApp */
  --cor-texto-botao-suave: #3B2D12;   /* linha de baixo do link dourado */

  /* Dourado da marca */
  --cor-dourado: #8A6420;             /* ícones */
  --cor-dourado-claro: #E9C77B;       /* ícone do WhatsApp no círculo escuro */
  --cor-dourado-linha: #B8893F;       /* contorno de foco da logo */
  --cor-dourado-contorno: #C9A86A;    /* borda dos links ao passar o mouse */
  --gradiente-botao: linear-gradient(100deg, #B8893F 0%, #E3C27E 45%, #F3DFAE 60%, #C79B52 100%);
  --gradiente-brilho: linear-gradient(100deg, transparent 42%, rgba(255, 252, 238, 0.95) 50%, transparent 58%);
  --luz-logo: radial-gradient(closest-side, rgba(226, 190, 110, 0.34), rgba(226, 190, 110, 0));

  /* Bordas */
  --cor-borda: #EADFCB;
  --cor-borda-icone: #E8D7B6;

  /* Sombras */
  --sombra-link: 0 6px 18px rgba(80, 60, 30, 0.05);
  --sombra-link-mouse: 0 10px 24px rgba(80, 60, 30, 0.1);
  --sombra-principal: 0 12px 30px rgba(90, 64, 20, 0.28);
  --onda-principal: rgba(199, 155, 82, 0.5);
  --onda-principal-0: rgba(199, 155, 82, 0);

  /* Fontes (as famílias também estão no <link> do Google Fonts, no index.html) */
  --fonte-texto: Manrope, system-ui, sans-serif;

  /* Cantos e largura */
  --raio-link: 18px;
  --raio-principal: 20px;
  --largura: 460px;
}

/* ─── Base ─── */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--cor-fundo);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--cor-dourado);
}

a:focus-visible {
  outline: 2px solid var(--cor-dourado-linha);
  outline-offset: 3px;
}

/* overflow-x: o brilho atrás da logo passa da borda no celular; sem isso a página "balança" para o lado */
.pagina {
  display: flex;
  justify-content: center;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--fundo-pagina);
  color: var(--cor-titulo);
  font-family: var(--fonte-texto);
}

.conteudo {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: var(--largura);
  padding: 36px 20px;
}

/* ═══ LOGO ANIMADA ═══
   Animação só com CSS: cada parte tem "animation: nome duração ritmo ATRASO" (o atraso é quando ela começa).
   Ordem: esfera → haste e anel → cobra se enrolando → asas → nome → lema → brilho em loop. */
.logo-botao {
  all: unset;
  display: block;
  width: 100%;
  cursor: pointer;
}

.logo-botao:focus-visible {
  border-radius: 12px;
  outline: 2px solid var(--cor-dourado-linha);
  outline-offset: 6px;
}

.logo-arte {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.logo-simbolo {
  position: relative;
  display: block;
  width: min(250px, 62vw);
  aspect-ratio: 420 / 295;
}

.logo-luz {
  position: absolute;
  inset: -45% -35%;
  background: var(--luz-logo);
  animation: luz 1.6s ease 2.4s both;
}

.logo-desenho {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.logo-mascara-traco {
  stroke-dasharray: 1 1;
  animation: enrolar 1.8s cubic-bezier(0.45, 0, 0.35, 1) 1s both;
}

.logo-mascara-tudo {
  opacity: 0;
  animation: aparecer 0.35s ease 2.75s forwards;
}

.logo-haste {
  transform-box: fill-box;
  transform-origin: 50% 0%;
  animation: haste-entra 0.7s cubic-bezier(0.3, 0.7, 0.2, 1) 0.35s both, haste-sai 0.6s ease 2.9s forwards;
}

.logo-cajado {
  animation: aparecer 0.5s ease 2.7s both;
}

.logo-rastro {
  stroke-dasharray: 0.07 1.2;
  animation: rastro 1.8s cubic-bezier(0.45, 0, 0.35, 1) 1s both;
}

.logo-anel {
  transform-box: fill-box;
  transform-origin: center;
  animation: anel 0.9s ease-out 0.35s both;
}

.logo-esfera {
  transform-box: view-box;
  transform-origin: 210px 22px;
  animation: surgir 0.6s cubic-bezier(0.2, 1.6, 0.4, 1) 0.15s both;
}

.logo-asa {
  position: absolute;
  inset: 0;
}

.logo-asa img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.logo-asa-esquerda {
  transform-origin: 46% 50%;
  animation: asa-esquerda-abre 1.9s cubic-bezier(0.3, 0.7, 0.3, 1) 2.5s both, asa-esquerda-bate 4.2s ease-in-out 4.6s infinite;
}

.logo-asa-direita {
  transform-origin: 54.5% 50%;
  animation: asa-direita-abre 1.9s cubic-bezier(0.3, 0.7, 0.3, 1) 2.5s both, asa-direita-bate 4.2s ease-in-out 4.6s infinite;
}

.logo-nome {
  position: relative;
  display: block;
  width: min(300px, 78vw);
  aspect-ratio: 954 / 148;
  margin-top: 16px;
  animation: revelar 1.3s cubic-bezier(0.6, 0, 0.2, 1) 3.8s both;
}

.logo-nome img {
  display: block;
  width: 100%;
  height: 100%;
}

.logo-lema {
  width: min(310px, 80vw);
  height: auto;
  margin-top: 8px;
  animation: abrir 1.1s ease 4.6s both;
}

/* Brilho que passa pela logo de tempos em tempos: a máscara recorta o brilho no formato de cada parte */
.brilho {
  position: absolute;
  inset: 0;
  background: var(--gradiente-brilho) 100% 0 / 300% 100% no-repeat;
  animation: brilho 5s ease-in-out 5.2s infinite;
}

.brilho-caduceu {
  -webkit-mask: url(../assets/img/psique-caduceu.webp) center / 100% 100% no-repeat;
  mask: url(../assets/img/psique-caduceu.webp) center / 100% 100% no-repeat;
}

.brilho-asa-esquerda {
  -webkit-mask: url(../assets/img/psique-asa-esq.webp) center / 100% 100% no-repeat;
  mask: url(../assets/img/psique-asa-esq.webp) center / 100% 100% no-repeat;
}

.brilho-asa-direita {
  -webkit-mask: url(../assets/img/psique-asa-dir.webp) center / 100% 100% no-repeat;
  mask: url(../assets/img/psique-asa-dir.webp) center / 100% 100% no-repeat;
}

.brilho-nome {
  -webkit-mask: url(../assets/img/psique-nome.webp) center / 100% 100% no-repeat;
  mask: url(../assets/img/psique-nome.webp) center / 100% 100% no-repeat;
}

/* ═══ LINKS ═══ */
.links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 34px;
}

.link-texto {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

/* Link dourado (WhatsApp), com a foto da Dra. Jordana */
.link-principal {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px 12px 12px;
  border-radius: var(--raio-principal);
  background: var(--gradiente-botao);
  color: var(--cor-texto-botao);
  text-decoration: none;
  transition: filter 0.2s, transform 0.2s;
  animation: entrar 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.05s backwards, pulsar 2.6s ease-in-out 1.4s infinite;
}

.link-principal:hover {
  color: var(--cor-texto-botao);
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.link-principal img {
  display: block;
  flex: none;
  width: 54px;
  height: 54px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  object-fit: cover;   /* a foto já vem recortada no rosto (psique-jordana-avatar.jpg, quadrada) */
}

.link-principal .link-texto {
  line-height: 1.3;
}

.link-principal strong {
  font-size: 16px;
  font-weight: 700;
}

.link-principal .link-texto span {
  color: var(--cor-texto-botao-suave);
  font-size: 13px;
}

.link-principal-icone {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--cor-texto-botao);
  color: var(--cor-dourado-claro);
}

/* Links brancos */
.link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 66px;
  padding: 12px 16px 12px 12px;
  border: 1px solid var(--cor-borda);
  border-radius: var(--raio-link);
  background: #FFFFFF;
  box-shadow: var(--sombra-link);
  color: var(--cor-titulo);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  animation: entrar 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

.link:hover {
  border-color: var(--cor-dourado-contorno);
  box-shadow: var(--sombra-link-mouse);
  color: var(--cor-titulo);
  transform: translateY(-1px);
}

/* Os links entram um depois do outro */
.links a:nth-child(2) { animation-delay: 0.12s; }
.links a:nth-child(3) { animation-delay: 0.19s; }
.links a:nth-child(4) { animation-delay: 0.26s; }
.links a:nth-child(5) { animation-delay: 0.33s; }
.links a:nth-child(n + 6) { animation-delay: 0.4s; }

.link-icone {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--cor-borda-icone);
  border-radius: 12px;
  background: var(--cor-fundo-icone);
  color: var(--cor-dourado);
}

.link .link-texto {
  line-height: 1.35;
}

.link strong {
  font-size: 15px;
  font-weight: 600;
}

.link .link-texto span {
  color: var(--cor-texto-link);
  font-size: 13px;
}

.link-seta {
  flex: none;
  color: var(--cor-dourado);
}

/* ─── Animações ─── */
@keyframes enrolar {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes rastro {
  0% { stroke-dashoffset: 0.07; opacity: 1; }
  90% { opacity: 1; }
  100% { stroke-dashoffset: -0.93; opacity: 0; }
}

@keyframes haste-entra {
  from { transform: scaleY(0); opacity: 0; }
  to { transform: scaleY(1); opacity: 1; }
}

@keyframes haste-sai {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes aparecer {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes surgir {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes anel {
  0% { transform: scale(0.6); opacity: 0; }
  12% { opacity: 0.9; }
  100% { transform: scale(3.4); opacity: 0; }
}

@keyframes asa-esquerda-abre {
  0% { opacity: 0; transform: perspective(900px) rotateY(86deg); }
  35% { opacity: 1; transform: perspective(900px) rotateY(-10deg); }
  55% { transform: perspective(900px) rotateY(38deg); }
  72% { transform: perspective(900px) rotateY(-5deg); }
  86% { transform: perspective(900px) rotateY(14deg); }
  100% { opacity: 1; transform: perspective(900px) rotateY(0); }
}

@keyframes asa-direita-abre {
  0% { opacity: 0; transform: perspective(900px) rotateY(-86deg); }
  35% { opacity: 1; transform: perspective(900px) rotateY(10deg); }
  55% { transform: perspective(900px) rotateY(-38deg); }
  72% { transform: perspective(900px) rotateY(5deg); }
  86% { transform: perspective(900px) rotateY(-14deg); }
  100% { opacity: 1; transform: perspective(900px) rotateY(0); }
}

@keyframes asa-esquerda-bate {
  0%, 36%, 100% { transform: perspective(900px) rotateY(0); }
  9%, 27% { transform: perspective(900px) rotateY(32deg); }
  18% { transform: perspective(900px) rotateY(3deg); }
}

@keyframes asa-direita-bate {
  0%, 36%, 100% { transform: perspective(900px) rotateY(0); }
  9%, 27% { transform: perspective(900px) rotateY(-32deg); }
  18% { transform: perspective(900px) rotateY(-3deg); }
}

@keyframes revelar {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes abrir {
  from { clip-path: inset(0 50% 0 50%); opacity: 0; }
  to { clip-path: inset(0 0 0 0); opacity: 1; }
}

@keyframes brilho {
  0% { background-position: 100% 0; }
  35%, 100% { background-position: 0% 0; }
}

@keyframes luz {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulsar {
  0%, 100% { box-shadow: var(--sombra-principal), 0 0 0 0 var(--onda-principal); }
  50% { box-shadow: var(--sombra-principal), 0 0 0 14px var(--onda-principal-0); }
}

@keyframes entrar {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* Quem pede "menos movimento" no aparelho vê tudo direto no estado final, sem animação */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .link-principal {
    box-shadow: var(--sombra-principal);
  }
}
