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

.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: 9999px;
        border: 1px solid var(--orange);
        color: var(--orange);
        &:hover {
          text-decoration: none;
        }
      }

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

  & 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;
  height: 22.5rem;
  display: grid;
  
  & .page-hero__image {
    position: absolute;
    inset: 0;
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
  
  & .page-hero__title {
    position: relative;
    z-index: 1;
    padding: 5rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: end;
    gap: 0.75rem;
    color: var(--snow);
    text-align: center;
    & > h1 {
      line-height: 1;
      --tracking: 0;
      font-size: 2.25rem;
    }
    & > p {
      line-height: 1.25;
      --tracking: 0.08em;
      font-weight: 700;
      font-family: var(--font-display);
      font-size: 1.125rem;
    }
  }
  @media (min-width: 768px) {
    & .page-hero__title {
      padding-inline: 2.5rem;
      & > h1 {
        font-size: 3.5rem;
      }
      & > p {
        font-size: 1.25rem;
      }
    }
  }
  @media (min-width: 1024px) {
    height: 30rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    & .page-hero__image {
      position: relative;
    }
    & .page-hero__title {
      padding: 15rem 3.75rem 7.5rem;
      color: var(--ink);
      & > h1 {
        font-size: 4.25rem;
      }
      & > p {
        font-size: 1.375rem;
      }
    }
  }
  @media (min-width: 1200px) {
    height: 35rem;
    & .page-hero__title {
      & > h1 {
        font-size: 5rem;
      }
      & > p {
        font-size: 1.5rem;
      }
    }
  }
}

.section-title {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: var(--orange);
  & > h1 {
    line-height: 1;
    --tracking: 0;
    font-size: 3rem;
  }
  & > p {
    line-height: 1.25;
    --tracking: 0.08em;
    font-weight: 700;
    font-family: var(--font-display);
    font-size: 1.125rem;
  }
  & .section-title__num {
    padding-left: 0.25rem;
    margin-bottom: 0.5rem;
    line-height: 1;
    --tracking: 0;
    font-weight: 600;
    font-family: var(--font-sans);
    font-size: 1.5rem;
  }
  @media (min-width: 768px) {
    & > h1 {
      font-size: 3.5rem;
    }
    & > p {
      font-size: 1.25rem;
    }
    & .section-title__num {
      font-size: 1.75rem;
    }
  }
  @media (min-width: 1024px) {
    & > h1 {
      font-size: 4.25rem;
    }
    & > p {
      font-size: 1.375rem;
    }
  }
  @media (min-width: 1200px) {
    & > h1 {
      font-size: 5rem;
    }
    & > p {
      font-size: 1.5rem;
    }
    & .section-title__num {
      font-size: 2rem;
    }
  }
  
  &.section-title--snow {
    color: var(--snow);
  }
  &.section-title--sky {
    color: var(--sky);
  }
  &.section-title--emerald {
    color: var(--emerald);
  }
  &.section-title--center {
    text-align: center;
    & .section-title__num {
      padding-left: 0;
    }
  }
  &.section-title--sm {
    & > h1 {
      font-size: 2rem;
    }
    & > p {
      font-size: 1rem;
    }
    @media (min-width: 768px) {
      & > h1 {
        font-size: 2.25rem;
      }
      & > p {
        font-size: 1.125rem;
      }
    }
  @media (min-width: 1024px) {
      & > h1 {
        font-size: 2.5rem;
      }
    }
  @media (min-width: 1200px) {
      & > h1 {
        font-size: 3rem;
      }
    }
  }
}

.button {
  position: relative;
  transition: all ease 200ms;
  --button-color: var(--orange);
  border-radius: 9999px;
  border: 2px solid var(--button-color);
  padding: 0.625rem 1.25rem;
  color: var(--button-color);
  line-height: 1.25;
  --tracking: 0.08em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  &:hover {
    text-decoration: none;
    color: var(--button-color);
    opacity: 0.85;
    transform: scale(0.95);
  }
  &.button--snow {
    --button-color: var(--snow);
  }
  &.button--sky {
    --button-color: var(--sky);
  }
  &.button--emerald {
    --button-color: var(--emerald);
  }
}

