*,
*::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-serif);
  color: var(--snow);
  background-color: var(--ink);
  background-image: var(--paper-black);
  letter-spacing: 0.04em;
}

#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(--snow);
}

[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 hsla(from var(--snow) h s l / 30%);
        border-radius: 9999px;
        &:hover {
          text-decoration: none;
        }
      }

      &.selected {
        & a {
          background: hsla(from var(--snow) h s l / 30%);
          &:hover {}
        }
      }
    }
  }
}

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

.thumbnail {
  position: relative;

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

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

.button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  min-width: 15rem;
  border-radius: 9999px;
  border: 1px solid var(--snow);
  text-align: center;
  line-height: 1.25;
  letter-spacing: 0.04em;
  font-weight: 400;
  font-family: var(--font-serif);
  font-size: 0.875rem;
  color: var(--snow);
  transition: all ease 200ms;
  &:hover {
    text-decoration: none;
    color: var(--snow);
    opacity: 90%;
    transform: scale(0.95);
  }
}
.blog-button {
  padding: 0.75rem 1rem 0.75rem 3rem;
  border-left: 4px solid var(--orange);
  background-color: var(--snow);
  color: var(--orange);
  line-height: 1.5;
  font-size: 0.875rem;
  font-weight: 700;
  transition: all ease 200ms;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  &::after {
    content: "";
    display: inline-block;
    width: 2.5rem;
    height: 0.125rem;
    background-color: var(--orange);
  }
  
  &:hover {
    text-decoration: none;
    color: var(--orange);
    opacity: 0.75;
  }
}

.footer-contact-bg-image {
  position: absolute;
  inset: 0;
  &::after {
    pointer-events: none;
    content: "";
    position: absolute;
    inset: 0;
    background-color: hsl(0deg 0% 0% / 50%);
    backdrop-filter: blur(4px);
  }
  & img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.page-hero-title {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0 1.25rem 1.5rem;
  line-height: 1.25;
  text-align: center;
  & .page-hero-title__en {
    color: hsl(from var(--orange) h s l / 80%);
    font-weight: 700;
    font-size: 2rem;
  }
  & .page-hero-title__ja {
    font-size: 1.5rem;
  }
  @media (min-width: 768px) {
    writing-mode: vertical-rl;
    gap: 0.625rem;
    padding: 2rem 2rem 0;
    line-height: 1;
    text-align: start;
    & .page-hero-title__en {
      font-size: 2.5rem;
    }
    & .page-hero-title__ja {
      letter-spacing: 0.05em;
      font-size: 1.75rem;
      padding-top: 1.25rem;
    }
  }
  @media (min-width: 1024px) {
    padding: 3rem 3rem 0;
    & .page-hero-title__ja {
      padding-top: 1.5rem;
    }
  }
  @media (min-width: 1200px) {
    & .page-hero-title__en {
      font-size: 3rem;
    }
    & .page-hero-title__ja {
      font-size: 2rem;
    }
  }
}

.page-hero-image {
  border: 1px solid hsl(from var(--orange) h s l / 40%);
  border-right-width: 0;
  margin-left: 1.25rem;
  padding: 1rem 0 1rem 1rem;
  & img {
    object-fit: cover;
    aspect-ratio: 2 / 1;
    width: 100%;
  }
  @media (min-width: 768px) {
    margin-left: 0;
    flex: 1 1 0;
    padding: 2rem 0 2rem 2rem; 
  }
}

.information-flow-cards {
  counter-reset: card-count;
  display: grid;
  @media (min-width: 768px) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  & .information-flow-card {
    counter-increment: card-count;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding: 1.25rem;
    border-bottom: 1px dashed hsl(from var(--snow) h s l / 30%);
    &:nth-child(odd) {
      border-right: 1px dashed hsl(from var(--snow) h s l / 30%);
    }
    &:last-child {
      border-bottom-width: 0;
    }
    @media (min-width: 768px) {
      padding: 2rem;
      &:nth-last-child(2) {
        border-bottom-width: 0;
      }
    }
    
    & .information-flow-card__title {
      display: flex;
      align-items: center;
      gap: 0.625rem;
      line-height: 1.25;
      font-weight: 500;
      font-size: 1.125rem;
      &::before {
        content: counter(card-count) "";
        display: flex;
        align-items: center;
        justify-content: center;
        aspect-ratio: 1 / 1;
        width: 2.5rem;
        line-height: 1;
        font-weight: 900;
        font-size: 0.875rem;
        border-radius: 9999px;
        border: 1px solid var(--snow);
        padding-top: 0.2em;
      }
      @media (min-width: 768px) {
        font-size: 1.25rem;
        &::before {
          width: 3.125rem;
          font-size: 1rem;
        }
      }
    }
    & .information-flow-card__text {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
      line-height: 1.8;
      font-size: 0.875rem;
      @media (min-width: 768px) {
        font-size: 1rem;
      }
    }
  }
}

.area-image {
  position: absolute;
  bottom: -15rem;
  left: -5rem;
  aspect-ratio: 857 / 967;
  width: clamp(40rem, 66.953125%, 66.953125rem);
  @media (min-width: 768px) {
    left: 5rem;
  }
  @media (min-width: 1024px) {
    right: -8rem;
    left: auto;
  }
  @media (min-width: 1200px) {
    top: -9.25rem;
    right: -13.5625rem;
    bottom: auto;
  }
  & img {
    width: 100%;
  }
}

.consept-section-title {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 11.25rem;
  & img {
    width: 100%;
  }
  & p {
    color: var(--orange);
    line-height: 1;
    font-size: 3rem;
    position: absolute;
    top: -0.40625em;
    left: -0.375em;
  }
  & h2, & h3 {
    line-height: 1.25;
    font-family: var(--font-hina);
    font-size: 3rem;
    position: absolute;
    right: -1.3125em;
    bottom: 0.125em;
  }
  @media (min-width: 768px) {
    & p, & h2, & h3 {
      font-size: 4rem;
    }
  }
}

.voice-bubble {
  position: relative;
  &::before {
    content: "";
    aspect-ratio: 1 / 1;
    width: 3.75rem;
    border-bottom: 1px solid var(--ink);
    background-color: var(--snow);
    position: absolute;
    bottom: -1rem;
    left: 8rem;
    transform: rotate(-45deg);
  }
}

.section-cases-list {
  & .webgene-blog {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }
}

.work-list {
  & .webgene-blog {
    display: grid;
    gap: 2rem;

    @media (min-width: 768px) {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  & .webgene-pagination {
    @media (min-width: 768px) {
      grid-column: span 2 / span 2;
    }
  }
}

.category-list {
  & .webgene-blog {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    column-gap: 2rem;
    row-gap: 1rem;
  }
}


.item-images.swiper {
  & .swiper-slide img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    width: 100%;
  }
}

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

.news-list {
  border-top: 1px solid hsla(from var(--snow) h s l / 20%);
  padding-top: 1.5rem;
  
  & .webgene-blog {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
}


