/* =========================================================
   Cartão virtual — Marcio do Nascimento
   Paleta e tipografia: identidade-visual.md
   ========================================================= */
:root {
  --navy: #0B2A55;
  --navy-2: #123A70;
  --brand: #1E5AA8;
  --sky: #8DB4DE;
  --mist: #E8EEF6;
  --bg: #F7F9FC;
  --text: #2E3A4B;
  --soft: #5B6676;
  --line: #E3E8EF;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.cv-page {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font: 16px/1.55 var(--sans); color: var(--text);
  background: var(--navy);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
h1, h2 { font-family: var(--serif); margin: 0; }
p { margin: 0; }
.ci { flex-shrink: 0; }

/* fundo (desktop): a própria foto, desfocada, sob um véu marinho */
.cv-backdrop {
  position: fixed; inset: -40px; z-index: 0;
  background: center 30% / cover no-repeat;
  filter: blur(38px) saturate(.7) brightness(.55);
  transform: scale(1.1);
}
.cv-backdrop::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 0%, rgba(11,42,85,.35), rgba(11,42,85,.92) 70%); }

.cv {
  position: relative; z-index: 1;
  width: 100%; max-width: 460px; margin: 0 auto;
  background: var(--bg);
  min-height: 100vh; min-height: 100dvh;
  overflow: hidden;
}
@media (min-width: 560px) {
  .cv { margin: 40px auto; min-height: 0; border-radius: 32px; box-shadow: 0 40px 90px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.06); }
}

/* ---------- capa */
.cv-hero { position: relative; height: clamp(420px, 118vw, 540px); color: #fff; background: #1C1F24; isolation: isolate; }
.cv-hero__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: cv-zoom 1.6s var(--ease) both; }
.cv-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(11,42,85,.45) 0%, rgba(11,42,85,0) 22%),
    linear-gradient(0deg, rgba(11,42,85,.97) 0%, rgba(11,42,85,.82) 20%, rgba(11,42,85,.25) 48%, rgba(11,42,85,0) 64%);
}
.cv-hero__top { position: absolute; top: max(16px, env(safe-area-inset-top)); left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center; }
.cv-mono { display: grid; place-items: center; height: 44px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.94); box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.cv-mono img { height: 24px; width: auto; }
.cv-round {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background .2s;
}
.cv-round:hover { background: rgba(255,255,255,.28); }
.cv-hero__id { position: absolute; left: 24px; right: 24px; bottom: 54px; animation: cv-up .9s .15s var(--ease) both; }
.cv-reg {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 12px 5px 10px; border-radius: 999px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.cv-hero h1 { font-size: clamp(32px, 9vw, 40px); line-height: 1.05; font-weight: 700; letter-spacing: -.015em; text-wrap: balance; }
.cv-role { margin-top: 8px; font-size: 16.5px; color: rgba(255,255,255,.86); letter-spacing: .01em; }

/* ---------- folha de conteúdo */
.cv-sheet {
  position: relative; margin-top: -30px; z-index: 2;
  background: var(--bg); border-radius: 30px 30px 0 0;
  padding: 30px 20px 28px;
}
.cv-tagline {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 20.5px; line-height: 1.38; color: var(--navy); text-align: center; text-wrap: balance;
  padding: 0 6px;
}
.cv-tagline::after { content: ""; display: block; width: 44px; height: 2px; margin: 18px auto 0; background: var(--sky); border-radius: 2px; }
.cv-bio { margin-top: 16px; text-align: center; color: var(--soft); font-size: 15px; text-wrap: pretty; }

.cv-social { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 22px 0 24px; }
.cv-social a {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  color: var(--navy); background: #fff; border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(11,42,85,.05);
  transition: transform .25s var(--ease), background .2s, color .2s, border-color .2s;
}
.cv-social a:hover { transform: translateY(-3px); background: var(--navy); color: #fff; border-color: var(--navy); }

/* ação principal */
.cv-cta {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px; text-decoration: none;
  padding: 16px 16px 16px 16px; border-radius: 20px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff;
  box-shadow: 0 14px 30px rgba(11,42,85,.28);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.cv-cta::before { /* brilho que passa */
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.16), transparent);
  animation: cv-shine 5s 1.6s ease-in-out infinite;
}
.cv-cta:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 18px 38px rgba(11,42,85,.34); }
.cv-cta__icon { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); }
.cv-cta__text { flex: 1; display: grid; }
.cv-cta__text strong { font-size: 18px; font-weight: 600; letter-spacing: .005em; }
.cv-cta__text small { font-size: 13.5px; color: rgba(255,255,255,.72); }
.cv-cta__go { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--navy); transition: transform .25s var(--ease); }
.cv-cta:hover .cv-cta__go { transform: translateX(3px); }

