/* Motion belongs to the layout; text keeps the site's shared serif family. */
body { animation: page-arrive .45s ease-out both; }
@keyframes page-arrive { from { opacity: .45; } to { opacity: 1; } }
.home-hero h1 > span, .project-hero h1 > span { display: block; animation: title-arrive .9s cubic-bezier(.22,1,.36,1) both; }
.home-hero h1 > span:nth-child(2), .project-hero h1 > span:nth-child(2) { animation-delay: .13s; }
@keyframes title-arrive { from { opacity: 0; transform: translateY(26px); clip-path: inset(100% 0 0 0); } to { opacity: 1; transform: translateY(0); clip-path: inset(0); } }
.gallery-item { animation: item-arrive .8s cubic-bezier(.22,1,.36,1) both; }
.gallery-item:nth-child(2) { animation-delay: .08s; }
.gallery-item:nth-child(3) { animation-delay: .16s; }
.gallery-item:nth-child(4) { animation-delay: .24s; }
@keyframes item-arrive { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.motion-ready [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .65s ease, transform .65s cubic-bezier(.22,1,.36,1); }
.motion-ready [data-reveal].is-visible { opacity: 1; transform: none; }
.button .arrow, .card-link > span { transition: transform .25s; }
.button:hover .arrow, .card-link:hover > span { transform: translate(3px,-3px); }
.project-card { position: relative; background: #fff; }
.project-card:after { content: ''; position: absolute; pointer-events: none; bottom: 0; left: 0; width: 0; height: 2px; background: #a70f27; transition: width .4s; }
.project-card:hover:after, .project-card:focus-within:after { width: 100%; }
.card-preview { overflow: visible; }
.card-preview > img:first-child { transition: transform .8s cubic-bezier(.22,1,.36,1), filter .5s; }
.project-card:hover .card-preview > img:first-child { transform: translateY(-5px); filter: saturate(1.08); }
.project-card .project-icon { transition: transform .4s; }
.project-card:hover .project-icon { transform: translateY(-4px); }
.card-release { display: block; margin-top: 14px; color: #a70f27; font-size: .8125rem; line-height: 1.5; }
.preview-hint { color: #7f6b72; font-size: .875rem; }
.demo-gallery { width: 100%; }
.demo-stage { min-width: 0; position: relative; touch-action: pan-y; }
.demo-slide { margin: 0; }
.demo-slide[hidden] { display: none; }
.demo-zoom { display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 1px solid #eadfe1; background: #fcfafa; cursor: zoom-in; overflow: hidden; }
.demo-zoom img { width: 100%; height: 100%; object-fit: contain; animation: demo-arrive .55s cubic-bezier(.22,1,.36,1) both; }
@keyframes demo-arrive { from { opacity: .35; transform: scale(1.025) translateY(8px); } to { opacity: 1; transform: none; } }
.demo-slide figcaption { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; font-size: .875rem; color: #78656d; }
.demo-edge { position: absolute; top: calc(50% - 28px); transform: translateY(-50%); width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid #fff8; border-radius: 50%; background: #ffffffdf; color: #4c3b42; box-shadow: 0 3px 18px #2e151f15; padding: 0; opacity: 0; transition: opacity .2s, background .2s, color .2s; }
.demo-edge span { font-size: 34px; line-height: 1; margin-top: -4px; }
.demo-prev { left: 20px; }
.demo-next { right: 20px; }
.demo-stage:hover .demo-edge, .demo-stage:focus-within .demo-edge, .demo-stage.is-touch-active .demo-edge { opacity: 1; }
.demo-edge:hover { color: #a70f27; background: #fff; }
.demo-edge:focus-visible { outline: 2px solid #a70f27; outline-offset: 4px; }
.demo-status { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.image-dialog { width: min(1300px,calc(100vw - 32px)); max-height: 94dvh; border: 1px solid #dfccd2; background: #fff; padding: 24px; color: #292426; }
.image-dialog::backdrop { background: #24151adc; backdrop-filter: blur(8px); }
.image-dialog img { width: 100%; height: auto; max-height: 78dvh; object-fit: contain; }
.image-dialog [data-image-close] { display: block; margin-left: auto; background: #fff; border: 1px solid #dfccd2; width: 44px; height: 44px; margin-bottom: 12px; font-size: 26px; }
.image-dialog p { text-align: center; margin-top: 15px; }
.release-section { padding: 0 0 65px; }
.release-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,350px),1fr)); gap: 20px; }
.release-card { border: 1px solid #e7d9dc; padding: 26px; min-width: 0; }
.release-card h3 { font-size: 1.5rem; font-weight: 400; margin: 14px 0 10px; overflow-wrap: anywhere; }
.release-card .release-provider { color: #a70f27; font-size: .875rem; }
.release-card p { font-size: .875rem; line-height: 1.7; }
.release-card a { display: inline-flex; margin-top: 18px; color: #a70f27; border-bottom: 1px solid #dcb8c1; padding-bottom: 4px; }
.release-card details { margin-top: 22px; border-top: 1px solid #e7d9dc; padding-top: 14px; }
.release-card summary { cursor: pointer; }
.release-notes { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow-y: auto; font: inherit; font-size: .875rem; line-height: 1.8; margin-top: 14px; color: #716069; }
.release-live { display: flex; align-items: center; gap: 9px; font-size: .875rem; color: #a70f27; }
.release-live > span { width: 6px; height: 6px; background: #a70f27; border-radius: 50%; }
.draft-notice { padding: 12px 20px; background: #a70f27; color: #fff; font-size: .875rem; display: flex; align-items: center; justify-content: center; gap: 20px; }
.draft-notice a { text-decoration: underline; }
@media(max-width:760px) {
  .preview-hint { display: block; margin-top: 14px; }
  .demo-edge { width: 44px; height: 44px; top: calc(50% - 24px); }
  .demo-prev { left: 10px; } .demo-next { right: 10px; }
  .demo-slide figcaption { font-size: .8125rem; }
  .release-section { padding-bottom: 40px; }
  .release-live { margin-top: 14px; }
  .release-card { padding: 22px; }
  .image-dialog { padding: 12px; }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  *, *:before, *:after { animation: none !important; transition: none !important; }
  .motion-ready [data-reveal] { opacity: 1; transform: none; }
  .project-card:hover .card-preview > img:first-child, .project-card:hover .project-icon { transform: none; }
}
