*,
*::before,
*::after {
  min-width: 0px;
  min-height: 0px;
}

body {
  font-family: var(--font-serif);
  color: var(--ink);
  background-color: #F0F0EE;
  background-image: var(--paper);
  letter-spacing: 0.12em;
}

#root {
  max-width: 1920px;
  margin: 0 auto;
}

p, h1, h2, h3, h4, h5, h6 {
  margin: 0;
}
h1, h2, h3, h4, h5, h6 {
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: 0.12em;
}

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;
        &:hover {
          text-decoration: none;
        }
      }

      &.selected {
        & a {
          &:hover {}
        }
      }
    }
  }
}

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

.thumbnail {
  position: relative;
  padding-top: 75%;

  &.thumbnail--16x9 {
    padding-top: 56.25%;
  }

  & 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%;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  position: relative;
  border: 1px solid var(--ink);
  background-color: var(--ink);
  padding: 0 3rem;
  height: 3.875rem;
  min-width: 15.625rem;
  cursor: pointer;
  transition: all 250ms ease;
  line-height: 1;
  text-align: center;
  z-index: 1;
  color: var(--ink);
  font-weight: 400;
  
  &:hover {
    opacity: 0.85;
    text-decoration: none;
  	color: var(--ink);
  }
  
  &::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    background-color: var(--snow);
    border-radius: 0.25rem;
    z-index: -1;
  }
  & > * {
    position: relative;
  }
  & > div {
    flex: 1 0 0%;
  }
}

.hero-title {
  margin-top: -0.75rem;
  font-size: 2rem;
  line-height: 1.25;
  
  @media screen and (min-width: 768px) {
    font-size: 2.25rem;
    margin-top: -1.75rem;
  }
  @media screen and (min-width: 1024px) {
    font-size: 3rem;
    margin-top: -2.25rem;
  }
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2rem;
  justify-content: center;
}
.case-list {
  & .webgene-blog {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    @media screen and (min-width: 1024px) {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
  }
  
  & .webgene-no-items & .webgene-pagination {
    grid-column: span 2 / span 2;

    @media screen and (min-width: 1024px) {
      grid-column: span 4 / span 4;
    }
  }
}

.item-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  
  & .item-image img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
  }
  @media screen and (min-width: 1024px) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.engraving-shadow {
  box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.04) inset, 0px 2px 6px 0px rgba(0, 0, 0, 0.08) inset;
}

.floating-shadow {
  box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.04), 0px 2px 6px 0px rgba(0, 0, 0, 0.08);
}

.floating-shadow-2 {
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.08), 0px 16px 24px 0px rgba(0, 0, 0, 0.04);
}

.when-to-choose-us {
  position: absolute;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
}

.our-order-process {
  position: absolute;
  top: 5rem;
  right: 4.375rem;
}

.sepia-filter {
  position: relative;
  
  & img {
    width: 100%;
    object-fit: cover;
  }
  
  &::after {
    content: "";
    width: 100%;
    height: 100%;
    background-color: hsl(from #7F2F00 h s l / 12% );
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
  }
}

.service-flow {
  counter-reset: flow;
  display: flex;
  flex-direction: column;
  
  @media screen and (min-width: 1024px) {
    flex-direction: row;
    flex-wrap: wrap;
    margin-left: 3.125rem;
    row-gap: 1.5rem;
  }
  
  & .service-flow__item {
    color: var(--ink);
    position: relative;
    counter-increment: flow;
    padding: 5rem 1.5rem;
    background-image: url("/system_panel/uploads/images/flow-polygon--mobile.png");
    background-size: 100% 100%;
    min-height: 20rem;
    
    &:first-child {
      background-image: url("/system_panel/uploads/images/flow-polygon-start--mobile.png");
      padding-top: 2.5rem;
    }
    &:last-child {
      background-image: url("/system_panel/uploads/images/flow-polygon-end--mobile.png");
      padding-bottom: 2.5rem;
    }
    
    & + .service-flow__item {
      margin-top: -3.125rem;
    }
    
    @media screen and (min-width: 768px) {
      padding: 7.5rem 5rem;
    }
    @media screen and (min-width: 1200px) {
      width: 20rem;
      margin-left: -3.125rem;
      min-height: 23.75rem;
      & + .service-flow__item {
        margin-top: 0;
      }
    
      background-image: url("/system_panel/uploads/images/flow-polygon.png");
      padding: 3.75rem 3rem 0 5.25rem;
      &:first-child {
        background-image: url("/system_panel/uploads/images/flow-polygon-start.png");
        padding: 3.75rem 3.75rem 0 2.5rem;
      }
      &:last-child {
        background-image: url("/system_panel/uploads/images/flow-polygon-end.png");
        padding: 3.75rem 1.25rem 0 5.25rem;
      }
    }
  }
  & .service-flow__num {
    &::before {
      content: "STEP " counter(flow);
      font-size: 0.75rem;
      font-weight: 700;
    }
    
    & > h3 {
      font-weight: 700;
    }
  }
}

.equipment {
  position: absolute;
  top: -2.5rem;
  left: 8rem;
}

.swiper {
  &:not(.swiper-initialized) {
    & .swiper-wrapper {
      display: flex;
      overflow-x: auto;
    }
    & .swiper-slide {
    }
  }
}
