/* ============================================================
   MILHÃ AUTOMAÇÃO — BASE
   ------------------------------------------------------------
   Reset enxuto + tipografia global + classes utilitárias.
   ============================================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  display: block;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 var(--space-sm);
  color: var(--blue-deep);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 1.55rem + 2.4vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 1.4rem + 1.4vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.4rem); }

p {
  margin: 0 0 var(--space-sm);
  color: var(--color-text-muted);
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
}

/* ---- Layout helpers ---- */

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

section[id] {
  scroll-margin-top: var(--header-height);
}

/* ---- Tipografia utilitária (linguagem de "placa técnica") ---- */

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-signal);
  margin-bottom: var(--space-xs);
}

.section-eyebrow::after {
  content: "";
  display: inline-block;
  width: 44px;
  height: 5px;
  background: repeating-linear-gradient(
    135deg,
    var(--blue-deep) 0 5px,
    var(--yellow-safety) 5px 10px
  );
  border-radius: 2px;
}

.section-heading {
  max-width: 640px;
  margin-bottom: var(--space-xl);
}

.section-heading h2 {
  margin-bottom: var(--space-2xs);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin: 0;
}

.section-heading--center {
  margin-inline: auto;
  text-align: center;
}

.section-heading--center .section-eyebrow {
  justify-content: center;
  width: 100%;
}

/* ---- Acessibilidade ---- */

.skip-link {
  position: absolute;
  left: var(--space-sm);
  top: -60px;
  background: var(--yellow-safety);
  color: var(--blue-deep);
  font-weight: 700;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  z-index: 1100;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-sm);
}

.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: 2.5px solid var(--yellow-deep);
  outline-offset: 2px;
}

/* ---- Revelação suave ao rolar a página (discreta, respeita reduced-motion) ---- */

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
