diff --git a/game.html b/game.html index ed303f0..8aa5d28 100644 --- a/game.html +++ b/game.html @@ -739,6 +739,73 @@ .entry-actions { justify-content: flex-start; } } [x-cloak] { display: none !important; } + + /* ── Animation ──────────────────────────────────────────────────── */ + @media (prefers-reduced-motion: no-preference) { + + /* Alpine x-transition utility classes (used by toast + modals) */ + .transition { transition-property: opacity, transform; } + .ease-out { transition-timing-function: cubic-bezier(0.22,1,.36,1); } + .ease-in { transition-timing-function: cubic-bezier(0.4,0,1,1); } + .duration-150 { transition-duration: 150ms; } + .duration-200 { transition-duration: 200ms; } + .duration-250 { transition-duration: 250ms; } + .duration-300 { transition-duration: 300ms; } + .opacity-0 { opacity: 0; } + .opacity-100 { opacity: 1; } + .translate-y-2 { transform: translateY(8px); } + .translate-y-0 { transform: translateY(0); } + + /* Card draw — comes up from below with a slight tilt */ + .card-frame { + opacity: 1; + transform: translateY(0) scale(1) rotate(0deg); + transition: opacity 0.45s cubic-bezier(0.22,1,.36,1), + transform 0.45s cubic-bezier(0.22,1,.36,1); + } + @starting-style { + .card-frame { + opacity: 0; + transform: translateY(42px) scale(0.92) rotate(-1.5deg); + } + } + + /* Modal backdrop fade */ + .modal-overlay { + transition: opacity 0.22s cubic-bezier(0.22,1,.36,1); + opacity: 1; + } + @starting-style { .modal-overlay { opacity: 0; } } + + /* Modal inner panel slides up */ + .modal { + transition: opacity 0.3s cubic-bezier(0.22,1,.36,1), + transform 0.3s cubic-bezier(0.22,1,.36,1); + opacity: 1; + transform: translateY(0) scale(1); + } + @starting-style { + .modal { + opacity: 0; + transform: translateY(18px) scale(0.97); + } + } + + /* Chronicle entry scroll reveals */ + .entry[data-reveal] { + opacity: 0; + transform: translateY(18px); + transition: opacity 0.5s cubic-bezier(0.22,1,.36,1), + transform 0.5s cubic-bezier(0.22,1,.36,1); + } + .entry[data-reveal].revealed { opacity: 1; transform: translateY(0); } + + /* Button press */ + .btn:active { + transform: translateY(1px) scale(0.98); + transition-duration: 0.06s !important; + } + } @@ -1147,9 +1214,11 @@
Chronicle updated @@ -1176,7 +1245,13 @@ -