/* ==========================================================================
   base.css — Reset + tipografia global + utilitários
   --------------------------------------------------------------------------
   Importar logo após tokens.css.
   ========================================================================== */

/* ---------- 1. Reset -------------------------------------------------- */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--gb-color-bg);
  color: var(--gb-color-text);
  font-family: var(--gb-font-sans);
  font-size: var(--gb-fs-body);
  line-height: var(--gb-lh-normal);
  font-weight: var(--gb-fw-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  max-width: 100%;
}

img, video { height: auto; }

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

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

a {
  color: var(--gb-color-secondary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--gb-dur-fast) var(--gb-ease-out);
}
a:hover { color: var(--gb-color-accent); }

ul, ol { padding: 0; }
ul[role="list"], ol[role="list"] { list-style: none; }

/* Focus visible global */
:focus-visible {
  outline: none;
  box-shadow: var(--gb-focus-ring);
  border-radius: var(--gb-radius-sm);
}

/* Selection */
::selection {
  background: var(--gb-clay-200);
  color: var(--gb-ink-800);
}

/* Form base */
input, textarea, select {
  background: var(--gb-color-bg-raised);
}

::placeholder {
  color: var(--gb-color-text-subtle);
  opacity: 1;
}

/* ---------- 2. Tipografia global ------------------------------------ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--gb-font-serif);
  font-weight: var(--gb-fw-medium);
  color: var(--gb-color-text-strong);
  line-height: var(--gb-lh-snug);
  letter-spacing: var(--gb-tracking-tight);
  text-wrap: balance;
}

h1 { font-size: var(--gb-fs-h1); line-height: var(--gb-lh-tight); }
h2 { font-size: var(--gb-fs-h2); }
h3 { font-size: var(--gb-fs-h3); }
h4 { font-size: var(--gb-fs-h4); letter-spacing: 0; }
h5 { font-size: var(--gb-fs-h5); letter-spacing: 0; }
h6 {
  font-size: var(--gb-fs-h6);
  letter-spacing: var(--gb-tracking-wider);
  text-transform: uppercase;
  font-family: var(--gb-font-sans);
  font-weight: var(--gb-fw-semibold);
  color: var(--gb-color-text-muted);
}

p { text-wrap: pretty; }

strong, b { font-weight: var(--gb-fw-semibold); color: var(--gb-color-text-strong); }
small { font-size: var(--gb-fs-body-sm); }

hr {
  border: 0;
  border-top: 1px solid var(--gb-color-border);
  margin: var(--gb-space-8) 0;
}

blockquote {
  font-family: var(--gb-font-serif);
  font-size: var(--gb-fs-h4);
  line-height: var(--gb-lh-snug);
  color: var(--gb-color-text-strong);
  font-style: italic;
  padding-left: var(--gb-space-6);
  border-left: 2px solid var(--gb-color-accent);
}

code, pre, kbd, samp {
  font-family: var(--gb-font-mono);
  font-size: 0.92em;
}

code {
  background: var(--gb-color-bg-sunken);
  padding: 0.15em 0.4em;
  border-radius: var(--gb-radius-xs);
}

/* ---------- 3. Utilitários ------------------------------------------- */

.gb-container {
  width: 100%;
  max-width: var(--gb-container-max);
  margin-inline: auto;
  padding-inline: var(--gb-container-pad-x);
}
.gb-container--narrow { max-width: var(--gb-container-narrow); }
.gb-container--wide   { max-width: var(--gb-container-wide); }

.gb-section { padding-block: var(--gb-space-16); }
@media (min-width: 64rem) {
  .gb-section { padding-block: var(--gb-space-24); }
}

.gb-stack > * + * { margin-top: var(--gb-space-4); }
.gb-stack-lg > * + * { margin-top: var(--gb-space-6); }
.gb-stack-xl > * + * { margin-top: var(--gb-space-10); }

.gb-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gb-space-3);
  align-items: center;
}

.gb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--gb-space-3);
  font-family: var(--gb-font-sans);
  font-size: var(--gb-fs-label);
  font-weight: var(--gb-fw-medium);
  letter-spacing: var(--gb-tracking-wider);
  text-transform: uppercase;
  color: var(--gb-color-gold-strong);
}
.gb-eyebrow::before {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--gb-line-gold);
  flex: 0 0 auto;
}
.gb-eyebrow--gold { color: var(--gb-gold-400); }
.gb-section-head--center .gb-eyebrow { justify-content: center; }
.gb-section-head--center .gb-eyebrow::after {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--gb-line-gold);
  flex: 0 0 auto;
}

.gb-lede {
  font-size: var(--gb-fs-body-lg);
  line-height: var(--gb-lh-relaxed);
  color: var(--gb-color-text-muted);
  text-wrap: pretty;
}

.gb-text-center { text-align: center; }
.gb-text-balance { text-wrap: balance; }
.gb-text-pretty  { text-wrap: pretty; }

.gb-visually-hidden {
  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 */
.gb-skip-link {
  position: absolute; top: 0; left: 0;
  padding: var(--gb-space-3) var(--gb-space-5);
  background: var(--gb-color-text-strong);
  color: var(--gb-color-text-on-dark);
  font-weight: var(--gb-fw-semibold);
  border-radius: 0 0 var(--gb-radius-md) 0;
  transform: translateY(-110%);
  transition: transform var(--gb-dur-fast) var(--gb-ease-out);
  z-index: var(--gb-z-tooltip);
}
.gb-skip-link:focus-visible { transform: translateY(0); }

/* Surface helpers */
.gb-surface {
  background: var(--gb-color-bg-raised);
  border: 1px solid var(--gb-color-border);
  border-radius: var(--gb-radius-lg);
}
.gb-surface--sunken { background: var(--gb-color-bg-sunken); border-color: transparent; }
.gb-surface--inverse {
  background: var(--gb-color-bg-inverse);
  color: var(--gb-color-text-on-dark);
  border-color: transparent;
}

/* Aspect ratio helpers */
.gb-ratio-book   { aspect-ratio: 2 / 3; }    /* capa de livro */
.gb-ratio-cover  { aspect-ratio: 16 / 10; }  /* curso, webinar */
.gb-ratio-square { aspect-ratio: 1 / 1; }
