/*
 * Loop Vida — site de marketing. Layout, componentes e movimento.
 * Tokens em tokens.css (espelho de src/theme). Mobile-first.
 */

/* ---------- reset básico ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { list-style: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--bordo); outline-offset: 3px; border-radius: 4px; }

/* ---------- tipografia ---------- */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.04; letter-spacing: -0.02em; }
h2 { font-size: var(--text-h2); font-weight: 800; }
h3 { font-size: var(--text-h3); font-weight: 800; }
.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
.money { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

.eyebrow {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bordo);
  margin-bottom: 14px;
}
.lead, .band-lead {
  font-size: var(--text-lead);
  color: var(--muted);
  max-width: 34em;
}

/* ---------- botões ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, var(--bordo-hi), var(--bordo-lo));
  box-shadow: 0 6px 18px rgba(148, 31, 57, 0.28);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-light {
  color: var(--bordo-lo);
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.btn-nav { padding: 10px 20px; font-size: 0.92rem; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(251, 247, 240, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.nav.is-scrolled { border-bottom-color: var(--stroke); box-shadow: 0 4px 24px rgba(43, 38, 32, 0.05); }
.nav-inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
  color: var(--bordo);
}
.nav-wordmark em { font-style: normal; color: var(--oliva); }
.nav-links { display: none; gap: 24px; margin-left: auto; }
.nav-links a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--muted);
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav .btn-nav { margin-left: auto; }

@media (min-width: 860px) {
  .nav-links { display: flex; }
  .nav .btn-nav { margin-left: 0; }
}

/* ---------- hero ---------- */
.hero { padding: calc(76px + clamp(40px, 8vw, 96px)) 0 0; overflow: hidden; }
.hero-inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--band-y);
  display: grid;
  gap: 56px;
  align-items: center;
}
@media (min-width: 960px) {
  .hero-inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
}

.hero-title {
  font-size: var(--text-hero);
  font-weight: 900;
  display: flex;
  flex-direction: column;
  margin: 8px 0 22px;
}
.hero-line { display: block; }
.hero-line-entra { color: var(--oliva); }
.hero-line-organiza { color: var(--ink); }
.hero-line-sobra { color: var(--bordo); }

