/* タブレット・小さめPC */
:root {
  --section-header-offset: 76px;
}

html {
  scroll-padding-top: var(--section-header-offset);
}

@media (max-width: 900px) {
  :root {
    --section-header-offset: 105px;
  }

  header,
  header.active {
    padding: 18px 5%;
    align-items: center;
  }

  .logo {
    font-size: 17px;
  }

  nav {
    gap: 18px;
  }

  nav a {
    font-size: 14px;
  }

  /* Top */
  .hero {
    height: calc(100svh - 140px);
    min-height: 640px;
    padding: 120px 6% 0;
  }

  .hero-text {
    width: 100%;
    margin: 10px 0 0;
  }

  .hero h1 {
    font-size: clamp(68px, 14vw, 120px);
  }

  .hero-image {
    top: auto;
    right: -8%;
    bottom: 0;
    width: 92%;
    transform: none;
  }

  .hero-image img {
    height: 360px;
  }

  .playground {
    height: 140px;
  }

  .ball {
    right: 12%;
    bottom: 55px;
  }

  /* About */
  .about {
    height: auto;
    min-height: 760px;
    padding: 48px 0;
  }

  .about-panel {
    width: 88%;
    height: auto;
    min-height: 650px;
    margin: 0 auto;
    padding: 50px 8%;
  }

  .about-panel .section-number {
    top: 140px;
    left: 52%;
  }

  .walk-dog {
    right: -20%;
    bottom: 8%;
  }

  .walk-person {
    right: -35%;
    bottom: 2%;
  }

  /* Works */
  .works-section {
    min-height: 820px;
  }

  .hone-piece {
    width: var(--size);
  }

  .works-section .section-number {
    top: -2%;
    left: -3%;
    font-size: 190px;
  }

  .works-title {
    top: 0;
    left: 12%;
    font-size: clamp(78px, 12vw, 120px) !important;
  }

  .work-portfolio {
    top: 36%;
    left: 6%;
    width: 70vw;
  }

  /* Skills */
  .food-section,
  .food-stage,
  section.food-section {
    min-height: 820px;
  }

  .food-section .section-number {
    top: -2%;
    right: -3%;
    font-size: 230px;
  }

  .food-copy {
    top: 13%;
    right: 6%;
    width: 42vw;
  }

  .food-copy h2 {
    font-size: clamp(62px, 10vw, 100px);
  }

  .food-bowl {
    bottom: -20%;
    width: 135vw;
  }

  /* Contact */
  .contact {
    padding: 110px 8%;
  }
}


/* スマホ */
@media (max-width: 600px) {
  header,
  header.active {
    padding: 13px 5%;
  }

  .logo {
    font-size: 14px;
  }

  nav {
    gap: 12px;
  }

  nav a {
    font-size: 12px;
  }

  .hero {
    height: calc(100svh - 110px);
    min-height: 560px;
    padding-top: 104px;
  }

  .hero h1 {
    font-size: clamp(62px, 16vw, 88px);
    line-height: .9;
  }

  .hero-image {
    right: -25%;
    width: 125%;
  }

  .hero-image img {
    height: 290px;
  }

  .playground {
    height: 110px;
  }

  .dog {
    width: 125px;
  }

  .ball {
    width: 28px;
    bottom: 42px;
  }

  /* About */
  .about {
    min-height: 720px;
    padding: 36px 0;
  }

  .about-panel {
    width: 92%;
    min-height: 620px;
    padding: 42px 8%;
  }

  .about-panel .section-number {
    top: 118px;
    left: 50%;
    font-size: 78px;
  }

  .about-label {
    font-size: 11px;
  }

  .about-panel .section-content h2 {
    font-size: 62px;
  }

  .about-panel .section-content h3 {
    font-size: 21px;
  }

  .about-panel .section-content p:not(.about-label):not(.about-note) {
    font-size: 13px;
    line-height: 1.75;
  }

  .walk-dog {
    width: 92px;
    bottom: 7%;
  }

  .walk-person {
    width: 118px;
    bottom: 1%;
  }

  .walk-greeting {
    width: 145%;
    left: -22%;
  }

  /* Works */
  .works-section {
    min-height: 720px;
  }

  .hone-piece {
    width: var(--size);
  }

  .works-section .section-number {
    font-size: 145px;
  }

  .works-title {
    top: 0;
    left: 13%;
    font-size: 72px !important;
  }

  .work-portfolio {
    top: 34%;
    left: 5%;
    width: 82vw;
  }

  /* Skills */
  .food-section,
  .food-stage,
  section.food-section {
    min-height: 720px;
  }

  .food-section .section-number {
    top: 0;
    right: -5%;
    font-size: 170px;
  }

  .food-copy {
    top: 13%;
    right: 6%;
    width: 46vw;
  }

  .food-copy h2 {
    font-size: 62px;
  }

  .food-case {
    width: 72vw;
  }

  .food-bowl {
    bottom: -10%;
    width: 155vw;
  }

  .food-kibble {
    width: var(--size) !important;
  }

  .contact {
    padding: 90px 8%;
  }

  .contact h2 {
    font-size: 52px;
  }

  footer {
    padding: 36px 20px;
  }
}

/* 横長で高さが低いPC */
@media (min-width: 901px) and (min-height: 701px) {
  .hero {
    height: calc(100svh - 192px);
    min-height: 500px;
  }
}

@media (min-width: 901px) and (max-height: 700px) {
  header,
  header.active {
    padding: 18px 6%;
  }

  .hero {
    height: calc(100svh - 94px);
    min-height: 360px;
    padding: 110px 6% 0;
  }

  .hero-text {
    width: 52%;
    margin: 0 0 0 40px;
  }

  .hero h1 {
    font-size: clamp(82px, 8.2vw, 112px);
    line-height: .86;
  }

  .hero-image {
    top: 54%;
    right: 7%;
    width: 65%;
  }

  .hero-image img {
    height: min(64vh, 350px);
  }

  .playground {
    height: 120px;
  }

  .food-bowl {
    bottom: -30%;
    width: min(82vw, 155vh);
  }
}

/* 各コンテンツ面を最低1画面分の高さに統一 */
.about,
.works-section,
section.food-section,
.food-stage,
.contact {
  min-height: 100svh;
  box-sizing: border-box;
}

.contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ContactとFooterを合わせて1画面に収める */
.contact {
  min-height: calc(100svh - 120px);
}

footer {
  height: 120px;
  padding: 0 20px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 600px) {
  .contact {
    min-height: calc(100svh - 90px);
  }

  footer {
    height: 90px;
    padding: 0 20px;
  }
}

.about,
.works-section,
section.food-section,
.contact {
  scroll-margin-top: var(--section-header-offset);
}

/* Works gallery final responsive alignment */
@media (max-width: 900px) {
  .works-section .section-number {
    top: -1%;
    left: -2%;
  }

  .works-title {
    top: 4%;
    left: 11%;
  }
}

@media (max-width: 600px) {
  .works-section .section-number {
    top: 0;
  }

  .works-title {
    top: 4%;
    left: 11%;
    font-size: 70px !important;
  }
}
