/* PAWIX landing intro: night scene, walking cat, yarn swat, logo drop. ~6.4s total. */
.cat-intro {
  position: fixed;
  inset: 0;
  z-index: 2000;
  overflow: hidden;
  cursor: pointer;
  background: radial-gradient(ellipse at 50% 40%, #23232b 0%, #14141a 45%, var(--dark-black, #0b0b0f) 100%);
  clip-path: circle(150% at 50% 48%);
  animation:
    ci-fade-in 400ms ease both,
    ci-reveal 900ms cubic-bezier(0.7, 0, 0.3, 1) 5.6s forwards;
}

.cat-intro.is-leaving {
  animation: ci-quick-out 350ms ease forwards;
}

/* ---------- sky ---------- */
.ci-star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  animation: ci-twinkle 2.2s ease-in-out infinite;
}

.ci-moon {
  position: absolute;
  top: 9%;
  right: 12%;
  width: clamp(54px, 9vw, 90px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff6d6, #ffd36b 70%);
  box-shadow: 0 0 60px 18px rgba(255, 179, 0, 0.25);
  opacity: 0;
  transform: translateY(30px);
  animation: ci-moon-rise 1.4s ease 0.2s forwards;
}

.ci-ground {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(48% + 118px);
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 179, 0, 0.35), transparent);
  transform: scaleX(0);
  animation: ci-ground 900ms ease 0.3s forwards;
}

