*,
*::before,
*::after {
  min-width: 0px;
  min-height: 0px;
}

html {
  /* 最小値13pxを保証し、1200px未満では最大22pxまでフォントサイズが流動する */
  font-size: clamp(13px, var(--font-size-base), 22px);

  @media screen and (min-width: 1200px) {
    font-size: clamp(0.1rem, var(--font-size-base), 24px);
  }
}

body {
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--ink);
  background-color: var(--snow);
  letter-spacing: 0.16em;
}

#root {
  margin: 0 auto;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: inherit;
  line-height: inherit;
}

img,
iframe {
  max-width: 100%;
}
iframe {
  border: none;
  box-shadow: none;
}

a,
a:hover {
  color: var(--ink);
}

[id] {
  scroll-margin-top: 3.75rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

button {
  position: relative;
  appearance: none;
  cursor: pointer;
  box-shadow: none;
  border: 0;
  outline: none;
  background: none;
  padding: 0;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-left: 1.5rem;
  list-style: disc outside none;

  & > p {
    margin: 0;
    display: list-item;
  }
}

.webgene-pagination {
  & ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    padding: 0;
    margin: 0;

    & li {
      & a {
        display: inline-block;
        width: 3rem;
        line-height: 3rem;
        text-align: center;
        border-radius: 9999px;
        border: 1px solid var(--blue);
        color: var(--blue);
        &:hover {
          text-decoration: none;
        }
      }

      &.selected {
        & a {
          background-color: var(--blue);
          color: var(--snow);
          &:hover {
          color: var(--snow);
          }
        }
      }
    }
  }
}

.webgene-no-items {
  width: 100%;
  text-align: center;
  font-size: 0.875rem;
}

