/* ==========================================================================
   yo.companion: animations & animated graphics
   All motion is switched off for visitors who ask for reduced motion.
   ========================================================================== */

@keyframes fadeUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes zoomIn { from { opacity: 0; transform: scale(.88); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } 45% { transform: scale(1.15); } 60% { transform: scale(1); } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes popIn { from { opacity: 0; transform: translateY(24px) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }
@keyframes shimmer { to { background-position: 200% center; } }
@keyframes morph {
  0%, 100% { border-radius: 58% 42% 38% 62% / 50% 44% 56% 50%; }
  33% { border-radius: 42% 58% 55% 45% / 60% 52% 48% 40%; }
  66% { border-radius: 50% 50% 42% 58% / 42% 60% 40% 58%; }
}
@keyframes kenburns { from { transform: scale(1.04) translate(0, 0); } to { transform: scale(1.16) translate(-2%, 2%); } }

/* ---------- Preloader ---------- */
.preloader img { animation: heartbeat 1.2s ease-in-out infinite; }
.preloader { animation: hidePre .5s ease 3s forwards; } /* safety net if JS never runs */
@keyframes hidePre { to { opacity: 0; visibility: hidden; } }

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100;
  background: linear-gradient(90deg, var(--gold), var(--orange));
  transform-origin: 0 50%; transform: scaleX(var(--p, 0));
}

/* ---------- Page-load entrance ---------- */
.load-up { animation: fadeUp .8s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * .12s + .25s); }
.load-zoom { animation: zoomIn 1.1s cubic-bezier(.2, .7, .2, 1) .4s both; }

/* ---------- Scroll reveal ---------- */
html.js .reveal {
  opacity: 0; transform: translateY(36px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1), box-shadow .3s;
}
html.js .reveal.from-left { transform: translateX(-50px); }
html.js .reveal.from-right { transform: translateX(50px); }
html.js .reveal.in { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * .1s); }
html.js .reveal.in.done { transition: opacity .3s, transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .3s; transition-delay: 0s; }

/* Image wipe reveal */
html.js .img-reveal { clip-path: inset(100% 0 0 0); }
html.js .img-reveal img { transform: scale(1.3); }
html.js .img-reveal.in { clip-path: inset(0 0 0 0); transition: clip-path 1.3s cubic-bezier(.7, 0, .2, 1); }
html.js .img-reveal.in img { transform: scale(1); transition: transform 1.8s cubic-bezier(.2, .7, .2, 1); }

/* ---------- Gradient text shimmer ---------- */
.grad-text { animation: shimmer 6s linear infinite; }

