/* ================================================================ celebrate-1129: Concept A, "The Deed Fan Stage" (Color Set / All Utilities / All Transport).
   Neon's mockup design/concept_a_red_1440.png and storyboard design/storyboard_concept_a.png. Built in app.js celaPlaque()/showCel().
   Canon Bix (bix_present / bix_cheer / bix_tiphat) left, chamfered brass frame round a deep-navy plate, a kicker ribbon in the exact
   set colour (--set) with ink picked for contrast (--set-ink), the set name, "<who> owns it all!", the Bix line, and a fan of the set's
   deed cards under a struck-brass stamp. Timeline: 0 plate .92 -> 1; .35 s Bix springs from bottom-left; .75 s deeds fan + stamp
   (confetti from showCel); 1.2 s one brass glint, the quote and the close button settle; out: 260 ms fade.
   Reduced motion (.still or the media query): the finished plate, static. The overlay stays non-blocking (pointer-events only on the plate). */
.celebrate.cel-a { --brass: linear-gradient(135deg, #fff0b0 0%, #e9b949 22%, #9c6413 48%, #f6d27a 70%, #b07a1c 100%);
  --navy0: #0a142d; --navy1: #102047; --navy2: #172b5c; --ch: 26px; }
.cela { pointer-events: auto; cursor: pointer; position: relative; box-sizing: border-box; width: min(880px, calc(100vw - 24px)); padding: 3px;
  filter: drop-shadow(0 0 26px color-mix(in srgb, var(--set) 62%, transparent)) drop-shadow(0 18px 34px rgba(0, 0, 0, .55));
  animation: celaIn .5s cubic-bezier(.2, 1.35, .4, 1) both; -webkit-tap-highlight-color: transparent; }
.cela::before { content: ''; position: absolute; inset: 0; background: var(--brass);
  clip-path: polygon(var(--ch) 0, calc(100% - var(--ch)) 0, 100% var(--ch), 100% calc(100% - var(--ch)), calc(100% - var(--ch)) 100%, var(--ch) 100%, 0 calc(100% - var(--ch)), 0 var(--ch)); }
.cela-plate { --c2: calc(var(--ch) - 1.5px); position: relative; overflow: hidden; display: grid; grid-template-columns: 190px minmax(0, 1fr) 236px; align-items: center; gap: 4px 18px;
  min-height: 230px; padding: 18px 24px 18px 14px; box-sizing: border-box; color: #f3efe4;
  background: radial-gradient(ellipse 52% 90% at 13% 60%, color-mix(in srgb, var(--set) 34%, transparent), transparent 70%),
    radial-gradient(ellipse 40% 80% at 88% 50%, color-mix(in srgb, var(--set) 22%, transparent), transparent 72%),
    linear-gradient(180deg, var(--navy2), var(--navy1) 45%, var(--navy0));
  clip-path: polygon(var(--c2) 0, calc(100% - var(--c2)) 0, 100% var(--c2), 100% calc(100% - var(--c2)), calc(100% - var(--c2)) 100%, var(--c2) 100%, 0 calc(100% - var(--c2)), 0 var(--c2)); }
.cela-plate::after { content: ''; position: absolute; inset: 7px; pointer-events: none; border: 1px solid rgba(240, 200, 110, .28);
  clip-path: polygon(20px 0, calc(100% - 20px) 0, 100% 20px, 100% calc(100% - 20px), calc(100% - 20px) 100%, 20px 100%, 0 calc(100% - 20px), 0 20px); }
.cela-glint { position: absolute; inset: 0; z-index: 30; pointer-events: none; background: linear-gradient(104deg, transparent 38%, rgba(255, 236, 180, .0) 42%, rgba(255, 240, 196, .34) 50%, rgba(255, 236, 180, 0) 58%, transparent 62%) no-repeat;
  background-size: 260% 100%; background-position: 130% 0; mix-blend-mode: screen; animation: celaGlint 1.5s 1.2s cubic-bezier(.45, 0, .3, 1) both; }

.cela-bixbox { position: relative; align-self: end; display: flex; justify-content: center; align-items: flex-end; height: 214px; margin-bottom: -10px; }
.cela-bixbox::before { content: ''; position: absolute; left: 10%; right: 10%; bottom: 8px; height: 22px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .5), transparent); }
.cela-bix { position: relative; height: 208px; width: auto; max-width: 100%; object-fit: contain; transform-origin: 30% 100%;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); animation: celaBix .75s .35s cubic-bezier(.22, 1.55, .45, 1) both; user-select: none; -webkit-user-drag: none; }

