@charset "utf-8";

/* *****************************
common
***************************** */
:root {
  --primary-font: #281004;
  --primary-red: #a8240f; /* 目立たせるべきところ */
  --secondary-red: #780a06;
  --primary-whiteGray: #f7f7f7;
  --primary-yellow: #fffbf4;
  --primary-bg: #faf7f4;
  --secondary-bg: #f8f6f0;
  --contentPadding: 5.3%; /* 20/375 */
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
  /* scroll-padding-top: 70px;  */ /* ヘッダーの高さを指定 */
}

body {
  font-family: "Noto Sans JP", arial, sans-serif;
  font-style: normal;
  color: var(--primary-font);
  background-color: var(--primary-bg);
  line-height: 1.8;
}

img {
  max-width: 100%;
  height: auto;
}

.brPc {
  display: none;
}

/* *****************************
common(pc)
***************************** */
@media screen and (min-width: 768px) {
  :root {
    --contentPadding: 9.6%; /* 138/1440 */
  }

  .brSp {
    display: none;
  }

  .brPc {
    display: block;
  }
}

/* *****************************
ヘッダー
***************************** */
.header__topic,
.nav__topic {
  width: 180px;
  height: auto;
}

/* *****************************
ナビゲーション
***************************** */
.nav {
  background: #fff;
  width: 100%;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  transform: translateX(-100%);
  transition: 0.4s;
}

.nav.active {
  transform: translateX(0);
  pointer-events: auto;
}

.nav__works {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 87px;
  padding: 0;
}

.nav__item {
  width: 100%;
  max-width: 244px;
}

.nav__link {
  display: block;
  width: 100%;
  background-color: #fbfcee;
  font-weight: 700;
  padding: 20px; /* 内側の余白（タップできる範囲） */
  font-size: 2rem;
  text-align: center;
  position: relative;
  line-height: 1;
  border-radius: 90px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
}

.nav__link::before {
  position: absolute;
  content: "";
  background: url(../images/nav__img-1.svg);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  width: 20px;
  height: 20px;
  top: 50%;
  transform: translateY(-50%);
  left: 20px;
}

.nav__item:nth-child(2) .nav__link::before {
  background-image: url(../images/nav__img-2.svg);
}

.nav__item:nth-child(3) .nav__link::before {
  background-image: url(../images/nav__img-3.svg);
}

.nav__item:nth-child(4) .nav__link::before {
  background-image: url(../images/nav__img-4.svg);
}

.nav__item:nth-child(5) .nav__link::before {
  background-image: url(../images/nav__img-5.svg);
}

/* *****************************
ハンバーガーメニュー
***************************** */
.header__btn {
  position: fixed;
  display: block;
  cursor: pointer;
  width: 24px;
  height: 17px; /* ボタン全体の高さ */
  top: 26px; /*figmaの数値では21.5pxだけど、見た目を合わせる */
  right: 20px;
  background: none;
  border: none;
  padding: 0;
  pointer-events: auto;
  z-index: 200;
}

.header__btn-line {
  position: absolute;
  background-color: #000;
  display: block;
  width: 24px;
  height: 2px;
  left: 0; /* rightよりleftの方がgoodだった */
  transition: all 0.4s;
}

.header__btn-line:nth-child(1) {
  top: 0px;
}
.header__btn-line:nth-child(2) {
  top: 8px;
}
.header__btn-line:nth-child(3) {
  top: 16px;
}

/* Xになるアニメーション */
.header__btn.active .header__btn-line:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(-45deg); /* 中央に固定したまま回転 */
}

.header__btn.active .header__btn-line:nth-child(2) {
  transform: translateX(10px);
  opacity: 0;
  transition:
    transform 0.4s ease-in-out,
    opacity 0.4s ease-in-out;
}

.header__btn.active .header__btn-line:nth-child(3) {
  top: 50%; /* 中央へ移動（下から上に上がる動きになる） */
  transform: translateY(-50%) rotate(45deg); /* 中央に固定したまま回転 */
}

/* *****************************
ヘッダー＆ナビゲーション＆ハンバーガーメニュー(pc)
***************************** */
@media screen and (min-width: 768px) {
  .header__btn {
    display: none;
  }

  .nav {
    position: fixed;
    top: 20px;
    right: 30px;
    left: auto;
    width: fit-content;
    height: auto;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 60px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 500;
    transform: none;
    transition: none;
  }

  .nav__works {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 0;
  }

  .nav__item {
    width: auto;
    max-width: none;
  }

  .nav__link {
    width: auto;
    background-color: transparent;
    padding: 0 12px;
    margin: 0;
    font-size: 2rem;
    border-radius: 0;
    box-shadow: none;
  }

  .nav__link::before {
    display: none;
  }
}

/* *****************************
フッター
***************************** */
footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #fff;
}

.footer__body {
  display: flex;
  flex-direction: column;
}

.footer__img-1,
.footer__img-2 {
  width: 165px;
  height: auto;
}

/* フッターアニメーション */
.footer__img-1 {
  transform-origin: top center;
  animation: sway 2s ease-in-out infinite alternate;
}

@keyframes sway {
  0% {
    transform: rotate(-10deg);
  }
  100% {
    transform: rotate(10deg);
  }
} /* フッターアニメーションここまで */

.footer__img-2 {
  margin-top: 36px;
}

.footer__copy {
  padding: 30px var(--contentPadding);
  line-height: 1;
  font-weight: 400;
}

/* *****************************
フッター(pc)
***************************** */
@media screen and (min-width: 768px) {
  .footer__body {
    display: flex;
    gap: 36px;
    flex-direction: row;
  }

  .footer__img-1 {
    width: 200px;
  }

  .footer__img-2 {
    width: 400px;
  }
}

/* *****************************
フェードイン
***************************** */
.fadeIn {
  opacity: 0;
  transform: translateY(50px);
  transition:
    opacity 1.2s ease,
    transform 1.2s ease;
}

.fadeIn.animated {
  opacity: 1;
  transform: translateY(0);
}
