/* =========================================================
   Uso de Imagem — Site institucional
   Conceito: tela escura ("ambiente digital") com artefatos de
   papel/documento pousados sobre ela — a mesma transformacao que
   o produto promete (consentimento em papel -> prova digital)
   acontece na propria pagina.
   ========================================================= */

/* O site institucional tem identidade propria e sempre clara,
   independente do tema claro/escuro do restante da plataforma. */
body:has(.cd-site) { background-color: #f7f8fc; color: #12141c; }

.cd-site {
  --s-ink: #f7f8fc;
  --s-ink-2: #ffffff;
  --s-ink-3: #eef0f9;
  --s-line: rgba(17,24,39,.09);
  --s-text: #12141c;
  --s-muted: #5c6172;
  --s-paper: #f7f2e7;
  --s-paper-2: #efe8d8;
  --s-paper-ink: #1c1a15;
  --s-indigo: #4f46e5;
  --s-indigo-2: #4338ca;
  --s-indigo-deep: #4338ca;
  --s-verified: #16a34a;
  --s-amber: #b45309;
  --s-panel-1: #171a26;
  --s-panel-2: #10131c;
  --s-panel-line: rgba(255,255,255,.09);
  --s-panel-text: #e9ebf5;
  --s-panel-muted: #9297b0;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-script: 'Caveat', cursive;

  background: var(--s-ink);
  color: var(--s-text);
  font-family: var(--font-body);
  line-height: 1.55;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}
.cd-site * { box-sizing: border-box; }
.cd-site a { color: inherit; }
.cd-site img { max-width: 100%; display: block; }
.cd-site .wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.cd-site section { position: relative; }

/* ---------- Grain + ambient glow (whole page) ---------- */
.cd-site::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .12; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
}
.cd-site > * { position: relative; z-index: 1; }
.cd-site .ambient-glow {
  position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
}
.cd-site .ambient-glow span {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .16;
  animation: cd-drift 22s ease-in-out infinite alternate;
}
.cd-site .ambient-glow span:nth-child(1) { width: 480px; height: 480px; background: var(--s-indigo-deep); top: -160px; left: -80px; }
.cd-site .ambient-glow span:nth-child(2) { width: 380px; height: 380px; background: #a855f7; top: 40px; right: -100px; animation-delay: -8s; }
.cd-site .ambient-glow span:nth-child(3) { width: 320px; height: 320px; background: var(--s-verified); bottom: -140px; left: 30%; opacity: .1; animation-delay: -14s; }
@keyframes cd-drift { to { transform: translate(40px, 50px) scale(1.12); } }

/* ---------- Reveal-on-scroll ---------- */
.cd-site .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.16,.8,.3,1), transform .7s cubic-bezier(.16,.8,.3,1); }
.cd-site .reveal.is-visible { opacity: 1; transform: translateY(0); }
.cd-site .reveal-stagger.is-visible > * { transition-delay: calc(var(--i, 0) * 70ms); }
.cd-site .eyebrow {
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--s-indigo-2); display: inline-flex; align-items: center; gap: .5rem;
}
.cd-site .eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--s-indigo-2); display: inline-block; }
.cd-site h1, .cd-site h2, .cd-site h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; margin: 0; color: var(--s-text); }
.cd-site em { font-style: normal; color: var(--s-indigo-2); }
.cd-site .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.4rem; border-radius: 12px; font-weight: 600; font-size: .92rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.cd-site .btn:not(.magnetic):hover { transform: translateY(-1px); }
.cd-site .btn-primary { background: var(--s-indigo); color: #fff; box-shadow: 0 8px 20px -8px rgba(79,70,229,.55); }
.cd-site .btn-primary:hover { background: var(--s-indigo-2); }
.cd-site .btn-ghost { border-color: var(--s-line); color: var(--s-text); }
.cd-site .btn-ghost:hover { border-color: var(--s-indigo-2); color: var(--s-indigo-2); }
.cd-site .btn-lg { padding: .95rem 1.8rem; font-size: 1rem; }

/* ---------- Nav ---------- */
.cd-site .site-nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(247,248,252,.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--s-line);
}
.cd-site .site-nav .row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem; padding: .85rem 0; }
.cd-site .site-nav .brand { display: flex; align-items: center; justify-self: start; }
.cd-site .site-nav .brand img { height: 30px; width: auto; }
.cd-site .site-nav nav { display: flex; align-items: center; gap: 1.9rem; justify-self: center; }
.cd-site .site-nav nav a:not(.btn) { position: relative; font-size: .89rem; color: var(--s-muted); text-decoration: none; padding-bottom: 4px; white-space: nowrap; }
.cd-site .site-nav nav a:not(.btn):hover { color: var(--s-text); }
.cd-site .site-nav nav a:not(.btn)::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 1.5px; background: var(--s-indigo-2);
  transition: right .25s cubic-bezier(.16,.8,.3,1);
}
.cd-site .site-nav nav a:not(.btn):hover::after { right: 0; }
.cd-site .site-nav .actions { display: flex; align-items: center; gap: .6rem; justify-self: end; }
.cd-site .nav-toggle { display: none; }

