*,
*::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);
  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;
  }
}

.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-radius: 999px;
        color: var(--snow);
        background-color: var(--ink);
        &:hover {
          text-decoration: none;
          color: var(--snow);
        }
      }

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

.page-hero {
  position: relative;
  padding-block: 10rem 12.5rem;
  background-color: var(--gray);
  z-index: 1;
  
  & .page-hero__images {
    position: absolute;
    top: 18rem;
    right: -1.25rem;
    width: 21.25rem;
    & img {
      object-fit: cover;
      &:nth-of-type(1) {
        aspect-ratio: 4 / 3;
        width: 69.4444444444%;
        margin-left: 30.5555555556%;
      }
      &:nth-of-type(2) {
        aspect-ratio: 3 / 2;
        width: 50%;
        margin-top: -29%;
      }
    }
  }
  
  & .page-hero__title {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    line-height: 1.25;
    font-weight: 700;
    & > p {
      color: var(--orange);
      font-size: 1.5rem;
      --tracking: 0.04em;
    }
    & > h1 {
      font-family: var(--font-serif);
      font-size: 2rem;
    }
  }
  
  @media (min-width: 768px) {
    padding-bottom: 2.5rem;
    & .page-hero__images {
      top: 8rem;
      right: 0;
    }
    & .page-hero__title {
      & > p {
        font-size: 1.75rem;
      }
      & > h1 {
        font-size: 2.25rem;
      }
    }
  }
  @media (min-width: 1024px) {
    & .page-hero__images {
      width: 30rem;
    }
    & .page-hero__title {
      & > p {
        font-size: 2rem;
      }
      & > h1 {
        font-size: 3rem;
      }
    }
  }
  @media (min-width: 1200px) {
    padding-top: 22.5rem;
    & .page-hero__images {
      width: 45rem;
      top: 12.5rem;
    }
  }
}

.wave {
  width: 100%;
  height: 6rem;
  mask-image: url("/system_panel/uploads/images/wave.png");
  -webkit-mask-image: url("/system_panel/uploads/images/wave.png");
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
  @media (min-width: 768px) {
    height: 10rem;
  }
  @media (min-width: 1200px) {
    height: 14rem;
  }
}

& .section-title {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  line-height: 1.25;
  font-weight: 700;
  & > p {
    color: var(--orange);
    font-size: 1.5rem;
    --tracking: 0.04em;
  }
  & > h2,
  & > h3,
  & > h4,
  & > h5 {
    font-family: var(--font-serif);
    font-size: 1.125rem;
  }
  @media (min-width: 768px) {
    & > p {
      font-size: 2rem;
    }
    & > h2, 
    & > h3, 
    & > h4, 
    & > h5 {
      font-size: 2.25rem;
    }
  }
  
  &.section-title--snow {
    color: var(--snow);
    & > p {
      color: var(--snow);
    }
  }
  &.section-title--half-snow {
    color: var(--snow);
  }
}

.bg-rect {
  position: relative;
  & > * {
    position: relative;
  }
  &::before {
    content: "";
    background-color: var(--dark-green);
    opacity: 0.1;
    position: absolute;
  }
  &.bg-rect--message::before {
    inset: -7.5rem -2.5rem -3.75rem -10rem;
  }
  &.bg-rect--about-story-1::before {
    inset: -6.25rem -8.75rem -3.75rem -3.75rem; 
  }
  &.bg-rect--about-story-2::before {
    inset: -3.75rem -3.25rem -5rem -10rem; 
  }
}

.message-bg-vegetables {
  width: 15rem;
  position: absolute;
  top: -4rem;
  left: 1.25rem;
  @media (min-width: 768px) {
    width: 23.75rem;
    top: -8.625rem;
    left: 5rem;
  }
}

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

.contact-ticker {
  overflow: hidden;
  width: 100%;
}

.contact-ticker__track {
  display: flex;
  width: max-content;
  animation: ticker-slide 25000ms linear infinite;
  /* ブラウザのアニメーション最適化を促進 */
  will-change: transform;
}

.contact-ticker__group {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-right: 24px;
  overflow: hidden;
}

.contact-ticker img {
  width: 3rem;
}

.contact-ticker p {
  line-height: 1;
  font-weight: 700;
  font-size: 2rem;
  color: var(--orange);
}

/* レスポンシブ対応 */
@media (min-width: 768px) {
  .contact-ticker__group {
    gap: 28px;
    padding-right: 28px;
  }
  .contact-ticker img {
    width: 4.5rem;
  }
  .contact-ticker p {
    font-size: 3rem;
  }
}

@media (min-width: 1024px) {
  .contact-ticker__group {
    gap: 32px;
    padding-right: 32px;
  }
  .contact-ticker img {
    width: 7rem;
  }
  .contact-ticker p {
    font-size: 3.5rem;
  }
}

