/* Radius persentase menjaga lengkungan mockup tetap proporsional di semua ukuran. */
/* Menghitung rasio pada area gambar; ketebalan bingkai ditambahkan di luar agar tidak muncul celah atas/bawah. */
.showcase { width: min(100%, 560px); margin-inline: auto; }
.showcase-stage { position: relative; display: flex; justify-content: center; padding: 12px 0 28px; isolation: isolate; }
.showcase button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.showcase-screen { display: block; position: relative; width: min(74%, 286px); z-index: 2; flex-shrink: 0; aspect-ratio: 840 / 1826; box-sizing: content-box; padding: 0; overflow: hidden; border: 5px solid #34342f; border-radius: 16% / 7.4%; background: var(--surface); box-shadow: 0 24px 42px -18px #0005; touch-action: pan-y pinch-zoom; transition: transform 550ms cubic-bezier(.22,.61,.36,1); }
.showcase .showcase-screen { cursor: zoom-in; }
.showcase-screen:disabled { cursor: default; }
.screen-layer { position: absolute; inset: 0; display: block; transform: translateX(100%); transition: transform 520ms cubic-bezier(.22,.61,.36,1); pointer-events: none; }
.screen-layer.is-active { transform: translateX(0); }
.screen-layer.is-leaving { transform: translateX(-100%); }
.screen-layer.is-resetting { transition: none !important; }
.screen-layer img { width: 100%; height: 100%; object-fit: contain; }
.showcase-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 340px; margin: 16px auto 0; }
.showcase-caption { display: grid; text-align: center; gap: 2px; }
.showcase-title { font-size: 14px; font-weight: 500; }
.showcase-count { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.showcase-button { display: inline-grid; flex-shrink: 0; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; transition: background 200ms ease; }
.showcase-button:hover { background: var(--surface); }
.showcase-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

@media (max-width: 680px) {
  .showcase { max-width: 560px; }
  .showcase-screen { width: min(74%, 272px); }
  .showcase-stage { padding: 12px 0 24px; }
}
@media (prefers-reduced-motion: reduce) { .screen-layer, .showcase-screen { transition: none; } }
@media print { .showcase-controls { display: none; } }

/* Memperlihatkan halaman tetangga sebagai petunjuk galeri tanpa label tambahan. */
.showcase-peek { position: absolute; top: 7%; width: min(62%, 260px); aspect-ratio: 840 / 1826; box-sizing: content-box; padding: 0; overflow: hidden; border: 3px solid #484940; border-radius: 16% / 7.4%; background: var(--surface); opacity: .58; box-shadow: 0 16px 30px -16px #0005; transition: opacity 450ms ease, transform 550ms cubic-bezier(.22,.61,.36,1), width 550ms cubic-bezier(.22,.61,.36,1), left 550ms cubic-bezier(.22,.61,.36,1), top 550ms cubic-bezier(.22,.61,.36,1); }
.showcase-peek .screen-layer { border-radius: inherit; }
.showcase-peek img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.showcase-peek-previous { left: calc(50% - min(43%, 180px)); transform: rotate(-5deg) scale(.94); }
.showcase-peek-next { left: calc(50% - min(19%, 80px)); transform: rotate(5deg) scale(.94); }
.showcase-peek:hover, .showcase-peek:focus-visible { opacity: .9; }
.showcase-controls { gap: 8px; }
.showcase-caption { flex: 1; min-width: 0; }
.showcase-playback { width: 40px; height: 40px; }
@media (prefers-reduced-motion: reduce) { .showcase-peek { transition: none; } }

/* Seluruh tumpukan screenshot menerima swipe, tanpa menghalangi scroll halaman. */
.showcase-stage { touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none; }
.showcase-stage img { -webkit-user-drag: none; }
.showcase .showcase-screen { cursor: grab; }
.showcase-stage.is-swiping .showcase-screen { cursor: grabbing; transition: none; }

/* Menjaga posisi bingkai tetap stabil saat isi layar bergeser ke kiri. */
.showcase-peek-previous { transform: rotate(-5deg) scale(.94); }
.showcase-peek-next { transform: rotate(5deg) scale(.94); }
.showcase-stage.is-swiping .showcase-peek { transition: none; }

/* Lingkaran hitung mundur menggunakan tenggat autoplay yang sama, tanpa label tambahan. */
.showcase-playback { position: relative; }
.showcase-button .showcase-countdown { position: absolute; inset: -1px; width: 40px; height: 40px; transform: rotate(-90deg); pointer-events: none; stroke: var(--accent); stroke-width: 1.5; }
.showcase-countdown circle { fill: none; stroke-linecap: round; }

/* Membuka cuplikan ke samping saat hover tanpa mengubah rasio screenshot. */
@media (hover: hover) and (pointer: fine) {
  .showcase:not(.is-expanded) .showcase-stage:hover .showcase-peek { opacity: .8; }
  .showcase:not(.is-expanded) .showcase-stage:hover .showcase-peek-previous { transform: translateX(-22px) rotate(-7deg) scale(.98); }
  .showcase:not(.is-expanded) .showcase-stage:hover .showcase-peek-next { transform: translateX(22px) rotate(7deg) scale(.98); }
}

/* Mengubah mode hanya lewat animasi mockup; layout hero tetap stabil. */
.showcase.is-expanded { width: min(100%, 560px); }
.showcase.is-expanded .showcase-screen { transform: scale(.64); cursor: pointer; }
.showcase.is-expanded .showcase-peek { width: min(74%, 286px); top: calc(50% - 8px); opacity: 1; transform: translate(-50%, -50%) scale(.56); }
.showcase.is-expanded .showcase-peek-previous { left: 15%; }
.showcase.is-expanded .showcase-peek-next { left: 85%; }
@media (max-width: 680px) {
  .showcase.is-expanded .showcase-peek { width: min(74%, 272px); top: calc(50% - 6px); }
}

/* Menjaga kolom, judul, dan ukuran area galeri sama pada kedua mode agar tidak meloncat. */
@media (min-width: 1001px) {
  .hero { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 40px; }
  .hero h1 { font-size: clamp(40px, 4.2vw, 54px); }
}
@media (min-width: 681px) and (max-width: 1000px) {
  .showcase.is-expanded .showcase-screen { transform: scale(.5); }
  .showcase.is-expanded .showcase-peek { transform: translate(-50%, -50%) scale(.42); }
}
@media (max-width: 680px) {
  .showcase.is-expanded { max-width: 560px; }
}
@media (max-width: 480px) {
  .showcase.is-expanded .showcase-screen { transform: scale(.5); }
  .showcase.is-expanded .showcase-peek { transform: translate(-50%, -50%) scale(.42); }
}
