/* ============================================================
   Visual effects layer — premium micro-motion & depth
   Respects prefers-reduced-motion
   ============================================================ */

:root {
  --fx-shadow: 0 4px 24px rgba(10, 10, 10, 0.04), 0 24px 64px rgba(10, 10, 10, 0.06);
  --fx-shadow-lg: 0 8px 32px rgba(10, 10, 10, 0.06), 0 40px 100px rgba(10, 10, 10, 0.08);
  --fx-glow: 0 0 0 1px rgba(10, 10, 10, 0.06);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
}

/* —— page load —— */
body {
  animation: page-in 0.7s var(--ease-out-expo) both;
}
@keyframes page-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* —— scroll progress —— */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  z-index: 200;
  background: var(--paper);
  transform-origin: left;
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.3s;
}

/* —— richer reveals —— */
.rv {
  opacity: 0;
  transform: translateY(36px) scale(0.985);
  filter: blur(4px);
  transition:
    opacity 0.95s var(--ease-out-expo),
    transform 0.95s var(--ease-out-expo),
    filter 0.95s var(--ease-out-expo);
  will-change: opacity, transform, filter;
}
.rv.in {
  opacity: 1;
  transform: none;
  filter: none;
  will-change: auto;
}
.rv-d1 { transition-delay: 0.07s; }
.rv-d2 { transition-delay: 0.14s; }
.rv-d3 { transition-delay: 0.21s; }
.rv-d4 { transition-delay: 0.28s; }
.rv-d5 { transition-delay: 0.35s; }

/* stagger children */
.stagger > .rv:nth-child(1) { transition-delay: 0.05s; }
.stagger > .rv:nth-child(2) { transition-delay: 0.1s; }
.stagger > .rv:nth-child(3) { transition-delay: 0.15s; }
.stagger > .rv:nth-child(4) { transition-delay: 0.2s; }
.stagger > .rv:nth-child(5) { transition-delay: 0.25s; }
.stagger > .rv:nth-child(6) { transition-delay: 0.3s; }
.stagger > .rv:nth-child(7) { transition-delay: 0.35s; }
.stagger > .rv:nth-child(8) { transition-delay: 0.4s; }

/* —— buttons: shine sweep (pairs with site.css spring/glow) —— */
.btn {
  overflow: hidden;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    115deg,
    transparent 28%,
    rgba(255, 255, 255, 0.22) 48%,
    transparent 68%
  );
  transform: translateX(-130%) skewX(-14deg);
  transition: transform 0.65s var(--ease-out-expo);
  pointer-events: none;
  z-index: 1;
}
.btn > * { position: relative; z-index: 2; }
.btn:hover::after { transform: translateX(130%) skewX(-14deg); }
.btn-ghost::after {
  background: linear-gradient(
    115deg,
    transparent 28%,
    rgba(10, 10, 10, 0.06) 48%,
    transparent 68%
  );
}

/* —— nav links —— */
.nav-links a {
  position: relative;
  transition: color 0.3s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out-expo);
}
.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.logo-img {
  transition: transform 0.5s var(--ease-out-expo), box-shadow 0.4s ease;
}
.logo:hover .logo-img {
  transform: rotate(-3deg) scale(1.06);
  box-shadow: 0 4px 16px rgba(10, 10, 10, 0.1);
}

/* —— hero studio —— */
.hero-studio {
  transition: transform 0.6s var(--ease-out-expo), box-shadow 0.6s ease;
  animation: studio-float 8s ease-in-out infinite;
}
@keyframes studio-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.hero-studio:hover {
  animation: none;
  transform: translateY(-4px);
  box-shadow: var(--fx-shadow-lg);
}
.hero-studio-row {
  transition: background 0.3s ease, padding-left 0.35s var(--ease-out-expo);
}
.hero-studio-row:hover {
  padding-left: 24px;
  background: var(--void);
}
.hero-studio-row .pr {
  transition: transform 0.35s var(--ease-out-expo);
}
.hero-studio-row:hover .pr {
  transform: scale(1.08);
}

/* hero media parallax hook */
.hero-media {
  transition: transform 0.1s linear, opacity 0.8s ease;
  will-change: transform;
}
.hero.has-media .hero-media {
  opacity: 0.28;
}

/* —— index rows —— */
.index-row {
  transition:
    color 0.4s var(--ease-out-expo),
    padding 0.4s var(--ease-out-expo);
}
.index-row::after {
  transition: transform 0.55s var(--ease-out-expo);
}
.index-row .idx-thumb {
  transition: transform 0.5s var(--ease-out-expo), filter 0.4s ease;
  filter: grayscale(0.3);
}
.index-row:hover .idx-thumb {
  transform: scale(1.08) rotate(-2deg);
  filter: grayscale(0);
}
.index-row .idx-go {
  transition: transform 0.4s var(--ease-out-expo), opacity 0.3s;
}

/* —— cards / personas / process —— */
.persona,
.step,
.process-step,
.b-card,
.buy-panel,
.hero-studio {
  transition:
    transform 0.5s var(--ease-out-expo),
    box-shadow 0.5s var(--ease-out-expo),
    border-color 0.35s ease,
    background 0.35s ease;
}
.persona:hover,
.process-step:hover {
  box-shadow: var(--fx-shadow);
}
.b-card:hover {
  box-shadow: var(--fx-shadow-lg);
}

