/* kiwiapp.co /social/: animated phone mock-ups of @kiwiapp.co (Kiwi brand only).
   Honesty rules built in: no verified tick, no follower/like/view numbers, no Instagram logo.
   Everything animates with transform/opacity only; prefers-reduced-motion stops it all. */
.ks {
  --ks-violet: #7c3aed;
  --ks-royal: #5b21b6;
  --ks-deep: #3b0f7a;
  --ks-bright: #a855f7;
  --ks-teal: #0e9aa6;
  --ks-ink: #1c1633;
  --ks-muted: #5d5875;
  --ks-lilac: #f4f2fb;
  --ks-grad: linear-gradient(120deg, #5b21b6 0%, #7c3aed 45%, #0e9aa6 110%);
  --ks-btn: linear-gradient(120deg, #7c3aed, #6d28d9 55%, #8b32e0);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--ks-ink);
  position: relative;
}
.ks *, .ks *::before, .ks *::after { box-sizing: border-box; }

/* ---------- phone frame ---------- */
.ks-phone {
  position: relative;
  width: var(--ks-w, 300px);
  aspect-ratio: 300 / 517; /* screen = 9:16 exactly (0.93w x 1.653w) + 3.5% bezel */
  min-height: 0; /* never let the grid's content stretch the phone */
  height: auto;
  border-radius: calc(var(--ks-w, 300px) * 0.15);
  background: var(--ks-ink);
  padding: calc(var(--ks-w, 300px) * 0.035);
  box-shadow: 0 40px 90px rgba(28, 22, 51, 0.28), inset 0 0 0 2px #3a3352;
  flex-shrink: 0;
}
.ks-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: calc(var(--ks-w, 300px) * 0.12);
  overflow: hidden;
  background: #fff;
  container-type: size;
}
.ks-phone::after { /* camera pill */
  content: '';
  position: absolute;
  left: 50%;
  top: calc(var(--ks-w, 300px) * 0.06);
  width: 30%;
  height: calc(var(--ks-w, 300px) * 0.08);
  transform: translateX(-50%);
  border-radius: 99px;
  background: var(--ks-ink);
  z-index: 3;
}

/* ---------- profile screen ---------- */
.ks-profile { padding: 13cqw 5cqw 0; font-size: 4.2cqw; line-height: 1.35; }
.ks-handle { display: flex; align-items: center; gap: 1.5cqw; font-weight: 800; font-size: 5.6cqw; letter-spacing: -0.02em; }
.ks-handle svg { width: 3.4cqw; height: 3.4cqw; }
.ks-head { display: flex; align-items: center; gap: 5cqw; margin-top: 4cqw; }
.ks-avatar {
  width: 22cqw; aspect-ratio: 1; border-radius: 50%; padding: 1cqw;
  background: var(--ks-grad); flex-shrink: 0;
}
.ks-avatar span {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  border-radius: 50%; border: 0.9cqw solid #fff; background: var(--ks-btn);
}
.ks-avatar img { width: 52%; height: auto; }
.ks-head-actions { display: flex; flex-direction: column; gap: 2cqw; flex: 1; }
.ks-follow, .ks-msg {
  display: block; text-align: center; font-weight: 800; font-size: 4cqw; padding: 2.4cqw 0; border-radius: 2.6cqw;
}
.ks-follow { color: #fff; background: var(--ks-btn); animation: ks-pulse 2.6s ease-in-out infinite; }
.ks-msg { background: #efedf5; color: var(--ks-ink); }
@keyframes ks-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.45); transform: scale(1); }
  50% { box-shadow: 0 0 0 2.4cqw rgba(124, 58, 237, 0); transform: scale(1.03); }
}
.ks-bio { margin-top: 3.4cqw; font-size: 3.7cqw; }
.ks-bio b { font-weight: 800; }
.ks-bio a { color: var(--ks-royal); font-weight: 700; text-decoration: none; }
.ks-tabs { display: flex; margin: 4cqw -5cqw 0; border-top: 1px solid #ece8f6; }
.ks-tabs span { flex: 1; display: flex; justify-content: center; padding: 2.6cqw 0; color: #a59fbb; }
.ks-tabs span:first-child { color: var(--ks-ink); box-shadow: inset 0 -2px 0 var(--ks-ink); }
.ks-tabs svg { width: 5.4cqw; height: 5.4cqw; }
.ks-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6cqw; margin: 0 -5cqw; }
.ks-tile { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: #ece8f6; }
.ks-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ks-tile .ks-reel-mark { position: absolute; right: 2cqw; top: 2cqw; width: 4.6cqw; height: 4.6cqw; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.ks-tile .ks-pop { /* double-tap heart */
  position: absolute; left: 50%; top: 50%; width: 46%; translate: -50% -50%;
  opacity: 0; transform: scale(0.2); pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(28, 22, 51, 0.35));
}
.ks-tile.is-liked .ks-pop { animation: ks-pop 1.1s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes ks-pop {
  0% { opacity: 0; transform: scale(0.2); }
  25% { opacity: 1; transform: scale(1.12); }
  45% { transform: scale(0.95); }
  75% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.05) translateY(-8%); }
}

/* ---------- reel screen ---------- */
.ks-reel { position: absolute; inset: 0; background: var(--ks-ink); }
.ks-reel video, .ks-reel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* the loop already contains the scrolling thumb, the like and our drawn controls */
.ks-reel-ui { position: absolute; inset: 0; pointer-events: none; color: #fff; }
.ks-reel-ui::before { content: ''; position: absolute; inset: auto 0 0 0; height: 34%; background: linear-gradient(to top, rgba(28,22,51,.65), transparent); }
.ks-actions { position: absolute; right: 3.6cqw; bottom: 20cqw; display: flex; flex-direction: column; align-items: center; gap: 5.4cqw; }
.ks-actions svg { width: 7.6cqw; height: 7.6cqw; filter: drop-shadow(0 1px 3px rgba(0,0,0,.45)); }
.ks-actions .ks-like path { transition: fill .3s ease; }
.ks-actions .ks-like.is-on path { fill: url(#ks-heart-grad); stroke: none; }
.ks-actions .ks-like.is-on { animation: ks-thump .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes ks-thump { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
.ks-who { position: absolute; left: 4cqw; right: 18cqw; bottom: 6cqw; font-size: 3.6cqw; line-height: 1.35; }
.ks-who .ks-row { display: flex; align-items: center; gap: 2cqw; font-weight: 800; }
.ks-who .ks-mini { width: 7cqw; aspect-ratio: 1; border-radius: 50%; background: var(--ks-btn); display: flex; align-items: center; justify-content: center; border: 0.5cqw solid #fff; }
.ks-who .ks-mini img { width: 55%; }
.ks-who .ks-out { border: 1px solid rgba(255,255,255,.75); border-radius: 1.6cqw; padding: 0.6cqw 2.2cqw; font-size: 3.2cqw; font-weight: 700; }
.ks-who p { margin: 1.6cqw 0 0; font-weight: 600; opacity: .95; }

/* floating hearts (no numbers, ever) */
.ks-hearts { position: absolute; right: 2cqw; bottom: 48cqw; width: 14cqw; height: 70cqw; pointer-events: none; }
.ks-hearts i {
  position: absolute; bottom: 0; left: 50%; width: 7cqw; height: 7cqw; margin-left: -3.5cqw;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23A855F7'/%3E%3Cstop offset='1' stop-color='%237C3AED'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23g)' d='M12 21s-7.5-4.6-9.5-9.6C1.2 7.9 3.4 4.5 6.9 4.5c2.1 0 3.7 1.2 5.1 3 1.4-1.8 3-3 5.1-3 3.5 0 5.7 3.4 4.4 6.9C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E");
  opacity: 0;
  animation: ks-rise 3.6s ease-in infinite;
}
.ks-hearts i:nth-child(2) { animation-delay: .7s; --ks-x: -5cqw; width: 5cqw; height: 5cqw; }
.ks-hearts i:nth-child(3) { animation-delay: 1.5s; --ks-x: 4cqw; }
.ks-hearts i:nth-child(4) { animation-delay: 2.2s; --ks-x: -3cqw; width: 6cqw; height: 6cqw; }
.ks-hearts i:nth-child(5) { animation-delay: 2.9s; --ks-x: 3cqw; width: 4.6cqw; height: 4.6cqw; }
@keyframes ks-rise {
  0% { opacity: 0; transform: translate(0, 0) scale(.4); }
  12% { opacity: 1; transform: translate(calc(var(--ks-x, 2cqw) * .3), -8cqw) scale(1); }
  100% { opacity: 0; transform: translate(var(--ks-x, 2cqw), -66cqw) scale(.85) rotate(-12deg); }
}

/* ---------- section 1: profile + reel pair ---------- */
.ks-pair { display: flex; justify-content: center; align-items: flex-end; gap: clamp(16px, 3.5vw, 44px); position: relative; padding: 24px 0 8px; scroll-margin-top: 96px; }
.ks-pair .ks-phone { --ks-w: clamp(240px, 24vw, 300px); }
.ks-pair .ks-phone:first-of-type { transform: rotate(-2.5deg); animation: ks-float 7s ease-in-out infinite; }
.ks-pair .ks-phone.ks-reel-phone { transform: rotate(2.5deg) translateY(-20px); animation: ks-float2 7s ease-in-out infinite; }
@keyframes ks-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes ks-float2 { 0%, 100% { translate: 0 -6px; } 50% { translate: 0 6px; } }
/* the mascot sits beside the Reel phone (its own column), so it can never cover the Reel */
.ks-pair > picture { flex: 0 0 auto; align-self: flex-end; }
.ks-pair .ks-mascot { display: block; width: clamp(130px, 14vw, 200px); height: auto; filter: drop-shadow(0 24px 34px rgba(60, 24, 120, .22)); }

/* ---------- section 2: the Reels wall ---------- */
.ks-wall { position: relative; height: clamp(420px, 46vw, 600px); perspective: 1600px; overflow: hidden; scroll-margin-top: 96px; }
.ks-wall-track { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
/* only if side mascots are ever added back: +140px height and the fan lifted 70px, so they sit under the outer phones
   (the Website chat's 27 Oct fix: 0 overlaps at 720-2560px). v4 has no mascots on the wall. Phones (<=700px) reset both below. */
.ks-wall:has(> picture) { height: calc(clamp(420px, 46vw, 600px) + 140px); }
.ks-wall:has(> picture) .ks-wall-track { top: calc(50% - 70px); }
.ks-wall .ks-phone {
  --ks-w: clamp(150px, 15vw, 210px);
  position: absolute; left: 0; top: 0;
  transform: translate(-50%, -50%) translateX(calc(var(--i) * var(--ks-w) * 1.06)) translateZ(calc(var(--d) * -110px)) rotateY(calc(var(--i) * -7deg)) rotate(calc(var(--i) * 1.2deg));
  animation: ks-bob 6s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.8s);
  box-shadow: 0 30px 60px rgba(28, 22, 51, .25), inset 0 0 0 2px #3a3352;
}
.ks-wall .ks-phone.is-centre { z-index: 5; }
@keyframes ks-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
.ks-wall .ks-screen { background: var(--ks-ink); }
.ks-wall .ks-screen > img, .ks-wall .ks-screen > video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ks-wall .ks-mascot { position: absolute; z-index: 6; width: clamp(120px, 13vw, 190px); height: auto; left: max(8px, calc(50% - 520px)); bottom: 6px; filter: drop-shadow(0 20px 30px rgba(60, 24, 120, .22)); }
.ks-wall .ks-mascot.is-right { left: auto; right: max(8px, calc(50% - 520px)); }

/* ---------- "Our Socials" hero art (27 Oct 2026) ----------
   One scene for Instagram, Facebook and the shows, with three floating labels (text only, no platform logos). */
.ks-hero { position: relative; width: min(100%, 600px); margin: 0 auto; }
.ks-hero-art { display: block; width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(60, 24, 120, .18)); animation: ks-float 8s ease-in-out infinite; }
.ks-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .82); border: 1px solid rgba(255, 255, 255, .95); box-shadow: 0 12px 30px rgba(60, 24, 120, .14);
  font-weight: 800; font-size: clamp(12px, 1.25vw, 15px); color: var(--ks-ink); white-space: nowrap;
  animation: ks-bob 6s ease-in-out infinite;
}
.ks-chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ks-c, var(--ks-violet)); }
.ks-chip-ig { left: 0; top: 6%; --ks-c: var(--ks-bright); }
.ks-chip-fb { right: 0; bottom: 3%; --ks-c: var(--ks-royal); animation-delay: -2s; }
.ks-chip-show { left: 4%; top: 44%; --ks-c: var(--ks-teal); animation-delay: -4s; }

/* small accent mascots (v4, 27 Oct): one big hero character per page, the rest small */
.ks-pair .ks-mascot.ks-mascot-sm { width: clamp(120px, 12vw, 175px); }
.ks-fbpair .ks-mascot.ks-mascot-sm { width: clamp(110px, 11vw, 160px); }

/* "At the shows" accent (v5): Showtime, the cheerful host. Small, beside the shows heading. */
.ks-host { flex-shrink: 0; width: clamp(96px, 10vw, 150px); }
.ks-host img { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 26px rgba(60, 24, 120, .2)); animation: ks-bob 6s ease-in-out infinite; }

/* ---------- section 3: the Facebook page phone (27 Oct 2026) ----------
   Our page as it really is: our cover, our profile picture, our posts. No counts, no timestamps, no badge, no Facebook logo.
   The feed scrolls by itself (transform only); reduced motion leaves it at the top of the page. */
.ks-fbpair { display: flex; justify-content: center; align-items: center; gap: clamp(20px, 4vw, 56px); position: relative; padding: 24px 0 8px; scroll-margin-top: 96px; }
.ks-fbpair .ks-phone { --ks-w: clamp(250px, 25vw, 310px); transform: rotate(2deg); animation: ks-float2 7s ease-in-out infinite; }
.ks-fbpair > picture { flex: 0 0 auto; order: -1; } /* mascot on the left here (section 1 has it on the right) */
.ks-fbpair .ks-mascot { display: block; width: clamp(180px, 20vw, 280px); height: auto; filter: drop-shadow(0 24px 34px rgba(60, 24, 120, .22)); animation: ks-bob 6s ease-in-out infinite; }
.ks-fb { position: absolute; inset: 0; overflow: hidden; background: #f0eef6; font-size: 3.8cqw; line-height: 1.35; }
.ks-fb-bar { position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: 22cqw; padding: 10cqw 4cqw 0; display: flex; align-items: center; gap: 3cqw; background: #fff; border-bottom: 1px solid #ece8f6; }
.ks-fb-bar svg { width: 5.4cqw; height: 5.4cqw; flex-shrink: 0; }
.ks-fb-bar b { flex: 1; font-weight: 800; font-size: 4.4cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ks-fb-scroll { position: absolute; left: 0; right: 0; top: 22cqw; animation: ks-fbscroll 16s infinite; }
.ks-fb-cover { aspect-ratio: 820 / 428; overflow: hidden; background: #ddd5f3; }
.ks-fb-cover img, .ks-fb-media img, .ks-fb-avatar img, .ks-fb-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ks-fb-id { background: #fff; padding: 0 4.5cqw 4cqw; }
.ks-fb-avatar { position: relative; width: 30cqw; aspect-ratio: 1; margin-top: -15cqw; border-radius: 50%; overflow: hidden; border: 1.2cqw solid #fff; background: #fff; box-shadow: 0 1cqw 3cqw rgba(28, 22, 51, .15); }
.ks-fb-name { margin-top: 2cqw; font-weight: 800; font-size: 6.2cqw; line-height: 1.15; letter-spacing: -.02em; }
.ks-fb-cat { margin-top: 1cqw; color: var(--ks-muted); font-size: 3.6cqw; font-weight: 600; }
.ks-fb-actions { display: flex; gap: 2.4cqw; margin-top: 3.4cqw; }
.ks-fb-actions span { flex: 1; }
.ks-fb-tabs { display: flex; gap: 5cqw; padding: 2.4cqw 4.5cqw 0; background: #fff; border-top: 1px solid #ece8f6; color: var(--ks-muted); font-weight: 700; font-size: 3.7cqw; }
.ks-fb-tabs span { padding-bottom: 2.4cqw; }
.ks-fb-tabs .is-on { color: var(--ks-violet); box-shadow: inset 0 -0.8cqw 0 var(--ks-violet); }
.ks-fb-post { margin-top: 2.4cqw; background: #fff; }
.ks-fb-head { display: flex; align-items: center; gap: 2.4cqw; padding: 3.4cqw 4.5cqw 0; font-size: 3.8cqw; }
.ks-fb-mini { width: 9cqw; aspect-ratio: 1; flex-shrink: 0; border-radius: 50%; overflow: hidden; border: 1px solid #ece8f6; }
.ks-fb-post p { margin: 2.4cqw 4.5cqw 3cqw; font-size: 3.8cqw; font-weight: 600; }
.ks-fb-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #ece8f6; }
.ks-fb-foot { display: flex; justify-content: space-around; padding: 2.6cqw 2cqw; border-top: 1px solid #ece8f6; color: var(--ks-muted); font-size: 3.5cqw; font-weight: 700; }
.ks-fb-foot span { position: relative; display: inline-flex; align-items: center; gap: 1.4cqw; }
.ks-fb-foot svg { width: 4.6cqw; height: 4.6cqw; }
.ks-fb-like .ks-fb-on { position: absolute; left: 0; top: 50%; margin-top: -2.3cqw; opacity: 0; animation: ks-fbliked 16s linear infinite; }
.ks-fb-pop { position: absolute; left: 50%; top: 50%; width: 26cqw; height: 26cqw; margin: -13cqw 0 0 -13cqw; opacity: 0; filter: drop-shadow(0 1cqw 3cqw rgba(0, 0, 0, .3)); animation: ks-fbpop 16s linear infinite; }
/* 16 s: top of the page -> first post (liked) -> second post -> back to the top */
@keyframes ks-fbscroll {
  0%, 12% { transform: translateY(0); animation-timing-function: cubic-bezier(.65, 0, .35, 1); }
  20%, 44% { transform: translateY(-112cqw); animation-timing-function: cubic-bezier(.65, 0, .35, 1); }
  52%, 76% { transform: translateY(-272cqw); animation-timing-function: cubic-bezier(.65, 0, .35, 1); }
  86%, 100% { transform: translateY(0); }
}
@keyframes ks-fbpop {
  0%, 26% { opacity: 0; transform: scale(.3); }
  29% { opacity: 1; transform: scale(1.15); }
  32% { opacity: 1; transform: scale(1); }
  37%, 100% { opacity: 0; transform: scale(1.1); }
}
@keyframes ks-fbliked { 0%, 28% { opacity: 0; } 30%, 88% { opacity: 1; } 92%, 100% { opacity: 0; } }

/* phones: the wall becomes a swipe row */
@media (max-width: 700px) {
  .ks-pair { flex-direction: column; align-items: center; gap: 28px; padding-top: 8px; }
  /* fits a 390-430 px iPhone under the sticky nav: at most 80vw wide and ~100svh minus the nav tall */
  .ks-pair .ks-phone { --ks-w: min(80vw, 300px, calc((100svh - 160px) * 0.58)); }
  .ks-pair .ks-phone:first-of-type, .ks-pair .ks-phone.ks-reel-phone { transform: none; }
  .ks-pair > picture { align-self: center; }
  .ks-pair .ks-mascot { width: 140px; }
  .ks-wall { height: auto; perspective: none; overflow-x: auto; scroll-snap-type: x mandatory; padding: 16px 16px 24px; -webkit-overflow-scrolling: touch; scroll-margin-top: 96px; }
  .ks-wall-track { position: static; display: flex; gap: 14px; width: max-content; height: auto; transform: none; }
  .ks-wall .ks-phone { position: relative; --ks-w: 168px; transform: none; scroll-snap-align: center; }
  .ks-wall .ks-mascot { display: none; }
  .ks-wall:has(> picture) { height: auto; } /* keep the swipe row if mascots are ever added back */
  .ks-fbpair { flex-direction: column; gap: 20px; padding-top: 8px; }
  .ks-fbpair .ks-phone { --ks-w: min(80vw, 300px, calc((100svh - 160px) * 0.58)); transform: none; }
  .ks-fbpair > picture { order: 0; }
  .ks-fbpair .ks-mascot { width: 170px; }
  .ks-chip { padding: 6px 11px; font-size: 12px; }
  .ks-pair .ks-mascot.ks-mascot-sm, .ks-fbpair .ks-mascot.ks-mascot-sm { width: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  .ks *, .ks *::before, .ks *::after { animation: none !important; transition: none !important; }
  .ks-hearts { display: none; }
}

/* off-screen: freeze (set by social.js) */
.ks.is-off *, .ks.is-off *::before, .ks.is-off *::after { animation-play-state: paused !important; }
.ks-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