/* o laço desenhado à mão em volta de "Sobra." — assinatura da marca Loop */
.loop-word { position: relative; display: inline-block; padding: 0 0.12em; }
.loop-word em { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.loop-stroke {
  position: absolute;
  inset: -14% -10% -18% -8%;
  width: 118%;
  height: 132%;
  overflow: visible;
  pointer-events: none;
}
.loop-stroke path {
  fill: none;
  stroke: var(--areia);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: loop-draw 1.3s cubic-bezier(0.6, 0, 0.3, 1) 0.5s forwards;
}
@keyframes loop-draw { to { stroke-dashoffset: 0; } }

.hero-copy .waitlist { margin-top: 30px; }
.hero-note { margin-top: 12px; font-size: var(--text-small); color: var(--faint); }

/* formulário waitlist */
.waitlist { display: flex; flex-wrap: wrap; gap: 12px; position: relative; max-width: 520px; }
.waitlist-input {
  flex: 1 1 240px;
  font: inherit;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--stroke-strong);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.waitlist-input::placeholder { color: var(--faint); }
.waitlist-input:focus { outline: none; border-color: var(--bordo); box-shadow: 0 0 0 4px var(--bordo-soft); }
.waitlist-msg { flex-basis: 100%; font-size: var(--text-small); font-weight: 500; min-height: 1.4em; }
.waitlist-msg.is-ok { color: var(--oliva); }
.waitlist-msg.is-error { color: var(--tijolo); }
.waitlist.is-busy .btn { opacity: 0.65; pointer-events: none; }
.waitlist-center { margin: 34px auto 0; justify-content: center; }

/* ---------- mockup do celular ---------- */
.hero-visual { position: relative; min-height: 560px; }
.phone {
  width: min(330px, 82vw);
  margin: 0 auto;
  background: var(--ink);
  border-radius: 46px;
  padding: 12px;
  box-shadow: var(--shadow-lift);
}
.phone-screen {
  background: var(--paper);
  border-radius: 36px;
  padding: 26px 20px 30px;
  min-height: 520px;
}
.phone-greet { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.phone-hello { font-family: var(--font-serif); font-style: italic; font-size: 1.25rem; }
.phone-spark { color: var(--areia); font-style: normal; }
.phone-balance {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.phone-balance-label { display: block; font-size: 0.8rem; color: var(--muted); }
.phone-balance-value {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.1rem;
  letter-spacing: -0.02em;
  color: var(--oliva);
  margin: 2px 0 16px;
}
.comp-bar { display: flex; gap: 3px; height: 10px; border-radius: 6px; overflow: hidden; }
.comp { display: block; height: 100%; border-radius: 6px; }
.comp-oliva { background: var(--oliva); }
.comp-areia { background: var(--areia); }
.comp-bordo { background: var(--bordo); }
.comp-legend { display: flex; gap: 14px; margin-top: 12px; font-size: 0.74rem; color: var(--muted); }
.comp-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-oliva { background: var(--oliva); }
.dot-areia { background: var(--areia); }
.dot-bordo { background: var(--bordo); }

.phone-list { margin-top: 18px; display: flex; flex-direction: column; gap: 6px; }
.phone-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
}
.row-icon {
  width: 36px; height: 36px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.row-icon-in { background: var(--oliva-soft); color: var(--oliva); }
.row-icon-out { background: var(--tijolo-soft); color: var(--tijolo); }
.row-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.row-text strong { font-weight: 600; font-size: 0.93rem; }
.row-text small { color: var(--faint); font-size: 0.76rem; }
.row-amount { margin-left: auto; font-weight: 600; font-size: 0.93rem; white-space: nowrap; }
.is-in { color: var(--oliva); }
.is-out { color: var(--tijolo); }

/* cartões flutuantes */
.float-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 16px;
  box-shadow: var(--shadow-lift);
}
.chip-goal { top: 8%; right: max(0px, calc(50% - 260px)); }
.chip-income { bottom: 1%; left: max(0px, calc(50% - 292px)); }
.chip-text { display: flex; flex-direction: column; line-height: 1.3; }
.chip-text strong { font-weight: 600; font-size: 0.92rem; }
.chip-text small { color: var(--muted); font-size: 0.78rem; }
.chip-badge {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
}
.chip-badge-oliva { background: var(--oliva-soft); color: var(--oliva); }

/* anel de progresso */
.ring { width: 44px; height: 44px; transform: rotate(-90deg); flex-shrink: 0; }
.ring-lg { width: 72px; height: 72px; }
.ring-bg { fill: none; stroke: var(--areia-inset); stroke-width: 6; }
.ring-fg { fill: none; stroke: var(--bordo); stroke-width: 6; stroke-linecap: round; }

/* ---------- bandas ---------- */
.band { padding: var(--band-y) 0; }
.band-inner { max-width: var(--content); margin: 0 auto; padding: 0 var(--gutter); }
.band-deep { background: var(--paper-deep); }

/* ciclo */
.band-cycle { text-align: center; background: var(--paper-deep); }
.band-cycle .band-lead { margin: 18px auto 0; }
.cycle {
  margin-top: 48px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 18px;
}
.cycle li { display: flex; flex-direction: column; gap: 6px; }
.cycle small { color: var(--faint); font-size: 0.8rem; }
.cycle-step {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.step-oliva { color: var(--oliva); }
.step-ink { color: var(--ink); }
.step-bordo { color: var(--bordo); }
.step-areia { color: #a06f38; }
.cycle-arrow { color: var(--areia); font-size: 1.5rem; font-weight: 700; }

/* ---------- features + fio do dinheiro ---------- */
.features-wrap { position: relative; }
.thread {
  position: absolute;
  inset: 0 auto 0 max(6px, calc(50% - 660px));
  width: 120px;
  height: 100%;
  pointer-events: none;
  display: none;
}
.thread-path {
  fill: none;
  stroke: var(--areia);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 8 14; /* pontilhado que remete ao traço do símbolo */
}
@media (min-width: 1240px) { .thread { display: block; } }

.feature {
  display: grid;
  gap: 44px;
  align-items: center;
}
@media (min-width: 900px) {
  .feature { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 72px; }
  .feature-flip .feature-copy { order: 2; }
  .feature-flip .feature-visual { order: 1; }
}
.feature-copy p { color: var(--muted); margin-top: 16px; max-width: 32em; }
.feature-points { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.feature-points li {
  position: relative;
  padding-left: 28px;
  font-weight: 500;
}
.feature-points li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--oliva);
  font-weight: 700;
}

.mini-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-lift);
  max-width: 420px;
  margin: 0 auto;
}
.mini-card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}
.budget-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 16px;
}
.budget-row small { color: var(--faint); font-weight: 400; }
.meter { height: 9px; border-radius: 6px; background: var(--areia-inset); margin-top: 8px; overflow: hidden; }
.meter-fill { display: block; height: 100%; border-radius: 6px; }
.fill-oliva { background: var(--oliva); }
.fill-areia { background: var(--areia); }
.fill-warn { background: var(--tijolo); }

