/* 3D hero and motion effects (Admin › Appearance). Loaded after the template styles; nothing here changes
   the layout unless the matching effect is switched on. */

/* ----- 3D hero ----- */
.hero-grid.has-3d { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
.hero-grid.has-3d h1 { font-size: clamp(2.6rem, 5.4vw, 5.1rem); }
.hero-3d { position: relative; min-height: clamp(340px, 40vw, 540px); height: 100%; opacity: 0; transition: opacity 1s ease; }
.hero-3d.ready, .hero-3d.no-3d { opacity: 1; }
.hero-3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.hero-3d::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 3%; height: 26px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(43, 34, 32, .2), transparent 70%); filter: blur(6px); pointer-events: none; }
.hero-3d .hero-3d-fallback { display: none; }
.hero-3d.no-3d::after { display: none; }
.hero-3d.no-3d .hero-3d-fallback { display: block; position: relative; width: 100%; height: auto; border-radius: 26px; }
.hero-3d.no-3d:not(:has(img)) { display: none; }
@media (max-width: 760px) {
  .hero-grid.has-3d { grid-template-columns: 1fr; }
  .hero-3d { min-height: 300px; margin-top: -.5rem; }
}

/* ----- Scroll progress ----- */
.fx-progress { position: fixed; left: 0; right: 0; top: env(safe-area-inset-top, 0px); height: 3px; background: linear-gradient(90deg, var(--orange), var(--pink), var(--blue)); transform: scaleX(0); transform-origin: 0 50%; z-index: 60; pointer-events: none; }

/* ----- Animated headline ----- */
.fx-words .fx-w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.fx-words .fx-w > span { display: inline-block; transform: translateY(105%) rotateX(-40deg); transform-origin: 50% 100%; opacity: 0; animation: fx-rise .9s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes fx-rise { to { transform: none; opacity: 1; } }
.sticker.a.fx-bob { animation: fx-bob-a 4.5s ease-in-out infinite; }
.sticker.b.fx-bob { animation: fx-bob-b 5s ease-in-out infinite; }
@keyframes fx-bob-a { 0%, 100% { transform: rotate(-4deg) translateY(0); } 50% { transform: rotate(-7deg) translateY(-5px); } }
@keyframes fx-bob-b { 0%, 100% { transform: rotate(3deg) translateY(0); } 50% { transform: rotate(6deg) translateY(-6px); } }

/* ----- Scroll reveal ----- */
.fx-reveal { opacity: 0; transform: perspective(900px) translateY(calc(34px * var(--fx-k, 1))) rotateX(calc(10deg * var(--fx-k, 1))); transform-origin: 50% 0; transition: opacity .8s ease, transform 1s cubic-bezier(.2, .75, .2, 1); }
.fx-reveal.fx-in { opacity: 1; transform: none; }
.hl.fx-reveal { transform: perspective(900px) translateY(24px) scale(.92); }

/* ----- 3D tilt ----- */
.fx-tilting.fx-tilting.fx-tilting {
  transform: perspective(900px) translateY(var(--lift, 0px)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .12s ease-out, box-shadow .35s ease;
  box-shadow: 0 30px 55px -30px rgba(43, 34, 32, .5);
}
.step.fx-tilting, .consult.fx-tilting, .review.fx-tilting { background-image: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .35), transparent 55%); }

/* ----- Buttons ----- */
.btn { position: relative; overflow: hidden; }
.btn::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); transition: left .6s ease; pointer-events: none; }
.btn:hover::after { left: 120%; }

@media (prefers-reduced-motion: reduce) {
  .fx-reveal { opacity: 1; transform: none; }
  .fx-words .fx-w > span { animation: none; transform: none; opacity: 1; }
  .fx-bob { animation: none !important; }
}
