/* ==========================================================================
   base.css — tokens, reset, tipografia, utilitários e botões
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Cores */
  --bg: #05080f;
  --bg-alt: #080d18;
  --surface: #0c1422;
  --surface-2: #101a2c;
  --line: rgba(160, 185, 230, .14);
  --line-strong: rgba(160, 185, 230, .3);
  --text: #e9eef8;
  --muted: #a3b0c8;
  --accent: #6ee7ff;
  --accent-2: #8f9eff;
  --ok: #6ee7b7;
  --on-accent: #04101a;

  /* Tipografia — pilha de sistema: zero requisições e zero troca de fonte (CLS) */
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Cascadia Mono", Consolas, Menlo, monospace;

  /* Escala fluida */
  --fs-sm: clamp(.8125rem, .79rem + .1vw, .875rem);
  --fs-base: clamp(1rem, .97rem + .15vw, 1.0625rem);
  --fs-lead: clamp(1.0625rem, 1rem + .35vw, 1.25rem);
  --fs-h3: clamp(1.0625rem, 1rem + .3vw, 1.25rem);
  --fs-h2: clamp(1.75rem, 1.3rem + 2vw, 2.875rem);
  --fs-h1: clamp(2.25rem, 1.5rem + 3.6vw, 4.25rem);

  /* Espaço e forma */
  --maxw: 1160px;
  --gutter: clamp(1.125rem, 4vw, 2rem);
  --section-y: clamp(4rem, 9vw, 7.5rem);
  --radius: 14px;
  --radius-sm: 9px;
  --header-h: 68px;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeSpeed;
}

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

h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1, h2, h3 {
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -.02em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); letter-spacing: -.035em; }
h2 { font-size: var(--fs-h2); letter-spacing: -.03em; }
h3 { font-size: var(--fs-h3); line-height: 1.25; letter-spacing: -.01em; }

p { text-wrap: pretty; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

em { font-style: normal; color: var(--text); }
strong { font-weight: 650; color: var(--text); }

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

::selection { background: rgba(110, 231, 255, .28); color: #fff; }

.container { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }
.narrow { width: min(100% - 2 * var(--gutter), 820px); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: .7rem 1rem;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* Ícones inline (symbol sprite) */
.ico { width: 1.15em; height: 1.15em; flex: none; }

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 48px;
  padding: .8rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--on-accent);
  font: inherit;
  font-weight: 650;
  font-size: .975rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
  box-shadow: 0 0 0 0 rgba(110, 231, 255, 0);
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px -8px rgba(110, 231, 255, .55);
  text-decoration: none;
}
.btn:active { transform: translateY(0); }
.btn .ico { transition: transform .2s var(--ease); }
.btn:hover .ico { transform: translateX(3px); }

.btn--sm { min-height: 40px; padding: .5rem 1.05rem; font-size: .9rem; }
.btn--block { width: 100%; }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--accent); box-shadow: none; background: rgba(110, 231, 255, .06); }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
