/* ==========================================================================
   VEX Soluções Automotivas — global.css
   Tokens e componentes canônicos (documentados em design-system.html).
   Ordem: tokens → base → layout → componentes → seções → efeitos → movimento
   ========================================================================== */

/* TOKENS ------------------------------------------------------------------ */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
}

:root {
  /* Cores da marca (Mini Manual da Marca v6) */
  --vex-red-deep: #A70E0B;
  --vex-red: #CC2A1B;
  --vex-white: #FFFFFF;
  --vex-black: #000000;

  /* Superfícies */
  --surface-dark: #000000;
  --surface-dark-raised: #0E0E0E;
  --surface-dark-card: #151515;
  --surface-light: #FFFFFF;
  --surface-paper: #F3F3F1;

  /* Texto */
  --text-on-dark: #FFFFFF;
  --text-on-dark-muted: rgba(255, 255, 255, .72);
  --text-on-light: #0B0B0B;
  --text-on-light-muted: #4D4D4D;
  --accent-on-dark: var(--vex-red);   /* contraste 3,9:1 sobre preto (texto grande, ícones) */
  --accent-on-light: var(--vex-red);     /* contraste 5,4:1 sobre branco */

  /* Linhas */
  --line-on-dark: rgba(255, 255, 255, .12);
  --line-on-dark-strong: rgba(255, 255, 255, .24);
  --line-on-light: #E1E1DE;
  --line-on-light-strong: #C9C9C5;

  /* Degradê institucional de apoio — apenas fundos e grafismos */
  --gradient-brand: linear-gradient(135deg, #000000 0%, #A70E0B 62%, #CC2A1B 100%);
  --gradient-stripe: linear-gradient(90deg, #A70E0B 0%, #CC2A1B 55%, #CC2A1B 100%);

  /* Tipografia */
  --font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --fs-display: clamp(2.25rem, 1.6rem + 2.8vw, 3.5rem);   /* 36 → 56 */
  --fs-h2: clamp(2rem, 1.55rem + 2vw, 3rem);              /* 32 → 48 */
  --fs-h3: clamp(1.125rem, 1.05rem + .35vw, 1.375rem);    /* 18 → 22 */
  --fs-lead: clamp(1rem, .97rem + .12vw, 1.0625rem);      /* 16 → 17 */
  --fs-body: 1rem;                                        /* 16 */
  --fs-small: .875rem;                                    /* 14 */
  --fs-label: .75rem;                                     /* 12 */
  --fs-stat: clamp(3.5rem, 2.6rem + 4vw, 6rem);
  --lh-tight: 1.05;
  --lh-heading: 1.15;
  --lh-body: 1.6;
  --tracking-label: .16em;
  --tracking-display: -.02em;

  /* Espaçamento — ritmo de 8px, auxiliar de 4px */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 48px;
  --space-9: 64px;
  --space-10: 80px;
  --space-11: 96px;
  --space-12: 120px;
  --section-pad: clamp(var(--space-10), 6vw + 2rem, var(--space-12));

  /* Layout */
  --container: 1240px;
  --container-narrow: 760px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 64px;
  --header-offset: var(--space-4);
  --header-space: calc(var(--header-h) + var(--header-offset) * 2);   /* área ocupada pelo header flutuante */

  /* Bordas e raios */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Sombras */
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px -12px rgba(0, 0, 0, .18);
  --shadow-float: 0 24px 64px -24px rgba(0, 0, 0, .7);

  /* Camadas */
  --z-header: 50;
  --z-skip: 100;

  /* Movimento */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --duration-fast: 140ms;
  --duration-base: 240ms;
  --motion-reveal: 800ms;
  --ease-reveal: cubic-bezier(.16, 1, .3, 1);

  /* Cor de destaque usada como luz nos efeitos */
  /* Estado positivo (comparativo "Com a VEX") — fora da paleta da marca, uso restrito */
  --ok: #22A052;
  --ok-deep: #15803D;
  --ok-bright: #4ADE80;

  --glow-rgb: 204, 42, 27;      /* #CC2A1B */
  --glow-hot-rgb: 204, 42, 27;  /* #CC2A1B */
}

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

* { margin: 0; }

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

body {
  font-family: var(--font-family);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-on-light);
  background: var(--surface-dark);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: inherit; }

ul,
ol { padding: 0; list-style: none; }

strong, b { font-weight: 600; }
h1, h2, h3 { font-weight: 600; line-height: var(--lh-heading); text-wrap: balance; }
p { text-wrap: pretty; }

table { border-collapse: collapse; }

:focus-visible {
  outline: 2px solid var(--vex-red);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
.section--light :focus-visible,
.section--paper :focus-visible { outline-color: var(--vex-red-deep); }

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

/* COMPONENT: SKIP LINK — CANONICAL IMPLEMENTATION */
.skip-link {
  position: absolute;
  z-index: var(--z-skip);
  top: var(--space-2);
  left: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--vex-white);
  color: var(--vex-black);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* LAYOUT ------------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;   /* centralização do container: exceção técnica justificada */
  padding-inline: var(--gutter);
}

/* COMPONENT: SECTION SURFACES — CANONICAL IMPLEMENTATION */
.section {
  position: relative;
  padding-block: var(--section-pad);
  overflow: hidden;
}
.section--dark { background: var(--surface-dark); color: var(--text-on-dark); }
.section--raised { background: var(--surface-dark-raised); color: var(--text-on-dark); }
.section--light { background: var(--surface-light); color: var(--text-on-light); }
.section--paper { background: var(--surface-paper); color: var(--text-on-light); }
.section > .container { position: relative; z-index: 1; }

/* Textura de pontos (branco) e malha (papel) — textura-faixas */
.section--light.has-texture::before,
.section--paper.has-texture::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(130% 100% at 100% 0%, #000 0, rgba(0, 0, 0, .55) 38%, transparent 75%);
  mask-image: radial-gradient(130% 100% at 100% 0%, #000 0, rgba(0, 0, 0, .55) 38%, transparent 75%);
}
.section--light.has-texture::before {
  background-image: radial-gradient(circle, #b4b4bc 1.1px, transparent 1.5px);
  background-size: 22px 22px;
  background-position: right 0 top 0;
}
.section--paper.has-texture::before {
  background-image:
    linear-gradient(#d4d4d8 1px, transparent 1px),
    linear-gradient(90deg, #d4d4d8 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: right -1px top -1px;
}

/* COMPONENT: SECTION HEADING — CANONICAL IMPLEMENTATION */
.section-heading {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: var(--container-narrow);
}
.section-heading--center { align-items: center; text-align: center; margin-inline: auto; }
.section-heading__title { font-size: var(--fs-h2); letter-spacing: -.01em; }
.section-heading__text { font-size: var(--fs-lead); color: var(--text-on-light-muted); }
.section--dark .section-heading__text,
.section--raised .section-heading__text { color: var(--text-on-dark-muted); }
.text-accent { color: var(--accent-on-light); }
.section--dark .text-accent,
.section--raised .text-accent,
.hero .text-accent { color: var(--accent-on-dark); }

/* COMPONENT: EYEBROW — CANONICAL IMPLEMENTATION */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
.eyebrow__slash { color: var(--accent-on-light); }
.section--dark .eyebrow__slash,
.section--raised .eyebrow__slash,
.hero .eyebrow__slash { color: var(--accent-on-dark); }

/* COMPONENT: ICON — CANONICAL IMPLEMENTATION */
.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--sm { width: 18px; height: 18px; }
.icon--brand { fill: currentColor; stroke: none; }

/* COMPONENT: ICON TILE — CANONICAL IMPLEMENTATION */
.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: var(--radius-md);
  background: rgba(var(--glow-rgb), .1);
  color: var(--vex-red-deep);
}
.section--dark .icon-tile,
.section--raised .icon-tile {
  background: rgba(var(--glow-hot-rgb), .12);
  color: var(--vex-red);
}

/* COMPONENT: BUTTON — CANONICAL IMPLEMENTATION */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: 48px;
  padding: var(--space-3) var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--duration-base) var(--ease),
    border-color var(--duration-base) var(--ease),
    color var(--duration-base) var(--ease);
}
.button .icon { width: 20px; height: 20px; transition: transform var(--duration-base) var(--ease); }
.button--primary { background: var(--vex-red); color: var(--vex-white); }
.button--secondary { border-color: var(--line-on-light-strong); background: transparent; color: var(--text-on-light); }
.section--dark .button--secondary,
.section--raised .button--secondary,
.hero .button--secondary,
.site-header .button--secondary { border-color: var(--line-on-dark-strong); color: var(--text-on-dark); }
.button--sm { min-height: 40px; padding: var(--space-2) var(--space-4); font-size: var(--fs-small); }
.button:active { transform: translateY(1px); }

@media (hover: hover) and (pointer: fine) {
  .button--primary:hover { background: var(--vex-red-deep); }
  .button--secondary:hover { border-color: currentColor; }
  .button:hover .icon--arrow { transform: translateX(3px); }
}

/* COMPONENT: STAR BUTTON (StarBorder) — CANONICAL IMPLEMENTATION */
@property --ring-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@property --ring { syntax: "<color>"; inherits: false; initial-value: rgba(204, 42, 27, 0); }
@property --ring-core { syntax: "<color>"; inherits: false; initial-value: rgba(255, 255, 255, 0); }

.star {
  position: relative;
  display: inline-flex;
  padding: 1px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background:
    conic-gradient(from var(--ring-angle), transparent 0deg, transparent 200deg,
      var(--ring) 270deg, var(--ring-core) 315deg, var(--ring) 340deg, transparent 360deg),
    rgba(255, 255, 255, .14);
  animation: ring-spin 2.6s linear infinite;
  transition: --ring .4s, --ring-core .4s, box-shadow .4s;
}
.star:hover,
.star:focus-within {
  --ring: rgba(204, 42, 27, 1);
  --ring-core: rgba(255, 255, 255, 1);
  box-shadow: 0 0 22px -2px rgba(var(--glow-hot-rgb), .75), 0 0 60px -10px rgba(var(--glow-rgb), .55);
}
.star::before,
.star::after {
  content: "";
  position: absolute;
  width: 300%;
  height: 60%;
  background: radial-gradient(circle, #CC2A1B 0, rgba(204, 42, 27, .6) 12%, transparent 22%);
  opacity: .9;
  pointer-events: none;
}
.star::before { top: -12px; left: -250%; animation: star-top 5s linear infinite alternate; }
.star::after { right: -250%; bottom: -12px; animation: star-bottom 5s linear infinite alternate; }
.star:hover::before, .star:hover::after,
.star:focus-within::before, .star:focus-within::after { visibility: hidden; }

.star .button {
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: hidden;
  border-radius: 3px;
  background: var(--vex-white);
  color: var(--vex-black);
  transition: box-shadow .4s;
}
.star .button::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(204, 42, 27, .16) 45%,
    rgba(255, 255, 255, .9) 50%, rgba(204, 42, 27, .16) 55%, transparent 70%) no-repeat;
  background-position: 130% 0;
  background-size: 250% 100%;
  pointer-events: none;
}
.star:hover .button,
.star:focus-within .button {
  box-shadow: inset 0 0 0 1px rgba(var(--glow-rgb), .25), inset 0 0 22px rgba(var(--glow-hot-rgb), .28);
}
.star:hover .button::before,
.star:focus-within .button::before {
  background-position: -30% 0;
  transition: background-position .9s var(--ease);
}
.star .button:focus-visible { outline: 2px solid var(--vex-red); outline-offset: -5px; }

@keyframes ring-spin { to { --ring-angle: 360deg; } }
@keyframes star-top { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(100%); } }
@keyframes star-bottom { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(-100%); } }

