/*
Theme Name: mytheme
*/

@charset "utf-8";

/* main visual */
.main-visual {
  height: 610px;
  background-image: url(../img/mainvisual.jpg);
  background-size: cover;
  background-position: left;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 0;
}

.main-visual::after {
  content: "";
  background-color: rgba(25, 32, 48, 0.45);
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: -1;
}

.main-logo {
  font-size: 60px;
  position: relative;
}

/* about */
.main-about {
  margin: 150px clamp(20px, 10vw, 140px);
}

.main-about_content {
  display: flex;
  align-items: stretch;
  gap: 100px;
}

.main-about_text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 50%;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.03em;
}

.main-about_p {
  margin: auto 0;
  text-align: justify;
}

.main-about_img {
  margin-top: 35px;
  margin-left: auto;
  width: 50%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.main-about_btn {
  position: relative;
  width: fit-content;
  margin-left: auto;
  font-size: 20px;
  transition: all 0.3s;
  padding-right: 30px;
}

.main-about_btn::after {
  content: "";
  position: absolute;
  right: 0;
  width: 20px;
  height: 2px;
  background: url(../img/line.svg) no-repeat center;
  background-size: auto;
  top: 70%;
  transition: all 0.3s;
}

.main-about_btn::before {
  content: "";
  position: absolute;
  right: 0;
  background: url(../img/line_s.svg) no-repeat center;
  background-size: auto;
  top: 70%;
  width: 10px;
  height: 2px;
  transform: rotate(50deg);
  transform-origin: right;
  transition: all 0.3s;
}

.main-about_btn:hover {
  text-shadow:
    0 0 6px rgba(255, 255, 255, 0.7),
    0 0 12px rgba(255, 255, 255, 0.5);
}

.main-about_btn:hover::after,
.main-about_btn:hover::before {
  box-shadow:
    0 0 6px rgba(255, 255, 255, 0.7),
    0 0 12px rgba(255, 255, 255, 0.5);
}

.main-about_btn:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0.3);
}

/* works */
.main-works {
  margin: 150px clamp(20px, 10vw, 140px);
}

.main-works_list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 45px;
}

.main-works_item {
  margin-top: 35px;
}

.main-works_img-box {
  position: relative;
  overflow: hidden;

  width: 100%;
  aspect-ratio: 4 / 3;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #f5f2ec;
  border-radius: 10px;
}

.main-works_img-box img {
  width: 100%;
  height: 100%;

  object-fit: contain; /* ←比率維持して全体表示 */
  display: block;

  transition:
    transform 0.5s ease,
    opacity 0.4s ease;
}

.main-works_img-box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background 0.4s;
}

.main-works_item:hover .main-works_img-box img {
  transform: scale(1.06);
}

.main-works_item:hover .main-works_img-box::after {
  background: rgba(255, 255, 255, 0.15);
}

.main-works_item:hover {
  text-shadow:
    0 0 6px rgba(255, 255, 255, 0.7),
    0 0 12px rgba(255, 255, 255, 0.5);
}

.main-works_title {
  display: flex;
  justify-content: center;
  margin: 20px auto;
  font-size: 24px;
}

.works-view_more {
  display: flex;
  margin: 40px auto;
  padding: 20px 45px;
  width: fit-content;
  background-color: #4e5c73;
  transition: all 0.3s ease;
}

.works-view_more:hover {
  transform: translateY(-3px);
  box-shadow:
    0 0 8px rgba(255, 240, 209, 0.6),
    0 0 18px rgba(255, 240, 209, 0.5),
    0 0 28px rgba(255, 240, 209, 0.35);
  animation: glowPulse 1.8s infinite;
  transform: translateY(-3px);
}

/* hover effect */
@keyframes glowPulse {
  0% {
    box-shadow:
      0 0 6px rgba(255, 240, 209, 0.4),
      0 0 12px rgba(255, 240, 209, 0.3);
  }

  50% {
    box-shadow:
      0 0 14px rgba(255, 240, 209, 0.8),
      0 0 28px rgba(255, 240, 209, 0.6);
  }

  100% {
    box-shadow:
      0 0 6px rgba(255, 240, 209, 0.4),
      0 0 12px rgba(255, 240, 209, 0.3);
  }
}

@media (max-width: 768px) {
  /* about */
  /* .main-about_content {
    gap: 20px;
  } */

  .main-about_text {
    font-size: 14px;
    gap: 20px;
  }

  /* works */
  .main-works_list {
    gap: 25px;
  }

  /* contact */
  .main-contact {
    padding: 70px 20px 150px;
  }
}

@media (max-width: 480px) {
  /* =====================
    main visual
  ===================== */
  .main-visual {
    height: 400px;
  }

  .main-logo {
    font-size: 36px;
  }

  /* =====================
    about
  ===================== */
  .main-about {
    margin: 100px 20px;
  }

  .main-about_content {
    flex-direction: column; /* ←縦並び */
    gap: 10px;
  }

  .main-about_img {
    display: block;
    order: -1;
    width: 100%;
    margin: 0;
  }

  .main-about_text {
    width: 100%;
  }

  .main-about_btn {
    margin-left: auto;
    font-size: 16px;
  }

  /* =====================
    works
  ===================== */
  .main-works {
    margin: 100px 20px;
  }

  .main-works_list {
    grid-template-columns: 1fr; /* ←1カラム */
    gap: 30px;
  }

  .main-works_item {
    margin-top: 0;
  }

  .main-works_title {
    font-size: 18px;
  }

  /* =====================
    contact
  ===================== */
  .main-contact {
    padding: 60px 20px 120px;
  }

  .main-contact_p {
    font-size: 14px;
    margin: 40px auto;
  }

  .m_contact_p {
    display: block; /* ←改行有効化 */
  }

  .contact_btn {
    font-size: 16px;
    padding: 12px 30px;
  }
}
