*,
*::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(--ivory);
  font-weight: 500;
}

#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;
  }
  &.list--decimal {
    list-style-type: decimal;
  }
}

.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: hsla(from var(--ink) h s l / 20%);
        color: var(--ink);
        &:hover {
          text-decoration: none;
        }
      }

      &.selected {
        & a {
          background-color: var(--brown);
          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--3x2 {
    padding-top: 66.6667%;
  }
  &.thumbnail--square {
    padding-top: 100%;
  }

  & img,
  & video,
  &: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;
  }
}

/* 今後スタイルを定義するためのプレースホルダー */
.news-list {
  /* TODO: ニュース一覧のスタイルを定義 */
}
.blog-list {
  /* TODO: ブログ一覧のスタイルを定義 */
}

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


.brand-ticker {
  --ticker-gap: 2.5rem;
  --ticker-gap-half: 1.25rem;

  overflow: hidden;
  width: 100%;

  & .brand-ticker__track {
    display: flex;
    width: max-content;
    animation: ticker-slide 25000ms linear infinite;
    will-change: transform;
    align-items: center;
    gap: var(--ticker-gap);
  }

  & .brand-ticker__group {
    display: flex;
    align-items: center;
    gap: var(--ticker-gap);

    & > a {
      display: block;
      transition: opacity 200ms linear;

      &:hover {
        opacity: 0.8;
      }

      & > img {
        display: block;
        aspect-ratio: 2 / 1;
        height: 2.5rem;
        object-fit: contain;
      }
    }
  }

  @media (min-width: 1024px) {
    --ticker-gap: 5rem;
    --ticker-gap-half: 2.5rem;

    & .brand-ticker__group {
      & > a > img {
        height: 5rem;
      }
    }
  }

  @media (min-width: 1200px) {
    & .brand-ticker__group {
      & > a > img {
        height: 8rem;
      }
    }
  }
}

@keyframes ticker-slide {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(
      calc(-50% - var(--ticker-gap-half)),
      0,
      0
    );
  }
}


.button {
  display: grid;
  grid-template-columns: 1fr max-content;
  gap: 1.5rem;
  min-width: 11.875rem;
  padding: 0.75rem 1.25rem;
  border: 0;
  transition: opacity 250ms linear;
  font-size: 1.5rem;
  font-family: var(--font-norse);
  line-height: 1.25;
  letter-spacing: 0.12em;
  text-box-trim: trim-both;
  font-weight: 700;
  
  &:hover {
    opacity: 0.85;
    text-decoration: none;
  }
  &:active {
    opacity: 0.8;
  }
  
  &.button--dark-green {
    background-color: var(--dark-green);
    color: var(--snow);
  }
  &.button--brown {
    background-color: var(--brown);
    color: var(--snow);
  }
  & > p, & > span {
    text-box-trim: trim-both;
    transform: translateY(10%);
  }
  &.button--border {
    border-bottom: 1px solid var(--ink);
  }
  
  &::after {
    content: "";
    width: 1.125rem;
    height: 1.125rem;
    background-image: url(/system_panel/uploads/images/20260818145452100688.svg);
    background-size: contain;
    background-repeat: no-repeat;
  }
  &.button--border::after {
    background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2218%22%20viewBox%3D%220%200%2018%2018%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M0.58%2017.76L0%2017.18L15.7%201.38L11.48%201.18V0.600001C13.92%200.56%2015.28%200.420001%2017.68%200C17.26%202.4%2017.12%203.76%2017.08%206.2H16.5L16.3%201.98L0.58%2017.76Z%22%20fill%3D%22%2318261F%22%2F%3E%0A%3C%2Fsvg%3E%0A");
  }
  
  &.button--to-bottom::after {
    background-image: url("data:image/svg+xml,%3Csvg%20width%3D%226%22%20height%3D%2219%22%20viewBox%3D%220%200%206%2019%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M2.64643%203.24868e-08L3.26786%200L3.32143%2017.1687L5.68929%2014.9776L6%2015.2937C4.71429%2016.6454%204.06071%2017.463%203%2019C1.93929%2017.463%201.28571%2016.6454%200%2015.2937L0.310714%2014.9776L2.67857%2017.1687L2.64643%203.24868e-08Z%22%20fill%3D%22%2318261F%22%2F%3E%0A%3C%2Fsvg%3E%0A");
  }
}

