*,
*::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(--cream);
  letter-spacing: 0.04em;
  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: 2.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;
        &:hover {
          text-decoration: none;
        }
      }

      &.selected {
        & a {
          &: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;
  overflow: hidden;
  padding: 12.5rem 1.25rem 3rem;
  border-bottom: 1px solid hsl(from var(--ink) h s l / 20%);
  @media (min-width: 768px) {
    padding-inline: 2.5rem;
  }
  @media (min-width: 1024px) {
    padding-inline: 3.75rem;
  }
  @media (min-width: 1200px) {
    padding-inline: 5rem;
  }
  
  & .page-hero__bg-image {
    object-fit: cover;
    opacity: 30%;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    @media (min-width: 1024px) {
      width: 85%;
    } 
    @media (min-width: 1200px) {
      width: 74.6875%;
    }      
  }
  
  & .page-hero__title {
    position: relative;
    &::before {
      content: "";
      display: block;
      aspect-ratio: 100 / 4;
      width: 6.25rem;
      background-image: url("/system_panel/uploads/images/title-decs.svg");
      background-size: 100% 100%;
      background-repeat: no-repeat;
      margin-left: auto;
      margin-right: auto;
      position: relative;
      z-index: 1;
    }
    
    & .page-hero__title-en {
      white-space: nowrap;
      line-height: 1;
      letter-spacing: 0;
      font-weight: 600;
      font-size: 5rem;
      color: transparent;
      background-image: var(--grad-logo);
      background-clip: text;
      opacity: 20%;
      mix-blend-mode: difference;
      position: absolute;
      top: -2rem;
      left: 50%;
      transform: translateX(-50%) skew(-10deg);      
    }
    & .page-hero__title-ja {
      position: relative;
      text-align: center;
      line-height: 1.25;
      font-weight: 700;
      font-size: 2rem;
      margin-top: 1.25rem;
    }
    
    @media (min-width: 768px) {
      & .page-hero__title-en {
        font-size: 7.5rem;
        top: -3rem;
      }
      & .page-hero__title-ja {
        font-size: 3rem;
      }
    }
    @media (min-width: 1024px) {
      & .page-hero__title-en {
        font-size: 8.5rem;
        top: -4rem;
        left: calc(50% + 7rem);
      }
      & .page-hero__title-ja {
        font-size: 3.5rem;
      }
    }
    @media (min-width: 1200px) {
      & .page-hero__title-en {
        font-size: 10rem;
        top: -4.5rem;
        left: calc(50% + 10rem);
      }
      & .page-hero__title-ja {
        font-size: 4rem;
      }
    }
  }
}

.section-title {
  position: relative;
  display: grid;
  line-height: 1.25;
  &::before {
    content: "";
    display: block;
    aspect-ratio: 100 / 4;
    width: 6.25rem;
    background-image: url("/system_panel/uploads/images/title-decs.svg");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }
  
  & .section-title__en {
    margin-top: 1.25rem;
    margin-left: 0.25rem;
    font-weight: 600;
    transform: skew(-10deg);
  }
  & .section-title__ja {
    font-weight: 700;
    font-size: 1.75rem;
  }
  @media (min-width: 768px) {
    & .section-title__en {
      font-size: 1.125rem;
    }
    & .section-title__ja {
      font-size: 2.25rem;
    }
  }
  @media (min-width: 1024px) {
    & .section-title__en {
      font-size: 1.25rem;
    }
    & .section-title__ja {
      font-size: 2.5rem;
    }
  }
  @media (min-width: 1200px) {
    & .section-title__en {
      font-size: 1.5rem;
    }
    & .section-title__ja {
      font-size: 3rem;
    }
  }
  
  &.section-title--center {
    text-align: center;
    &::before {
      margin-left: auto;
      margin-right: auto;
    }
    & .section-title__en {
      margin-left: 0;
    }    
  }
  
  &.section-title--no-en {
    & .section-title__ja {
      margin-top: 1rem;
    }
  }
  
  &.section-title--56 {
    & .section-title__ja {
      font-size: 2rem;
    }
    @media (min-width: 768px) {
      & .section-title__ja {
        font-size: 2.5rem;
      }
    }
    @media (min-width: 1024px) {
      & .section-title__ja {
        font-size: 2.75rem;
      }
    }
    @media (min-width: 1200px) {
      & .section-title__ja {
        font-size: 3.5rem;
      }
    }
  }
}

.title-decs {
  aspect-ratio: 100 / 4;
  width: 6.25rem;
  background-image: url("/system_panel/uploads/images/title-decs.svg");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}

.vision-images {
  padding-block: 2rem;
  @media (min-width: 1024px) {
    padding-left: 3rem;
  }
  @media (min-width: 1200px) {
    padding-left: 9rem;
    padding-right: 3rem;
  }
  & .vision-image {
    object-fit: cover;
    aspect-ratio: 1126 / 800;
    width: 100%;
    mask-image: url("/system_panel/uploads/images/vision-mask.png");
    -webkit-mask-image: url("/system_panel/uploads/images/vision-mask.png");
    mask-size: 100% 100%;
    mask-repeat: no-repeat;
    transform: rotate(-24.56deg);
    &:not(:first-child) {
      margin-top: -23%;
    }
  }
}

.vision-card-image {
  position: relative;
  aspect-raito: 16 / 9;
  width: 100%;
  & img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    box-shadow: var(--elevation-2);
  }
  @media (min-width: 1024px) {
    width: 41.1764705882%;
    &::before {
      content: "";
      background-image: linear-gradient(to right, #333 50%, transparent 50%);
      background-size: 16px 1px;
      background-repeat: repeat-x;
      height: 1px;
      position: absolute;
    }
    &.vision-card-image--1 {
      &::before {
        width: 14rem;
        transform: rotate(35deg);
        top: -3rem;
        left: -15rem;        
      }
    }
    &.vision-card-image--2 {
      &::before {
        width: 7.5rem;
        transform: rotate(-32deg);
        top: -2rem;
        right: -9rem;        
      }
    }
    &.vision-card-image--3 {
      &::before {
        width: 6.25rem;
        transform: rotate(30deg);
        top: -1rem;
        left: -10rem;        
      }
    }
  }
  @media (min-width: 1200px) {
    &.vision-card-image--1 {
      &::before {
        width: 25rem;
        top: -5rem;
        left: -25rem;        
      }
    }
    &.vision-card-image--2 {
      &::before {
        width: 11.375rem;
        top: -1rem;
        right: -13rem;        
      }
    }
    &.vision-card-image--3 {
      &::before {
        width: 12.25rem;
        top: 1rem;
        left: -15rem;        
      }
    }
  }
}

.button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  line-height: 1.25;
  letter-spacing: 0.04em;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ink);
  transition: all ease 200ms;
  &::before {
    content: "";
    aspect-ratio: 34 / 22;
    width: 2.125rem;
    background-image: url("/system_panel/uploads/images/button-dec.svg");
    background-size: 100% 100%;
    background-repeat: no-repeat;
  }
  & > p {
    padding: 0.25rem 0.25rem 0.125rem 0.25rem;
    border-bottom: 1px solid var(--ink);
  }
  &:hover {
    text-decoration: none;
    opacity: 85%;
    transform: scale(0.95);
    color: var(--ink);
  }
  
  &.button--snow {
    color: var(--snow);
    &::before {
      background-image: url("/system_panel/uploads/images/button-dec-snow.svg");
    }
    & > p {
      border-color: var(--snow);
    }
    &:hover {
      color: var(--snow);
    }
  }
  
  &.formBtn {
    &::after {
      content: "";
      height: 1px;
      width: calc(100% - 2.125rem - 0.625rem + (0.25rem * 2));
      background-color: var(--ink);
      position: absolute;
      bottom: -0.125rem;
      left: 2.5rem;
    }
  }
}

