.builds-page {
  --builds-ink: #191d1a;
  --builds-deep: #111713;
  --builds-soft: #28332c;
  --builds-orange: #ff4500;
  --builds-white: #f5f5f1;
  --builds-muted: #b9c2b5;
  --builds-line: rgba(255, 255, 255, 0.14);
  min-width: 300px;
  color: var(--builds-white);
  background: var(--builds-ink);
}

.builds-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(17, 23, 19, 0.98) 0%, rgba(25, 29, 26, 0.9) 55%, rgba(25, 29, 26, 0.45) 100%),
    url("/builds/thumbs/20220513_154340.webp") center 56% / cover;
}

.builds-hero::after {
  position: absolute;
  right: -90px;
  bottom: -130px;
  width: 400px;
  height: 400px;
  content: "";
  border: 54px solid rgba(255, 69, 0, 0.12);
  transform: rotate(22deg);
}

.builds-heroInner {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(72px, 12vw, 148px) 0 clamp(76px, 10vw, 126px);
}

.builds-eyebrow {
  margin: 0 0 12px;
  color: var(--builds-orange);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 2.4px;
  text-transform: uppercase;
}

.builds-hero h1,
.builds-galleryHeading h2 {
  margin: 0;
  font-family: var(--display);
  line-height: 0.9;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.builds-hero h1 { font-size: clamp(82px, 17vw, 210px); }
.builds-galleryHeading h2 { font-size: clamp(44px, 6vw, 78px); }

.builds-heroCopy {
  max-width: 670px;
  margin: 28px 0 0;
  color: #cbd0c9;
  font-size: clamp(17px, 2vw, 23px);
  line-height: 1.55;
}

.builds-heroRule {
  display: block;
  width: min(190px, 40vw);
  height: 8px;
  margin-top: 38px;
  background: var(--builds-orange);
  transform: skew(-22deg);
}

.builds-gallerySection {
  padding: clamp(60px, 9vw, 118px) clamp(14px, 4vw, 64px) clamp(80px, 10vw, 130px);
  background:
    radial-gradient(circle at 15% 0%, rgba(40, 51, 44, 0.8), transparent 34%),
    var(--builds-deep);
}

.builds-galleryHeading {
  display: flex;
  max-width: 1500px;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto 34px;
}

.builds-count { margin: 0 0 7px; color: var(--builds-muted); font-weight: 700; text-transform: uppercase; }

.builds-filters {
  display: flex;
  max-width: 1500px;
  gap: 8px;
  margin: 0 auto 28px;
}

.builds-filter {
  padding: 11px 18px;
  color: var(--builds-muted);
  background: transparent;
  border: 1px solid var(--builds-line);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.builds-filter:hover { color: var(--builds-white); border-color: rgba(255, 69, 0, 0.7); }
.builds-filterActive { color: #111713; background: var(--builds-orange); border-color: var(--builds-orange); }

.builds-gallery {
  display: grid;
  max-width: 1500px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 12px;
  margin: 0 auto;
}

.builds-tile {
  position: relative;
  min-height: 220px;
  padding: 0;
  overflow: hidden;
  color: var(--builds-white);
  background: var(--builds-soft);
  border: 0;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
}

.builds-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms ease, filter 420ms ease;
}

.builds-tile:hover img,
.builds-tile:focus-visible img { filter: saturate(1.08); transform: scale(1.045); }
.builds-tile:focus-visible { outline: 3px solid var(--builds-orange); outline-offset: 3px; }

.builds-viewer {
  width: min(96vw, 1500px);
  height: min(94vh, 980px);
  max-width: none;
  max-height: none;
  padding: 0;
  color: var(--builds-white);
  background: rgba(14, 20, 16, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.72);
}

.builds-viewer::backdrop { background: rgba(8, 12, 9, 0.9); backdrop-filter: blur(8px); }
.builds-viewerStage { display: grid; width: 100%; height: calc(100% - 78px); padding: 30px 70px 14px; place-items: center; }
.builds-viewerStage img { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }

.builds-viewerClose,
.builds-viewerArrow {
  position: absolute;
  z-index: 3;
  color: var(--builds-white);
  background: rgba(25, 29, 26, 0.8);
  border: 1px solid var(--builds-line);
  cursor: pointer;
}

.builds-viewerClose { top: 14px; right: 14px; width: 46px; height: 46px; font-size: 32px; line-height: 1; }
.builds-viewerArrow { top: 50%; width: 50px; height: 70px; font-size: 42px; transform: translateY(-50%); }
.builds-viewerPrev { left: 12px; }
.builds-viewerNext { right: 12px; }
.builds-viewerClose:hover,
.builds-viewerArrow:hover { color: #111713; background: var(--builds-orange); border-color: var(--builds-orange); }

.builds-viewerCaption {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 26px;
  border-top: 1px solid var(--builds-line);
}

.builds-viewerPosition { margin: 0; color: var(--builds-muted); font-size: 12px; font-weight: 700; }

@media (max-width: 620px) {
  .builds-heroInner { width: min(100% - 28px, 1320px); }
  .builds-galleryHeading { align-items: start; flex-direction: column; }
  .builds-count { margin: 0; }
  .builds-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .builds-tile { min-height: 0; }
  .builds-viewer { width: 100vw; height: 100vh; border: 0; }
  .builds-viewerStage { height: calc(100% - 90px); padding: 62px 10px 10px; }
  .builds-viewerArrow { top: auto; bottom: 18px; width: 44px; height: 50px; transform: none; }
  .builds-viewerPrev { left: 14px; }
  .builds-viewerNext { right: 14px; }
  .builds-viewerCaption { min-height: 90px; justify-content: center; padding: 14px 70px; text-align: center; }
  .builds-viewerPosition { display: none; }
}

.builds-tile { display: block; }
.builds-viewerStage { min-height: 0; }
.builds-viewerStage img { min-height: 0; }
.builds-filter[aria-pressed="true"] { color: #111713; background: #ff4500; border-color: #ff4500; }
.site-header [aria-current="page"] { border-bottom: 3px solid #ff4500; }
body:has(.builds-viewer[open]) { overflow: hidden; }
@media (max-width: 620px) { .builds-viewer { height: 100dvh; } }

.builds-filters[hidden] { display: none; }

.builds-groups { max-width: 1500px; margin: 0 auto; }
.builds-vehicle + .builds-vehicle { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--builds-line); }
.builds-viewerArrow[hidden] { display: none; }
.builds-tile { min-width: 0; min-height: 0; width: 100%; }
.builds-viewerCaption { justify-content: center; }
.builds-viewerPosition { display: block; }
@media (max-width: 620px) {
  .builds-vehicle + .builds-vehicle { margin-top: 28px; padding-top: 28px; }
}
