*,
*::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(--ivory);
  letter-spacing: 0.04em;
  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;
}

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--3x2 {
    padding-top: 66.6667%;
  }

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

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

.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}


.home-hero {
  height: 50rem;
  pointer-events: none;
  
  & .home-hero__inner {
    pointer-events: auto;
    overflow: hidden;
    width: 100%;
    height: 100%;
    display: grid;
    z-index: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    & > img:nth-of-type(1) {
      grid-column: 1 / 2;
      grid-row: 1 / 2;
    }
    & > img:nth-of-type(2) {
      grid-column: 2 / 3;
      grid-row: 1 / 2;
    }
    & > img:nth-of-type(3) {
      grid-column: 1 / 3;
      grid-row: 2 / 3;
    }
    & > img:nth-of-type(4) {
      grid-column: 1 / 3;
      grid-row: 3 / 4;
    }
    @media (min-width: 768px) {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      grid-template-rows: repeat(2, minmax(0, 1fr));
      & > img:nth-of-type(1) {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
      }
      & > img:nth-of-type(2) {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
      }
      & > img:nth-of-type(3) {
        grid-column: 2 / 3;
        grid-row: 1 / 3;
      }
      & > img:nth-of-type(4) {
        grid-column: 3 / 4;
        grid-row: 1 / 3;
      }
    }
    &::after {
      content: "";
      z-index: 1;
      pointer-events: none;
      inset: 0;
      background-color: hsla(from var(--ink) h s l / 10%);
      position: absolute;
    }
  }
  & .home-hero__logo {
    position: absolute;
    width: 18.75rem;
    top: 50%;
    left: 50%;
    pointer-events: auto;
    transform: translate(-50%, -50%);
    z-index: 1;
    @media (min-width: 768px) {
      width: 26.25rem;
    }
    & .logo {
      width: 62.8%;
    }
    & .typo {
      width: 100%;
    }
  }
  & .home-hero__news {
    z-index: 1;
    position: absolute;
    right: 50%;
    bottom: 1.25rem;
    pointer-events: auto;
    transform: translateX(50%);
    width: 90%;
    
    @media (min-width: 768px) {
      max-width: 30rem;
      right: 3.75rem;
      bottom: 3.75rem;
      transform: none;
    }
  }
}

:root {
  --elevation-1: 0 2px 6px 1px rgba(0, 0, 0, 0.02), 0 4px 12px 2px rgba(0, 0, 0, 0.04), 0 8px 24px 4px rgba(0, 0, 0, 0.08), 0 16px 48px 8px rgba(0, 0, 0, 0.12);
  --elevation-2: 0 2px 6px 1px rgba(0, 0, 0, 0.08), 0 4px 12px 2px rgba(0, 0, 0, 0.08), 0 8px 24px 4px rgba(0, 0, 0, 0.08);
}

.elevation-1 {
  box-shadow: var(--elevation-1);
}
.elevation-2 {
  box-shadow: var(--elevation-2);
}


.home-concept {
  pointer-events: none;
  & .home-concept__content {
    pointer-events: auto;
  }
  & .home-concept__image--center {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    width: 10rem;
    margin-left: auto;
    
    @media (min-width: 1024px) {
      margin-top: -10rem;
      margin-inline: auto;
    }
    @media (min-width: 1200px) {
      width: 17.5rem;
    }
  }
  & .home-concept__image--top {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    width: 15rem;
    
    @media (min-width: 1024px) {
      width: 20rem;
    }
    @media (min-width: 1200px) {
      width: 30rem;
    }
  }
  & .home-concept__image--bottom {
    aspect-ratio: 2 / 1;
    object-fit: cover;
    width: 100%;
    
    @media (min-width: 768px) {
      width: 25rem;
    }
    @media (min-width: 1024px) {
    }
    @media (min-width: 1200px) {
      width: 32.5rem;
    }
  }
}

.underlined-heading {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid currentColor;
}

