/* Paulo Melo · tokens e componentes compartilhados pelas 4 páginas */
:root {
  --bg: #070A10;
  --bg-2: #0A0F18;
  --surface: #0C1422;
  --surface-2: #0F1B2E;
  --navy: #06264C;
  --navy-line: #1E4A85;
  --line: #1A2638;
  --line-2: #2A3A52;
  --text: #F2F5FA;
  --text-2: #B8C3D3;
  --muted: #8C99AD;
  --soft: #C9D3E1;
  --ice: #B5D4FF;
  --accent: #7DB4FF;
  --ink: #06101F;
  --code-dim: #1A2B45;
  --ok: #7FD6A8;
  --display: 'Barlow Condensed', sans-serif;
  --body: 'Barlow', system-ui, sans-serif;
  --serif: 'Instrument Serif', serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 18px; line-height: 1.55; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: var(--ice); }
input, textarea, button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.band { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.grow { flex: 999 1 520px; min-width: 0; }
.side { flex: 1 1 340px; min-width: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }

/* tipografia */
.eyebrow { margin: 0; font-weight: 600; font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--accent); }
.h1, .h2, .h3 { margin: 0; font-family: var(--display); text-transform: uppercase; }
.h1 { font-weight: 800; font-size: clamp(48px, 7vw, 92px); line-height: .95; letter-spacing: -.01em; }
.h2 { font-weight: 700; font-size: clamp(36px, 4.5vw, 54px); line-height: 1; }
.h3 { font-weight: 700; font-size: 30px; line-height: 1.05; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--accent); white-space: nowrap; }
.h1 .serif { font-size: 1.12em; }
.lead { margin: 0; font-size: 20px; color: var(--text-2); max-width: 580px; }
.muted { color: var(--muted); }
p { margin: 0; }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 14px 26px; border-radius: 10px; font-weight: 600; font-size: 17px; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background-color .25s ease; }
.btn-primary { background: var(--accent); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.28); }
.btn-primary:hover { color: var(--ink); transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 10px 30px -10px rgba(125,180,255,.6); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }
.btn-white { background: #fff; color: var(--ink); }
.btn-white:hover { color: var(--ink); transform: translateY(-2px); }
.btn:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; transform: none; box-shadow: none; }
.btn svg { width: 18px; height: 18px; }