.about-bg-band {
  width: 113.75%;
  min-width: 80rem;
  aspect-ratio: 1920 / 785;
  position: absolute;
  background-image: url("/system_panel/uploads/images/grad-band.svg");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  
  &.about-bg-band--1 {
    transform: rotate(202deg);
    top: -11rem;
    left: -9%;
  }
  &.about-bg-band--2 {
    transform: rotate(6deg);
    top: -14rem;
    left: -10%;
  }
  &.about-bg-band--3 {
    transform: rotate(202deg);
    bottom: -14rem;
    left: -9%;
  }
}

.footer-slider {
  width: 100%;
  position: absolute;
  inset: 0;
  &::after {
    pointer-events: none;
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    background-color: #1424AD;
    opacity: 25%;
  }
  & .swiper-wrapper {
    transition-timing-function: linear;
  }
  & .swiper-slide {
    width: 30rem;
    & img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }
}

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

.footer-logo {
  width: 100%;
  max-width: 17.8125rem;
  & img {
    width: 100%;
  }
  @media (min-width: 768px) {
    position: absolute;
    right: 0;
    bottom: 0;
    max-width: 28rem;
  }
  @media (min-width: 1200px) {
    max-width: 26.25rem;
  }
}

.news-list {
  & .webgene-blog {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
}

.category-list {
  & .webgene-blog {
    padding: 0.5rem 0;
    & .webgene-item a {
      display: block;
      text-align: center;
      padding: 0.75rem 0;
      transition: opacity 200ms ease;
      &:hover {
        opacity: 0.85;
        text-decoration: none;
      }
    }
  }
}

.services-index-link {
  position: relative;
  padding-block: 3rem;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.06)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.12));
  &::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: var(--cream); 
    clip-path: polygon(0% 0%, 90% 0%, 100% 100%, 10% 100%);
    z-index: -1;
  }
  & p {
    position: relative;
    line-height: 1.25;
    font-weight: 700;
    font-size: 0.875rem;
    text-align: center;
  }
  & img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    opacity: 30%;
    object-fit: cover;
    clip-path: polygon(0% 0%, 90% 0%, 100% 100%, 10% 100%);
    transition: opacity ease 200ms;
  }
  &:hover {
    text-decoration: none;
    & img {
      opacity: 70%;
    }
  }
  @media (min-width: 768px) {
    font-size: 1rem;
  }
  @media (min-width: 1200px) {
    font-size: 1.125rem;
  }
  
  &.services-index-link--sanyoshikai {
    &::before {
      background-color: var(--snow);
      transition: opacity ease 200ms;
    }
    & img {
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      object-fit: contain;
      clip-path: none;
      width: 2.375rem;
    }
    &:hover::before {
      opacity: 90%;
    }
  }
}

