*,
*::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);
  letter-spacing: 0.12em;
  background-image: var(--paper);
}

#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 {
  margin-top: 2rem;
  & 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;
        background-color: var(--ink);
        color: var(--snow);
        &:hover {
          text-decoration: none;
        }
      }

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

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

.thumbnail {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;

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

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  
  &::before, &::after {
    content: "";
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
  }
  &::before {
    background: rgba(0 0 0 / 1%);
    backdrop-filter: blur(2px);
  }
  &::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.05) 21.15%, rgba(0, 0, 0, 0.00) 100%);
  }
}

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

.blog-list {
  & .webgene-blog {
    display: grid;
    gap: 2rem;
    
    @media (min-width: 768px) {
      grid-template-columns: repeat(2, minmax(0, 1fr));

      & .webgene-pagniation, & .webgene-no-items {
        grid-column: span 2 / span 2;
      }
    }
  }
}

.button {
  background-color: var(--button-bg);
  color: var(--button-fg);
  border-radius: 9999px;
  padding-left: 1.25rem;
  padding-right: 0.375rem;
  padding-block: 0.375rem;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  line-height: 1.25;
  font-size: 1rem;
  font-weight: 400;
  transition: all 350ms ease;
  
  &::after {
    content: "";
    width: 3rem;
    height: 1.75rem;
    background-repeat: no-repeat;
    background-size: contain;
  }
  
  &.button--ink {
    background-color: var(--ink);
    color: var(--snow);
    &::after {
      background-image: url(/system_panel/uploads/images/button-arrow-snow.svg);
    }
  }
  &.button--sky {
    background-color: var(--sky);
    color: var(--snow);
    &::after {
      background-image: url(/system_panel/uploads/images/button-arrow-sky.svg);
    }
  }
  
  &:hover {
    opacity: 0.85;
    transform: scale(0.98);
    text-decoration: none;
  }
}

.contact-section {
  border-top-right-radius: 1.5rem;
  border-bottom-right-radius: 3.75rem;
  border-top-left-radius: 3.75rem;
  border-bottom-left-radius: 1.5rem;
  overflow: hidden;
  
  @media (min-width: 1024px) {
    border-top-right-radius: 3rem;
    border-bottom-right-radius: 7.5rem;
    border-top-left-radius: 7.5rem;
    border-bottom-left-radius: 3rem;
  }
}

.footer {
  position: relative;
  
  &::before, &::after {
    content: "";
    width: 6.25rem;
    height: 6.25rem;
    position: absolute;
    pointer-events: none;
    background-image: url(/system_panel/uploads/images/20260426150631523008.svg);
    background-repeat: no-repeat;
    background-size: contain;
  }
  &::before {
    top: 0;
    right: 0;
    transform: rotate(180deg);
  }
  &::after {
    bottom: 0;
    left: 0;
  }
}

.access-map {
  aspect-ratio: 2 / 1;
  position: relative;
  
  & iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }
}

.image-slider {
  &.swiper {
    width: 100%;
    &:not(.swiper-initialized) {
      & .swiper-wrapper {
        overflow-x: auto;
        display: flex;
      }
      & .swiper-slide {
        min-width: 25rem;
        width: 25rem;
      }
    }
  }
  & .swiper-wrapper {
    transition-timing-function: linear;
  }
  & .swiper-slide {
    & img {
      width: 100%;
      aspect-ratio: 4 / 3;
      object-fit: cover;
      border-radius: 1rem;
    }
  }
}

.card-grid {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-margin-inline-end: 2rem;
  margin-right: -1.25rem;
  padding-right: 1.25rem;
  
  & .card-grid__item {
    width: 15.625rem;
    min-width: 15.625rem;
    scroll-snap-align: start;
  }
  
  @media (min-width: 768px) {
    margin-right: -2.5rem;
    padding-right: 2.5rem;
  }
  @media (min-width: 1024px) {
    margin-right: -3.75rem;
    padding-right: 3.75rem;
    
    & .card-grid__item {
      width: 18rem;
      min-width: 18rem;
    }
  }
  
  @media (min-width: 1200px) {
    margin-right: 0;
    padding-right: 0;
    overflow: hidden;
    display: grid;
    
    &.card-grid--2 {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    &.card-grid--3 {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    & .card-grid__item {
      min-width: unset;
      width: 100%;
    }
  }
}

.image-stack {
  & > .image-stack__image {
    position: absolute;
    box-shadow: var(--elevation-2);

    &.image-stack__image--tr {
      top: 0;
      right: 0;
      width: 76.8%;
    }
    &.image-stack__image--tl {
      top: 0;
      left: 0;
      width: 76.8%;
    }
    &.image-stack__image--bl {
      bottom: 0;
      left: 0;
      width: 63%;
    }
    &.image-stack__image--br {
      bottom: 0;
      right: 0;
      width: 63%;
    }
  }
}

.home-blog-list.blog-list {
  display: none;
  
  @media (min-width: 1200px) {
    display: block;
  }
  & .webgene-blog {
    @media (min-width: 1200px) {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }
}

.home-recruit-image {
  mask-image: url(/system_panel/uploads/images/20260427143650741670.png);
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: 100% 100%;
  width: 125%;
  
  @media (min-width: 1024px) {
    width: 115%;
  }
  @media (min-width: 1200px) {
    width: 130%;
  }
  
  & img {
    width: 100%;
  }
}

.home-recruit-deco {
  position: absolute;
  top: 50%;
  left: -1.5rem;
  transform: translateY(-50%);
  width: 3rem;
}

.home-hero {
  height: clamp(37.5rem, 100dvh, 75rem);
  overflow: hidden;
  position: relative;
  
  & .swiper {
    z-index: 0;
    & .swiper-wrapper {
      z-index: 0;
    }
    &:not(.swiper-initialized) {
      & .swiper-wrapper {
        display: flex;
        overflow-x: auto;
      }
      & .swiper-slide {
        min-width: 100%;
      }
    }
  }
  
  & .home-hero-main {
    aspect-ratio: 16 / 9;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(25rem, 50%, 50rem);
    box-shadow: var(--elevation-2);
  }
}

.home-news {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 20rem;
  padding: 0.75rem 1rem 0.75rem 1.5rem;
  background-color: var(--snow);
}

.responsive-video {
  width: 100%;      /* 親要素の幅いっぱいに広げる */
  height: auto;     /* アスペクト比を維持 */
  max-width: 800px; /* 必要に応じて最大サイズを制限（任意） */
}