/* COMPONENT: BADGE — CANONICAL IMPLEMENTATION */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line-on-dark-strong);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .04);
  color: var(--text-on-dark);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

/* COMPONENT: TAG — CANONICAL IMPLEMENTATION */
.tag-list { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--vex-red-deep);
  color: var(--vex-white);
  font-size: var(--fs-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* COMPONENT: STATUS DOT (ponto pulsante) — CANONICAL IMPLEMENTATION */
.status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-small);
  font-weight: 600;
}
.status-dot {
  position: relative;
  display: inline-block;
  flex: none;
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--vex-red);
  box-shadow: 0 0 10px var(--vex-red);
}
.status-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--vex-red);
  animation: ping 2.2s var(--ease) infinite;
}
@keyframes ping { from { transform: scale(1); opacity: .8; } to { transform: scale(3); opacity: 0; } }

/* COMPONENT: VEX STRIPE (grafismo diagonal) — CANONICAL IMPLEMENTATION */
.vex-stripe {
  position: absolute;
  z-index: 0;
  width: 520px;
  height: 64px;
  background:
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(255, 255, 255, .92) 22px 58px, transparent 58px 80px)
      center / 100% 12px no-repeat,
    var(--gradient-stripe);
  pointer-events: none;
}
.vex-stripe--bl { left: -180px; bottom: 40px; transform: rotate(40deg); transform-origin: center; }
.vex-stripe--tr { right: -200px; top: 56px; transform: rotate(40deg); }

/* COMPONENT: CARD — CANONICAL IMPLEMENTATION */
.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6);
  border: 1px solid var(--line-on-light);
  border-radius: var(--radius-md);
  background: var(--surface-light);
}
.card__title { font-size: var(--fs-h3); font-weight: 600; }
.card__text { color: var(--text-on-light-muted); }
.card--dark {
  border-color: var(--line-on-dark);
  background: var(--surface-dark-card);
  color: var(--text-on-dark);
}
.card--dark .card__text { color: var(--text-on-dark-muted); }

