/* ==========================================
   NedDev SOTA Polish CSS — animations, reveals, hover-magic
   Loaded after design-specific CSS
   ========================================== */

/* ── PAGE ENTRY ── */
body{
  transition: opacity .8s cubic-bezier(.2,.9,.2,1);
}
body.page-loading{opacity:0}
body.page-loaded{opacity:1}

/* ── REVEAL CINEMATIC (data-reveal) ── */
[data-reveal]{
  opacity:0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(.2,.9,.2,1), transform 1.2s cubic-bezier(.2,.9,.2,1);
  will-change: opacity, transform;
}
[data-reveal].is-visible{
  opacity:1;
  transform: translateY(0);
}
[data-reveal][data-delay="1"]{transition-delay:.1s}
[data-reveal][data-delay="2"]{transition-delay:.2s}
[data-reveal][data-delay="3"]{transition-delay:.3s}
[data-reveal][data-delay="4"]{transition-delay:.4s}
[data-reveal][data-delay="5"]{transition-delay:.5s}

/* ── IMAGE REVEAL (clip-path) ── */
[data-reveal-image]{
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.6s cubic-bezier(.7,0,.2,1);
}
[data-reveal-image].is-visible{
  clip-path: inset(0 0 0 0);
}

/* ── WORK CARD HOVER MAGIC ── */
.work-card, .work-tile {
  transition: transform .5s cubic-bezier(.2,.9,.2,1);
}
.work-card:hover{transform:translateY(-4px)}

/* Smooth image zoom on hover */
.work-card .work-image img,
.work-tile img {
  transition: transform 1.4s cubic-bezier(.2,.9,.2,1), filter .8s ease;
}

/* ── MAGNETIC CTA — done via JS, ease here ── */
[data-magnetic]{
  display:inline-flex;
}

/* ── SPLIT TEXT (data-split) ── */
.split-word{vertical-align:bottom}

/* ── SCROLL TICKER PAUSE on hover ── */
.marquee-pause:hover{cursor:default}

/* ── BUTTON HOVER ENHANCED ── */
a, button{transition: color .25s ease, background .25s ease, transform .25s ease}

/* ── IMAGE LOADING SHIMMER ── */
img{transition: opacity .5s ease}
img:not([src])::before, img[src=""]::before{
  content:"";display:block;width:100%;height:100%;
  background:linear-gradient(90deg, rgba(0,0,0,0.04), rgba(0,0,0,0.08), rgba(0,0,0,0.04));
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer{
  0%{background-position:200% 0}
  100%{background-position:-200% 0}
}

/* ── HORIZONTAL LINE REVEAL ── */
.line-reveal{
  position:relative;
}
.line-reveal::after{
  content:"";position:absolute;left:0;bottom:0;
  height:1px;width:0;background:currentColor;
  transition: width 1.2s cubic-bezier(.7,0,.2,1);
}
.line-reveal.is-visible::after{width:100%}

/* ── INSTAGRAM-STYLE NUMBER COUNTER ── */
[data-counter]{font-variant-numeric:tabular-nums}

/* ── SECTION TRANSITIONS — soft enter on scroll ── */
section, .section{
  position:relative;
}
section.section-enter, .section.section-enter{
  animation: sectionEnter 1.1s cubic-bezier(.2,.9,.2,1) both;
}
@keyframes sectionEnter{
  0%{opacity:.4;transform:translateY(18px)}
  100%{opacity:1;transform:translateY(0)}
}

/* ── DRAG CURSOR CUE (BASIC/DEPT signature) ── */
.drag-cursor{
  position:fixed;top:0;left:0;z-index:9998;
  pointer-events:none;
  transform:translate(-50%,-50%) scale(.4);
  opacity:0;
  width:96px;height:96px;border-radius:50%;
  background:#0A0A0A;color:#fff;
  display:flex;align-items:center;justify-content:center;
  font-family:'JetBrains Mono','Roboto Mono',monospace;
  font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;
  mix-blend-mode:difference;
  transition:opacity .25s ease, transform .35s cubic-bezier(.2,.9,.2,1);
  will-change:transform, opacity;
}
.drag-cursor.is-active{opacity:1;transform:translate(-50%,-50%) scale(1)}
.drag-cursor span{display:block}
.drag-cursor .ring{position:absolute;inset:0;border:1px solid rgba(255,255,255,.4);border-radius:50%;animation:dragRing 2.2s linear infinite}
@keyframes dragRing{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}

/* Areas marked draggable get cursor:none on desktop only */
@media(hover:hover) and (pointer:fine){
  [data-drag-area]:hover{cursor:none}
  [data-drag-area]:hover *{cursor:none!important}
}

/* ── REDUCED MOTION RESPECT ── */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
    scroll-behavior:auto!important;
  }
  [data-reveal]{opacity:1!important;transform:none!important}
  [data-reveal-image]{clip-path:inset(0)!important}
}