.cela-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; gap: 2px; }
.cela-kick { --g: 3px; display: inline-block; max-width: 100%; box-sizing: border-box; padding: 6px 20px 6px; margin-bottom: 4px; color: var(--set-ink);
  font: 800 12.5px/1.15 Nunito, sans-serif; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(var(--set), var(--set)) center / calc(100% - 2 * var(--g)) calc(100% - 2 * var(--g)) no-repeat, linear-gradient(90deg, #f3cf72, #b8841f 50%, #f3cf72);
  clip-path: polygon(0 0, 100% 0, calc(100% - 11px) 50%, 100% 100%, 0 100%, 11px 50%); animation: celaRise .4s .08s ease-out both; }
.cela-title { font-family: var(--font-hero); font-weight: 400; font-synthesis: none; font-size: clamp(36px, 4.2vw, 54px); line-height: 1.02; letter-spacing: .01em; color: #fff;
  text-shadow: 0 3px 0 rgba(0, 0, 0, .45), 0 0 22px color-mix(in srgb, var(--set) 55%, transparent); overflow-wrap: anywhere; animation: celaRise .45s .14s ease-out both; }
.cela-who { font: 800 clamp(17px, 1.6vw, 21px)/1.2 Nunito, sans-serif; color: #ffcd57; text-shadow: 0 2px 0 rgba(0, 0, 0, .4); animation: celaRise .45s .22s ease-out both; }
.cela-quote { margin: 10px 0 2px; padding: 9px 14px 10px; max-width: 46ch; font: 700 15px/1.38 Nunito, sans-serif; color: #f3efe4;
  background: rgba(3, 8, 24, .55); border-left: 5px solid var(--set); box-shadow: -2px 0 0 #e2b856; animation: celaRise .5s 1.2s ease-out both; }
.cela-by { color: #ffcd57; white-space: nowrap; }
.cela-skip { margin-top: 10px; min-height: 44px; min-width: 44px; padding: 0 16px; cursor: pointer; font: 800 14px Nunito, sans-serif; color: #fff4cf; letter-spacing: .02em;
  border: 2px solid transparent; border-radius: 6px; background: linear-gradient(180deg, #172a58, #0b1532) padding-box, linear-gradient(135deg, #ffe7a0, #b8841f 55%, #f0c868) border-box;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .4); animation: celaRise .4s 1.3s ease-out both; }
.cela-skip:hover { background: linear-gradient(180deg, #1f3670, #0f1c42) padding-box, linear-gradient(135deg, #fff3c4, #d29a2a 55%, #ffe08f) border-box; }
.cela-skip:focus-visible { outline: 3px solid #ffcd57; outline-offset: 2px; }

/* the deed fan: real street names, header in the exact set colour, struck-brass stamp over the card feet */
.cela-fan { --w: 84px; --hh: 120px; --dx: 34px; position: relative; justify-self: center; width: 230px; height: 196px; }
.cela-fan.n4 { --dx: 30px; --w: 78px; }
.cela-deed { position: absolute; left: 50%; bottom: 40px; width: var(--w); height: var(--hh); box-sizing: border-box; display: flex; flex-direction: column; align-items: stretch;
  background: linear-gradient(180deg, #fffaf0, #f6ecd2); border: 1.5px solid #c9ab62; border-radius: 6px; overflow: hidden; color: #2a1d08;
  box-shadow: 0 6px 12px rgba(0, 0, 0, .45), inset 0 0 0 2px #fffaf0, inset 0 0 0 3px rgba(201, 171, 98, .5);
  transform-origin: 50% 135%; transform: translateX(calc(-50% + var(--x) * var(--dx))) rotate(var(--a));
  animation: celaDeal .55s calc(.75s + var(--i) * 70ms) cubic-bezier(.2, 1.3, .45, 1) both; }
.cela-deed .cd-h { flex: none; padding: 5px 2px 4px; text-align: center; background: var(--set); color: var(--set-ink); font: 400 13px/1 var(--font-hero); letter-spacing: .08em;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18); }
.cela-deed .cd-n { flex: none; padding: 6px 5px 3px; text-align: center; font: 800 10.5px/1.15 Nunito, sans-serif; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cela-deed .cd-l { flex: 1; margin: 3px 9px; background: repeating-linear-gradient(180deg, rgba(120, 92, 40, .38) 0 2px, transparent 2px 7px); }
.cela-deed .cd-sym { flex: 1; min-height: 0; width: 34px; max-height: 34px; margin: 2px auto; object-fit: contain; }
.cela-deed .cd-f { flex: none; padding: 3px 2px 4px; text-align: center; font: 900 9px/1 Nunito, sans-serif; letter-spacing: .06em; color: #5a3e08; border-top: 1px dashed rgba(150, 115, 50, .55); }
.cela-stamp { position: absolute; left: 50%; bottom: 14px; z-index: 20; transform: translateX(-50%) rotate(-5deg); padding: 3px; background: var(--brass);
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px);
  filter: drop-shadow(0 4px 0 rgba(40, 20, 0, .55)); animation: celaStamp .45s 1s cubic-bezier(.3, 1.6, .5, 1) both; }
.cela-stamp span { display: block; padding: 5px 16px 6px; font: 400 26px/1 var(--font-hero); letter-spacing: .04em; color: #3a1c00; white-space: nowrap;
  background: linear-gradient(180deg, #ffe58a, #f2b632 55%, #d18c16); text-shadow: 0 1px 0 rgba(255, 246, 200, .7);
  clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px); }
.cela-stamp.long span { font-size: 19px; padding: 6px 12px 7px; }

/* utilities / transport: same stage; Bix cheers or tips his hat, the stamp is the engine's true payoff */
.celebrate.k-utilities .cela-bix, .celebrate.k-transit .cela-bix { height: 206px; }

/* out: a clean 260 ms fade of the whole moment */
.celebrate.cel-a.out { opacity: 0; transition: opacity .26s ease-in; }
.celebrate.cel-a.out .cela { animation: celaOut .26s ease-in both; }

@keyframes celaIn { 0% { opacity: 0; transform: scale(.92); } 60% { opacity: 1; transform: scale(1.012); } 100% { opacity: 1; transform: none; } }
@keyframes celaOut { to { opacity: 0; transform: scale(.97); } }
@keyframes celaBix { 0% { opacity: 0; transform: translate(-46px, 70px) scale(.55) rotate(-10deg); } 55% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes celaRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes celaDeal { from { opacity: 0; transform: translateX(-50%) translateY(34px) rotate(0deg) scale(.8); } to { opacity: 1; transform: translateX(calc(-50% + var(--x) * var(--dx))) rotate(var(--a)); } }
@keyframes celaStamp { 0% { opacity: 0; transform: translateX(-50%) rotate(-22deg) scale(2.3); } 65% { opacity: 1; transform: translateX(-50%) rotate(-4deg) scale(.92); } 100% { opacity: 1; transform: translateX(-50%) rotate(-5deg) scale(1); } }
@keyframes celaGlint { from { background-position: 130% 0; } to { background-position: -30% 0; } }

/* phones: Bix and the heading side by side, the Bix line and the fan below, one column, centred */
@media (max-width: 640px) {
  .cela { --ch: 18px; width: calc(100vw - 16px); }
  .celebrate.cel-a { padding: 0 8px; }
  .cela-plate { grid-template-columns: 104px minmax(0, 1fr); grid-template-areas: 'bix kick' 'bix title' 'bix who' 'quote quote' 'fan fan' 'skip skip';
    gap: 0 10px; min-height: 0; padding: 12px 14px 14px 8px; align-items: start; }
  .cela-text { display: contents; }
  .cela-bixbox { grid-area: bix; height: 128px; margin: 0; align-self: center; }
  .cela-bix { height: 124px; }
  .celebrate.k-utilities .cela-bix, .celebrate.k-transit .cela-bix { height: 122px; }
  .cela-kick { grid-area: kick; justify-self: start; align-self: end; font-size: 11px; padding: 5px 15px; letter-spacing: .09em; white-space: normal; overflow: visible; margin: 6px 0 4px; }
  .cela-title { grid-area: title; font-size: clamp(30px, 8.6vw, 38px); }
  .cela-who { grid-area: who; font-size: 16px; align-self: start; }
  .cela-quote { grid-area: quote; margin: 12px 0 0 6px; font-size: 14.5px; max-width: none; }
  .cela-fan { grid-area: fan; --w: 72px; --hh: 102px; --dx: 30px; width: 220px; height: 162px; margin-top: 4px; }
  .cela-fan.n4 { --w: 66px; --dx: 27px; }
  .cela-deed { bottom: 34px; }
  .cela-deed .cd-n { font-size: 9.5px; }
  .cela-stamp { bottom: 10px; }
  .cela-stamp span { font-size: 22px; }
  .cela-stamp.long span { font-size: 16px; }
  .cela-skip { grid-area: skip; justify-self: center; margin: 4px 0 0; width: min(100%, 240px); }
}

/* reduced motion: the finished plate, no movement at all */
.celebrate.cel-a.still, .celebrate.cel-a.still *, .celebrate.cel-a.still *::before, .celebrate.cel-a.still *::after { animation: none !important; transition: none !important; }
.celebrate.cel-a.still .cela-glint { display: none; }
@media (prefers-reduced-motion: reduce) {
  .celebrate.cel-a, .celebrate.cel-a *, .celebrate.cel-a *::before, .celebrate.cel-a *::after { animation: none !important; transition: none !important; }
  .celebrate.cel-a .cela-glint { display: none; }
}
