/* PumpChan — motion layer. Additive only: every element's resting style is the
   finished composition. Pre-states apply only while html.js is set, the page has not
   finished its intro (html.is-loaded), and the 2.5s fallback has not fired.
   prefers-reduced-motion switches all of this off (section 7). */

:root {
  --ease-out: cubic-bezier(0.16, 0.84, 0.24, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
}

/* ---------- 1. Hero intro (plays on load) ---------- */
html.js:not(.is-loaded):not(.reveal-fallback) .hero .char { transform: translateY(115%) rotate(6deg); }
html.js:not(.is-loaded):not(.reveal-fallback) .hero__title { opacity: 0; letter-spacing: 0.9em; }
html.js:not(.is-loaded):not(.reveal-fallback) .slab { transform: scaleX(0); }
html.js:not(.is-loaded):not(.reveal-fallback) .hero__figure { opacity: 0; translate: 0 90px; }
html.js:not(.is-loaded):not(.reveal-fallback) .hero__giant { opacity: 0; translate: 0 18%; }
html.js:not(.is-loaded):not(.reveal-fallback) .sticker { opacity: 0; scale: 0.3; rotate: -20deg; }
html.js:not(.is-loaded):not(.reveal-fallback) .hero__actions,
html.js:not(.is-loaded):not(.reveal-fallback) .scroll-cue { opacity: 0; translate: 0 16px; }
html.js:not(.is-loaded):not(.reveal-fallback) .hero__ribbons--back .ribbon:not(.ribbon--flow),
html.js:not(.is-loaded):not(.reveal-fallback) .hero__ribbons--front .ribbon:not(.ribbon--flow) { stroke-dashoffset: 1.5; }
html.js:not(.is-loaded):not(.reveal-fallback) .ribbon--flow { opacity: 0; }

.hero .char { transition: transform 0.9s var(--ease-out); transition-delay: calc(var(--line, 0ms) + var(--ci, 0) * 38ms); }
.tagline__line--solid { --line: 150ms; }
.tagline__line--clip { --line: 420ms; }
.tagline__line--cut { --line: 820ms; }
.hero__title { transition: opacity 0.9s var(--ease-out), letter-spacing 1.2s var(--ease-out); }
.slab { transform-origin: 0 50%; transition: transform 0.55s var(--ease-io) 0.62s; }
.hero__figure { transition: opacity 1s var(--ease-out) 0.15s, translate 1.3s var(--ease-out) 0.15s; }
.hero__giant { transition: opacity 1.4s var(--ease-out) 0.1s, translate 1.6s var(--ease-out) 0.1s; }
.sticker { transition: opacity 0.4s var(--ease-out), scale 0.7s var(--ease-spring), rotate 0.7s var(--ease-spring); }
.sticker--a { transition-delay: 1.15s; }
.sticker--b { transition-delay: 1.3s; }
.hero__actions { transition: opacity 0.7s var(--ease-out) 1.2s, translate 0.7s var(--ease-out) 1.2s; }
.scroll-cue { transition: opacity 0.7s var(--ease-out) 1.5s, translate 0.7s var(--ease-out) 1.5s; }
.hero__ribbons .ribbon:not(.ribbon--flow) { stroke-dasharray: 1 2; }
.hero__ribbons path { }
.hero__ribbons--back .ribbon:not(.ribbon--flow),
.hero__ribbons--front .ribbon:not(.ribbon--flow) { transition: stroke-dashoffset 1.8s var(--ease-io) 0.3s; }
.ribbon--flow { transition: opacity 0.6s 1.6s; }

/* ---------- 2. Ambient loops ---------- */
@keyframes pc-drift-1 { to { transform: translate(-6vw, 5vw) scale(1.12); } }
@keyframes pc-drift-2 { to { transform: translate(8vw, -4vw) scale(0.9); } }
@keyframes pc-drift-3 { to { transform: translate(5vw, -6vw) scale(1.2); } }
.blob--1 { animation: pc-drift-1 18s ease-in-out infinite alternate; }
.blob--2 { animation: pc-drift-2 22s ease-in-out infinite alternate; }
.blob--3 { animation: pc-drift-3 26s ease-in-out infinite alternate; }

@keyframes pc-float { 50% { transform: translateY(-12px) rotate(-0.6deg); } }
.hero__figure { animation: pc-float 6.5s ease-in-out 1.6s infinite; }

@keyframes pc-flow { to { stroke-dashoffset: -1760; } }
.ribbon--flow { animation: pc-flow 4.2s linear infinite; }
.ribbon--flow2 { animation-duration: 5.6s; animation-delay: -2s; }
.ribbon--flow3 { animation-duration: 3.4s; animation-delay: -1s; }

@keyframes pc-wobble { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(5deg) translateY(-6px); } }
.sticker--a { animation: pc-wobble 5s ease-in-out 2s infinite; }
.sticker--b { animation: pc-wobble 6s ease-in-out 2.4s infinite reverse; }

@keyframes pc-cue { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }
.scroll-cue__line::after { animation: pc-cue 1.8s var(--ease-io) infinite; }

