:root {
  --elevation-1: 0 -4px 8px 0 rgba(0, 0, 0, 0.04), 0 8px 16px 0 rgba(0, 0, 0, 0.08), 0 16px 24px 0 rgba(0, 0, 0, 0.04);
}

*,
*::before,
*::after {
  min-width: 0px;
  min-height: 0px;
}

body {
  font-family: var(--font-serif);
  color: var(--ink);
  background-color: var(--snow);
  background-image: var(--light-leather);
  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;

    & li {
      & a {
        display: inline-block;
        width: 3rem;
        line-height: 3rem;
        text-align: center;
        background-color: hsl(from var(--ink) h s l / 10%);
        &:hover {
          text-decoration: none;
        }
      }

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

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

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

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

.page-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7.5rem 1.25rem 2rem;
  height: 22.5rem;
  @media screen and (min-width: 768px) {
    padding-right: 2.5rem;
    padding-left: 2.5rem;
    height: 30rem;
  }
  @media screen and (min-width: 1024px) {
    padding-right: 3.75rem;
    padding-left: 3.75rem;
    height: 35rem;
  }
  @media screen and (min-width: 1200px) {
    padding-right: 5rem;
    padding-left: 5rem;
    height: 40rem;
  }
  
  & .page-hero__image {
    position: absolute;
    inset: 0;
    &::after {
      content: "";
      display: block;
      position: absolute;
      inset: 0;
      background-color: hsl(from var(--sepia) h s l / 30%);
      pointer-events: none;
    }
    & img {
      object-fit: cover;
      width: 100%;
      height: 100%;
    }
  }
  
  & .page-hero__title {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    line-height: 1.25;
    text-align: center;
    font-weight: 600;
    color: var(--snow);
    & .page-hero__title-en {
      letter-spacing: 0.08em;
      font-size: 0.875rem;
    }
    & .page-hero__title-ja {
      font-size: 1.75rem;
    }
    @media screen and (min-width: 768px) {
      & .page-hero__title-en {
        font-size: 1rem;
      }
      & .page-hero__title-ja {
        font-size: 3rem;
      }
    }
    @media screen and (min-width: 1024px) {
      gap: 1rem;
      & .page-hero__title-en {
        font-size: 1.25rem;
      }
      & .page-hero__title-ja {
        font-size: 4rem;
      }
    }
    @media screen and (min-width: 1200px) {
      & .page-hero__title-en {
        font-size: 1.5rem;
      }
      & .page-hero__title-ja {
        font-size: 5rem;
      }
    }
  }
}

.edge-stitching {
  position: absolute;
  inset: var(--stitch-padding);
  pointer-events: none;
  --stitch-padding: 0.375rem;
  --stitch-size: 0.125rem;
  & > div {
    position: absolute;
    &:nth-child(odd) {
      background-image: url(/system_panel/uploads/images/stitch-white-h.png);
      background-size: auto 100%;
      left: 50%;
      transform: translateX(-50%);
      width: calc(100% + var(--stitch-padding) * 2);
      height: var(--stitch-size);
    }
    &:nth-child(even) {
      background-image: url(/system_panel/uploads/images/stitch-white-v.png);
      background-size: 100% auto;
      top: 50%;
      transform: translateY(-50%);
      height: calc(100% + var(--stitch-padding) * 2);
      width: var(--stitch-size);
    }
    &:nth-child(1) {
      top: 0;
    }
    &:nth-child(2) {
      right: 0;
    }
    &:nth-child(3) {
      bottom: 0;
    }
    &:nth-child(4) {
      left: 0;
    }
  }
  @media screen and (min-width: 768px) {
    --stitch-padding: 0.625rem;
    --stitch-size: 0.25rem;
  }
  @media screen and (min-width: 1024px) {
    --stitch-padding: 0.75rem;
    --stitch-size: 0.3125rem;
  }
}

.button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow:hidden;
  gap: 0.625rem;
  padding: 0.375rem 1.625rem;
  border-radius: 9999px;
  border: 1px solid var(--button-color);
  --button-color: var(--navy);
  line-height: 1;
  letter-spacing: 0.08em;
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--button-color);
  transition: all ease 300ms;
  & * {
    z-index: 1;
  }
  &::before {
    content: "";
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0); 
    width: 100%;
    height: 100%; 
    background-color: var(--button-color);
    border-radius: 9999px;
    transition: all ease 300ms;
  }
  &::after {
    content: "";
    display: block;
    position: absolute;
    inset: -0.0625rem 0.375rem;
    border-radius: 9999px;
    border: 1px solid var(--button-color);
    transition: all ease 300ms;
  }
  &:hover {
    text-decoration: none;
    color: var(--snow);
    &::before {
      transform: translate(-50%, -50%) scale(1.1);
    }
    &::after {
      right: -0.0625rem;
      left: -0.0625rem;
    }
  }
  &.button--snow {
    --button-color: var(--snow);
    &:hover {
      color: var(--navy);
    }
  }

  &.button--lg {
    padding: 0.875rem 2.5rem 0.75rem 2.375rem;
    & > div {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
      text-align: center;
      & > p {
        &:nth-child(1) {
          font-size: 1.25rem;
        }
        &:nth-child(2) {
          font-size: 0.875rem;
        }
      }
    }
    & img {
      transition: all ease 300ms;
      &:nth-child(2) {
        display: none;
      }
    }
    &:hover {
      & img {
        &:nth-child(1) {
          display: none;
        }
        &:nth-child(2) {
          display: block;
        }
      }
    }
  }
  
  &.button--contact-form {
    &::before {
      content: none;
    }
    &:hover {
      --button-color: var(--navy);
    }
  }
}
.section-title-counter {
  counter-reset: title-counter;
}
.section-title-increment {
  counter-increment: title-counter;
}
.section-title {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  line-height: 1.25;
  font-weight: 600;
  padding-bottom: 3rem;
  text-align: center;
  & .section-title__en {
    letter-spacing: 0.08em;
    font-size: 0.875rem;
  }
  & .section-title__ja {
    font-size: 1.5rem;
  }
  @media screen and (min-width: 768px) {
    & .section-title__en {
      font-size: 1rem;
    }
    & .section-title__ja {
      font-size: 1.75rem;
    }
  }
  @media screen and (min-width: 1024px) {
    gap: 1.5rem;
    & .section-title__ja {
      font-size: 2rem;
    }
  }
  & .section-title__num {
    position: absolute;
    top: -1.25rem;
    left: 1.5rem;
    opacity: 70%;
    &::before {
      content: counter(title-counter, decimal-leading-zero);
      color: var(--snow);
      line-height: 1;
      letter-spacing: 0;
      font-size: 3rem;
      font-family: var(--font-serif);
      font-weight: 400;
      @media screen and (min-width: 768px) {
        font-size: 4rem;
      }
      @media screen and (min-width: 1024px) {
        font-size: 3rem;
      }
      @media screen and (min-width: 1200px) {
        font-size: 4rem;
      }
    }
    &::after {
      content: "";
      display: block;
      position: absolute;
      top: -1.25rem;
      left: -2.25rem;
      background-image: url(/system_panel/uploads/images/spark.svg);
      background-size: 100% 100%;
      background-repeat: no-repeat;
      background-position: center;
      width: 3.3125rem;
      height: 2.5rem;
    }
    @media screen and (min-width: 1200px) {
      top: 50%;
      left: 0;
      transform: translate(calc(-100% - 1.5rem), -65%);
    }
    &.section-title__num--sm::before {
      font-size: 2.5rem;
      @media screen and (min-width: 768px) {
        font-size: 2.5rem;
      }
      @media screen and (min-width: 1024px) {
        font-size: 2.5rem;
      }
      @media screen and (min-width: 1200px) {
        font-size: 3.5rem;
      }
    }
  }
  &::after {
    content: "";
    display: block;
    position: absolute;
    background-image: url(/system_panel/uploads/images/stitch-navy-h.png);
    background-size: auto 100%;
    right: 0;
    bottom: 0;
    left: 0;
    height: 0.3125rem;
  }
  &.section-title--snow {
    color: var(--snow);
    &::after {
      background-image: url(/system_panel/uploads/images/stitch-white-h.png);
    }
  }
  &.section-title--sm .section-title__ja {
    font-size: 1.25rem;
    @media screen and (min-width: 768px) {
      font-size: 1.75rem;
  	}
  }
  &.section-title--start {
    text-align: start;
  }
  &.section-title--sm-no-stitch::after {
    content: none;
  }
}

