@charset "utf-8";

:root {
  --main-color: #B4222D;
  --sub-color: #1F5BAA;
  --border-color: #999999;
  --contents-size: 1280px;

  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
}

body {
  padding: 64px 0 0;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 14px;
  /*font-feature-settings: "palt";*/
  letter-spacing: .02em;
}

img {
  width: auto;
  height: auto;
}

p {
  font-size: 16px;
  line-height: 28px;

  @media (max-width: 767px) {
    font-size: 14px;
    line-height: 24px;
  }

  strong {
    color: var(--main-color);
    font-weight: normal;
  }
}

a {
  color: var(--sub-color);
}

ul, ol {
  list-style: none;
}

@media (min-width: 768px) {
  .sp {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .pc {
    display: none !important;
  }
}


/* --------------------------------------------------
 * Common Styles
 */

.common-layout {
  display: flex;
  flex-direction: column;
  padding: 0 max(calc(50% - var(--contents-size) / 2), 40px);

  @media (max-width: 767px) {
    padding: 0 40px;
  }
}

.common-col2-layout {
  display: flex;
  align-items: stretch;
  gap: 40px;
  min-height: 100dvh;
  padding: 0 max(calc(50% - var(--contents-size) / 2), 40px);

  > .side {
    width: 340px;
    padding-top: 80px;

    .document-nav {
      height: 100%;
      padding: 40px 0 40px 36px;
      border-left: 4px solid #f8f8f8;

      dl {
        display: flex;
        flex-direction: column;
        gap: 50px;

        div {
          dt {
            color: var(--main-color);
            line-height: 30px;
          }

          dd {
            ul {
              display: flex;
              flex-direction: column;

              li {
                font-size: 18px;
                line-height: 46px;

                &.active{
                  margin-left: -40px;
                  padding-left: 36px;
                  border-left: 4px solid var(--main-color);
                }

                a {
                  text-decoration: none;
                  color: #000;
                }
              }
            }
          }
        }
      }
    }
  }

  > .body {
    width: calc(100% - 380px);
    max-width: 1000px;
    padding-top: 80px;

    h1 {
      margin-bottom: 30px;
      font-size: 45px;
      font-weight: normal;
      line-height: 75px;
    }
  }

  @media (max-width: 1023px) {
    flex-direction: column;

    .side {
      padding-top: 0;
      background-color: #fff;
      z-index: 1;

      .document-nav {
        position: static;
        padding: 0;

        dl {
          position: fixed;
          top: 64px;
          left: -300px;
          width: 300px;
          height: calc(100% - 64px);
          padding: 40px 0;
          overflow: auto;
          padding-left: 40px;
          border: none;
          transition: left 300ms, box-shadow 300ms;
          background-color: #fff;
          z-index: 2;
        }
      }

      &.opened .document-nav dl {
        left: 0;
        box-shadow: 2px 2px 3px rgba(0, 0, 0, .15);
      }

      .toggle-button {
        position: fixed;
        top: 64px;
        right: 0;
        display: block;
        width: 60px;
        height: 60px;
        border: 1px solid #eee;
        background-color: #f8f8f8;

        &::before,
        &::after {
          content: "";
          display: block;
          position: absolute;
          top: 26px;
          left: 20px;
          width: 20px;
          height: 2px;
          background-color: #666;
        }

        &::after {
          top: 32px;
        }
      }

      &.opened .toggle-button {
        &::before,
        &::after {
          top: calc(50% - 1px);
          left: calc(50% - 10px);
          transform: rotate(45deg);
        }

        &::after {
          transform: rotate(-45deg);
        }
      }
    }

    .body {
      width: 100%;
      padding-top: 40px;

      h1 {
        font-size: 35px;
        line-height: 50px;
      }
    }
  }
}

.common-section {
  padding: 80px 0 40px;

  h2 {
    position: relative;
    margin-bottom: 60px;
    padding-bottom: 24px;
    font-size: 30px;
    line-height: 45px;
    font-weight: normal;

    &:not(:first-child) {
      margin-top: 80px;
    }

    &::before {
      content: "";
      display: block;
      position: absolute;
      left: 0;
      bottom: 0;
      width: 36px;
      height: 4px;
      background-color: var(--main-color);
    }

    &.center {
      text-align: center;

      &::before {
        left: calc(50% - 18px);
      }
    }
  }

  h3 {
    position: relative;
    margin-bottom: 30px;
    padding-left: 40px;
    font-size: 24px;
    font-weight: normal;
    line-height: 28px;

    &::before {
      content: "";
      display: block;
      position: absolute;
      left: 0;
      bottom: 0;
      width: 24px;
      height: 4px;
      background-color: var(--main-color);
    }
  }
}

.article-detail {
  font-size: 16px;
  line-height: 28px;

  h2 {
    margin: 60px 0 30px -30px;
    padding: 0 0 4px 24px;
    border-left: 6px solid var(--main-color);
    font-size: 30px;
    line-height: 42px;
    font-weight: normal;
  }

  h3 {
    margin: 40px 0 30px -30px;
    padding: 0 0 2px 24px;
    border-left: 6px solid var(--border-color);
    font-size: 22px;
    font-weight: normal;
    line-height: 28px;
  }

  h4 {
    margin: 40px 0 30px;
    font-size: 22px;
    font-weight: normal;
    line-height: 28px;
  }

  p {
    margin: 30px 0;
    color: #333;
  }

  pre {
    margin: 30px 0;
    border-radius: 4px;
    overflow: auto;
    background-color: #000;

    code {
      display: block;
      width: max-content;
      padding: 20px;
      color: #fff;
      font-size: 14px;
      line-height: 24px;
    }
  }

  ul {
    li {
      position: relative;
      padding: 0 0 0 20px;

      &::before {
        content: "";
        display: block;
        position: absolute;
        top: 50%;
        left: 0;
        width: 6px;
        height: 2px;
        background-color: var(--main-color);
      }
    }
  }

  ol {
    counter-reset: number 0;

    li {
      position: relative;
      padding-left: 30px;

      &::before {
        counter-increment: number 1;
        content: counter(number) ".";
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        width: 25px;
        text-align: right;
      }
    }
  }

  p {
    code {
      display: inline-block;
      margin: 0 5px;
      padding: 0 8px;
      border-radius: 5px;
      background-color: #eee;

      &:first-child {
        margin-left: 0;
      }
    }
  }

  table {
    width: 100%;
    margin: 30px 0;
    border-collapse: collapse;

    th, td {
      padding: 10px 15px;
      border: 1px solid var(--border-color);
      text-align: left;
      vertical-align: top;
    }

    th {
      background-color: #f8f8f8;
    }

    @media (max-width: 767px) {
      th, td {
        padding: 10px;
        font-size: 14px;
        line-height: 24px;
      }
    }
  }

  /* 固有 */
  .dynamic-functions-table {
    overflow-x: auto;

    table {
      min-width: 800px;

      th {
        text-align: center;
        font-size: 12px;

        a {
          font-size: 14px;
        }
      }

      td {
        text-align: center;
      }
    }
  }
}

@keyframes loading {
  0% {
    background-color: #999;
  }
  50%, 100% {
    background-color: #eee;
  }
}

.loading {
  position: relative;
  width: 40px;
  height: 60px;

  div {
    position: absolute;
    top: 25px;
    left: 20px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #eee;
    animation: loading .8s infinite linear alternate;
    animation-delay: 0.2s;

    &::before,
    &::after {
      content: "";
      position: absolute;
      top: 0;
      left: -15px;
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background-color: #eee;
      animation: loading .8s infinite linear alternate;
      animation-delay: 0;
    }

    &::after {
      left: 15px;
      animation-delay: 0.4s;
    }
  }
}

/* --------------------------------------------------
 * Layout
 */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  padding: 0 40px;
  transition: box-shadow 300ms;
  background-color: #fff;
  z-index: 2;

  @media (max-width: 767px) {
    padding: 0 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .2);
  }

  &:hover {
    box-shadow: 0 2px 5px rgba(0, 0, 0, .2);
  }

  .logo {
    display: flex;
    gap: 10px;

    a {
      display: contents;
      color: #000;
      transition: color 300ms;

      &:hover {
        color: var(--main-color);
      }

      img {
        width: 42px;
      }

      span {
        padding-top: 2px;
        font-size: 24px;
        font-weight: normal;
      }
    }
  }

  nav {
    display: flex;
    align-items: center;
    gap: 40px;

    ul {
      display: contents;
      list-style: none;

      li {
        position: relative;

        a {
          text-decoration: none;
          color: #000;
          transition: color 300ms;

          &:hover {
            color: var(--main-color);
          }
        }

        #document &.documents,
        #article &.articles {
          &::before {
            content: "";
            display: block;
            position: absolute;
            bottom: -12px;
            left: calc(50% - 3px);
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background-color: var(--main-color);
          }
        }
      }
    }

    .install {
      a {
        display: block;
        padding: 0 16px;
        border-radius: 12px;
        text-decoration: none;
        color: #fff;
        line-height: 40px;
        background-color: #000;
        transition: background-color 300ms;

        &:hover {
          background-color: var(--main-color);
        }
      }
    }
  }
}

