/* ---------- Logo: letters drop in ---------- */
.logo__l > text { transform-box: fill-box; }
.js .logo__fill, .js .logo__shadow { animation: letterDrop .9s var(--ease-bounce) both; animation-delay: calc(var(--i) * 90ms + 150ms); }
.js .logo__shadow { animation-name: shadowDrop; animation-delay: calc(var(--i) * 90ms + 260ms); }
@keyframes letterDrop {
  0% { transform: translateY(-140px) rotate(-12deg); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: none; opacity: 1; }
}
@keyframes shadowDrop {
  0% { transform: translate(-7px, -7px); opacity: 0; }
  100% { transform: none; opacity: 1; }
}
.js .hero__tag { animation: fadeUp .8s var(--ease-out) .8s both; }
.js .hero__links, .js .hero__cta, .js .status { animation: fadeUp .8s var(--ease-out) both; }
.js .status { animation-delay: .1s; }
.js .hero__links { animation-delay: 1s; }
.js .hero__cta { animation-delay: 1.15s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Pint: fills up, foam, bubbles, tilt on scroll ---------- */
.hero__glass { transform: translateY(calc(var(--p, 0) * 80px)) rotate(calc(var(--p, 0) * -16deg)); transform-origin: 50% 100%; will-change: transform; }
.pint__beer, .pint__foam { transform-box: view-box; }
.js .pint__beer { animation: beerFill 1.8s var(--ease-out) .3s both; }
.js .pint__foam { animation: foamRise 1.8s var(--ease-out) .3s both, foamWobble 3.5s ease-in-out 2.1s infinite; }
.pint__head { transform-box: fill-box; transform-origin: 50% 100%; }
.js .pint__head { animation: headPop .6s var(--ease-bounce) 1.75s both, foamWobble 3.5s ease-in-out 2.4s infinite; }
@keyframes headPop { from { transform: scaleY(0); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes beerFill { from { transform: translateY(200px); } to { transform: none; } }
@keyframes foamRise { from { transform: translateY(200px); } to { transform: none; } }
@keyframes foamWobble { 0%, 100% { transform: none; } 50% { transform: translateY(2px) scaleY(1.02); } }
.pint__bubbles circle { transform-box: fill-box; animation: pintBubble 2.6s linear infinite; animation-delay: calc(var(--d) + 1.6s); opacity: 0; }
@keyframes pintBubble {
  0% { transform: translate(0, 0); opacity: 0; }
  15% { opacity: .9; }
  50% { transform: translate(var(--x), -95px); }
  90% { opacity: .8; }
  100% { transform: translate(0, -185px); opacity: 0; }
}

/* ---------- Status dot ---------- */
.status.is-open .status__dot { animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); } 100% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); } }

.hero__scroll { animation: nudge 2s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); transition-delay: calc(var(--i, 0) * 45ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .card.reveal.is-visible:hover { transition-delay: 0s; }

/* ---------- Order mode: qty controls slide in ---------- */
body.mode-order .card .qty { animation: qtyIn .4s var(--ease-bounce) both; animation-delay: calc(var(--i, 0) * 30ms); }
@keyframes qtyIn { from { opacity: 0; transform: translateX(16px) scale(.8); } to { opacity: 1; transform: none; } }

.qty__val.bump, .orderbar__total.bump { animation: bump .35s var(--ease-bounce); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.orderbar__total { display: inline-block; transform-origin: left center; }

/* ---------- Price shine ---------- */
.card__price::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 246, 227, .55) 50%, transparent 70%);
}
@media (hover: hover) { .card:hover .card__price::after { transform: translateX(120%); transition: transform .8s var(--ease-out); } }

/* ---------- Order bar ---------- */
.orderbar.is-in .orderbar__inner { animation: barIn .5s var(--ease-bounce) both; }
@keyframes barIn { from { transform: translateY(120%); } to { transform: none; } }
.minipint__beer, .minipint__foam { transform-box: view-box; transform: translateY(calc((1 - var(--level, 0)) * 48px)); transition: transform .6s var(--ease-bounce); }
.minipint.slosh { animation: slosh .5s ease-in-out; transform-origin: 50% 100%; }
@keyframes slosh { 0%,100% { transform: rotate(0); } 30% { transform: rotate(-9deg); } 65% { transform: rotate(6deg); } }

/* ---------- Tap wall ---------- */
.tap__liquid, .tap__foam { transform-box: view-box; transform: translateY(34px); transition: transform .7s var(--ease-bounce); }
.tap:hover .tap__liquid, .tap:hover .tap__foam,
.tap[aria-pressed="true"] .tap__liquid, .tap[aria-pressed="true"] .tap__foam { transform: none; }
.tapinfo.swap { animation: fadeUp .4s var(--ease-out); }

/* ---------- Category nav ---------- */
.catnav__indicator.is-on { opacity: 1; }

/* ---------- Dialogs ---------- */
.sheet[open] { animation: sheetUp .45s var(--ease-out); }
.sheet[open]::backdrop { animation: fade .3s ease-out; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 768px) {
  .sheet--checkout[open] { animation-name: sheetLeft; }
  .sheet--small[open] { animation-name: pop; }
}
@keyframes sheetLeft { from { transform: translateX(60px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.totop:not([hidden]) { animation: pop .3s var(--ease-bounce); }

/* ---------- Cheers ---------- */
.cheers:not([hidden]) { animation: fade .25s ease-out; }
.cheers:not([hidden]) .cheers__card { animation: pop .4s var(--ease-bounce); }
.cheers__g--l { transform-origin: 100% 100%; }
.cheers__g--r { transform-origin: 0% 100%; }
.cheers:not([hidden]) .cheers__g--l { animation: clinkL 1s var(--ease-out) .15s both; }
.cheers:not([hidden]) .cheers__g--r { animation: clinkR 1s var(--ease-out) .15s both; }
.cheers:not([hidden]) .cheers__spark { animation: spark .6s ease-out .62s both; }
@keyframes clinkL { 0% { transform: translateX(-70px) rotate(-8deg); } 55% { transform: translateX(4px) rotate(14deg); } 70% { transform: translateX(-2px) rotate(10deg); } 100% { transform: translateX(-2px) rotate(8deg); } }
@keyframes clinkR { 0% { transform: translateX(70px) rotate(8deg); } 55% { transform: translateX(-4px) rotate(-14deg); } 70% { transform: translateX(2px) rotate(-10deg); } 100% { transform: translateX(2px) rotate(-8deg); } }
@keyframes spark { 0% { opacity: 0; transform: translateY(0) scaleY(.4); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(-22px) scaleY(1); } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important;
    transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
  .hero__glass { transform: none; }
  .pint__bubbles { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
