/* ═══════════════════════════════════════════════════════════════════════════
   NaiPrints3D — Linktree CSS  v3.0
   Tema: Claro · Elegante · Atelier & Farm
   Paleta: #7c3aed (roxo) · branco · lavanda suave
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. Variáveis de design ──────────────────────────────────────────────── */

:root {
  /* Fundos */
  --bg-top:      #f4eeff;
  --bg-bottom:   #ffffff;
  --card-bg:     #ffffff;

  /* Texto */
  --text:        #241338;
  --muted:       #75708a;
  --dim:         rgba(36, 19, 56, 0.35);

  /* Cores de destaque */
  --purple:      #7c3aed;
  --purple-l:    #a78bfa;
  --purple-d:    #5b21b6;
  --pink:        #ec4899;
  --blue:        #3b82f6;
  --green:       #22c55e;
  --black:       #111111;

  --card-shadow: 0 4px 18px rgba(124, 58, 237, 0.10);
  --card-radius: 20px;
}

/* ── 2. Reset base ───────────────────────────────────────────────────────── */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 45%);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.5;
}

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

/* ── 3. Layout principal (coluna centrada) ───────────────────────────────── */

.page {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100dvh;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 20px 22px;
}

/* ── 4. Header — avatar, nome, tagline ───────────────────────────────────── */

.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-bottom: 16px;
  animation: fadeInDown 0.7s ease forwards;
}

/* Utilitário: visível para leitores de ecrã, oculto visualmente */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Logótipo oficial (imagem) — wordmark "NaiPrints" + "ATELIER & FARM" */
.brand-logo {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  margin: 0 auto;
}

.brand-slogan {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  max-width: 300px;
  font-style: italic;
  line-height: 1.45;
  margin-top: 4px;
}

.header-divider {
  display: block;
  width: 90%;
  max-width: 280px;
  height: 1px;
  background: rgba(124, 58, 237, 0.18);
  margin-top: 8px;
}

/* ── 5. Lista de botões ──────────────────────────────────────────────────── */

.links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-bottom: auto;
}

/* Base dos cartões */
.btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 74px;
  border-radius: var(--card-radius);
  padding: 14px 18px;
  border: 1px solid rgba(124, 58, 237, 0.08);
  cursor: pointer;
  overflow: hidden;
  text-decoration: none;
  background: var(--card-bg);
  box-shadow: var(--card-shadow), 0 18px 26px -12px var(--glow, rgba(124, 58, 237, 0.25));
  transition:
    transform    0.26s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow   0.26s ease,
    border-color 0.26s ease;
  opacity: 0;
  animation: slideUp 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.btn:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: var(--card-shadow), 0 16px 34px -8px var(--glow, rgba(124, 58, 237, 0.4));
}

.btn:active {
  transform: translateY(-1px) scale(0.99);
}

/* Ícone grande e desbotado que "sangra" no canto direito do cartão */
.btn-decor {
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 4.6rem;
  line-height: 1;
  opacity: 0.14;
  z-index: 0;
  pointer-events: none;
}

/* Lavagem de cor suave por trás do ícone decorativo */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(to left, var(--wash, transparent) 0%, transparent 60%);
}

/* Brilho diagonal que atravessa o cartão ao passar o rato */
.btn-shine {
  position: absolute;
  top: 0;
  left: -130%;
  width: 60%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
  pointer-events: none;
  z-index: 1;
}

.btn:hover .btn-shine {
  left: 145%;
}

/* Onda de cor ao clicar no cartão (ripple), gerada via JS na posição do clique */
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: radial-gradient(circle, var(--glow, rgba(124, 58, 237, 0.45)) 0%, transparent 72%);
  opacity: 0.9;
  pointer-events: none;
  z-index: 1;
  animation: btn-ripple-anim 0.65s ease-out forwards;
}

@keyframes btn-ripple-anim {
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}

/* Ícone — logótipo original de cada app */
.btn-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 1.3rem;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  color: #fff;
  transition: transform 0.2s ease;
}

.btn:hover .btn-icon {
  transform: scale(1.08);
}

/* Bloco de texto central */
.btn-body {
  flex: 1;
  position: relative;
  z-index: 2;
  min-width: 0;
}

.btn-title {
  display: block;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.005em;
  line-height: 1.3;
}

.btn-sub {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.4;
}

/* Seta — move para a direita no hover */
.btn-arrow {
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  color: rgba(36, 19, 56, 0.22);
  flex-shrink: 0;
  transition: transform 0.22s ease, color 0.22s ease;
  position: relative;
  z-index: 2;
}

.btn:hover .btn-arrow {
  transform: translateX(5px);
  color: var(--purple);
}

