/* =========================================================
   InvesteFácil — Landing Page (inicio.css)
   Tokens + base + hero + seções principais.
   Carregue ANTES do inicio-secoes.css.
   ========================================================= */

:root {
  /* Fontes */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Cores (monocromático) */
  --bg: #f7f7f8;
  --surface: #ffffff;
  --soft: #f1f1f3;
  --text: #111113;
  --text-strong: #0a0a0b;
  --text-muted: #6b6b76;
  --border: #e6e6ea;
  --border-strong: #cfcfd6;
  --ink: #111113;

  /* Ganho / perda (só para patrimônio) */
  --color-positive: #0f8f52;
  --color-negative: #d1342e;
  --bg-positive-soft: #e8f6ee;
  --bg-negative-soft: #fdecea;

  /* Raios */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Sombras */
  --shadow-xs: 0 1px 2px rgba(17, 17, 19, 0.05);
  --shadow-sm: 0 2px 8px rgba(17, 17, 19, 0.06);
  --shadow-md: 0 8px 24px rgba(17, 17, 19, 0.08);
  --shadow-lg: 0 20px 50px rgba(17, 17, 19, 0.10);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 68px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
img { max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }
main { position: relative; z-index: 1; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 32px);
}

/* ---------- Fundo decorativo ---------- */
.bg-decor { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg-decor .grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.35;
  -webkit-mask-image: radial-gradient(ellipse at 50% 20%, #000 20%, transparent 70%);
          mask-image: radial-gradient(ellipse at 50% 20%, #000 20%, transparent 70%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5; }
.blob-1 { width: 380px; height: 380px; background: #e4e4ea; top: -100px; left: -80px; }
.blob-2 { width: 320px; height: 320px; background: #ececf1; top: 30%; right: -100px; }
.blob-3 { width: 340px; height: 340px; background: #e8e8ee; bottom: -120px; left: 30%; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, .burger:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.btn-primary { background: var(--ink); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { box-shadow: var(--shadow-md); background: #000; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--soft); }
.btn-link { background: transparent; color: var(--text-muted); padding: 10px 12px; }
.btn-link:hover { color: var(--text); transform: none; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { box-shadow: var(--shadow-md); }
.btn-lg { padding: 14px 26px; font-size: 1rem; }
.arrow { transition: transform 0.18s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 247, 248, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
          backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-xs);
  background: rgba(255, 255, 255, 0.86);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.125rem; letter-spacing: -0.01em; }
.logo-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
}
.logo-mark svg { width: 18px; height: 18px; }
.logo-text span { color: var(--text-muted); font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 6px; }

/* Hamburger */
.burger {
  display: none;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0;
}
.burger span, .burger span::before, .burger span::after {
  display: block;
  width: 18px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.burger span { position: relative; }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; }
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.burger[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* Menu mobile */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px clamp(18px, 4vw, 32px) 20px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--border);
}
.mobile-menu.is-open { display: flex; }
.mobile-menu .btn-link { justify-content: flex-start; padding: 12px 6px; }
.m-link { padding: 12px 6px; font-weight: 600; color: var(--text-muted); }
.m-link:hover { color: var(--text); }
.m-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }

/* ---------- Animações de entrada ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal-scale { opacity: 0; transform: translateY(14px) scale(0.97); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible, .reveal-scale.is-visible { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(48px, 8vw, 96px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-text h1 {
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--text-strong);
}
.brand-accent { color: var(--text-muted); }
.lead { margin-top: 18px; font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); color: var(--text-muted); max-width: 52ch; }
.hero-ctas { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.hero-note li { display: inline-flex; align-items: center; gap: 7px; font-size: 0.875rem; color: var(--text-muted); }
.hero-note svg { width: 15px; height: 15px; color: var(--color-positive); }

/* ---------- Card do dashboard ---------- */
.stats-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: clamp(20px, 3vw, 30px);
}
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-live { display: flex; align-items: center; gap: 8px; }
.card-label { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.card-value {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-positive);
  box-shadow: 0 0 0 0 rgba(15, 143, 82, 0.5);
  animation: pulse-up 1.8s infinite;
}
.live-dot.is-down { background: var(--color-negative); animation-name: pulse-down; }
@keyframes pulse-up   { 70% { box-shadow: 0 0 0 8px rgba(15, 143, 82, 0); } 100% { box-shadow: 0 0 0 0 rgba(15, 143, 82, 0); } }
@keyframes pulse-down { 0% { box-shadow: 0 0 0 0 rgba(209, 52, 46, 0.5); } 70% { box-shadow: 0 0 0 8px rgba(209, 52, 46, 0); } 100% { box-shadow: 0 0 0 0 rgba(209, 52, 46, 0); } }

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.badge-status svg { width: 14px; height: 14px; transition: transform 0.3s var(--ease); }
.val-positive { color: var(--color-positive); background: var(--bg-positive-soft); }
.val-negative { color: var(--color-negative); background: var(--bg-negative-soft); }

/* Gráfico */
.chart { margin-top: 24px; }
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 150px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--border);
}
.bar {
  flex: 1;
  height: var(--h, 50%);
  min-height: 6px;
  border-radius: 6px 6px 2px 2px;
  transform-origin: bottom;
  animation: bar-grow 0.8s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 55ms + 250ms);
}
.bar-up { background: linear-gradient(180deg, #34b27b, var(--color-positive)); }
.bar-down { background: linear-gradient(180deg, #e8645f, var(--color-negative)); }
@keyframes bar-grow { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
.chart-x { display: flex; gap: 6px; margin-top: 8px; }
.chart-x span { flex: 1; text-align: center; font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-muted); }

.mini-stats { margin-top: 22px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mini { padding: 12px; background: var(--soft); border: 1px solid var(--border); border-radius: var(--radius-md); }
.mini .k { font-size: 0.6875rem; color: var(--text-muted); }
.mini .v { margin-top: 4px; font-family: var(--font-mono); font-size: 0.875rem; font-weight: 600; color: var(--text-strong); font-variant-numeric: tabular-nums; }

/* ---------- Seções ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-alt { background: rgba(255, 255, 255, 0.7); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 720px; margin: 0 auto clamp(32px, 5vw, 52px); text-align: center; }
.section-title {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.015em;
  color: var(--text-strong);
}
.section-sub { margin-top: 14px; color: var(--text-muted); font-size: clamp(1rem, 1.3vw, 1.0625rem); }

/* Cards de recursos */
.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 28px);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.feature-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--radius-md);
  background: var(--soft);
  border: 1px solid var(--border);
  color: var(--text);
}
.feature-icon svg { width: 21px; height: 21px; }
.feature h3 { margin-top: 18px; font-size: 1.125rem; font-weight: 700; }
.feature > p { margin-top: 8px; font-size: 0.9375rem; color: var(--text-muted); }

/* Passos */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 30px); }
.step-num { font-family: var(--font-mono); font-size: 0.875rem; font-weight: 600; color: var(--text-muted); }
.step h3 { margin-top: 14px; font-size: 1.125rem; font-weight: 700; }
.step > p:last-child { margin-top: 8px; font-size: 0.9375rem; color: var(--text-muted); }

