* {
  margin: 0;
  padding: 0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
}

img {
  width: 100%;
}

body {
  color: #c19340;
  background-color: #000000;
  font-family: "Yuji Syuku", serif;
  font-weight: 400;
  font-style: normal;
}

.wrapper {
  max-width: 1440px;
  margin: 0 auto;
}

/* Header Section */
header {
  width: 100%;
  background-color: #000000;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;

  .wrapper {
    height: 96px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0 36px;

    .header-logo {
      width: 220px;
    }

    .header-nav {
      margin-left: auto;
      .header-nav-list {
        display: flex;
        align-items: center;
        gap: 36px;

        .header-nav-list-item {
          font-size: 20px;

          a {
            color: #c19340;
            transition: opacity 0.3s;

            &:hover {
              opacity: 0.7;
            }
          }

          .contact-button {
            padding: 12px 36px;
            border: #c19340 2px solid;
            border-radius: 24px;
          }
        }
      }
    }

    .hamburger {
      display: none;
    }
  }
}

/* Main Content */
main {
  margin-top: 96px;
  background-color: #000000;

  /* Top Section */
  .top {
    .wrapper {
      .top-logo {
        width: 100%;
        background-image: url(/assets/images/background-01.min.webp);
        background-size: cover;
        background-position: top center;
        .top-logo-image {
          max-width: 800px;
          margin: 0 auto;
          padding: 324px 36px;
        }
      }

      .top-eyecatch {
        display: flex;
        flex-direction: row-reverse;
        justify-content: center;
        max-width: 635px;
        margin: 0 auto;
        gap: 60px;
        padding: 96px 0 24px;

        span {
          writing-mode: vertical-rl;
        }

        .s {
          font-size: 40px;
        }

        .l {
          width: 160px;
        }
      }

      .top-description {
        max-width: 420px;
        margin: 0 auto;
        padding: 24px 0 96px;

        p {
          font-size: 20px;
          margin: 12px;
        }
      }
    }
  }

  /* History Section */
  .history {
    padding-bottom: 96px;

    .wrapper {
      background-image: url(/assets/images/background-02_modified.min.webp);
      background-size: cover;
      padding: 96px 0;

      .cards {
        display: flex;
        flex-direction: column;
        gap: 48px;

        .card {
          max-width: 800px;
          background-color: rgba(0, 0, 0, 0.5);
          display: flex;
          padding: 24px;

          .text {
            padding: 24px;
            width: 60%;

            span {
              font-size: 60px;
              font-weight: 700;
            }

            h3 {
              margin-top: 36px;
              font-size: 36px;
            }

            p {
              margin-top: 24px;
              font-size: 24px;
            }
          }

          .insert {
            width: 40%;
            padding: 24px;
            align-self: center;

            img {
              border-radius: 12px;
            }
          }
        }

        .card-left {
          align-self: flex-start;
          flex-direction: row-reverse;
          border-radius: 0 24px 24px 0;
        }

        .card-right {
          align-self: flex-end;
          flex-direction: row;
          border-radius: 24px 0 0 24px;
        }
      }
    }
  }

  .shop-button {
    text-align: center;
    margin-top: 24px;
  }

  .shop-link {
    display: inline-block;
    color: #c19340;
    padding: 16px 48px;
    border: #c19340 2px solid;
    border-radius: 32px;
    font-size: 24px;
    transition: all 0.3s;
  }

  .shop-link:hover {
    background-color: #c19340;
    color: #000000;
  }

  .about,
  .shop,
  .contact {
    border-top: #c19340 solid 2px;
    padding-bottom: 96px;

    .wrapper {
      .index {
        text-align: center;
        padding: 96px 0 48px;

        h2 {
          font-size: 48px;
          font-weight: 500;
          padding: 24px;
        }
      }

      .description {
        display: flex;

        .insert {
          width: 50%;
          padding: 24px;
        }

        .text {
          width: 50%;
          padding: 24px;

          strong {
            font-size: 36px;
          }

          p {
            font-size: 20px;
            margin-top: 24px;
          }
        }
      }
    }
  }
}

