/* ===============================
   セクション
=============================== */
.design-section {
  padding: 12rem 0;
  background-color: rgba(255, 255, 255, 0.35);
}

/* 横並び */
.design-inner {
  display: flex;
  width: 75vw;
  margin: 0 auto;
  align-items: flex-start;
  gap: 5vw;
}

/* ===============================
   左：テキスト
=============================== */
.design-list {
  width: 50%;
}

.design-item {
  position: relative;
  display: flex;
  gap: 2.43vw;
  padding: 4.17vw 0 4.17vw 1.67vw;
  opacity: 0.25;
  transform: translateX(-.8rem);
  transition:
    opacity 0.4s ease,
    transform 0.4s cubic-bezier(.2, .7, .2, 1);
}

.design-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: .2rem;
  height: 100%;
  background: orange;
  transform-origin: top;
  transform: scaleY(0);
  transition: transform 0.45s ease;
}

.design-item::after {
  content: none;
}

.design-item.is-active {
  opacity: 1;
  transform: translateX(0);
}

.design-item.is-active::before {
  transform: scaleY(1);
}

.num {
  font-weight: 700;
  color: orange;
}

.design-content h2 {
  font-size: 2.22vw;
  margin: 0;
  line-height: 1;
  font-weight: 700;
}

.design-content p {
  margin-top: 1.74vw;
  line-height: 1.6;
  color: #333;
}

/* ===============================
   右：ビジュアル（固定）
=============================== */
.design-visual {
  width: 50%;
  position: sticky;
  top: 30%;
  height: 32rem;
}

.visual {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1.2rem;
  opacity: 0;
  transform: scale(0.96);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.visual.is-active {
  opacity: 1;
  transform: scale(1);
}

@media (max-width: 48rem) {
  .design-section {
    padding: 6.4rem 0;
  }

  .design-inner {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 0;
    padding: 0 2rem;
  }

  .design-list {
    display: contents;
  }

  .design-item {
    width: 100%;
    gap: 1.6rem;
    padding: 0 0 0 2rem;
    opacity: 1;
    transform: none;
  }

  .design-item::before {
    background: rgba(255, 165, 0, 0.28);
    transform: scaleY(1);
    transition: background 0.45s ease;
  }

  .design-item.is-active::before {
    background: orange;
  }

  .num {
    min-width: 3rem;
    font-size: 1.3rem;
    color: rgba(255, 165, 0, 0.38);
    transition: color 0.45s ease;
  }

  .design-item.is-active .num {
    color: orange;
  }

  .design-content h2 {
    font-size: clamp(2.2rem, 7vw, 3rem);
    line-height: 1.25;
  }

  .design-content p {
    margin-top: 1.6rem;
    margin-bottom: 2.4rem;
    font-size: 1.4rem;
    line-height: 1.9;
  }

  .design-item:nth-child(1) {
    grid-row: 1;
  }

  .design-item:nth-child(2) {
    grid-row: 3;
  }

  .design-item:nth-child(3) {
    grid-row: 5;
  }

  .design-item:nth-child(4) {
    grid-row: 7;
  }

  .design-visual {
    display: contents;
  }

  .visual {
    position: relative;
    inset: auto;
    width: calc(100% - 2rem);
    justify-self: end;
    margin: 0 0 5.6rem;
    border-radius: 1.2rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, 0.14);
    opacity: 1;
    transform: none;
    transition: none;
  }

  .visual:nth-child(1) {
    grid-row: 2;
  }

  .visual:nth-child(2) {
    grid-row: 4;
  }

  .visual:nth-child(3) {
    grid-row: 6;
  }

  .visual:nth-child(4) {
    grid-row: 8;
    margin-bottom: 0;
  }

  .visual img {
    height: auto;
    object-fit: contain;
  }
}
