/* =============================================================================
   Ribamar Alves — Cartão digital · editorial "Old Money" (preto + dourado)
   Layout tela cheia (mobile-first), sem flip. Duas colunas a partir de 900px.
   ========================================================================== */
:root {
  --bg: #07070B; --surface: rgba(19,18,28,.62); --surface-solid: #0D0C14;
  --gold: #C8A96A; --gold-hi: #E6CC94;
  --gold-soft: rgba(200,169,106,.10); --gold-mid: rgba(200,169,106,.24);
  --gold-line: rgba(200,169,106,.18);
  --text: #EDE8E0; --text-2: rgba(237,232,224,.62); --text-3: rgba(237,232,224,.38);
  --whatsapp: #25D366; --linkedin: #5AA7D8;
  --radius: 18px; --ease-out: cubic-bezier(.2,.8,.2,1);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Outfit", system-ui, -apple-system, sans-serif;
}
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  min-height: 100svh; background: var(--bg); color: var(--text); font-family: var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden; -webkit-tap-highlight-color: transparent;
}
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ── Atmosfera ────────────────────────────────────────────────────────────── */
.backdrop, .grain { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.backdrop { overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; will-change: transform; }
.orb--a { width: 70vmax; height: 70vmax; top: -38vmax; left: -20vmax;
  background: radial-gradient(circle, rgba(200,169,106,.22), transparent 62%); animation: drift-a 22s ease-in-out infinite alternate; }
.orb--b { width: 55vmax; height: 55vmax; bottom: -30vmax; right: -22vmax;
  background: radial-gradient(circle, rgba(200,169,106,.14), transparent 60%); animation: drift-b 26s ease-in-out infinite alternate; }
.orb--c { width: 40vmax; height: 40vmax; top: 40%; left: 55%;
  background: radial-gradient(circle, rgba(37,211,102,.06), transparent 60%); animation: drift-a 30s ease-in-out infinite alternate-reverse; }
@keyframes drift-a { to { transform: translate3d(12vmax, 8vmax, 0) scale(1.1); } }
@keyframes drift-b { to { transform: translate3d(-10vmax, -12vmax, 0) scale(.92); } }
.grain { z-index: 1; opacity: .4; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E"); }

/* ── Entrada em cascata ───────────────────────────────────────────────────── */
.reveal { animation: rise .8s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }

/* ── Página: cabe numa tela só ─────────────────────────────────────────────
   Altura = 100svh (área visível com as barras do navegador). Os tamanhos usam
   clamp() com vh, então tudo encolhe em telas baixas e o QR nunca sai da tela. */
.page {
  position: relative; z-index: 2; width: 100%; max-width: 440px; height: 100svh; margin: 0 auto;
  display: flex; flex-direction: column; justify-content: space-evenly; gap: clamp(10px, 2.2vh, 22px);
  padding: max(clamp(12px, 3vh, 32px), env(safe-area-inset-top)) 18px max(clamp(10px, 2.4vh, 24px), env(safe-area-inset-bottom));
  overflow: hidden;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 0 2px; }
.hero__frame { position: absolute; inset: -14px -6px; pointer-events: none; }
.corner { position: absolute; width: 22px; height: 22px; border: solid var(--gold-mid); }
.corner--tl { top: 0; left: 0; border-width: 1px 0 0 1px; border-radius: 4px 0 0 0; }
.corner--br { bottom: 0; right: 0; border-width: 0 1px 1px 0; border-radius: 0 0 4px 0; }
.monogram { position: absolute; top: -6px; right: 4px; font-family: var(--serif); font-size: 64px; font-weight: 300; letter-spacing: -2px; line-height: 1; color: rgba(200,169,106,.06); }

.avatar { position: relative; width: clamp(64px, 13vh, 116px); height: clamp(64px, 13vh, 116px); margin-bottom: clamp(8px, 1.8vh, 16px); }
.avatar::before { /* anel dourado girando */
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--gold-hi), rgba(200,169,106,.12) 35%, rgba(200,169,106,.12) 65%, var(--gold-hi));
  animation: spin 9s linear infinite;
}
.avatar::after { /* halo pulsante */
  content: ""; position: absolute; inset: -18px; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(200,169,106,.28), transparent 65%); animation: breathe 4.5s ease-in-out infinite;
}
.avatar img { position: relative; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: top center;
  border: 3px solid var(--bg); box-shadow: 0 10px 30px rgba(0,0,0,.55); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 0%,100% { opacity: .55; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.04); } }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; margin-bottom: clamp(6px, 1.4vh, 12px); border-radius: 999px;
  font-size: 12px; font-weight: 500; letter-spacing: .3px; color: var(--gold); background: var(--gold-soft); border: 1px solid var(--gold-line); }

.name { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 6.4vh, 50px); line-height: .95; letter-spacing: -.5px; margin-bottom: clamp(4px, 1vh, 8px); }
.name em { font-style: italic; color: var(--gold);
  background: linear-gradient(100deg, var(--gold) 0%, var(--gold-hi) 45%, var(--gold) 60%) 0 0 / 220% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: sheen 6s ease-in-out infinite; }
