*,
*::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(--snow);
  background-color: var(--ink);
  background-image: var(--wall-ink);
  letter-spacing: 0.08em;
}

#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: inherit;
}

[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;
        border: 1px solid hsla(from var(--snow) h s l / 40%);
        &:hover {
          text-decoration: none;
        }
      }

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

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

.thumbnail {
  position: relative;
  &.news-image {
    position: absolute;
  }

  &.thumbnail--16x9 {
    padding-top: 56.25%;
  }
  &.thumbnail--4x3 {
    padding-top: 75%;
  }
  &.thumbnail--square {
    padding-top: 100%;
  }

  & 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: 10rem 1.25rem 3rem;
  @media (min-width: 768px) {
    padding: 15rem 2.5rem 3rem;
  }
  @media (min-width: 1024px) {
    padding-left: 3.75rem;
    padding-right: 3.75rem;
  }
  @media (min-width: 1200px) {
    padding: 20rem 5rem 3rem;
  }
  & .page-hero__content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 80rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    & .page-hero__title {
      display: flex;
      flex-direction: column;
      gap: 2rem;
      & .page-hero__title-main {
        padding: 0 0.125rem 2rem;
        line-height: 1;
        letter-spacing: 0.12em;
        font-family: var(--font-sans);
        font-weight: 300;
        border-bottom: 0.5px solid var(--snow);
        & h1 {
          font-size: 2rem;
          @media (min-width: 768px) {
            font-size: 2.5rem;
          }
          @media (min-width: 1024px) {
            font-size: 3rem;
          }
        }
      }
      & .page-hero__title-sub {
        line-height: 1.4;
        font-family: var(--font-serif-display);
        font-size: 1rem;
        @media (min-width: 768px) {
          font-size: 1.25rem;
        }
        @media (min-width: 1024px) {
          font-size: 1.5rem;
        }
      }
    }
  }
}

.section-title {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4rem;
  & .section-title__en {
    line-height: 1;
    letter-spacing: 0.12em;
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 0.875rem;
    position: relative;
    margin: 0 2px 1px;
    &::after {
      content: "";
      display: block;
      background-color: var(--snow);
      height: 0.5px;
      position: absolute;
      right: -2px;
      bottom: -1px;
      left: -2px;
    }
  }
  & .section-title__ja {
    line-height: 1.4;
    font-family: var(--font-serif-display);
    font-size: 1.125rem;
    @media (min-width: 768px) {
      font-size: 1.5rem;
    }
  }
  &.section-title--ink {
    color: var(--ink);
    & .section-title__en::after {
      background-color: var(--ink);
    }
  }
}


.news-list {
  & .webgene-blog {
  }
  & .webgene-item {
    & a {
      aspect-ratio: 5 / 7;
    }
    .backdrop-object {
      &::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(39, 38, 37, 0.00) 0%, #272625 100%);
        z-index: 1;
      }
      & img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 0;
      }
    }
  }
}

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

.history-year-name {
  position: absolute;
  right: -2rem;
  bottom: -2rem;
  line-height: 1;
  letter-spacing: 0.12em;
  color: var(--blue);
  opacity: 40%;
  font-family: var(--font-serif-display);
  font-size: 5rem;
  @media (min-width: 768px) {
    right: -3rem;
    bottom: -3rem;
    font-size: 10rem;
  }
  @media (min-width: 1200px) {
    font-size: 15rem;
    &.history-year-name--1 {
      top: -3.75rem;
      right: -32.5rem;
      bottom: auto;
    }
    &.history-year-name--2 {
      top: -12rem;
      right: -1rem;
      bottom: auto;
    }
    &.history-year-name--3 {
      right: 5rem;
      bottom: -5rem;
    }
    &.history-year-name--4 {
      top: -3.75rem;
      right: -42rem;
      bottom: auto;
    }
  }
}

.company-profile-image {
  object-fit: cover;
  aspect-ratio: 3 / 2;
  width: 100%;
  @media (min-width: 1200px) {
    position: absolute;
    right: 0;
    bottom: 0;
    transform: translate(59.3639575972%, 26.455026455%);
    width: 52.4074074074%;
  }
}

