/* Johnny mascot integration */

/* Native desktop cursor — a compact Johnny paw with its click point at the centre. */
@media (hover: hover) and (pointer: fine) {
  body, body * {
    cursor: url("assets/johnny/paw-cursor-real.cur") 16 16, auto !important;
  }
  body a, body button, body [role="button"] {
    cursor: url("assets/johnny/paw-cursor-real.cur") 16 16, pointer !important;
  }
  body :is(a, button, label, [role="button"], .reel, .step--johnny, .faq__q, .yt-facade, .toggle__btn, .vplay, .cutroom__mode-btn, .monitor__poster, .monitor__nav, .tl-track__head, .tl-clip, .bin-card):hover {
    cursor: url("assets/johnny/paw-cursor-hover.cur") 20 20, pointer !important;
  }
  body input, body textarea, body select, body [contenteditable="true"] {
    cursor: text !important;
  }
  body input[type="range"] { cursor: ew-resize !important; }
  body [disabled], body [aria-disabled="true"] { cursor: not-allowed !important; }
  html.is-cursor-pressing body, html.is-cursor-pressing body * {
    cursor: url("assets/johnny/paw-cursor-active.cur") 20 20, auto !important;
  }
}

/* Johnny guides the four workflow stages. */
.process--johnny {
  position: relative;
  isolation: isolate;
  gap: clamp(.7rem, 1.35vw, 1.15rem);
}
.step--johnny {
  position: relative;
  z-index: 1;
  min-width: 0;
  border: 0;
  padding: 0;
  gap: 1.15rem;
  align-content: start;
  cursor: none;
}
.step__visual {
  position: relative;
  aspect-ratio: 1 / 1;
  margin-top: 1rem;
  overflow: hidden;
  border: 2px solid var(--white);
  background:
    radial-gradient(circle at 72% 24%, rgba(255, 45, 45, .32), transparent 34%),
    linear-gradient(145deg, #f6f4ef 0%, #d8d5cf 100%);
  box-shadow: 7px 7px 0 rgba(255, 45, 45, .16);
  transition: box-shadow .35s var(--ease);
}
.step__visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(13,13,14,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13,13,14,.055) 1px, transparent 1px);
  background-size: 20px 20px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}
.step__visual::after {
  content: "";
  position: absolute;
  z-index: 1;
  width: 54%;
  aspect-ratio: 1;
  right: -18%;
  bottom: -24%;
  background: var(--red);
  transform: rotate(18deg);
  opacity: .9;
}
.step__visual::before,
.step__visual::after { pointer-events: none; }
.step__visual img {
  position: absolute;
  inset: 2%;
  z-index: 2;
  width: 96%;
  height: 96%;
  object-fit: contain;
  object-position: center center;
  transition: transform .55s var(--ease), filter .55s var(--ease);
  will-change: transform;
  filter: drop-shadow(0 14px 14px rgba(13, 13, 14, .24));
}

/* Keep the brief compact and a touch below exact center; all scenes share one baseline. */
.step--brief .step__visual img {
  inset: auto;
  top: 6%;
  left: 5%;
  width: 90%;
  height: 90%;
  object-position: center center;
}

