*,
*::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(--ink);
  background-color: var(--snow);
  background-image: var(--paper-beige);
}

#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;
  padding-top: 100%;

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

.page-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 7.5rem 1.25rem 1.25rem;
  @media (min-width: 768px) {
    padding: 7.5rem 2.5rem 2.5rem;
  }
  @media (min-width: 1024px) {
    padding: 10rem 3.75rem 3.75rem;
  }
  @media (min-width: 1200px) {
    padding: 15rem 5rem 5rem;
  }
  
  & .page-hero__title {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    line-height: 1.25;
    text-align: center;
    & .page-hero__title-en {
      letter-spacing: 0.12em;
      color: var(--green);
      font-size: 0.875rem;
    }
    & .page-hero__title-ja {
      letter-spacing: 0.16em;
      font-size: 2rem;
      @media (min-width: 768px) {
        font-size: 2.5rem
      }
      @media (min-width: 1024px) {
        font-size: 3rem
      }
    }
  }
}
  
.button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.5rem 1rem 0.5rem 1.5rem;
  border: 1px solid var(--ink);
  line-height: 1.5;
  letter-spacing: 0;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all ease 200ms;
  &::after {
    content: "";
    aspect-ratio: 46 / 12;
    width: 2.875rem;
    background-image: url(/system_panel/uploads/images/arrow-rigth.svg);
    background-repeat: no-repeat;
    background-size: contain;
  }
  &:hover {
    text-decoration: none;
    opacity: 90%;
    transform: scale(0.95);
  }
  &.button--external::after {
    aspect-ratio: unset;
    width: 0.684375rem;
    height: 0.835625rem;
    background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2211%22%20height%3D%2214%22%20viewBox%3D%220%200%2011%2014%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M10.9463%207.7207L10.0078%208.06641L7.67969%201.7373L0.963867%2013.3711L0.0976562%2012.8711L6.81348%201.23828L0.169922%202.38672L0%201.40137L7.69629%200.0703125L8.10645%200L10.9463%207.7207Z%22%20fill%3D%22%231D1D1D%22%2F%3E%0A%3C%2Fsvg%3E%0A");
  }
}

.footer-links {
  writing-mode: vertical-rl;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: start;
  gap: 1rem;
  & p {
    flex-shrink: 0;
    line-height: 1;
    letter-spacing: 0.15em;
    font-size: 0.875rem;
  }
  @media (min-width: 768px) {
    gap: 2rem;
    & p {
      font-size: 1rem;
    }
  }
}

.price-table {
  min-width: 40rem;
  display: flex;
  flex-direction: column;
  border-top: 1px solid hsl(from var(--ink) h s l / 20%);
  border-left: 1px solid hsl(from var(--ink) h s l / 20%);
  background-color: var(--snow);
  line-height: 1.25;
  font-weight: 500;
  font-size: 0.875rem;
  @media (min-width :768px) {
    font-size: 0.9375rem;
  }
  & .price-table__row {
    display: flex;
    border-bottom: 1px solid hsl(from var(--ink) h s l / 20%); 
    &:nth-child(n + 2) {
      & .price-table__cell:nth-child(n + 2) {
        text-align: end;
      }
    }
    &:nth-child(odd) {
      background-color: hsl(from var(--ink) h s l /5%);
    }
    &:first-child {
      background-color: var(--green);
      color: var(--snow);
    }
    & .price-table__cell {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
      justify-content: center;
      border-right: 1px solid hsl(from var(--ink) h s l / 20%);
      flex: 1 1 0%;
      padding: 0.5rem;
      @media (min-width:768px) {
        padding-right: 0.75rem;
        padding-left: 0.75rem;
      }
    }
  }
  
  &.price-table--sm {
    min-width: auto;
    font-size: 0.75rem;
    @media (min-width :768px) {
      font-size: 0.9375rem;
    }
    & .price-table__row {
      &:nth-child(n + 2) {
        & .price-table__cell:nth-child(n + 2) {
          text-align: end;
        }
      }
      &:nth-child(odd) {
        background-color: transparent;
      }
      &:nth-child(even) {
        background-color: hsl(from var(--ink) h s l /5%);
      }
      &:first-child {
        background-color: transparent;
        color: var(--ink);
      }
      & .price-table__cell {
        &:first-child {
          background-color: var(--green);
          color: var(--snow);
        }
        &:last-child {
          text-align: end;
        }
      }
    }
  }
}

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

.section-title {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  --title-color: var(--green);
  & .section-title__en {
    position: relative;
    line-height: 1.25;
    letter-spacing: 0.12em;
    font-size: 1.125rem;
    color: var(--title-color);
    &::before {
      content: "";
      height: 1px;
      width: 7.5rem;
      background-color: var(--title-color);
      position: absolute;
      top: -0.25rem;
      left: -3.75rem;
      transform: rotate(-45deg);
    }
  }
  & .section-title__ja {
    font-weight: 500;
    font-size: 1.5rem;
    @media (min-width: 768px) {
      font-size: 1.75rem;
    }
  }
  
  &.section-title--gold {
    --title-color: var(--gold);
  }
}

.section-information-content {
  writing-mode: vertical-rl;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-right: auto;
  margin-left: auto;
  @media (min-width: 768px) {
    margin-right: 0;
    &.section-information-content--even {
      margin-right: auto;
      margin-left: 0;
    }
  }
  & .section-information-content__title {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    align-items: center;
    & .section-information-content__title-num {
      writing-mode: horizontal-tb;
    }
  }
}

.work-slider {
  & .swiper-slide {
    & h3 {
      font-size: 0.875rem;
    }
    & .slider-images {
      position: relative;
      
      & > p {
        font-size: 0.875rem;
        position: absolute;
        bottom: 1.25rem;
        left: 1.25rem;
        padding: 0.375rem 0.75rem;
        background-color: var(--green);
        color: var(--snow);
        line-height: 1.25;
        max-width: calc(100% - 2.5rem);
      }
      
      & > img {
        aspect-ratio: 16 / 25;
        object-fit: cover;
        width: 100%;
      }
    }
    
    @media (min-width: 768px) {
      & h3 {
        font-size: 1rem;
      }
    }
    @media (min-width: 1200px) {
      & h3 {
        font-size: 1.125rem;
      }
    }
  }
}

.greeting-container {
  position: relative;
  padding-top: 20rem;
  padding-bottom: 5rem;
  
  @media (min-width: 768px) {
    padding-top: 30rem;
  }
  @media (min-width: 1024px) {
    padding-bottom: 15rem;
  }
  @media (min-width: 1200px) {
    padding-top: 20rem;
  }
  
  & > img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: top;
  }
  
  @media (min-width: 1200px) {
    & > img {
      height: 100%;
      object-position: center;
    }
  }
}



