/* RecuperaPay — design tokens */
:root {
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-display: "Instrument Serif", "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Palette — confident, slightly warm. Not pastel SaaS. */
  --bg: #fafaf7;
  --bg-elev: #ffffff;
  --bg-sunken: #f1f0eb;
  --ink: #0a0a09;
  --ink-soft: #2a2a27;
  --muted: #5a5a55;
  --subtle: #8a8a83;
  --line: rgba(10, 10, 9, 0.10);
  --line-strong: rgba(10, 10, 9, 0.18);

  /* Accent: Brazilian green, but deeper / less flag-like */
  --accent: #0d6b3f;
  --accent-hover: #0a5532;
  --accent-soft: #d8ebe0;

  /* Money colors */
  --loss: #b8321b;
  --loss-soft: #fce7e1;
  --gain: #0d6b3f;

  --radius: 8px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(10, 10, 9, 0.04);
  --shadow: 0 4px 14px -4px rgba(10, 10, 9, 0.10), 0 2px 4px rgba(10, 10, 9, 0.04);
  --shadow-lg: 0 24px 48px -16px rgba(10, 10, 9, 0.16);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.011em;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.container-tight { max-width: 920px; margin: 0 auto; padding: 0 24px; }

/* Type */
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.02em;
}
.mono { font-family: var(--font-mono); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; letter-spacing: -0.005em;
  transition: background 120ms ease, color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink); color: var(--bg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 1px 2px rgba(0,0,0,0.1);
}
.btn-primary:hover { background: var(--accent); }
.btn-secondary {
  background: var(--bg-elev); color: var(--ink);
  border-color: var(--line-strong);
}
.btn-secondary:hover { background: var(--bg-sunken); }
.btn-ghost { color: var(--muted); padding: 8px 12px; }
.btn-ghost:hover { color: var(--ink); }
.btn-lg { padding: 14px 22px; font-size: 15px; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 6px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.02em; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 6px;
  background: var(--ink); color: var(--bg);
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
  font-family: var(--font-mono);
}
.nav-link { padding: 8px 12px; border-radius: 6px; color: var(--muted); font-size: 14px; }
.nav-link:hover { color: var(--ink); }

/* Pill / badge */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted);
  padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg-elev);
}
.pill .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent);
}

/* Card */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

/* Inputs */
.input, .select {
  width: 100%;
  background: var(--bg-elev); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 11px 14px; font-size: 14px;
  transition: border-color 120ms, box-shadow 120ms;
}
.input:focus, .select:focus {
  outline: 0; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent);
}

/* Section */
section { padding-block: 96px; }
section.tight { padding-block: 64px; }

/* Subtle grid background */
.bg-grid {
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 80%);
}

::selection { background: var(--ink); color: var(--bg); }

/* Money type */
.money {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
  letter-spacing: -0.02em;
}

/* Spinner */
.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