/* lista de links */
.cv-links { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.cv-link {
  display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text);
  padding: 12px 14px 12px 12px; border-radius: 18px;
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(11,42,85,.04);
  transition: transform .25s var(--ease), border-color .2s, box-shadow .25s;
}
.cv-link:hover { color: var(--text); transform: translateY(-2px); border-color: rgba(30,90,168,.45); box-shadow: 0 12px 26px rgba(11,42,85,.10); }
.cv-link__icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: var(--navy); background: var(--mist); flex-shrink: 0; transition: background .2s, color .2s; }
.cv-link:hover .cv-link__icon { background: var(--navy); color: #fff; }
.cv-link__text { flex: 1; min-width: 0; display: grid; }
.cv-link__text strong { font-weight: 600; font-size: 16px; color: var(--navy); }
.cv-link__text small { font-size: 13.5px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-link__go { color: var(--sky); transition: transform .25s var(--ease), color .2s; }
.cv-link:hover .cv-link__go { transform: translateX(3px); color: var(--navy); }

.cv-h2 { font-size: 19px; font-weight: 600; color: var(--navy); letter-spacing: -.005em; }

/* atendimento */
.cv-info { margin-top: 26px; padding: 20px 18px 8px; border-radius: 20px; background: #fff; border: 1px solid var(--line); }
.cv-info ul { list-style: none; padding: 0; margin: 12px 0 0; }
.cv-info li { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--navy); }
.cv-info li:first-child { border-top: 0; }
.cv-info li > .ci { margin-top: 2px; }
.cv-info span { display: grid; }
.cv-info strong { font-weight: 600; font-size: 15px; color: var(--text); }
.cv-info small { font-size: 13.5px; color: var(--soft); }
.cv-info small a { font-weight: 600; text-decoration: none; }
.cv-info small a:hover { text-decoration: underline; }

/* artigos */
.cv-reads { margin-top: 26px; }
.cv-reads__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.cv-reads__head a { font-size: 14px; font-weight: 600; text-decoration: none; }
.cv-reads__row {
  display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 -20px; padding: 2px 20px 6px; scroll-padding: 0 20px;
}
.cv-reads__row::-webkit-scrollbar { display: none; }
.cv-read { scroll-snap-align: start; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: grid; transition: transform .25s var(--ease), box-shadow .25s; }
.cv-read:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(11,42,85,.10); }
.cv-read img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.cv-read span { padding: 12px 14px 14px; font-family: var(--serif); font-weight: 600; font-size: 16px; line-height: 1.3; color: var(--navy); }

/* salvar / compartilhar */
.cv-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 26px; }
.cv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 14px; border-radius: 999px; cursor: pointer; text-decoration: none;
  font: 600 15px var(--sans); color: var(--navy); background: transparent;
  border: 1.5px solid var(--navy); transition: background .2s, color .2s;
}
.cv-btn:hover { background: var(--navy); color: #fff; }
.cv-btn--dark { background: var(--navy); color: #fff; }
.cv-btn--sm { padding: 8px 16px; font-size: 14px; }
.cv-actions .cv-btn:only-child { grid-column: 1 / -1; }

/* rodapé */
.cv-foot { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); text-align: center; font-size: 12.5px; color: var(--soft); display: grid; gap: 8px; justify-items: center; }
.cv-foot__legal a, .cv-linklike { color: var(--soft); font: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.cv-dev { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 6px 12px; border-radius: 999px; color: var(--soft); text-decoration: none; font-size: 12px; background: #fff; border: 1px solid var(--line); }
.cv-dev img { height: 18px; width: auto; }
.cv-dev strong { color: var(--navy); font-weight: 600; }
.cv-dev:hover { border-color: var(--brand); color: var(--soft); }

/* aviso / toast / cookies */
.cv-draft { position: sticky; top: 0; z-index: 20; background: #FFF1DC; color: #7a4a00; text-align: center; font-size: 13.5px; padding: 8px 12px; }
.cv-toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 40;
  transform: translateX(-50%); padding: 12px 18px; border-radius: 999px;
  background: var(--navy); color: #fff; font-size: 14.5px; font-weight: 500;
  box-shadow: 0 12px 30px rgba(0,0,0,.3); animation: cv-up .35s var(--ease) both; white-space: nowrap;
}
.cookie { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; max-width: 436px; margin: 0 auto; background: #fff; border-radius: 18px; padding: 16px 18px; box-shadow: 0 20px 50px rgba(0,0,0,.3); font-size: 14px; }
.cookie p { margin-bottom: 12px; }
.cookie__actions { display: flex; gap: 8px; justify-content: flex-end; }
.cookie[hidden], .cv-toast[hidden] { display: none; }

/* entrada suave */
.cv-in { animation: cv-up .7s var(--ease) both; animation-delay: calc(.25s + var(--d, 0s)); }
.cv-links .cv-in { --d: calc(var(--i) * .06s + .2s); }
@keyframes cv-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes cv-zoom { from { transform: scale(1.06); } to { transform: none; } }
@keyframes cv-shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* pré-visualização dentro do painel */
.is-preview .cv { margin: 0; border-radius: 0; box-shadow: none; max-width: none; }
.is-preview .cv-backdrop { display: none; }