/* ---------- paw trail (enters from the right: RTL site) ---------- */
.ci-paw {
  position: absolute;
  width: 26px;
  height: 26px;
  fill: var(--primary-orange, #ffb300);
  opacity: 0;
  animation: ci-paw 1.4s ease forwards;
}

/* ---------- stage ---------- */
.ci-stage {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 0;
  height: 0;
}

.ci-walker {
  position: absolute;
  left: -120px;
  top: -150px;
  width: 240px;
  transform: translateX(65vw);
  animation:
    ci-walk 1.6s cubic-bezier(0.25, 0.6, 0.35, 1) 0.8s forwards,
    ci-sit 450ms ease 2.4s;
}

.ci-bob {
  animation: ci-bob 320ms ease-in-out 0.8s 5;
}

.ci-cat {
  width: 100%;
  height: auto;
  overflow: visible;
  display: block;
}

.ci-cat .ci-fur { fill: var(--primary-orange, #ffb300); }
.ci-cat .ci-inner { fill: #ffd36b; }
.ci-cat .ci-dark { fill: var(--dark-black, #0b0b0f); }
.ci-cat .ci-line { fill: none; stroke: var(--dark-black, #0b0b0f); stroke-width: 2.4; stroke-linecap: round; }

.ci-cat .ci-tail {
  transform-box: view-box;
  transform-origin: 138px 178px;
  animation: ci-tail 700ms ease-in-out 0.8s infinite alternate;
}

.ci-cat .ci-eye {
  transform-box: fill-box;
  transform-origin: center;
  animation: ci-blink 2.6s ease 2.6s infinite;
}

.ci-cat .ci-ear-left {
  transform-box: fill-box;
  transform-origin: bottom center;
  animation: ci-ear 2s ease 3s infinite;
}

.ci-cat .ci-swat {
  transform-box: view-box;
  transform-origin: 82px 172px;
  animation: ci-swat 600ms cubic-bezier(0.3, 1.6, 0.5, 1) 3.3s;
}

.ci-cat .ci-head {
  transform-box: view-box;
  transform-origin: 100px 120px;
  animation: ci-head-tilt 900ms ease-in-out 2.7s 2 alternate;
}

/* ---------- yarn ball ---------- */
.ci-yarn {
  position: absolute;
  left: -210px;
  top: 52px;
  width: 64px;
  height: 64px;
  --hit: -130px;
  opacity: 0;
  transform: translateX(-60vw) rotate(-900deg);
  animation:
    ci-yarn-in 1.1s cubic-bezier(0.2, 0.7, 0.3, 1) 2.2s forwards,
    ci-yarn-hit 900ms cubic-bezier(0.3, 0.8, 0.4, 1) 3.45s forwards;
}

.ci-yarn circle { fill: #ff7a59; }
.ci-yarn path { fill: none; stroke: #ffd1c2; stroke-width: 2.4; stroke-linecap: round; }

/* ---------- sparkles + meow ---------- */
.ci-spark {
  position: absolute;
  left: -150px;
  top: 70px;
  width: 14px;
  height: 14px;
  background: var(--primary-orange, #ffb300);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  opacity: 0;
  animation: ci-spark 800ms ease-out 3.45s forwards;
}

.ci-meow {
  position: absolute;
  left: 70px;
  top: -190px;
  padding: 8px 16px;
  border-radius: 18px 18px 18px 4px;
  background: var(--white, #fff);
  color: var(--dark-black, #0b0b0f);
  font-family: "Vazirmatn", sans-serif;
  font-weight: 800;
  font-size: 18px;
  white-space: nowrap;
  opacity: 0;
  transform: scale(0);
  transform-origin: bottom left;
  animation: ci-pop 1.5s cubic-bezier(0.3, 1.6, 0.5, 1) 3.5s forwards;
}

/* ---------- logo ---------- */
.ci-title {
  position: absolute;
  left: 50%;
  top: calc(48% + 140px);
  transform: translateX(-50%);
  display: flex;
  gap: 0.08em;
  direction: ltr;
  font-family: "Montserrat", "Vazirmatn", sans-serif;
  font-weight: 800;
  font-size: clamp(30px, 7vw, 52px);
  letter-spacing: 0.08em;
  color: var(--white, #fff);
}

.ci-title span {
  display: inline-block;
  opacity: 0;
  transform: translateY(-120px) rotate(-12deg);
  animation: ci-drop 650ms cubic-bezier(0.3, 1.5, 0.5, 1) forwards;
}

.ci-title .is-accent { color: var(--primary-orange, #ffb300); }

.ci-tagline {
  position: absolute;
  left: 50%;
  top: calc(48% + 140px + clamp(46px, 9vw, 72px));
  transform: translate(-50%, 12px);
  font-family: "Vazirmatn", sans-serif;
  font-size: clamp(14px, 3.6vw, 18px);
  color: var(--light-gray, #e5e7eb);
  white-space: nowrap;
  opacity: 0;
  animation: ci-rise 600ms ease 4.7s forwards;
}

/* ---------- skip hint + progress ---------- */
.ci-skip {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Vazirmatn", sans-serif;
  font-size: 13px;
  color: rgba(229, 231, 235, 0.55);
  opacity: 0;
  animation: ci-rise-plain 500ms ease 1.2s forwards;
}

.ci-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: var(--primary-orange, #ffb300);
  transform-origin: right;
  transform: scaleX(0);
  animation: ci-progress 5.6s linear forwards;
}

/* ---------- keyframes ---------- */
@keyframes ci-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ci-reveal { to { clip-path: circle(0% at 50% 48%); } }
@keyframes ci-quick-out { to { opacity: 0; visibility: hidden; } }

@keyframes ci-twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.7); }
  50% { opacity: 0.9; transform: scale(1.2); }
}

@keyframes ci-moon-rise { to { opacity: 1; transform: translateY(0); } }
@keyframes ci-ground { to { transform: scaleX(1); } }

@keyframes ci-paw {
  0% { opacity: 0; transform: scale(0.3) rotate(var(--r)); }
  25% { opacity: 0.95; transform: scale(1.1) rotate(var(--r)); }
  40% { transform: scale(1) rotate(var(--r)); }
  100% { opacity: 0.14; transform: scale(1) rotate(var(--r)); }
}

@keyframes ci-walk {
  from { transform: translateX(65vw); }
  to { transform: translateX(0); }
}

@keyframes ci-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-9px) rotate(-2deg); }
}

@keyframes ci-sit {
  0% { transform: translateX(0) scale(1, 1); }
  40% { transform: translateX(0) scale(1.08, 0.9); }
  100% { transform: translateX(0) scale(1, 1); }
}

@keyframes ci-tail {
  from { transform: rotate(-12deg); }
  to { transform: rotate(16deg); }
}

@keyframes ci-blink {
  0%, 86%, 100% { transform: scaleY(1); }
  91% { transform: scaleY(0.08); }
}

@keyframes ci-ear {
  0%, 78%, 100% { transform: rotate(0deg); }
  84% { transform: rotate(-14deg); }
  91% { transform: rotate(5deg); }
}

@keyframes ci-head-tilt {
  from { transform: rotate(0deg); }
  to { transform: rotate(-9deg); }
}

@keyframes ci-swat {
  0% { transform: rotate(0deg) translate(0, 0); }
  45% { transform: rotate(38deg) translate(-14px, -18px); }
  100% { transform: rotate(0deg) translate(0, 0); }
}

@keyframes ci-yarn-in {
  0% { opacity: 1; transform: translateX(-60vw) rotate(-900deg); }
  100% { opacity: 1; transform: translateX(0) rotate(0deg); }
}

@keyframes ci-yarn-hit {
  0% { opacity: 1; transform: translateX(0) translateY(0) rotate(0deg); }
  35% { opacity: 1; transform: translateX(calc(var(--hit) * 0.46)) translateY(-70px) rotate(-200deg); }
  70% { opacity: 1; transform: translateX(calc(var(--hit) * 0.85)) translateY(0) rotate(-380deg); }
  85% { opacity: 1; transform: translateX(calc(var(--hit) * 0.94)) translateY(-14px) rotate(-420deg); }
  100% { opacity: 1; transform: translateX(var(--hit)) translateY(0) rotate(-450deg); }
}

@keyframes ci-spark {
  0% { opacity: 0; transform: translate(0, 0) scale(0) rotate(0deg); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.3) rotate(160deg); }
}

@keyframes ci-pop {
  0% { opacity: 0; transform: scale(0); }
  20% { opacity: 1; transform: scale(1.1); }
  30%, 82% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.6); }
}

@keyframes ci-drop {
  0% { opacity: 0; transform: translateY(-120px) rotate(-12deg); }
  60% { opacity: 1; transform: translateY(8px) rotate(3deg); }
  100% { opacity: 1; transform: translateY(0) rotate(0deg); }
}

@keyframes ci-rise { to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes ci-rise-plain { to { opacity: 1; } }
@keyframes ci-progress { to { transform: scaleX(1); } }

@media (max-width: 560px) {
  .ci-walker { left: -95px; top: -120px; width: 190px; }
  .ci-yarn { left: -130px; top: 44px; width: 44px; height: 44px; --hit: -18px; }
  .ci-spark { left: -105px; top: 58px; }
  .ci-meow { left: 50px; top: -155px; font-size: 16px; }
  .ci-title { top: calc(48% + 110px); }
  .ci-tagline { top: calc(48% + 110px + clamp(46px, 9vw, 72px)); }
  .ci-ground { top: calc(48% + 92px); }
}

@media (prefers-reduced-motion: reduce) {
  .cat-intro { display: none; }
}
