body {
  background-color: #000000;
  color: #ffffff;
  font-family:
    "Hiragino Kaku Gothic ProN",
    "Hiragino Sans",
    "Yu Gothic",
    "YuGothic",
    "Noto Sans JP",
    Meiryo,
    sans-serif;
  margin: 0;

}

body,
html {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "YuGothic", "Noto Sans JP", Meiryo, sans-serif;
}

section {
  margin: 0;
}




.logo {
  margin: 0;
}

.header {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  padding: 40px 40px;
  z-index: 100;
}

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

.logo {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logo a {
  color: #fff;
  text-decoration: none;
}

.nav ul {
  display: flex;
  gap: 60px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  color: #fff;
  text-decoration: none;
  font-size: 20px;
  letter-spacing: 0.1em;
}

.nav a:hover {
  opacity: 0.6;
}


/* =======================
   HERO PC
======================= */
.hero {
  position: relative;
  width: 100%;
  height: 500px;
  min-height: 500px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 180px;

}

.face {
  position: relative;
  width: 420px;
  margin: 0 auto;
  transform: translateY(-120px);
  z-index: 1;
}

.face-img {
  width: 100%;
  display: block;
  position: relative;
  z-index: 1;
}

.hair {
  position: absolute;
  top: -60px;
  left: 2%;
  width: 100%;
  display: block;
  transform: scale(1.2);
  z-index: 2;
}

.eye {
  position: absolute;
  top: 35%;
  left: 51%;
  width: 193px;
  /* 黒目画像全体の幅 */
  height: 70px;
  /* 黒目画像の高さ */
  transform: translate(-50%, -50%);
  z-index: 5;
  overflow: hidden;

}

.ball-box {
  position: absolute;
  top: 50%;
  left: 52%;
  width: 85%;
  height: 76%;
  transform: translate(-50%, -50%);
  transition: opacity 0.05s;

}

.eye .outline {
  transition: opacity 0.05s;
}

.blink {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 6;
  transform-origin: center;
}


.pc {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  z-index: 2;
}


.bobbin {
  position: absolute;
  bottom: 140px;
  width: 100px;
  z-index: 4;
  left: calc(65% - 50px);
  animation: roll 4s ease-out forwards;
}

.thread {
  position: absolute;
  bottom: 180px;
  left: 0;
  height: 2px;
  width: calc(65% - 50px);
  background: #E4007F;
  z-index: 3;
  transform-origin: left;
  transform: scaleX(0);
  animation:
    threadGrow 3.8s ease-out 0.2s forwards,
    threadTight 0.15s 3.8s forwards;
}


@keyframes threadGrow {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@keyframes threadTight {
  from {
    transform: scaleX(0.95);
  }

  to {
    transform: scaleX(1);
  }
}



@keyframes thread {
  0% {
    width: 0;
  }

  100% {
    width: calc(60% - 60px);
  }

}

@keyframes roll {

  0% {
    left: -120px;
    transform: translateY(0);
  }

  25% {
    transform: translateY(-6px);
  }

  50% {
    transform: translateY(0);
  }

  75% {
    transform: translateY(-6px);
  }

  85% {
    transform: translateX(0) rotate(355deg) translateY(-6px);
  }

  100% {
    left: calc(65% - 100px);
    transform: translateX(0) rotate(360deg) translateY(0);
  }

}

.site-footer {
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 40px;
}

.footer-spacer {
  height: 30px;
  background: #000000;
  ;
}

.sp-top {
  display: none;
}

.sp-menu {
  display: none;
}

.sp-scroll-indicator {
  display: none;
}

.sp-icons {
  display: none;
}

.scroll-indicator,
.pc-sp,
.bobbin-sp,
.bobbin-wrapper,
.sp-scroll-indicator,
.sp-icons {
  display: none;
}

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

.home .to-top {
  display: inline-block;
  margin-left: 20px;
  margin-top: 20px;
  /* これ追加 */
  padding: 8px 12px;
  background: #fff;
  color: #000;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
}


.home .to-top:hover {
  opacity: 0.7;
}

.home .to-top {
  display: none;
}


/* 🔥🔥🔥🔥🔥SP🔥🔥🔥🔥🔥 */
@media (max-width:768px) {
  .header {
    padding: 0 !important;
    /* 左右の余白をなくす */
  }

  .header-inner {
    width: 100% nt;
    padding: 20px;
    justify-content: center !important;
  }

  .nav {
    display: none !important;
  }

  .logo {
    margin: 0 !important;
    text-align: center !important;
  }

  .footer-spacer {
    height: 30px;
    background: #000000;
    ;
  }

  .logo {
    margin: 0;
    padding: 0;
    text-align: center;
    transform: none;
    /* もし残ってるtransformをリセット */
  }

  html,
  body {
    overflow-x: hidden;
  }


  .hero .thread,
  .pc,
  .bobbin {
    display: none;
  }

  .pc-sp,
  .bobbin-sp,
  .bobbin-wrapper,
  .sp-scroll-indicator,
  .sp-icons {
    display: block;
  }

  /* PC用の糸を消す */
  .act .thread {
    display: none;
  }

  /* SP用の糸は表示させる */
  .bobbin-wrapper .thread {
    display: block;
  }

  .hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 60px;
    /* 顔の上に余白 */
    padding-bottom: 20px;
    /* hero の最後に余白 */
    min-height: auto;
    /* 画像の高さに合わせる */
  }

  .face {
    width: min(60%, 320px);
    transform: translateY(0);
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
  }

  .hair {
    position: absolute;
    top: -36px;
    /* 顔とのバランス調整 */
    width: 110%;
    z-index: 3;
  }

  .eye {
    top: 26%;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 50px;
  }

  .ball-box {
    top: 55%;
    left: 52%;
    width: 82%;
    height: 82%;
  }

  .blink {
    top: 28%;
  }

  /* SP用PC画像 */
  .pc-sp {
    width: 90%;
    position: relative;
    margin-top: -196px;
    margin-bottom: 60px;
    z-index: 2;
  }

  .bobbin-sp {
    bottom: 43px;
    /* 顔下からの固定距離 */
    left: 70%;
    /* 停止位置 */
    width: 65px;
  }

  .thread {
    bottom: 70px;
    /* ボビンより少し上 */
    width: calc(70% - 65px);
    /* ボビン手前で止まる */
  }

  .bobbin-wrapper {
    position: relative;
    margin: 10px 0 30px;
    width: 100%;
    z-index: 3;
  }

  .bobbin-wrapper .thread {
    position: absolute;
    bottom: 66px;
    /* ←調整 */
    left: 0;
    height: 2px;
    width: calc(85% - 70px);
    background: #E4007F;
    transform-origin: left;
    transform: scaleX(0);
    animation: threadGrow 3.8s ease-out 0.2s forwards;
  }

  .bobbin-wrapper .bobbin-sp {
    position: absolute;
    left: calc(85% - 85px);
    bottom: 40px;
    left: 70%;
    width: 75px;
    transform: translateX(-120vw);
    animation: rollSP 4s ease-out forwards;
    z-index: 4;
  }

  .thread,
  .bobbin,
  .bobbin-sp {
    transform-origin: left;
    animation-delay: 0.2s;
    /* 糸とボビンを同期 */
  }

  @keyframes rollSP {

    0% {
      left: -120px;
      transform: translateY(0);
    }

    25% {
      transform: translateY(-6px);
    }

    50% {
      transform: translateY(0);
    }

    75% {
      transform: translateY(-6px);
    }

    85% {
      transform: translateX(0) rotate(0deg) translateY(-6px);
    }

    100% {
      left: calc(85% - 85px);
      transform: translateX(0) rotate(0deg) translateY(0);
    }

  }


  @keyframes threadGrow {

    0% {
      transform: scaleX(0);
    }

    10% {
      transform: scaleX(0);
    }

    100% {
      transform: scaleX(1);
    }

  }

  @keyframes threadTight {
    from {
      transform: scaleX(0.95);
    }

    to {
      transform: scaleX(1);
    }
  }

  /* スクロール誘導 */
  .scroll-indicator {
    position: relative;
    width: 160px;
    height: 160px;
    left: 50%;
    margin-bottom: 40px;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
  }

  .sp-icons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-top: 20px;
    z-index: 1500;
    /* scroll より下、hero より上 */
    position: relative;
  }

  .scroll-indicator .arrow {
    position: absolute;
    font-size: 28px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  /* 回転グループ */
  .rotating-text {
    transform-origin: 80px 80px;
    animation: rotateText 10s linear infinite;
  }

  @keyframes rotateText {
    0% {
      transform: rotate(0deg);
    }

    100% {
      transform: rotate(360deg);
    }
  }

  .scroll-indicator textPath {
    fill: #fff;
    font-size: 17px;
    letter-spacing: 3px;
  }

  /* SP アイコンリンク */
  .sp-icons .icon-circle,
  .sp-icons .icon-rect {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    width: 80vw;
    max-width: 300px;
    aspect-ratio: 1;
    padding: 10px;
    overflow: hidden;
  }


  .icon-circle img,
  .icon-rect img {
    width: 85%;
    /* アイコンサイズ調整 */
    height: auto;
    object-fit: cover;
  }

  .icon-text {
    font-size: 5vw;
    /* レスポンシブ対応 */
    max-font-size: 30px;
    letter-spacing: 0.05em;
    text-align: center;
  }

  .sp-icons a {
    text-decoration: none;
  }

  .gray-text {
    color: #999999;
    /* グレーに変更 */
  }

  /* works 丸 */
  .icon-circle {
    background: #FFE500;
    border-radius: 50%;
  }


  /* about 角丸四角 */
  .icon-rect {
    background: #E4007F;
    border-radius: 20px;
  }

  /* アイコン画像 */
  .sp-icons .icon-rect img {
    width: 270px;
    height: 270px;
    object-fit: contain;
    display: block;
  }

  .footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .home .to-top {
    margin-top: 20px;
    align-items: center;

  }

}