/* ==========================================================================
   Cartão digital · Detetive Janaynna
   Identidade do site detetivejanaynna.com.br: fundo quase preto, vermelho #ce3638,
   Lato. No topo, os feixes de luz vermelha na diagonal do hero do site.
   Feito pela skill cartao-visitas pra caber numa tela de celular sem rolar.
   ========================================================================== */

:root {
  /* Página e superfícies (fundo #141414 e cards #333 do site) */
  --bg: #080808;
  --card: #141414;
  --surface: #1f1f1f;
  --surface-hover: #2a2a2a;

  /* Texto */
  --ink: #d8d8d8;
  --ink-strong: #ffffff;
  --muted: #8d8d8d;

  /* Marca */
  --brand: #0b0b0b;
  --brand-ink: #ffffff;
  --accent: #e5484b;        /* vermelho do site clareado pra texto pequeno ter contraste no escuro */
  --icon: #e5484b;
  --tagline: #d8d8d8;

  /* O CTA de WhatsApp do site ("Falar com a Detetive") é vermelho, então o botão segue a marca */
  --wa: #ce3638;
  --wa-2: #a8272a;
  --wa-ink: #ffffff;
  --save: #d8d8d8;

  /* Linhas */
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* Tipografia */
  --font-display: "Lato", "Segoe UI", system-ui, sans-serif;
  --font-body: "Lato", "Segoe UI", system-ui, sans-serif;
  --name-weight: 900;

  /* Forma: o site usa botão pílula */
  --radius-card: 24px;
  --radius-btn: 999px;
  --radius-link: 14px;
}

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

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

body {
  display: flex;
  justify-content: center;
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

h1,
p {
  margin: 0;
}

.icon {
  flex: none;
  width: 1.2em;
  height: 1.2em;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

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

.card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 420px;
  min-height: 100dvh;
  background: var(--card);
}

@media (min-width: 480px) {
  body {
    align-items: flex-start;
    padding: 40px 20px;
  }

  .card {
    min-height: auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.45);
  }
}

/* ---------- Topo ---------- */

.card__top {
  position: relative;
  flex: none;
  height: calc(112px + env(safe-area-inset-top));
  overflow: hidden;
  background: var(--brand);
}

/* ---------- Motivo do topo: feixes de luz vermelha ----------
   Os mesmos riscos de luz na diagonal do hero do site, com um brilho vermelho vindo
   do canto. Os feixes andam devagar de um lado pro outro. */
.card__motif {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 120% at 88% -10%, rgba(206, 54, 56, 0.42), transparent 62%),
    radial-gradient(ellipse 45% 90% at 0% 110%, rgba(206, 54, 56, 0.16), transparent 60%);
}

.card__motif::before,
.card__motif::after {
  content: "";
  position: absolute;
  top: -60%;
  height: 220%;
  border-radius: 2px;
  background: linear-gradient(to bottom, transparent 10%, rgba(255, 110, 112, 0.95) 48%, rgba(206, 54, 56, 0.9) 56%, transparent 90%);
  box-shadow: 0 0 14px 2px rgba(206, 54, 56, 0.55);
  animation: feixe 11s ease-in-out infinite alternate;
}

.card__motif::before {
  left: 64%;
  width: 2px;
}

.card__motif::after {
  left: 80%;
  width: 1px;
  opacity: 0.65;
  animation-duration: 14s;
  animation-delay: -5s;
}

@keyframes feixe {
  from {
    transform: translateX(-26px) rotate(24deg);
  }
  to {
    transform: translateX(26px) rotate(24deg);
  }
}

.card__share {
  position: absolute;
  top: calc(8px + env(safe-area-inset-top));
  right: 10px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--brand-ink) 28%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 55%, transparent);
  color: var(--brand-ink);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.card__share:hover {
  background: color-mix(in srgb, var(--brand-ink) 16%, transparent);
}

.card__share .icon {
  width: 18px;
  height: 18px;
}

/* ---------- Perfil ---------- */

.profile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -54px;
  padding: 0 20px 18px;
  text-align: center;
}

.profile__avatar {
  width: 108px;
  height: 108px;
  padding: 4px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 60%, transparent), 0 16px 30px -14px rgba(0, 0, 0, 0.55);
}

.profile__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* empresa sem rosto: logo inteira dentro do círculo */
.profile__avatar--logo img {
  padding: 14%;
  border-radius: 0;
  object-fit: contain;
}

.profile__name {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 1.62rem;
  font-weight: var(--name-weight);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink-strong);
}