/* Contact Section Specific Styles */
.contact {
  .wrapper {
    .description {
      flex-direction: column;
      align-items: center;

      .text {
        width: 100%;
        max-width: 600px;
        text-align: center;

        .button-container {
          margin-top: 48px;
        }

        .contact-link {
          display: inline-block;
          color: #c19340;
          padding: 16px 48px;
          border: #c19340 2px solid;
          border-radius: 32px;
          font-size: 24px;
          transition: all 0.3s;

          &:hover {
            background-color: #c19340;
            color: #000000;
          }
        }
      }
    }
  }
}

/* Footer Section */
footer {
  border-top: 2px solid #c19340;
  background-color: #000;
  color: #c19340;
  padding: 40px 20px;
  font-family: "Noto Sans JP", sans-serif;
}

footer .wrapper {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

footer .footer-left {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

footer .footer-logo {
  width: 220px;
  margin-bottom: 15px;
}

footer .footer-info {
  text-align: left;
  line-height: 1.6;
}

footer .footer-info p {
  margin: 5px 0;
}

footer .footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-bottom: 20px;
}

footer .footer-nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 15px;
}

footer .footer-nav a {
  color: #c19340;
  text-decoration: none;
  transition: opacity 0.3s;
}

footer .footer-nav a:hover {
  opacity: 0.7;
}

footer .footer-copy {
  font-size: 0.9em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  footer .wrapper {
    flex-direction: column;
    align-items: center;
  }
  footer .footer-left,
  footer .footer-right {
    align-items: center;
    text-align: center;
  }
  footer .footer-nav {
    justify-content: center;
  }
}

/* Mobile Styles */
@media screen and (max-width: 767px) {
  /* Mobile Header */
  header .wrapper {
    position: relative;
    padding: 0 20px;

    .header-logo {
      width: 160px;
      margin: 0 auto;
    }

    .header-nav {
      position: fixed;
      top: 0;
      right: -100%;
      width: 70%;
      height: 100vh;
      background-color: rgba(0, 0, 0, 0.95);
      transition: 0.3s;

      .header-nav-list {
        flex-direction: column;
        justify-content: center;
        height: 100%;
        padding: 0 20px;

        .header-nav-list-item {
          font-size: 18px;
          text-align: center;
          width: 100%;

          .contact-button {
            width: 100%;
            display: block;
            text-align: center;
            padding: 10px 20px;
          }
        }
      }
    }

    /* Hamburger Menu */
    .hamburger {
      display: block;
      position: fixed;
      top: 32px;
      right: 20px;
      width: 32px;
      height: 32px;
      cursor: pointer;
      z-index: 3;

      span {
        display: block;
        position: absolute;
        width: 100%;
        height: 2px;
        background-color: #c19340;
        transition: 0.3s;

        &:nth-child(1) {
          top: 4px;
        }
        &:nth-child(2) {
          top: 15px;
        }
        &:nth-child(3) {
          bottom: 4px;
        }
      }
    }

    /* Active State for Menu */
    .hamburger.active span {
      &:nth-child(1) {
        transform: translateY(11px) rotate(45deg);
      }
      &:nth-child(2) {
        opacity: 0;
      }
      &:nth-child(3) {
        transform: translateY(-11px) rotate(-45deg);
      }
    }

    .header-nav.active {
      right: 0;
    }
  }

  /* Mobile Main Content */
  main {
    .top {
      .wrapper {
        .top-logo {
          .top-logo-image {
            padding: 200px 24px;
          }
        }

        .top-eyecatch {
          padding: 60px 20px 24px;
          gap: 30px;

          .s {
            font-size: 32px;
          }
          .l {
            font-size: 120px;
          }
        }

        .top-description {
          padding: 24px 20px 60px;
          p {
            font-size: 18px;
          }
        }
      }
    }

    .history {
      padding-bottom: 60px;

      .wrapper {
        padding: 60px 20px;

        .cards {
          .card {
            flex-direction: column !important;
            padding: 16px;

            .text,
            .insert {
              width: 100%;
              padding: 16px;
            }

            .text {
              span {
                font-size: 48px;
              }
              h3 {
                font-size: 28px;
              }
              p {
                font-size: 18px;
              }
            }
          }

          .card-left,
          .card-right {
            align-self: center;
            border-radius: 24px;
          }
        }
      }
    }

    .about,
    .shop,
    .contact {
      padding-bottom: 60px;

      .wrapper {
        .index {
          padding: 60px 0 30px;
          h2 {
            font-size: 36px;
          }
        }

        .description {
          flex-direction: column;

          .insert,
          .text {
            width: 100%;
            padding: 16px 20px;
          }

          .text {
            strong {
              font-size: 28px;
            }
            p {
              font-size: 18px;
            }
          }
        }
      }
    }
  }

  /* Mobile Footer */
  footer {
    height: auto;

    .wrapper {
      padding: 0 20px;

      .footer-logo {
        width: 160px;
        padding: 36px 0;
      }
    }
  }
}

