/* ==========================================================================
   Método X — Base layer
   Reset + tipografia + utilitários básicos. Tudo escopado em .mx-*
   ========================================================================== */

/* ---------- Reset mínimo ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: inherit; }
p { margin: 0; }

/* ---------- Container ---------- */
.mx-container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ---------- Typography utilities ---------- */
.text-display-xl { font-family: var(--font-display); font-weight: 700; font-size: clamp(56px, 8vw, 96px); line-height: 1.0;  letter-spacing: -0.02em; }
.text-display-lg { font-family: var(--font-display); font-weight: 700; font-size: clamp(48px, 7vw, 80px); line-height: 1.05; letter-spacing: -0.02em; }
.text-display-md { font-family: var(--font-display); font-weight: 700; font-size: clamp(40px, 6vw, 64px); line-height: 1.05; letter-spacing: -0.02em; }
.text-display-sm { font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 5vw, 48px); line-height: 1.1;  letter-spacing: -0.02em; }

.text-heading-xl { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 4vw, 40px); line-height: 1.15; letter-spacing: -0.02em; }
.text-heading-lg { font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 3vw, 32px); line-height: 1.2; }
.text-heading-md { font-family: var(--font-display); font-weight: 500; font-size: clamp(20px, 2.4vw, 24px); line-height: 1.3; }
.text-heading-sm { font-family: var(--font-display); font-weight: 500; font-size: 20px; line-height: 1.4; }

.text-body-lg { font-family: var(--font-body); font-weight: 400; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; }
.text-body-md { font-family: var(--font-body); font-weight: 400; font-size: 16px; line-height: 1.625; }
.text-body-sm { font-family: var(--font-body); font-weight: 400; font-size: 14px; line-height: 1.5; }

.text-button-lg { font-family: var(--font-display); font-weight: 500; font-size: 18px; line-height: 1.33; letter-spacing: -0.01em; }
.text-button-md { font-family: var(--font-display); font-weight: 500; font-size: 16px; line-height: 1.5; letter-spacing: 0.02em; }
.text-button-sm { font-family: var(--font-display); font-weight: 500; font-size: 14px; line-height: 1.43; }

.text-caption {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mx-text-accent { color: var(--text-accent); }
.mx-text-muted  { color: var(--text-muted); }
.mx-text-subtle { color: var(--text-subtle); }

/* ---------- Pill/Tag (eyebrow) ---------- */
.mx-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--brand-default);
  color: var(--brand-default);
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mx-pill::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--brand-default);
  border-radius: 50%;
  box-shadow: var(--glow-yellow-sm);
}

/* ---------- Botões ---------- */
.mx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  height: 60px;
  padding: 0 var(--space-8);
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition:
    background-color var(--duration-default) var(--ease-out-quart),
    color var(--duration-default) var(--ease-out-quart),
    transform var(--duration-default) var(--ease-out-quart),
    box-shadow var(--duration-default) var(--ease-out-quart),
    border-color var(--duration-default) var(--ease-out-quart);
  white-space: nowrap;
}
.mx-btn--primary {
  background: var(--brand-default);
  color: var(--brand-fg);
  box-shadow: var(--glow-yellow-md);
}
.mx-btn--primary:hover {
  background: var(--brand-hover);
  box-shadow: var(--glow-yellow-lg);
  transform: translateY(-1px);
}
.mx-btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}
.mx-btn--ghost:hover {
  border-color: var(--brand-default);
  color: var(--brand-default);
}
.mx-btn--sm { height: 44px; padding: 0 var(--space-6); font-size: 14px; }
.mx-btn .mx-btn-arrow {
  width: 14px; height: 14px;
  transition: transform var(--duration-default) var(--ease-out-quart);
}
.mx-btn:hover .mx-btn-arrow { transform: translateX(2px); }

/* ---------- Skip to content ---------- */
.mx-skip {
  position: absolute;
  top: -100px; left: 0;
  background: var(--brand-default);
  color: var(--brand-fg);
  padding: var(--space-3) var(--space-4);
  z-index: 9999;
  font-family: var(--font-display);
  font-weight: 500;
}
.mx-skip:focus { top: 0; }

/* ---------- Focus visible global ---------- */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Selection ---------- */
::selection {
  background: var(--brand-default);
  color: var(--brand-fg);
}

/* ---------- Reduced motion (override universal) ---------- */
@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;
  }
}

/* ---------- Scroll-appear animations ---------- */
[data-mx-appear] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
[data-mx-appear="fade"] { transform: none; }
[data-mx-appear="up"] { transform: translateY(28px); }
[data-mx-appear="up-lg"] { transform: translateY(48px); }
[data-mx-appear="scale"] { transform: scale(0.94); }
[data-mx-appear="left"] { transform: translateX(-32px); }
[data-mx-appear="right"] { transform: translateX(32px); }

[data-mx-appear].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-mx-appear] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Section base ---------- */
.mx-section {
  position: relative;
  padding-block: clamp(64px, 10vw, 128px);
}
.mx-section__head {
  text-align: center;
  margin-inline: auto;
  max-width: 800px;
  margin-bottom: clamp(40px, 6vw, 80px);
}
.mx-section__head .mx-pill { margin-bottom: var(--space-6); }
.mx-section__head .mx-section__title { margin-bottom: var(--space-4); }
.mx-section__head .mx-section__sub { color: var(--text-muted); }

/* ----------------------------------------------------------------------
   Global: section headlines NEVER quebra em linhas demais
   text-wrap: balance pede pro browser distribuir as linhas de forma
   uniforme; só quebra quando a resolução realmente exige.
   ---------------------------------------------------------------------- */
.mx-section__title,
.mx-solutions__title,
.mx-pillars__headline,
.mx-method__title,
.mx-portfolio__title,
.mx-hero__headline,
.mx-cta__headline,
.mx-faq .mx-section__title {
  text-wrap: balance;
  -webkit-hyphens: none;
  hyphens: none;
}
.mx-solutions__sub,
.mx-pillars__sub,
.mx-portfolio__sub,
.mx-method__sub,
.mx-hero__sub,
.mx-cta__sub {
  text-wrap: pretty;
}