.mini-card-goal { text-align: center; }
.mini-card-goal .ring-lg { margin: 4px auto 14px; }
.goal-name { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; }
.goal-amount { color: var(--muted); margin-top: 4px; }
.goal-amount small { color: var(--faint); }
.goal-eta { margin-top: 14px; font-size: 0.92rem; color: var(--muted); }
.goal-eta strong { color: var(--oliva); }

.sankey { width: 100%; height: auto; }
.sankey-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  fill: #fff;
}

/* ---------- faixa IA (única superfície violeta do site) ---------- */
.band-ai {
  background:
    radial-gradient(720px 380px at 12% 0%, var(--ai-soft), transparent 65%),
    radial-gradient(720px 420px at 95% 100%, var(--ai-soft), transparent 60%),
    var(--paper);
  border-top: 1px solid var(--ai-stroke);
  border-bottom: 1px solid var(--ai-stroke);
}
.eyebrow-ai { color: var(--ai); }
.band-ai h2 em { color: var(--ai); }
.chat-card {
  background: var(--surface);
  border: 1px solid var(--ai-stroke);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: 0 12px 34px rgba(110, 77, 199, 0.14);
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chat-q {
  align-self: flex-end;
  background: var(--areia-inset);
  border-radius: 18px 18px 4px 18px;
  padding: 12px 16px;
  font-weight: 500;
  font-size: 0.95rem;
  max-width: 85%;
}
.chat-a {
  align-self: flex-start;
  background: var(--ai-soft);
  border: 1px solid var(--ai-stroke);
  border-radius: 18px 18px 18px 4px;
  padding: 14px 16px;
  font-size: 0.95rem;
  max-width: 92%;
}
.chat-a strong { color: var(--ai); }
.chat-spark { color: var(--ai); margin-right: 4px; }

/* ---------- confiança ---------- */
.trust-grid {
  display: grid;
  gap: 20px;
  margin-top: 44px;
}
@media (min-width: 820px) { .trust-grid { grid-template-columns: repeat(3, 1fr); } }
.trust-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-card);
}
.trust-card h3 { margin-bottom: 10px; }
.trust-card p { color: var(--muted); font-size: 0.97rem; }

/* ---------- CTA final ---------- */
.band-cta {
  background: linear-gradient(160deg, var(--bordo-hi), var(--bordo-lo));
  color: #fff;
  text-align: center;
}
.band-cta h2 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); }
.band-cta h2 em { color: var(--areia); }
.band-cta .band-lead { color: rgba(255, 255, 255, 0.82); margin: 18px auto 0; }
.band-cta .waitlist-input { border-color: transparent; }
.band-cta .waitlist-input:focus { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25); border-color: #fff; }
.band-cta .waitlist-msg.is-ok { color: #ffe9c9; }
.band-cta .waitlist-msg.is-error { color: #ffd2c9; }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: rgba(251, 247, 240, 0.8); padding: 56px 0; }
.footer-inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px 40px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer .nav-wordmark { color: #fff; }
.footer .nav-wordmark em { color: var(--areia); }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a {
  text-decoration: none;
  font-size: 0.92rem;
  color: rgba(251, 247, 240, 0.65);
  transition: color 0.15s ease;
}
.footer-links a:hover { color: #fff; }
.footer-note { margin-left: auto; font-size: var(--text-small); color: rgba(251, 247, 240, 0.5); }

/* ---------- movimento (reveal + parallax) ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1); }
.reveal.is-visible { opacity: 1; transform: none; }

[data-parallax] { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .loop-stroke path { animation: none; stroke-dashoffset: 0; }
  [data-parallax] { transform: none !important; }
  .btn, .nav-links a, .footer-links a { transition: none; }
}
