/* ==========================================================================
   MHR — Base: reset, tipografia, layout e utilitários
   ========================================================================== */

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

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  color: var(--text);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

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

img {
  background-color: var(--off-white-2);
}

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

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

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

ul,
ol {
  list-style: none;
}

address {
  font-style: normal;
}

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

::selection {
  background: var(--mhr-orange);
  color: #fff;
}

/* --- Tipografia --------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-snug);
  letter-spacing: -0.015em;
  color: var(--ink-900);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-4xl);
  line-height: var(--lh-tight);
  letter-spacing: -0.025em;
}
h2 {
  font-size: var(--fs-3xl);
}
h3 {
  font-size: var(--fs-xl);
}
h4 {
  font-size: var(--fs-lg);
}

p {
  text-wrap: pretty;
}

strong {
  font-weight: 600;
  color: var(--ink-800);
}

/* --- Container ---------------------------------------------------------- */

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

.container--wide {
  max-width: var(--container-wide);
}

.container--narrow {
  max-width: 900px;
}

/* --- Seções ------------------------------------------------------------- */

.section {
  padding-block: var(--section-y);
  position: relative;
}

.section--lg {
  padding-block: var(--section-y-lg);
}

.section--alt {
  background-color: var(--off-white);
}

.section--paper {
  background-color: var(--paper);
}

.section--dark {
  background-color: var(--ink-900);
  color: var(--text-invert);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: #fff;
}

.section--dark p {
  color: var(--text-invert-soft);
}

.section--grid-lines {
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 96px 96px;
  background-position: center;
}

.section--hairline {
  border-top: 1px solid var(--line);
}

/* --- Cabeçalho de seção -------------------------------------------------- */

.section-head {
  max-width: 780px;
  margin-bottom: clamp(2.25rem, 4vw, 3.5rem);
}

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

.section-head--split {
  display: grid;
  gap: var(--sp-6);
}

@media (min-width: 1024px) {
  .section-head--split {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: end;
    max-width: none;
  }
}

.section-head__title {
  margin-top: var(--sp-4);
}

.section-head__lead {
  margin-top: var(--sp-5);
  color: var(--text-soft);
  font-size: var(--fs-lg);
  line-height: var(--lh-normal);
  max-width: 62ch;
}

.section-head--center .section-head__lead {
  margin-inline: auto;
}

.section--dark .section-head__lead {
  color: var(--text-invert-soft);
}

/* --- Eyebrow / rótulo técnico ------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--text-muted);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--mhr-orange);
  flex: none;
}

.eyebrow--bare::before {
  display: none;
}

.section--dark .eyebrow,
.hero .eyebrow,
.page-hero .eyebrow,
.cta-band .eyebrow,
.pillars .eyebrow {
  color: rgba(244, 245, 246, 0.6);
}

/* --- Utilitários -------------------------------------------------------- */

/* O atributo hidden precisa vencer regras de display definidas pelos
   componentes em suas próprias classes. */
[hidden] {
  display: none !important;
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--sp-4);
  z-index: var(--z-skip);
  padding: 0.75rem 1.25rem;
  background: var(--ink-900);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  transition: top var(--dur) var(--ease);
}

.skip-link:focus {
  top: var(--sp-4);
}

/* Ícones SVG inline: tamanho padrão seguro. Regras de componente
   (carregadas depois) podem sobrescrever por contexto. */
svg.mhr-icon {
  width: 20px;
  height: 20px;
  flex: none;
}

.grid {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

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

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

@media (min-width: 900px) {
  .grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.text-muted {
  color: var(--text-muted);
}
.text-orange {
  color: var(--mhr-orange);
}
.nowrap {
  white-space: nowrap;
}

/* --- Barra técnica (detalhe gráfico) ------------------------------------ */

.tech-rule {
  height: 3px;
  width: 56px;
  background: var(--mhr-orange);
}

/* --- Reveal on scroll --------------------------------------------------- */

/* O estado oculto só é aplicado quando o JS está ativo (`js` no <html>),
   evitando conteúdo invisível caso o JavaScript falhe. */
.reveal {
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  will-change: opacity, transform;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