/* Destaque escuro */
.spotlight {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: clamp(36px, 7vw, 76px) clamp(24px, 5vw, 64px);
}
.spotlight-inner { position: relative; z-index: 1; max-width: 560px; }
.spotlight h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.015em; }
.spotlight p { margin: 14px 0 26px; color: rgba(255, 255, 255, 0.72); font-size: 1.0625rem; }
.spot-bars {
  position: absolute;
  right: clamp(16px, 5vw, 56px);
  bottom: 0;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 70%;
  opacity: 0.18;
}
.spot-bars i { display: block; width: clamp(14px, 3vw, 30px); height: var(--h); background: #fff; border-radius: 6px 6px 0 0; }

/* CTA final */
.cta-final {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: clamp(32px, 6vw, 64px) clamp(20px, 4vw, 48px);
}
.cta-final h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.cta-final p { margin: 12px auto 26px; max-width: 520px; color: var(--text-muted); }

/* ---------- Responsividade ---------- */
@media (max-width: 1000px) {
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .header-actions { display: none; }
  .burger { display: inline-flex; }
  .hero-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cards-grid { grid-template-columns: 1fr; }
  .mini-stats { grid-template-columns: 1fr; }
  .hero-ctas .btn { width: 100%; }
  .chart-bars { height: 120px; }
}

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-scale { opacity: 1; transform: none; transition: none; }
  .bar, .live-dot { animation: none; }
}