.rotate-text {
  transform: rotate(90deg);
  line-height: 1;
  letter-spacing: 0.06em;
  font-family: var(--font-serif-display);
  font-size: 2rem;
  position: absolute;
  white-space: nowrap;
  opacity: 0.5;
  transform-origin: top left;
  z-index: 1;
  
  @media screen and (min-width: 768px) {
    font-size: 2.5rem;
  }
  @media screen and (min-width: 1024px) {
    font-size: 3rem;
  }
  @media screen and (min-width: 1200px) {
    font-size: 4rem;
  }
  
  &.rotate-text--company-profile {
    right: -23.5rem;
    top: -5.625rem;

    @media screen and (min-width: 768px) {
      right: -29.5rem;
    }
    @media screen and (min-width: 1024px) {
    }
    @media screen and (min-width: 1200px) {
      right: -40.5rem;
    }
  }
  
  &.rotate-text--story-1,
  &.rotate-text--story-2,
  &.rotate-text--story-3,
  &.rotate-text--story-4 {
    width: 0;
    height: 0;
  }
  &.rotate-text--story-1 {
    top: -5.25rem;
    right: 0.625rem;
  }
  &.rotate-text--story-2 {
    transform: rotate(90deg) translateY(-1em);
    top: -2.5rem;
    left: 1.25rem;
  }
  &.rotate-text--story-3 {
    top: -7.5rem;
    right: 0.625rem;
  }
  &.rotate-text--story-4 {
    transform: rotate(90deg) translateY(-1em);
    top: -1em;
    left: 1.25rem;
    @media (min-width: 1024px) {
      top: -3.75em;
    }
  }
}

.history-wave {
  left: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  opacity: 0.4;
  
  & .history-wave__1, & .history-wave__2 {
    width: 300%;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
  }
  & .history-wave__1 img, & .history-wave__2 img {
    content: "";
    position: absolute;
    top: 0;
    width: 100%;
  }
  .history-wave__1 img {
    left: 0;
    animation: move-wave 4500ms linear infinite reverse;
  }
  .history-wave__2 img {
    right: 0;
    animation: move-wave 4500ms linear infinite;
  }
}

@keyframes move-wave {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(33.3333%);
  }
}

.company-profile__stamp {
  position: absolute;
  top: -1rem;
  left: 65%;
  transform: translateX(-50%) rotate(6.34deg);
  width: 4rem;
  
  @media (min-width: 768px) {
    top: -2rem;
    left: 55%;
    width: 6rem;
  }
  @media (min-width: 1200px) {
    top: -3rem;
    left: 50%;
    width: 8rem;
  }
}

@keyframes rotation {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--snow);
  line-height: 1.25;
  letter-spacing: 0.08em;
  font-size: 0.875rem;
  transition: opacity ease 200ms;
  &::after {
    content: "";
    display: block;
    width: 3rem;
    height: 3rem;
    background-image: url(/system_panel/uploads/images/view-more.svg);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    animation: rotation 30000ms linear infinite;
  }
  &:hover {
    opacity: 90%;
    text-decoration: none;
    color: var(--snow);
  }
  &.button--send::after {
    background-image: url(/system_panel/uploads/images/send.svg);
  }
  &.button--to-page-top::after {
    background-image: url(/system_panel/uploads/images/to-page-top.svg);
  }
  &.button--back::after {
    background-image: url(/system_panel/uploads/images/back.svg);
  }
  &.button--rect {
    padding: 0.875rem 1.625rem 1rem 1.5rem;
    gap: 0.75rem;
    border: 0.5px solid var(--snow);
    &::after {
      content: none;
    }
    &::before {
      content: "";
      display: block;
      position: absolute;
      top: -4px;
      left: -5px;
      width: calc(100% + 2px);
      height: calc(100% + 2px);
      border: 0.5px solid var(--snow);
      pointer-events: none;
    }
    &.button--rect-ink {
      color: var(--ink);
      border-color: var(--ink);
      &::before {
        border-color: var(--ink);
      }
    }
  }
}

.to-page-top-button {
  animation: rotation 30000ms linear infinite;
  transition: opacity ease 200ms;
  &:hover {
    opacity: 90%;
  }
}

.form-selector-button {
  padding: 0.875rem 1.5rem 1rem;
  border: 0.5px solid var(--snow);
  line-height: 1.25;
  font-size: 0.875rem;
  color: var(--snow);
  &.selected {
    background-color: var(--blue);
  }
}

.footer-contact-image {
  position: absolute;
  inset: 0;
  &::after {
    content: "";
    display: block;
    position: absolute;
    inset: 0;
    background-image: url(/system_panel/uploads/images/sand.png);
    pointer-events: none;
  }
  & img {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
}

.overlapping-cards {
  position: relative;
  overflow: visible;
  border: 1px solid hsl(0 0 100 / 40%);
  &::before {
    content: "";
    display: block;
    position: absolute;
    top: -1rem;
    left: -1rem;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    border: 1px solid hsl(0 0 100 / 40%);
    pointer-events: none;
  }
  &.overlapping-cards--narrow::before {
    top: -0.5rem;
    left: -0.5rem;
  }
  &.overlapping-cards--article-category {
    @media (min-width: 1200px) {
      position: sticky;
      top: 3rem;
    }
  }
}

.category-title {
  line-height: 1;
  letter-spacing: 0.12em;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 0.875rem;
  position: relative;
  margin: 0 2px 1px;
  &::after {
    content: "";
    display: block;
    background-color: var(--snow);
    height: 0.5px;
    position: absolute;
    right: -2px;
    bottom: -1px;
    left: -2px;
  }
}

.news-category .webgene-blog {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}

.news-list .webgene-blog {
  display: grid;
  row-gap: 0.5rem;
  column-gap: 3rem;
  @media (min-width: 1024px) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    & .webgene-item:nth-child(even) {
      margin-top: 2.5rem;
    }
  }
  & .webgene-pagination {
    margin-top: 3rem;
    @media (min-width: 1024px) {
      grid-column: span 2 / span 2;
    }
  }
}

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

