/* ═══════════════════════════════════════════════════════════════════
   Design tokens + reset + utilitários
   Tokens da especificação (seção 5.2) com a linguagem visual do MoneyTrack:
   superfícies escuras em camadas, bordas de 1px e cores "suaves" via color-mix.
   ═══════════════════════════════════════════════════════════════════ */
:root {
  color-scheme: dark;

  /* superfícies */
  --bg: #0b0d12;
  --bg-elevated: #0e1117;
  --surface: #12151c;
  --surface-2: #1a1e27;
  --surface-3: #222734;
  --border: #262b36;
  --border-strong: #323847;

  /* texto */
  --text: #f2f4f8;
  --text-muted: #9aa3b2;
  --text-subtle: #6b7384;

  /* marca */
  --brand: #4f7cff;
  --brand-hover: #6a90ff;
  --brand-soft: color-mix(in srgb, var(--brand) 14%, transparent);
  --on-brand: #ffffff;
  --accent: #ffc53d;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --success: #2bd576;
  --success-hover: #45e08a;
  --success-soft: color-mix(in srgb, var(--success) 14%, transparent);
  --on-success: #04170c;
  --danger: #ff5a5f;
  --danger-soft: color-mix(in srgb, var(--danger) 14%, transparent);

  /* plataformas */
  --ps2: #3b6bff;
  --ps1: #b0b7c3;
  --x360: #6bcb3c;

  /* forma */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  --shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.7);

  /* tipografia */
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;

  /* layout */
  --container: 1280px;
  --gutter: 16px;
  --header-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --section-y: 64px;
}

@media (min-width: 768px) {
  :root {
    --gutter: 24px;
    --header-h: 72px;
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: 32px;
    --section-y: 88px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

html.is-locked {
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

main {
  flex: 1;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

svg.icon {
  flex-shrink: 0;
}

[hidden] {
  display: none !important;
}

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

::selection {
  background: color-mix(in srgb, var(--brand) 40%, transparent);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 999px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-track {
  background: transparent;
}

input[type='search']::-webkit-search-cancel-button {
  display: none;
}

input[type='number'] {
  -moz-appearance: textfield;
  appearance: textfield;
}

input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ─────────────── Utilitários ─────────────── */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--section-y) 0 0;
}

.text-muted {
  color: var(--text-muted);
}

.text-subtle {
  color: var(--text-subtle);
}

.num {
  font-variant-numeric: tabular-nums;
}

.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;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

/* ─────────────── Animações ─────────────── */
@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

@keyframes bump {
  40% {
    transform: scale(1.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
