/* =====================================================================
   motion.css — base visual dos "sites motion" (Consig Invest)
   Zero build. Tudo por variáveis: troque as cores/fontes no :root e pronto.
   Convenções: tokens → base → componentes → utilitários de motion.
   ===================================================================== */

/* ---------- 1. TOKENS (edite aqui) ---------- */
:root {
  /* fontes: 1 display (títulos) + 1 texto. Google Fonts carregadas no <head>. */
  --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* paleta escura (padrão "cinema") */
  --bg: #0a0a0a;
  --bg-2: #121212;
  --fg: #ffffff;
  --muted: rgba(255, 255, 255, .62);
  --faint: rgba(255, 255, 255, .38);
  --line: rgba(255, 255, 255, .12);
  --glass: rgba(255, 255, 255, .06);
  --accent: #f2b544;          /* cor de destaque (botões, marcações) — troque por cliente; evite preto+verde-ácido e roxo genérico */
  --accent-ink: #0a0a0a;      /* texto em cima do accent */
  --accent-2: #8fd3c7;        /* segunda cor (gradientes) */

  /* forma e ritmo */
  --radius: 22px;
  --radius-sm: 12px;
  --pill: 999px;
  --container: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --section: clamp(88px, 14vw, 168px);

  /* motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);      /* "expo out" — entrada elegante */
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dur: .9s;
  --marquee-dur: 28s;
}

/* tema claro: adicione data-theme="light" no <html> */
html[data-theme="light"] {
  --bg: #f6f4ef;
  --bg-2: #ffffff;
  --fg: #111111;
  --muted: rgba(17, 17, 17, .64);
  --faint: rgba(17, 17, 17, .42);
  --line: rgba(17, 17, 17, .12);
  --glass: rgba(255, 255, 255, .55);
  --accent: #111111;
  --accent-ink: #ffffff;
  --accent-2: #b08d57;
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
::selection { background: rgba(255, 255, 255, .22); }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.02; letter-spacing: -.02em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* tipografia display */
.display   { font-family: var(--font-display); font-size: clamp(2.8rem, 8.5vw, 7.5rem); }
.display-2 { font-family: var(--font-display); font-size: clamp(2.2rem, 5.6vw, 4.6rem); }
.display-3 { font-family: var(--font-display); font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
.display em, .display-2 em, .display-3 em { font-style: italic; color: var(--muted); }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.3rem); color: var(--muted); max-width: 42ch; }
.label {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--faint);
}
.label::before { content: '/ '; }
.gradient-text {
  background: linear-gradient(180deg, var(--fg) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* layout */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: var(--section); position: relative; }
.section + .section { padding-top: 0; }
.grid-2 { display: grid; gap: clamp(24px, 4vw, 56px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; }
.grid-3 { display: grid; gap: clamp(16px, 2vw, 28px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.bento { display: grid; gap: 16px; grid-template-columns: repeat(6, 1fr); }
.bento > * { grid-column: span 6; }
@media (min-width: 760px) {
  .bento > .span-2 { grid-column: span 2; }
  .bento > .span-3 { grid-column: span 3; }
  .bento > .span-4 { grid-column: span 4; }
}
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.between { justify-content: space-between; }
.stack { display: grid; gap: 20px; }
.divider { height: 1px; background: var(--line); }

/* ---------- 3. COMPONENTES ---------- */

/* liquid glass — reutilizado em nav, botões, cards */
.glass {
  position: relative;
  overflow: hidden;
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .12), 0 10px 40px -20px rgba(0, 0, 0, .6);
}
.glass::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.2px;
  background: linear-gradient(180deg, rgba(255,255,255,.45) 0%, rgba(255,255,255,.12) 22%, rgba(255,255,255,0) 45%, rgba(255,255,255,0) 60%, rgba(255,255,255,.12) 82%, rgba(255,255,255,.4) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
html[data-theme="light"] .glass::before { background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(0,0,0,.06) 40%, rgba(0,0,0,.06) 60%, rgba(255,255,255,.9)); }

/* botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: var(--pill);
  font-size: .95rem; font-weight: 500; line-height: 1; white-space: nowrap;
  transition: transform .5s var(--ease-out), background-color .3s, color .3s, opacity .3s;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { opacity: .92; }
.btn-ghost { color: var(--fg); }
.btn-ghost.glass:hover { background: rgba(255, 255, 255, .12); }
.btn-lg { padding: 18px 34px; font-size: 1.05rem; }
.btn .arrow { transition: transform .5s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

/* pill/tag */
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--pill); font-size: .8rem; color: var(--muted); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }

/* nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: center;
  padding: 16px var(--gutter);
  transition: transform .6s var(--ease-out);
}
.nav.is-hidden { transform: translateY(-120%); }
.nav-inner {
  width: min(100%, 1080px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 10px 10px 22px; border-radius: var(--pill);
}
.nav-brand { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: -.01em; }
.nav-links { display: none; gap: 28px; }
.nav-links a { font-size: .92rem; color: var(--muted); transition: color .3s; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--fg); }
.nav-cta { display: none; }
.nav-burger { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.nav-burger span { display: block; width: 20px; height: 2px; background: var(--fg); border-radius: 2px; transition: transform .35s var(--ease-in-out), opacity .3s; }
.nav-burger span + span { margin-top: 5px; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 860px) {
  .nav-links, .nav-cta { display: flex; }
  .nav-burger { display: none; }
}

/* menu mobile (tela cheia) */
.menu {
  position: fixed; inset: 0; z-index: 40;
  display: grid; align-content: center; gap: 12px;
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  opacity: 0; pointer-events: none; transition: opacity .4s;
}
.menu.is-open { opacity: 1; pointer-events: auto; }
.menu a { font-family: var(--font-display); font-size: clamp(2.2rem, 9vw, 3.6rem); line-height: 1.1; opacity: 0; transform: translateY(20px); filter: blur(4px); transition: opacity .45s var(--ease-out), transform .45s var(--ease-out), filter .45s; }
.menu.is-open a { opacity: 1; transform: none; filter: none; }
.menu.is-open a:nth-child(1) { transition-delay: .10s } .menu.is-open a:nth-child(2) { transition-delay: .16s }
.menu.is-open a:nth-child(3) { transition-delay: .22s } .menu.is-open a:nth-child(4) { transition-delay: .28s }
.menu.is-open a:nth-child(5) { transition-delay: .34s } .menu.is-open a:nth-child(6) { transition-delay: .40s }

/* hero */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: clamp(48px, 8vh, 96px); overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media video, .hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 0%, transparent 45%), linear-gradient(to bottom, rgba(0,0,0,.35), transparent 30%); }
.hero-content { position: relative; z-index: 1; }
.hero-bottom { display: grid; gap: 28px; align-items: end; }
@media (min-width: 860px) { .hero-bottom { grid-template-columns: 1.4fr 1fr; } }

