:root {
  --text: #333;
  --white: #fff;
  --black: #000;
  --border: #ddd;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Arial, sans-serif;
  line-height: 1.7;

  min-height: 100vh;
  display: flex;
  flex-direction: column;
}


a {
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.3s;

  &:hover {
    opacity: 0.7;
  }
}

img {
  max-width: 100%;
  display: block;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#header {
  height: 80px;
  background: var(--white);
  border-bottom: 1px solid var(--border);

  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;

  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;

  #navi {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    padding: 36px 50px;
    color: #fff;
    opacity: 0;
    z-index: 20;
    transition: all 0.5s;
    background: #333;

    a {
      color: #fff;
    }

    li {
      margin-bottom: 14px;
    }
  }

  .toggle_btn {
    width: 30px;
    height: 30px;
    position: relative;
    z-index: 50;

    span {
      position: absolute;
      width: 30px;
      height: 2px;
      background-color: #333;
      border-radius: 4px;
      transition: all 0.5s;

      &:nth-child(1) {
        top: 10px;
      }

      &:nth-child(2) {
        bottom: 10px;
      }
    }
  }

  #mask {
    display: none;
    transition: all 0.5s;
  }

  &.open {

    #navi {
      left: 0;
      opacity: 1;
    }

    .toggle_btn span {
      background-color: #fff;

      &:nth-child(1) {
        transform: translateY(4px) rotate(-45deg);
      }

      &:nth-child(2) {
        transform: translateY(-4px) rotate(45deg);
      }
    }

    #mask {
      display: block;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: #000;
      opacity: 0.8;
      z-index: 10;
      cursor: pointer;
    }
  }
}


main {
  padding-top: 120px;
  padding-left: 24px;
  padding-right: 24px;
  padding-bottom: 60px;

  section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 0 60px;

    h2 {
      margin: 0 0 20px;
      font-size: 18px;
      letter-spacing: 1px;
    }

    ul {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 40px;
      margin-top: 20px;

      li {
        a {
          display: block;
        }

        img {
          border-radius: 8px;
          margin-bottom: 10px;
        }

        p {
          margin: 0;
          font-size: 14px;

          &:nth-of-type(2) {
            font-size: 13px;
            opacity: 0.85;
          }
        }
      }
    }

    p {
      margin-top: 28px;
      text-align: center;

      a {
        display: inline-block;
        padding: 10px 16px;
        border: 1px solid var(--border);
        border-radius: 999px;
      }
    }
  }
}


footer {
  border-top: 1px solid var(--border);
  padding: 24px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  margin-top: auto;

  ul {
    display: flex;
    gap: 16px;

    a {
      font-size: 13px;
    }
  }

  p {
    margin: 0;
    font-size: 12px;
    opacity: 0.8;
  }
}

.page-about {
  main {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 60px;

    h1 {
      margin: 0 0 20px;
      font-size: 22px;
      letter-spacing: 0.5px;
    }

    p {
      margin: 0 0 18px;
      line-height: 1.9;
    }
  }
}

.page-company {
  main {
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 60px;

    h1 {
      margin: 0 0 24px;
      font-size: 22px;
    }

    dl {
      display: grid;
      grid-template-columns: 140px 1fr;
      gap: 12px 24px;
      margin: 0 0 28px;
      padding: 24px;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: var(--white);
    }

    dt {
      font-weight: bold;
      padding: 12px 0;
      border-bottom: 1px solid var(--border);
    }

    dd {
      margin: 0;
      padding: 12px 0;
      border-bottom: 1px solid var(--border);
    }

    dt:last-of-type,
    dd:last-of-type {
      border-bottom: none;
    }

    iframe {
      width: 100%;
      height: 320px;
      border: 0;
      border-radius: 12px;
      filter: grayscale(1);
    }
  }
}

.page-item > div {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-item > div > h1 {
  margin: 0 0 20px;
  font-size: 22px;
  letter-spacing: 0.5px;
  text-align: center;
}

.page-item .item-img {
  max-width: 700px;
  margin: 0 auto 24px;
}

.page-item .item-img img {
  display: block;
  width: 100%;
  height: auto;
}

.page-item > div > p {
  max-width: 560px;
  margin: 0 auto 18px;
  line-height: 1.9;
  font-size: 14px;
}

.page-item > div > div {
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 0;
  font-size: 13px;
  border-top: 1px solid var(--border);
}

.page-item > div > div:nth-of-type(2) {
  margin: 24px auto 10px;
  padding-top: 0;
  border-top: none;
  font-size: 20px;
  font-weight: bold;
}

@media screen and (max-width: 900px) {

  main section ul {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .product-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}