/* ============================================================
   MÉTODO ACA — Base
   Reset, tipografia global, container, seções, acessibilidade.
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--foreground);
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

button {
  font: inherit;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

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

ul,
ol {
  list-style: none;
}

::selection {
  background: rgba(0, 82, 255, 0.18);
}

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

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

h1,
h2,
h3 {
  font-weight: 400;
  text-wrap: balance;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6.2vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.15;
}

h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--muted-foreground);
  max-width: 40rem;
  text-wrap: pretty;
}

.gradient-text {
  background: linear-gradient(to right, var(--accent), var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

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

.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
  max-width: 46rem;
}

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

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

.section--inverted {
  background: var(--inverted-bg);
  color: var(--inverted-fg);
  overflow: hidden;
}

.section--inverted .lead {
  color: var(--inverted-muted);
}

/* Texturas: dot pattern + glows radiais */
.section--inverted::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #ffffff 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.04;
  pointer-events: none;
}

.glow {
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: var(--accent);
  filter: blur(150px);
  opacity: 0.07;
  pointer-events: none;
}

.glow--tl { top: -280px; left: -200px; }
.glow--br { bottom: -280px; right: -200px; }

/* Grid técnico sutil (fundo claro) */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 40%, transparent 100%);
  pointer-events: none;
}

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

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
