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

#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;
    margin-top: 3rem;

    & li {
      & a {
        display: inline-block;
        width: 3rem;
        line-height: 3rem;
        text-align: center;
        background-color: hsla(from var(--ink) h s l / 20%);

        &:hover {
          text-decoration: none;
        }
      }

      &.selected {
        & a {
          background-color: var(--blue);
          color: var(--snow);
          &:hover {
            color: var(--snow);
          }
        }
      }
    }
  }
}

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

.thumbnail {
  position: relative;
  
  &.thumbnail--4x3 {
    padding-top: 75%;
  }

  &.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/thumbnail.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;
  padding: 9.25rem 1.25rem 2rem 1.25rem;
  border-bottom: 1px solid hsl(from var(--ink) h s l / 20%);
  @media (min-width: 768px) {
    padding-top: 12rem;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
  @media (min-width: 1024px) {
    padding-top: 15rem;
    padding-left: 6.25rem;
    padding-right: 6.25rem;
  }
  @media (min-width: 1200px) {
    padding: 25rem 5rem 2rem 5rem;
  }
  
  & .page-hero__title {
    position: relative;
    max-width: 80rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    font-family: var(--font-serif);
    
    & .page-hero__title-en {
      height: 5.875rem;
      position: absolute;
      top: -2rem;
      left: -3.5rem;
      @media (min-width: 768px) {
        height: 7.5rem;
        top: -5rem;
        left: -3rem;
      }
      @media (min-width: 1024px) {
        height: 12.125rem;
        top: -8rem;
        left: -5rem;
      }
    }
    & .page-hero__title-ja {
      position: relative;
      line-height: 1.25;
      letter-spacing: 0.04em;
      font-weight: 600;
      font-size: 2.25rem;
      @media (min-width: 768px) {
        font-size: 2.5rem;
      }
      @media (min-width: 1024px) {
        font-size: 3rem;
      }
    }
    & .page-hero__breadcrumbs {
      position: relative;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 1.25rem;
      line-height: 1.25;
      letter-spacing: 0.04em;
      font-weight: 500;
      font-size: 0.875rem;
      @media (min-width: 768px) {
        font-size: 1rem;
      }
    }
  }
}

.section-title-en {
  position: absolute;
  height: 5.875rem;
  & img {
    width: 100%;
  }
  @media (min-width: 768px) {
    height: 7rem;
  }
  @media (min-width: 1024px) {
    height: 10.875rem;
  }
  &.section-title-en--strengths {
    bottom: -2.625rem;
    left: 0;
    @media (min-width: 768px) {
      right: -1rem;
      left: auto;
    }
    @media (min-width: 1024px) {
      right: -1.5rem;
    }
  }
  &.section-title-en--outline {
    bottom: -0.875rem;
    left: 50%;
    transform: translateX(-50%);
  }
  &.section-title-en--contact {
    top: -5.5rem;
    left: -2.25rem;
    @media (min-width: 768px) {
      top: -7rem;
      left: 5rem;
    }
    @media (min-width: 1024px) {
      top: -8.25rem;
      left: -2.5rem;;
    }
  }
  &.section-title-en--begin-here {
    height: auto;
    width: 25rem;
    top: -3rem;
    left: -2rem;
    @media (min-width: 768px) {
      width: 45rem;
      top: -5rem;
      left: 0;
    }
    @media (min-width: 1024px) {
      width: 67.5rem;
      top: -7.625rem;
      left: -2.75rem;
    }
  }
  &.section-title-en--features {
    top: -3rem;
    left: -1.25rem;
    @media (min-width: 768px) {
      top: -4rem;
      left: -2rem;
    }
    @media (min-width: 1024px) {
      top: -7rem;
      left: -3rem;
    }
  }
  &.section-title-en--job-details {
    top: 0;
    left: 50%;
    transform: translate(-45%, -60%);
  }
  &.section-title-en--works {
    right: 0;
    bottom: 0.25rem;
    @media (min-width: 768px) {
      right: 2rem;
      bottom: 0.5rem;
    }
    @media (min-width: 1024px) {
      right: 6.25rem;
      bottom: 0;
    }
  }
  &.section-title-en--accreditation {
    top: 0;
    left: 50%;
    transform: translate(-38%, -65%);
  }
  &.section-title-en--service {
    top: -3rem;
    left: 0.5rem;
    @media (min-width: 768px) {
      top: -4rem;
      left: 2rem;
    }
    @media (min-width: 1024px) {
      top: -7rem;
      left: 3rem;
    }    
  }
}

.filtered-image {
  &::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
  }
  &.filtered-image--stone-caramel::after {
    background-image: url(/system_panel/uploads/images/stone-caramel.png);
  }
  &.filtered-image--black-alpha-50::after {
    background-color: hsl(0 0 0 / 50%);
  }
  &.filtered-image--lime-alpha-20::after {
    background-color: hsl(from var(--lime) h s l / 20%);
  }
  &.filtered-image--black-cream::after {
    background: linear-gradient(0deg, rgba(192, 111, 95, 0.10) 0%, rgba(192, 111, 95, 0.10) 100%), rgba(0, 0, 0, 0.50);
  }
}