@media (min-width: 1200px) {
  .contact-ticker__group {
    gap: 48px;
    padding-right: 48px;
  }
  .contact-ticker img {
    width: 6.25rem;
  }
  .contact-ticker p {
    font-size: 4rem;
  }
}

.button {
  position: relative;
  border-radius: 9999px;
  box-shadow: var(--elevation-2);
  padding: 0.75rem 1rem 0.625rem 1.5rem;
  background-color: var(--orange);
  color: var(--snow);
  line-height: 1.25;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  transition: all ease 200ms;
  &::after {
    content: "";
    aspect-ratio: 1 / 1;
    width: 1.25rem;
    background-image: url("/system_panel/uploads/images/arrow-right.svg");
    background-size: 100% 100%;
    background-repeat: no-repeat;
  }
  &:hover {
    text-decoration: none;
    color: var(--snow);
    transform: scale(0.95);
    opacity: 0.85;
  }
  
  &.button--snow {
    background-color: var(--snow);
    color: var(--ink);
    &::after {
      background-image: url("/system_panel/uploads/images/arrow-right-ink.svg");
    }
    &:hover {
      color: var(--ink);
    }
  }
  &.button--insta {
    background-image: url("/system_panel/uploads/images/bg-insta.jpg");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    &::after {
      background-image: url("/system_panel/uploads/images/instagram.svg");
    }
  }
  &.button--line {
    background-color: #00AF00;
    &::after {
      background-image: url("/system_panel/uploads/images/line.svg");
    }
  }
}

.vegetables-slider {
  width: 100%;
  & .swiper-wrapper {
    transition-timing-function: linear;
    align-items: center;
  }
  & .swiper-slide {
    & img {
      width: 100%;
    }
  }
}

.business-intro-bg-vegetables {
  width: 10rem;
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  @media (min-width: 768px) {
    width: 17.5rem;
    left: 2.5rem;
  }
  @media (min-width: 1024px) {
    left: 3.75rem;
  }
}

.point-num {
  width: 10rem;
  position: absolute;
  top: -4rem;
  left: -1.25rem;
  @media (min-width: 768px) {
    width: 16.875rem;
    left: -3rem;
  }
  @media (min-width: 1024px) {
    width: 10rem;
    top: -2rem;
    left: -4rem;
  }
  @media (min-width: 1200px) {
    width: 16.875rem;
    top: -4rem;
    left: -9.5rem;
  }
}

.business-contact-bg-image {
  position: absolute;
  inset: 0;
  &::after {
    pointer-events: none;
    content: "";
    position: absolute;
    inset: 0;
    background-color: hsl(0deg 0% 0% / 0.5);
  }
  & img {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
}

.diagonal-bg-band {
  display: none;
  width: 184%;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  & img {
    width: 100%;
  }
  @media (min-width: 1024px) {
    display: block;
  }
  &.diagonal-bg-band--reverse {
    transform: translateX(-50%) scaleX(-1);
  }
}

.lineup-intro-bg-vegetables {
  width: 10rem;
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  @media (min-width: 1024px) {
    width: 24.5rem;
    bottom: 4rem;
    right: 2em;
  }
  @media (min-width: 1200px) {
    bottom: 11rem;
    right: 7.5rem;
  }
  &.lineup-intro-bg-vegetables--2 {
    right: auto;
    left: 1rem;
    @media (min-width: 1024px) {
      width: 26rem;
      left: 2em;
    }
    @media (min-width: 1200px) {
      bottom: 5rem;
      left: 7.5rem;
    }
  }
}

.about-intro-typo {
  text-align: center;
  line-height: 1;
  --tracking: 0.04em;
  font-weight: 700;
  color: var(--orange);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.25), 0 8px 24px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  font-size: 1.875rem;
  margin-top: -0.5555555556em;
  align-self: center;
  @media (min-width: 414px) {
    font-size: 2.125rem;
  }
  @media (min-width: 768px) {
    font-size: 4.25rem;
  }
  @media (min-width: 1024px) {
    font-size: 5.25rem;
  }
  @media (min-width: 1200px) {
    font-size: 6.75rem;
  }
}

.about-intro-bg-logo {
  position: absolute;
  top: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 71.4583333333%;
  min-width: 35rem;
}

.news-list {
  & .webgene-blog {
    display: grid;
    gap: 1rem;
  }
  & .webgene-pagination {
    margin-top: 2rem;
  }
}

.item-images .item-image img {
  width: 100%;
}

.category-list {
  & .webgene-blog {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
}

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

.blog-illust {
  position: absolute;
  width: 12.5rem;
  bottom: 1rem;
  left: 1.5rem;
  
  @media (min-width: 1024px) {
    left: 5rem;
    bottom: 5rem;
    width: 17.625rem;
  }
  @media (min-width: 1200px) {
    width: 22.625rem;
  }
}