main {
  position: relative;
  min-height: calc(100dvh - (64px + 120px + 40px + 28px));
  z-index: 1;
}

.site-footer {
  position: relative;
  margin-top: 120px;
  padding: 20px 0;
  text-align: center;
  z-index: 0;

  @media (max-width: 767px) {
    margin-top: 60px;
  }
}


/* --------------------------------------------------
 * TOP
 */

#top {
  .main-visual {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 40px;
    position: relative;
    width: 100%;
    height: 664px;
    padding: 40px max(calc(50% - var(--contents-size) / 2), 40px);
    overflow: hidden;
    background: linear-gradient(to bottom, #ffffff 0%, #F7FAFC 100%);

    @media (max-width: 767px) {
      height: auto;
      padding: 80px 40px;
    }

    > * {
      position: relative;
      z-index: 1;
    }

    .copy {
      display: flex;
      gap: 40px;
      font-size: 40px;
      font-weight: normal;
      line-height: 1.5;

      img {
        width: 140px;
      }

      strong {
        color: var(--main-color);
        font-weight: normal;
      }

      @media (max-width: 767px) {
        gap: 20px;
        flex-direction: column;
        font-size: 28px;

        img {
          width: 100px;
        }
      }
    }

    .introduction {
    }

    .install {
      display: flex;

      a {
        display: block;
        padding: 0 20px;
        border-radius: 12px;
        text-decoration: none;
        color: #fff;
        font-size: 20px;
        line-height: 48px;
        background-color: #000;
        transition: background-color 300ms;

        &:hover {
          background-color: var(--main-color);
        }

        @media (max-width: 767px) {
          font-size: 16px;
          line-height: 40px;
        }
      }
    }

    .bg {
      position: static;

      > div {
        display: block;
        position: absolute;
        width: 500px;
        height: 500px;
        background-color: var(--main-color);
        opacity: .05;

        &:nth-child(1) {
          top: 0;
          left: calc(50% - 100px);
        }

        &:nth-child(2) {
          top: -440px;
          left: calc(50% + 280px);
        }

        &:nth-child(3) {
          top: 400px;
          left: calc(50% + 200px);
        }

        &:nth-child(4) {
          top: 100px;
          left: calc(50% + 620px);
        }

        &:nth-child(5) {
          top: 580px;
          left: calc(50% - 800px);
        }

        &:nth-child(6) {
          top: 300px;
          left: calc(50% - 1250px);
        }

        @media (max-width: 767px) {
          &:nth-child(1) {
            left: calc(100% - 60px);
          }

          &:nth-child(2) {
            top: 400px;
            left: -300px;
          }

          &:nth-child(n + 3) {
            display: none;
          }
        }
      }
    }
  }

  .features {
    section + section {
      margin-top: 100px;
    }

    section {
      ul {
        display: flex;
        flex-wrap: wrap;
        gap: 30px;

        li {
          display: flex;
          flex-direction: column;
          gap: 20px;
          width: calc((100% - 60px) / 3);

          .image {
            position: relative;
            aspect-ratio: 300 / 200;
            border-radius: 10px;
            /*background: linear-gradient(to bottom, #fff 0%, #F7FAFC 100%);*/
            background: linear-gradient(to top, #f2f6fb 0%, #e8f5ff 100%);

            img {
              width: 100%;
              height: 100%;
              object-fit: contain;
              object-position: center;
            }

            &:not(:has(img))::before {
              content: "";
              display: block;
              position: absolute;
              top: 0;
              left: 0;
              width: 100%;
              height: 100%;
              opacity: .1;
              background: url(/assets/images/common/logo.svg) no-repeat center / 40%;
            }
          }

          p {
            text-align: justify;
          }

          p + p {
            a {
              display: inline-block;
              position: relative;
              padding-left: 20px;
              text-decoration: none;

              &::before {
                content: "";
                position: absolute;
                top: 50%;
                left: 0;
                width: 8px;
                height: 2px;
                background-color: #1F5BAA;
              }
            }
          }
        }

        @media (max-width: 767px) {
          flex-direction: column;

          li {
            width: 100%;

            .image {
              width: 100%;
              height: auto;
            }
          }
        }
      }

      /*
      &.development {
        ul li .image {
          background: linear-gradient(to bottom, #fff 0%, #FCF8F7 100%);
        }
      }
      */
    }
  }

  .supporters {
    ul {
      display: flex;
      flex-direction: column;
      gap: 60px;
      max-width: 800px;
      margin: 0 auto;

      li {
        a {
          display: flex;
          gap: 40px;
          padding: 40px;
          border-radius: 20px;
          text-decoration: none;
          color: #000;
          background: linear-gradient(to bottom, #fff 0%, #F7FAFC 100%);
          transition: box-shadow 300ms;

          &:hover {
            box-shadow: 0 0 10px rgba(0, 0, 0, .15);
          }

          .logo {
            width: 120px;
            height: 120px;
            border: 1px solid #e1e9f0;
            border-radius: 50%;
            background-color: #fff;
          }

          .texts {
            width: calc(100% - 160px);

            .company-name {
              color: var(--main-color);
              font-size: 20px;
            }

            .url {
              margin-top: 5px;
              color: var(--border-color);
              font-size: 14px;
              line-height: 1em;
            }

            .description {
              margin-top: 25px;
            }
          }
        }
      }

      @media (max-width: 767px) {
        li a {
          flex-direction: column;
          align-items: center;

          .texts {
            width: 100%;
          }
        }
      }
    }
  }
}
