/* ============================================================
   base.css · reset, layout, type scale
   Mapa da Fluência Agêntica
   ============================================================ */

/* ---------- Reset ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-color: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  transition: background-color 200ms ease, color 200ms ease;
}

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

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

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 150ms ease;
}

a:hover {
  color: var(--primary-dark);
}

ul,
ol {
  list-style: none;
}

/* ---------- A11y helpers ---------- */

.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;
}

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

/* ---------- Layout containers ---------- */

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.container-narrow {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

/* ---------- Type scale ---------- */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--on-surface);
}

.display {
  font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.headline {
  font-size: clamp(1.75rem, 2.5vw + 0.5rem, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
}

.title-lg {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.title-md {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.25;
}

.body-lg {
  font-size: 1.125rem;
  line-height: 1.6;
}

.body-md {
  font-size: 1rem;
  line-height: 1.6;
}

.body-sm {
  font-size: 0.875rem;
  line-height: 1.5;
}

.label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

/* ---------- Spacing helpers ---------- */

.stack-xs > * + * { margin-top: 0.5rem; }
.stack-sm > * + * { margin-top: 1rem; }
.stack-md > * + * { margin-top: 1.5rem; }
.stack-lg > * + * { margin-top: 2.5rem; }
.stack-xl > * + * { margin-top: 4rem; }

/* ---------- Section rhythm ---------- */

.section {
  padding-block: clamp(48px, 8vw, 96px);
}

.section-tight {
  padding-block: clamp(32px, 5vw, 64px);
}

/* ---------- Grids ---------- */

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cards {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.grid-team {
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .grid-team {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Utilities ---------- */

.text-muted {
  color: var(--on-surface-variant);
}

.text-center {
  text-align: center;
}

.hidden {
  display: none !important;
}

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