*,
*::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);
  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: var(--snow);
        border: 1px solid var(--ink);
        &:hover {
          text-decoration: none;
        }
      }

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

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

.thumbnail {
  position: relative;

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

  & 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;
}

.page-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3.75rem;
  padding: 10rem 1.25rem 0;
  @media (min-width: 768px) {
    padding: 12.5rem 2.5rem 0;
  }
  @media (min-width: 1024px) {
    padding: 12.5rem 3.75rem 0;
  }
  @media (min-width: 1200px) {
    padding: 15rem 5rem 0;
  }
  
  & .page-hero__title {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    line-height: 1.25;
    & .page-hero__title-en {
      background-image: var(--grad-blue-on-dark);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      align-self: start;
      font-family: var(--font-display);
      font-size: 3.75rem;
      transform: skew(-10deg);
      border-bottom: 1px solid;
      border-image: var(--grad-blue-on-dark) 1;
      @media (min-width: 768px) {
        font-size: 5rem;
      }
      @media (min-width: 1024px) {
        font-size: 6.5rem;
      }
      @media (min-width: 1200px) {
        font-size: 8rem;
      }
    }
    & .page-hero__title-ja {
      font-weight: 900;
      font-size: 1.5rem;
      @media (min-width: 768px) {
        font-size: 2rem;
      }
      @media (min-width: 1024px) {
        font-size: 2.25rem;
      }
      @media (min-width: 1200px) {
        font-size: 2.5rem;
      }
    }
  }
}

.section-title {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  line-height: 1.25;
  & .section-title__en {
    background-image: var(--grad-blue-on-dark);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    align-self: start;
    font-family: var(--font-display);
    font-size: 2rem;
    transform: skew(-10deg);
    border-bottom: 1px solid;
    border-image: var(--grad-blue-on-dark) 1;
  }
  & .section-title__ja {
    font-weight: 900;
    font-size: 1.75rem;
    @media (min-width: 768px) {
      font-size: 2rem;
    }
    @media (min-width: 1024px) {
      font-size: 2.25rem;
    }
    @media (min-width: 1200px) {
      font-size: 2.5rem;
    }
  }
  &.section-title--snow {
    & .section-title__en {
      border-image: none;
      border-color: var(--snow);
      background-image: none;
      color: var(--snow);
    }
  }
}

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

.swiper:not(.swper-initialized) {
  &.history-slider {
    & .swiper-slide {
      min-width: 27%;
    }
  }
}

.history-slider {
  & .swiper-slide {
    aspect-ratio: 1 / 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    background-image: var(--noise-sky);
  }
  
  & .swiper-button-prev,
  & .swiper-button-next {
    position: relative;
    margin: 0;
    width: 3rem;
    @media (min-width: 768px) {
      width: 4rem;
    }
    @media (min-width: 1200px) {
      width: 5rem;
    }
    & .swiper-navigation-icon {
      display: none;
    }
  }
  & .swiper-button-next {
    transform: scaleX(-1);
  }
  
  & .swiper-pagination {
    position: relative;
    margin: 0;
    --swiper-pagination-bullet-inactive-color: hsl(0 0 100 / 50%);
    --swiper-pagination-color: var(--sky);
  }
}

.button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border-radius: 9999px;
  background-color: var(--salmon-red);
  color: var(--snow);
  line-height: 1.25;
  letter-spacing: 0;
  font-weight: 900;
  font-size: 1.125rem;
  transition: all ease 200ms;
  &::after {
    content: "";
    aspect-ratio: 1 / 1;
    width: 1.5rem;
    background-image: url(/system_panel/uploads/images/arrow-right.svg);
    background-repeat: no-repeat;
    background-size: 100% 100%;
  }
  &:hover {
    text-decoration: none;
    color: var(--snow);
    opacity: 90%;
    transform: scale(0.95);
  }
  &.button--no-icon::after {
    content: none;
  }
  
  &.button--snow {
    background-color: var(--snow);
    color: var(--sky);
  }
}

.footer-contact-typo {
  position: absolute;
  top: 0;
  left: -0.625rem;
  width: 105.9701492537%;
  @media (min-width: 1024px) {
    top: -0.625rem;
    right: -0.625rem;
    left: auto;
    width: 68.4375%;
  }
  & img {
    width: 100%;
  }
}