.stitch-line {
  background-image: url(/system_panel/uploads/images/stitch-navy-h.png);
  background-size: auto 100%;
  height: 0.125rem;
}

.footer-contact-image {
  position: absolute;
  inset: 0;
  &::after {
    position: absolute;
    inset: 0;
    content: "";
    display: block;
    background-color: hsl(from var(--midnight) h s l / 50%);
  }
  & img {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
}

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

.image-stitch {
  position: relative;
  &::before, &::after {
    content: "";
    display: block;
    position: absolute;
    background-image: url(/system_panel/uploads/images/stitch-midnight-h.png);
    background-size: auto 100%;
    height: 0.1875rem;
    width: 4.25rem;
    transform: rotate(45deg);
    z-index: 2;
  }
  &::before {
    top: 0.75rem;
    right: -1.5rem;
  }
  &::after {
    bottom: 0.75rem;
    left: -1.5rem;
  }
  &:empty {
    display: none;
  }
}

.swiper:not(.swiper-initialized) .swiper-wrapper {
  display: flex;
  overflow: auto;
  & .swiper-slide {
    min-width: 90%;
  }
}
.swiper.about-us-slide .swiper-wrapper {
  transition-timing-function: linear;
}


.instruction-point-counter {
  counter-reset: point-counter;
}
.instruction-point-title {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  padding-right: 1rem;
  padding-left: 1rem;
  background-image: var(--midnight-leather);
  @media screen and (min-width: 768px) {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
  }
}
.instruction-point-wrapper {
  max-width: 21.25rem;
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  &:nth-child(n + 2) {
    margin-top: -10%;
  }
  @media screen and (min-width: 768px) {
   &:nth-child(n + 2) {
      margin-top: -4%;
    } 
  }
  @media screen and (min-width: 1024px) {
    flex: 1 1 0%;
    margin-right: 0;
    margin-left: 0;
    width: auto;
    &:nth-child(n + 2) {
      margin-top: 0;
    }
    &:nth-child(1) {
      margin-right: -4%;
    }
    &:nth-child(3) {
      margin-left: -4%;
    }
  }
  & .instruction-point-circle {
    counter-increment: point-counter;
    position: relative;
    padding-top: 100%;
    border-radius: 9999px;
    background-color: hsl(0 0 100 / 80%);
    & .instruction-point-content {
      position: absolute;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      inset: clamp(1.5rem, 18%, 18%) clamp(1rem, 14.4%, 14.4%);
      & .instruction-point-contet__num {
        position: relative;
        &::before {
          content: counter(point-counter, decimal-leading-zero);
          color: var(--midnight);
          line-height: 1;
          letter-spacing: 0;
          font-size: 2.5rem;
          font-family: var(--font-serif);
          font-weight: 400;
        }
        &::after {
          content: "";
          display: block;
          position: absolute;
          top: -0.875rem;
          left: -1.5rem;
          background-image: url(/system_panel/uploads/images/navy-spark.svg);
          background-size: 100% 100%;
          background-repeat: no-repeat;
          background-position: center;
          width: 2.3125rem;
          height: 1.75rem;
        }
      }
    }
  }
}













