/* ==========================================================================
   Wolffin — núcleo: tokens, base, cabeçalho, rodapé, componentes comuns
   Tokens herdados de DESIGN.md (app mobile) para manter a identidade.
   ========================================================================== */

:root {
  /* Superfícies — o site usa um ground mais profundo que o app para criar
     uma camada abaixo das telas do produto. */
  --ink: #08130d;
  --base: #102216;
  --surface: #1a2c20;
  --surface-2: #233629;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* Marca e semântica */
  --lime: #13ec5b;
  --lime-dark: #0fb845;
  --lime-muted: rgba(19, 236, 91, 0.14);
  --ember: #f87171;
  --violet: #a78bfa;
  --amber: #fb923c;
  --sky: #60a5fa;

  /* Texto */
  --fg: #ffffff;
  --moss: #9db9a6;
  --dim: #5e7a68;

  /* Tipografia */
  --font: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --t--1: 0.8125rem;
  --t-0: 0.9375rem;
  --t-1: 1.0625rem;
  --t-2: 1.375rem;
  --t-3: clamp(1.625rem, 3vw, 2.125rem);
  --t-4: clamp(2rem, 4.6vw, 3.25rem);
  --t-5: clamp(2.6rem, 8.2vw, 5.75rem);

  /* Ritmo */
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --wrap: 1180px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-2xl: 32px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--t-0);
  line-height: 1.6;
  font-feature-settings: 'tnum' 1, 'ss01' 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Grão sutil sobre toda a página: tira o aspecto de gradiente plano. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

::selection { background: var(--lime); color: #06170c; }

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

/* Atalho de teclado: some da tela até receber foco. Sem handler inline,
   porque a CSP do servidor bloqueia script embutido no HTML. */
.skiplink {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
}

.skiplink:focus {
  left: 1rem;
  top: 1rem;
}

/* --------------------------------------------------------------- layout - */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(4.5rem, 11vw, 8.5rem); position: relative; }
.section--tight { padding-block: clamp(3rem, 7vw, 5rem); }

.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, transparent, var(--line-strong) 18%, var(--line-strong) 82%, transparent);
}

/* Título de seção: a numeração aqui é ordinal real (roteiro da página),
   e o texto de apoio fica à direita em telas largas. */
.head {
  display: grid;
  gap: clamp(1rem, 2.5vw, 2.5rem);
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

@media (min-width: 900px) {
  .head { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
}

.head h2 { font-size: var(--t-4); }
.head p { color: var(--moss); font-size: var(--t-1); max-width: 46ch; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--t--1);
  font-weight: 700;
  color: var(--lime);
  letter-spacing: 0.01em;
  margin-bottom: 0.9rem;
}

.kicker::before {
  content: '';
  width: 26px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

/* ---------------------------------------------------------------- botões - */

.btn {
  --btn-bg: var(--lime);
  --btn-fg: #06170c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-weight: 800;
  font-size: var(--t-0);
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, box-shadow 0.3s;
  box-shadow: 0 0 0 rgba(19, 236, 91, 0);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 34px -12px rgba(19, 236, 91, 0.65);
}

.btn:active { transform: translateY(0); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--fg);
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.28);
}

/* ------------------------------------------------------------- cabeçalho - */

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 90;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}

.topbar[data-stuck='true'] {
  background: rgba(8, 19, 13, 0.78);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.topbar__in {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 72px;
}

/* A marca e a propria imagem: o arquivo ja traz simbolo e palavra. */
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex: 0 0 auto;
}

.brand img { height: 34px; width: auto; }

.brand--foot img { height: 56px; }

@media (max-width: 420px) {
  .brand img { height: 28px; }
  .brand--foot img { height: 46px; }
}

.nav {
  display: none;
  margin-left: auto;
  gap: 1.9rem;
  align-items: center;
}

.nav a {
  text-decoration: none;
  color: var(--moss);
  font-size: var(--t-0);
  font-weight: 600;
  transition: color 0.2s;
}

.nav a:hover { color: var(--fg); }

.topbar .btn { padding: 0.65rem 1.1rem; }
.topbar__cta { margin-left: auto; }

@media (min-width: 940px) {
  .nav { display: flex; }
  .topbar__cta { margin-left: 0; }
}

/* Menu compacto: <details> nativo, sem JS. */
.menu { margin-left: auto; }
.menu[open] .menu__panel { display: block; }

.menu__btn {
  list-style: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  cursor: pointer;
}

.menu__btn::-webkit-details-marker { display: none; }

.menu__panel {
  display: none;
  position: absolute;
  right: var(--gutter);
  top: 66px;
  width: min(280px, calc(100vw - 2 * var(--gutter)));
  padding: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
}

.menu__panel a {
  display: block;
  padding: 0.7rem 0.8rem;
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--moss);
  font-weight: 600;
}

.menu__panel a:hover { background: var(--surface-2); color: var(--fg); }

@media (min-width: 940px) { .menu { display: none; } }

/* ---------------------------------------------------- trilho de meses ---- */
/* A espinha da página é um ano: cada tique é um mês, e o preenchimento
   acompanha a rolagem. O app organiza a vida financeira por mês; a
   navegação da página faz o mesmo. */

.yearrail {
  display: none;
  position: fixed;
  left: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  width: 46px;
  pointer-events: none;
}

.yearrail__track {
  position: relative;
  width: 1px;
  height: 46vh;
  margin-left: 13px;
  background: var(--line-strong);
}

.yearrail__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 1px;
  height: 0;
  background: var(--lime);
  box-shadow: 0 0 12px rgba(19, 236, 91, 0.8);
  transition: height 0.12s linear;
}

.yearrail__ticks {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.yearrail__tick {
  position: relative;
  width: 7px;
  height: 1px;
  background: var(--line-strong);
  margin-left: -3px;
}

.yearrail__tick[data-label]::after {
  content: attr(data-label);
  position: absolute;
  left: 14px;
  top: -8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--dim);
}

@media (min-width: 1320px) { .yearrail { display: block; } }

/* --------------------------------------------------------------- rodapé - */

.foot {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(19, 236, 91, 0.035));
  padding-block: clamp(3rem, 7vw, 5rem) 2rem;
}

.foot__grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) { .foot__grid { grid-template-columns: 1.4fr repeat(3, 1fr); } }

.foot h3 {
  font-size: var(--t--1);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--dim);
  margin-bottom: 1rem;
}

.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }

.foot li a {
  text-decoration: none;
  color: var(--moss);
  font-weight: 600;
  transition: color 0.2s;
}

.foot li a:hover { color: var(--lime); }

.foot__note {
  margin-top: 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2rem;
  justify-content: space-between;
  color: var(--dim);
  font-size: var(--t--1);
}

.foot__blurb { color: var(--moss); max-width: 34ch; margin-top: 1rem; }

/* --------------------------------------------------- entrada por rolagem - */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--d, 0ms);
}

[data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
