/* Tratorcena — abertura curta, uma vez por sessão. */
.brand-intro {
  display: none;
}

html.brand-intro-pending .brand-intro {
  display: grid;
  position: fixed;
  inset: 0;
  z-index: 10000;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  background: #faf9f6;
}

.brand-intro__arrival {
  width: min(780px, 88vw);
  position: relative;
  opacity: 0;
}

.brand-intro__logo {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.brand-intro__wheel {
  transform-origin: 952px 429px;
}

.brand-intro__ground {
  position: absolute;
  bottom: 12%;
  left: 5%;
  width: 90%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #b7b2a7 35%, #b7b2a7 65%, transparent);
  opacity: .35;
}

.brand-intro--running {
  animation: intro-reveal 400ms ease 5600ms forwards;
}

.brand-intro--running .brand-intro__arrival {
  animation: intro-drive 1350ms cubic-bezier(.16, .65, .24, 1) both;
}

.brand-intro--running .brand-intro__chassis {
  animation: intro-rumble 1350ms linear both;
}

.brand-intro--running .brand-intro__wheel {
  animation: intro-roll 1350ms cubic-bezier(.16, .65, .24, 1) both;
}

@keyframes intro-drive {
  from {
    opacity: 1;
    transform: translateX(calc(-50vw - 100%));
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes intro-roll {
  from {
    transform: rotate(-720deg);
  }

  to {
    transform: rotate(0);
  }
}

@keyframes intro-rumble {

  0%,
  16%,
  32%,
  48%,
  64% {
    transform: translateY(0);
  }

  8%,
  24%,
  40%,
  56% {
    transform: translateY(-2px);
  }

  76% {
    transform: translateY(-1px);
  }

  90%,
  100% {
    transform: translateY(0);
  }
}

@keyframes intro-reveal {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.brand-intro-pending .brand-intro {
    display: none;
  }

  .brand-intro,
  .brand-intro * {
    animation: none !important;
  }
}

/* Texto aparece após a chegada, com tempo de leitura antes da saída. */
.brand-intro__stage {
  width: min(780px, 88vw);
  text-align: center;
}

.brand-intro__stage .brand-intro__arrival {
  width: 100%;
}

.brand-intro__copy {
  padding: 8px 12px 0;
  font-family: Arial, Helvetica, sans-serif;
}

.brand-intro__headline {
  margin: 0;
  color: #26282b;
  font-size: clamp(23px, 3.7vw, 36px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -.025em;
  opacity: 0;
}

.brand-intro__headline span {
  color: #ba1526;
}

.brand-intro__description {
  max-width: 510px;
  margin: 18px auto 0;
  color: #55565a;
  font-size: clamp(15px, 2vw, 19px);
  line-height: 1.55;
  text-wrap: balance;
  opacity: 0;
}

.brand-intro--running .brand-intro__headline {
  animation: intro-copy-in 600ms ease-out 1200ms both;
}

.brand-intro--running .brand-intro__description {
  animation: intro-copy-in 600ms ease-out 1550ms both;
}

@keyframes intro-copy-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-height: 480px) {
  .brand-intro__stage {
    width: min(540px, 80vw);
  }

  .brand-intro__headline {
    font-size: 23px;
  }

  .brand-intro__description {
    margin-top: 10px;
    font-size: 15px;
  }
}

/* Mais energia na chegada, sem prejudicar a leitura da marca. */
html.brand-intro-pending .brand-intro {
  background: radial-gradient(ellipse at 50% 44%, #fff 0%, #fff9f5 45%, #eddfd8 100%);
}

.brand-intro::before,
.brand-intro::after {
  content: '';
  position: absolute;
  pointer-events: none;
  width: 34vw;
  height: 140vh;
  background: linear-gradient(180deg, #ee1933, #970f21);
  transform: skewX(-18deg);
  opacity: .95;
}

.brand-intro::before {
  left: -31vw;
  top: -20vh;
}

.brand-intro::after {
  right: -32vw;
  top: -20vh;
}

.brand-intro__stage {
  position: relative;
  z-index: 1;
}

.brand-intro__speed {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.brand-intro__speed i {
  position: absolute;
  left: 0;
  top: 43%;
  width: 28vw;
  height: 3px;
  background: linear-gradient(90deg, transparent, #d5102a);
  opacity: 0;
}

.brand-intro__speed i:nth-child(2) {
  top: 49%;
  width: 19vw;
  height: 2px;
}

.brand-intro__speed i:nth-child(3) {
  top: 55%;
  width: 35vw;
  height: 1px;
}

.brand-intro--running .brand-intro__speed i {
  animation: intro-speed 850ms ease-in 100ms 2 both;
}

.brand-intro--running .brand-intro__speed i:nth-child(2) {
  animation-delay: 250ms;
}

.brand-intro--running .brand-intro__speed i:nth-child(3) {
  animation-delay: 400ms;
}

.brand-intro--running::before {
  animation: intro-edge-left 1000ms cubic-bezier(.2, .7, .2, 1) both;
}

.brand-intro--running::after {
  animation: intro-edge-right 1000ms cubic-bezier(.2, .7, .2, 1) 150ms both;
}

.brand-intro--running .brand-intro__arrival {
  animation: intro-drive-bold 1450ms both;
}

.brand-intro--running .brand-intro__chassis {
  animation: intro-rumble-bold 1450ms linear both;
}

.brand-intro__logo {
  filter: drop-shadow(0 12px 9px #54291b18);
}

.brand-intro__ground {
  height: 3px;
  background: linear-gradient(90deg, transparent, #c4152b 35%, #c4152b 65%, transparent);
  opacity: .55;
}

.brand-intro--running .brand-intro__ground {
  animation: intro-ground 800ms ease-out 1050ms both;
}

.brand-intro__headline {
  font-weight: 800;
}

.brand-intro__headline span {
  display: inline-block;
  position: relative;
}

.brand-intro__headline span::after {
  content: '';
  display: block;
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: -9px;
  height: 3px;
  background: #ce1730;
  transform: scaleX(0);
}

.brand-intro--running .brand-intro__headline span::after {
  animation: intro-underline 650ms ease-out 1900ms forwards;
}

.brand-intro__description {
  margin-top: 27px;
  color: #3d3f42;
}

@keyframes intro-drive-bold {
  0% {
    opacity: 1;
    transform: translateX(calc(-50vw - 100%)) scale(.95);
    animation-timing-function: cubic-bezier(.15, .65, .25, 1);
  }

  76% {
    opacity: 1;
    transform: translateX(16px) scale(1.035);
    animation-timing-function: ease-in-out;
  }

  90% {
    opacity: 1;
    transform: translateX(-4px) scale(.995);
    animation-timing-function: ease-out;
  }

  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes intro-rumble-bold {

  0%,
  20%,
  40%,
  60%,
  100% {
    transform: translateY(0) rotate(0)
  }

  10%,
  30%,
  50% {
    transform: translateY(-4px) rotate(-.35deg)
  }

  72% {
    transform: translateY(-2px) rotate(.3deg)
  }

  88% {
    transform: translateY(1px) rotate(-.15deg)
  }
}

@keyframes intro-speed {
  0% {
    transform: translateX(-35vw);
    opacity: 0;
  }

  20% {
    opacity: .5;
  }

  100% {
    transform: translateX(110vw);
    opacity: 0;
  }
}

@keyframes intro-edge-left {
  from {
    transform: translateX(-15vw) skewX(-18deg);
  }

  to {
    transform: translateX(0) skewX(-18deg);
  }
}

@keyframes intro-edge-right {
  from {
    transform: translateX(15vw) skewX(-18deg);
  }

  to {
    transform: translateX(0) skewX(-18deg);
  }
}

@keyframes intro-ground {
  from {
    transform: scaleX(.2);
    opacity: 0;
  }

  to {
    transform: scaleX(1);
    opacity: .55;
  }
}

@keyframes intro-underline {
  to {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {

  .brand-intro::before,
  .brand-intro::after,
  .brand-intro *::after {
    animation: none !important;
  }
}

/* A marca termina a viagem na posição real da logo do cabeçalho. */
html.brand-intro-pending .brand-intro {
  background: transparent;
}

.brand-intro__backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 44%, #fff 0%, #fff9f5 45%, #eddfd8 100%);
  transition: opacity 850ms ease;
}

.brand-intro--running {
  animation: none;
}

.brand-intro__copy {
  font-family: Inter, Arial, sans-serif;
}

.brand-intro__headline {
  font-family: Archivo, Arial, sans-serif;
}

.brand-intro--docking .brand-intro__backdrop,
.brand-intro--docking::before,
.brand-intro--docking::after {
  opacity: 0;
  transition: opacity 650ms ease;
}

.brand-intro--docking .brand-intro__copy,
.brand-intro--docking .brand-intro__ground {
  opacity: 0;
  transition: opacity 220ms ease;
}

.brand-intro--docking .brand-intro__ground {
  animation: none;
}

.brand-intro--docking .brand-intro__logo {
  filter: none;
}

html.brand-intro-pending #headerLogo {
  opacity: 0;
}

html.brand-intro-pending .hero-grid {
  opacity: 0;
  transform: translateY(14px);
}

html.brand-intro-docking .hero-grid {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 700ms ease, transform 700ms ease;
}

html.brand-intro-pending:not(.brand-intro-docking) .hero .fade-up {
  animation-play-state: paused;
}

.brand-intro__backdrop {
  z-index: 0;
}

.brand-intro::before,
.brand-intro::after,
.brand-intro__speed {
  z-index: 1;
}

.brand-intro__stage {
  z-index: 2;
}

/* Mantém toda a marca dentro da tela em celulares estreitos. */
@media (max-width: 480px) {
  .brand-intro__stage {
    width: calc(100vw - 32px);
  }

  .brand-intro__stage .brand-intro__arrival {
    width: 100%;
    max-width: 100%;
  }

  .brand-intro__chassis {
    width: 100%;
    overflow: hidden;
  }

  .brand-intro__logo {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .brand-intro__copy {
    padding-inline: 4px;
  }

  .brand-intro__headline {
    font-size: 21px;
  }

  .brand-intro__description {
    max-width: 310px;
    font-size: 15px;
  }

  .brand-intro::before,
  .brand-intro::after {
    width: 44vw;
  }

  .brand-intro::before {
    left: -42vw;
  }

  .brand-intro::after {
    right: -43vw;
  }
}