.food-section {
  min-height: 92vh;
  background: #f7f6f2;
  overflow: hidden;
}

.food-stage {
  position: relative;
  min-height: 92vh;
  overflow: hidden;
  container-type: size;
}

/* 03 */
.food-section .section-number {
  position: absolute;
  top: -7%;
  right: -2%;
  z-index: 1;
  color: rgba(156, 170, 136, .28);
  font-size: clamp(210px, 25vw, 410px);
  line-height: 1;
}

/* Skillsの文章 */
.food-copy {
  position: absolute;
  top: 10%;
  right: 0%;
  left: auto;
  z-index: 3;
  width: min(32vw, 480px);
  opacity: 0;
  transform: translateY(24px);
}

.food-label {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .12em;
}

.food-copy h2 {
  margin: 0 0 22px;
  font-size: clamp(64px, 8vw, 140px);
  line-height: .9;
}

.food-copy p {
  font-size: clamp(16px, 1.5vw, 21px);
  line-height: 1.9;
}

/* フードケース：最初は画面中央で大きく表示 */
.food-case {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  width: min(72vw, 760px);
  opacity: 0;
  transform: translate(-50%, -50%) scale(3.4);
}

.food-case img,
.food-bowl img {
  display: block;
  width: 100%;
  height: auto;
}

/* スクロール後、左上へ移動して傾く */
.food-section.is-active .food-case {
  animation: food-case-story 4.2s cubic-bezier(.22, 1, .36, 1) forwards;
}

/* 文章を表示 */
.food-section.is-active .food-copy {
  animation: food-copy-show .7s ease 1.25s forwards;
}

/* ボウル */
.food-bowl {
  position: absolute;
  left: 50%;
  bottom: -45%;
  z-index: 3;
  width: min(105vw, 1560px);
  opacity: 0;
  transform: translate(-50%, 80px);
}

.food-section.is-active .food-bowl {
  animation: bowl-show .7s cubic-bezier(.22, 1, .36, 1) 1.25s forwards;
}

/* フードの粒が入る場所 */
.food-kibbles {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

@keyframes food-case-story {
  0% {
    top: 50%;
    left: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.1) rotate(0deg);
  }

  12% {
    opacity: 1;
  }

  30% {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.1) rotate(0deg);
  }

  43% {
    top: 33%;
    left: 14%;
    opacity: 1;
    transform: translate(-50%, -50%) scale(.58) rotate(22deg);
  }

  67% {
    top: 33%;
    left: 14%;
    opacity: 1;
    transform: translate(-50%, -50%) scale(.58) rotate(22deg);
  }

  70% {
    top: 33%;
    left: 14%;
    opacity: 1;
    transform: translate(-50%, calc(-50% + 9px)) scale(.59) rotate(24deg);
  }

  73% {
    top: 33%;
    left: 14%;
    opacity: 1;
    transform: translate(-50%, -50%) scale(.58) rotate(22deg);
  }

  95% {
    top: 33%;
    left: 14%;
    opacity: 1;
    transform: translate(-50%, -50%) scale(.58) rotate(22deg);
  }

  100% {
    top: 33%;
    left: 14%;
    opacity: 1;
    transform: translate(-50%, -50%) scale(.58) rotate(0deg);
  }
}

@keyframes food-copy-show {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bowl-show {
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Skillsのフードページだけ、通常のsectionレイアウトを解除 */
section.food-section {
  display: block;
  width: 100%;
  min-height: 92vh;
  padding: 0;
  gap: 0;
}

.food-stage {
  width: 100%;
}

/* 落ちるフード粒 */
.food-kibble {
  position: absolute;
  top: 3%;
  left: 18%;
  z-index: 4;
  width: var(--size);
  opacity: 0;
}

.food-kibble img {
  display: block;
  width: 100%;
  height: auto;
}

.skill-kibble {
  display: grid;
  place-items: center;
}

.skill-kibble img,
.skill-kibble span {
  grid-area: 1 / 1;
}

.skill-kibble span {
  z-index: 1;
  width: 76%;
  color: #4a3423;
  font-family: 'Zen Maru Gothic', 'Noto Sans JP', sans-serif;
  font-size: clamp(12px, 1.18vw, 22px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: .035em;
  text-align: center;
  white-space: nowrap;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, .72),
    0 2px 3px rgba(85, 61, 38, .16);
}

.skill-kibble--short span {
  font-size: clamp(20px, 1.85vw, 34px);
}

.skill-kibble--medium span {
  font-size: clamp(15px, 1.4vw, 26px);
}

@media (max-width: 900px) {
  .skill-kibble span {
    font-size: 13px;
  }

  .skill-kibble--short span {
    font-size: 20px;
  }

  .skill-kibble--medium span {
    font-size: 15px;
  }
}

@media (max-width: 600px) {
  .skill-kibble span {
    width: 82%;
    font-size: 11px;
  }

  .skill-kibble--short span {
    font-size: 17px;
  }

  .skill-kibble--medium span {
    font-size: 13px;
  }
}

.food-section.is-active .food-kibble {
  animation: kibble-fall 1.15s linear var(--delay) forwards;
}

@keyframes kibble-fall {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(0deg);
  }

  8% {
    opacity: 1;
  }

  28% {
    opacity: 1;
    transform: translate(
      var(--curve1-x),
      var(--curve1-y)
    ) rotate(100deg);
  }

  68% {
    opacity: 1;
    transform: translate(
      var(--curve2-x),
      var(--curve2-y)
    ) rotate(230deg);
  }

  100% {
    opacity: 1;
    transform: translate(
      var(--move-x),
      var(--move-y)
    ) rotate(var(--rotate));
  }
}