.half-logos {
  position: relative;
  overflow: hidden;
  &::before,
  &::after {
    content: "";
    position: absolute;
    width: 10rem;
    background-size: 100% 100%;
    background-repeat: no-repeat;
  }
  &::before {
    aspect-ratio: 400 / 174;
    background-image: url("/system_panel/uploads/images/half-logo-top.svg");
    top: -0.3125rem;
    right: -0.625rem;
  }
  &::after {
    aspect-ratio: 400 / 87;
    background-image: url("/system_panel/uploads/images/half-logo-bottom.svg");
    bottom: -0.3125rem;
    left: -1.25rem;
  }
  @media (min-width: 768px) {
    &::before,
    &::after {
      width: 25rem;
    }
    &::before {
      top: -0.625rem;
      right: -1.25rem;
    }
    &::after {
      bottom: -1.25rem;
      left: -2.5rem;
    }
  }
  &.half-logos--emerald {
    &::before {
      background-image: url("/system_panel/uploads/images/half-logo-top--emerald.svg");
    }
    &::after {
      background-image: url("/system_panel/uploads/images/half-logo-bottom--emerald.svg");
    }
  }
  &.half-logos--sky {
    &::before {
      background-image: url("/system_panel/uploads/images/half-logo-top--sky.svg");
    }
    &::after {
      background-image: url("/system_panel/uploads/images/half-logo-bottom--sky.svg");
    }
  }
  &.half-logos--orange {
    &::before {
      background-image: url("/system_panel/uploads/images/half-logo-top--orange.svg");
    }
    &::after {
      background-image: url("/system_panel/uploads/images/half-logo-bottom--orange.svg");
    }
  }
  &.half-logos--sm {
    @media (min-width: 768px) {
      &::before,
      &::after {
        width: 20rem;
      }
      &::after {
        bottom: -0.625rem;
      }
    }
  }
  
  &.half-logos--rotated {
    &::before {
      transform: translateX(100%) rotate(90deg);
      transform-origin: top left;
    }
    &::after {
      transform: translate(-95%, 0%) rotate(90deg);
      transform-origin: bottom right;
    }
    @media (min-width: 768px) {
      &::before,
      &::after {
        opacity: 0.25;
      }
    }
    @media (min-width: 1200px) {
      &::before,
      &::after {
        opacity: 1;
      }
    }
  }
  &.half-logos--visible {
    overflow: visible;
  }
  &.half-logos--transparent {
    @media (min-width: 768px) {
      &::before,
      &::after {
        opacity: 0.25;
      }
    }
    @media (min-width: 1200px) {
      &::before,
      &::after {
        opacity: 1;
      }
    }
  }
  &.half-logos--only-top {
    &::after {
      content: none;
    }
  }
  &.half-logos--only-bottom {
    &::before {
      content: none;
    }
  }
}

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

.strength-bg-image {
  position: absolute;
  inset: 0;
  &::after {
    pointer-events: none;
    content: "";
    position: absolute;
    inset: 0;
    background-color: black;
    opacity: 0.35;
  }
  & img {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
}

.blog-list {
  & .webgene-blog {
    display: grid;
    gap: 2rem;

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

.article-main-image {
  border-radius: 1rem;
  width: 100%;
  position: relative;
  overflow: hidden;
  & img {
    aspect-ratio: 3 / 2;
  }
  
  &::after {
    content: "";
    position: absolute;
    bottom: 1.25rem;
    right: 1.25rem;
    background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2248%22%20height%3D%2248%22%20viewBox%3D%220%200%2048%2048%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20width%3D%2248%22%20height%3D%2248%22%20rx%3D%2224%22%20fill%3D%22white%22%2F%3E%0A%3Cpath%20d%3D%22M33.0002%2033.0002L28.6602%2028.6602M31%2023C31%2027.4183%2027.4183%2031%2023%2031C18.5817%2031%2015%2027.4183%2015%2023C15%2018.5817%2018.5817%2015%2023%2015C27.4183%2015%2031%2018.5817%2031%2023Z%22%20stroke%3D%22%236C4F42%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%2F%3E%0A%3C%2Fsvg%3E%0A");
    width: 3rem;
    height: 3rem;
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
  }
}
.article-sub-images {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  
  & .item-image {
    width: 7.5rem;
    min-width: 7.5rem;
    scroll-snap-align: start;
  }
  
  @media (min-width: 1024px) {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    
    & .item-image {
      width: auto;
      min-width: auto;
    }
  }
}
.item-images {
  & img {
    width: 100%;
    object-fit: cover;
  }
}