.story-image {
  position: relative;
  @media (min-width: 1024px) {
    flex: 1 1 0%;
  }
  &::after {
    content: "";
    display: block;
    position: absolute;
    inset: 0;
    background-color: hsl(0 0 0 / 40%);
    pointer-events: none;
  }
  & img {
    object-fit: cover;
    width: 100%;
  }
  &.story-image--1 {
    padding-top: 2.5rem;
    &::after {
      content: none;
    }
    @media (min-width: 1024px) {
      margin-top: 5rem;
      margin-left: -10rem;
    }
    & .image-main, & .image-sub {
      &::after {
        content: "";
        display: block;
        position: absolute;
        inset: 0;
        background-color: hsl(0 0 0 / 40%);
        pointer-events: none;
      }
      & img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
    }
    & .image-main {
      position: relative;
      aspect-ratio: 4 / 3;
      width: 90%;
    }
    & .image-sub {
      position: absolute;
      top: 0;
      right: 0;
      width: 55%;
      aspect-ratio: 3 / 2;
      z-index: 1;
    }
  }
  &.story-image--2 {
    @media (min-width: 1024px) {
      max-width: 30rem;
    }
    & img {
      aspect-ratio: 1 / 1;
    }
  }
  &.story-image--3 {
    @media (min-width: 1024px) {
      max-width: 35rem;
      margin-left: -10rem;
    }
    & img {
      aspect-ratio: 5 / 7;
    }
  }
  &.story-image--4 {
    @media (min-width: 1024px) {
      max-width: 35rem;
      margin-top: 17.5rem;
    }
    & img {
      aspect-ratio: 4 / 3;
    }
  }
}

.story-lines {
  position: absolute;
  display: flex;
  align-items: center;
  opacity: 40%;
  gap: 0.625rem;
  &::before, &::after {
    content: "";
    display: block;
    width: 1px;
    height: 10rem;
    background-color: var(--snow);
  }
  &::after {
    margin-top: 3.75rem;
  }
  &.story-lines--1 {
    right: 10.7142857143%;
    bottom: -5rem;    
  }
  &.story-lines--2 {
    bottom: -5rem;
    left: 5.5555555556%;
  }
  &.story-lines--3 {
    right: 6.6666666667%;
    bottom: -5rem;    
  }
  &.story-lines--4 {
    top: -6.25rem;
    right: 5.5555555556%;    
  }
}


.product-num  {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-26.6666666667%, -56.6666666667%);
  line-height: 1;
  letter-spacing: 0.08em;
  font-family: var(--font-serif-display);
  color: var(--snow);
  opacity: 10%;
  font-size: 5rem;
  @media (min-width: 768px) {
    font-size: 6.25rem;
  }
  @media (min-width: 1200px) {
    font-size: 7.5rem;
  }
}

.products-gallery {
  margin-top: -5rem;
  @media (min-width: 1024px) {
    margin-top: -2.5rem;
  }
  @media (min-width: 1200px) {
    margin-top: -7.5rem;
  }
  & .swiper-wrapper {
    transition-timing-function: linear;
  }
}

.for-businesses-logo {
  position: absolute;
  width: 10rem;
  top: -4rem;
  left: -4.5rem;
  opacity: 8%;
}

.activities-intro-logo {
  position: absolute;
  width: 10rem;
  top: -4rem;
  left: -4.5rem;
  opacity: 30%;
  @media (min-width: 768px) {
    width: 15rem;
    top: -5rem;
    left: -6rem;
  }
}

.activities-intro-image {
  @media (min-width: 1024px) {
    position: absolute;
    width: 17rem;
    &.activities-intro-image--1 {
      bottom: 0;
      left: -1.25rem;
    }
    &.activities-intro-image--2 {
      top: 0;
      right: -1.25rem;
    }
  }
  @media (min-width: 1200px) {
    width: 25rem;
  }
}

.activities-schedule {
  overflow: auto;
  & .sibloo-calendar {
    min-width: 37.5rem;
    --fc-button-bg-color: var(--blue);
    --fc-border-color: hsl(0 0 100 / 40%);
    --fc-today-bg-color: hsl(0 0 100 / 10%);
    & a {
      border-color: var(--blue-silver) !important;
      border-radius: 0;
      & .fc-event-main {
        background-color: var(--blue);
        & .fc-event-title-container {
          padding: 0.25rem;
        }
      }
    }
  }
}

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

.company-history.swiper {
  & .swiper-wrapper {
    transition-timing-function: linear;
  }
}




