/* Haraweb visual system: image composition, page entrance and gentle scroll reveals. */
body::before {
  content: "";
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 1000;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #00c4f5, #62dfff 70%, transparent);
  box-shadow: 0 0 14px #00c4f5;
  pointer-events: none;
  animation: page-load-line 900ms cubic-bezier(.22,.75,.24,1) 80ms forwards;
}

.hero {
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
}

.hero-image {
  position: absolute;
  z-index: -2;
  inset: 0 0 0 auto;
  width: 84%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: .88;
  mask-image: linear-gradient(90deg, transparent 0%, #000 34%);
  animation: hero-image-in 1.2s cubic-bezier(.2,.7,.2,1) both;
}

.hero::after {
  z-index: -1;
  left: 28%;
  top: 28%;
  width: 44vw;
  height: 34vw;
  max-width: 650px;
  max-height: 420px;
}

.hero-copy {
  width: min(760px, 68vw);
  margin-left: clamp(32px, 9vw, 138px);
  text-align: left;
}

.hero h1 {
  max-width: 760px;
  text-wrap: balance;
}

.hero p {
  max-width: 480px;
}

.hero-copy > * {
  animation: hero-copy-in 700ms cubic-bezier(.2,.7,.2,1) both;
}

.hero-copy > :nth-child(1) { animation-delay: 80ms; }
.hero-copy > :nth-child(2) { animation-delay: 160ms; }
.hero-copy > :nth-child(3) { animation-delay: 240ms; }
.hero-copy > :nth-child(4) { animation-delay: 320ms; }

.service {
  overflow: hidden;
}

.service-image {
  display: block;
  width: calc(100% + 60px);
  height: auto;
  aspect-ratio: 16 / 9;
  margin: -35px -30px 22px;
  object-fit: cover;
  background: #071827;
  transition: transform 650ms cubic-bezier(.2,.7,.2,1), filter 650ms ease;
}

.service:hover .service-image {
  transform: scale(1.035);
  filter: saturate(1.08);
}

.service-icon {
  font-size: 26px;
  margin-bottom: 18px;
}

.project {
  isolation: isolate;
  padding: 0;
  background: #061625;
}

.project::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, #020e1c12 15%, #020e1c30 44%, #020e1cf2 100%);
  pointer-events: none;
}

.project-image {
  position: absolute;
  z-index: -2;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 800ms cubic-bezier(.2,.7,.2,1), filter 800ms ease;
}

.project:hover .project-image {
  transform: scale(1.055);
  filter: saturate(1.08);
}

.project-content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 26px;
}

.project-content small {
  color: #bdeeff;
  font-size: 8px;
  letter-spacing: 1.8px;
}

.project-content h3 {
  margin: 14px 0 20px;
  color: #fff;
  font-size: clamp(26px, 2.2vw, 34px);
  text-shadow: 0 2px 22px #00101e70;
}

.project-content > span {
  font-size: 9px;
  color: #e5f7ff;
}

.project-caption span {
  text-align: right;
}

.has-reveal .reveal {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity 650ms ease var(--reveal-delay, 0ms), transform 650ms cubic-bezier(.2,.7,.2,1) var(--reveal-delay, 0ms);
}

.has-reveal .reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@keyframes page-load-line {
  0% { transform: scaleX(0); opacity: 1; }
  72% { transform: scaleX(.84); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}

@keyframes hero-image-in {
  from { opacity: .2; transform: scale(1.035); }
  to { opacity: .88; transform: scale(1); }
}

@keyframes hero-copy-in {
  from { opacity: 0; transform: translate3d(0, 16px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@media (max-width: 800px) {
  .hero {
    justify-content: center;
    text-align: center;
  }

  .hero-image {
    width: 100%;
    opacity: .56;
    object-position: 60% center;
    mask-image: linear-gradient(90deg, #0008, #000 45%, #0008);
  }

  .hero-copy {
    width: min(680px, 100%);
    margin: 0;
    padding: 0 24px;
    text-align: center;
  }

  .hero p {
    margin-inline: auto;
  }

  .service-image {
    width: calc(100% + 52px);
    margin: -26px -26px 20px;
  }

  .project-content {
    padding: 22px;
  }
}

@media (max-width: 440px) {
  .hero-image {
    object-position: 63% center;
    opacity: .5;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  .hero-image,
  .hero-copy > * {
    animation: none !important;
  }

  body::before { display: none; }

  .has-reveal .reveal,
  .has-reveal .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .service-image,
  .project-image {
    transition: none;
  }
}
