.mech-intro {
  padding-top: .5rem;
  padding-bottom: .5rem;
}

.mech-intro .mech-page-title {
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  line-height: 1.15;
}

.mech-intro .hs-subtitle {
  margin-top: .25rem;
  padding: 4px 5px;
  font-size: .7rem;
}

.mech-intro .hs-blurb {
  font-size: .85rem;
}

@media (min-width: 768px) {
  .mech-intro {
    padding-top: .65rem;
    padding-bottom: .65rem;
  }
}

.mech-panel {
  position: relative;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.mech-panel--cider { --mech-accent-rgb: 61, 123, 245; }
.mech-panel--coldshoulder { --mech-accent-rgb: 34, 217, 242; }
.mech-panel--linwood { --mech-accent-rgb: 224, 151, 63; }
.mech-panel--gigatear { --mech-accent-rgb: 214, 48, 58; }
.mech-panel--lasereater { --mech-accent-rgb: 45, 189, 155; }
.mech-panel--sydney { --mech-accent-rgb: 132, 94, 224; }

.mech-panel-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.mech-panel-bg::before {
  content: "";
  position: absolute;
  inset: -15% -10%;
  background: linear-gradient(
    115deg,
    transparent 38%,
    rgba(var(--mech-accent-rgb), .32) 52%,
    rgba(var(--mech-accent-rgb), .12) 64%,
    transparent 78%
  );
}

.mech-panel-bg::after {
  content: "";
  position: absolute;
  right: -8%;
  bottom: -14%;
  width: 60%;
  height: 115%;
  background-repeat: no-repeat;
  background-position: bottom right;
  background-size: contain;
  filter: grayscale(1) brightness(1.6) blur(1px);
  opacity: .14;
  transform: scale(1.2);
}

.mech-panel--cider .mech-panel-bg::after { background-image: url("../_img/_mechs/cidermayer-s-full.png"); }
.mech-panel--coldshoulder .mech-panel-bg::after { background-image: url("../_img/_mechs/coldshoulder-e-full.png"); }
.mech-panel--linwood .mech-panel-bg::after { background-image: url("../_img/_mechs/linwood-s-full.png"); }
.mech-panel--gigatear .mech-panel-bg::after { background-image: url("../_img/_mechs/gigatear-f-full.png"); }
.mech-panel--lasereater .mech-panel-bg::after { background-image: url("../_img/_mechs/lasereater-a-full.png"); }
.mech-panel--sydney .mech-panel-bg::after { background-image: url("../_img/_mechs/sydney-s-full.png"); }

.mech-panel-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  min-height: clamp(420px, 62vh, 680px);
  padding: 1.5rem clamp(1.25rem, 6vw, 4.5rem);
  box-sizing: border-box;
}

.mech-panel-media {
  flex: 0 1 auto;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 100%;
  min-width: 0;
}

.mech-img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: clamp(320px, 67vh, 620px);
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .35));
}

.mech-panel-copy {
  flex: 0 1 420px;
  max-width: 520px;
  min-width: 0;
  text-align: right;
}

.mech-eyebrow {
  margin: 0 0 .35rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .3em;
  text-transform: uppercase;
  opacity: .65;
}

.mech-name {
  margin: 0;
  font-size: clamp(1.75rem, 4.2vw, 3.25rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.01em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

@media (max-width: 767.98px) {
  .mech-panel-inner {
    flex-direction: column;
    justify-content: flex-start;
    text-align: center;
    min-height: auto;
    padding-top: .5rem;
    padding-bottom: 1.5rem;
  }

  .mech-panel-copy {
    order: 1;
    flex: 0 0 auto;
    max-width: 100%;
    text-align: center;
  }

  .mech-panel-media {
    order: 2;
    flex: 0 0 auto;
    align-items: center;
    height: auto;
    margin-top: .5rem;
  }

  .mech-img {
    max-height: 44vh;
  }
}

/* Carousel: full-bleed track of mech-panel slides, one visible at a time. */

.mech-carousel-wrap {
  width: 100%;
}

.mech-carousel {
  position: relative;
  width: 100%;
}

.mech-carousel-viewport {
  overflow: hidden;
  width: 100%;
}

.mech-carousel-track {
  display: flex;
  width: 100%;
  transition: transform .5s cubic-bezier(.65, 0, .35, 1);
}

.mech-carousel-slide {
  flex: 0 0 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.mech-carousel-btn {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(5, 25, 55, .78);
  color: #f2f2f2;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transform: translateY(-50%);
  transition: background-color .2s ease, border-color .2s ease;
}

.mech-carousel-btn:hover {
  background: #0a2a55;
}

.mech-carousel-btn:focus-visible {
  outline: 3px solid #ffcd29;
  outline-offset: 2px;
}

.mech-carousel-btn[hidden] {
  display: none;
}

.mech-carousel-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}

.mech-carousel-prev { left: 1rem; }
.mech-carousel-next { right: 1rem; }

@media (max-width: 575.98px) {
  .mech-carousel-btn { width: 40px; height: 40px; }
  .mech-carousel-btn svg { width: 18px; height: 18px; }
  .mech-carousel-prev { left: .5rem; }
  .mech-carousel-next { right: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .mech-carousel-track {
    transition: none;
  }
}
