*,
*::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);
  color: var(--ink);
  background-color: var(--snow);
  background-image: var(--stone);
  font-weight: 500;
}

#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;
  font-feature-settings: "palt";
}

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;
        background-color: rgba(0 0 0 / 20%);
        &:hover {
          text-decoration: none;
        }
      }

      &.selected {
        & a {
          background-color: var(--cobalt);
          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%;
  }

  & img,
  &: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 {
  & .section-title__en {
    line-height: 1.15;
    font-size: 1.5rem;
    font-family: var(--font-display);
  }
  & .section-title__ja {
    line-height: 1.25;
    font-size: 1.5rem;
    font-weight: 900;
  }
  &.section-title--lg {
    & .section-title__en {
      font-size: 1.5rem;
    }
    & .section-title__ja {
      font-size: 1.75rem;
    }
  }
  
  @media (min-width: 768px) {
    & .section-title__en {
      font-size: 2rem;
    }
    & .section-title__ja {
      font-size: 2rem;
    }
    
    &.section-title--lg {
      & .section-title__ja {
        font-size: 3rem;
      }
    }
  }
  @media (min-width: 1024px) {
    & .section-title__ja {
      font-size: 2.5rem;
    }
    &.section-title--lg {
      & .section-title__ja {
        font-size: 3.5rem;
      }
    }
  }
  @media (min-width: 1200px) {
    & .section-title__ja {
      font-size: 3rem;
    }
    &.section-title--lg {
      & .section-title__ja {
        font-size: 4rem;
      }
    }
  }
}

.hero-title {
  & .hero-title__en {
    line-height: 1.15;
    font-size: 1.5rem;
    font-family: var(--font-display);
  }
  & .hero-title__ja {
    line-height: 1.25;
    font-size: 2rem;
    font-weight: 900;
  }
  
  @media (min-width: 768px) {
    & .hero-title__en {
      font-size: 2rem;
    }
    & .hero-title__ja {
      font-size: 2.5rem;
    }
  }
  @media (min-width: 1024px) {
    & .hero-title__en {
      font-size: 2.5rem;
    }
    & .hero-title__ja {
      font-size: 4rem;
    }
  }
  @media (min-width: 1200px) {
    & .hero-title__ja {
      font-size: 5rem;
    }
  }
}

.hero {
  position: relative;
  color: var(--snow);
  
  & a {
    color: var(--snow) !important;
  }
}

.hero__image {
  position: absolute;
  inset: 0;
  
  &::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(0 0 0 / 70%);
    pointer-events: none;
  }
  
  & img {
    position: absolute;
  }
}

.breadcrumbs {
  & > p {
    display: inline;
    
    & + p {
      &::before {
        content: ">";
        margin-inline: 0.5rem;
      }
    }
  }
}

.button {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: opacity 200ms ease;
  background-color: transparent;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.125rem;
  
  &:hover {
    opacity: 0.85;
    text-decoration: none;
    color: var(--ink);
  }
  
  &:after {
    content: "";
    display: inline-block;
    width: 2.5rem;
    height: 2.5rem;
    background: url("/system_panel/uploads/images/button-arrow.svg") center / contain;
  }
  
  &.button--snow {
    &:after {
      background: url("/system_panel/uploads/images/button-arrow--snow.svg") center / contain;
    }
  }
}

.access-map {
  & iframe {
    aspect-ratio: 3 / 2;
    width: 100%;
    height: auto;
  }
}

.news-list {
  & .webgene-blog {
    display: grid;
    gap: 2rem;
  }
  
  @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;
    }
  }
}
.home-news-list {
  & .webgene-blog {
    display: grid;
    gap: 2rem;
  }
  
  @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;
    }
  }
}
.category-list {
  & .webgene-blog {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }
}

.strengths-count-num {
  position: absolute;
  color: var(--ink);
  opacity: 0.05;
  font-family: var(--font-display);
  font-size: 5rem;
  right: 0;
  top: 0;
  transform: translateY(-50%);
  z-index: -1;
  
  @media (min-width: 768px) {
    font-size: 8rem;
  }
  @media (min-width: 1024px) {
    font-size: 12rem;
  }
  @media (min-width: 1200px) {
    font-size: 15rem;
  }
}

.service-label {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(2%, -4%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
  line-height: 1;
  opacity: 0.2;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 900;
  
  & .service-label__label {
    font-size: 2.5rem;
  
    @media (min-width: 768px) {
      font-size: 3rem;
    }
    @media (min-width: 1024px) {
      font-size: 4rem;
    }
    @media (min-width: 1200px) {
      font-size: 6.25rem;
    }
  }
  & .service-label__num {
  	font-size: 5rem;
  
    @media (min-width: 768px) {
      font-size: 8rem;
    }
    @media (min-width: 1024px) {
      font-size: 12rem;
    }
    @media (min-width: 1200px) {
      font-size: 15rem;
    }
  }
}

.home-hero {
  height: 100dvh;
}

.home-text-group {
  font-weight: 900;
  line-height: 2rem;
  & p {
    display: inline;
  }
  & .home-text-group__em {
    font-size: 1.5rem;
  }
  & .home-text-group__rg {
    font-size: 1.125rem;
    opacity: 10%;
  }
  
  @media (min-width: 768px) {
    line-height: 2.25rem;
    & .home-text-group__em {
      font-size: 1.75rem;
    }
    & .home-text-group__rg {
      font-size: 1.25rem;
    }
  }
  @media (min-width: 768px) {
    line-height: 2.5rem;
    & .home-text-group__em {
      font-size: 2rem;
    }
    & .home-text-group__rg {
      font-size: 1.5rem;
    }
  }
  @media (min-width: 1200px) {
    line-height: 4rem;
    & .home-text-group__em {
      font-size: 3rem;
    }
    & .home-text-group__rg {
      font-size: 2rem;
    }
  }
}

.swiper:not(.swiper-initialized) {
  & .swiper-wrapper {
    overflow: auto;
    display: flex;
    & .swiper-slide {
      min-width: 100%;
      width: 100%;
    }
  }
}

.service-work {
  width: 100%;
  & img {
    aspect-ratio: 12 / 5;
    width: 100%;
    object-fit: cover;
  }
}
