/* Reset moderno + tipografia base + layout global. */

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

html {
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--white-ice);
  background: var(--black-deep);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  margin: 0 0 var(--sp-3);
  color: var(--white-ice);
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p { margin: 0 0 var(--sp-3); }

a {
  color: var(--gold-light);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--gold-warm); }

ul, ol { padding-left: var(--sp-5); margin: 0 0 var(--sp-4); }
li { margin-bottom: var(--sp-1); }

hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: var(--sp-6) 0;
}

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

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

::selection {
  background: var(--gold-warm);
  color: var(--black-deep);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--black-deep); }
::-webkit-scrollbar-thumb {
  background: var(--black-elevated);
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover { background: var(--gray-dim); }

/* Boot loader — antes do JS carregar */
.boot-loader {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  align-items: center;
  justify-content: center;
  color: var(--gray-smoke);
}
.boot-loader__spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--gold-warm);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-4);
}
@media (min-width: 768px) {
  .container { padding: 0 var(--sp-6); }
}

.stack { display: flex; flex-direction: column; gap: var(--sp-4); }
.row   { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.center { display: flex; align-items: center; justify-content: center; }

.muted { color: var(--gray-smoke); }
.danger { color: var(--red-alert); }
.success { color: var(--green-success); }
.warn { color: var(--yellow-warn); }
.gold { color: var(--gold-warm); }

.mono { font-family: var(--font-mono); }
.display { font-family: var(--font-display); }

.text-xs { font-size: var(--fs-xs); }
.text-sm { font-size: var(--fs-sm); }
.text-lg { font-size: var(--fs-lg); }
.text-xl { font-size: var(--fs-xl); }

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