/* ==========================================================================
   R/T MOTORS — Design System / Base
   Tokens, reset, tipografia, grid e animações fundamentais
   ========================================================================== */

:root {
  /* Superfícies */
  --bg: #08080a;
  --bg-soft: #0d0d11;
  --surface: #131319;
  --surface-2: #1a1a22;
  --surface-3: #22222c;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* Ouro da marca */
  --gold-100: #fbf0cf;
  --gold-200: #f2ddaa;
  --gold-300: #e2c076;
  --gold-400: #cba24a;
  --gold-500: #b5872c;
  --gold-600: #8a6318;
  --gold-grad: linear-gradient(120deg, #fbf0cf 0%, #e2c076 32%, #b5872c 62%, #f2ddaa 100%);
  --gold-grad-soft: linear-gradient(120deg, rgba(226, 192, 118, 0.16), rgba(181, 135, 44, 0.05));

  /* Vermelho R/T */
  --red: #e01b24;
  --red-dark: #a8121a;
  --red-glow: rgba(224, 27, 36, 0.35);

  /* Texto */
  --text: #f4f4f6;
  --text-2: #b6b6c2;
  --text-3: #7c7c8a;

  /* Estados */
  --ok: #2ecc71;
  --warn: #f0a92e;
  --err: #ef4444;

  /* Formas */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  /* Sombras */
  --sh-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --sh-md: 0 12px 34px rgba(0, 0, 0, 0.45);
  --sh-lg: 0 28px 70px rgba(0, 0, 0, 0.6);
  --sh-gold: 0 14px 40px rgba(181, 135, 44, 0.28);

  /* Movimento */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 0.18s;
  --t: 0.34s;
  --t-slow: 0.7s;

  /* Layout */
  --container: 1280px;
  --gutter: clamp(1rem, 4vw, 2.75rem);
  --header-h: 84px;

  /* Tipografia */
  --font-display: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ------------------------------ Reset ---------------------------------- */

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

* { margin: 0; padding: 0; }

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

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

::selection {
  background: var(--gold-400);
  color: #14100a;
}

/* Scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-500), var(--gold-600));
  border-radius: var(--r-full);
  border: 3px solid var(--bg-soft);
}
::-webkit-scrollbar-thumb:hover { background: var(--gold-400); }

/* Foco acessível */
:focus-visible {
  outline: 2px solid var(--gold-300);
  outline-offset: 3px;
  border-radius: 4px;
}

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

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.4rem, 6.4vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.75rem); }

p { color: var(--text-2); }

.text-gold {
  background: var(--gold-grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: goldShift 7s var(--ease-in-out) infinite;
}

.text-muted { color: var(--text-3); }

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

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

.section {
  position: relative;
  padding-block: clamp(4rem, 9vw, 7.5rem);
}

.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }

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

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(226, 192, 118, 0.28);
  border-radius: var(--r-full);
  background: var(--gold-grad-soft);
  color: var(--gold-200);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px var(--red-glow);
  animation: pulse 2.2s ease-in-out infinite;
}

.section-head p { margin-top: 1rem; font-size: 1.02rem; }

.grid { display: grid; gap: clamp(1rem, 2.2vw, 1.75rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.stack { display: flex; flex-direction: column; gap: 1rem; }
.row { display: flex; align-items: center; gap: 0.75rem; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

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

/* Textura de fundo global */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 25%, transparent 78%);
  pointer-events: none;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
}

.glow--gold { background: radial-gradient(circle, rgba(203, 162, 74, 0.5), transparent 70%); }
.glow--red { background: radial-gradient(circle, rgba(224, 27, 36, 0.34), transparent 70%); }

/* ---------------------------- Keyframes --------------------------------- */

@keyframes goldShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes shimmer {
  0% { transform: translateX(-120%) skewX(-18deg); }
  100% { transform: translateX(320%) skewX(-18deg); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: none; }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes skeleton {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

/* --------------------- Revelação no scroll ------------------------------ */

[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.85s var(--ease),
    transform 0.85s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

[data-reveal="left"] { transform: translateX(-38px); }
[data-reveal="right"] { transform: translateX(38px); }
[data-reveal="zoom"] { transform: scale(0.93); }

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

/* ---------------------- Preferência de movimento ------------------------ */

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

  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
