@import url("https://fonts.googleapis.com/css2?family=Exo:wght@400;600&family=Inter:wght@600&display=swap");

html {
  scroll-padding-top: var(--header-height);
}

.feature-showcase {
  width: min(calc(100% - 256px), 1680px);
  margin: 0 auto;
  color: #000f19;
}

.feature-showcase-layout {
  display: grid;
  grid-template-columns: clamp(8.5rem, 10vw, 10rem) minmax(0, 1fr);
  grid-template-columns: 231px 1424px;
  align-items: start;
  gap: 25px;
}

.feature-shortcuts {
  --corner-radius: 8px;
  position: sticky;
  top: 50vh;
  z-index: 5;
  width: 231px;
  margin: 50vh 0 0;
  padding: 14px 12px 14px 14px;
  display: flex;
  flex-direction: column;
  align-self: start;
  transform: translate(-18px, -50%);
  color: #fcfcfc;
  background: rgb(0 15 25 / 30%);
  border: 0;
  border-radius: var(--corner-radius);
  box-shadow: none;
  overflow: visible;
  font-family: Exo, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

.feature-shortcuts strong,
.feature-shortcuts-heading,
.feature-shortcuts a[href="#formats"],
.feature-shortcuts-rule::before,
.feature-shortcuts-rule::after,
.feature-shortcuts-rule > a {
  --corner-radius: 4px;
  box-sizing: border-box;
  width: 205px;
  height: 29px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  color: #e1e1e1;
  background: #30333a;
  border: 0;
  border-radius: var(--corner-radius);
  font-family: Exo, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 29px;
  text-decoration: none;
  white-space: nowrap;
}

.feature-shortcuts strong,
.feature-shortcuts-heading {
  order: 0;
  margin: 0 0 3px;
  padding-inline: 22px;
  cursor: pointer;
  text-align: left;
}

.feature-shortcuts-heading:hover,
.feature-shortcuts-heading:focus-visible {
  color: #fff;
  background: #30333a;
}

.feature-shortcuts > a {
  --corner-radius: 4px;
  order: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  width: 205px;
  height: 27px;
  padding: 0 22px;
  color: #fcfcfc;
  background: transparent;
  border-radius: var(--corner-radius);
  font-family: Exo, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 27px;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 120ms ease,
    background-color 120ms ease;
}

.feature-shortcuts > a:hover {
  color: #fff;
  background: rgb(255 255 255 / 16%);
}

.feature-shortcuts > a.is-active {
  color: #fcfcfc;
  background: #0091c8;
  font-weight: 600;
}

.feature-shortcuts > a.is-active:hover {
  color: #fcfcfc;
  background: #0091c8;
}

.feature-shortcuts a[href="#render-image"] {
  font-size: 0;
}

.feature-shortcuts a[href="#render-image"]::after {
  content: "Post Processing";
  font-size: 16px;
}

.feature-shortcuts a[href="#formats"] {
  order: 1;
  margin-top: 5px;
}

.feature-shortcuts a[href="#formats"]:hover,
.feature-shortcuts-rule > a:hover {
  color: #fff;
  background: #30333a;
}

.feature-shortcuts-rule {
  order: 2;
  box-sizing: border-box;
  width: 205px;
  margin-top: 8px;
  padding-bottom: 9px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  background: transparent;
  border-bottom: 1px solid rgb(48 51 58 / 55%);
}

.feature-shortcuts-rule::before {
  content: "Interface";
}

.feature-shortcuts-rule::after {
  content: "Workflows";
}

.feature-shortcuts-rule.is-enhanced::before,
.feature-shortcuts-rule.is-enhanced::after {
  display: none;
  content: none;
}

.feature-shortcuts > a:nth-of-type(8) {
  order: 3;
  width: 205px;
  height: 22px;
  margin-top: 10px;
  padding: 0;
  color: #fcfcfc;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}

.feature-shortcuts > a[href="/docs/"] {
  order: 4;
  width: 205px;
  height: 22px;
  padding: 0;
  color: #fcfcfc;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}

.feature-shortcuts > a:nth-of-type(8):hover,
.feature-shortcuts > a[href="/docs/"]:hover {
  color: #fff !important;
  background: transparent;
}

.feature-shortcuts-top:hover {
  color: #0055a5 !important;
  background: transparent;
}

.feature-shortcuts-top {
  order: 5 !important;
  width: 205px !important;
  height: 22px !important;
  margin-top: 21px !important;
  padding: 0 !important;
  justify-content: flex-end;
  color: #30333a !important;
  background: transparent !important;
  font-family: Exo, sans-serif;
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 22px !important;
  white-space: nowrap;
}

.feature-showcase-list {
  width: 1424px;
  min-width: 0;
}

.feature-showcase-row {
  display: grid;
  grid-template-columns: 478px 920px;
  grid-template-areas: "copy media";
  align-items: center;
  gap: 26px;
  width: 1424px;
  min-height: 100svh;
  scroll-margin-top: var(--header-height);
}

.feature-showcase-row.is-media-first {
  grid-template-columns: 920px 478px;
  grid-template-areas: "media copy";
}

.feature-showcase-copy {
  grid-area: copy;
  width: 478px;
  min-width: 0;
}

.feature-showcase-copy h3 {
  width: 478px;
  max-width: none;
  margin: 0;
  color: #000f19;
  font-family: Inter, sans-serif;
  font-size: 42px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.feature-showcase-copy p {
  width: 478px;
  max-width: none;
  margin: 12px 0 0;
  color: #30333a;
  font-family: Exo, sans-serif;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.feature-showcase-media {
  --corner-radius: 16px;
  grid-area: media;
  width: 920px;
  height: 640.64px;
  min-width: 0;
  margin-inline: auto;
  justify-self: center;
  overflow: hidden;
  background: #111821;
  border-radius: var(--corner-radius);
  box-shadow: none;
  line-height: 0;
}

.feature-showcase-media img,
.feature-showcase-media video,
.feature-showcase-media--wide video {
  display: block;
  width: 920px;
  height: 640.64px;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
}

.feature-material-cycle {
  position: relative;
}

.feature-material-preview {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: feature-material-preview 4.5s ease-in-out infinite;
}

.feature-material-preview:nth-child(2) {
  animation-delay: -3s;
}

.feature-material-preview:nth-child(3) {
  animation-delay: -1.5s;
}

@keyframes feature-material-preview {
  0%,
  28% {
    opacity: 1;
  }

  33.333%,
  94% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.feature-showcase-row:first-child .feature-showcase-media {
  align-self: center;
}

@media (max-width: 118rem) {
  .feature-showcase {
    width: min(100% - 4rem, 105rem);
  }

  .feature-showcase-layout {
    grid-template-columns: 231px minmax(0, 1fr);
    gap: 25px;
  }

  .feature-showcase-list,
  .feature-showcase-row {
    width: 100%;
  }

  .feature-showcase-row {
    grid-template-columns: minmax(18rem, 1fr) minmax(0, 1.925fr);
    gap: 1.35vw;
  }

  .feature-showcase-row.is-media-first {
    grid-template-columns: minmax(0, 1.925fr) minmax(18rem, 1fr);
  }

  .feature-showcase-copy,
  .feature-showcase-copy h3,
  .feature-showcase-copy p {
    width: auto;
  }

  .feature-showcase-media {
    width: min(920px, 100%);
    height: auto;
    aspect-ratio: 920 / 640.64;
    justify-self: center;
    margin-inline: auto;
  }

  .feature-showcase-media img,
  .feature-showcase-media video,
  .feature-showcase-media--wide video {
    width: 100%;
    height: 100%;
  }
}

@media (max-width: 68rem) {
  .feature-showcase {
    width: min(100% - 2.5rem, 92rem);
  }

  .feature-showcase-layout {
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 3.5vw, 4rem);
  }

  .feature-shortcuts {
    --corner-radius: 8px;
    position: relative;
    top: auto;
    width: 100%;
    margin-top: 2.5rem;
    padding: 0.85rem 0.9rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem 0.8rem;
    transform: none;
    border-radius: var(--corner-radius);
  }

  .feature-shortcuts strong,
  .feature-shortcuts-heading,
  .feature-shortcuts > a,
  .feature-shortcuts-rule,
  .feature-shortcuts a[href="#formats"],
  .feature-shortcuts-rule::before,
  .feature-shortcuts-rule::after,
  .feature-shortcuts-rule > a {
    width: auto;
    height: auto;
    min-height: 0;
  }

  .feature-shortcuts strong,
  .feature-shortcuts-heading {
    grid-column: 1 / -1;
    padding: 0.3rem 0.6rem;
    line-height: 1.2;
  }

  .feature-shortcuts > a {
    padding: 0.12rem 0.62rem;
    line-height: 1.25;
  }

  .feature-shortcuts a[href="#formats"] {
    display: block;
    padding: 0.3rem 0.6rem;
    line-height: 1.2;
  }

  .feature-shortcuts-rule {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
    padding-bottom: 0.4rem;
  }

  .feature-shortcuts-rule::before,
  .feature-shortcuts-rule::after,
  .feature-shortcuts-rule > a {
    display: block;
    padding: 0.3rem 0.6rem;
    line-height: 1.2;
  }

  .feature-shortcuts > a:nth-of-type(8),
  .feature-shortcuts > a[href="/docs/"],
  .feature-shortcuts-top {
    width: auto !important;
    height: auto !important;
    padding: 0.12rem 0.62rem !important;
    line-height: 1.25 !important;
  }

  .feature-shortcuts-top {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .feature-showcase-row,
  .feature-showcase-row.is-media-first {
    grid-template-columns: minmax(15rem, 0.62fr) minmax(0, 1.38fr);
    min-height: clamp(28rem, 58vw, 42rem);
  }

  .feature-showcase-row.is-media-first {
    grid-template-columns: minmax(0, 1.38fr) minmax(15rem, 0.62fr);
  }

  .feature-showcase-copy h3 {
    font-size: clamp(2rem, 4vw, 2.625rem);
  }

  .feature-showcase-copy p {
    font-size: clamp(1rem, 2.2vw, 1.625rem);
  }
}

@media (max-width: 48rem) {
  .feature-showcase {
    width: min(100% - 1.25rem, 92rem);
  }

  .feature-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    font-size: 0.75rem;
  }

  .feature-showcase-row,
  .feature-showcase-row.is-media-first {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "copy"
      "media";
    gap: 1.25rem;
    min-height: 0;
    padding-block: 3rem;
  }

  .feature-showcase-copy h3 {
    max-width: 20ch;
    font-size: clamp(1.65rem, 8vw, 2.45rem);
  }

  .feature-showcase-copy p {
    max-width: 40ch;
    margin-top: 0.75rem;
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feature-showcase video {
    display: none;
  }

  .feature-material-preview {
    animation: none;
    opacity: 1;
  }

  .feature-material-preview:not(:first-child) {
    display: none;
  }

  .feature-showcase-media--wide {
    min-height: clamp(10rem, 28vw, 15rem);
    background: #111821 url("/assets/screenshots/main_overview.webp") center / cover no-repeat;
  }

  #animation-playback .feature-showcase-media {
    background: #111821 url("/assets/screenshots/animation.webp") center / cover no-repeat;
  }

  #render-pass-inspection .feature-showcase-media {
    background: #111821 url("/assets/screenshots/normal_pass.webp") center / cover no-repeat;
  }

  #uv-inspection .feature-showcase-media {
    background: #111821 url("/assets/screenshots/uv_map_view.webp") center / cover no-repeat;
  }
}