/* mídia com cantos e reveal por máscara */
.media { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 16 / 10; background: var(--bg-2); }
.media > img, .media > video { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.media:hover > img, .media:hover > video { transform: scale(1.04); }
.media.is-square { aspect-ratio: 1; }
.media.is-portrait { aspect-ratio: 4 / 5; }

/* card */
.card { position: relative; border-radius: var(--radius); padding: clamp(22px, 3vw, 36px); background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.card.glass { background: var(--glass); border: 0; }
.card h3 { font-size: 1.35rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .98rem; }
.card .num { font-family: var(--font-mono); font-size: .72rem; color: var(--faint); margin-bottom: 18px; }
.card .icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 22px; }
[data-tilt] { transform-style: preserve-3d; will-change: transform; }
[data-tilt] .shine { position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.10), transparent 40%); opacity: 0; transition: opacity .4s; pointer-events: none; }
[data-tilt]:hover .shine { opacity: 1; }

/* marquee */
.marquee { overflow: hidden; white-space: nowrap; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: inline-flex; gap: 48px; padding-right: 48px; animation: marquee var(--marquee-dur) linear infinite; will-change: transform; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: inline-flex; align-items: center; gap: 48px; font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 3rem); color: var(--muted); }
.marquee-item::after { content: '✦'; font-size: .5em; color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* números */
.stat { display: grid; gap: 6px; padding: 26px 0; border-top: 1px solid var(--line); }
.stat b { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1; }
.stat span { color: var(--muted); font-size: .95rem; }

/* depoimentos */
.quote { display: grid; gap: 22px; padding: clamp(24px, 3vw, 40px); border-radius: var(--radius); }
.quote p { font-family: var(--font-display); font-size: clamp(1.25rem, 2vw, 1.7rem); line-height: 1.3; }
.quote .who { display: flex; gap: 14px; align-items: center; font-size: .9rem; color: var(--muted); }
.quote .who img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.stars { color: var(--accent); letter-spacing: .1em; font-size: .85rem; }

/* FAQ (details animado) */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0; cursor: pointer; font-size: 1.1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--font-mono); font-size: 1.3rem; color: var(--faint); transition: transform .4s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-body { color: var(--muted); padding-bottom: 22px; max-width: 70ch; }

/* CTA final */
.cta { text-align: center; padding: clamp(56px, 8vw, 112px) var(--gutter); border-radius: calc(var(--radius) * 1.5); position: relative; overflow: hidden; }
.cta .display-2 { margin-bottom: 20px; }
.cta .row { justify-content: center; margin-top: 28px; }