.page-hero-text {
  mix-blend-mode: exclusion;
  color: var(--ivory);
  @media (min-width: 1200px) {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
  }
}

.page-hero-rect {
  top: 0;
  left: 0;
  position: absolute;
  width: 100%;
  max-width: 62.5rem;
  aspect-ratio: 1 / 1;
  background-image: url(/system_panel/uploads/images/20260818173114595691.png);
  background-size: 100% 100%;
}

.elevation {
  box-shadow: 0 2px 6px 1px rgba(0, 0, 0, 0.02), 0 4px 12px 2px rgba(0, 0, 0, 0.04), 0 8px 24px 4px rgba(0, 0, 0, 0.08), 0 16px 48px 8px rgba(0, 0, 0, 0.12);
}


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

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

.service-intro-backdrop {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 21.3333%;
  max-width: 15rem;
  aspect-ratio: 100 / 257;
  
  & > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-mask: linear-gradient(
      to bottom right,
      transparent 0 50%,
      #000 50% 100%
    );
    mask: linear-gradient(
      to bottom right,
      transparent 0 50%,
      #000 50% 100%
    );
  }
}

.product-list {
  display: grid;
  row-gap: 3rem;
  column-gap: 2rem;
  
  @media (min-width: 1024px) {
    width: 50rem;
  }
  @media (min-width: 1200px) {
    width: 75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.aspect-ratio [data-gjs-type="video"] {
  width: 100%;
  height: auto;
}

.cut-box {
  --cut: 3.75rem;

  clip-path: polygon(
    var(--cut) 0,
    100% 0,
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    0 100%,
    0 var(--cut)
  );
}

.insta-list {
  & .webgene-blog {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
  & .webgene-pagination, & .webene-no-items {
    grid-column: span 2 / span 2;
  }
}

.home-area-illust {
  @media (min-width: 1024px) {
    position: absolute;
    width: 100%;
    max-width: 57.875rem;
    top: -25rem;
    right: -26.875rem;
  }
  @media (min-width: 1200px) {
    top: -6rem;
    right: -6rem;
  }
}

.home-service-list {
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  display: flex;
  gap: 0.0625rem;
  background-color: hsla(from var(--ivory) h s l / 20%);
  
  & .service-item {
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
    width: 82%;
    min-width: 82%;
    background-color: var(--dark-green);
  }
  & .service-item__content {
    padding: 2rem 1rem;
  }
  
  @media (min-width: 768px) {
    & .service-item__content {
      padding-inline: 2rem;
    }
  }
  
  @media (min-width: 1024px) {
    display: grid;
    overflow: hidden;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    
    & .service-item__content {
      padding-inline: 4rem;
    }
    & .service-item {
      width: 100%;
      min-width: unset;
      &:first-of-type {
        grid-column: span 2 / span 2;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        
        & > img {
          grid-column: span 3 / span 3;
          aspect-ratio: unset;
          height: 100%;
        }
        
        & .service-item__content {
          grid-column: span 2 / span 2;
          padding-top: 5rem;
          padding-bottom: 2rem;
        }
      }
    }
  }
}

.home-hero__image {
  position: relative;
  aspect-ratio: 4 / 3;
  
  & img.backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  & img.shaped {
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    width: 100%;
    height: 90%;
    object-fit: cover;
    -webkit-mask: linear-gradient(
      to top left,
      transparent 0 50%,
      #000 50% 100%
    );
    mask: linear-gradient(
      to top left,
      transparent 0 50%,
      #000 50% 100%
    );
  }
  
  @media (min-width: 1024px) {
    aspect-ratio: unset;
    & img.shaped {
      height: 80%;
    }
  }
}


