/* global.css — Estilos base, utilitários e componentes globais */

/* Fontes carregadas via <link> no HTML de cada página */

/* === BASE BODY === */
body {
  background-color: var(--bg-primary);
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.65;
  min-height: 100svh;
  transition: background-color var(--transition), color var(--transition);
  overflow-x: hidden;
}

/* === CONTAINER === */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(16px, 5vw, 32px);
}

/* === SEÇÕES === */
.section {
  padding-block: var(--section-pad);
}

.section-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-header {
  margin-bottom: clamp(40px, 6vw, 72px);
}

.section-title {
  font-size: var(--text-4xl);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-1);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-2);
  max-width: 560px;
  line-height: 1.7;
}

/* === TIPOGRAFIA === */
h1 { font-size: var(--text-5xl); font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; }
h2 { font-size: var(--text-4xl); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
h3 { font-size: var(--text-3xl); font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
h4 { font-size: var(--text-2xl); font-weight: 600; line-height: 1.3; }
h5 { font-size: var(--text-xl);  font-weight: 600; line-height: 1.4; }
h6 { font-size: var(--text-lg);  font-weight: 600; line-height: 1.4; }

/* === UTILITÁRIOS DE TEXTO === */
.text-accent  { color: var(--accent); }
.text-muted   { color: var(--text-2); }
.text-sm      { font-size: var(--text-sm); }
.text-lg      { font-size: var(--text-lg); }
.font-mono    { font-family: var(--font-mono); }
.font-bold    { font-weight: 700; }
.text-center  { text-align: center; }

/* === BOTÕES === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 10px 20px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  border: 2px solid transparent;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-accent);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  color: var(--text-1);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 14px 28px;
  font-size: var(--text-base);
  border-radius: var(--radius-md);
}

.btn-sm {
  padding: 7px 14px;
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
}

.btn-full { width: 100%; }

/* === BADGE === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  background: var(--accent-dim);
}

/* === CARDS === */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 32px);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.card--featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
}

/* === ANIMAÇÕES DE ENTRADA === */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

[data-animate].animate-in {
  opacity: 1;
  transform: translateY(0);
}

[data-animate][data-delay="1"] { transition-delay: 0.1s; }
[data-animate][data-delay="2"] { transition-delay: 0.2s; }
[data-animate][data-delay="3"] { transition-delay: 0.3s; }
[data-animate][data-delay="4"] { transition-delay: 0.4s; }
[data-animate][data-delay="5"] { transition-delay: 0.5s; }
[data-animate][data-delay="6"] { transition-delay: 0.6s; }

/* === CHECK LIST === */
.check-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.5;
}

.check-list li::before {
  content: '';
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='%23C0392B' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  margin-top: 2px;
}

/* === SEPARADOR === */
.divider {
  height: 1px;
  background: var(--border);
  width: 100%;
}

/* === SCROLL BAR === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* === SELEÇÃO DE TEXTO === */
::selection {
  background: var(--accent);
  color: #fff;
}

/* === ACESSIBILIDADE === */
.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;
}

/* === GRID UTILITÁRIOS === */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap-md); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-md); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--gap-md); }

@media (max-width: 1023px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .btn-lg { width: 100%; }
}

/* === REDUZIR MOVIMENTO === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-animate] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
