/* 3.0: depth and motion, layered over the original artistic portfolio. */
html { scroll-padding-top: 100px; }
.hero { isolation: isolate; }
.hero-content { transform: perspective(1400px) rotateY(var(--scene-text-turn, 0deg)); transform-origin: left center; }
.hero-title { text-shadow: 1px 1px 0 rgba(40,84,184,.12), 3px 3px 0 rgba(40,84,184,.09), 8px 14px 24px rgba(40,50,75,.12); }
.hero-portrait {
  transform: perspective(1100px) translate3d(var(--scene-x, 0px), var(--scene-y, 0px), 0) rotateY(var(--scene-turn, -5deg)) rotateZ(-1deg);
  box-shadow: 10px 14px 0 rgba(40,84,184,.18), 22px 36px 60px rgba(23,39,73,.24);
}
.hero-paint { transform: translate3d(var(--scene-back-x, 0px), var(--scene-back-y, 0px), 0) rotate(var(--paint-angle, 0deg)); filter: drop-shadow(0 18px 14px rgba(33,36,65,.18)); }
.paint-a { --paint-angle: -9deg; }
.paint-b { --paint-angle: 8deg; }
.paint-c { box-shadow: inset 12px 12px 26px rgba(255,255,255,.28), inset -14px -20px 32px rgba(57,23,68,.2), 0 20px 30px rgba(40,40,65,.16); }
.motion-enabled .hero-portrait { animation: portrait-float 7s ease-in-out infinite; }
.motion-enabled .paint-a { animation: paint-float 9s ease-in-out infinite; }
.motion-enabled .paint-b { animation: paint-float 11s ease-in-out -4s infinite reverse; }
.motion-enabled .paint-c { animation: orb-float 8s ease-in-out -2s infinite; }
@keyframes portrait-float { 0%,100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes paint-float { 0%,100% { translate: 0 0; } 50% { translate: 8px -16px; } }
@keyframes orb-float { 0%,100% { translate: 0 0; rotate: 0deg; } 50% { translate: -10px 18px; rotate: 8deg; } }

/* Compose the existing artwork offsets with an independent perspective tilt. */
.depth-card {
  --rest-y: 0px; --rest-z: 0deg; --tilt-x: 0deg; --tilt-y: 0deg; --card-lift: 0px;
  transform: perspective(1200px) translateY(calc(var(--rest-y) + var(--card-lift))) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) rotateZ(var(--rest-z));
  transition: transform .45s cubic-bezier(.2,.75,.25,1), box-shadow .45s;
  transform-origin: center;
}
.practice-item.depth-card:nth-child(2) { --rest-y: 30px; }
.video-card.depth-card:nth-child(1) { --rest-z: -1deg; }
.video-card.depth-card:nth-child(2) { --rest-y: 24px; --rest-z: .7deg; }
.video-card.depth-card:nth-child(3) { --rest-z: -.5deg; }
.still.depth-card:nth-child(3n+1) { --rest-z: -.45deg; }
.still.depth-card:nth-child(3n+2) { --rest-z: .4deg; }
.depth-card.is-tilting { --card-lift: -7px; transition-duration: .12s; box-shadow: 0 28px 48px rgba(28,35,60,.2); }
.about-art.depth-card { box-shadow: 12px 16px 0 rgba(22,184,189,.24), 0 26px 46px rgba(25,63,77,.15); }
.film-heading img.depth-card { box-shadow: 12px 16px 0 rgba(255,85,61,.22), 0 26px 46px rgba(37,44,62,.16); }
.serial-art { box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 22px 45px rgba(22,77,91,.15); }
.serial-art img.depth-card { box-shadow: 0 18px 35px rgba(15,68,75,.25); }
.film { transition: color .25s, background .25s, padding .25s, transform .3s; }
.motion-enabled .film:hover { transform: perspective(1000px) rotateY(-1deg) translateX(4px); }
.film-arrow { transition: transform .3s; }
.film:hover .film-arrow { transform: translate(3px,-3px); }
.large-play, .play i { box-shadow: 0 8px 22px rgba(20,25,43,.12); }
.motion-enabled .large-play { animation: play-pulse 3s ease-in-out infinite; }
@keyframes play-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,255,255,.16); } 50% { box-shadow: 0 0 0 14px rgba(255,255,255,0); } }
.whatsapp-main, .whatsapp-cta { box-shadow: 0 5px 0 rgba(18,49,47,.17), 0 12px 25px rgba(25,40,49,.12); transition: background .25s, color .25s, transform .25s; }
.whatsapp-main:hover, .whatsapp-cta:hover { transform: translateY(-3px); }

/* Visible by default. JavaScript opts only off-screen elements into reveals. */
.motion-enabled .motion-reveal { transition: opacity .7s ease, translate .8s cubic-bezier(.2,.75,.25,1), transform .45s cubic-bezier(.2,.75,.25,1), box-shadow .45s; transition-delay: var(--reveal-delay, 0ms), var(--reveal-delay, 0ms), 0ms, 0ms; }
.motion-enabled .motion-reveal.is-tilting { transition-duration: .7s, .8s, .12s, .45s; }
.motion-enabled .motion-reveal.is-pending { opacity: 0; translate: 0 32px; }
header::after { content: ''; position: absolute; bottom: -1px; left: 0; height: 3px; width: 100%; background: linear-gradient(90deg, #16b8bd, #ed4f8b); transform: scaleX(var(--page-progress, 0)); transform-origin: left; }
nav a[aria-current="location"]::after { right: 0; }
.motion-control { position: fixed; right: 20px; bottom: 20px; z-index: 10; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid rgba(117,219,229,.3); border-radius: 999px; background: rgba(13,23,41,.94); color: #fff; box-shadow: 0 6px 20px rgba(13,23,41,.18); cursor: pointer; font: 500 11px Manrope,sans-serif; }
.motion-control:hover { background: #28445c; }
.motion-control:focus-visible, a:focus-visible, .modal-close:focus-visible { outline: 3px solid #16b8bd; outline-offset: 5px; }
.motion-paused .hero-content, .motion-paused .hero-portrait, .motion-paused .hero-paint { transform: none; }
.motion-paused .hero-paint { transform: rotate(var(--paint-angle, 0deg)); }
.motion-paused .hero-portrait, .motion-paused .hero-paint, .motion-paused .large-play { animation: none; translate: none; rotate: none; }
.motion-paused .motion-reveal { opacity: 1; translate: none; }
@media (max-width: 700px) {
  .hero-portrait { transform: perspective(900px) rotateY(-5deg) rotateZ(-1deg); }
  .hero-title { text-shadow: 1px 1px 0 rgba(117,219,229,.25), 3px 3px 0 rgba(117,219,229,.12), 0 12px 30px rgba(0,0,0,.25); }
  .practice-item.depth-card:nth-child(2), .video-card.depth-card:nth-child(n), .still.depth-card:nth-child(n) { --rest-y: 0px; --rest-z: 0deg; }
  .motion-enabled .hero-portrait { animation-duration: 9s; }
  .motion-control { right: 12px; bottom: 12px; padding: 9px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-portrait, .hero-paint, .large-play { animation: none !important; translate: none !important; rotate: none !important; }
  .hero-content, .hero-portrait, .hero-paint, .depth-card, .film { transform: none !important; }
  .motion-reveal { opacity: 1 !important; translate: none !important; transition: none !important; }
  .depth-card, .film-arrow, .whatsapp-main, .whatsapp-cta { transition: none; }
  .motion-control { display: none; }
}