/* COMPONENT: FEATURE ITEM — CANONICAL IMPLEMENTATION */
.feature-list { display: flex; flex-direction: column; gap: var(--space-5); }
.feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}
.feature__body { display: flex; flex-direction: column; gap: var(--space-1); }
.feature__title { font-size: var(--fs-body); font-weight: 600; line-height: 1.35; }
.feature__text { font-size: var(--fs-small); color: var(--text-on-light-muted); }
.section--dark .feature__text,
.section--raised .feature__text { color: var(--text-on-dark-muted); }

/* COMPONENT: MEDIA FRAME — CANONICAL IMPLEMENTATION */
.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface-dark-card);
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--cut { border-radius: 0; clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%); }
/* Mesma forma com cantos arredondados onde o navegador suporta shape() */
@supports (clip-path: shape(from 0 0, line to 1px 1px)) {
  .media--cut {
    clip-path: shape(
      from calc(14% + var(--radius-lg)) 0,
      hline to calc(100% - var(--radius-lg)),
      arc to 100% var(--radius-lg) of var(--radius-lg) cw,
      vline to calc(100% - var(--radius-lg)),
      arc to calc(100% - var(--radius-lg)) 100% of var(--radius-lg) cw,
      hline to var(--radius-lg),
      curve to 3px calc(100% - var(--radius-lg)) with 0 100%,
      line to calc(14% - 3px) var(--radius-lg),
      curve to calc(14% + var(--radius-lg)) 0 with 14% 0,
      close
    );
  }
}

/* COMPONENT: SITE HEADER — CANONICAL IMPLEMENTATION */
.site-header {
  position: fixed;
  z-index: var(--z-header);
  top: var(--header-offset);
  left: 0;
  right: 0;
  color: var(--text-on-dark);
  pointer-events: none;   /* só a barra recebe cliques; as laterais transparentes não bloqueiam a página */
}
.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: var(--header-h);
  padding-inline: var(--space-4) var(--space-2);
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-lg);
  background: rgba(10, 10, 10, .72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px -16px rgba(0, 0, 0, .8);
  pointer-events: auto;
}
.site-header__logo { display: inline-flex; flex: none; }
.site-header__logo img { width: 104px; height: auto; }
.site-header__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-on-dark-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-on-dark);
  cursor: pointer;
}
.site-header__toggle .icon-close { display: none; }
.site-header__toggle[aria-expanded="true"] .icon-open { display: none; }
.site-header__toggle[aria-expanded="true"] .icon-close { display: block; }

.site-nav {
  position: absolute;
  top: calc(100% + var(--space-2));
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  gap: var(--space-5);
  padding: var(--space-4) var(--space-4) var(--space-5);
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-lg);
  background: var(--surface-dark-raised);
}
.site-nav.is-open { display: flex; }
.no-js .site-header { position: absolute; }
.no-js .site-nav { position: static; display: flex; padding-inline: 0; border: 0; background: none; }
.no-js .site-header__toggle { display: none; }
.no-js .site-header__inner { flex-wrap: wrap; padding-block: var(--space-2); }

.menu { position: relative; display: flex; flex-direction: column; }
.menu a {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: var(--space-2) var(--space-3);
  color: var(--text-on-dark-muted);
  font-size: var(--fs-body);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--duration-base) var(--ease);
}
.menu a[aria-current="true"] { color: var(--text-on-dark); }
@media (hover: hover) and (pointer: fine) {
  .menu a:hover { color: var(--text-on-dark); }
}

/* Header sem fundo sobre o hero; ganha fundo ao rolar (initHeaderScroll) */
.site-header--transparent .site-header__inner {
  transition: background-color .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.site-header--transparent:not(.is-scrolled) .site-header__inner {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* Indicador deslizante no menu */
.menu__indicator {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .06);
  opacity: 0;
  pointer-events: none;
  transition: transform .35s var(--ease), width .35s var(--ease), opacity .25s;
}
.menu__indicator::after {
  content: "";
  position: absolute;
  right: 20%;
  bottom: -1px;
  left: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--vex-red), transparent);
  box-shadow: 0 0 10px var(--vex-red);
}
.menu.is-hovering .menu__indicator { opacity: 1; }

@media (min-width: 1200px) {
  .site-header__toggle { display: none; }
  .site-nav,
  .no-js .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-5);
    padding: 0;
    border: 0;
    background: none;
  }
  .menu { flex-direction: row; align-items: center; }
  .menu a { min-height: 40px; font-size: var(--fs-small); white-space: nowrap; }
  .site-nav .button { white-space: nowrap; }
  .site-header__inner { padding-inline: var(--space-6) var(--space-3); }
  /* Menu centralizado na barra */
  .site-header--centered .menu { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
  .site-header__logo img { width: 116px; }
}

/* SEÇÕES ------------------------------------------------------------------ */

/* Hero — centralizado, foto ao fundo só nas bordas */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(100svh, 860px);
  padding-block: calc(var(--header-space) + var(--space-8)) var(--space-8);
  overflow: hidden;
  isolation: isolate;
  background: var(--surface-dark);
  color: var(--text-on-dark);
  text-align: center;
}
/* Foto: aparece nas laterais e na base; centro e topo ficam no preto/luz da marca */
.hero__bg { position: absolute; z-index: -3; inset: 0; pointer-events: none; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; opacity: .7; }
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(58% 62% at 50% 40%, #000 0%, rgba(0, 0, 0, .96) 38%, rgba(0, 0, 0, .7) 62%, rgba(0, 0, 0, .25) 88%, rgba(0, 0, 0, .1) 100%),
    linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .85) 25%, rgba(0, 0, 0, .2) 70%, rgba(0, 0, 0, .35) 100%);
}
.hero__glow {
  position: absolute;
  z-index: -2;
  inset: 0 0 auto;
  height: 820px;
  pointer-events: none;
  background:
    radial-gradient(38% 50% at 50% -6%, rgba(204, 42, 27, .75), rgba(204, 42, 27, .35) 45%, transparent 75%),
    radial-gradient(70% 60% at 50% 0%, rgba(167, 14, 11, .35), transparent 70%);
}
.hero__rays {
  position: absolute;
  z-index: -1;
  inset: -10% 15% auto;
  height: 80%;
  pointer-events: none;
  background: conic-gradient(from 160deg at 50% -8%, transparent 0deg, rgba(204, 42, 27, .14) 12deg, transparent 22deg, rgba(204, 42, 27, .1) 30deg, transparent 40deg, rgba(204, 42, 27, .12) 48deg, transparent 60deg, transparent 360deg);
  filter: blur(14px);
  animation: hero-rays 12s ease-in-out infinite alternate;
}
.hero__dust {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 520px;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 160, 150, .7) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(255, 160, 150, .45) 0 1px, transparent 1.6px);
  background-size: 140px 110px, 90px 130px;
  background-position: 0 0, 40px 60px;
  -webkit-mask-image: radial-gradient(45% 70% at 50% 0%, #000 0, transparent 80%);
  mask-image: radial-gradient(45% 70% at 50% 0%, #000 0, transparent 80%);
  animation: hero-dust 18s linear infinite;
}
@media (max-width: 759px) {
  .hero__glow {
    background:
      radial-gradient(95% 42% at 50% -4%, rgba(204, 42, 27, .75), rgba(204, 42, 27, .35) 45%, transparent 75%),
      radial-gradient(140% 55% at 50% 0%, rgba(167, 14, 11, .35), transparent 70%);
  }
  .hero__rays { inset: -10% -30% auto; }
  .hero__dust { -webkit-mask-image: radial-gradient(90% 70% at 50% 0%, #000 0, transparent 80%); mask-image: radial-gradient(90% 70% at 50% 0%, #000 0, transparent 80%); }
}
@keyframes hero-rays { from { opacity: .7; transform: rotate(-2deg); } to { opacity: 1; transform: rotate(2deg); } }
@keyframes hero-dust { to { background-position: 0 -110px, 40px -70px; } }

.hero__inner { display: flex; flex-direction: column; align-items: center; gap: var(--space-5); }
.hero__pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--text-on-dark);
  font-size: var(--fs-small);
  font-weight: 500;
}
.hero__title {
  max-width: 14ch;
  font-size: clamp(2.75rem, 1.5rem + 5vw, 6rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.035em;
}
.hero__title .text-accent { color: var(--accent-on-dark); }
.hero__text { max-width: 40rem; color: var(--text-on-dark-muted); font-size: var(--fs-lead); }
.hero__text strong { color: var(--text-on-dark); font-weight: 600; }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); padding-top: var(--space-3); }

