/* Cartão digital — Fabrício Leitão · Art Déco jurídico (preto e dourado) */
:root {
  --gold: #c9a961;
  --gold-hi: #e2c88a;
  --gold-lo: #8f7640;
  --ink: #0a0a0a;
  --panel: rgba(20, 18, 14, .86);
  --panel-hi: rgba(34, 30, 22, .92);
  --text: #f4f1ea;
  --muted: #b9b2a3;
  --bevel: 12px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  background: var(--ink);
  color: var(--text);
  font-family: Montserrat, system-ui, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }

/* Fundo desfocado fixo (position: fixed funciona também no iOS) */
.bg {
  position: fixed; inset: 0; z-index: -1;
  background: #050505 url(../img/fundo.jpg) center top / cover no-repeat;
}
.bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(201,169,97,.035) 0 1px, transparent 1px 80px),
    linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.55) 60%, rgba(0,0,0,.8));
}

.card {
  width: 100%; max-width: 440px; margin: 0 auto;
  padding: 14px 16px calc(96px + env(safe-area-inset-bottom));
}

/* Ícones */
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i-lg { width: 24px; height: 24px; color: var(--gold); }

/* Chanfro a 45° com borda dourada: camada externa dourada + interna escura */
.bevel {
  --c: var(--bevel);
  display: block; padding: 1.5px; background: linear-gradient(135deg, var(--gold-hi), var(--gold) 40%, var(--gold-lo));
  clip-path: polygon(var(--c) 0, calc(100% - var(--c)) 0, 100% var(--c), 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, var(--c) 100%, 0 calc(100% - var(--c)), 0 var(--c));
}
.bevel-in {
  display: block; height: 100%; background: var(--panel);
  clip-path: polygon(calc(var(--c) - 1px) 0, calc(100% - var(--c) + 1px) 0, 100% calc(var(--c) - 1px), 100% calc(100% - var(--c) + 1px), calc(100% - var(--c) + 1px) 100%, calc(var(--c) - 1px) 100%, 0 calc(100% - var(--c) + 1px), 0 calc(var(--c) - 1px));
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

.topbar { display: flex; justify-content: flex-end; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; font-size: 10px; font-weight: 600; letter-spacing: .16em; color: var(--gold-hi);
  border: 1px solid rgba(201,169,97,.55); background: rgba(0,0,0,.45);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: background .25s var(--ease), color .25s var(--ease);
}
.chip:hover, .chip:focus-visible { background: rgba(201,169,97,.16); }
.chip[aria-pressed="true"] { background: var(--gold); color: #000; }

/* Topo */
.hero { text-align: center; padding-top: 6px; }
.logo { width: 250px; margin: 6px auto 26px; }
.portrait { position: relative; width: 152px; height: 152px; margin: 0 auto 18px; }
.portrait img {
  position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  border: 2px solid var(--gold); box-shadow: 0 0 0 5px rgba(0,0,0,.7), 0 0 0 6px rgba(201,169,97,.45), 0 18px 40px rgba(0,0,0,.6);
}
.halo { position: absolute; inset: -14px; border-radius: 50%; background: radial-gradient(circle, rgba(201,169,97,.35), transparent 68%); animation: pulse 5s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.06); opacity: .65; } }

.name { font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: clamp(1.75rem, 8vw, 2.2rem); letter-spacing: .08em; color: var(--gold); line-height: 1.1; }
.oab { font-size: 11px; font-weight: 600; letter-spacing: .22em; color: var(--gold); opacity: .9; margin-top: 10px; }

/* Frase de impacto */
.quote { position: relative; margin: 30px 4px 22px; padding: 22px 12px 4px; text-align: center; }
.quote-mark { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-family: "Playfair Display", serif; font-size: 72px; line-height: 1; color: var(--gold); opacity: .55; }
.quote blockquote { font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: clamp(1.65rem, 7.8vw, 2.05rem); line-height: 1.18; letter-spacing: .01em; color: var(--text); text-shadow: 0 2px 22px rgba(0,0,0,.9); }
.quote figcaption { margin-top: 12px; font-family: "Playfair Display", Georgia, serif; font-size: 14px; letter-spacing: .12em; color: var(--gold-hi); }
.quote em { font-style: italic; font-weight: 500; }
.quote-rule { display: block; width: 110px; height: 1px; margin: 14px auto 0; background: linear-gradient(90deg, transparent, var(--gold), transparent); }