/* pack cover shine */
.pack-cover {
  overflow: hidden;
}
.pack-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 60%
  );
  transform: translateX(-100%);
  transition: transform 0.8s var(--ease-out-expo);
  pointer-events: none;
}
.pack-hero:hover .pack-cover::after,
.pack-cover:hover::after {
  transform: translateX(100%);
}
.pack-cover img {
  transition: transform 0.9s var(--ease-out-expo), filter 0.5s ease;
}
.pack-hero:hover .pack-cover img {
  transform: scale(1.05);
  filter: grayscale(0) contrast(1.05);
}

/* buy panel lift */
.buy-panel {
  transition: transform 0.5s var(--ease-out-expo), box-shadow 0.5s ease;
}
.buy-panel:hover {
  transform: translateY(-4px);
  box-shadow: var(--fx-shadow-lg);
}

/* FAQ accordion */
.faq {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.faq:hover {
  border-color: var(--line2);
}
.faq[open] {
  box-shadow: var(--fx-shadow);
  border-color: var(--line2);
}
.faq summary {
  transition: color 0.25s ease;
}
.faq summary::after {
  transition: transform 0.35s var(--ease-out-expo);
}
.faq[open] summary::after {
  transform: rotate(180deg);
}

/* WA FAB */
.wa-fab {
  transition:
    transform 0.45s var(--ease-spring),
    box-shadow 0.4s ease;
  animation: fab-pulse 3.5s ease-in-out infinite;
}
@keyframes fab-pulse {
  0%, 100% { box-shadow: 0 8px 28px rgba(10, 10, 10, 0.12); }
  50% { box-shadow: 0 8px 36px rgba(10, 10, 10, 0.2), 0 0 0 8px rgba(10, 10, 10, 0.04); }
}
.wa-fab:hover {
  animation: none;
  transform: scale(1.1) rotate(-6deg);
  box-shadow: 0 12px 40px rgba(10, 10, 10, 0.2);
}

/* sticky bar slide up */
.sticky-bar {
  transform: translateY(100%);
  animation: sticky-in 0.55s var(--ease-out-expo) 0.4s forwards;
}
@keyframes sticky-in {
  to { transform: translateY(0); }
}

/* section label tick draw */
.section-label::before {
  transition: width 0.5s var(--ease-out-expo);
}
.rv.in .section-label::before,
.section-label:hover::before {
  width: 28px;
}

/* magnetic cursor glow (desktop) */
.cursor-glow {
  position: fixed;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, rgba(10, 10, 10, 0.04) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  mix-blend-mode: multiply;
}
body.has-glow .cursor-glow { opacity: 1; }

/* image hover on contact / media */
.contact-photo {
  transition: filter 0.6s ease, transform 0.6s var(--ease-out-expo);
}
.contact-photo:hover {
  filter: grayscale(0);
  transform: scale(1.01);
}

/* blog cards shine */
.b-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, transparent 40%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.b-card:hover::after { opacity: 1; }

.b-feature {
  transition: transform 0.55s var(--ease-out-expo), box-shadow 0.55s ease;
}
.b-feature:hover {
  box-shadow: var(--fx-shadow-lg);
}

/* process numbers breathe */
.process-n {
  transition: -webkit-text-stroke-color 0.4s ease, transform 0.5s var(--ease-out-expo);
}
.process-step:hover .process-n {
  transform: scale(1.05);
}

/* trust strip subtle scroll feel */
.trust-strip {
  position: relative;
}
.trust-track span {
  transition: color 0.3s ease, letter-spacing 0.3s ease;
}
.trust-track span:hover {
  color: var(--paper);
  letter-spacing: 0.22em;
}

/* finale mark drift */
.finale-media {
  transition: transform 1.2s var(--ease-out-expo), opacity 0.6s ease;
}
.finale.has-media:hover .finale-media {
  transform: translateY(-50%) scale(1.04) rotate(-2deg);
  opacity: 0.18;
}

/* checklist items cascade feel */
.checklist li {
  transition: background 0.3s ease, transform 0.35s var(--ease-out-expo), border-color 0.3s;
}
.checklist li:hover {
  background: var(--ink);
  transform: translateX(4px);
  border-color: var(--line2);
}

/* reduced motion kill switch */
@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
  .rv,
  .rv.in {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
  .hero-studio,
  .wa-fab,
  .sticky-bar,
  .btn::after,
  .pack-cover::after {
    animation: none !important;
    transition: none !important;
  }
  .cursor-glow { display: none !important; }
  .btn:hover,
  .hero-studio:hover,
  .index-row:hover .idx-thumb {
    transform: none !important;
  }
}

/* high-end grain pulse (very subtle) */
body::before {
  animation: grain-shift 8s steps(6) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-1%, 1%); }
  40% { transform: translate(1%, -1%); }
  60% { transform: translate(-1%, -1%); }
  80% { transform: translate(1%, 1%); }
  100% { transform: translate(0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
}
