/* Pemilih ilustrasi (adegan.js). Warna garis mengikuti currentColor halaman; ukuran mengikuti wadah. */
.adg { display: grid; gap: 1rem; justify-items: center; }
.adg__lukis { width: 100%; aspect-ratio: 320 / 220; color: inherit; transition: opacity .18s ease; }
.adg__lukis svg { display: block; width: 100%; height: 100%; overflow: visible; }
.adg__lukis path { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.adg__a path { stroke-width: 1.5; }
.adg__t path { stroke-width: .9; opacity: .8; }
.adg--pudar { opacity: 0; }
.adg__pilih { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.adg__pilih button {
  font: inherit; font-size: .8125rem; letter-spacing: .04em; color: inherit; background: transparent;
  border: 1px solid currentColor; border-radius: 999px; min-height: 44px; padding: 0 1rem; cursor: pointer;
  opacity: .72; transition: opacity .15s ease, background-color .15s ease, color .15s ease, transform .1s ease;
}
.adg__pilih button:hover { opacity: 1; }
.adg__pilih button:active { transform: scale(.96); }
.adg__pilih button[aria-pressed='true'] { opacity: 1; background: currentColor; }
.adg__pilih button[aria-pressed='true'] span { color: var(--adg-isi, #fff); }

@media (prefers-reduced-motion: no-preference) {
  /* Gambar baru digoreskan: garis utama dulu, garis detail menyusul. */
  .adg--gores path { stroke-dasharray: 1; stroke-dashoffset: 1; animation-name: adg-gores; animation-duration: .9s; animation-timing-function: cubic-bezier(.4, 0, .2, 1); animation-fill-mode: forwards; }
  .adg--gores .adg__t path { animation-delay: .35s; }
}
@keyframes adg-gores { to { stroke-dashoffset: 0; } }
.adg__foto { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity .18s ease; }
@media (prefers-reduced-motion: no-preference) {
  img.adg--gores { animation-name: adg-muncul; animation-duration: .5s; animation-fill-mode: both; }
}
@keyframes adg-muncul { from { opacity: 0; } }

/* Gaya cat air: garis sepia lebih tipis di atas sapuan warna; foil emas: garis sedikit lebih tebal. */
.adg__lukis[data-gaya='cat'] { color: #5a4636; }
.adg__lukis[data-gaya='cat'] .adg__a path { stroke-width: 1.2; }
.adg__cat { mix-blend-mode: multiply; opacity: .78; }
.adg__lukis[data-gaya='emas'] .adg__a path { stroke-width: 1.9; }
.adg__lukis > img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.adg__lukis[data-gaya='emas'] .adg__t path { stroke-width: 1.1; opacity: 1; }
.adg__gaya { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.adg__gaya button {
  font: inherit; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: inherit; background: transparent;
  border: 0; border-bottom: 1px solid transparent; min-height: 44px; padding: 0 .7rem; cursor: pointer; opacity: .7;
  transition: opacity .15s ease, border-color .15s ease;
}
.adg__gaya button:hover { opacity: 1; }
.adg__gaya button[aria-pressed='true'] { opacity: 1; border-bottom-color: currentColor; }
@media (prefers-reduced-motion: no-preference) {
  /* Cat menyusul sesudah garis tinta selesai, seperti diwarnai setelah tinta kering. */
  .adg--gores > img { animation-name: adg-muncul; animation-duration: .6s; animation-fill-mode: both; }
  .adg--gores .adg__cat path { stroke-dasharray: none; stroke-dashoffset: 0; animation-name: adg-muncul; animation-duration: .7s; animation-delay: .6s; animation-fill-mode: both; }
}

/* Crossfade pemilih lewat View Transition (adegan.js memberi nama dan kelas adg pada panggungnya). */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-group(*.adg) { animation-duration: .5s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
  ::view-transition-old(*.adg), ::view-transition-new(*.adg) { animation-duration: .5s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
}
