/*
 * This data is highly confidential and entirely the personal creation and property of
 * Vlad Tanasescu, born 5th of December 1996 in Bucharest, Romania. This document,
 * information, concepts, and all the code are confidential, proprietary IP, and may not
 * be copied, distributed, or used.
 */

.library-category-bar,
.engineering-library-section {
  --engineering-bg: var(--paper, #e8eae0);
  --engineering-surface: var(--raised, #f2f4ec);
  --engineering-line: rgba(22, 24, 28, .12);
  --engineering-line-strong: rgba(22, 24, 28, .24);
  --engineering-text: #16181c;
  --engineering-muted: #565d65;
  --engineering-blue: #1a7a9a;
  box-sizing: border-box;
  color-scheme: light;
}

.library-category-bar *,
.engineering-library-section * {
  box-sizing: border-box;
}

.library-category-bar {
  position: relative;
  z-index: 20;
  margin-top: 34px;
  padding: 27px 24px 0;
  border-bottom: 1px solid var(--engineering-line);
  background: var(--engineering-bg);
}

.library-category-tabs {
  display: flex;
  width: min(1460px, 100%);
  margin: 0 auto;
  gap: clamp(24px, 6vw, 76px);
  overflow-x: auto;
  scrollbar-width: none;
}

.library-category-tabs::-webkit-scrollbar {
  display: none;
}

.library-category-tabs button {
  position: relative;
  flex: 0 0 auto;
  min-height: 58px;
  padding: 0 0 18px;
  border: 0;
  background: transparent;
  color: rgba(22, 24, 28, .56);
  cursor: pointer;
  font: inherit;
  font-size: clamp(15px, 1.7vw, 20px);
  font-weight: 720;
  letter-spacing: -.02em;
  white-space: nowrap;
  transition: color .18s ease;
}

.library-category-tabs button:hover,
.library-category-tabs button:focus-visible,
.library-category-tabs button.is-active {
  color: var(--engineering-text);
}

.library-category-tabs button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--engineering-blue);
  content: "";
  opacity: 0;
  transform: scaleX(.35);
  transition: opacity .18s ease, transform .18s ease;
}

.library-category-tabs button.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.library-category-tabs button:focus-visible,
.engineering-library-section button:focus-visible,
.engineering-library-section a:focus-visible {
  outline: 2px solid var(--engineering-blue);
  outline-offset: 3px;
}

.library-filtered-section[hidden] {
  display: none !important;
}

.engineering-library-section {
  position: relative;
  padding: 28px 0 48px;
  overflow: clip;
  background: var(--engineering-bg);
  color: var(--engineering-text);
}

.engineering-library-section--ambitious {
  padding-bottom: 72px;
  border-top: 1px solid var(--engineering-line);
}

.engineering-library-shell {
  width: min(1460px, calc(100% - 48px));
  margin: 0 auto;
}

.engineering-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: 22px;
}

.engineering-product-card {
  display: flex;
  height: 100%;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--engineering-line);
  border-radius: 20px;
  background: var(--engineering-surface);
  box-shadow: 0 8px 28px rgba(22, 24, 28, .055);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.engineering-product-card:hover {
  z-index: 2;
  border-color: var(--engineering-line-strong);
  transform: translateY(-4px);
  box-shadow: 0 22px 52px rgba(22, 24, 28, .13);
}

.engineering-card-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, .92), transparent 48%),
    #eef0f5;
  isolation: isolate;
}

.engineering-card-three,
.engineering-card-render {
  position: absolute;
  inset: 0;
}

.engineering-card-three {
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, .92), transparent 48%),
    #eef0f5;
  transition: opacity .16s ease;
}

.engineering-card-stage.is-ready.three-active .engineering-card-three {
  opacity: 1;
  pointer-events: auto;
}

.engineering-card-three forge-viewer {
  width: 100%;
  height: 100%;
  background: #eef0f5;
  cursor: grab;
  --poster-color: #eef0f5;
  --progress-bar-color: #54b8dc;
  --progress-bar-height: 2px;
}

.engineering-card-three forge-viewer:active {
  cursor: grabbing;
}

