*,
*::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: 700;
  letter-spacing: 0.04em;
  font-feature-settings: "palt";
}

#root {
  max-width: 1920px;
  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;
        &:hover {
          text-decoration: none;
        }
      }

      &.selected {
        & a {
          &:hover {}
        }
      }
    }
  }
}

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

.thumbnail {
  position: relative;

  &.thumbnail--16x9 {
    padding-top: 56.25%;
  }
  &.thumbnail--4x3 {
    padding-top: 75%;
  }

  & 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 {
  padding: 4px;
  & .page-hero__wrapper {
    width: 100%;
  }
  & .page-hero__inner {
    width: 100%;
  }
  & .page-hero__grid {
    display: grid;
    gap: 0.25rem;
    height: 600px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(5, minmax(0, 1fr));

    & .page-hero__card {
      &:nth-of-type(1) {
        grid-column: 1 / 2;
        grid-row: 1 / 5;
      }
      &:nth-of-type(2) {
        grid-column: 2 / 3;
        grid-row: 1 / 3;
      }
      &:nth-of-type(3) {
        grid-column: 3 / 4;
        grid-row: 1 / 3;
      }
      &:nth-of-type(4) {
        grid-column: 2 / 4;
        grid-row: 3 / 5;
      }
      &:nth-of-type(5) {
        grid-column: 1 / 4;
        grid-row: 5 / 6;
      }
    }
  }
  
  & .page-hero__card {
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    &::after {
      content: "";
      position: absolute;
      inset: 0;
      background-color: var(--lime);
      opacity: 15%;
      pointer-events: none;
    }
    
    & > img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    
    &.page-hero__card--title {
      display: flex;
      flex-direction: column;
      justify-content: end;
      gap: 0.625rem;
      padding: 2rem 1rem 1.5rem 0;
      background-color: var(--ink);
      color: var(--snow);
      &::after {
        content: none;
      }
      @media (min-width: 768px) {
        padding-right: 2rem;
      }
      
      & .page-hero__card--title-en {
        display: flex;
        align-items: center;
        gap: 0.625rem;
        padding-right: 0.5rem;
        line-height: 1;
        font-size: 1rem;
        &::before {
          content: "";
          height: 1px;
          background-color: var(--snow);
          flex: 1 1 0%;
        }
        @media (min-width: 768px) {
          padding-right: 1rem;
          font-size: 1.125rem;
        }
        @media (min-width: 1024px) {
          padding-right: 2rem;
        }
      }
      
      & .page-hero__card--title-ja {
        text-align: end;
        letter-spacing: 0.08em;
        line-height: 1.25;
        font-size: 1.5rem;
        @media (min-width: 768px) {
          font-size: 1.75rem;
        }
        @media (min-width: 1024px) {
          font-size: 2rem;
        }
      }
    }
  }
}

@media screen and (min-width: 1024px) {
  .page-hero {
    & .page-hero__grid {
      height: 25rem;
      & .page-hero__card {
        &:nth-of-type(1) {
          grid-column: 1 / 2;
          grid-row: 1 / 4;
        }
        &:nth-of-type(2) {
          grid-column: 2 / 3;
          grid-row: 1 / 3;
        }
        &:nth-of-type(3) {
          grid-column: 3 / 4;
          grid-row: 1 / 3;
        }
        &:nth-of-type(4) {
          grid-column: 2 / 4;
          grid-row: 3 / 6;
        }
        &:nth-of-type(5) {
          grid-column: 1 / 2;
          grid-row: 4 / 6;
        }
      }
    }
  }
}

.section-title {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  --title-color: var(--blue);
  & .section-title__en {
    border-left: 4px solid var(--title-color);
    padding: 2px 0 2px 0.75rem;
    color: var(--title-color);
    line-height: 1;
    font-weight: 600;
    font-size: 1.5rem;
  }
  & .section-title__ja {
    line-height: 1.25;
    letter-spacing: 0.08em;
  }
  
  &.section-title--red {
    --title-color: var(--red);
  }
  &.section-title--text-snow {
    color: var(--snow);
    & .section-title__en {
      color: var(--snow);
    }
  }
  &.section-title--center {
    text-align: center;
    & .section-title__en {
      border: none;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 1rem;
      &::after {
        content: "";
        height: 4px;
        width: 1.5rem;
        background-color: var(--title-color);
      }
    }
  }
  &.section-title--gap-wide {
    gap: 4rem;
  }
}

.button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  border-radius: 9999px;
  border: 1px solid var(--ink);
  background-color: var(--blue);
  color: var(--snow);
  line-height: 1;
  letter-spacing: 0.12rem;
  font-weight: 700;
  font-size: 1rem;
  transition: all ease 200ms;
  &:hover {
    text-decoration: none;
    color: var(--snow);
    opacity: 90%;
    transform: scale(0.95);
  }
  &.button--red {
    background-color: var(--red);
  }
}

.color-filter {
  &::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
  }
  & img {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
  &.color-filter--black-60::after {
    background-color: hsl(0 0 0 / 60%);
  }
  &.color-filter--lime-15::after {
    background-color: hsl(from var(--lime) h s l  / 15%);
  }
}

.contact-arrow-right {
  position: absolute;
  right: -6.875rem;
  bottom: -12.5rem;
  width: 21.875rem;
  & img {
    width: 100%;
  }
  @media (min-width: 1024px) {
    right: -9.375rem;
    bottom: 50%;
    transform: translateY(50%);
    width: 42.5rem;
  }
}