/* 初期状態は非表示 */
.history .cards .card {
  opacity: 0;
}

/* 画面内に入ったときに.in-viewクラスを付与し、アニメーションを発動 */
.history .cards .card.in-view {
  animation-duration: 1s;
  animation-fill-mode: forwards;
}

/* 左側のカードの場合 */
.history .cards .card-left.in-view {
  animation-name: fadeInLeft;
}

/* 右側のカードの場合 */
.history .cards .card-right.in-view {
  animation-name: fadeInRight;
}

/* 左側フェードイン用キーアニメーション */
@keyframes fadeInLeft {
  from {
    transform: translateX(-50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* 右側フェードイン用キーアニメーション */
@keyframes fadeInRight {
  from {
    transform: translateX(50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Privacy Policy Section */
.privacy-policy {
  padding: 96px 0;
  color: #c19340;
  font-family: "Yu Gothic", "YuGothic", sans-serif;
}

.privacy-policy h1,
.privacy-policy h2,
.privacy-policy h3 {
  margin-bottom: 24px;
}

.privacy-policy h1 {
  font-size: 48px;
  text-align: center;
}

.privacy-policy h2 {
  font-size: 36px;
  text-align: center;
}

.privacy-policy h3 {
  font-size: 24px;
}

.privacy-policy p,
.privacy-policy ul {
  font-size: 20px;
  margin-bottom: 24px;
}

.privacy-policy ul {
  list-style-type: disc;
  padding-left: 40px;
}

/* Tokutei Section */
.tokutei {
  padding: 96px 0;
  color: #c19340;
  font-family: "Yu Gothic", "YuGothic", sans-serif;
}

.tokutei h1,
.tokutei h2,
.tokutei h3 {
  margin-bottom: 24px;
}

.tokutei h1 {
  font-size: 48px;
  text-align: center;
}

.tokutei h2 {
  font-size: 36px;
  text-align: center;
}

.tokutei h3 {
  font-size: 24px;
}

.tokutei p,
.tokutei ul {
  font-size: 20px;
  margin-bottom: 24px;
  font-family: "Yu Gothic", "YuGothic", sans-serif;
}

.tokutei ul {
  list-style-type: disc;
  padding-left: 40px;
}

/* Table Styles for Tokutei Section */
.tokutei table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.tokutei table th,
.tokutei table td {
  border: 1px solid #c19340;
  padding: 12px;
  text-align: left;
}

.tokutei table th {
  background-color: #000000;
  color: #c19340;
  font-weight: bold;
}

.tokutei table tr:nth-child(even) {
  background-color: rgba(193, 147, 64, 0.1);
}

/* ローディングオーバーレイ */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000; /* 背景色はサイトに合わせて調整 */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

/* スピナー（回転アニメーション） */
.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #c19340;
  border-top: 5px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* キーフレーム定義 */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
