/* ==========================================================================
   Forte Motors — base.css
   Direction: "Oficina de Confiança" (workshop-of-trust world)
   Near-black asphalt/steel ground, warm workbench wood accent, single
   flag-orange signal color. No gray-on-gray drift: true near-black,
   true off-white, one saturated accent.
   ========================================================================== */

:root {
  /* ---- Color: ground & surfaces ---- */
  --color-bg: #131210;
  --color-bg-raised: #1b1a17;
  --color-bg-panel: #201f1b;
  --color-steel: #3a3833;
  --color-steel-line: #2a2925;
  --color-border: rgba(245, 241, 232, 0.1);
  --color-border-strong: rgba(245, 241, 232, 0.22);

  /* ---- Color: ink ---- */
  --color-ink: #f5f1e8;
  --color-ink-muted: #b8b2a4;
  --color-ink-faint: #7d7768;

  /* ---- Color: the one accent ---- */
  --color-accent: #ff5a1f;
  --color-accent-ink: #ff7a45;
  --color-accent-deep: #c73f10;
  --color-accent-contrast: #17130d;

  /* ---- Color: wood (used sparingly — dividers, stamp texture) ---- */
  --color-wood: #8a5a34;
  --color-wood-deep: #5c3a20;

  /* ---- Color: functional (form validation only) ---- */
  --color-good: #5fae66;
  --color-bad: #e5573f;

  /* ---- Type ---- */
  --font-display: "Space Grotesk", "Arial Narrow", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
  --font-body: "IBM Plex Sans", Arial, sans-serif;

  /* ---- Spacing scale (4px base) ---- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  /* ---- Radius: mostly sharp, industrial ---- */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;

  /* ---- Shadow ---- */
  --shadow-card: 0 1px 0 rgba(245, 241, 232, 0.06) inset, 0 12px 24px -12px rgba(0, 0, 0, 0.6);
  --shadow-lift: 0 20px 40px -16px rgba(0, 0, 0, 0.7);

  /* ---- Layout ---- */
  --container-max: 1240px;
  --header-height: 76px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
/* Components below set `display` unconditionally (flex/grid), which otherwise
   beats the UA [hidden] rule at equal specificity — force it to win here. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, picture, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

@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;
  }
}

/* ---- Base ---- */
html { overflow-x: hidden; }
body {
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.02), transparent 320px),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.012) 0, rgba(255,255,255,0.012) 1px, transparent 1px, transparent 6px);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}

h1 { font-size: clamp(2.4rem, 3.4vw + 1rem, 4.4rem); }
h2 { font-size: clamp(1.8rem, 2vw + 1rem, 2.75rem); }
h3 { font-size: clamp(1.25rem, 1vw + 1rem, 1.6rem); }
h4 { font-size: 1.1rem; }

p { color: var(--color-ink-muted); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-ink);
}

.mono { font-family: var(--font-mono); }

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

.section {
  padding-block: var(--space-9);
}

.section--tight { padding-block: var(--space-7); }

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  max-width: 640px;
}

.section-head--split {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  max-width: none;
  gap: var(--space-4);
}

.grid {
  display: grid;
  gap: var(--space-5);
}

.grid--cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

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

.skip-link {
  position: absolute;
  left: var(--space-3);
  top: -60px;
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top 0.15s ease;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.skip-link:focus { top: var(--space-3); }

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ---- Divider (workbench-wood strip, used sparingly) ---- */
.wood-rule {
  height: 6px;
  background: linear-gradient(90deg, var(--color-wood-deep), var(--color-wood) 40%, var(--color-wood-deep));
  border-radius: 3px;
  opacity: 0.85;
}

@media (max-width: 720px) {
  .container { padding-inline: var(--space-4); }
  .section { padding-block: var(--space-7); }
  .section-head--split { flex-direction: column; align-items: flex-start; }
}

/* ---- Scroll reveal (applied via JS IntersectionObserver in main.js) ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-group.is-visible > * { opacity: 1; transform: translateY(0); }
.reveal-group > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-group.is-visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-group.is-visible > *:nth-child(2) { transition-delay: 80ms; }
.reveal-group.is-visible > *:nth-child(3) { transition-delay: 160ms; }
.reveal-group.is-visible > *:nth-child(4) { transition-delay: 240ms; }
.reveal-group.is-visible > *:nth-child(5) { transition-delay: 320ms; }
.reveal-group.is-visible > *:nth-child(6) { transition-delay: 400ms; }
.reveal-group.is-visible > *:nth-child(n+7) { transition-delay: 460ms; }