/* Entrada em sequência (o H1 usa o BlurText) */
.hero__pill,
.hero__text,
.hero__actions { animation: hero-in .8s var(--ease) both; }
.hero__pill { animation-delay: .1s; }
.hero__text { animation-delay: .55s; }
.hero__actions { animation-delay: .75s; }
@keyframes hero-in {
  from { opacity: 0; filter: blur(6px); transform: translateY(14px); }
  to { opacity: 1; filter: none; transform: none; }
}
.is-offscreen .hero__rays,
.is-offscreen .hero__dust { animation-play-state: paused; }

/* Clientes dentro do hero: título à esquerda, faixa de logos à direita */
.hero__clients {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  max-width: 920px;
  margin-top: var(--space-7);   /* respiro entre os CTAs e a faixa de clientes */
  animation: hero-in .8s var(--ease) .95s both;
}
.hero__clients-title {
  flex: none;
  color: var(--text-on-dark-muted);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  line-height: 1.6;
  text-transform: uppercase;
}
.hero__clients .rail { flex: 1 1 auto; width: 100%; min-width: 0; }
.hero__clients .rail__track { animation-duration: 40s; }
.hero__clients .rail__item { padding: var(--space-2) var(--space-6); }
/* Logos em branco com transparência (versões geradas a partir dos arquivos originais) */
.client-logo { width: auto; height: 34px; opacity: .72; }
.client-logo.is-compact { height: 40px; }
@media (min-width: 960px) {
  .hero__clients { flex-direction: row; gap: var(--space-6); text-align: left; }
  .hero__clients-title { max-width: 11rem; }
}

