/* Variant B — showy motion */

.hero-line { display: block; }

/* Typing effect: chars pre-rendered invisible (no layout shift), revealed in sequence */
.ch { opacity: 0; }
.ch.on { opacity: 1; }
.caret {
  display: inline-block;
  width: .06em; min-width: 2px; height: .82em;
  background: var(--bone);
  margin-left: .08em;
  vertical-align: -0.04em;
}
.caret.blink { animation: caret-blink 1s step-end infinite; }
@keyframes caret-blink { 50% { opacity: 0; } }

/* Scroll reveal with slightly bigger travel */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.22, 1, .36, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal.delay-2 { transition-delay: .35s; }
.reveal.delay-3 { transition-delay: .5s; }

/* Service rows slide in from alternating sides */
.service-row.reveal { transform: translateY(0) translateX(-40px); }
.service-row.reveal:nth-child(even) { transform: translateY(0) translateX(40px); }
.service-row.reveal.is-visible { transform: none; }

/* Parallax + float on the Rimba phone */
.phone, .laptop {
  will-change: transform;
}
.phone {
  animation: phone-float 6s ease-in-out infinite;
}
@keyframes phone-float {
  0%, 100% { box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
  50% { box-shadow: 0 40px 80px rgba(0, 0, 0, .55); }
}

/* Decoding mono labels get a caret while scrambling */
.eyebrow.decoding::after, .hero-meta.decoding::after {
  content: '▌'; animation: caret-blink .7s step-end infinite;
}

/* Magnetic CTA */
.btn-mail { will-change: transform; }

/* Cursor glitter canvas (desktop, fine pointers only) */
.glitter {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 2; /* motes float above content but never intercept clicks */
}

/* Contour-line signature behind the contact section */
.contour {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; opacity: .55;
}
.contour path {
  fill: none; stroke: #262420; stroke-width: 1.5;
  stroke-dasharray: 2400; stroke-dashoffset: 2400;
}
.contact.is-visible .contour path { animation: draw 3.2s ease-out forwards; }
.contact.is-visible .contour path:nth-child(2) { animation-delay: .3s; }
.contact.is-visible .contour path:nth-child(3) { animation-delay: .6s; }
.contact.is-visible .contour path:nth-child(4) { animation-delay: .9s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Workshop pager crossfade */
.device-slide, .workshop-slide {
  opacity: 0;
  transition: opacity .45s ease, visibility 0s .45s;
}
.device-slide.is-active, .workshop-slide.is-active {
  opacity: 1;
  transition: opacity .45s ease .1s, visibility 0s;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ch { opacity: 1; }
  .caret, .glitter { display: none; }
  .reveal, .service-row.reveal, .service-row.reveal:nth-child(even) { opacity: 1; transform: none; transition: none; }
  .phone { animation: none; }
  .device-slide, .workshop-slide { transition: none; }
  .contour path { stroke-dashoffset: 0; animation: none !important; }
}