.mission-intro-bg-typo, .features-intro-bg-typo {
  position: absolute;
  top: -1rem;
  left: -1rem;
  opacity: 20%;
  color: var(--blue);
  line-height: 1;
  letter-spacing: 0;
  font-weight: 900;
  font-size: 5.5rem;
  @media (min-width: 768px) {
    top: 0.06em;
    left: 0.16em;
    font-size: 6.5rem;
    white-space: nowrap;
  }
  @media (min-width: 1024px) {
    font-size: 8.5rem;
  }
  @media (min-width: 1200px) {
    font-size: 12.5rem;
  }
}

.bg-crescent-dec {
  position: absolute;
  aspect-ratio: 1 / 1;
  & img {
    width: 100%;
  }
  &.bg-crescent-dec--mission {
    opacity: 15%;
    width: 112.5%;
    top: 0;
    left: 0;
    transform: translate(-5.1111111111%, -19.6111111111%);
  }
  &.bg-crescent-dec--mission-philosophy {
    opacity: 30%;
    width: 50rem;
    top: -7.5rem;
    left: -10.5rem;
    transform: scaleX(-1);
  }
  &.bg-crescent-dec--strengths {
    opacity: 15%;
    width: 112.5%;
    top: 0;
    left: 0;
    transform: translate(-0.8888888889%, 4.1111111111%);
  }
  &.bg-crescent-dec--mission--workflow {
    opacity: 10%;
    width: 88.125%;
    top: 0;
    left: 0;
    transform: translate(-7.3758865248%, 6.0283687943%);
    & img {
      transform: rotate(75deg);
    }
  }
}

.mission-card-bg-typo {
  line-height: 1;
  letter-spacing: 0;
  font-weight: 900;
  font-size: 2.5rem;
  color: var(--red);
  opacity: 40%;
  position: absolute;
  top: -3rem;
  white-space: nowrap;
  @media (min-width: 768px) {
    font-size: 4rem;
    top: -0.75em;
  }
  @media (min-width: 1024px) {
    font-size: 5rem;
  }
  &.mission-card-bg-typo--1 {
    left: 3.5rem;
  }
  &.mission-card-bg-typo--2 {
    right: 3.5rem;
  }
  @media (min-width: 768px) {
    &.mission-card-bg-typo--1 {
      left: 4.5rem;
    }
    &.mission-card-bg-typo--2 {
      right: 4.5rem;
    }
  }
}

.mission-philosophy-image {
  position: absolute;
  right: 0;
  bottom: 0;
  transform: translate(8.3333333333%, 18.6419753086%);
  aspect-ratio: 108 / 81;
  min-width: 25rem;
  width: 67.5%;
  opacity: 50%;
  mask-image: radial-gradient(50% 50% at 50% 50%, #FFF 86%, rgba(255, 255, 255, 0.00) 100%);
  & img {
    width: 100%;
    object-fit: cover;
  }
}

.features-strengths-cards {
  display: grid;
  row-gap: 3rem;
  column-gap: 2.5rem;
  counter-reset: card-num-counter;
  align-items: start;
  @media (min-width: 1024px) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 1.5rem;
    & > div:nth-child(even) {
      margin-top: 3rem;
    }
  }
  & .features-strengths-card {
    counter-increment: card-num-counter;
    & .features-strengths-card__num {
      position: absolute;
      top: -2rem;
      left: -2rem;
      border-radius: 9999px;
      aspect-ratio: 1 / 1;
      width: 5rem;
      background-color: var(--red);
      color: var(--snow);
      line-height: 1;
      letter-spacing: 0;
      font-family: var(--font-display);
      font-weight: 600;
      text-align: center;
      display: flex;
      flex-direction: column;
      justify-content: center;
      &::before {
        content: "POINT";
        font-size: 0.875rem;
      }
      &::after {
        content: counter(card-num-counter, decimal-leading-zero);
        font-size: 1.5rem;
      }
      @media (min-width: 768px) {
        width: 6.25rem;
        &::before {
          content: "POINT";
          font-size: 1rem;
        }
        &::after {
          content: counter(card-num-counter, decimal-leading-zero);
          font-size: 2rem;
        }
      }
    }
  }
}

.job-list {
  & .webgene-blog {
    display: grid;
    gap: 1.5rem;
  }
  
  & .thumbnail {
    border-radius: 1.25rem;
    overflow: hidden;
  }
  
  @media (min-width: 768px) {
    & .webgene-blog {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    & .webgene-no-items, & .webgene-pagination {
      grid-column: span 2 / span 2;
    }
  }
  @media (min-width: 1200px) {
    & .webgene-blog {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    & .webgene-no-items, & .webgene-pagination {
      grid-column: span 3 / span 3;
    }
  }
  
  & .webgene-pagination {
    & a {
      background: hsla(from var(--snow) h s l / 30%);
      color: var(--snow);
    }
    & .selected a {
      background: var(--red);
      color: var(--snow);
    }
  }
}

.news-list {
  & .webgene-blog {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
  
  & .webgene-pagination {
    & a {
      background: hsla(from var(--blue) h s l / 10%);
      color: var(--blue);
    }
    & .selected a {
      background: var(--blue);
      color: var(--snow);
    }
  }
}

.item-images {
  border-radius: 1.25rem;
  overflow: hidden;
  
  & img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }
}