.thumbnail {
  position: relative;

  &.thumbnail--16x9 {
    padding-top: 56.25%;
  }
  &.thumbnail--3x2 {
    padding-top: 66.6666%;
  }
  &.thumbnail--square {
    padding-top: 100%;
  }

  & img,
  & video,
  &:empty::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  &:empty::before {
    content: "";
    background-image: url("/system_panel/uploads/images/ogp.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
  }
}

.article-body {
  & > p {
    margin: 1em 0;
  }

  & > h1,
  & > h2,
  & > h3,
  & > h4,
  & > h5,
  & > h6 {
    margin: 2em 0 1em;
  }

  & > *:first-child {
    margin-top: 0;
  }

  & > *:last-child {
    margin-bottom: 0;
  }

  & a,
  & a:hover {
    color: var(--blue);
    text-decoration: underline;
  }
}

.backdrop-object {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.__mat.__mat--processed {
  word-break: keep-all;
  word-wrap: break-word;
}

.section-title {
  text-align: center;
  line-height: 1.25;
  
  & .section-title__dots {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    
    & .section-title__dot, &::before, &::after {
      content: "";
      border-radius: 9999px;
      background-color: var(--blue);
      aspect-ratio: 1 / 1;
    }
    & .section-title__dot {
      width: 0.75rem;
    }
    &::before, &::after {
      width: 0.5rem;
    }
  }
  & .section-title__ja {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--ink);
  }
  & .section-title__en {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.24em;
    color: var(--blue);
  }
  &.section-title--small {
    & .section-title__ja {
      font-size: 0.875rem !important;
    }
    & .section-title__en {
      font-size: 1.5rem !important;
    }
  }
  @media (min-width: 768px) {
    & .section-title__ja {
      font-size: 1.125rem;
    }
    & .section-title__en {
      font-size: 2rem;
    }
  }
  @media (min-width: 1024px) {
    & .section-title__ja {
      font-size: 1.5rem;
    }
    & .section-title__en {
      font-size: 3rem;
    }
  }
  @media (min-width: 1200px) {
    &.hero-title .section-title__ja {
      font-size: 2rem;
    }
    &.hero-title .section-title__en {
      font-size: 4rem;
    }
  }
  
  &.section-title--start {
    text-align: start;
    
    & .section-title__dots {
      justify-content: flex-start;
      &::before {
        width: 0.75rem;
      }
      & .section-title__dot {
        width: 0.5rem;
      }
    }
  }
  &.section-title--snow {
    & .section-title__ja {
      color: var(--light-blue);
    }
    & .section-title__en {
      color: var(--snow);
    }
    & .section-title__dots {
      & .section-title__dot, &::before, &::after {
        background-color: var(--snow);
      }
    }
  }
}

.button {
  border-radius: 9999px;
  border: 1px solid var(--blue);
  color: var(--snow);
  background-color: var(--blue);
  padding-inline: 1.25rem 1.5rem;
  padding-block: 0.75rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  align-items: center;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.25;
  transition: opacity 250ms ease;
  letter-spacing: inherit;
  
  &:hover {
    opacity: 0.85;
    text-decoration: none;
    color: var(--snow);
  }
  
  &.button--outline-blue {
    background-color: transparent;
    color: var(--blue);
    &:hover {
      color: var(--blue);
    }
  }
  &.button--outline-ink {
    background-color: transparent;
    border: 1px solid var(--ink);
    color: var(--ink);
    &:hover {
      color: var(--ink);
    }
  }
  &.button--outline-snow {
    background-color: transparent;
    border: 1px solid var(--snow);
    color: var(--snow);
    &:hover {
      color: var(--snow);
    }
  }
}

.footer-profile {
  aspect-ratio: 21 / 20;
  position: relative;
  
  @media (min-width: 1024px) {
    width: 32.8%;
  }
  
  & .footer-profile__image {
    aspect-ratio: 1 / 1;
    width: 92.85%;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 9999px;
    object-fit: cover;
  }
  &::before {
    content: "";
    width: 92.85%;
    position: absolute;
    bottom: 0;
    right: 0;
    aspect-ratio: 1 / 1;
    border-radius: 9999px;
    filter: blur(16px);
    background: var(--blue-gradient);
  }
  & .footer-profile__bubble {
    width: 15rem;
    position: absolute;
    top: -4.375rem;
    left: -1.75rem;
    z-index: 1;
    
    @media (min-width: 1024px) {
      top: -3.5rem;
      left: -10rem;
    }
    @media (min-width: 1200px) {
      top: 5.5rem;
      left: -12.5rem;
    }
  }
}

.page-hero {
  position: relative;
  
  &::before, &::after {
    content: "";
    position: absolute;
    left: 0;
    aspect-ratio: 80 / 3;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    width: 100%;
    z-index: 2;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08)) drop-shadow(0 8px 24px rgba(0, 0, 0, 0.08));
  }
  &::before {
    top: -0.0625rem;
    background-image: url("/system_panel/uploads/images/wave-top.png");
  }
  &::after {
    bottom: -0.0625rem;
    background-image: url("/system_panel/uploads/images/wave-bottom.png");
  }
}

.dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;

  & .dot, &::before, &::after {
    content: "";
    border-radius: 9999px;
    background-color: var(--blue);
    aspect-ratio: 1 / 1;
  }
  & .dot {
    width: 0.75rem;
  }
  &::before, &::after {
    width: 0.5rem;
  }
  
  &.dots--snow {
    & .dot, &::before, &::after {
      background-color: var(--snow);
    }
  }
}

