/* ============================================================
   GLOBAL — Reset, tipografia, botões, utilitários
   ============================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--navbar-h) + var(--topbar-h) + 16px);
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
button { font-family: var(--font-body); cursor: pointer; }
input, textarea, select { font-family: var(--font-body); }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--primary-dark); }

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* ---- Tipografia ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--dark);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.25rem, 5vw,  3.75rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); font-weight: 600; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.875rem); font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }
h5 { font-size: 1.1rem;  font-weight: 600; }

p { margin-bottom: var(--space-md); }
p:last-child { margin-bottom: 0; }

/* Conteúdo de blog */
.prose h2 { font-size: 1.75rem; margin: var(--space-2xl) 0 var(--space-md); }
.prose h3 { font-size: 1.375rem; margin: var(--space-xl) 0 var(--space-sm); }
.prose p  { margin-bottom: var(--space-lg); font-size: 1.05rem; line-height: 1.75; }
.prose ul, .prose ol { margin: 0 0 var(--space-lg) var(--space-xl); }
.prose li { margin-bottom: var(--space-sm); font-size: 1.05rem; line-height: 1.7; }
.prose strong { color: var(--dark); font-weight: 600; }
.prose a { color: var(--primary); border-bottom: 1px solid var(--primary-light); }
.prose a:hover { border-color: var(--primary); }

/* ---- Botões ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.875rem 1.875rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn-accent:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(196, 148, 58, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-white {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
}
.btn-white:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--white);
  color: var(--white);
}

.btn-lg { padding: 1.125rem 2.5rem; font-size: 1.05rem; }
.btn-sm { padding: 0.625rem 1.25rem; font-size: 0.85rem; }
.btn-full { width: 100%; }
.btn-full-mobile { width: auto; }

/* ---- Seções ---- */
.section     { padding: var(--space-4xl) 0; }
.section-sm  { padding: var(--space-3xl) 0; }
.section-alt { background: var(--bg-alt); }
.section-dark {
  background: var(--dark);
  color: var(--white);
}
.section-dark h1,
.section-dark h2,
.section-dark h3 { color: var(--white); }

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}
.section-header .subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: var(--space-md) auto 0;
  line-height: 1.7;
}

/* ---- Tag / Badge ---- */
.tag {
  display: inline-block;
  padding: 0.3rem 1rem;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

.tag-accent {
  background: var(--accent-light);
  color: var(--accent-dark);
}

/* ---- Divisor decorativo ---- */
.divider {
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: var(--space-md) 0;
}
.divider-center { margin: var(--space-md) auto; }

/* ---- Estrelas ---- */
.stars { color: #F59E0B; letter-spacing: 2px; font-size: 1.1rem; }

/* ---- Grid utilitário ---- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg); }

/* ---- Utilitários ---- */
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-muted   { color: var(--text-muted); }
.text-white   { color: var(--white); }
.text-accent  { color: var(--accent); }
.text-primary { color: var(--primary); }
.fw-600       { font-weight: 600; }
.fw-700       { font-weight: 700; }

.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mt-xl  { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-xl  { margin-bottom: var(--space-xl); }

.d-flex     { display: flex; }
.align-center { align-items: center; }
.gap-md     { gap: var(--space-md); }
.gap-lg     { gap: var(--space-lg); }

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

/* ---- Animações de entrada ---- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsivo global ---- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .container { padding: 0 var(--space-lg); }
  .section    { padding: var(--space-3xl) 0; }
  .section-sm { padding: var(--space-2xl) 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4     { grid-template-columns: 1fr; }
  .btn-full-mobile { width: 100%; }
}
