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

body {
  font-family: var(--font-serif);
  color: var(--ink);
  background-color: var(--snow);
}

#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;
    font-family: var(--font-serif-jp);

    & 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;
          color: var(--ink);
        }
      }

      &.selected {
        & a {
          background-color: var(--green);
          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: 2rem;
}

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

.work-detail .swiper-pagination {
  position: relative;
  inset: 0;
  margin-top: 0.5rem;
}

.thumbnail {
  position: relative;

  &.thumbnail--16x9 {
    padding-top: 56.25%;
  }
  &.thumbnail--3x2 {
    padding-top: 66.66666%;
  }

  & 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;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: calc(var(--vh, 1vh) * 100);
  padding: 5rem 1.25rem 7.5rem 1.25rem;
  @media screen and (min-width: 768px) {
    padding-right: 2.5rem;
    padding-left: 2.5rem;
  }
  @media screen and (min-width: 1024px) {
    padding-right: 5rem;
    padding-left: 5rem;
  }
  @media screen and (min-width: 1200px) {
    padding-right: 7.5rem;
    padding-left: 7.5rem;
  }
  
  & .page-hero__image {
    position: absolute;
    inset: 0;
    &::after {
      content: "";
      display: block;
      position: absolute;
      inset: 0;
      background: linear-gradient(180deg, rgba(57, 53, 49, 0.00) 0%, rgba(57, 53, 49, 0.55) 72%, rgba(57, 53, 49, 0.85) 90%, #393531 100%);
      pointer-events: none;
    }
    & img {
      position: relative;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }
  
  & .page-hero__title {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 5rem;
    text-align: center;
    color: var(--snow);
    & .page-hero__title-en {
      line-height: 1.15;
      font-weight: 500;
      font-size: 2rem;
      @media screen and (min-width: 768px) {
        font-size: 4rem;
      }
      @media screen and (min-width: 1024px) {
        font-size: 5rem;
      }
      @media screen and (min-width: 1200px) {
        font-size: 6rem;
      }
    }
    & .page-hero__title-ja {
      line-height: 1.25;
      font-size: 1.125rem;
      @media screen and (min-width: 768px) {
        font-size: 1.25rem;
      }
      @media screen and (min-width: 1024px) {
        font-size: 1.5rem;
      }
    }
  }
  
  & .page-hero__scroll {
    position: absolute;
    right: 0.5rem;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    line-height: 1;
    color: var(--snow);
    @media screen and (min-width: 768px) {
      right: 1.25rem;
    }
    & p {
      writing-mode: vertical-rl;
    }
    &::after {
      content: "";
      display: block;
      height: 4rem;
      width: 0.0625rem;
      background-color: var(--snow);
    }
  }
}

.section-title {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  & .section-title__en {
    line-height: 1.15;
    font-size: 0.875rem;
    @media screen and (min-width: 768px) {
      font-size: 1rem
    }
    @media screen and (min-width: 1024px) {
      font-size: 1.125rem
    }
    @media screen and (min-width: 1200px) {
      font-size: 1.5rem
    }
  }
  & .section-title__ja {
    line-height: 1.25;
    font-size: 1.5rem;
    @media screen and (min-width: 768px) {
      font-size: 2rem
    }
    @media screen and (min-width: 1024px) {
      font-size: 2.5rem
    }
    @media screen and (min-width: 1200px) {
      font-size: 3rem
    }
  }
  &.section-title--snow {
    color: var(--snow);
  }
  &.section-title--center {
    text-align: center;
  }
  &.section-title--sm {
    & .section-title__en {
      font-size: 0.875rem;
      @media screen and (min-width: 1024px) {
        font-size: 1rem
      }
      @media screen and (min-width: 1200px) {
        font-size: 1.125rem
      }
    }
    & .section-title__ja {
      font-size: 1.25rem;
      @media screen and (min-width: 768px) {
        font-size: 1.5rem
      }
      @media screen and (min-width: 1024px) {
        font-size: 2.125rem
      }
      @media screen and (min-width: 1200px) {
        font-size: 2.25rem
      }
    }
  }
}

.company-sticky-image {
  position: relative;
  width: 15%;
  @media screen and (min-width: 768px) {
    width: 40%;
  }
  & img {
    width: 100%;
    height: calc(var(--vh, 1vh) * 100);
    object-fit: cover;
    position: sticky;
    top: 0;
  }
}

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

.swiper.history-slide .swiper-pagination {
  position: relative;
  margin-top: 2rem;
  inset: 0;
}

.button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1;
  letter-spacing: 0;
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--ink);
  transition: all ease 200ms;
  &::after {
    content: "";
    display: block;
    height: 1.5rem;
    width: 1.5rem;
    background-image: url(/system_panel/uploads/images/arrow-ink.svg);
    background-size: 100% 100%;
    background-repeat: no-repeat;
  }
  &:hover {
    color: var(--ink);
    text-decoration: none;
    opacity: 90%;
    transform: scale(0.95);
  }
  &.button--snow {
    color: var(--snow);
    &:hover {
      color: var(--snow);
    }
    &::after {
      background-image: url(/system_panel/uploads/images/arrow-snow.svg);
    }
  }
  &.button--external {
    &::after {
      background-image: url(/system_panel/uploads/images/external.svg);
    }
    &.button--snow {
      &::after {
        background-image: url(/system_panel/uploads/images/external-snow.svg);
      }
    }
  }
}

.footer-contact {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: calc(var(--vh, 1vh) * 100);
  padding-right: 1.25rem;
  padding-left: 1.25rem;
  @media screen and (min-width: 768px) {
    padding-right: 2.5rem;
    padding-left: 2.5rem;
  }
  @media screen and (min-width: 1024px) {
    padding-right: 3.75rem;
    padding-left: 3.75rem;
  }
  @media screen and (min-width: 1200px) {
    padding-right: 5rem;
    padding-left: 5rem;
  }
}

.swiper.woodworking-slide .swiper-wrapper {
  transition-timing-function: linear;
  & img {
    width: 100%;
  }
}
.swiper.woodworking-slide--miyamasugi {
  @media screen and (min-width: 1024px) {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
  } 
}

.hurusato-link-image {
  background-image: url(/system_panel/uploads/images/bg-wood.jpg);
  position: relative;
  padding-top: 56.25%;
  & img {
    position: absolute;
    inset: 5%;
    width: 90%;
    height: 90%;
    object-fit: contain;
  }
}

.expertise-intro-image-1 {
  position: absolute;
  top: -5rem;
  left: 0rem;
  width: clamp(7.5rem, 20%, 20rem);
  @media screen and (min-width :768px) {
    top: 4rem;
    left: 0.75rem;
  }
  @media screen and (min-width :1200px) {
    top: 50%;
    left: 1.25rem;
    transform: translateY(-50%);
  }
  & img {
    object-fit: cover;
    aspect-ratio: 2 / 3;
    width: 100%;
  }
}

.expertise-intro-image-2 {
  position: absolute;
  right: 0.75rem;
  bottom: 5rem;
  width: clamp(8rem, 25%, 25rem);
  @media screen and (min-width :768px) {
    right: 0;
  }
  @media screen and (min-width :1200px) {
    bottom: 10rem;
  }
  & img {
    object-fit: cover;
  }
  & img:nth-child(1) {
    aspect-ratio: 4 / 3;
    width: 70%;
    position: absolute;
    bottom: 0;
    left: 0;
    transform: translate(-71.42857143%, 57.14285714%);
  }
  & img:nch-child(2) {
    aspect-ratio: 2 / 3;
    width: 100%;
    position: relative;
  }
}

.expertise-slide {
  width: calc(50% + 50vw - var(--parent-pl));
  max-width: 95rem;
  --parent-pl: 1.25rem;
  @media screen and (min-width :768px) {
    --parent-pl: 2.5rem;
  }
  @media screen and (min-width :1024px) {
    --parent-pl: 3.75rem;
  }
  @media screen and (min-width :1200px) {
    --parent-pl: 5rem;
  }
}

.philosophy-intro-image {
  width: 10rem;
  position: absolute;
  top: 1.25rem;
  right: 1rem;
  @media screen and (min-width: 768px) {
    width: 17.5rem;
    top: 2.5rem;
    right: 1.25rem;
  }
  & img {
    object-fit: cover;
    aspect-ratio: 1 / 1;
    width: 100%;
  }
}

.philosophy-dec-image {
  position: absolute;
  top: 2.5rem;
  width: 15rem;
  &.philosophy-dec-image--left {
    left: 0;
  }
  &.philosophy-dec-image--right {
    right: 0;
  }
  @media screen and (min-width: 768px) {
    width: 25rem;
  }
  & img {
    object-fit: cover;
    aspect-ratio: 2 / 1;
    width: 100%;
  }
  @media screen and (min-width: 1024px) {
    width: 30rem;
    top: 12.5rem;
    &.philosophy-dec-image--left {
      left: 0;
    }
    &.philosophy-dec-image--right {
      right: 0;
    }
  }
  @media screen and (min-width: 1200px) {
    width: 35rem;
  }
}

.philosophy-dec-text {
  position: absolute;
  top: -9rem;
  line-height: 1;
  letter-spacing: 0.1em; 
  opacity: 10%;
  writing-mode: vertical-rl;
  font-size: 5rem;
  &.philosophy-dec-text--left {
    right: 1rem;
  }
  &.philosophy-dec-text--right {
    left: -1rem;
  }
  @media screen and (min-width: 768px) {
    font-size: 7rem;
  }
  @media screen and (min-width: 1024px) {
    font-size: 8rem;
    top: -12rem;
    &.philosophy-dec-text--left {
      right: auto;
      left: -7rem;
    }
    &.philosophy-dec-text--right {
      right: -6rem;
      left: auto;
    }
  }
  @media screen and (min-width: 1200px) {
    font-size: 10rem;
    top: -15rem;
    &.philosophy-dec-text--left {
      left: -8.5rem;
    }
    &.philosophy-dec-text--right {
      right: -7.5rem;
    }
  }
}

.filtered-image {
  position: absolute;
  inset: 0;
  &::after {
    content: "";
    display: block;
    position: absolute;
    inset: 0;
    background-color: hsl(0 0 0 / 60%);
    backdrop-filter: blur(3px);
    pointer-events: none;
  }
  & img {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
}

.expertise-philosophy-image {
  display: none;
  position: absolute;
  top: 10rem;
  right: -7.5rem;
  width: clamp(10rem, 30%, 30rem);
  & img {
    width: 100%;
    object-fit: cover;
    aspect-ratio: 4 / 3;
  }
  @media screen and (min-width: 1200px) {
    display: block;
  }
}










