/* Cartão digital — Joaquim Paiva
   Tema azul por defeito. Para o tema dourado: <body class="theme-gold"> */

:root {
  --page: #0a172d;
  --card: #0e1f3b;
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --gold: #d9b275;
  --gold-text: #d9b275;
  --line: rgba(217, 178, 117, 0.35);
  --btn-bg: #ffffff;
  --btn-ink: #0e1f3b;
  --btn-border: #ffffff;
  --primary-bg: #d9b275;
  --primary-ink: #0e1f3b;
  --social-bg: #ffffff;
  --social-ink: #0e1f3b;
  --corner-a: #ffffff;
  --corner-b: #d9b275;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 0 48px rgba(217, 178, 117, 0.18);
}

.theme-gold {
  --page: #d6c7ae;
  --card: #e5d9c6;
  --ink: #0e1f3b;
  --muted: #3e4659;
  --gold: #b8955a;
  --gold-text: #7d5f2e;
  --line: rgba(125, 95, 46, 0.35);
  --btn-bg: #fffaf1;
  --btn-ink: #0e1f3b;
  --btn-border: #b8955a;
  --primary-bg: #0e1f3b;
  --primary-ink: #d9b275;
  --social-bg: #0e1f3b;
  --social-ink: #d9b275;
  --corner-a: #0e1f3b;
  --corner-b: #b8955a;
  --shadow: 0 24px 64px rgba(80, 60, 30, 0.28);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background: var(--page);
  color: var(--ink);
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Cartão ---------- */

.card {
  position: relative;
  width: min(100%, 440px);
  padding: 56px 28px 72px;
  background: var(--card);
  border: 1px solid var(--gold);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: center;
  animation: rise 0.6s ease-out both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* Cantos (como no cartão físico) */
.corner {
  position: absolute;
  width: 110px;
  height: 90px;
  pointer-events: none;
}

.corner::before,
.corner::after {
  content: "";
  position: absolute;
}

.corner-tl {
  top: 0;
  left: 0;
}

.corner-tl::before {
  top: 0;
  left: 0;
  width: 90px;
  height: 90px;
  background: var(--corner-a);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.corner-tl::after {
  top: 0;
  left: 0;
  width: 110px;
  height: 72px;
  background: var(--corner-b);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.corner-br {
  right: 0;
  bottom: 0;
}

.corner-br::before {
  right: 0;
  bottom: 0;
  width: 90px;
  height: 90px;
  background: var(--corner-a);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.corner-br::after {
  right: 0;
  bottom: 0;
  width: 110px;
  height: 72px;
  background: var(--corner-b);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

/* ---------- Cabeçalho ---------- */

.logo {
  display: block;
  width: 92px;
  height: 92px;
  margin: 0 auto 20px;
  object-fit: contain;
}

.name {
  margin: 0;
  font-family: "Cinzel", "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(1.9rem, 8vw, 2.4rem);
  letter-spacing: 0.04em;
  line-height: 1.15;
}

.role {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 12px 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold-text);
}

/* compensa o espaçamento da última letra */
.role span {
  margin-right: -0.42em;
}

.role::before,
.role::after {
  content: "";
  width: 36px;
  height: 1px;
  background: var(--line);
}

.contacts {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
  line-height: 1.9;
  color: var(--muted);
}

.contacts a:hover {
  color: var(--gold-text);
}

/* ---------- Botões ---------- */

.actions {
  display: grid;
  gap: 10px;
  margin-top: 30px;
}

.btn {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 0 16px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  border: 1px solid var(--btn-border);
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.btn:active {
  transform: translateY(0);
}

.btn svg {
  flex: none;
  width: 22px;
  height: 22px;
  box-sizing: content-box;
  padding-right: 14px;
  border-right: 1px solid var(--gold);
}

.btn-label {
  flex: 1;
  /* equilibra a largura do ícone para o texto ficar centrado */
  margin-right: 36px;
}

.btn-primary {
  min-height: 60px;
  background: var(--primary-bg);
  color: var(--primary-ink);
  border-color: var(--primary-bg);
  font-size: 0.86rem;
}

.btn-primary svg {
  border-right-color: currentColor;
}

.wa-icon {
  fill: #25d366;
  stroke: #ffffff;
}

/* ---------- Redes sociais ---------- */

.social {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 36px;
}

.social a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.social-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--social-bg);
  color: var(--social-ink);
  border: 1.5px solid var(--gold);
  transition: transform 0.15s ease;
}

.social a:hover .social-icon {
  transform: translateY(-2px);
}

.social-icon svg {
  width: 26px;
  height: 26px;
}

/* ---------- Vantagens ---------- */

.perks {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.perks h2 {
  margin: 0 0 16px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.6;
  text-transform: uppercase;
  text-align: center;
  color: var(--gold-text);
}

.perks ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.perks li {
  display: flex;
  gap: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}

.perks svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--gold);
}

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

.foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
}

.share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: transparent;
  color: var(--gold-text);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.share svg {
  width: 16px;
  height: 16px;
}

.license {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  opacity: 0.8;
}

/* ---------- Acessibilidade ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 10px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Telemóvel: cartão ocupa o ecrã inteiro ---------- */

@media (max-width: 480px) {
  body {
    padding: 0;
    place-items: stretch;
  }

  .card {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 64px 22px 84px;
  }

  .social {
    gap: 12px;
  }
}

/* No fundo dourado o logo dourado precisa de ser mais escuro */
.theme-gold .logo {
  filter: brightness(0.72) saturate(1.15);
}
