@charset "utf-8";
/* ---------------------- main -------------------------------- */

main {
  background-color: #f1f8ff;
  > .pageTitle {
    color: #132f56;
    display: grid;
    gap: 32px 0;
    width: 42.5%;
    padding-top: 64px;
    text-align: center;
    margin-inline: auto;
    > .ribbon {
      font-size: clamp(12px, 1.66vw, 32px);
      font-weight: bold;
      --r: 0.8em; /* control the ribbon shape */
      padding-inline: calc(var(--r) + 0.3em);
      line-height: 1.8;
      clip-path: polygon(
        0 0,
        100% 0,
        calc(100% - var(--r)) 50%,
        100% 100%,
        0 100%,
        var(--r) 50%
      );
      background-color: #8fd7ff;
    }
  }
}

section {
  margin-inline: auto;
  padding: 80px 0;
}

.mainContactBar {
  background-color: white;
  container: cq-mainContactBar / inline-size;
  padding: 42px 0;
  > .barContent {
    width: 73.95%;
    display: grid;
    gap: 16px 0;
    margin-inline: auto;
    margin-bottom: 32px;
    > h2 {
      color: #132f56;
      font-size: clamp(19px, 1.66vw, 32px);
      text-align: center;
    }
    > .contactBox {
      display: flex;
      justify-content: center;
      gap: 32px;
      > a {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        white-space: nowrap;
      }
      > .phone {
        width: 32.18%;
        color: #6dc300;
        > img {
          width: 19.25%;
        }
        > div {
          > p {
            &:first-of-type {
              font-size: clamp(32px, 2.5vw, 48px);
              font-weight: 700;
            }
            &:nth-of-type(2) {
              position: relative;
              font-size: clamp(14px, 1.25vw, 24px);
              &::after {
                position: absolute;
                top: 100%;
                left: 0;
                content: "(定休日) 日・祝";
                font-size: clamp(14px, 1.25vw, 24px);
              }
            }
          }
        }
      }
      > .mail {
        width: 26.47%;
        background-color: #6dc300;
        color: white;
        border-radius: 6px;
        padding: 16px 48px;
        font-size: clamp(15px, 1.25vw, 24px);
        > img {
          min-width: 20px;
          width: 11.7%;
        }
      }
    }
  }
}
@container cq-mainContactBar (width < 900px) {
  .mainContactBar {
    > .barContent {
      margin-bottom: 0;
      > .contactBox {
        display: grid;
        > .phone,
        > .mail {
          width: 100%;
        }
      }
    }
  }
}

.mainLinkSection {
  padding: 128px 0;
  > .linkButtonBox {
    display: flex;
    justify-content: center;
    gap: 36px;
    > a {
      position: relative;
      width: 20%;
      padding: 8px 24px;
      border-radius: 100vmax;
      color: white;
      font-size: clamp(10px, 0.9375vw, 18px);
      font-weight: 600;
      text-align: center;
      &::after {
        position: absolute;
        content: "→";
        right: 12px;
      }
    }
    > .exampleButton {
      background-color: #8c67c7;
    }
    > .priceButton {
      background-color: #c767a1;
    }
  }
}
.companySection {
  width: 50%;
  display: grid;
  gap: 100px 0;
  > .companyBox {
    container: cq-companyBox / inline-size;
    display: grid;
    gap: 16px 0;
    > h3 {
      background-color: #d3d3d3;
      padding: 8px;
    }
    > .infoTable {
      display: grid;
      gap: 4px 0;
      grid-template-columns: 20% 1fr;
      > dt,
      > dd {
        padding: 8px;
        border-bottom: 1px solid #333;
        font-size: clamp(10px, 0.9375vw, 18px);
      }
      > dt {
        font-weight: 700;
      }
      > dd:has(.locationBox) {
        display: grid;
        gap: 8px 0;
        > .locationBox {
          > p:nth-of-type(n + 2) {
            margin-left: 16px;
          }
        }
      }
    }
    > .accessBox {
      display: grid;
      grid-template-columns: 55% 1fr;
      gap: 0 16px;
      > iframe {
        width: 100%;
        aspect-ratio: 16/9;
      }
      > .accessInfo {
        font-size: clamp(10px, 0.83vw, 16px);
        > h4 {
          font-size: clamp(12px, 1.04vw, 20px);
        }
        > div {
          margin: 8px 0;
        }
      }
    }
  }
}
@container cq-companyBox (width < 521px) {
  .companySection {
    > .companyBox {
      > .accessBox {
        grid-template-columns: 100%;
        gap: 16px 0;
      }
    }
  }
}

/* --------------------- マウスホバー ---------------------- */
/* transition */
:is(.phone, .mail).hoverScale {
  transition: scale 0.3s;
}
.linkButtonBox.hoverBgColor {
  > a {
    transition: opacity 0.3s;
  }
}
/*  */
@media (any-hover: hover) {
  :is(.phone, .mail).hoverScale:hover {
    scale: 1.05;
  }
  .linkButtonBox.hoverBgColor {
    > a:hover {
      opacity: 0.8;
    }
  }
}

/* メディアクエリ ////////////////////////////////*/
@media (width <= 520px) {
  main {
    background-color: revert;
    > .pageTitle {
      gap: 32px 0;
      width: 85%;
      padding-top: 32px;
    }
  }
  section {
    padding: 32px 0;
  }
  .mainContactBar:not(:last-child) {
    display: none;
  }
  .mainLinkSection {
    display: none;
  }
  .companySection {
    width: 100%;
    gap: 32px 0;
    > .companyBox {
      > h3 {
        padding: 4px;
      }
      > .infoTable {
        grid-template-columns: 25% 1fr;
        > dt,
        > dd {
          padding: 4px;
        }
      }
    }
  }
}