/* footer */
.footer { padding: 48px 0 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.footer .cols { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 36px; }
.footer a:hover { color: var(--fg); }
.footer .legal { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; font-size: .8rem; color: var(--faint); }
/* símbolo de acessibilidade — exigido pela Lei 13.146/2015 (LBI), art. 63 §1º: "em destaque" */
.a11y-symbol { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.a11y-symbol svg { width: 22px; height: 22px; fill: currentColor; flex: none; }

/* WhatsApp flutuante */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 45;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: #25d366; color: #fff; box-shadow: 0 12px 30px -8px rgba(37, 211, 102, .6);
  transition: transform .5s var(--ease-out);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 28px; height: 28px; }

/* palco: hero preso com cenas de texto trocando (o padrão dos sites premiados) */
.stage { position: relative; height: 100svh; min-height: 100vh; overflow: hidden; display: grid; }
.stage-inner { position: relative; z-index: 1; display: grid; align-content: end; padding-bottom: clamp(56px, 10vh, 120px); width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.stage [data-scene] { grid-area: 1 / 1; will-change: transform, opacity; }
.stage-3d { position: absolute; inset: 0; z-index: 0; }
.stage-3d canvas { width: 100%; height: 100%; display: block; }
/* rótulos de canto, como nos sites de agência */
.corner { position: absolute; z-index: 1; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); }
.corner.tl { top: 96px; left: var(--gutter); } .corner.tr { top: 96px; right: var(--gutter); text-align: right; }
@media (max-width: 860px) { .corner { display: none; } }

/* indicador de rolagem — movimento contínuo no hero, mostra que a página é viva */
.scroll-cue { position: absolute; left: 50%; bottom: 26px; z-index: 2; transform: translateX(-50%); display: grid; justify-items: center; gap: 10px; color: var(--faint); font-family: var(--font-mono); font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; pointer-events: none; }
.scroll-cue i { display: block; width: 1px; height: 46px; background: linear-gradient(to bottom, transparent, var(--fg)); opacity: .5; transform-origin: top; animation: cue 2.4s var(--ease-in-out) infinite; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 0 } 40% { transform: scaleY(1); opacity: .6 } 100% { transform: scaleY(1) translateY(46px); opacity: 0 } }

/* legenda sobre mídia (crédito, aviso do conselho) */
.media figcaption, .media-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 18px; font-size: .72rem; color: var(--muted); background: linear-gradient(to top, rgba(0,0,0,.6), transparent); }

/* iniciais no lugar de foto de depoimento — honesto e sem risco de imagem */
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; font-family: var(--font-mono); font-size: .78rem; letter-spacing: .04em; background: var(--glass); border: 1px solid var(--line); color: var(--accent); }

/* progresso de leitura (barra fina no topo) */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 60; transform-origin: 0 50%; transform: scaleX(0); background: var(--accent); }

/* grão (opcional: <div class="grain"></div> logo após <body>) */
.grain { position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: .05; mix-blend-mode: overlay;
  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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* fundo animado (cole um dos arquivos de /fundos aqui) */
.mbg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
main { position: relative; z-index: 1; }

/* ---------- 4. MOTION (estados iniciais; o JS anima) ---------- */
/* só esconde quando o JS está ativo — sem JS o site aparece inteiro */
html.js [data-reveal] { opacity: 0; }
html.js [data-split] { visibility: hidden; }
.split-mask { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .14em; margin-bottom: -.14em; }
.nav.is-scrolled .nav-inner { background: color-mix(in srgb, var(--bg) 55%, transparent); }
.hscroll { overflow: hidden; }
.hscroll-track { display: flex; gap: clamp(16px, 2vw, 28px); width: max-content; padding-inline: var(--gutter); align-items: stretch; }
.hscroll-track > * { width: min(78vw, 520px); flex: none; }
.split-word, .split-char { display: inline-block; will-change: transform; }
html.js [data-clip] { clip-path: inset(0 0 100% 0); }
.cursor { position: fixed; top: 0; left: 0; z-index: 70; width: 12px; height: 12px; border-radius: 50%; background: var(--fg); pointer-events: none; mix-blend-mode: difference; transform: translate(-50%, -50%); transition: width .3s, height .3s; display: none; }
.cursor.is-active { width: 64px; height: 64px; }
@media (hover: hover) and (pointer: fine) { html.has-cursor .cursor { display: block; } }

/* respeita quem pediu menos movimento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html.js [data-reveal], html.js [data-split], html.js [data-clip] { opacity: 1; visibility: visible; clip-path: none; }
  .marquee-track { animation: none; }
}