.profile__role {
  margin-top: 7px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

/* uma linha só: se quebrar, o texto está grande demais pro cartão */
.profile__tagline {
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-style: italic;
  color: var(--tagline);
}

.profile__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 8px;
  margin-top: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.42em 0.85em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.chip > .icon {
  width: 13px;
  height: 13px;
  color: var(--icon);
}

.chip--rating {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  transition: background-color 0.2s ease;
}

.chip--rating:hover {
  background: color-mix(in srgb, var(--accent) 24%, transparent);
}

.stars {
  display: inline-flex;
  gap: 1px;
  color: var(--accent);
}

.stars .icon {
  width: 11px;
  height: 11px;
}

/* ---------- Ações ---------- */

.actions {
  display: grid;
  gap: 10px;
  padding: 2px 18px 16px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  border: 0;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease, background-color 0.2s ease;
}

.btn .icon {
  width: 22px;
  height: 22px;
}

.btn--wa {
  background: linear-gradient(135deg, var(--wa), var(--wa-2));
  box-shadow: 0 12px 24px -12px color-mix(in srgb, var(--wa-2) 85%, transparent);
  color: var(--wa-ink);
}

.btn--wa:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
}

.btn--save {
  border: 1.5px solid color-mix(in srgb, var(--save) 55%, transparent);
  background: transparent;
  color: var(--save);
}

.btn--save:hover {
  background: color-mix(in srgb, var(--save) 8%, transparent);
  transform: translateY(-2px);
}

/* ---------- Links: de 2 a 4, sempre numa linha ---------- */

.links {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 0 18px 16px;
}

.link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 74px;
  padding: 10px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-link);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.link .icon {
  width: 24px;
  height: 24px;
  color: var(--icon);
}

.link:hover {
  border-color: var(--line-strong);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

/* ---------- Frase e rodapé ---------- */

/* margin-top: auto divide a sobra de altura com o rodapé: com pouco conteúdo,
   a frase fica no meio do vão em vez de deixar um buraco em cima do rodapé */
.quote {
  margin-top: auto;
  padding: 2px 24px 18px;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-style: italic;
  text-align: center;
  color: var(--ink-strong);
}

.quote::before,
.quote::after {
  color: var(--accent);
}

.quote::before {
  content: "\201C";
}

.quote::after {
  content: "\201D";
}

.card__foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin-top: auto;
  padding: 16px 20px calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 0.7rem;
  line-height: 1.5;
  text-align: center;
  color: var(--muted);
}

.card__logo {
  width: auto;
  height: 15px;
  margin-bottom: 8px;
  opacity: 0.9;
}

.card__copy {
  opacity: 0.8;
}

/* ---------- Aviso (link copiado, contato pronto) ---------- */

.toast {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 10;
  padding: 0.7em 1.15em;
  border-radius: 999px;
  background: var(--ink-strong);
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.5);
  color: var(--card);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  transform: translateX(-50%);
}

/* ---------- Telas baixas: aperta os respiros pra continuar cabendo sem rolar ---------- */

@media (max-width: 479px) and (max-height: 740px) {
  .card__top {
    height: calc(96px + env(safe-area-inset-top));
  }

  .profile {
    margin-top: -48px;
    padding-bottom: 14px;
  }

  .profile__avatar {
    width: 96px;
    height: 96px;
  }

  .profile__name {
    margin-top: 10px;
    font-size: 1.5rem;
  }

  .btn {
    height: 48px;
  }

  .actions,
  .links {
    padding-bottom: 12px;
  }

  .link {
    min-height: 66px;
  }

  .quote {
    padding-bottom: 12px;
  }
}

/* ---------- Telas altas: tudo um pouco maior pra ocupar a tela sem sobrar vão ---------- */

@media (max-width: 479px) and (min-height: 820px) {
  .card__top {
    height: calc(128px + env(safe-area-inset-top));
  }

  .profile {
    margin-top: -62px;
    padding-bottom: 24px;
  }

  .profile__avatar {
    width: 124px;
    height: 124px;
  }

  .profile__name {
    margin-top: 14px;
    font-size: 1.78rem;
  }

  .profile__tagline {
    font-size: 1.14rem;
  }

  .actions {
    gap: 12px;
    padding-bottom: 22px;
  }

  .btn {
    height: 56px;
    font-size: 1.02rem;
  }

  .links {
    gap: 10px;
    padding-bottom: 24px;
  }

  .link {
    min-height: 86px;
    font-size: 0.76rem;
  }

  .quote {
    padding-bottom: 26px;
    font-size: 1.22rem;
  }
}

/* ---------- Entrada ---------- */

.js .profile,
.js .actions,
.js .links,
.js .quote,
.js .card__foot {
  animation: subir 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.js .actions {
  animation-delay: 0.08s;
}

.js .links {
  animation-delay: 0.16s;
}

.js .quote {
  animation-delay: 0.24s;
}

.js .card__foot {
  animation-delay: 0.3s;
}

@keyframes subir {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .card__motif::before,
  .card__motif::after,
  .js .profile,
  .js .actions,
  .js .links,
  .js .quote,
  .js .card__foot {
    animation: none;
  }

  .btn,
  .link {
    transition: none;
  }
}