.news-list {
  & .webgene-blog {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
}
.category-list {
  & .webgene-blog {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
}
.blog-list {
  & .webgene-blog {
    display: grid;
    gap: 1.5rem;
  }
  @media (min-width: 768px) {
    & .webgene-blog {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    & .webgene-pagination, & .webgene-no-items {
      grid-column: span 2 / span 2;
    }
  }
  @media (min-width: 1200px) {
    & .webgene-blog {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    & .webgene-pagination, & .webgene-no-items {
      grid-column: span 3 / span 3;
    }
  }
}
.home-blog-list {
  & .webgene-blog {
    display: grid;
    gap: 1.5rem;
  }
  @media (min-width: 1024px) {
    & .webgene-blog {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    & .webgene-pagination, & .webgene-no-items {
      grid-column: span 3 / span 3;
    }
  }
}
.insta-list {
  & .webgene-blog {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  & .webgene-item:nth-of-type(5) {
    display: none;
  }
  & .webgene-pagination, & .webgene-no-items {
    grid-column: span 2 / span 2;
  }
  @media (min-width: 1024px) {
    & .webgene-blog {
      grid-template-columns: repeat(5, minmax(0, 1fr));
    }
    & .webgene-pagination, & .webgene-no-items {
      grid-column: span 5 / span 5;
    }
    & .webgene-item:nth-of-type(5) {
      display: block;
    }
  }
}

.area-map {
  @media (min-width: 1024px) {
    position: absolute;
    width: 36.33333333%;
    right: -19.333%;
    top: 6.5%;
  }
  @media (min-width: 1200px) {
    width: 58.33333333%;
    right: -23.333%;
    top: -12.5%;
  }
}

.table-wrapper {
  overflow: auto;
  margin-inline: -1.25rem;
  & .table-wrapper__table {
    min-width: 37.5rem;
    margin-inline: 1.25rem;
  }
}
.table-cell {
  padding: 1rem 1.25rem;
  @media (min-width: 1024px) {
    padding: 1rem 2rem;
  }
}
.table-header {
  & .table-cell {
    background-color: var(--blue);
    color: var(--snow);
  }
}
.table-row {
  &:nth-of-type(even) {
    & .table-cell {
      background-color: var(--snow);
    }
  }
  &:nth-of-type(odd) {
    & .table-cell {
      background-color: var(--light-gray);
    }
  }
}

.flow-list {
  display: grid;
  gap: 1.5rem;
  
  @media screen and (min-width: 768px) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  @media screen and (min-width: 1200px) {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
  }

  & .flow-list__item {
    display: flex;
    flex-direction: column;
    gap: 1rem;

    & .flow-list__title {
      border-radius: 1.5rem;
      padding: 1.5rem;
      text-align: center;
      font-size: 1.125rem;
      line-height: 1.25;
    }
    & .flow-list__container {
      border-radius: 1.5rem;
      padding: 1rem;
      background-color: #EEF7FC;
    }
    &:first-child .flow-list__title {
      background-color: #EEF7FC;
    }
    &:nth-child(2) .flow-list__title {
      background-color: #B5DDF2;
    }
    &:nth-child(3) .flow-list__title {
      background-color: #8ACAEA;
    }
    &:nth-child(4) .flow-list__title {
      background-color: #34A2DB;
      color: var(--snow);
    }
    &:last-child .flow-list__title {
      background-color: var(--blue);
      color: var(--snow);
    }
    
    @media screen and (min-width: 768px) {
      & .flow-list__title {
        border-radius: 0.75rem;
        padding: 1.5rem;
      }
      & .flow-list__container {
        border-radius: 0.75rem;
        padding: 2rem;
        flex: 1 0 0%;
      }
      & .flow-list__content {
        flex: 1 0 0%;
      }
    }
    @media screen and (min-width: 1200px) {
      gap: 2rem;
      & .flow-list__title {
        position: relative;
        &::before {
          content: "";
          position: absolute;
          top: 0;
          right: -20px;
          width: 20px;
          height: 100%;
          z-index: 1;
        }
      }
      &:first-child {
        & .flow-list__title {
          border-top-right-radius: 0;
          border-bottom-right-radius: 0;
          &::before {
            background: no-repeat center/100% 100% url("/system_panel/uploads/images/flow-polygon--1.png");
          }
        }
        & .flow-list__container {
          border-top-right-radius: 0;
          border-bottom-right-radius: 0;
        }
        & .flow-list__content {
          border-right: 1px dashed var(--blue);
          padding-right: 2rem;
          margin-right: -2rem;
          height: 100%;
        }
      }
      &:nth-child(2), &:nth-child(3), &:nth-child(4) {
        & .flow-list__title {
          border-radius: 0;
        }
        & .flow-list__container {
          border-radius: 0;
        }
        & .flow-list__content {
          border-right: 1px dashed var(--blue);
          padding-right: 2rem;
          margin-right: -2rem;
          height: 100%;
        }
      }
      &:nth-child(2) .flow-list__title::before {
        background: no-repeat center/100% 100% url("/system_panel/uploads/images/flow-polygon--2.png");
      }
      &:nth-child(3) .flow-list__title::before {
        background: no-repeat center/100% 100% url("/system_panel/uploads/images/flow-polygon--3.png");
      }
      &:nth-child(4) .flow-list__title::before {
        background: no-repeat center/100% 100% url("/system_panel/uploads/images/flow-polygon--4.png");
      }
      &:last-child {
        & .flow-list__title {
          border-radius: 0;
          &::before {
            background: no-repeat center/100% 100% url("/system_panel/uploads/images/flow-polygon--5.png");
          }
        }
        & .flow-list__container {
          border-top-left-radius: 0;
          border-bottom-left-radius: 0;
        }
        & .flow-list__content {
          padding-right: 2rem;
          margin-right: -2rem;
          height: 100%;
        }
      }
    }
  }
}

.wave-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  &::before {
    content: "";
    position: absolute;
    top: 16.875rem;
    left: 0;
    width: 100%;
    aspect-ratio: 64 / 11;
    filter: blur(15px);
    background-image: url(/system_panel/uploads/images/wave-backdrop.png);
    background-repeat: no-repeat;
    background-size: 100% 100%;
  }
}

.info-illust-1, .info-illust-2 {
  position: absolute;
  display: none;
  pointer-events: none;
  
  @media (min-width: 1024px) {
    display: block;
  }
}
.info-illust-1 {
  top: -2.5rem;
  left: -3rem;
  width: 31.875rem;
}
.info-illust-2 {
  top: 5.5rem;
  right: -5rem;
  width: 30rem;
}

.home-hero-title {
  text-shadow: 0.75rem 0.75rem 0.5rem hsla(from var(--blue) h s l / 50%);
}

.home-hero-image {
  aspect-ratio: 21 / 20;
  position: relative;
  width: 100%;
  max-width: 33.75rem;
  &::before {
    content: "";
    width: 92.85%;
    position: absolute;
    top: 0;
    left: 0;
    aspect-ratio: 1 / 1;
    border-radius: 9999px;
    filter: blur(16px);
    background: var(--blue-gradient);
  }
  & img {
    aspect-ratio: 1 / 1;
    width: 92.85%;
    position: absolute;
    bottom: 0;
    right: 0;
    border-radius: 9999px;
    object-fit: cover;
  }
}

.home-news {
  position: absolute;
  bottom: 3.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 1.25rem);
  z-index: 5;
  
  @media (min-width: 768px) {
    left: 2.5rem;
    width: 100%;
    max-width: 25rem;
    transform: none;
  }
}

.home-service-list {
  display: flex;
  gap: 1rem;
  margin-inline: -1.25rem;
  padding-inline: 1.25rem;
  scroll-snap-type: x mandatory;
  overflow-x: auto;
  padding-block: 2rem;
  
  & .home-service-list__item {
    padding: 1.5rem 1rem;
    box-shadow: var(--elevation-2);
    background-color: var(--light-blue);
    border-radius: 1rem;
    display: grid;
    gap: 0.75rem;
    min-width: 83.58208955%;
    width: 83.58208955%;
    scroll-snap-align: start;
    @media (min-width: 768px) {
      padding: 1.5rem 2rem;
    }
  }
  & .home-service-list__contents {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    line-height: 1.25;
    font-weight: 600;
    text-align: center;
    
    & .title {
      font-size: 1.25rem;
    }
    & .price {
      display: flex;
      justify-content: center;
      align-items: baseline;
      gap: 0.5rem;
    }
    & .price__price {
      font-size: 2rem;
      color: var(--blue);
    }
    & .price__label {
      font-weight: 500;
      font-size: 1rem;
    }
  }
  
  @media (min-width: 768px) {
    display: grid;
    overflow: visible;
    margin: 0;
    padding: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    
    & .home-service-list__item {
      width: 100%;
      min-width: 100%;
    }
  }
  @media (min-width: 1200px) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    
    & .home-service-list__item--column-2 {
      grid-column: span 2 / span 2;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      align-items: center;
      
      & .title {
        font-size: 1.5rem;
      }
      & .price__price {
        font-size: 2.5rem;
      }
      & .price__label {
        font-size: 1.25rem;
      }
    }
  }
}

.text-circle {
  animation: rotation 12s linear infinite;
}

@keyframes rotation {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.service-deco {
  position: absolute;
  top: -12.5rem;
  right: -6rem;
  opacity: 0.15;
  z-index: 4;
  
  @media (min-width: 1024px) {
    opacity: 1;
  }
}

.home-reviews {
  background-color: #5EA6DA;
  color: var(--snow);
  
  & .home-reviews__item {
    @media (min-width: 1024px) {
      position: sticky;
      bottom: 5rem;
    }
    
    &:nth-of-type(1) {
      z-index: 5;
    }
    &:nth-of-type(2) {
      z-index: 4;
    }
    &:nth-of-type(3) {
      z-index: 3;
    }
    &:nth-of-type(4) {
      z-index: 2;
    }
    &:nth-of-type(5) {
      z-index: 1;
    }
  }
  
  & .home-review__label {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.5rem;
    letter-spacing: 0.08em;
    opacity: 0.25;
    line-height: 0.7;
    color: var(--blue);
    
    & .text {
      font-size: 3rem;
    }
    & .number {
      font-size: 4.5rem;
    }
    
    @media (min-width: 414px) {
      & .text {
        font-size: 4rem;
      }
      & .number {
        font-size: 6rem;
      }
    }
    @media (min-width: 768px) {
      writing-mode: vertical-rl;
    }
  }
  
  & .home-reviews__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    
    & > div {
      height: 100%;
      width: 50%;
      &::before, &::after {
        content: "";
        aspect-ratio: 1 / 1;
        filter: blur(10px);
        border: 0.25rem solid var(--snow);
        position: absolute;
        border-radius: 9999px;
      }
      &:first-of-type {
        &::before {
          width: 29.375rem;
          top: 16.875rem;
          left: -8.75rem;
        }
        &::after {
          width: 39.375rem;
          left: -7.5rem;
          bottom: -8rem;
        }
      }
      &:last-of-type {
        &::before {
          width: 26.0625rem;
          top: 3.75rem;
          right: -7.5rem;
        }
        &::after {
          width: 17.8125rem;
          right: 3.75rem;
          bottom: 5.3125rem;
        }
      }
    }
  }
}

.about-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  pointer-events: none;
  
  & .about-backdrop-1, & .about-backdrop-2 {
    height: 100%;
    & img {
      border-radius: 9999px;
      aspect-ratio: 1 / 1;
      filter: blur(4px);
      position: absolute;
      pointer-events: auto;
      z-index: 1;
    }
    &::before {
      content: "";
      aspect-ratio: 1 / 1;
      filter: blur(10px);
      border: 0.25rem solid var(--blue);
      position: absolute;
      border-radius: 9999px;
    }
  }
  & .about-backdrop-1 {
    & img {
      top: 0;
      right: -4rem;
      width: 12.8125rem;
    }
    &::before {
      width: 14.5rem;
      top: -3.75rem;
      left: -2.6875rem;
    }
  }
  & .about-backdrop-2 {
    & img {
      bottom: -1.5rem;
      left: -3.99rem;
      width: 10.8125rem;
    }
    &::before {
      width: 12.25rem;
      bottom: -1.25rem;
      right: -1.25rem;
    }
  }
  @media (min-width: 1024px) {
    & .about-backdrop-1 {
      & img {
        right: 2rem;
        width: 16.8125rem;
      }
      &::before {
        width: 18.5rem;
        top: -3.75rem;
        left: 1.6875rem;
      }
    }
    & .about-backdrop-2 {
      & img {
        bottom: 1rem;
        left: 2.2rem;
        width: 12.8125rem;
      }
      &::before {
        width: 16.25rem;
        bottom: -1.25rem;
        right: -1.25rem;
      }
    }
  }
  @media (min-width: 1200px) {
    & .about-backdrop-1 {
      & img {
        top: unset;
        bottom: 1.4140625rem;
        left: -4rem;
        right: unset;
        width: 26.5rem;
      }
      &::before {
        width: 18.5rem;
        top: 1.25rem;
        left: -1.6875rem;
      }
    }
    & .about-backdrop-2 {
      & img {
        bottom: unset;
        top: 5.625rem;
        left: unset;
        right: -2.5rem;
        width: 21.875rem;
      }
      &::before {
        width: 12.25rem;
        bottom: 4.25rem;
        right: 8.25rem;
      }
      &::after {
        content: "";
        aspect-ratio: 1 / 1;
        filter: blur(10px);
        border: 0.25rem solid var(--blue);
        position: absolute;
        border-radius: 9999px;
        width: 26.0625rem;
        top: -2.5rem;
        right: -3.5rem;
      }
    }
  }
}
