*,
*::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);
  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(--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;
        font-family: var(--font-display);
        background-color: var(--off-white);
        &:hover {
          text-decoration: none;
        }
      }

      &.selected {
        & a {
          background-color: var(--indigo);
          color: var(--snow);
          &: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 {
  position: relative;
  overflow: hidden;
  padding: 12.5rem 1.25rem 3rem;
  background-color: var(--off-white);
  border-bottom: 1px solid var(--navy);
  @media (min-width: 768px) {
    padding-left: 3.5rem;
    padding-right: 2.5rem;
  }
  @media (min-width: 1024px) {
    padding-left: 5rem;
    padding-right: 3.75rem;
  }
  @media (min-width: 1200px) {
    padding-left: 10rem;
    padding-right: 5rem;
    padding-top: 15rem;
  }
  
  & .page-hero__title-dec {
    position: absolute;
    width: 6rem;
    top: -2.5rem;
    left: -2rem;
    @media (min-width: 768px) {
      width: 8rem;
      top: -3rem;
      left: -3rem;
    }
    @media (min-width: 1024px) {
      width: 10rem;
      top: -4rem;
      left: -4rem;
    }
    @media (min-width: 1200px) {
      width: 12.5rem;
      top: -5rem;
      left: -5rem;
    }
  }
  
  & .page-hero__title-bg-text {
    position: absolute;
    top: -1.75rem;
    left: 0.75rem;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--indigo);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 2.5rem;
    opacity: 10%;
    white-space: nowrap;
    @media (min-width: 768px) {
      font-size: 5rem;
      top: -3rem;
      left: 1rem;
    }
    @media (min-width: 1024px) {
      font-size: 7rem;
      top: -4rem;
      left: 1.125rem;
    }
    @media (min-width: 1200px) {
      font-size: 9rem;
      top: -6.5rem;
      left: 1.25rem;
    }
  }
}

.button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1rem 1rem 1rem 2.25rem;
  background-color: var(--off-white);
  border-left: 3px solid var(--indigo);
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: 0.04em;
  font-weight: 400;
  font-size: 1rem;
  transition: opacity ease 200ms;
  &::after {
    content: "";
    width: 1.5rem;
    height: 1.5rem;
    background-image: url(/system_panel/uploads/images/icon-arrow-narrow-right.svg);
    background-repeat: no-repeat;
    background-size: 100% 100%;
  }
  &:hover {
    text-decoration: none;
    color: var(--ink);
    opacity: 90%;
  }
  
  &.button--sky {
    border-color: var(--sky);
  }
}

.footer-contact__image {
  position: absolute;
  inset: 0;
  & img {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
  &::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 40%;
    pointer-events: none;
    background: url(/system_panel/uploads/images/metal.png) center / cover no-repeat, linear-gradient(250deg, #0F3AE8 0%, #469BD0 20.19%, #61BEA2 38.94%, #59A64F 60.1%, #D9A639 82.69%, #DC3434 100%);
  }
}

.footer-contact__dec {
  position: absolute;
  width: 12.5rem;
  &.footer-contact__dec--1 {
    top: -3.125rem;
    left: -3.125rem;
    @media (min-width: 768px) {
      top: -3.75rem;
      left: -5rem;
    }
  }
  &.footer-contact__dec--2 {
    transform: scale(-1);
    right: -3.125rem;
    bottom: -3.75rem;
    @media (min-width: 768px) {
      right: -5rem;
      bottom: -3.75rem;
    }
  }
}

.footer-contact__texts {
  display: flex;
  width: max-content;
  animation: loop-scroll 30000ms linear infinite;
  mix-blend-mode: difference;
  position: absolute;
  bottom: 0;
  left: 0;
  & > p {
    color: var(--snow);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 10rem;
    line-height: 1;
    letter-spacing: -0.02em;
    white-space: nowrap;
    padding-right: 4rem;
  }
}

@keyframes loop-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.section-title-dec {
  position: absolute;
  width: 12.5rem;
  top: -3.125rem;
  left: -3.125rem;
  @media (min-width: 768px) {
    top: -3.75rem;
    left: -5rem;
  }
  &.section-title-dec--br {
    transform: scale(-1);
    top: auto;
    right: -3.125rem;
    bottom: -3.75rem;
    left: auto;
    @media (min-width: 768px) {
      right: -3.75rem;
      bottom: -3.75rem;
    }
  }
}

.area-bg-map {
  position: absolute;
  width: 75%;
  top: 7.5rem;
  right: 1.25rem;
  opacity: 10%;
}

.work-categories {
  @media (min-width: 768px) {
    margin-left: 2rem;
  }
  @media (min-width: 1024px) {
    margin-left: 0;
    position: sticky;
    top: 3rem;
    align-self: start;
  }
  & .webgene-blog {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    line-height: 1;
    letter-spacing: 0;
    font-weight: 500;
  }
}

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

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

.feature-dec {
  position: absolute;
  aspect-ratio: 1 / 1;
  width: 15rem;
  border-radius: 9999px;
  border: 2px solid var(--indigo);
  opacity: 10%;
  &.feature-dec--1 {
    top: -2.5rem;
    left: -3.75rem;
  }
  &.feature-dec--2 {
    right: -2.5rem;
    bottom: -3.75rem;
  }
  &.feature-dec--3 {
    bottom: -2.5rem;
    left: -5rem;
  }
}

.service-copy {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: 105%;
  
  @media (min-width: 1024px) {
    width: 95%;
    top: 6rem;
  }
}

.recovery-image {
  position: absolute;
  top: -6rem;
  right: -7rem;
  width: 15rem;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  border-radius: 9999px;
  @media (min-width: 768px) {
    top: -10rem;
    width: 25rem;
  }
  @media (min-width: 1024px) {
    width: 30rem;
  }
  @media (min-width: 1200px) {
    top: -18rem;
    right: -10rem;
    width: 45rem;
  }
}

.service-list {
  counter-reset: service-count;
  @media (min-width: 1024px) {
    margin-top: -4rem;
  }
  & .service-list__item {
    & .service-list__num {
      counter-increment: service-count;
      position: absolute;
      top: -7rem;
      left: -5rem;
      &::after {
        content: counter(service-count, decimal-leading-zero);
        line-height: 1;
        letter-spacing: 0;
        font-family:  var(--font-display);
        font-weight: 500;
        font-size: 10rem;
        color: var(--snow);
        opacity: 20%;
      }
    }
  }
}





