/* Reset Moderno e Acessível */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-body);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
}

/* Tipografia Base */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.75rem, 3vw + 0.5rem, 2.35rem);
}

h3 {
  font-size: clamp(1.25rem, 2vw + 0.25rem, 1.65rem);
}

h4 {
  font-size: 1.2rem;
  font-weight: 600;
}

p {
  margin-bottom: var(--space-sm);
  color: var(--text-main);
}

p.lead {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--text-muted);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-hover);
}

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
  /* Previne zoom automático no iOS ao tocar em campos de formulário */
  font-size: max(16px, 1em);
}

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

ul, ol {
  list-style: none;
}

/* Foco Visível para Acessibilidade */
:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 2px;
}

/* Contêiner de Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--space-xl);
    padding-right: var(--space-xl);
  }
}

/* Classes Utilitárias de Texto e Alinhamento */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-accent { color: var(--color-accent) !important; }
.text-cyan { color: var(--color-cyan) !important; }
.text-primary { color: var(--color-primary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-white { color: #ffffff !important; }

.bg-white { background-color: var(--bg-surface); }
.bg-subtle { background-color: var(--bg-surface-subtle); }
.bg-dark { background-color: var(--bg-dark); color: var(--text-inverse); }

/* Seções Padrão */
.section,
section[id],
div[id] {
  scroll-margin-top: 84px;
}

.section {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
  position: relative;
}

@media (min-width: 768px) {
  .section {
    padding-top: var(--space-4xl);
    padding-bottom: var(--space-4xl);
  }
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto var(--space-3xl) auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
  background-color: var(--color-accent-light);
  color: var(--color-accent);
}

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

.section-tag.dark {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.section-title {
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Ocultação Acessível */
.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;
}
