/* Land Booster: task 1 + task 2 overrides */

.lb-opening {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: #fff;
  color: #696969;
  pointer-events: auto;
  animation: lb-opening-fade 0.9s ease 5.1s forwards;
}

.lb-opening.is-finished {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.is-opening-skipped .lb-opening {
  display: none;
}

.lb-opening__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lb-opening__text {
  overflow: hidden;
  margin: 0;
  font-size: clamp(2.4rem, 2vw, 2.8rem);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.1em;
  color: #696969;
}

.lb-opening__text span {
  display: block;
  clip-path: inset(0 100% 0 0);
  animation: lb-opening-text-reveal 2s cubic-bezier(0.3, 0, 0, 0.3) 0.3s forwards;
}

.lb-opening__line {
  position: relative;
  width: 100vw;
  height: 1px;
  margin-top: 28px;
  overflow: hidden;
  background: rgba(105, 105, 105, 0.16);
}

.lb-opening__line span {
  position: absolute;
  inset: 0;
  display: block;
  background: #696969;
  transform: scaleX(0);
  transform-origin: left center;
  animation: lb-opening-line-reveal 2.6s cubic-bezier(0.76, 0, 0.24, 1) 0.35s forwards;
}

@keyframes lb-opening-text-reveal {
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes lb-opening-line-reveal {
  to {
    transform: scaleX(1);
  }
}

@keyframes lb-opening-fade {
  to {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lb-opening {
    animation-duration: 0.25s;
    animation-delay: 1.2s;
  }

  .lb-opening__text span {
    animation-duration: 0.8s;
    animation-delay: 0.1s;
  }

  .lb-opening__line span {
    animation-duration: 0.8s;
    animation-delay: 0.1s;
  }
}

.container.is-free-scroll {
  scroll-snap-type: none;
}

.section.s7 {
  background: #fff;
  color: #8d8d8d;
  height: auto;
  min-height: 100dvh;
  scroll-snap-stop: normal;
}

.section.s7 .wrap {
  min-height: 100dvh;
}

.section.s7 .slide_contents {
  height: auto;
  min-height: 100dvh;
  padding: clamp(120px, 12vh, 160px) 0 120px;
  box-sizing: border-box;
  justify-content: center;
}

.container > footer {
  background: #fff;
  color: #2b210a;
  scroll-snap-align: none;
  scroll-snap-stop: normal;
  margin-top: 80px;
}

header {
  transition:
    background-color 0.25s ease,
    box-shadow 0.25s ease;
}

header .logo1 img,
header .menu1 > li > a span,
header #menu_button > div > div {
  transition:
    color 0.25s ease,
    filter 0.25s ease,
    background-color 0.25s ease;
}

header.on .menu1 > li > a span {
  color: #2b210a;
}

@media screen and (max-width: 840px) {
  .section.s7 .slide_contents {
    padding: 110px 0 90px;
    justify-content: flex-start;
  }
}

/* FLOW chart vertical image */
@media screen and (max-width: 1024px) {
  .section.s4 {
    height: auto;
    min-height: 100dvh;
    scroll-snap-stop: normal;
  }

  .section.s4 .wrap {
    min-height: 100dvh;
    padding-top: 96px;
    padding-bottom: 72px;
  }

  .section.s4 .slide_contents {
    height: auto;
    min-height: 0;
    padding: 0;
    justify-content: flex-start;
  }

  .section.s4 .chart-area1 {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .section.s4 .chart-area1 picture {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 381px;
    margin: 0 auto;
  }

  .section.s4 .chart-area1 img {
    width: auto;
    max-width: 100%;
    height: auto;
  }

  .section.s4 .slide_ttl {
    position: static;
    margin-top: 48px;
  }
}

@media screen and (max-width: 480px) {
  .section.s4 .wrap {
    padding-top: 80px;
    padding-bottom: 56px;
  }

  .section.s4 .slide_ttl {
    margin-top: 36px;
  }
}

/* Task 3: horizontal flow from s1 to s6 on desktop */
@media screen and (min-width: 1025px) {
  .container.is-horizontal-ready {
    scroll-snap-type: none;
  }

  .lb-horizontal-flow {
    position: relative;
    height: calc(var(--lb-panel-count, 6) * 100dvh);
    scroll-snap-align: start;
  }

  .lb-horizontal-sticky {
    position: sticky;
    top: 0;
    height: 100dvh;
    overflow: hidden;
  }

  .lb-horizontal-track {
    display: flex;
    width: max-content;
    height: 100%;
    transform: translate3d(0, 0, 0);
    will-change: transform;
  }

  .lb-horizontal-track > .section {
    position: relative;
    width: 100vw;
    height: 100dvh;
    flex: 0 0 100vw;
    scroll-snap-align: none;
    scroll-snap-stop: normal;
  }

  .lb-horizontal-track > .section > .wrap {
    height: 100%;
  }

  .lb-horizontal-track .slide_contents {
    height: 100dvh;
  }

  .container.is-horizontal-ready .lb-horizontal-next {
    position: absolute;
    right: 80px;
    bottom: 80px;
    z-index: 20;
    display: block;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.86);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
  }

  .container.is-horizontal-ready .lb-horizontal-next::before {
    position: absolute;
    inset: 0;
    content: "";
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.22);
    animation: lb-horizontal-ripple 3s infinite;
  }

  .container.is-horizontal-ready .lb-horizontal-next span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 13px;
    height: 13px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    transform: translate(-62%, -50%) rotate(45deg);
  }

  .container.is-horizontal-ready .lb-horizontal-next:hover::before,
  .container.is-horizontal-ready .lb-horizontal-next:focus-visible::before {
    animation-play-state: paused;
  }

  .container.is-horizontal-ready .lb-horizontal-next:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 4px;
  }
}