.center { text-align: center; margin-bottom: 22px; }
.chip-icon .i { width: 16px; height: 16px; }

/* Áreas */
.section-title { font-size: 11px; font-weight: 600; letter-spacing: .24em; color: var(--gold); text-align: center; margin-bottom: 10px; }
.section-title.left { text-align: left; margin: 20px 0 10px; }
.areas .bevel-in { padding: 16px 14px 12px; }
.area-list { list-style: none; display: grid; gap: 2px; }
.area-list a {
  display: flex; align-items: center; gap: 12px; padding: 9px 8px; font-size: 14px; border-radius: 2px;
  transition: background .2s var(--ease), padding .2s var(--ease);
}
.area-list a:hover, .area-list a:focus-visible { background: rgba(201,169,97,.12); padding-left: 12px; }
.area-list .i { margin-left: auto; width: 16px; height: 16px; color: var(--gold); opacity: .7; }
.diamond { width: 7px; height: 7px; flex: none; background: var(--gold); transform: rotate(45deg); }
.hint { font-size: 11px; color: var(--muted); text-align: center; margin-top: 8px; }
.area-plain { list-style: none; display: grid; gap: 8px; font-size: 14px; }
.area-plain li { display: flex; align-items: center; gap: 12px; }

/* Botões de contato e ações */
.actions { display: grid; gap: 12px; margin-top: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.action { width: 100%; text-align: left; transition: transform .2s var(--ease), filter .25s var(--ease); }
.action .bevel-in { padding: 15px 20px; transition: background .25s var(--ease); }
.action:hover, .action:focus-visible { transform: translateY(-2px); filter: drop-shadow(0 0 14px rgba(201,169,97,.35)); }
.action:hover .bevel-in { background: var(--panel-hi); }
.action:active { transform: translateY(1px); }
.action:hover .i-lg { transform: rotate(-8deg); }
.i-lg { transition: transform .25s var(--ease); }
.row { display: flex; align-items: center; gap: 16px; }
.col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.center-row { justify-content: center; gap: 12px; }
.action strong { display: block; font-size: 15px; font-weight: 600; letter-spacing: .03em; }
.center-row strong { font-size: 13.5px; letter-spacing: .06em; white-space: nowrap; }
.action small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.action.solid .bevel-in { background: linear-gradient(135deg, var(--gold-hi), var(--gold)); color: #111; }
.action.solid .i-lg { color: #111; }
.action.solid:hover .bevel-in { background: var(--gold-hi); }

/* QR */
.qr { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 30px; }
.qr-box { --c: 10px; }
.qr-box .bevel-in { background: #fff; padding: 10px; }
.qr-box img { width: 150px; height: 150px; }
.qr p { font-size: 12px; color: var(--gold); letter-spacing: .04em; }

.rule { width: 96px; height: 2px; margin: 28px auto 18px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.footer { text-align: center; font-size: 12px; color: var(--muted); }
.footer a:hover { color: var(--gold); }
.footer span { margin: 0 8px; }
.copy { margin-top: 8px; font-size: 11px; opacity: .8; }

/* Botão flutuante */
.fab {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 20;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold-hi), var(--gold)); color: #111;
  box-shadow: 0 10px 28px rgba(0,0,0,.55), 0 0 0 4px rgba(201,169,97,.18);
  transition: transform .2s var(--ease);
}
.fab .i { width: 27px; height: 27px; stroke-width: 2; }
.fab:hover { transform: scale(1.07); }
body.modal-open .fab { display: none; }

/* Diálogos */
.dlg {
  width: min(640px, calc(100% - 24px)); max-height: 88vh; margin: auto; overflow-y: auto;
  padding: 28px 22px 24px; color: var(--text);
  background: radial-gradient(ellipse at top, rgba(201,169,97,.14), transparent 55%), #0e0d0b;
  border: 1px solid rgba(201,169,97,.65); box-shadow: 0 24px 70px rgba(0,0,0,.75);
}
.dlg.narrow { width: min(430px, calc(100% - 24px)); }
.dlg::backdrop { background: rgba(0,0,0,.78); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dlg[open] { animation: rise .3s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.dlg-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(201,169,97,.4); color: var(--gold-hi); }
.dlg-x:hover { background: rgba(201,169,97,.15); }
.dlg-head { text-align: center; margin-bottom: 8px; }
.dlg-badge { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(201,169,97,.6); color: var(--gold-hi); margin-bottom: 10px; }
.dlg-badge .i { width: 22px; height: 22px; }
.dlg h2 { font-family: "Playfair Display", Georgia, serif; font-size: 1.45rem; letter-spacing: .07em; color: var(--gold-hi); padding: 0 30px; }
.bio p { font-size: 14px; line-height: 1.7; color: #e6e1d6; margin-bottom: 12px; }
.dlg-text { font-size: 14px; line-height: 1.65; text-align: center; margin: 14px 0; color: #e6e1d6; }
.note { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; line-height: 1.55; color: #d9d3c6; padding: 12px 14px; border-left: 2px solid var(--gold); background: rgba(201,169,97,.08); }
.note .i { color: var(--gold-hi); margin-top: 1px; }
.dlg-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.btn-ghost, .btn-gold { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 12px; font-size: 12px; font-weight: 600; letter-spacing: .12em; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.btn-ghost { border: 1px solid rgba(201,169,97,.5); color: var(--gold-hi); }
.btn-ghost:hover { background: rgba(201,169,97,.1); }
.btn-gold { background: var(--gold); color: #000; }
.btn-gold:hover { background: var(--gold-hi); }
.share-list { display: grid; gap: 4px; margin-top: 14px; }
.share-list a, .share-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 10px; font-size: 14px; text-align: left; border-bottom: 1px solid rgba(201,169,97,.15); }
.share-list .i { color: var(--gold); }
.share-list a:hover, .share-list button:hover { background: rgba(201,169,97,.1); }

.toast {
  position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 50;
  padding: 11px 18px; font-size: 13px; background: #15130f; border: 1px solid var(--gold); color: var(--text);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease); max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Aviso de instalação no iPhone */
.install {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px;
  background: rgba(18, 16, 12, .96); border: 1px solid var(--gold); box-shadow: 0 14px 40px rgba(0,0,0,.6);
  max-width: 440px; margin: 0 auto; animation: rise .4s var(--ease);
}
.install[hidden] { display: none; }
.install img { width: 40px; height: 40px; border-radius: 9px; flex: none; }
.install p { font-size: 12.5px; line-height: 1.45; color: #e6e1d6; }
.install strong { display: block; color: var(--gold-hi); font-size: 13px; margin-bottom: 2px; }
.install b { color: var(--text); font-weight: 600; }
.install .ios-share { width: 15px; height: 15px; vertical-align: -2px; color: var(--gold-hi); }
.install button { flex: none; width: 32px; height: 32px; display: grid; place-items: center; color: var(--gold-hi); }
body.tip-open .fab { display: none; }

/* Modo aplicativo (aberto pela tela de início) */
@media (display-mode: standalone) {
  .card { padding-top: calc(14px + env(safe-area-inset-top)); }
}

/* Entrada progressiva */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }

/* Alto contraste */
body.hc .bg { background-image: none; background: #000; }
body.hc .bg::after { display: none; }
body.hc .bevel-in { background: #000; -webkit-backdrop-filter: none; backdrop-filter: none; }
body.hc .bevel { background: #ffd56b; }
body.hc .action small, body.hc .hint, body.hc .footer { color: #fff; }
body.hc .name, body.hc .oab, body.hc .section-title { color: #ffd56b; }
body.hc .action.solid .bevel-in { background: #ffd56b; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
@media (min-width: 700px) {
  .card { padding-top: 32px; }
}