/* COMPONENT: LOGO RAIL (LogoLoop) — CANONICAL IMPLEMENTATION */
.rail {
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.rail__track { display: flex; width: max-content; animation: loop 38s linear infinite; }
.rail:not(.rail--hero):hover .rail__track,
.rail:not(.rail--hero):focus-within .rail__track { animation-play-state: paused; }
.rail__group { display: flex; align-items: center; }
.rail__item { display: flex; align-items: center; justify-content: center; padding: var(--space-3) var(--space-8); }
@keyframes loop { to { transform: translateX(-50%); } }

/* Custo da parada — gatilho de perda */
.loss {
  isolation: isolate;
  padding-bottom: clamp(120px, 13vw, 240px);   /* espaço reservado para a palavra de fundo */
  background: linear-gradient(180deg, #000 0%, #000 22%, #2a0403 48%, #7a0a08 72%, #A70E0B 88%, #CC2A1B 100%);
  --la-accent: var(--vex-red);
  --la-accent-rgb: 204, 42, 27;
  color: var(--text-on-dark);
}
.loss .section-heading__text { color: var(--text-on-dark-muted); }
.loss__inner { display: flex; flex-direction: column; gap: var(--space-6); }
.loss__compare { display: flex; flex-direction: column; gap: var(--space-6); }
.loss__lead { color: var(--text-on-dark); font-size: var(--fs-h3); font-weight: 600; }
.loss__bg-word {
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: -.12em;
  transform: translateX(-50%);
  font-size: clamp(2.5rem, 10.6vw, 13rem);   /* cabe na largura: ~9em para 12 letras */
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.03em;
  text-transform: uppercase;
  white-space: nowrap;
  color: transparent;
  background: linear-gradient(180deg, rgba(255, 255, 255, .26) 0%, rgba(255, 255, 255, .04) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  pointer-events: none;
  user-select: none;
}

/* COMPONENT: LOSS BENTO — CANONICAL IMPLEMENTATION
   CSS Grid justificado: o card de destaque ocupa duas linhas (layout bidimensional). */
.loss-bento { display: grid; grid-template-columns: 1fr; gap: var(--space-4); }
.loss-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: var(--space-6);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-lg);
  background: rgba(10, 10, 10, .55);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.loss-card__title { font-size: var(--fs-h3); font-weight: 600; line-height: 1.3; }
.loss-art {
  height: 170px;
  /* ocupa a largura toda do card, encostando no topo e nas laterais */
  margin: calc(var(--space-6) * -1) calc(var(--space-6) * -1) 0;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background:
    radial-gradient(circle, rgba(255, 255, 255, .07) 1px, transparent 1.5px) 0 0 / 14px 14px,
    rgba(255, 255, 255, .02);
}
.loss-art svg { width: 100%; height: 100%; overflow: visible; }

.loss-card--hero {
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-7);
  background: var(--surface-light);
  color: var(--text-on-light);
  border-color: transparent;
}
.loss-stat {
  display: flex;
  align-items: flex-start;
  color: var(--vex-red);
  font-size: clamp(4.5rem, 3rem + 5vw, 7.5rem);
  font-weight: 600;
  line-height: .9;
  letter-spacing: -.05em;
  font-variant-numeric: tabular-nums;
  transition: color .6s var(--ease);
}
.loss-stat__unit { font-size: .5em; line-height: 1.15; letter-spacing: 0; }
.loss[data-state="ok"] .loss-stat { color: var(--ok-deep); }
.loss-card__hero-body { display: flex; flex-direction: column; gap: var(--space-4); }
.loss-card__hero-label { color: var(--vex-red-deep); font-size: var(--fs-small); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.loss-card__quote { font-size: clamp(1.375rem, 1.15rem + .7vw, 1.75rem); font-weight: 500; line-height: 1.35; }
.loss-card__quote strong { color: var(--vex-red); font-weight: 600; }

/* Ilustrações (estado base = estado final, para movimento reduzido) */
.la-line { fill: none; stroke: rgba(255, 255, 255, .75); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.la-soft { stroke: rgba(255, 255, 255, .25); }
.la-fill { fill: var(--la-accent); }
.la-label { fill: rgba(255, 255, 255, .6); font: 600 11px var(--font-family); letter-spacing: .08em; text-transform: uppercase; }
.la-hand { transform-box: view-box; transform-origin: 46px 60px; }
.la-hand--min { stroke: var(--la-accent); animation: spin 2.4s linear infinite; }
.la-hand--hour { animation: spin 14.4s linear infinite; }
.la-track { fill: rgba(255, 255, 255, .1); }
.la-bar { fill: var(--la-accent); transform-box: fill-box; transform-origin: left center; animation: overdue 4.5s var(--ease) infinite; }
.la-deadline { stroke: #fff; stroke-width: 2; stroke-dasharray: 4 4; }

.la-route { stroke: rgba(255, 255, 255, .3); stroke-width: 2; stroke-dasharray: 6 6; }
.la-truck { animation: truck-stall 4.5s var(--ease) infinite; transform: translateX(96px); }
.la-wheel { fill: #000; stroke: rgba(255, 255, 255, .75); stroke-width: 2.5; }
.la-hazard { fill: var(--la-accent); animation: blink .9s steps(2, end) infinite; }
.la-pin { transform-box: fill-box; transform-origin: center bottom; animation: pin-pulse 1.8s ease-in-out infinite; }
.la-pin .la-line { stroke: var(--la-accent); }
.la-pin__mark { fill: var(--la-accent); font: 600 16px var(--font-family); }

.la-stamp { transform-box: fill-box; transform-origin: center; transform: rotate(-12deg); animation: stamp 4.5s var(--ease) infinite; }
.la-stamp__box { fill: rgba(var(--la-accent-rgb), .16); stroke: var(--la-accent); stroke-width: 2.5; }
.la-stamp__text { fill: var(--la-accent); font: 600 16px var(--font-family); letter-spacing: .14em; }

.la-chart { fill: none; stroke: var(--la-accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100 100; stroke-dashoffset: 0; animation: draw 4.5s var(--ease) infinite; }
.la-chart-head { fill: none; stroke: var(--la-accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; animation: fade-late 4.5s var(--ease) infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes overdue {
  0% { transform: scaleX(0); fill: rgba(255, 255, 255, .8); }
  45% { fill: rgba(255, 255, 255, .8); }
  55%, 100% { transform: scaleX(1); fill: var(--la-accent); }
}
@keyframes truck-stall { 0% { transform: translateX(0); } 55%, 100% { transform: translateX(96px); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pin-pulse { 50% { transform: scale(1.08); } }
@keyframes stamp {
  0%, 30% { opacity: 0; transform: rotate(-12deg) scale(1.8); }
  45%, 100% { opacity: 1; transform: rotate(-12deg) scale(1); }
}
@keyframes draw { 0% { stroke-dashoffset: 100; } 60%, 100% { stroke-dashoffset: 0; } }
@keyframes fade-late { 0%, 55% { opacity: 0; } 65%, 100% { opacity: 1; } }

.is-offscreen .loss-art * { animation-play-state: paused; }

@media (min-width: 640px) {
  .loss-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .loss-card--hero { grid-column: 1 / -1; }
}
@media (min-width: 960px) {
  .loss-bento { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .loss-card--hero { grid-column: 3; grid-row: 1 / span 2; justify-content: space-between; gap: var(--space-8); padding: var(--space-8) var(--space-7); }
}

/* Estado "Com a VEX" ---------------------------------------------------- */
.loss:not([data-state="ok"]) [data-when="ok"],
.loss[data-state="ok"] [data-when="loss"] { display: none !important; }

.loss::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background: linear-gradient(180deg, #000 0%, #000 22%, #03200f 48%, #0b5a2a 72%, #15803D 88%, #22A052 100%);
  opacity: 0;
  transition: opacity .8s var(--ease);
  pointer-events: none;
}
.loss[data-state="ok"]::before { opacity: 1; }
.loss[data-state="ok"] {
  --la-accent: var(--ok-bright);
  --la-accent-rgb: 74, 222, 128;
}
.loss__title-break { display: block; }
.loss[data-state="ok"] .text-accent,
.loss[data-state="ok"] .eyebrow__slash { color: var(--ok-bright); }
.loss[data-state="ok"] .loss-card__hero-label,
.loss[data-state="ok"] .loss-card__quote strong { color: var(--ok-deep); }
.loss .text-accent,
.loss .eyebrow__slash,
.loss-card__hero-label,
.loss-card__quote strong { transition: color .6s var(--ease), stroke .6s var(--ease); }

.la-bar--ok { animation: fill-ok 4.5s var(--ease) infinite; }
.la-check { fill: none; stroke: #000; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.la-check--accent { stroke: var(--la-accent); }
.la-pop { transform-box: fill-box; transform-origin: center; animation: pop 4.5s var(--ease) infinite; }
.loss[data-state="ok"] .la-truck { transform: translateX(140px); animation-name: truck-arrive; }
.loss[data-state="ok"] .la-pin { animation-duration: 2.4s; }
.loss[data-state="ok"] .la-stamp { transform: rotate(-6deg); animation-name: stamp-ok; }
.loss[data-state="ok"] .la-hand--min { animation-duration: 6s; }
@keyframes fill-ok { 0% { transform: scaleX(0); } 50%, 100% { transform: scaleX(1); } }
@keyframes pop { 0%, 50% { opacity: 0; transform: scale(.4); } 62%, 100% { opacity: 1; transform: scale(1); } }
@keyframes truck-arrive { 0% { transform: translateX(0); } 60%, 100% { transform: translateX(140px); } }
@keyframes stamp-ok {
  0%, 30% { opacity: 0; transform: rotate(-6deg) scale(1.8); }
  45%, 100% { opacity: 1; transform: rotate(-6deg) scale(1); }
}

/* COMPONENT: SCENARIO SWITCH — CANONICAL IMPLEMENTATION */
.vex-switch-wrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }
.vex-switch {
  position: relative;
  display: flex;
  width: min(100%, 360px);
  padding: var(--space-1);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius-pill);
  background: rgba(10, 10, 10, .6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.vex-switch__thumb {
  position: absolute;
  top: var(--space-1);
  bottom: var(--space-1);
  left: var(--space-1);
  width: calc(50% - var(--space-1));
  border-radius: var(--radius-pill);
  background: var(--vex-red);
  transition: transform .45s var(--ease), background-color .45s var(--ease);
}
.loss[data-state="ok"] .vex-switch__thumb { transform: translateX(100%); background: var(--ok-deep); }
.vex-switch__tab {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-height: 48px;
  padding: var(--space-2) var(--space-4);
  border: 0;
  border-radius: var(--radius-pill);
  background: none;
  color: var(--text-on-dark-muted);
  font: inherit;
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .3s var(--ease);
}
.vex-switch__tab[aria-selected="true"] { color: var(--vex-white); }
.vex-switch__tab:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.vex-switch__hint {
  position: absolute;
  bottom: calc(100% + var(--space-2));
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-1);
  color: var(--text-on-dark);
  font-size: var(--fs-small);
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity .4s var(--ease);
  animation: hint-float 2.4s ease-in-out infinite alternate;
}
.vex-switch__arrow { width: 30px; height: 30px; margin-right: 72px; fill: none; stroke: var(--ok-bright); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.loss.has-switched .vex-switch__hint { opacity: 0; visibility: hidden; transition: opacity .4s, visibility 0s .4s; }
@keyframes hint-float { from { transform: translateY(0); } to { transform: translateY(-5px); } }
.no-js .vex-switch-wrap { display: none; }
.vex-switch-wrap { padding-top: var(--space-10); }   /* celular: espaço para a dica acima do seletor */

@media (min-width: 760px) {
  .vex-switch-wrap { padding-top: 0; }
  /* Dica ao lado direito, um pouco acima, com a seta descendo até "Com a VEX" */
  .vex-switch__hint {
    top: calc(var(--space-6) * -1);
    bottom: auto;
    right: auto;
    left: calc(100% + var(--space-2));
    flex-direction: row-reverse;
    align-items: flex-start;
    gap: var(--space-2);
    text-align: left;
  }
  .vex-switch__arrow { flex: none; width: 36px; height: 36px; margin: var(--space-3) 0 0; }
}

/* Quem somos */
.about__top { display: flex; flex-direction: column; gap: var(--space-8); }
.about__content { display: flex; flex-direction: column; gap: var(--space-5); }
.about__text { display: flex; flex-direction: column; gap: var(--space-4); color: var(--text-on-dark-muted); font-size: var(--fs-lead); }
.about__visual .media { aspect-ratio: 4 / 3; }

/* Carrossel de diferenciais: largura total, passa por cima da imagem */
.about__rail {
  position: relative;
  z-index: 2;
  margin-top: calc(var(--space-8) * -1);   /* sobreposição intencional à imagem */
  /* Sem mask-image aqui: ela anularia o backdrop-filter dos cards. As bordas usam véus pretos. */
  -webkit-mask-image: none;
  mask-image: none;
}
.about__rail::before,
.about__rail::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  width: 10%;
  pointer-events: none;
}
.about__rail::before { left: 0; background: linear-gradient(90deg, var(--surface-dark), transparent); }
.about__rail::after { right: 0; background: linear-gradient(270deg, var(--surface-dark), transparent); }
.about__rail .rail__track { animation-duration: 48s; }
.about__rail .rail__group { align-items: stretch; gap: var(--space-4); padding-right: var(--space-4); }

.about-feature {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 300px;
  flex: none;
  padding: var(--space-6);
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-md);
  background: rgba(14, 14, 14, .62);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  backdrop-filter: blur(18px) saturate(120%);
}
.about-feature { --spot: rgba(204, 42, 27, .14); }
.about-feature .icon-tile { margin-bottom: var(--space-2); }   /* respiro extra entre ícone e título */
.about-feature__title { font-size: var(--fs-h3); font-weight: 600; line-height: 1.25; }
.about-feature__text { color: var(--text-on-dark-muted); font-size: var(--fs-small); }

@media (min-width: 960px) {
  .about__top { flex-direction: row; align-items: stretch; gap: var(--space-10); }
  .about__content { flex: 1 1 44%; padding-bottom: calc(var(--space-11) + var(--space-6)); }   /* área livre sob o carrossel sobreposto */
  .about__visual { flex: 1 1 56%; }
  .about__visual .media { height: 100%; min-height: 520px; aspect-ratio: auto; }
  .about__rail { margin-top: calc(var(--space-11) * -1); }
  .about-feature { width: 340px; }
}
@media (prefers-reduced-motion: reduce) {
  .about__rail { overflow-x: auto; }
  .about__rail .rail__track { animation: none; }
}

/* Soluções */
.solutions__layout { display: flex; flex-direction: column; gap: var(--space-8); }
.solutions__intro { display: flex; flex-direction: column; gap: var(--space-6); }
.solutions__intro .media { aspect-ratio: 4 / 3; }
.service-grid { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.service-grid > li { display: flex; flex: 1 1 100%; }

/* Mobile: soluções e etapas viram carrossel de arraste (scroll-snap nativo, sem JS) */
@media (max-width: 639px) {
  .service-grid,
  .flow__steps {
    flex-direction: row;
    flex-wrap: nowrap;
    margin-inline: calc(var(--gutter) * -1);   /* o carrossel encosta nas bordas da tela */
    padding: var(--space-2) var(--gutter) var(--space-4);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .service-grid::-webkit-scrollbar,
  .flow__steps::-webkit-scrollbar { display: none; }
  .service-grid > li,
  .flow__steps > .step { flex: 0 0 84%; scroll-snap-align: start; }
}
.service-card { flex: 1; box-shadow: var(--shadow-card); }
.service-card .card__text { font-size: var(--fs-small); }
.service-card__meta { font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--accent-on-light); }

@media (min-width: 640px) {
  .service-grid > li { flex-basis: calc(50% - var(--space-4) / 2); }
}
@media (min-width: 1080px) {
  .solutions__layout { flex-direction: row; align-items: flex-start; gap: var(--space-9); }
  .solutions__intro { position: sticky; top: calc(var(--header-space) + var(--space-4)); flex: 0 0 34%; }
  .solutions__intro .media { aspect-ratio: 3 / 4; }
  .service-grid { flex: 1 1 66%; }
}

/* Oficina móvel */
.mobile-unit { background: var(--surface-dark); }
/* COMPONENT: BRAND GRADIENT BACKGROUND — Oficina Móvel e Próximo passo */
.bg-brand { isolation: isolate; }
/* Fundo em degradê da marca (imagem) */
.bg-brand::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: url("../images/fundo-gradiente-vex.webp") center / cover no-repeat;
}
/* Textura: retícula de pontos + granulado, só na área iluminada */
.bg-brand::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(circle, rgba(255, 210, 190, .55) 0 1.1px, transparent 1.6px) 0 0 / 7px 7px;
  mix-blend-mode: overlay;
  opacity: .7;
  -webkit-mask-image: radial-gradient(70% 75% at 88% 0%, #000 0, rgba(0, 0, 0, .6) 40%, transparent 75%);
  mask-image: radial-gradient(70% 75% at 88% 0%, #000 0, rgba(0, 0, 0, .6) 40%, transparent 75%);
}
.mobile-unit__inner { display: flex; flex-direction: column; gap: var(--space-8); }
.mobile-unit__head { display: flex; flex-direction: column; gap: var(--space-5); }
.mobile-unit__text { max-width: 760px; color: var(--text-on-dark-muted); font-size: var(--fs-lead); }
.mobile-unit__text strong { color: var(--text-on-dark); font-weight: 600; }
.mobile-unit__visual { position: relative; }
.mobile-unit__visual .media { aspect-ratio: 4 / 3; }

/* COMPONENT: FIELD BAR — CANONICAL IMPLEMENTATION */
.field-bar {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin: calc(var(--space-8) * -1) var(--space-3) 0;   /* sobreposição intencional à imagem */
  padding: var(--space-5);
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-md);
  background: rgba(10, 10, 10, .72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.field-bar__status { color: var(--text-on-dark); font-size: var(--fs-body); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.field-bar__list { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.field-bar__list li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .08);
  font-size: var(--fs-small);
  font-weight: 600;
}
.field-bar__list .icon { color: var(--vex-red); }

@media (min-width: 960px) {
  .mobile-unit__visual .media { aspect-ratio: 21 / 9; }
  .field-bar {
    position: absolute;
    left: var(--space-6);
    right: var(--space-6);
    bottom: var(--space-6);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: var(--space-4) var(--space-5);
  }
}

/* Modelos de atendimento */
.models__head { display: flex; flex-direction: column; gap: var(--space-6); }
.models__visual img { width: 100%; height: auto; }

/* COMPONENT: MODELS PANEL — CANONICAL IMPLEMENTATION */
.models-panel {
  position: relative;
  margin-top: var(--space-8);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(60% 90% at 100% 0%, rgba(167, 14, 11, .55), transparent 70%),
    radial-gradient(45% 70% at 0% 100%, rgba(204, 42, 27, .18), transparent 70%),
    var(--surface-dark);
  color: var(--text-on-dark);
}
.model-list { position: relative; z-index: 1; display: flex; flex-wrap: wrap; }
.model {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  flex: 1 1 100%;
  padding: var(--space-7) var(--space-6);
  --spot: rgba(204, 42, 27, .1);
}
.model + .model { border-top: 1px solid var(--line-on-dark); }
.model .icon-tile {
  width: 56px;
  height: 56px;
  background: var(--vex-red);
  color: var(--vex-white);
}
.model .icon-tile .icon { width: 28px; height: 28px; }
.model__title { font-size: var(--fs-h3); font-weight: 600; }
.model__text { color: var(--text-on-dark-muted); font-size: var(--fs-small); }

@media (min-width: 960px) {
  .models__head { flex-direction: row; align-items: center; gap: var(--space-9); }
  .models__head .section-heading { flex: 1 1 42%; }
  .models__visual { flex: 1 1 58%; margin-right: calc(var(--space-5) * -1); }   /* recorte respira até a borda do container */
  .model { flex-basis: calc(100% / 3); padding: var(--space-8) var(--space-7); }
  .model + .model { border-top: 0; border-left: 1px solid var(--line-on-dark); }
}

/* Gestão por ativo */
.asset { background: var(--surface-dark-raised); }
.asset__inner { display: flex; flex-direction: column; }
.asset__top { display: flex; flex-direction: column; gap: var(--space-8); }
.asset__content { display: flex; flex-direction: column; gap: var(--space-6); }
.asset__visual .media { aspect-ratio: 16 / 10; }

/* COMPONENT: ASSET CARDS — três boxes lado a lado sobrepondo a imagem */
.asset-cards {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: calc(var(--space-8) * -1);   /* sobreposição intencional à imagem */
  padding-inline: var(--space-3);
}
.asset-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1 1 100%;
  padding: var(--space-6);
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-lg);
  background: rgba(14, 14, 14, .62);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  backdrop-filter: blur(18px) saturate(120%);
  --spot: rgba(204, 42, 27, .14);
}
.asset-card .icon-tile { margin-bottom: var(--space-2); }   /* respiro extra entre ícone e título */
.asset-card__title { font-size: var(--fs-h3); font-weight: 600; line-height: 1.3; }
.asset-card__text { color: var(--text-on-dark-muted); font-size: var(--fs-small); }

@media (min-width: 760px) {
  .asset-card { flex-basis: calc((100% - var(--space-4) * 2) / 3); }
}
@media (min-width: 960px) {
  .asset__top { flex-direction: row; align-items: stretch; gap: var(--space-10); }
  .asset__content { flex: 1 1 42%; justify-content: center; padding-bottom: var(--space-11); }   /* área livre sob os boxes */
  .asset__visual { flex: 1 1 58%; }
  .asset__visual .media { height: 100%; min-height: 460px; aspect-ratio: auto; }
  .asset-cards { margin-top: calc(var(--space-11) * -1); padding-inline: 0; }
}

/* Diferenciais — tabela comparativa */
.compare { display: flex; flex-direction: column; gap: var(--space-8); }

/* COMPONENT: COMPARISON TABLE — CANONICAL IMPLEMENTATION */
.compare-table { width: 100%; font-size: var(--fs-small); }
.compare-table caption { text-align: left; }
.compare-table thead { display: none; }
.compare-table tbody { display: flex; flex-direction: column; gap: var(--space-4); }
.compare-table tr {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-on-light);
  border-radius: var(--radius-md);
  background: var(--surface-light);
}
.compare-table th[scope="row"] {
  padding: var(--space-4) var(--space-5);
  background: var(--vex-black);
  color: var(--vex-white);
  font-size: var(--fs-body);
  font-weight: 600;
  text-align: left;
}
.compare-table td {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--line-on-light);
  color: var(--text-on-light-muted);
}
.compare-table td::before {
  content: attr(data-label);
  flex: none;
  color: var(--text-on-light);
  font-weight: 600;
}
.compare-table td.is-vex {
  background: rgba(var(--glow-rgb), .06);
  color: var(--vex-red-deep);
  font-weight: 600;
}
.compare-table td > span { display: inline-flex; align-items: center; gap: var(--space-2); text-align: right; }

@media (min-width: 860px) {
  .compare-table { display: table; border-spacing: 0; font-size: var(--fs-body); }
  .compare-table thead { display: table-header-group; }
  .compare-table tbody { display: table-row-group; }
  .compare-table tr { display: table-row; border: 0; background: none; }
  .compare-table th,
  .compare-table td { display: table-cell; padding: var(--space-5); border-top: 1px solid var(--line-on-light); text-align: left; vertical-align: middle; }
  .compare-table td::before { content: none; }
  .compare-table thead th {
    border-top: 0;
    background: var(--vex-black);
    color: var(--vex-white);
    font-size: var(--fs-small);
    font-weight: 600;
  }
  .compare-table thead th:first-child { border-radius: var(--radius-md) 0 0 0; }
  .compare-table thead th.is-vex { border-radius: 0 var(--radius-md) 0 0; background: var(--vex-red-deep); }
  .compare-table th[scope="row"] { background: none; color: var(--text-on-light); font-size: var(--fs-body); }
  .compare-table td > span { text-align: left; }
}

/* Chamada final */
.cta { background: var(--surface-dark); }
/* Contraste sobre o degradê: véu escuro atrás do texto (esquerda) e dos cards (base) */
.cta .container { position: relative; }
.cta .section-heading__text { color: rgba(255, 255, 255, .82); }
.cta > .container { display: flex; flex-direction: column; gap: var(--space-9); }

/* COMPONENT: PROCESS FLOW (feixe na linha) — CANONICAL IMPLEMENTATION */
.flow { position: relative; }
.flow__steps { position: relative; z-index: 1; display: flex; flex-direction: column; gap: var(--space-4); }
@media (max-width: 639px) {
  .flow__steps { flex-direction: row; }   /* carrossel de arraste (regras em .service-grid, .flow__steps) */
  .flow__steps > .step { flex: 0 0 84%; }
}
.step {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-md);
  background: var(--surface-dark-raised);
}
.step__label { font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--accent-on-dark); }
.step__title { font-size: var(--fs-h3); font-weight: 600; }
.step__text { font-size: var(--fs-small); color: var(--text-on-dark-muted); }
.flow__beam {
  position: absolute;
  z-index: 0;
  top: 2.75rem;
  left: var(--space-6);
  right: var(--space-6);
  display: none;
  height: 1px;
  overflow: hidden;
  background: #27272a;
}
.flow__beam::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 22%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--vex-red), #fff, var(--vex-red), transparent);
  box-shadow: 0 0 12px var(--vex-red);
  animation: beam 4.5s var(--ease) infinite;
}
@keyframes beam { from { transform: translateX(-100%); } to { transform: translateX(480%); } }

.contact-grid { display: flex; flex-wrap: wrap; gap: var(--space-4); }

/* COMPONENT: CONTACT CARD — CANONICAL IMPLEMENTATION */
.contact-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex: 1 1 100%;
  padding: var(--space-5);
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-md);
  background: rgba(14, 14, 14, .88);
  color: var(--text-on-dark);
  text-decoration: none;
  transition: border-color var(--duration-base) var(--ease);
}
.contact-card__body { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.contact-card__label { font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-on-dark-muted); }
.contact-card__value { font-size: var(--fs-body); font-weight: 600; overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) {
  .contact-card:hover { border-color: var(--vex-red); }
}

.cta__main { display: flex; flex-direction: column; gap: var(--space-8); }
.cta__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }

@media (min-width: 640px) {
  .contact-card { flex: 1 1 auto; }
}
@media (min-width: 960px) {
  .flow__steps { flex-direction: row; }
  .flow__beam { display: block; }
  .cta__main { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: var(--space-10); }
  .cta__main .section-heading { flex: 1 1 60%; }
}

/* Footer */
.site-footer {
  padding-block: var(--space-9) var(--space-6);
  border-top: 1px solid var(--line-on-dark);
  background: var(--surface-dark);
  color: var(--text-on-dark-muted);
  font-size: var(--fs-small);
}
.site-footer__top { display: flex; flex-direction: column; gap: var(--space-8); }
.site-footer__brand { display: flex; flex-direction: column; gap: var(--space-4); max-width: 22rem; }
.site-footer__brand img { width: 180px; height: auto; }
.site-footer__claim { color: var(--text-on-dark); font-size: var(--fs-h3); font-weight: 600; text-transform: uppercase; }
.site-footer__cols { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.site-footer__col { display: flex; flex-direction: column; gap: var(--space-3); min-width: 12rem; }
.site-footer__title { color: var(--text-on-dark); font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; }
.site-footer__links { display: flex; flex-direction: column; gap: var(--space-2); }
.site-footer a { text-decoration: none; text-underline-offset: 4px; }
.site-footer a:hover { color: var(--text-on-dark); text-decoration: underline; }
.site-footer__links a { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 32px; }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-6);
  border-top: 1px solid var(--line-on-dark);
}
@media (min-width: 960px) {
  .site-footer__top { flex-direction: row; justify-content: space-between; }
}
.site-footer > .container { display: flex; flex-direction: column; gap: var(--space-8); }