/* ---------- Hero background: drifting blobs + floating hearts/leaves ---------- */
.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.hero-grid { position: relative; z-index: 1; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; animation: drift 18s ease-in-out infinite alternate; }
.b1 { width: 420px; height: 420px; background: #f8e2b0; top: -140px; left: -140px; }
.b2 { width: 380px; height: 380px; background: #cfe6d7; bottom: -80px; right: 6%; animation-duration: 22s; animation-delay: -6s; }
.b3 { width: 260px; height: 260px; background: #fbd3c0; top: 30%; left: 40%; animation-duration: 26s; animation-delay: -12s; opacity: .35; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.12); }
  100% { transform: translate(-40px, 70px) scale(.95); }
}
.particle { position: absolute; left: var(--x); bottom: -40px; opacity: 0; animation: rise var(--t) linear var(--d) infinite; }
.particle.k0 { color: var(--orange); }
.particle.k1 { color: #3f9466; }
.particle.k2 { color: var(--gold); }
@keyframes rise {
  0% { transform: translateY(0) rotate(0); opacity: 0; }
  12% { opacity: .4; }
  80% { opacity: .25; }
  100% { transform: translateY(-820px) rotate(200deg); opacity: 0; }
}

/* ---------- Hero heading ---------- */
.hero h1 > span:first-child { display: block; }
.hero h1 .hl { display: inline-block; position: relative; }
.scribble { position: absolute; left: 0; bottom: -10px; width: 100%; height: 16px; overflow: visible; }
.scribble path { fill: none; stroke: var(--gold); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s ease 1.2s forwards; }
.rotator { font-size: 1.15rem; font-weight: 500; color: var(--ink); margin: .5rem 0 .9rem; display: flex; align-items: baseline; gap: .45em; flex-wrap: wrap; }
.rot-words { display: inline-grid; overflow: hidden; vertical-align: bottom; }
.rot-words b {
  grid-area: 1 / 1; color: var(--green); white-space: nowrap; font-weight: 700;
  background: linear-gradient(transparent 62%, var(--gold-lt) 62%);
  transform: translateY(110%); opacity: 0; transition: transform .55s cubic-bezier(.2, .7, .2, 1), opacity .55s;
}
.rot-words b.on { transform: none; opacity: 1; }
.rot-words b.out { transform: translateY(-110%); opacity: 0; }

.beat { display: inline-flex; animation: heartbeat 1.8s ease-in-out infinite; }
.spin-slow { display: inline-flex; animation: spin 6s linear infinite; }

/* ---------- Hero photo composition ---------- */
.hv-glow { animation: morph 14s ease-in-out infinite, spin 40s linear infinite; }
.hv-ring { animation: spin 50s linear infinite; }
.hv-photo { animation: morph 12s ease-in-out infinite; }
.hv-photo img { animation: kenburns 18s ease-in-out infinite alternate; }
.hv-mini { animation: floaty 7s ease-in-out infinite; }
.orb { animation: bob 5s ease-in-out infinite; }
.hv-orb-1 { animation-delay: -1.6s; }
.hv-orb-2 { animation-delay: -3.2s; }
.float-card { animation: popIn .7s cubic-bezier(.2, .9, .3, 1.3) both, floaty 6s ease-in-out infinite; }
.fc-1 { animation-delay: 1.3s, 2.1s; }
.fc-2 { animation-delay: 1.5s, 3.4s; }
.fc-3 { animation-delay: 1.7s, 2.7s; }
/* mouse parallax depth (set by JS as --mx/--my between -1 and 1) */
.hv-photo, .hv-mini, .orb, .float-card, .hv-leaves { transition: translate .35s ease-out; }
.hv-photo { translate: calc(var(--mx, 0) * -8px) calc(var(--my, 0) * -8px); }
.hv-mini { translate: calc(var(--mx, 0) * 18px) calc(var(--my, 0) * 18px); }
.orb { translate: calc(var(--mx, 0) * 24px) calc(var(--my, 0) * 24px); }
.float-card { translate: calc(var(--mx, 0) * 14px) calc(var(--my, 0) * 14px); }
.hv-leaves { translate: calc(var(--mx, 0) * -14px) calc(var(--my, 0) * -10px); }

/* ---------- Swaying leaves ---------- */
.leaves .leaf { transform-box: fill-box; transform-origin: 100% 100%; animation: leafSway 4s ease-in-out infinite alternate; }
.leaves .l2, .leaves .l4 { transform-origin: 0% 100%; animation-delay: -1s; animation-duration: 4.6s; }
.leaves .l3 { animation-delay: -2s; }
.leaves .l5 { animation-delay: -3s; transform-origin: 50% 100%; }
@keyframes leafSway { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }

/* ---------- Wave divider ---------- */
.wave { position: absolute; left: -3%; bottom: -1px; width: 106%; height: 70px; z-index: 1; }
.wave-back { fill: var(--green); opacity: .25; animation: waveX 9s ease-in-out infinite alternate; }
.wave-front { fill: var(--green); animation: waveX 7s ease-in-out infinite alternate-reverse; }
@keyframes waveX { from { transform: translateX(-1.5%); } to { transform: translateX(1.5%); } }

/* ---------- Marquee band ---------- */
.marquee { background: var(--green); color: #fff; overflow: hidden; padding: 1rem 0 1.15rem; }
.marquee-track { display: flex; width: max-content; gap: 2rem; align-items: center; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { display: inline-flex; align-items: center; gap: .6rem; font-weight: 600; font-size: 1.05rem; white-space: nowrap; }
.marquee-track .ic { color: var(--gold); }
.marquee-track .sep .ic { color: var(--orange); }
@keyframes marquee { to { transform: translateX(calc(-50% - 1rem)); } }

/* ---------- Service cards ---------- */
.svc-media img { transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
html.js .svc.reveal.in.done:hover, html:not(.js) .svc:hover { transform: translateY(-8px); box-shadow: 0 2px 0 var(--line), var(--shadow-lg); }
.svc:hover .svc-media img { transform: scale(1.1); }
.svc:hover .svc-ic { animation: wiggle .6s ease; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg) scale(1.08); } 50% { transform: rotate(10deg) scale(1.08); } 75% { transform: rotate(-5deg); } }
.svc-link span { display: inline-block; transition: transform .25s; }
.svc:hover .svc-link span { transform: translateX(6px); }
.sa-c { animation: bob 6s ease-in-out infinite; }
.sa-c.c2 { animation-delay: -2s; animation-duration: 7s; }
.sa-c.c3 { animation-delay: -4s; animation-duration: 5s; }
.svc-art .ic { animation: floaty 5s ease-in-out infinite; }

/* ---------- About collage ---------- */
.cl-second, .cl-third { transition: translate .2s linear; }
.cl-third { animation: none; }
.cl-third img { animation: kenburns 16s ease-in-out infinite alternate; }
.collage-dots { animation: bob 8s ease-in-out infinite; }

/* ---------- Quote band ---------- */
.qb-bg { will-change: translate; }
.qb-mark { animation: bob 4s ease-in-out infinite; }

/* ---------- How it works: line draws across ---------- */
.steps-wrap { position: relative; padding-top: 70px; }
.steps-line { position: absolute; top: 22px; left: 0; width: 100%; height: 20px; overflow: visible; }
.steps-line path { fill: none; stroke: var(--gold); stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: 1; vector-effect: non-scaling-stroke; transition: stroke-dashoffset 1.6s ease .3s; }
.steps-wrap.in .steps-line path { stroke-dashoffset: 0; }
.steps .step-n { position: absolute; top: -62px; left: 50%; margin-left: -28px; z-index: 2; box-shadow: 0 0 0 6px #fff; transition: transform .3s; }
.steps li:hover .step-n { transform: scale(1.12) rotate(-6deg); }
.steps .step-n::after { content: ''; position: absolute; top: 100%; left: 50%; width: 2px; height: 6px; background: var(--gold); }

/* ---------- Why-us illustration ---------- */
.why-art-bg { animation: morph 14s ease-in-out infinite; }
.scene { width: 100%; max-width: 440px; height: auto; display: block; margin: 0 auto; overflow: visible; }
.scene-ring { transform-origin: 210px 185px; animation: spin 50s linear infinite; }
.clock-min { transform-origin: 0 0; animation: spin 8s linear infinite; }
.clock-hr { transform-origin: 0 0; animation: spin 96s linear infinite; }
.steam path { opacity: 0; animation: steam 2.6s ease-in-out infinite; }
.steam path:nth-child(2) { animation-delay: .8s; }
.steam path:nth-child(3) { animation-delay: 1.6s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(6px); } 40% { opacity: .9; } 100% { opacity: 0; transform: translateY(-12px); } }
.elder-head { transform-box: fill-box; transform-origin: 50% 100%; animation: nod 5s ease-in-out infinite; }
.comp-head { transform-box: fill-box; transform-origin: 50% 100%; animation: tilt 6s ease-in-out infinite; }
@keyframes nod { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-4deg); } 60% { transform: rotate(2deg); } }
@keyframes tilt { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(-8deg); } }
.plant { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 4s ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
.scene-hearts path { opacity: 0; animation: heartRise 4s ease-out var(--d) infinite; }
@keyframes heartRise {
  0% { transform: translate(var(--x), 210px) scale(.5); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translate(var(--x), 100px) scale(1.4); opacity: 0; }
}

/* ---------- Launch banner ---------- */
.launch-photo img { animation: kenburns 20s ease-in-out infinite alternate; }
.launch-copy, .launch-cta { position: relative; z-index: 1; }
.skyline { position: absolute; right: 2%; bottom: 0; width: min(560px, 55%); height: auto; color: rgba(255, 255, 255, .16); pointer-events: none; }
.skyline path, .skyline circle { stroke-dasharray: 1; stroke-dashoffset: 1; }
.draw-on-view.in .skyline path, .draw-on-view.in .skyline circle { stroke-dashoffset: 0; transition: stroke-dashoffset 2.4s ease; }
.draw-on-view.in .skyline > :nth-child(2) { transition-delay: .3s; }
.draw-on-view.in .skyline > :nth-child(3) { transition-delay: .6s; }
.draw-on-view.in .skyline > :nth-child(4) { transition-delay: .7s; }
.draw-on-view.in .skyline > :nth-child(5) { transition-delay: .8s; }
.draw-on-view.in .skyline > :nth-child(6) { transition-delay: 1s; }
.draw-on-view.in .skyline > :nth-child(7) { transition-delay: 1.2s; }
.draw-on-view.in .skyline > :nth-child(8) { transition-delay: 1.4s; }
.twinkle { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px var(--gold); animation: twinkle 3s ease-in-out infinite; }
.t1 { top: 18%; right: 30%; }
.t2 { top: 34%; right: 10%; animation-delay: -1s; width: 4px; height: 4px; }
.t3 { top: 12%; right: 48%; animation-delay: -2s; width: 5px; height: 5px; }
@keyframes twinkle { 0%, 100% { opacity: .2; transform: scale(.6); } 50% { opacity: 1; transform: scale(1.3); } }
.ping { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); display: inline-block; }
.ping::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--gold); animation: ping 1.6s cubic-bezier(0, 0, .2, 1) infinite; }