.home-service-heading {
  color: var(--blue);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -3.75rem;
  
  @media (min-width: 1024px) {
    top: -6.25rem;
  }
}
.home-service-heading--mirror {
  display: contents;
}
.home-service-heading--mirror .home-service-heading {
  color: var(--snow);
  z-index: 2;
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: opacity 200ms linear;
  font-size: 1.25rem;
  line-height: 1.25;
  font-weight: 700;
  
  &:after {
    content: "";
    display: block;
    width: 1.75rem;
    height: 1.75rem;
    background-image: url(/system_panel/uploads/images/ArrowUpRight.svg);
    background-repeat: no-repeat;
    background-size: contain;
  }
  
  &:hover {
    text-decoration: none;
    opacity: 0.85;
  }
  &.button--green::after {
    background-image: url(/system_panel/uploads/images/ArrowUpRightGreen.svg);
  }
  &.button--blue::after {
    background-image: url(/system_panel/uploads/images/ArrowUpRightBlue.svg);
  }
}


.home-service-1, .home-service-2 {
  overflow: hidden;
  position: relative;
  &::before, &::after {
    content: "";
    position: absolute;
    display: block;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.08)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));
    z-index: 1;
    pointer-events: none;
  }
}
.home-service-1::before, .home-service-2::after {
  aspect-ratio: 5 / 4;
  background-image: url(/system_panel/uploads/images/silhouette-house.png);
}
.home-service-1::after, .home-service-2::before {
  aspect-ratio: 80 / 147;
  background-image: url(/system_panel/uploads/images/silhouette-human.png);
}
.home-service-1 {
  &::before {
    width: 7.5rem;
    top: 3.5rem;
    left: -2.5rem;
  }
  &::after {
    width: 5rem;
    bottom: -1.25rem;
    left: 1rem;
  }
}
.home-service-2 {
  &::before {
    width: 3.75rem;
    right: -0.5rem;
    top: 0.75rem;
  }
  &::after {
    width: 9rem;
    bottom: -1rem;
    right: -1.25rem;
  }
}
@media (min-width: 768px) {
  .home-service-1 {
    &::before {
      left: 3rem;
    }
    &::after {
      left: 1.25rem;
    }
  }
  .home-service-2 {
    &::before {
      right: 5rem;
    }
    &::after {
      right: 0;
      bottom: -1rem;
    }
  }
}

.illust-container {
  position: relative;
  &::before, &::after {
    position: absolute;
    pointer-events: none;
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 2;
  }
  
  &.illust-container--bird-left {
    &::before {
      content: "";
      top: 4.5rem;
      left: 5rem;
      max-width: 28.125rem;
      width: 35%;
      aspect-ratio: 9 / 4;
      background-image: url(/system_panel/uploads/images/illust-bird-left.png);
    }
  }
  &.illust-container--bird-strewn {
    &::before {
      content: "";
      aspect-ratio: 160 / 169;
      background-image: url(/system_panel/uploads/images/illust-bird-yellow.png);
      width: 15%;
      max-width: 9.5625rem;
      top: 3.75rem;
      left: 5.1875%;
    }
    &::after {
      content: "";
      aspect-ratio: 80 / 43;
      background-image: url(/system_panel/uploads/images/illust-bird-redandblue.png);
      width: 35%;
      max-width: 15.125rem;
      bottom: 4rem;
      right: 3.625%;
    }
  }
  &.illust-container--tree-bottom {
    &::before {
      content: "";
      bottom: -2rem;
      left: 1rem;
      max-width: 24.3125rem;
      width: 32%;
      aspect-ratio: 26 / 37;
      background-image: url(/system_panel/uploads/images/illust-tree.png);
    }
  }
}