/* cards */
.card { background-color: var(--surface); background-image: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,0) 45%); border: 1px solid var(--line); border-radius: 18px; padding: 30px; display: flex; flex-direction: column; gap: 14px; box-shadow: inset 0 1px 0 rgba(255,255,255,.06); transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease; }
.card:hover { transform: translateY(-6px); border-color: #2E4A72; }
.placeholder { margin-top: auto; aspect-ratio: 16/9; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--line-2); display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* cabeçalho */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(7,10,16,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar nav { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .pm { height: 28px; width: auto; }
.brand .nome { height: 13px; width: auto; }
.navlinks { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; font-size: 15px; font-weight: 500; }
.navlinks a:not(.btn) { color: var(--soft); text-decoration: none; }
.navlinks .btn { min-height: 44px; padding: 10px 18px; font-size: 15px; }

/* fundo de código */
.codebg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; -webkit-mask-image: linear-gradient(180deg, transparent, #000 15%, #000 80%, transparent); mask-image: linear-gradient(180deg, transparent, #000 15%, #000 80%, transparent); }
.codebg .layer { position: absolute; inset: 0; display: flex; gap: 64px; padding: 0 48px; font-family: var(--mono); font-size: 13px; line-height: 26px; color: var(--code-dim); }
.codebg .layer.lit { color: var(--accent); -webkit-mask-image: radial-gradient(300px circle at var(--mx, 70%) var(--my, 40%), #000 0%, transparent 70%); mask-image: radial-gradient(300px circle at var(--mx, 70%) var(--my, 40%), #000 0%, transparent 70%); }
.codebg .col { flex: 0 0 360px; margin: 0; font: inherit; line-height: 26px; white-space: pre; will-change: transform; }
.codebg.off .col { animation-play-state: paused; }
.code-a { animation: codeup 90s linear infinite; }
.code-b { animation: codedown 110s linear infinite; }
.code-c { animation: codeup 130s linear infinite; }
@keyframes codeup { from { transform: translateY(0); } to { transform: translateY(-33.3333%); } }
@keyframes codedown { from { transform: translateY(-33.3333%); } to { transform: translateY(0); } }

/* entrada de página */
@keyframes rise { from { opacity: 0; transform: translateY(.45em); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes fadeup { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(125,180,255,.45); } 100% { box-shadow: 0 0 0 14px rgba(125,180,255,0); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes slide { to { transform: translateX(-50%); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes flow { 0% { left: 0; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
@keyframes strike { from { width: 0; } to { width: 100%; } }
@keyframes spin { to { transform: rotate(360deg); } }
.w { display: inline-block; animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
.in { animation: fadeup .7s cubic-bezier(.2,.7,.2,1) both; }
.pop { animation: pop .6s cubic-bezier(.2,.7,.2,1) both; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; animation: pulse 1.8s ease-out infinite; }
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* formulários */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-weight: 600; }
.input { background: var(--surface); color: var(--text); border: 1px solid var(--line-2); border-radius: 12px; padding: 16px 18px; min-height: 56px; font-size: 19px; width: 100%; }
textarea.input { min-height: 140px; resize: vertical; font-size: 18px; }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.opts.list { grid-template-columns: 1fr; }
.opts.small { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.opt { text-align: left; background: var(--surface); color: var(--text); border: 1px solid var(--line-2); border-radius: 14px; padding: 16px 20px; min-height: 60px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; font-weight: 600; font-size: 18px; transition: transform .2s ease, border-color .2s ease, background-color .2s ease; }
.opt small { font-weight: 400; font-size: 15px; color: var(--muted); }
.opt:hover { border-color: var(--accent); transform: translateY(-2px); }
.opt[aria-pressed="true"] { background: var(--navy); border-color: var(--accent); color: #fff; }
.opt[aria-pressed="true"] small { color: #D2E1F5; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.progress { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .5s cubic-bezier(.6,0,.2,1); }

/* linha do tempo da automação */
.timeline { background: var(--navy); border: 1px solid var(--navy-line); border-radius: 16px; padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.tl { display: flex; align-items: center; gap: 14px; color: #D2E1F5; }
.tl .dot { width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto; border: 2px solid var(--navy-line); border-top-color: var(--accent); animation: spin .9s linear infinite; display: flex; align-items: center; justify-content: center; }
.tl[data-state="done"] { color: #fff; }
.tl[data-state="done"] .dot { border: 0; background: var(--accent); animation: pop .5s cubic-bezier(.2,.7,.2,1) both; }
.tl[data-state="done"] .dot::after { content: ""; width: 10px; height: 6px; border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(-45deg) translate(1px, -1px); }
.tl[data-state="skip"] .dot { animation: none; border-color: var(--navy-line); }
.tl[data-state="wait"] .dot { animation: none; border-color: var(--navy-line); opacity: .5; }

/* FAQ e rodapé */
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
summary { cursor: pointer; font-weight: 600; font-size: 19px; }
details p { margin-top: 12px; color: var(--text-2); }
.foot { border-top: 1px solid var(--line); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; padding-top: 40px; padding-bottom: 40px; font-size: 15px; color: var(--muted); }
.foot a { color: var(--soft); }

/* celular e touch: corta o que pesa na GPU (desfoque, máscara, vidro fosco) */
@media (max-width: 720px), (hover: none) {
  .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(7,10,16,.97); }
  .w { animation-name: fadeup; }
  .codebg { -webkit-mask-image: none; mask-image: none; opacity: .7; }
  .chip { animation: none; }
}

@media (max-width: 720px) {
  .topbar nav { flex-wrap: nowrap; }
  .navlinks a:not(.btn) { display: none; }
  .navlinks .btn { white-space: nowrap; }
  .section { padding: 72px 0; }
}

@media (max-width: 420px) {
  .brand .nome { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
