*,
*::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.04em;
  font-weight: 700;
}

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

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

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

/* 今後スタイルを定義するためのプレースホルダー */
.news-list {
  /* TODO: ニュース一覧のスタイルを定義 */
}
.blog-list {
  /* TODO: ブログ一覧のスタイルを定義 */
}

.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;
  overflow: hidden;
  padding: 12.5rem 1.25rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 7.5rem;
  color: var(--snow);
  @media (min-width: 768px) {
    padding-inline: 2.5rem;
  }
  @media (min-width: 1024px) {
    padding-inline: 3.75rem;
  }
  @media (min-width: 1200px) {
    padding-inline: 5rem;
  }
  
  & .page-hero__bg-image {
    position: absolute;
    inset: 0;
    &::after {
      pointer-events: none;
      content: "";
      position: absolute;
      inset: 0;
      background-color: var(--ink);
      opacity: 50%;
    }
    & img {
      object-fit: cover;
      height: 100%;
      width: 100%
    }
  }
  
  & .page-hero__title {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 80rem;
    width: 100%;
    margin-inline: auto;
    & > p {
      line-height: 1.15;
      letter-spacing: 0;
      font-family: var(--font-display);
      font-size: 2.5rem;
      border-bottom: 3px solid var(--snow);
      align-self: start;
      text-box-trim: trim-both;
      text-box-edge: cap alphabetic;
      padding-inline: 0.125rem;
    }
    & >  h1 {
      line-height: 1.25;
      font-size: 2.5rem;
      @media (min-width: 768px) {
        font-size: 3.5rem;
      }
      @media (min-width: 1024px) {
        font-size: 4.5rem;
      }
      @media (min-width: 1200px) {
        font-size: 5rem;
      }
    }
  }
}

.section-title {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  --title-color: var(--ink);
  & > p {
    color: var(--title-color);
    line-height: 1.15;
    letter-spacing: 0;
    font-family: var(--font-display);
    font-size: 2.25rem;
    border-bottom: 3px solid var(--title-color);
    align-self: start;
    text-box-trim: trim-both;
    text-box-edge: cap alphabetic;
    padding-inline: 0.125rem;
  }
  & >  h2,
  & >  h3,
  & >  h4,
  & >  h5 {
    color: var(--title-color);
    line-height: 1.25;
    font-size: 1.5rem;
    @media (min-width: 768px) {
      font-size: 2.5rem;
    }
    @media (min-width: 1024px) {
      font-size: 3rem;
    }
    @media (min-width: 1200px) {
      font-size: 3.5rem;
    }
  }
  
  &.section-title--center {
    text-align: center;
    & > p {
      align-self: center;
    }
  }
  &.section-title--snow {
    --title-color: var(--snow);
  }
  &.section-title--blue {
    --title-color: var(--blue);
  }
}

.button {
  position: relative;
  padding: 0 0.25rem 0.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  line-height: 1.25;
  letter-spacing: 0.04em;
  font-weight: 700;
  font-family: var(--font-sans);
  font-size: 1.125rem;
  --button-color: var(--ink);
  color: var(--button-color);
  transition: all ease 200ms;
  @media (min-width: 768px) {
    font-size: 1.5rem;
  }
  &::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 4px;
    background-image: 
      repeating-linear-gradient(
        90deg,
        var(--button-color) 0px,
        var(--button-color) 1px,
        transparent 1px,
        transparent 8px
      ),
      linear-gradient(
        to top,
        var(--button-color) 1px,
        transparent 1px
      );
    background-size: 
      100% 3px,
      100% 4px;
    background-position: 
      top left,
      bottom left;
    background-repeat: 
      repeat-x,
      no-repeat;
  }
  &::after {
    content: "";
    aspect-ratio: 1 / 1;
    width: 1.5rem;
    background-image: url("/system_panel/uploads/images/arrow-right.svg");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    @media (min-width: 768px) {
      width: 2rem;
    }
  }
  &:hover {
    text-decoration: none;
    color: var(--button-color);
    opacity: 85%;
    transform: scale(0.95);
  }
  
  &.button--snow {
    --button-color: var(--snow);
    &::after {
      background-image: url("/system_panel/uploads/images/arrow-right--snow.svg");
    }
  }
  &.button--blue {
    --button-color: var(--blue);
    &::after {
      background-image: url("/system_panel/uploads/images/arrow-right--blue.svg");
    }
  }
}

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

.partner-slider {
  width: 100%;
  & .swiper-wrapper {
    transition-timing-function: linear;
  }
  & .swiper-slide {
    & img {
      object-fit: cover;
      aspect-raito: 3 / 2;
      width: 100%;
    }
  }
}

.angled-image {
  width: 100%;
  transform: rotate(-4deg);
  position: relative;
  margin: 2.5% auto;
  & img {
  position: relative;
  object-fit: cover;
  aspect-ratio: 2 / 1;
  }
  &::before {
    content: "";
    position: absolute;
    inset: 0;
    height: 100%;
    width: 100%;
    border: 1px solid var(--snow);
    transform: rotate(8deg);
    @media (min-width: 768px) {
      border-width: 2px;
    }
  }
  @media (min-width: 1024px) {
    width: 84.375%;
  }
}

.recruit-description-title {
  background-color: var(--snow);
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  width: max-content;
}

.news-list {
  & .webgene-blog {
    display: grid;
    gap: 3rem;
    @media (min-width: 768px) {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      & .webgene-pagination,
      & .webgene-no-items {
        grid-column: span 2 / span 2;
      }
    }
    @media (min-width: 1024px) {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      & .webgene-pagination,
      & .webgene-no-items {
        grid-column: span 3 / span 3;
      }
    }
  }
}

.border-b-text {
  color: var(--logo-blue);
  line-height: 1.15;
  letter-spacing: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  border-bottom: 3px solid var(--logo-blue);
  align-self: start;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
  padding-inline: 0.125rem;
  &.border-b-text--snow {
    color: var(--snow);
    font-size: 1.25rem;
    border-color: var(--snow);
    align-self: end;
  }
}

.section-work-list {
  display: contents;
  & .webgene-blog {
    display: contents;
  }
  @media (min-width: 768px) {
    & .webgene-no-items {
      grid-column: span 2 / span 2;
    }
  }
  @media (min-width: 1200px) {
    & .webgene-no-items {
      grid-column: span 3 / span 3;
    }
  }
}

.diy-title {
  background-image: url("/system_panel/uploads/images/noise-logo-blue.jpg");
  line-height: 1.4;
  font-size: 1.75rem;
  padding-left: 1em;
  text-indent: -0.5em;
  width: max-content;
  position: absolute;
  top: -0.75em;
  left: -1.3125em;
  @media (min-width: 768px) {
    font-size: 3rem;
  }
  @media (min-width: 1024px) {
    font-size: 3.5rem;
  }
  @media (min-width: 1200px) {
    font-size: 4rem;
  }
}

.services-slider {
  width: 100%;
  & .swiper-slide {
    & img {
      object-fit: cover;
      aspect-ratio: 3 / 4;
      width: 100%;
    }
  }
}

.diy-image {
  object-fit: cover;
  width: 100%;
  height: 22.5rem;
  clip-path: polygon(0 0, 100% 27%, 100% 100%, 0% 100%);
  @media (min-width: 1024px) {
    flex: 1 1 0%;
    height: stretch;
    clip-path: polygon(32% 0, 100% 0, 100% 100%, 0% 100%);
  }
  @media (min-width: 1200px) {
    margin-left: -3.5rem;
  }
}