.engineering-card-render {
  z-index: 1;
  display: block;
  background: #eef0f5;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 1;
  transition: opacity .16s ease;
}

.engineering-card-stage.is-ready.three-active .engineering-card-render {
  opacity: 0;
  pointer-events: none;
}

.engineering-card-render img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  transform: scale(var(--poster-scale, 1));
  transform-origin: center;
}

.engineering-card-render img.is-retrying,
.engineering-card-render img.is-unavailable {
  opacity: 0;
}

.engineering-card-stage.render-active .engineering-card-render {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.engineering-card-stage.render-active .engineering-card-three {
  display: none;
}

.engineering-card-topline {
  position: absolute;
  top: 14px;
  right: 14px;
  left: 14px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  pointer-events: none;
}

.engineering-card-pill {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(13, 13, 15, .66);
  color: rgba(255, 255, 255, .90);
  font-size: 9px;
  font-weight: 820;
  letter-spacing: .075em;
  text-transform: uppercase;
  backdrop-filter: blur(11px);
}

.engineering-card-loading {
  position: absolute;
  width: 1px;
  height: 1px;
  z-index: 4;
  overflow: hidden;
  clip-path: inset(50%);
  color: #565e68;
  white-space: nowrap;
}

.engineering-card-stage.is-error .engineering-card-loading {
  inset: 0;
  display: grid;
  width: auto;
  height: auto;
  place-items: center;
  padding: 24px;
  clip-path: none;
  background: rgba(238, 240, 245, .94);
  color: #8d2e37;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  white-space: normal;
}

.engineering-view-switch,
.engineering-card-toolbar {
  position: absolute;
  bottom: 12px;
  z-index: 8;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .19);
  border-radius: 11px;
  background: rgba(15, 15, 17, .75);
  backdrop-filter: blur(12px);
}

.engineering-view-switch {
  left: 12px;
}

.engineering-card-toolbar {
  right: 12px;
}

.engineering-view-switch button,
.engineering-card-toolbar button {
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, .70);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 780;
}

.engineering-view-switch button {
  min-width: 58px;
  padding: 0 10px;
}

.engineering-card-toolbar button {
  width: 32px;
  padding: 0;
  font-size: 15px;
}

.engineering-view-switch button.is-active {
  background: rgba(255, 255, 255, .15);
  color: white;
}

.engineering-card-toolbar button[aria-pressed="true"] {
  background: rgba(84, 184, 220, .72);
  color: white;
}

.engineering-view-switch button:hover,
.engineering-card-toolbar button:hover {
  background: rgba(255, 255, 255, .12);
  color: white;
}

.engineering-card-stage.render-active .engineering-card-toolbar {
  display: none;
}

.engineering-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 23px 22px 20px;
}

.engineering-card-body h3 {
  display: -webkit-box;
  min-height: 50px;
  overflow: hidden;
  margin: 0;
  color: var(--engineering-text);
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -.025em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.engineering-card-body p {
  display: -webkit-box;
  height: 56px;
  min-height: 56px;
  overflow: hidden;
  margin: 9px 0 16px;
  color: var(--engineering-muted);
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.engineering-card-proof {
  display: flex;
  margin: 0 0 18px;
}

.engineering-card-proof span {
  padding: 5px 8px;
  border: 1px solid var(--engineering-line);
  border-radius: 999px;
  color: rgba(22, 24, 28, .64);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: .03em;
}

.engineering-step-download {
  display: inline-flex;
  width: 100%;
  min-height: 40px;
  margin-top: auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid var(--engineering-line);
  border-radius: 10px;
  background: transparent;
  color: var(--engineering-muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 760;
  text-decoration: none;
}

.engineering-step-download:hover {
  border-color: var(--engineering-line-strong);
  background: rgba(255, 255, 255, .045);
  color: var(--engineering-text);
}

@media (max-width: 1120px) {
  .engineering-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .library-category-bar {
    padding-right: 14px;
    padding-left: 14px;
  }

  .library-category-tabs {
    gap: 28px;
  }

  .engineering-library-shell {
    width: min(100% - 28px, 1460px);
  }

  .engineering-product-grid {
    grid-template-columns: 1fr;
  }
}
