/* ==========================================================================
   BASE - reset leve, tipografia, layout utilitário, acessibilidade
   ========================================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  /* canvas escuro (igual à hero e ao footer) para o overscroll não revelar
     o fundo branco da página ao "esticar" no topo/rodapé */
  background: var(--ink-900);
  overscroll-behavior: none;
}

body {
  font-family: var(--font-sans);
  color: var(--ink-700);
  background: var(--surface);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

/* Fallback quando uma imagem não carrega: mantém o bloco elegante */
.img-failed {
  background:
    repeating-linear-gradient(135deg, var(--surface-3) 0 22px, var(--surface-2) 22px 44px) !important;
}
.img-failed::after {
  content: "Supra Equipamentos";
  display: grid;
  place-items: center;
  height: 100%;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ink-400);
  font-size: .95rem;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
address { font-style: normal; }
ul { list-style: none; padding: 0; }

/* --- Tipografia --- */
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink-900);
  line-height: 1.08;
  letter-spacing: -.02em;
  font-weight: 700;
}

h1 { font-size: clamp(2.15rem, 5.4vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.8vw, 2.75rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.2; }

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

.section { padding-block: var(--section-y); }
.section--alt { background: var(--surface-2); }

.grid { display: grid; gap: clamp(18px, 2.4vw, 28px); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

/* --- Cabeçalho de seção --- */
.section__head {
  max-width: 720px;
  margin: 0 auto clamp(36px, 5vw, 60px);
  text-align: center;
}
.section__sub {
  margin-top: 16px;
  color: var(--ink-500);
  font-size: clamp(1rem, 1.6vw, 1.13rem);
}
.section__note {
  margin-top: clamp(28px, 4vw, 44px);
  text-align: center;
  color: var(--ink-500);
}
.section__note a { color: var(--ink-900); font-weight: 600; border-bottom: 2px solid var(--brand); }
.section__note a:hover { color: var(--ink-700); }

/* --- Eyebrow --- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.eyebrow--center { justify-content: center; width: 100%; color: var(--ink-500); }
.eyebrow--center::before,
.eyebrow--center::after { content: none; }

.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand-strong);
  box-shadow: 0 0 0 0 var(--brand-ring);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 var(--brand-ring); }
  70%  { box-shadow: 0 0 0 10px rgba(0, 160, 192,0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 160, 192,0); }
}

/* --- Acessibilidade --- */
.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 200;
  background: var(--ink-900);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  transition: top var(--t);
}
.skip-link:focus { top: 16px; }

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

/* --- Scroll reveal --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: calc(var(--reveal-delay, 0) * 90ms);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .pulse { animation: none; }
}

/* --- Responsivo grid --- */
@media (max-width: 900px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid--3 { grid-template-columns: 1fr; }
}
