/* PumpChan — motion layer (first pass).
   Everything here is additive: delete this file and the page is the finished composition.
   - Hero entrance is CSS-only and plays once on load (fill-mode: backwards, so the
     resting state is always the normal style).
   - Section reveals are driven by [data-reveal] + .is-in (set by js/main.js).
     Hidden pre-states only apply while html.js is present and the fallback has not fired. */

:root {
  --ease-out: cubic-bezier(0.16, 0.84, 0.24, 1);
  --ease-cut: cubic-bezier(0.76, 0, 0.24, 1);
  --t-reveal: 0.95s;
  --t-draw: 2.2s;
}

/* SVG strokes that "draw": pathLength=1, dash 1 + gap 2 so the hidden state shows nothing. */
.draw { stroke-dasharray: 1 2; stroke-dashoffset: 0; }

/* ---------- 1. Hero entrance ---------- */
@keyframes pc-fade { from { opacity: 0; } }

@keyframes pc-rise {
  from { opacity: 0; transform: translateY(0.35em); clip-path: inset(100% 0 0 0); }
  to { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
}

@keyframes pc-wipe-x {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes pc-diag {
  from { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); transform: translateX(-0.15em); }
  to { clip-path: polygon(0 0, 130% 0, 100% 100%, 0 100%); transform: none; }
}

@keyframes pc-figure {
  from { opacity: 0; transform: translateY(28px) scale(0.985); }
}

@keyframes pc-draw { from { stroke-dashoffset: 1.5; } to { stroke-dashoffset: 0; } }

/* One-time bloom when the hero line finishes drawing: the "curve hint". */
@keyframes pc-bloom {
  0% { opacity: 0; }
  70% { opacity: 0.45; }
  84% { opacity: 1; }
  100% { opacity: 0.45; }
}

.hero__aux { animation: pc-fade 0.7s var(--ease-out) 0.1s backwards; }
.hero__title { animation: pc-rise 0.9s var(--ease-out) 0.18s backwards; }
.tagline__line--solid { animation: pc-rise 1s var(--ease-out) 0.34s backwards; }
.tagline__line--outline { animation: pc-wipe-x 1.1s var(--ease-cut) 0.52s backwards; }
.tagline__line--cut { animation: pc-diag 1s var(--ease-cut) 0.74s backwards; }
.hero__actions { animation: pc-fade 0.8s var(--ease-out) 1.05s backwards; }
.hero__figure { animation: pc-figure 1.3s var(--ease-out) 0.12s backwards; }
.hero__curve-core { animation: pc-draw 2s var(--ease-cut) 0.5s backwards; }
.hero__curve-glow {
  animation:
    pc-draw 2s var(--ease-cut) 0.5s backwards,
    pc-bloom 2.9s linear 0.5s backwards;
}

/* ---------- 2. Section reveals (directional, not one generic fade) ---------- */
html.js [data-reveal] {
  transition:
    opacity var(--t-reveal) var(--ease-out),
    transform var(--t-reveal) var(--ease-out),
    clip-path 1.15s var(--ease-cut);
  transition-delay: var(--d, 0ms);
}

/* Banner: wipes in left to right. */
[data-reveal="wipe"] { clip-path: inset(0 0 0 0); }
html.js:not(.reveal-fallback) [data-reveal="wipe"]:not(.is-in) { clip-path: inset(0 100% 0 0); }

/* Headings/text blocks: slide in from the left. */
html.js:not(.reveal-fallback) [data-reveal="from-left"]:not(.is-in) {
  opacity: 0;
  transform: translate3d(-56px, 0, 0);
}

/* The girl plate: opens from the right edge while the image settles. */
[data-reveal="from-right"] { clip-path: inset(0 0 0 0); }
html.js [data-reveal="from-right"] img { transition: transform 1.5s var(--ease-out) var(--d, 0ms); }
html.js:not(.reveal-fallback) [data-reveal="from-right"]:not(.is-in) { clip-path: inset(0 0 0 100%); }
html.js:not(.reveal-fallback) [data-reveal="from-right"]:not(.is-in) img { transform: scale(1.1); }

/* Launch plate: diagonal cut reveal. */
[data-reveal="diagonal"] { clip-path: polygon(0 0, 130% 0, 100% 100%, 0 100%); }
html.js:not(.reveal-fallback) [data-reveal="diagonal"]:not(.is-in) {
  clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
}

/* Short text: rises. */
html.js:not(.reveal-fallback) [data-reveal="rise"]:not(.is-in) {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
}

/* SVG lines: draw when the section arrives. */
html.js [data-reveal="draw"] .draw {
  transition: stroke-dashoffset var(--t-draw) var(--ease-cut) var(--d, 0ms);
}
html.js:not(.reveal-fallback) [data-reveal="draw"]:not(.is-in) .draw { stroke-dashoffset: 1.5; }
html.js .curve__fill { transition: opacity 1.6s var(--ease-out) 0.6s; }
html.js:not(.reveal-fallback) [data-reveal="draw"]:not(.is-in) .curve__fill { opacity: 0; }

/* ---------- 3. Ambient loops (slow, decorative, off under reduced motion) ---------- */
@keyframes pc-marquee { to { transform: translateX(-50%); } }
@keyframes pc-marquee-rev { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@keyframes pc-spin { to { transform: rotate(360deg); } }
@keyframes pc-float { 50% { transform: translateY(-10px); } }

.marquee__track { animation: pc-marquee 38s linear infinite; }
.marquee__track--reverse { animation: pc-marquee-rev 30s linear infinite; }
.girl__ring { animation: pc-spin 40s linear infinite; }
.hero__halo { animation: pc-float 7s ease-in-out 1.6s infinite; }
.launch__sticker { transition: transform 0.3s var(--ease-out); }
.launch__poster:hover .launch__sticker { transform: rotate(-3deg) scale(1.06); }

/* ---------- 4. Reduced motion: finished composition, immediately ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html.js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
  html.js [data-reveal] img { transform: none !important; }
  .draw { stroke-dashoffset: 0 !important; }
  .curve__fill { opacity: 1 !important; }
}