/* ---------- Hero ---------- */
.cd-site .hero { padding: 5.5rem 0 4rem; overflow: hidden; }
.cd-site .hero-grid-bg {
  position: absolute; inset: -1px; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(17,24,39,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17,24,39,.07) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(340px circle at var(--mx, 50%) var(--my, 10%), #000 0%, transparent 72%);
  mask-image: radial-gradient(340px circle at var(--mx, 50%) var(--my, 10%), #000 0%, transparent 72%);
  transition: mask-position .05s linear;
}
.cd-site .hero .grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 3.5rem; align-items: center; }
.cd-site .hero .grid > div { min-width: 0; }
.cd-site .hero h1 { font-size: clamp(2.3rem, 4.4vw, 3.6rem); line-height: 1.06; margin: 1.1rem 0 1.3rem; }
.cd-site .hero h1 .glow { color: var(--s-indigo-2); text-shadow: 0 0 26px rgba(79,70,229,.3); }
.cd-site .hero p.lead { font-size: 1.1rem; color: var(--s-muted); max-width: 46ch; margin-bottom: 2rem; }
.cd-site .hero .cta-row { display: flex; gap: .9rem; flex-wrap: wrap; margin-bottom: 2.2rem; }
.cd-site .trust-strip { display: flex; flex-wrap: wrap; gap: 1.5rem 2rem; font-family: var(--font-mono); font-size: .78rem; color: var(--s-muted); }
.cd-site .trust-strip span { display: inline-flex; align-items: center; gap: .45rem; }
.cd-site .trust-strip i { color: var(--s-verified); }

/* ---------- Magnetic buttons ---------- */
.cd-site .magnetic { will-change: transform; transition: transform .18s cubic-bezier(.2,.9,.3,1.3); }

/* ---------- Signature -> hash signature element ---------- */
.cd-site .sig-panel {
  background: linear-gradient(180deg, var(--s-panel-1), var(--s-panel-2)); color: var(--s-panel-text);
  border: 1px solid var(--s-panel-line); border-radius: 20px; padding: 2rem 1.9rem;
  box-shadow: 0 30px 60px -25px rgba(17,24,39,.35); min-width: 0;
}
.cd-site .sig-panel .label { font-family: var(--font-mono); font-size: .72rem; color: var(--s-panel-muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .9rem; }
.cd-site .sig-canvas { width: 100%; height: 92px; }
.cd-site .sig-canvas path {
  fill: none; stroke: #a5a8fb; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 620; stroke-dashoffset: 620; animation: cd-draw 2.1s ease forwards .3s;
}
@keyframes cd-draw { to { stroke-dashoffset: 0; } }
.cd-site .hash-row {
  margin-top: 1.1rem; font-family: var(--font-mono); font-size: .86rem; color: var(--s-panel-text);
  background: rgba(0,0,0,.28); border: 1px solid var(--s-panel-line); border-radius: 10px; padding: .75rem .9rem;
  display: flex; align-items: center; gap: .6rem; overflow: hidden; min-width: 0;
}
.cd-site .hash-row .dots::after { content: ''; }
.cd-site .hash-row .chars { white-space: nowrap; overflow: hidden; border-right: 2px solid #a5a8fb; width: 0; min-width: 0; max-width: 100%; animation: cd-type 1.6s steps(40) 2.3s forwards; }
@keyframes cd-type { to { width: min(40ch, 100%); border-right-color: transparent; } }
.cd-site .verified-badge {
  margin-top: 1rem; display: inline-flex; align-items: center; gap: .5rem; font-size: .82rem; font-weight: 600;
  color: #34d399; opacity: 0; animation: cd-fadein .4s ease 3.9s forwards;
}
@keyframes cd-fadein { to { opacity: 1; } }
.cd-site .verified-badge .dot { width: 20px; height: 20px; border-radius: 50%; background: rgba(52,211,153,.15); display: inline-flex; align-items: center; justify-content: center; font-size: .7rem; }
.cd-site .sig-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin-top: 1.4rem; }
.cd-site .sig-meta div { background: rgba(255,255,255,.04); border: 1px solid var(--s-panel-line); border-radius: 10px; padding: .6rem .7rem; }
.cd-site .sig-meta .k { font-family: var(--font-mono); font-size: .64rem; color: var(--s-panel-muted); text-transform: uppercase; letter-spacing: .08em; }
.cd-site .sig-meta .v { font-size: .84rem; font-weight: 600; margin-top: .15rem; color: var(--s-panel-text); }

/* ---------- Stats strip ---------- */
.cd-site .stats-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--s-line); border-radius: 18px;
  background: var(--s-ink-2); overflow: hidden;
}
.cd-site .stat-cell { padding: 1.6rem 1.4rem; border-right: 1px solid var(--s-line); }
.cd-site .stat-cell:last-child { border-right: none; }
.cd-site .stat-cell .num { font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 700; color: var(--s-text); display: flex; align-items: baseline; gap: .15rem; }
.cd-site .stat-cell .num .suffix { font-size: 1.1rem; color: var(--s-indigo-2); }
.cd-site .stat-cell .k { margin-top: .35rem; font-family: var(--font-mono); font-size: .74rem; color: var(--s-muted); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Section shell ---------- */
.cd-site .section { padding: 5.5rem 0; border-top: 1px solid var(--s-line); }
.cd-site .section-head { max-width: 640px; margin-bottom: 3rem; }
.cd-site .section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-top: .8rem; }
.cd-site .section-head p { color: var(--s-muted); margin-top: .9rem; font-size: 1.02rem; }

