:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  color: #2e3540;
  background: #fff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --accent: #2eb3a8;
  --body-text: #69727f;
  --line: #e8edf0;
  --tab-count: 7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

main {
  width: min(100% - 48px, 1240px);
  margin: 0 auto;
}

.motor {
  min-height: 370px;
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  align-items: center;
  gap: 42px;
  padding: 32px 0 26px;
}

.motor__copy {
  max-width: 610px;
}

.eyebrow {
  margin: 0 0 18px;
  color: #b9c1cb;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 500;
}

h1,
h2,
p {
  margin-top: 0;
}

.motor h1,
.feature-detail h2 {
  margin-bottom: 16px;
  color: #2e3540;
  font-size: 29px;
  line-height: 1.22;
  font-weight: 700;
}

.motor__description,
.feature-detail__copy p {
  margin-bottom: 0;
  color: var(--body-text);
  font-size: 16px;
  line-height: 1.62;
}

.motor__image {
  display: block;
  width: 100%;
  height: 330px;
  object-fit: cover;
}

.features {
  padding: 14px 0 36px;
}

.feature-navigation {
  position: relative;
  margin-bottom: 40px;
}

.feature-viewport {
  overflow: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.feature-viewport::-webkit-scrollbar {
  display: none;
}

.feature-tabs {
  display: flex;
  align-items: stretch;
}

.feature-tab {
  flex: 0 0 calc(100% / var(--tab-count));
  min-width: 0;
  min-height: 145px;
  padding: 0 8px 10px;
  border: 0;
  border-bottom: 2px solid var(--line);
  background: transparent;
  color: var(--body-text);
  cursor: pointer;
  text-align: center;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  transition: color 160ms ease, border-color 160ms ease;
}

.feature-tab:hover,
.feature-tab[aria-selected="true"] {
  color: var(--accent);
}

.feature-tab[aria-selected="true"] {
  border-bottom-color: var(--accent);
}

.feature-tab:focus-visible,
.navigation-arrow:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.feature-tab__icon {
  display: block;
  width: 32px;
  height: 32px;
  margin: 0 auto 12px;
  border-radius: 6px;
}

.navigation-arrow {
  position: absolute;
  z-index: 1;
  top: 46px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #edf0f3;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 26px rgb(52 64 77 / 8%);
  color: #2e3540;
  cursor: pointer;
  font-size: 27px;
  line-height: 1;
}

.navigation-arrow[hidden] {
  display: none;
}

.navigation-arrow--previous {
  left: -21px;
  visibility: hidden;
}

.navigation-arrow--previous.is-visible {
  visibility: visible;
}

.navigation-arrow--next {
  right: -21px;
}

.feature-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 56px;
  padding: 0 0 0 0;
}

.feature-detail__image {
  display: block;
  width: 100%;
  height: 380px;
  object-fit: cover;
}

.feature-detail__copy {
  padding-top: 1px;
}

.feature-detail h2 {
  margin-bottom: 16px;
}

@media (max-width: 1000px) {
  :root {
    --tab-count: 4;
  }

  .motor {
    min-height: 0;
    gap: 28px;
  }

  .motor__image {
    height: 290px;
  }

  .feature-detail {
    gap: 32px;
  }

  .feature-detail__image {
    height: 340px;
  }
}

@media (max-width: 700px) {
  :root {
    --tab-count: 3;
  }

  main {
    width: min(100% - 32px, 560px);
  }

  .motor,
  .feature-detail {
    grid-template-columns: 1fr;
  }

  .motor {
    gap: 22px;
    padding-top: 25px;
  }

  .motor__image {
    height: auto;
    aspect-ratio: 600 / 338;
  }

  .motor h1,
  .feature-detail h2 {
    font-size: 25px;
  }

  .features {
    padding-top: 18px;
  }

  .feature-navigation {
    margin-bottom: 26px;
  }

  .feature-tab {
    min-height: 130px;
    padding-inline: 5px;
    font-size: 14px;
  }

  .feature-tab__icon {
    width: 30px;
    height: 30px;
    margin-bottom: 9px;
  }

  .navigation-arrow {
    top: 42px;
    width: 36px;
    height: 36px;
  }

  .navigation-arrow--previous {
    left: -13px;
  }

  .navigation-arrow--next {
    right: -13px;
  }

  .feature-detail {
    gap: 24px;
  }

  .feature-detail__image {
    height: auto;
    aspect-ratio: 582 / 388;
  }
}

@media (max-width: 420px) {
  :root {
    --tab-count: 2;
  }

  main {
    width: min(100% - 28px, 380px);
  }

  .motor__description,
  .feature-detail__copy p {
    font-size: 15px;
  }

  .feature-tab {
    min-height: 122px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