.lb-horizontal-next {
  display: none;
}

@keyframes lb-horizontal-ripple {
  0% {
    opacity: 0;
  }

  30% {
    opacity: 1;
  }

  60% {
    box-shadow: 0 0 0 28px rgba(255, 255, 255, 0);
    opacity: 0;
  }

  100% {
    opacity: 0;
  }
}

@media screen and (min-width: 1025px) and (max-width: 1200px) {
  .container.is-horizontal-ready .lb-horizontal-next {
    right: 48px;
    bottom: 20px;
  }
}

@media screen and (min-width: 1025px) and (max-height: 680px) {
  .container.is-horizontal-ready .lb-horizontal-next {
    right: 48px;
    bottom: 20px;
    width: 48px;
    height: 48px;
  }
}

/* Short viewport adjustment */
@media screen and (min-width: 841px) and (max-height: 680px) {
  .section.s3 .slide_contents,
  .section.s6 .slide_contents {
    box-sizing: border-box;
    justify-content: flex-start;
    padding-top: clamp(72px, 13vh, 96px);
    padding-bottom: clamp(128px, 20vh, 152px);
  }

  .section.s3 .slide_contents h2,
  .section.s6 .slide_contents h2 {
    margin-bottom: 20px;
  }

  .section.s3 .slide_contents p,
  .section.s6 .slide_contents p {
    font-size: 1.6rem;
    line-height: 2.05;
  }

  .section.s3 .field_block {
    align-items: center;
    gap: 48px;
  }

  .section.s3 .field-r {
    max-width: min(35vw, 400px);
  }

  .section.s3 .business-head {
    margin-bottom: 24px;
  }

  .section.s3 .business-head p {
    font-size: 3.2rem;
    line-height: 1;
    margin-bottom: 10px;
  }

  .section.s2 .slide_ttl .en-ttl,
  .section.s3 .slide_ttl .en-ttl,
  .section.s4 .slide_ttl .en-ttl,
  .section.s5 .slide_ttl .en-ttl,
  .section.s6 .slide_ttl .en-ttl {
    font-size: clamp(9rem, 15vh, 11rem);
    margin-right: 28px;
  }

  .section.s3 .slide_ttl .jp-ttl,
  .section.s2 .slide_ttl .jp-ttl,
  .section.s4 .slide_ttl .jp-ttl,
  .section.s5 .slide_ttl .jp-ttl,
  .section.s6 .slide_ttl .jp-ttl {
    font-size: 1.8rem;
  }
}

@media screen and (min-width: 841px) and (max-height: 620px) {
  .section.s3 .slide_contents,
  .section.s6 .slide_contents {
    padding-top: 72px;
    padding-bottom: 130px;
  }

  .section.s3 .slide_contents p,
  .section.s6 .slide_contents p {
    font-size: 1.45rem;
    line-height: 1.95;
  }

  .section.s3 .field_block {
    gap: 36px;
  }

  .section.s3 .field-r {
    max-width: min(32vw, 360px);
  }

  .section.s3 .business-head p {
    font-size: 2.8rem;
  }

  .section.s3 .slide_ttl .en-ttl,
  .section.s6 .slide_ttl .en-ttl {
    font-size: clamp(8rem, 14vh, 9rem);
  }
}