.button {
  position: relative;
  display: flex;
  gap: 1px;
  transition: opacity ease 200ms;
  & p {
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    background-color: var(--blue);
    color: var(--snow);
    line-height: 1.25;
    letter-spacing: 0.04em;
    font-weight: 500;
    font-size: 1rem;
    flex: 1 1 0%;
  }
  &::after {
    content: "";
    display: block;
    padding: 0.75rem 1rem;
    background-color: var(--blue);
    background-image: url(/system_panel/uploads/images/tryangle.svg);
    background-size: 0.5625rem 0.5rem;
    background-repeat: no-repeat;
    background-position: center;
  }
  &:hover {
    text-decoration: none;
    opacity: 90%;
    color: var(--snow);
  }
  
  &.button--caramel {    
    & p {      
      background-color: var(--caramel);
    }
    &::after {
      background-color: var(--caramel);
    }
  }
  &.button--send::before {
    content: "送信する";
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    background-color: var(--blue);
    color: var(--snow);
    line-height: 1.25;
    letter-spacing: 0.04em;
    font-weight: 500;
    font-size: 1rem;
    margin-right: calc(-4rem - 1px);
    z-index: 1;
  }
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  line-height: 1;
  letter-spacing: 0.2em;
  text-align: center;
  @media (min-width: 768px) {
    writing-mode: vertical-rl;
    flex-direction: column-reverse;
    text-align: start;
    justify-content: center;
    gap: 2rem;
    flex: 1 1 0%;
  }
  @media (min-width: 1024px) {
    justify-content: flex-end;
    gap: 4rem;
  }
}

.to-top-button {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  @media (min-width: 768px) {
    top: -1.125rem;
  }
  @media (min-width: 1024px) {
    right: 1.25rem;
  }
  @media (min-width: 1200px) {
    right: 5.5rem;
  }
}

.recruit-massage-title {
  position: relative;
  writing-mode: vertical-rl;
  display: flex;
  flex-direction: column;
  justify-content: center;
  & .recruit-massage-title__image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 25rem;
    opacity: 5%;
    & img {
      width: 100%;
    }
  }
  @media (min-width: 768px) {
    flex: 1 1 0%;
    max-width: 15rem;
  }
  & .recruit-massage-title__heading {
    position: relative;
    line-height: 1;
    letter-spacing: 0.25em;
    font-family: var(--font-serif);
    font-weight: 900;
    font-size: 1.25rem;
    @media (min-width: 768px) {
      font-size: 1.875rem;
    }
    @media (min-width: 1024px) {
      font-size: 2.25rem;
    }
  }
}

.recruit-massage--image {
  position: relative;
  @media (min-width: 1200px) {
    position: absolute;
    width: 18.75rem;
    &.recruit-massage--image--bl {
      bottom: -5rem;
      left: 3rem;
      aspect-ratio: 3 / 2;
    }
    &.recruit-massage--image--tr {
      top: 2.5rem;
      right: 2.5rem;
      aspect-ratio: 3 / 4;
    }
  }
}

.service-intro-dec {
  width: clamp(20rem, 44.4444444444%, 40rem);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -56.2111801242%);
  opacity: 8%;
}

& .service-title-dec {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 25rem;
  opacity: 6%;
  & img {
    width: 100%;
  }
}

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

.news-list .webgene-blog {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.item-images {
  & .item-image img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
  }
}