/* ---------- Paper contrast strip (problem/solution) ---------- */
.cd-site .contrast { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.cd-site .contrast .card { border-radius: 18px; padding: 2rem; position: relative; overflow: hidden; }
.cd-site .contrast .before { background: var(--s-paper); color: var(--s-paper-ink); transform: rotate(-.6deg); box-shadow: 0 25px 45px -20px rgba(0,0,0,.5); }
.cd-site .contrast .before .tag { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #8a6a2f; }
.cd-site .contrast .before h3 { font-family: var(--font-body); font-weight: 700; margin: .6rem 0 .9rem; font-size: 1.2rem; color: var(--s-paper-ink); }
.cd-site .contrast .before ul { margin: 0; padding-left: 1.1rem; color: #4a4536; font-size: .92rem; }
.cd-site .contrast .before ul li { margin-bottom: .45rem; }
.cd-site .contrast .before .scribble { position: absolute; right: -10px; bottom: -14px; font-family: var(--font-script); font-size: 3.4rem; color: rgba(28,26,21,.12); }
.cd-site .contrast .after { background: linear-gradient(155deg, var(--s-panel-1), var(--s-panel-2)); border: 1px solid var(--s-panel-line); box-shadow: 0 25px 45px -22px rgba(17,24,39,.4); }
.cd-site .contrast .after .tag { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #34d399; }
.cd-site .contrast .after h3 { margin: .6rem 0 .9rem; font-size: 1.2rem; color: var(--s-panel-text); }
.cd-site .contrast .after ul { margin: 0; padding-left: 1.1rem; color: var(--s-panel-muted); font-size: .92rem; }
.cd-site .contrast .after ul li { margin-bottom: .45rem; }
.cd-site .contrast .after li i { color: #34d399; margin-right: .4rem; }

/* ---------- Feature bento grid ---------- */
.cd-site .feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 168px; gap: 1.1rem; }
.cd-site .feature-card {
  position: relative; background: var(--s-ink-2); border: 1px solid var(--s-line); border-radius: 18px; padding: 1.5rem 1.4rem;
  transition: border-color .18s ease, transform .12s ease; transform-style: preserve-3d; will-change: transform;
  display: flex; flex-direction: column; overflow: hidden;
}
.cd-site .feature-card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; opacity: 0; transition: opacity .25s ease;
  background: radial-gradient(220px circle at var(--mx,50%) var(--my,50%), rgba(124,127,244,.18), transparent 65%);
}
.cd-site .feature-card:hover { border-color: rgba(124,127,244,.5); }
.cd-site .feature-card:hover::before { opacity: 1; }
.cd-site .feature-card.big { grid-column: span 2; grid-row: span 2; }
.cd-site .feature-card .icon {
  width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  background: rgba(124,127,244,.14); color: var(--s-indigo-2); font-size: 1.15rem; margin-bottom: 1rem; flex-shrink: 0;
}
.cd-site .feature-card.big .icon { width: 50px; height: 50px; font-size: 1.4rem; }
.cd-site .feature-card h3 { font-size: 1.03rem; margin-bottom: .5rem; }
.cd-site .feature-card.big h3 { font-size: 1.3rem; }
.cd-site .feature-card p { color: var(--s-muted); font-size: .89rem; margin: 0; }
.cd-site .feature-card.big .mini-hash {
  margin-top: auto; padding-top: 1rem; font-family: var(--font-mono); font-size: .74rem; color: var(--s-indigo-2);
  border-top: 1px dashed var(--s-line); padding-top: .9rem; display: flex; align-items: center; gap: .4rem;
}

/* ---------- How it works ---------- */
.cd-site .steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; counter-reset: step; }
.cd-site .step { position: relative; padding-top: 2.6rem; }
.cd-site .step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-size: .85rem; color: var(--s-indigo-2);
  border: 1px solid var(--s-line); border-radius: 8px; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  position: absolute; top: 0; left: 0; background: var(--s-ink-2);
}
.cd-site .step h3 { font-size: 1rem; margin-bottom: .5rem; }
.cd-site .step p { color: var(--s-muted); font-size: .89rem; margin: 0; }
.cd-site .steps-line { position: relative; }
.cd-site .steps-line::before {
  content: ''; position: absolute; top: 19px; left: 6%; right: 6%; height: 1px; background: var(--s-line); z-index: -1;
}

/* ---------- Templates marquee ---------- */
.cd-site .marquee {
  overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.cd-site .marquee-track { display: flex; width: max-content; gap: .6rem; animation: cd-marquee 32s linear infinite; }
.cd-site .marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes cd-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.cd-site .tpl-chip {
  font-size: .84rem; padding: .5rem .9rem; border-radius: 999px; border: 1px solid var(--s-line);
  background: var(--s-ink-2); color: var(--s-muted); display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
}
.cd-site .tpl-chip i { color: var(--s-amber); font-size: .8rem; }

/* ---------- Security / proof section ---------- */
.cd-site .proof-panel {
  background: var(--s-paper); color: var(--s-paper-ink); border-radius: 22px; padding: 2.6rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.55);
}
.cd-site .proof-panel > div { min-width: 0; }
.cd-site .cert-card .row { min-width: 0; }
.cd-site .cert-card .row .v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: .75rem; min-width: 0; }
.cd-site .proof-panel .eyebrow { color: #8a6a2f; }
.cd-site .proof-panel .eyebrow::before { background: #8a6a2f; }
.cd-site .proof-panel h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: .7rem 0 1rem; color: var(--s-paper-ink); }
.cd-site .proof-panel p { color: #5c5646; }
.cd-site .proof-list { list-style: none; margin: 1.3rem 0 0; padding: 0; display: grid; gap: .7rem; }
.cd-site .proof-list li { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; color: #3a3628; }
.cd-site .proof-list li i { color: #1f7a4d; margin-top: .2rem; }
.cd-site .cert-card {
  background: #fff; border: 1.5px solid rgba(28,26,21,.16); border-radius: 14px; padding: 1.4rem 1.5rem;
  font-family: var(--font-mono); font-size: .78rem; color: #4a4536;
}
.cd-site .cert-card .row { display: flex; justify-content: space-between; padding: .45rem 0; border-bottom: 1px dashed rgba(28,26,21,.14); }
.cd-site .cert-card .row:last-child { border-bottom: none; }
.cd-site .cert-card .row .k { color: #8a6a2f; }
.cd-site .cert-card .row .v { font-weight: 600; }

/* ---------- CTA band ---------- */
.cd-site .cta-band {
  border-radius: 24px; padding: 3.5rem 3rem; text-align: center;
  background: radial-gradient(circle at 30% 20%, rgba(124,127,244,.22), transparent 60%), var(--s-ink-2);
  border: 1px solid var(--s-line);
}
.cd-site .cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 1rem; }
.cd-site .cta-band p { color: var(--s-muted); max-width: 46ch; margin: 0 auto 1.8rem; }

/* ---------- Site footer nav (above shared .cd-footer) ---------- */
.cd-site .site-foot { padding: 3rem 0 1rem; border-top: 1px solid var(--s-line); }
.cd-site .site-foot .row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem; }
.cd-site .site-foot .brand img { height: 26px; }
.cd-site .site-foot nav { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.cd-site .site-foot nav a { font-size: .85rem; color: var(--s-muted); text-decoration: none; }
.cd-site .site-foot nav a:hover { color: var(--s-text); }
.cd-site ~ .cd-footer, body:has(.cd-site) .cd-footer { background: var(--s-ink, #f7f8fc); color: #5c6172; border-top: 1px solid rgba(17,24,39,.09); }

@media (max-width: 992px) {
  .cd-site .hero .grid { grid-template-columns: 1fr; }
  .cd-site .feature-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; }
  .cd-site .feature-card.big { grid-column: span 2; grid-row: auto; }
  .cd-site .steps { grid-template-columns: repeat(2, 1fr); }
  .cd-site .contrast { grid-template-columns: 1fr; }
  .cd-site .proof-panel { grid-template-columns: 1fr; }
  .cd-site .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .cd-site .stat-cell:nth-child(2) { border-right: none; }
}
@media (max-width: 640px) {
  .cd-site .site-nav nav { display: none; }
  .cd-site .feature-grid { grid-template-columns: 1fr; }
  .cd-site .feature-card.big { grid-column: auto; }
  .cd-site .steps { grid-template-columns: 1fr; }
  .cd-site .steps-line::before { display: none; }
  .cd-site .hero { padding: 3rem 0 2.5rem; }
  .cd-site .cta-band { padding: 2.5rem 1.6rem; }
  .cd-site .stats-strip { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .cd-site .sig-canvas path, .cd-site .hash-row .chars, .cd-site .verified-badge { animation: none !important; stroke-dashoffset: 0 !important; width: 40ch !important; opacity: 1 !important; border-right: none !important; }
  .cd-site .reveal { opacity: 1 !important; transform: none !important; }
  .cd-site .marquee-track { animation: none !important; }
  .cd-site .ambient-glow span { animation: none !important; }
  .cd-site .magnetic { transition: none !important; }
}