/* EFEITOS ----------------------------------------------------------------- */

/* Título palavra a palavra (BlurText) */
.word { display: inline-block; animation: blur-in .9s var(--ease) both; }
@keyframes blur-in {
  from { opacity: 0; filter: blur(10px); transform: translateY(-.25em); }
  to { opacity: 1; filter: none; transform: none; }
}

/* Borda e spotlight seguindo o cursor (MagicBento) */
.glow { position: relative; isolation: isolate; }
.glow::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: radial-gradient(22rem circle at var(--mx, 50%) var(--my, -20%),
    #CC2A1B 0, rgba(204, 42, 27, .35) 35%, transparent 65%);
  opacity: var(--glow, 0);
  pointer-events: none;
  transition: opacity .35s var(--ease);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.glow::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(28rem circle at var(--mx, 50%) var(--my, 50%),
    var(--spot, rgba(204, 42, 27, .05)), transparent 60%);
  opacity: var(--glow, 0);
  pointer-events: none;
  transition: opacity .35s var(--ease);
}

/* Fade-up com blur no scroll */
.js .reveal {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(1.5rem);
  transition:
    opacity var(--motion-reveal) var(--ease-reveal),
    filter var(--motion-reveal) var(--ease-reveal),
    transform var(--motion-reveal) var(--ease-reveal);
}
.js .reveal { transition-delay: var(--reveal-delay, 0ms); }
.js .reveal[data-delay="1"] { --reveal-delay: 80ms; }
.js .reveal[data-delay="2"] { --reveal-delay: 160ms; }
/* Títulos de seção: palavras esperam a entrada na tela */
.js .reveal-words .word { animation-play-state: paused; }
.js .reveal-words.is-visible .word { animation-play-state: running; }
.js .reveal.is-visible { opacity: 1; filter: none; transform: none; }

/* Pausa de efeitos contínuos fora da tela */
.is-offscreen .flow__beam::after,
.is-offscreen .rail__track,
.is-offscreen .star,
.is-offscreen .star::before,
.is-offscreen .star::after,
.is-offscreen .status-dot::after { animation-play-state: paused; }

/* MOVIMENTO REDUZIDO ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
  }
  .js .reveal { opacity: 1; filter: none; transform: none; }
}