.step--johnny:hover .step__visual img,
.step--johnny.is-current .step__visual img {
  transform: translateY(-1%) scale(1.02);
}
.step--johnny:hover .step__visual,
.step--johnny.is-current .step__visual {
  box-shadow: 7px 7px 0 rgba(255, 45, 45, .32), 0 0 24px rgba(255, 45, 45, .14);
}
.step__copy {
  display: grid;
  gap: .58rem;
  padding-right: .35rem;
}
.step--johnny .step__num {
  font-size: clamp(2rem, 3vw, 3rem);
}
.step__comment {
  position: absolute;
  z-index: 4;
  max-width: 78%;
  padding: .38rem .55rem;
  border-left: 3px solid var(--red);
  background: rgba(13, 13, 14, .92);
  color: var(--white);
  font-family: "Space Mono", "JetBrains Mono", monospace;
  font-size: clamp(.54rem, .7vw, .68rem);
  line-height: 1.2;
  box-shadow: 3px 3px 0 rgba(255, 45, 45, .25);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.step__comment b {
  color: var(--red);
  margin-right: .28rem;
}
.step__comment--one { top: 7%; left: 3%; }
.step__comment--two { right: 3%; bottom: 9%; transition-delay: .11s; }
.step--comments:hover .step__comment,
.step--comments.is-current .step__comment {
  opacity: 1;
  transform: none;
}
.step--delivery.is-current .step__visual {
  box-shadow: 7px 7px 0 rgba(255, 45, 45, .32), 0 0 24px rgba(255, 45, 45, .14);
}

/* A dedicated CTA stage makes Johnny part of the footer hierarchy. */
.footer__johnny {
  position: relative;
  max-width: var(--maxw);
  min-height: clamp(330px, 34vw, 450px);
  margin: 0 auto clamp(3rem, 7vw, 5.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, .88fr);
  overflow: hidden;
  border: 2px solid var(--white);
  background:
    linear-gradient(90deg, rgba(255,45,45,.08) 1px, transparent 1px),
    linear-gradient(rgba(255,45,45,.08) 1px, transparent 1px),
    var(--white);
  background-size: 28px 28px;
  color: var(--black);
}
.footer__johnny-copy {
  position: relative;
  z-index: 3;
  align-self: center;
  display: grid;
  justify-items: start;
  gap: 1.2rem;
  padding: clamp(2rem, 5vw, 4.5rem);
}
.footer__johnny-kicker {
  color: var(--red);
  font-family: "Space Mono", "JetBrains Mono", monospace;
  font-size: clamp(.66rem, 1vw, .82rem);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.footer__johnny h2 {
  max-width: 13ch;
  font-size: clamp(2rem, 4.4vw, 4.4rem);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: .92;
  text-transform: uppercase;
}
.footer__johnny-btn {
  box-shadow: 5px 5px 0 var(--black);
}
.footer__johnny-figure {
  position: relative;
  min-height: 100%;
}
.footer__johnny-figure::before {
  content: "";
  position: absolute;
  z-index: 0;
  width: min(33vw, 430px);
  aspect-ratio: 1;
  right: -6%;
  top: 50%;
  border-radius: 50%;
  background: var(--red);
  transform: translateY(-50%);
  box-shadow: 0 0 0 18px rgba(255, 45, 45, .13);
}
.footer__johnny-figure img {
  position: absolute;
  z-index: 2;
  right: -1%;
  bottom: -16%;
  width: min(38vw, 500px);
  height: 126%;
  object-fit: contain;
  object-position: right bottom;
  filter: drop-shadow(-16px 18px 18px rgba(13, 13, 14, .3));
  transition: transform .65s var(--ease);
}
.footer__johnny:hover .footer__johnny-figure img {
  transform: translateX(-2.5%);
}

@media (max-width: 980px) {
  .process--johnny {
    grid-template-columns: 1fr;
    gap: 2.4rem;
    padding-left: 0;
  }
  .step--johnny {
    grid-template-columns: minmax(250px, .8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: clamp(1.5rem, 5vw, 3rem);
  }
  .step__visual { width: 100%; margin-top: 0; }
}

@media (max-width: 700px) {
  .process--johnny {
    padding-left: calc(var(--pad) + 2.25rem);
  }
  .step--johnny {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .step__comment { font-size: .58rem; }
  .footer__johnny {
    min-height: 400px;
    grid-template-columns: minmax(0, 1fr) 42%;
  }
  .footer__johnny-copy {
    padding: 2rem 0 2rem 1.5rem;
  }
  .footer__johnny h2 { font-size: clamp(1.65rem, 8vw, 2.65rem); }
  .footer__johnny-figure::before {
    width: 230px;
    right: -45%;
  }
  .footer__johnny-figure img {
    right: -42%;
    width: 310px;
    height: 104%;
    bottom: -7%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .step__visual img,
  .step__comment,
  .footer__johnny-figure img { transition: none; }
}