.insta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  @media (min-width: 768px) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  & .webgene-item {

  }
}

.section-lines {
  pointer-events: none;
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
  &::before,
  &::after {
    content: "";
    position: absolute;
    aspect-ratio: 328 / 192;
    width: 20.5rem;
    background-image: linear-gradient(
      -149.7deg, 
      transparent calc(50% - 0.5px), 
      hsl(from var(--ink) h s l / 20%) calc(50% - 0.5px), 
      hsl(from var(--ink) h s l / 20%) calc(50% + 0.5px), 
      transparent calc(50% + 0.5px)
    );
  }
  &::before {
    top: 0;
    right: 0;
  }
  &::after {
    bottom: 0;
    left: 0;
    transform: scale(-1);
  }
  & .section-lines__center {
    height: 1px;
    width: 120rem;
    background-color: var(--ink);
    opacity: 20%;
    position: absolute;
    top: calc(50% - 2.5rem);
    left: 50%;
    transform-origin: center center;
    transform: translate(-50%, -50%) rotate(30deg);
  }
}

.filtered-bg-image {
  position: absolute;
  inset: 0;
  &::after {
    pointer-events: none;
    content: "";
    position: absolute;
    inset: 0;
  }
  & img {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
  &.filtered-bg-image--ink-alpha-60 {
    &::after {
      background-color: var(--ink);
      opacity: 60%;
    }
  }
}





