/* Motion beranda Hminus (K26). Pasangan gerak.js; hanya translate/scale/opacity, tanpa mengubah tata letak pen. */
/* Pembungkus memakai clip (bukan hidden) agar header lengket bekerja. */
.versi-meja > div:first-child, .versi-hp > div:first-child { overflow: clip; }
.versi-meja > div:first-child > div:first-child,
.versi-hp > div:first-child > div:first-child { position: sticky; top: 0; z-index: 50; }
.gerak-header-gulir {
  background-color: rgba(255, 255, 255, .88);
  box-shadow: 0 1px 0 rgba(58, 53, 65, .08);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* Menu HP (ikon pen dijadikan tombol); area sentuh 44 px tanpa menggeser tata letak. */
.gerak-menu-tombol {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px; margin: -10px; border: 0; border-radius: 10px; background: none; color: inherit; cursor: pointer;
}
.gerak-menu-tombol:focus-visible { outline: 2px solid #CC0878; outline-offset: 2px; }
.gerak-menu {
  position: absolute; top: calc(100% + 8px); left: 16px; right: 16px; z-index: 60;
  display: grid; gap: 4px; padding: 12px; border-radius: 16px; background: #fff;
  box-shadow: 0 18px 48px rgba(35, 58, 89, .18), 0 0 0 1px rgba(58, 53, 65, .08);
  font: 500 16px/1.25 Inter, system-ui, sans-serif;
}
.gerak-menu[hidden] { display: none; }
.gerak-menu a { display: flex; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 10px; color: #3A3541; }
.gerak-menu a:hover, .gerak-menu a:focus-visible { background: #FEE3EC; outline: none; }
.gerak-menu a.gerak-menu-cta { justify-content: center; margin-top: 6px; background: #CC0878; color: #fff; }
.versi-hp > div:first-child > div:first-child { position: sticky; }

@media (prefers-reduced-motion: no-preference) {
  .gerak-menu:not([hidden]) { animation: gerak-naik .22s cubic-bezier(.2, .7, .2, 1); }
  .versi-meja > div:first-child > div:first-child,
  .versi-hp > div:first-child > div:first-child { transition: background-color .2s, box-shadow .2s; }

  .gerak-siap .gerak-hero { animation: gerak-naik .6s cubic-bezier(.2, .7, .2, 1) var(--jeda, 0ms) both; }
  @keyframes gerak-naik { from { opacity: 0; translate: 0 16px; } }

  .gerak-siap .gerak-tunggu { opacity: 0; translate: 0 16px; }
  .gerak-masuk {
    transition: opacity .5s cubic-bezier(.2, .7, .2, 1), translate .5s cubic-bezier(.2, .7, .2, 1);
    transition-delay: var(--jeda, 0ms);
  }

  /* Mockup desktop melayang pelan setelah masuk; berhenti saat tidak terlihat. */
  @media (min-width: 1024px) {
    .gerak-siap .gerak-melayang {
      animation: gerak-naik .6s cubic-bezier(.2, .7, .2, 1) .4s both, gerak-layang 6s ease-in-out 1s infinite;
    }
    .gerak-siap .gerak-melayang.gerak-jeda { animation-play-state: running, paused; }
  }
  @keyframes gerak-layang { 50% { translate: 0 -6px; } }

  /* Kelopak berjatuhan (hero). Tanpa pointer-events; lapis dihentikan saat hero tidak terlihat. */
  .gerak-kelopak-induk { position: relative; }
  .gerak-kelopak-lapis { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; }
  .gerak-kelopak {
    position: absolute; top: -48px; width: var(--u); height: calc(var(--u) * 1.5);
    --op: .62; opacity: 0; filter: blur(.6px); will-change: translate;
    animation: gerak-jatuh var(--jatuh) linear var(--tunda) infinite;
  }
  .gerak-kelopak-depan { --op: .92; filter: drop-shadow(0 2px 3px rgba(173, 40, 104, .18)); }
  .gerak-kelopak i { display: block; animation: gerak-ayun var(--ayun) ease-in-out var(--tunda) infinite alternate; }
  .gerak-kelopak svg { display: block; animation: gerak-putar var(--putar) linear var(--tunda) infinite; }
  .gerak-jeda .gerak-kelopak, .gerak-jeda .gerak-kelopak i, .gerak-jeda .gerak-kelopak svg { animation-play-state: paused; }
  @keyframes gerak-jatuh {
    0% { translate: 0 0; opacity: 0; }
    8% { opacity: var(--op, 1); }
    90% { opacity: var(--op, 1); }
    100% { translate: var(--hanyut) calc(var(--tinggi, 900px) + 96px); opacity: 0; }
  }
  @keyframes gerak-ayun { from { translate: calc(var(--lebar) * -1) 0; } to { translate: var(--lebar) 0; } }
  @keyframes gerak-putar { to { transform: rotate3d(var(--sumbu), 360deg) rotate(200deg); } }

  .gerak-tombol { transition: scale .12s ease-out; }
  .gerak-tombol:active { scale: .97; }
}
@media (max-width: 1023px) {
  .versi-hp {
    --gerak-titik: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='25' height='25'%3E%3Ccircle cx='3' cy='4' r='1.2' fill='%23CC0878' fill-opacity='.09'/%3E%3C/svg%3E");
    --gerak-bunga: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='62' height='58' viewBox='-14 -15 62 58'%3E%3Cg fill='none' stroke='%23CC0878' stroke-opacity='.13'%3E%3Cpath id='p' d='M0 0C-6-2-5-11-2-10Q0-13 2-10C5-11 6-2 0 0Z'/%3E%3Cuse href='%23p' transform='rotate(72)'/%3E%3Cuse href='%23p' transform='rotate(144)'/%3E%3Cuse href='%23p' transform='rotate(216)'/%3E%3Cuse href='%23p' transform='rotate(288)'/%3E%3C/g%3E%3C/svg%3E");
    --gerak-garis: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='40'%3E%3Cpath d='M-24 20Q0 3 24 20T72 20T120 20' fill='none' stroke='%23E9088A' stroke-opacity='.08'/%3E%3C/svg%3E");
  }
  .versi-hp > div:first-child > div:nth-child(n+2):nth-child(-n+10) {
    position: relative;
    isolation: isolate;
  }
  .versi-hp > div:first-child > div:nth-child(2)::before,
  .versi-hp > div:first-child > div:nth-child(3)::before,
  .versi-hp > div:first-child > div:nth-child(4)::before,
  .versi-hp > div:first-child > div:nth-child(4)::before,
  .versi-hp > div:first-child > div:nth-child(5)::before,
  .versi-hp > div:first-child > div:nth-child(6)::before,
  .versi-hp > div:first-child > div:nth-child(7)::before,
  .versi-hp > div:first-child > div:nth-child(8)::before,
  .versi-hp > div:first-child > div:nth-child(9)::before,
  .versi-hp > div:first-child > div:nth-child(10)::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.5;
  }

  .versi-hp > div:first-child > div:nth-child(2)::before {
    background: radial-gradient(circle at 15% 20%, rgba(233, 8, 138, .08), transparent 40%),
                radial-gradient(circle at 85% 70%, rgba(249, 198, 220, .06), transparent 45%),
                var(--gerak-garis) repeat-x;
    background-position: 0 0, 0 0, 0 50%;
  }
  .versi-hp > div:first-child > div:nth-child(3)::before {
    background: radial-gradient(circle at 10% 50%, rgba(204, 8, 120, .05), transparent 35%),
                radial-gradient(circle at 90% 20%, rgba(254, 227, 236, .08), transparent 40%),
                var(--gerak-titik) repeat;
    background-position: 0 0, 0 0, 0 0;
  }
  .versi-hp > div:first-child > div:nth-child(4)::before {
    background: radial-gradient(circle at 50% 100%, rgba(249, 198, 220, .1), transparent 50%),
                radial-gradient(circle at 20% 10%, rgba(233, 8, 138, .04), transparent 30%),
                var(--gerak-bunga) repeat;
    background-position: 0 0, 0 0, 0 0;
  }
  .versi-hp > div:first-child > div:nth-child(4)::before {
    background: radial-gradient(circle at 85% 80%, rgba(204, 8, 120, .06), transparent 40%),
                radial-gradient(circle at 10% 30%, rgba(249, 198, 220, .05), transparent 35%),
                var(--gerak-titik) repeat;
    background-position: 0 0, 0 0, 0 0;
  }
  .versi-hp > div:first-child > div:nth-child(5)::before {
    background: radial-gradient(circle at 50% 50%, rgba(233, 8, 138, .04), transparent 35%),
                radial-gradient(circle at 75% 15%, rgba(254, 227, 236, .07), transparent 40%),
                var(--gerak-garis) repeat-x;
    background-position: 0 0, 0 0, 0 30%;
  }
  .versi-hp > div:first-child > div:nth-child(6)::before {
    background: radial-gradient(circle at 20% 80%, rgba(249, 198, 220, .08), transparent 45%),
                radial-gradient(circle at 90% 50%, rgba(233, 8, 138, .05), transparent 40%),
                var(--gerak-titik) repeat;
    background-position: 0 0, 0 0, 0 0;
  }
  .versi-hp > div:first-child > div:nth-child(7)::before {
    background: radial-gradient(circle at 80% 20%, rgba(204, 8, 120, .06), transparent 35%),
                radial-gradient(circle at 15% 70%, rgba(254, 227, 236, .07), transparent 40%),
                var(--gerak-bunga) repeat;
    background-position: 0 0, 0 0, 0 0;
  }
  .versi-hp > div:first-child > div:nth-child(8)::before {
    background: radial-gradient(circle at 50% 0%, rgba(249, 198, 220, .09), transparent 50%),
                var(--gerak-garis) repeat-x;
    background-position: 0 0, 0 50%;
  }
  .versi-hp > div:first-child > div:nth-child(9)::before {
    background: radial-gradient(circle at 10% 50%, rgba(233, 8, 138, .05), transparent 40%),
                radial-gradient(circle at 85% 85%, rgba(254, 227, 236, .06), transparent 35%),
                var(--gerak-titik) repeat;
    background-position: 0 0, 0 0, 0 0;
  }
  .versi-hp > div:first-child > div:nth-child(10)::before {
    background: radial-gradient(circle at 50% 50%, rgba(204, 8, 120, .08), transparent 50%),
                radial-gradient(circle at 20% 20%, rgba(233, 8, 138, .04), transparent 30%),
                var(--gerak-bunga) repeat;
    background-position: 0 0, 0 0, 0 0;
    animation: gerak-kilau 20s ease-in-out infinite;
  }
  .versi-hp > div:first-child > div:nth-child(11) { position: relative; isolation: isolate; }
  .versi-hp > div:first-child > div:nth-child(11)::before {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: var(--gerak-bunga), radial-gradient(ellipse at 85% 65%, #F9C6DC, transparent 65%),
      linear-gradient(130deg, #FFF8FC, #FCE1F1 55%, #FEE3EC);
  }
  .versi-hp > div:first-child > div:nth-child(11) > div:nth-child(-n+2) { opacity: .38; }
  .versi-hp > div:first-child > div:nth-child(9) { background-image: linear-gradient(135deg, #FFF4F8, #FEE3EC 65%, #FCE1F1); }
  .versi-hp > div:first-child > div:is(:nth-child(2), :nth-child(11))::after {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(ellipse at 15% 20%, #F9C6DC99, transparent 55%),
      radial-gradient(ellipse at 85% 72%, #FCE1F1, transparent 62%);
  }
  .versi-hp > div:first-child > div:nth-child(11)::after {
    background: radial-gradient(ellipse at 30% 35%, #FFF, transparent 56%);
    opacity: .7;
  }
}

@media (prefers-reduced-motion: no-preference) and (max-width: 1023px) {
  .gerak-siap .gerak-tunggu { translate: 0 12px; }
  .versi-hp > div:first-child > div:is(:nth-child(2), :nth-child(11))::after {
    animation: gerak-aurora 16s ease-in-out infinite;
  }
  @keyframes gerak-aurora { 50% { translate: 8% 5%; scale: 1.14; opacity: .55; } }
  @supports (animation-timeline: view()) {
    .versi-hp .gerak-judul-gulir {
      animation: gerak-masuk-gulir linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 30%;
    }
    @keyframes gerak-masuk-gulir {
      from { opacity: 0; translate: 0 24px; scale: .94; }
    }

    .gerak-siap .versi-hp .gerak-melayang {
      animation: gerak-naik .6s cubic-bezier(.2, .7, .2, 1) var(--jeda) both,
        gerak-keluar-gulir linear forwards;
      animation-timeline: auto, --gerak-bagian;
      animation-range: normal, exit 0% exit 100%;
    }
    @keyframes gerak-keluar-gulir {
      from { transform: none; border-radius: 20px; }
      to { transform: translateY(-12px) scale(.92); border-radius: 32px; }
    }

    .versi-hp > div:first-child > div:is(:nth-child(6), :nth-child(8)) [role="img"] {
      animation: gerak-paralaks linear both;
      animation-timeline: view();
    }
    @keyframes gerak-paralaks {
      from { translate: 0 -16px; }
      to { translate: 0 16px; }
    }

    .versi-hp > div:first-child > div:nth-child(n+2):nth-child(-n+11) { view-timeline-name: --gerak-bagian; }
    .versi-hp > div:first-child > div:nth-child(n+2):nth-child(-n+11)::before {
      animation: gerak-dekor-geser linear both;
      animation-timeline: --gerak-bagian;
    }
    @keyframes gerak-dekor-geser {
      from { transform: translateY(-10px) scale(1.03); }
      to { transform: translateY(10px) scale(1.03); }
    }

    body:has(.versi-hp)::before {
      content: '';
      position: fixed; inset: 0 0 auto; height: 3px;
      background: linear-gradient(90deg, #E9088A, #F9C6DC);
      z-index: 100; pointer-events: none;
      animation: gerak-progres linear both;
      animation-timeline: scroll(root);
      transform-origin: left;
    }
    @keyframes gerak-progres {
      from { transform: scaleX(0); }
      to { transform: scaleX(1); }
    }
  }

  .gerak-cta-lengket:not([hidden]) { animation: gerak-naik .22s cubic-bezier(.2, .7, .2, 1); }
  .versi-hp > div:first-child > div:is(:nth-child(5), :nth-child(7)) > div:nth-child(2) > div:active { scale: .98; }
}

.gerak-cta-lengket { display: none; }
@media (max-width: 1023px) {
  .gerak-cta-lengket:not([hidden]) {
    display: flex; align-items: center; justify-content: center;
    position: fixed; bottom: 6px; left: 16px; right: 16px;
    min-height: calc(48px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #CC0878; color: #fff;
    border-radius: 14px;
    font: 600 16px/1.25 Inter, system-ui, sans-serif;
    box-shadow: 0 8px 20px rgba(204, 8, 120, .24);
    z-index: 49;
  }
  .gerak-cta-lengket:focus-visible { outline: 2px solid #CC0878; outline-offset: 2px; }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .gerak-kartu { transition: translate .2s ease-out, box-shadow .2s ease-out; }
  .gerak-kartu:hover { translate: 0 -4px; box-shadow: 0 12px 28px rgba(35, 58, 89, .14); }
  .gerak-kartu [role="img"] { transition: scale .3s ease-out; }
  .gerak-kartu:hover [role="img"] { scale: 1.03; }
}

/* Logo mitra HP: running text, tidak menumpuk jadi beberapa baris. */
@media (max-width: 1023px) {
  .versi-hp .gerak-jalan {
    display: block; overflow: hidden; cursor: pointer;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  }
  .gerak-jalan-isi { display: flex; gap: 16px; width: max-content; }
  .gerak-jalan:focus-visible { outline: 2px solid #CC0878; outline-offset: 4px; }
}
@media (max-width: 1023px) and (prefers-reduced-motion: no-preference) {
  .gerak-jalan-isi { animation: gerak-jalan 24s linear infinite; }
  .gerak-jalan:hover .gerak-jalan-isi, .gerak-jeda .gerak-jalan-isi, .gerak-jeda-manual .gerak-jalan-isi { animation-play-state: paused; }
}
@media (max-width: 1023px) and (prefers-reduced-motion: reduce) {
  .versi-hp .gerak-jalan { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .gerak-jalan-isi > [aria-hidden="true"] { display: none; }
}
/* Setengah jalur + setengah celah = tepat satu set logo, sehingga putaran tanpa sambungan. */
@keyframes gerak-jalan { to { transform: translateX(calc(-50% - 8px)); } }