.services-feature-num {
  display: flex;
  align-items: baseline;
  line-height: 1.25;
  gap: 0.5rem;
  font-family: var(--font-display);
  & p {
    transform: skew(-10deg);
    &:first-child {
      font-size: 1.5rem;
    }
    &:last-child {
      font-size: 2.25rem;
    }
    @media (min-width: 786px) {
      &:first-child {
      font-size: 2rem;
      }
      &:last-child {
        font-size: 3rem;
      }
    }
  }
  &.services-feature-num--small {
    & p {
      &:first-child {
        font-size: 1.5rem;
      }
      &:last-child {
        font-size: 2rem;
      }
    }
  }
}

.services-flow-bg-image {
  position: absolute;
  inset: 0;
  &::after {
    pointer-events: none;
    content: "";
    position: absolute;
    inset: 0;
    background-image: url(/system_panel/uploads/images/noise.png);
  }
  & img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    opacity: 35%;
  }
}

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

.swiper.instagram-slider {
  width: 100%;
  transform: skewY(-6deg);
  overflow: visible;
  & .swiper-wrapper {
    transition-timing-function: linear;
    & .swiper-slide {
      & img {
        object-fit: cover;
        width: 100%;
        aspect-ratio: 3 / 2;
      }  
    }
  }
  &.instagram-slider--reverse {
    transform: skewY(6deg);
  }
}


.meta-list {
  & .webgene-blog {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
}

.post-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;
    }
  }
}

.equipment-images.item-images img {
  width: 100%;
  aspect-ratio: 1 / 1;
}

.home-hero {
  height: 100dvh;
  
  & .home-hero__contents {
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.25), 0 4px 4px rgba(0, 0, 0, 0.25);
  }
  
  & .home-hero-card {
    position: absolute;
    top: 8.375rem;
    right: 0;
    
    @media (min-width: 1024px) {
      top: unset;
      bottom: 13.75rem;
    }
  }
}

.home-features-image {
  position: absolute;
  border-radius: 9999px;
  
  &.home-features-image--1, &.home-features-image--4 {
    width: 46.4%;
    max-width: 20.375rem;
  }
  &.home-features-image--2, &.home-features-image--3 {
    width: 63.2%;
    max-width: 25rem;
  }
  &.home-features-image--1 {
    top: 0;
    left: 0;
    transform: translate(-24%, -12%);
  }
  &.home-features-image--2 {
    top: 0;
    right: 0;
    transform: translate(24%, -32%);
  }
  &.home-features-image--3 {
    bottom: 0;
    left: 0;
    transform: translate(-48%, 45%);
  }
  &.home-features-image--4 {
    bottom: 0;
    right: 0;
    transform: translate(32%, 51%);
  }
  
  @media (min-width: 1200px) {
    &.home-features-image--1 {
      transform: translate(-32%, 36%);
    }
    &.home-features-image--2 {
      transform: translate(24%, -24%);
    }
    &.home-features-image--3 {
      transform: translate(-14%, 14%);
    }
    &.home-features-image--4 {
      transform: translate(-3%, -12%);
    }
  }
}

.home-services-dec {
  position: absolute;
  top: 25rem;
  right: -4rem;
  width: 45%;
  max-width: 44.375rem;
  
  @media (min-width: 1024px) {
    top: 7.5rem;   
  }
}

.home-heritage-slides {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;

  & .swiper:not(.swiper-initialized) img {
    aspect-ratio: 3 / 2;
    object-fit: cover;
    width: 360px;
    min-width: 360px;
  }
  
  & .swiper-wrapper {
    transition-timing-function: linear;
  }
  
  & .swiper-initialized img {
    aspect-ratio: 3 / 2;
    object-fit: cover;
  }
  
  width: calc(100% + 2.5rem);
  margin-inline: -1.25rem;
  
  @media (min-width: 768px) {
    width: calc(100% + 5rem);
    margin-inline: -2.5rem;
  }
  
  @media (min-width: 1200px) {
    position: absolute;
    top: 0;
    right: 5rem;
    width: 40%;
    height: 100%;
    margin: 0;
    flex-direction: row;
    
    & .swiper {
      width: 50%;
      height: 100%;
    }
    
    & .swiper-slide {
      width: auto;
      height: auto;
    }
    
    & .swiper-slide img {
      aspect-ratio: unset;
      height: 100%;
    }
  }
}

.webgene-no-items {
  padding: 3rem 0;
}