/* ---------- Buttons: shine sweep ---------- */
.btn-shine { position: relative; overflow: hidden; isolation: isolate; }
.btn-shine::after {
  content: ''; position: absolute; top: 0; left: -75%; width: 50%; height: 100%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg); animation: shine 4s ease-in-out infinite;
}
.btn-gold.btn-shine::after { background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent); }
@keyframes shine { 0%, 60% { left: -75%; } 100% { left: 130%; } }

/* ---------- Booking form: flowing gradient border ---------- */
.form-frame { background-size: 300% 300%; animation: flow 8s ease infinite; }
@keyframes flow { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* ---------- Floating WhatsApp pulse, logo ---------- */
.fab-wa { position: relative; }
.fab-wa::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: #25d366; z-index: -1; animation: ping 2s cubic-bezier(0, 0, .2, 1) infinite; }
.brand-logo { transition: transform .5s; }
.brand:hover .brand-logo { transform: rotate(-10deg) scale(1.1); }

/* ---------- Gallery + lightbox ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.g-item { position: relative; display: block; padding: 0; border: 0; border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 3; cursor: zoom-in; background: var(--green-lt); }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.g-item:hover img { transform: scale(1.08); }
.g-cap {
  position: absolute; inset: auto 0 0; padding: 2rem 1rem .8rem; text-align: left; color: #fff; font: 500 .92rem 'Poppins', sans-serif;
  background: linear-gradient(transparent, rgba(10, 30, 20, .75)); transform: translateY(40%); opacity: 0; transition: .35s;
}
.g-item:hover .g-cap, .g-item:focus-visible .g-cap { transform: none; opacity: 1; }
@media (hover: none) { .g-cap { transform: none; opacity: 1; } }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(8, 24, 16, .92); display: grid; place-items: center; padding: 16px; }
.lightbox figure { margin: 0; text-align: center; animation: zoomIn .35s ease both; }
.lightbox img { max-width: min(92vw, 1100px); max-height: 80vh; border-radius: 14px; margin: 0 auto; }
.lightbox figcaption { color: #fff; margin-top: .8rem; }
.lb-close, .lb-nav { position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .25); }
.lb-close { top: 16px; right: 16px; }
.lb-nav { top: 50%; margin-top: -24px; }
.lb-prev { left: 16px; transform: rotate(-90deg); }
.lb-next { right: 16px; transform: rotate(-90deg); }

/* ---------- Form success: animated tick + heart burst ---------- */
.tick { width: 72px; height: 72px; margin: 0 auto 1rem; display: block; }
.tick circle { fill: none; stroke: var(--green); stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: 1; }
.tick path { fill: none; stroke: var(--green); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.form-ok:not([hidden]) .tick circle { animation: draw .7s ease forwards; }
.form-ok:not([hidden]) .tick path { animation: draw .5s ease .6s forwards; }
.form-ok:not([hidden]) h3, .form-ok:not([hidden]) p, .form-ok:not([hidden]) .btn { animation: fadeUp .6s ease both; }
.form-ok:not([hidden]) p { animation-delay: .15s; }
.form-ok:not([hidden]) .btn { animation-delay: .3s; }
.burst { position: fixed; z-index: 300; pointer-events: none; animation: burst 1.3s cubic-bezier(.1, .7, .3, 1) forwards; }
@keyframes burst {
  0% { transform: translate(0, 0) scale(.4) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(var(--r)); opacity: 0; }
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 980px) {
  .skyline { width: 90%; }
}
@media (max-width: 720px) {
  .steps-line { display: none; }
  .steps-wrap { padding-top: 0; }
  .steps { gap: 3.6rem; padding-top: 34px; }
  .steps .step-n { top: -28px; }
  .steps .step-n::after { display: none; }
}
@media (max-width: 560px) {
  .particle:nth-child(n+12) { display: none; }
  .rotator { font-size: 1rem; }
}

/* ---------- Respect reduced-motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  html.js .reveal { opacity: 1; transform: none; }
  html.js .img-reveal { clip-path: none; }
  html.js .img-reveal img { transform: none; }
  .particle, .blob, .twinkle { display: none; }
  .scribble path, .steps-line path, .skyline path, .skyline circle { stroke-dashoffset: 0; }
  [data-parallax] { translate: none !important; }
}