.swiper {
  &:not(.swiper-initialized) {
    & .swiper-wrapper {
      display: flex;
      overflow: auto;
    }
    & .swiper-slide {
      min-width: 100%;
      width: 100%;
    }
    &.image-gallery {
      & .swiper-slide {
        width: 25rem;
        min-width: 25rem;
      }
    }
  }
  
}
.image-gallery.swiper {
  overflow: visible;
  & .swiper-wrapper {
    transition-timing-function: linear;
  }
  & .swiper-slide.is-lower {
    transform: translateY(20px);
  }
}

.home-strength-image {
  &::after {
    content: "";
    pointer-events: none;
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(52, 175, 99, 0.00) 40%, rgba(52, 175, 99, 0.50) 100%);
  }
}
.home-strength-illust {
  position: absolute;
  width: 40%;
  max-width: 21.5rem;
  right: -1.25rem;
  bottom: -8rem;
  z-index: 1;
  pointer-events: none;
  @media (min-width: 1024px) {
    bottom: -2rem;
  }
}

.home-strength-marquee {
  width: 100%;
  overflow: hidden;
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(-100%);
  z-index: 1;
  
  @media (min-width: 1024px) {
    transform: translateY(-50%);
  }
  
  & .track {
    display: flex;
    width: max-content;
    animation: text-marquee 15s linear infinite;
  }
  & .group {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    
    & p {
      flex-shrink: 0;
      padding-right: 1em;
      white-space: nowrap;
      line-height: 1;
      font-weight: 700;
      letter-spacing: 0.12em;
      font-size: 5rem;
      @media (min-width: 768px) {
        font-size: 7.5rem;
      }
      @media (min-width: 1200px) {
        font-size: 9rem;
      }
    }
  }
}

@keyframes text-marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-strength-marquee .track {
    animation-play-state: paused;
  }
}

.page-hero {
  height: 37.5rem;
  
  & .page-hero__inner {
    pointer-events: auto;
    overflow: hidden;
    width: 100%;
    height: 100%;
    
    &::before {
      content: "";
      z-index: 1;
      pointer-events: none;
      top: 0;
      left: 0;
      width: 100%;
      height: 6.875rem;
      background-color: hsla(from var(--ink) h s l / 50%);
      position: absolute;
    }
    
    &::after {
      content: "";
      z-index: 1;
      pointer-events: none;
      inset: 0;
      background-color: hsla(from var(--ink) h s l / 20%);
      position: absolute;
    }
  }
  & .page-hero__logo {
    position: absolute;
    width: 100%;
    top: 60%;
    left: 50%;
    pointer-events: auto;
    transform: translate(-50%, -50%);
    z-index: 1;
    
    @media (min-width: 1024px) {
    }
  }
}

.strength-intro-illust {
  position: absolute;
  width: 45%;
  max-width: 36.25rem;
  bottom: 1rem;
  left: 5rem;
}

.news-list {
  & .webgene-blog {
    display: grid;
    gap: 2rem;
  }
  @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;
    }
  }
  
  & .webgene-pagination li {
    & a {
      border: 1px solid var(--blue);
      background-color: var(--snow);
      color: var(--blue) !important;
    }
    &.selected a {
      background-color: var(--blue);
      color: var(--snow) !important;
    }
  }
}

.category-list {
  & .webgene-blog {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
}
.case-list {
  & .webgene-blog {
    display: grid;
    gap: 2rem;
  }
  @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;
    }
  }
  
  & .webgene-pagination li {
    & a {
      border: 1px solid var(--blue);
      background-color: var(--snow);
      color: var(--blue) !important;
    }
    &.selected a {
      background-color: var(--blue);
      color: var(--snow) !important;
    }
  }
}

.case-detail {
  & .item-images {
    max-width: 57.5rem;
    margin-inline: auto;
    & img {
      aspect-ratio: 16 / 9;
      object-fit: cover;
      width: 100%;
    }
  }
  
  & .swiper {
    & .swiper-pagination {
      position: static;
      margin-top: 1.5rem;
      
      & .swiper-pagination-progressbar-fill {
        background-color: var(--blue);
      }
    }
  }
}


