/* Cartão de visita digital - herda os tokens de styles.css.
   Tela cheia, área segura respeitada, alvos de toque com no mínimo 44px. */

.card-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding:
    max(1.25rem, env(safe-area-inset-top))
    max(1.25rem, env(safe-area-inset-right))
    max(1.25rem, env(safe-area-inset-bottom))
    max(1.25rem, env(safe-area-inset-left));
  background:
    radial-gradient(80rem 46rem at 72% -18%, rgba(227, 183, 89, .22) 0%, transparent 62%),
    linear-gradient(170deg, #26262a 0%, #1a1a1e 55%, #131316 100%);
  color: #ecebe7;
}

.vcard {
  position: relative;
  width: min(100%, 30rem);
  padding: clamp(1.5rem, 5vw, 2.5rem);
  border-radius: 28px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  backdrop-filter: blur(18px) saturate(1.3);
  overflow: hidden;
  isolation: isolate;
}
@supports not (backdrop-filter: blur(1px)) {
  .vcard { background: rgba(10, 32, 30, .92); }
}

.vcard__glow {
  position: absolute;
  inset: -40% -30% auto auto;
  width: 24rem; height: 24rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(227, 183, 89, .3), transparent 65%);
  z-index: -1;
  pointer-events: none;
}

/* O logo continua centralizado na tela toda; o seletor de idioma fica ancorado
   no canto para nao empurrar o logo para fora do meio. */
.vcard__head { display: grid; place-items: center; position: relative; }
.vcard__logo { width: clamp(11rem, 52%, 14rem); height: auto; }
.vcard__lang {
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  display: grid;
  place-items: center;
  min-width: 2.75rem;
  height: 2.75rem;
  padding-inline: .55rem;
  border: 1px solid rgba(236, 235, 231, .28);
  border-radius: 999px;
  color: rgba(236, 235, 231, .82);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
}
.vcard__lang:hover { color: #ecebe7; border-color: rgba(236, 235, 231, .6); }

.vcard__tagline {
  text-align: center;
  font-size: .95rem;
  line-height: 1.5;
  color: rgba(236, 235, 231, .78);
  margin: 1.1rem auto 0;
  max-width: 26ch;
}

.vcard__address {
  font-style: normal;
  text-align: center;
  font-size: .85rem;
  line-height: 1.6;
  color: rgba(236, 235, 231, .68);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.vcard__address strong {
  display: block;
  color: #ecebe7;
  font-weight: 600;
  margin-bottom: .2rem;
}

/* Faixa de uma linha, nao grade que quebra.
   Empilhadas, as nove especialidades ocupavam 182px - o segundo maior bloco do
   cartao, empurrando os botoes de contato para fora da tela. Em fila rolavel
   ocupam 40px e continuam todas ali. */
.vcard__chips {
  display: flex;
  flex-wrap: nowrap;
  gap: .4rem;
  margin-top: 1rem;
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  /* Sangra ate a borda do cartao, para a ultima tag nao parecer cortada no meio. */
  margin-inline: calc(clamp(1.5rem, 5vw, 2.5rem) * -1);
  padding-inline: clamp(1.5rem, 5vw, 2.5rem);
  scroll-snap-type: x proximity;
  /* A mascara avisa que ha mais conteudo a direita, sem precisar de barra. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 1.5rem, #000 calc(100% - 2.5rem), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 1.5rem, #000 calc(100% - 2.5rem), transparent);
}
.vcard__chips::-webkit-scrollbar { display: none; }
.vcard__chips li {
  flex: none;
  scroll-snap-align: start;
  padding: .32rem .7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16);
  font-size: .72rem;
  letter-spacing: .01em;
  white-space: nowrap;
  color: rgba(236, 235, 231, .8);
}

.vcard__actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  margin-top: 1.35rem;
}
.vcard__action {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: .45rem;
  min-height: 4.35rem;
  padding: .55rem .35rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1);
  color: inherit;
  text-decoration: none;
  font-size: .72rem;
  font-weight: 600;
  text-align: center;
  transition: background-color .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
}
.vcard__action svg { width: 1.25rem; height: 1.25rem; opacity: .9; }
.vcard__action:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .28); transform: translateY(-2px); }
.vcard__action:active { transform: translateY(0); }
.vcard__action--primary {
  background: #1fa855;
  border-color: transparent;
}
.vcard__action--primary:hover { background: #23bd60; }
.vcard__action:focus-visible { outline: 2px solid #e3b759; outline-offset: 3px; }

.vcard__foot { display: grid; gap: .55rem; margin-top: 1.35rem; }
.vcard__foot .btn { width: 100%; }
.vcard__foot .btn--ghost { color: #ecebe7; border-color: rgba(255, 255, 255, .3); }
.vcard__foot .btn--ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .5); }
.vcard__foot .btn:not(.btn--ghost) { --btn-bg: #ecebe7; --btn-fg: #1f1f22; }
.vcard__foot .btn:not(.btn--ghost):hover { --btn-bg: #fff; }

.vcard__site {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 2.75rem;
  margin-top: .15rem;
  font-size: .8rem;
  font-weight: 600;
  color: rgba(236, 235, 231, .72);
  text-decoration: none;
}
.vcard__site svg { width: 1em; height: 1em; transition: transform .2s var(--ease); }
.vcard__site:hover { color: #fff; }
.vcard__site:hover svg { transform: translateX(3px); }

@media (min-width: 26rem) {
  .vcard__actions { grid-template-columns: repeat(3, 1fr); }
}
/* Telas baixas: aperta o respiro em vez de esconder informacao. */
@media (max-height: 46rem) {
  .vcard { padding: 1.25rem; }
  .vcard__tagline { margin-top: .8rem; font-size: .88rem; }
  .vcard__address { margin-top: .8rem; padding-top: .8rem; font-size: .8rem; }
  .vcard__chips { margin-top: .8rem; }
  .vcard__actions { margin-top: 1rem; gap: .4rem; }
  .vcard__action { min-height: 3.6rem; font-size: .68rem; }
  .vcard__foot { margin-top: 1rem; gap: .45rem; }
  .vcard__foot .btn { min-height: 2.6rem; }
  /* Compartilhar e instalar dividem a fila: sao secundarios ao lado de salvar
     contato, e em tela baixa cada fila custa caro. */
  .vcard__foot { grid-template-columns: 1fr 1fr; }
  .vcard__foot > .btn:first-child,
  .vcard__foot > .vcard__site { grid-column: 1 / -1; }
  .vcard__logo { width: clamp(9rem, 44%, 11rem); }
}

/* Com sete acoes a ultima fila fica com um item so. Esticado na largura inteira
   ele ganharia um destaque que nao merece; centralizado, a fila parece
   deliberada. */
.vcard__action:last-child:nth-child(3n + 1) { grid-column: 2 / 3; }