@keyframes pc-marquee { to { transform: translateX(-50%); } }
@keyframes pc-marquee-rev { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.marquee__track { animation: pc-marquee 32s linear infinite; }
.marquee__track--rev { animation: pc-marquee-rev 26s linear infinite; }

@keyframes pc-spin { to { transform: rotate(360deg); } }
.girl__ring { animation: pc-spin 36s linear infinite; }

@keyframes pc-morph {
  0% { border-radius: 58% 42% 52% 48% / 46% 56% 44% 54%; }
  33% { border-radius: 44% 56% 40% 60% / 58% 42% 58% 42%; }
  66% { border-radius: 52% 48% 62% 38% / 40% 60% 46% 54%; }
  100% { border-radius: 58% 42% 52% 48% / 46% 56% 44% 54%; }
}
.girl__blob { animation: pc-morph 14s ease-in-out infinite; }

/* ---------- 3. Scroll reveals ---------- */
/* Split headings: letters rise out of a mask, staggered. */
.is-split .word { overflow: hidden; padding: 0.06em 0.02em 0.14em; margin: -0.06em -0.02em -0.14em; vertical-align: top; }
[data-reveal="chars"] .char { transition: transform 0.85s var(--ease-out); transition-delay: calc(var(--ci, 0) * 32ms); }
html.js:not(.reveal-fallback) [data-reveal="chars"]:not(.is-in) .char { transform: translateY(115%) rotate(5deg); }

[data-reveal="rise"] { transition: opacity 0.8s var(--ease-out) 0.25s, translate 0.8s var(--ease-out) 0.25s; }
html.js:not(.reveal-fallback) [data-reveal="rise"]:not(.is-in) { opacity: 0; translate: 0 28px; }

[data-reveal="stagger"] li { transition: opacity 0.5s var(--ease-out), scale 0.6s var(--ease-spring), background-color 0.2s, transform 0.2s; transition-delay: calc(0.35s + var(--i, 0) * 70ms); }
html.js:not(.reveal-fallback) [data-reveal="stagger"]:not(.is-in) li { opacity: 0; scale: 0.6; }

[data-reveal="pop"] { transition: opacity 0.9s var(--ease-out), scale 1.1s var(--ease-spring), rotate 1.1s var(--ease-out); }
html.js:not(.reveal-fallback) [data-reveal="pop"]:not(.is-in) { opacity: 0; scale: 0.82; rotate: -8deg; }

[data-reveal="wipe"] { clip-path: inset(-60px -60px -60px -60px); transition: clip-path 0.7s var(--ease-io); }
html.js:not(.reveal-fallback) [data-reveal="wipe"]:not(.is-in) { clip-path: inset(-60px 100% -60px -60px); }

/* Card fan: stacked, then spreads like a hand of cards. */
.fan .fan__card { transition: transform 1.15s var(--ease-spring), box-shadow 0.3s; }
.fan.is-settled .fan__card { transition: transform 0.25s ease-out, box-shadow 0.3s; }
.fan .fan__card--l { transition-delay: 0.08s; }
.fan .fan__card--r { transition-delay: 0.16s; }
.fan.is-settled .fan__card { transition-delay: 0s; }
html.js:not(.reveal-fallback) .fan:not(.is-in) .fan__card { --fx: 0%; --fy: 14%; --fr: 0deg; }
html.js:not(.reveal-fallback) .fan:not(.is-in) .fan__card--l { --fr: -3deg; }
html.js:not(.reveal-fallback) .fan:not(.is-in) .fan__card--r { --fr: 3deg; }

/* Curve steps light up as the line passes them (class set by main.js). */
.curve__steps li { transition: opacity 0.5s var(--ease-out), translate 0.5s var(--ease-out), border-color 0.4s; }
html.js:not(.reveal-fallback) .curve__steps li:not(.is-on) { opacity: 0.25; translate: -14px 0; }

/* ---------- 4. Pause loops while the tab is hidden ---------- */
html.tab-hidden * { animation-play-state: paused !important; }

/* ---------- 5. Small screens: lighter ---------- */
@media (max-width: 759px) {
  .blob { filter: blur(40px); }
  .sticker--b { display: none; }
}

/* ---------- 6. Pointer-only effects are toggled by html.pointer-fx in main.js ---------- */

/* ---------- 7. Reduced motion: full disable ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .char, .slab, .hero__figure, .hero__giant, .sticker, .hero__actions, .scroll-cue,
  [data-reveal], [data-reveal] li, .curve__steps li {
    opacity: 1 !important;
    transform: none !important;
    translate: none !important;
    scale: none !important;
    rotate: none !important;
  }
  .hero__title { opacity: 1 !important; letter-spacing: 0.32em !important; }
  [data-reveal="wipe"] { clip-path: none !important; }
  .ribbon { stroke-dashoffset: 0 !important; }
  .ribbon--flow { display: none; }
  .fan .fan__card--l { --fx: -62%; --fy: 6%; --fr: -11deg; }
  .fan .fan__card--r { --fx: 62%; --fy: 6%; --fr: 11deg; }
  .fan .fan__card--c { --fx: 0%; --fy: -2%; --fr: 0deg; }
  .glow-cursor, .girl__catch { display: none !important; }
  .curve { height: auto; }
  .curve__sticky { position: relative; height: auto; min-height: 100vh; }
}