/* Delays em cascata para a animação de entrada */
.btn:nth-child(1) { animation-delay: 0.10s; }
.btn:nth-child(2) { animation-delay: 0.22s; }
.btn:nth-child(3) { animation-delay: 0.34s; }
.btn:nth-child(4) { animation-delay: 0.46s; }
.btn:nth-child(5) { animation-delay: 0.58s; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* ── 5a. Temas individuais dos cartões ───────────────────────────────────── */

/* Botão 1 — TikTok · preto */
.btn--tiktok {
  --wash: rgba(45, 212, 191, 0.16);
  --glow: rgba(15, 23, 42, 0.3);
}
.btn--tiktok .btn-icon {
  background: #000;
}
.btn--tiktok .btn-decor {
  color: #0f172a;
}

/* Botão 2 — Instagram · gradiente oficial */
.btn--ig {
  --wash: rgba(236, 72, 153, 0.16);
  --glow: rgba(214, 36, 159, 0.35);
}
.btn--ig .btn-icon {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}
.btn--ig .btn-decor {
  color: var(--pink);
}

/* Botão 3 — WhatsApp · verde */
.btn--wa {
  --wash: rgba(34, 197, 94, 0.16);
  --glow: rgba(37, 211, 102, 0.35);
}
.btn--wa .btn-icon {
  background: linear-gradient(135deg, #25d366, #128c7e);
}
.btn--wa .btn-decor {
  color: var(--green);
}

/* Botão 4 — Guardar Contacto · azul */
.btn--contact {
  --wash: rgba(59, 130, 246, 0.16);
  --glow: rgba(59, 130, 246, 0.35);
}
.btn--contact .btn-icon {
  background: linear-gradient(135deg, #3b82f6, #1e3a8a);
}
.btn--contact .btn-decor {
  color: var(--blue);
}

/* Botão 5 — Encomenda Personalizada · roxo (CTA principal, cartão cheio) */
.btn--custom {
  --glow: rgba(124, 58, 237, 0.45);
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  border-color: transparent;
  box-shadow: 0 10px 24px -8px var(--glow);
}
.btn--custom .btn-icon {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.btn--custom .btn-title,
.btn--custom .btn-sub {
  color: #fff;
}
.btn--custom .btn-sub {
  opacity: 0.85;
}
.btn--custom .btn-decor {
  color: #fff;
  opacity: 0.16;
}
.btn--custom .btn-arrow {
  color: rgba(255, 255, 255, 0.7);
}
.btn--custom:hover {
  box-shadow: 0 16px 34px -6px var(--glow);
}
.btn--custom:hover .btn-arrow {
  color: #fff;
}

/* ── 6. Footer ───────────────────────────────────────────────────────────── */

.footer {
  margin-top: 18px;
  width: 100%;
  text-align: center;
  opacity: 0;
  animation: fadeInUp 0.7s ease 0.7s forwards;
}

/* Links legais (Privacidade · Termos · Contactos) */
.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.72rem;
  color: var(--dim);
  transition: color 0.22s;
}

.footer-links a:hover {
  color: var(--purple);
}

.footer-sep {
  font-size: 0.72rem;
  color: rgba(36, 19, 56, 0.18);
  user-select: none;
}

/* Linha de ícones das redes sociais */
.social-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.social-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid rgba(124, 58, 237, 0.28);
  background: #fff;
  font-size: 1rem;
  color: var(--purple);
  transition: all 0.24s ease;
}

.social-btn:hover {
  transform: translateY(-4px);
}

/* Cores individuais dos ícones sociais */
.social-btn--tiktok {
  color: #000;
}
.social-btn--tiktok:hover {
  background: #000;
  border-color: #000;
  color: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}
.social-btn--ig:hover {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 18px rgba(214, 36, 159, 0.3);
}
.social-btn--wa:hover {
  background: linear-gradient(135deg, #25d366, #128c7e);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 18px rgba(34, 197, 94, 0.3);
}
.social-btn--email:hover {
  background: linear-gradient(135deg, #3b82f6, #1e3a8a);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 18px rgba(59, 130, 246, 0.3);
}
.social-btn--custom:hover {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 18px rgba(124, 58, 237, 0.3);
}

.copyright {
  font-size: 0.72rem;
  color: rgba(36, 19, 56, 0.4);
}

.visit-counter {
  margin-top: 6px;
  font-size: 0.65rem;
  color: rgba(36, 19, 56, 0.28);
  letter-spacing: 0.02em;
}

/* ── 7. Animações globais ────────────────────────────────────────────────── */

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: translateY(0);     }
}

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

/* ── 8. Responsividade ───────────────────────────────────────────────────── */

/* Telemóvel pequeno */
@media (max-width: 400px) {
  .page {
    padding: 8px 14px 14px;
  }

  .btn {
    min-height: 66px;
    padding: 11px 13px;
    gap: 11px;
  }

  .btn-icon {
    width: 42px;
    height: 42px;
    font-size: 1.15rem;
  }

  .btn-decor {
    font-size: 3.6rem;
  }
}

/* Telemóvel médio */
@media (min-width: 401px) and (max-width: 480px) {
  .page {
    padding: 10px 16px 16px;
  }
}

/* Tablet e desktop — cartão centrado com mais espaçamento */
@media (min-width: 481px) {
  .page {
    padding: 20px 38px 28px;
  }

  .btn {
    min-height: 78px;
  }
}

/* ── 9. Acessibilidade ───────────────────────────────────────────────────── */

/* Respeita a preferência do utilizador por menos movimento */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visível para navegação por teclado */
.btn:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
}

.social-btn:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
}

.footer-links a:focus-visible {
  outline: 2px solid var(--purple-l);
  outline-offset: 2px;
  border-radius: 3px;
}