@keyframes sheen { 0%,100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.role { font-size: clamp(10px, 2.9vw, 11.5px); font-weight: 600; letter-spacing: clamp(1.2px, .55vw, 2.6px); white-space: nowrap; text-transform: uppercase; color: var(--text-2); margin-bottom: clamp(10px, 2vh, 16px); }
.divider { display: none; width: 48px; height: 1px; margin-bottom: 22px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }

/* ── Botões ───────────────────────────────────────────────────────────────── */
.cta { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; width: 100%; }
.btn {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: clamp(44px, 6.6vh, 52px); padding: 0 14px; border-radius: 14px; font-size: 15px; font-weight: 600; letter-spacing: .2px;
  transition: transform .2s var(--ease-out), box-shadow .2s, background-color .2s, border-color .2s;
}
.btn:active { transform: scale(.97); }
.btn--whatsapp { background: var(--whatsapp); color: #fff; box-shadow: 0 8px 26px rgba(37,211,102,.28); }
.btn--whatsapp::after { /* brilho que atravessa o botão */
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.38), transparent); animation: shine 4s ease-in-out 1.6s infinite;
}
@keyframes shine { 0% { left: -60%; } 30%,100% { left: 130%; } }
.btn--ghost { color: var(--gold); background: var(--gold-soft); border: 1px solid var(--gold-mid); }
.btn--gold { min-height: 42px; font-size: 14px; color: #14110A; background: linear-gradient(135deg, var(--gold-hi), var(--gold)); box-shadow: 0 6px 18px rgba(200,169,106,.22); }

/* ── Contatos: fileira de ícones ──────────────────────────────────────────── */
.side { display: flex; flex-direction: column; gap: clamp(10px, 2.2vh, 22px); }
.tiles { display: flex; justify-content: space-between; gap: 6px; padding: 0 2px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 2px 0; border-radius: 16px; }
.tile__icon { display: grid; place-items: center; width: clamp(54px, 15vw, 64px); height: clamp(54px, 15vw, 64px); border-radius: 18px;
  color: var(--gold); background: var(--surface); border: 1px solid var(--gold-line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform .25s var(--ease-out), border-color .25s, background-color .25s; }
.tile--linkedin .tile__icon { color: var(--linkedin); background: rgba(10,102,194,.14); border-color: rgba(10,102,194,.25); }
.tile__icon svg { width: 24px; height: 24px; }
.tile__label { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.tile:hover .tile__icon, .tile:focus-visible .tile__icon { border-color: var(--gold-mid); transform: translateY(-2px); }
.tile:active .tile__icon { transform: scale(.92); }

/* ── QR / Compartilhar ────────────────────────────────────────────────────── */
.share { display: flex; align-items: center; gap: 16px; padding: clamp(12px, 2vh, 18px); border-radius: 22px;
  background: linear-gradient(160deg, rgba(200,169,106,.10), rgba(19,18,28,.7) 55%); border: 1px solid var(--gold-line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.qr { position: relative; flex-shrink: 0; width: clamp(104px, 17vh, 136px); height: clamp(104px, 17vh, 136px); padding: 8px; border-radius: 14px; background: #fff; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.qr svg { width: 100%; height: 100%; }
.qr::after { /* linha de scan */
  content: ""; position: absolute; left: 6px; right: 6px; height: 2px; top: 8px; border-radius: 2px;
  background: var(--gold); box-shadow: 0 0 12px 2px rgba(200,169,106,.75); animation: scan 3.2s ease-in-out infinite;
}
@keyframes scan { 0%,100% { top: 8px; opacity: 0; } 10%,90% { opacity: 1; } 50% { top: calc(100% - 10px); } }
.share__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.share__title { font-family: var(--serif); font-size: 23px; font-weight: 500; line-height: 1.05; }
.share__text { font-size: 12.5px; line-height: 1.5; color: var(--text-3); margin-bottom: 6px; }

.footer { display: none; text-align: center; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-3); padding-top: 4px; }

/* ── Banner PWA ───────────────────────────────────────────────────────────── */
.install { position: fixed; left: 50%; top: max(12px, env(safe-area-inset-top)); z-index: 10; width: min(calc(100vw - 32px), 360px);
  display: none; align-items: center; gap: 12px; padding: 10px 14px; text-align: left; border-radius: 16px;
  background: rgba(13,12,20,.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--gold-mid);
  transform: translateX(-50%); animation: slide-up .5s var(--ease-out) both; }
.install.is-visible { display: flex; }
@keyframes slide-up { from { opacity: 0; transform: translate(-50%, -20px); } }
.install__icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--gold); flex-shrink: 0; }
.install__text { display: flex; flex-direction: column; flex: 1; }
.install__title { font-size: 13px; font-weight: 600; }
.install__sub { font-size: 11.5px; color: var(--text-3); }
.install__arrow { color: var(--gold); font-size: 16px; }

/* ── Toast ────────────────────────────────────────────────────────────────── */
.toast { position: fixed; left: 50%; top: max(16px, env(safe-area-inset-top)); z-index: 20; padding: 10px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--bg); background: var(--gold-hi); box-shadow: 0 8px 24px rgba(0,0,0,.4);
  opacity: 0; transform: translate(-50%, -12px); pointer-events: none; transition: opacity .25s, transform .3s var(--ease-out); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ── Telas altas: mostra os detalhes extras ───────────────────────────────── */
@media (min-height: 780px) and (max-width: 899px) {
  .footer { display: block; }
}

/* ── Desktop: duas colunas ocupando a tela ────────────────────────────────── */
@media (min-width: 900px) {
  .page { max-width: 1040px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 72px; padding: 32px 40px; }
  .hero { padding: 36px 28px; }
  .hero__frame { inset: 0; }
  .avatar { width: clamp(110px, 20vh, 168px); height: clamp(110px, 20vh, 168px); margin-bottom: 20px; }
  .name { font-size: clamp(44px, 8vh, 64px); }
  .divider { display: block; }
  .footer { display: block; }
  .install { left: auto; right: 24px; top: auto; bottom: 24px; transform: none; animation-name: slide-up-desk; }
}
@keyframes slide-up-desk { from { opacity: 0; transform: translateY(20px); } }

/* ── Acessibilidade ───────────────────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
  .qr::after, .btn--whatsapp::after { display: none; }
}
