/* Rings in Ten — celebrations: the confetti canvas, the broadcast bumper, the verdict bar's wipe
   and the ring ceremony. Loaded after app.css. */

.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 30; }

/* ---------------------------------------------------------------- the bumper */
.bump {
  --b1: var(--accent); --b2: var(--gold); --k-bg: var(--ink); --k-ink: var(--ground); --t-ink: #fff;
  position: fixed; left: 0; right: 0; top: 31%; z-index: 24; pointer-events: none;
}
.bump--playoffs { --b1: var(--cyan); --b2: #fff; --k-bg: var(--cyan); --k-ink: #04222A; }
.bump--series { --b1: var(--accent); --b2: var(--gold); --k-bg: var(--accent); --k-ink: #1A0A02; }
.bump--conf { --b1: var(--gold); --b2: var(--accent); --k-bg: var(--gold); --k-ink: #1A1102; }

.bump__band {
  position: relative; overflow: hidden;
  background:
    repeating-linear-gradient(115deg, rgba(255,255,255,.035) 0 14px, rgba(255,255,255,0) 14px 30px),
    linear-gradient(180deg, var(--bg1, #1B2550), var(--bg2, #0C1229) 88%);
  border-top: 3px solid var(--b2); border-bottom: 9px solid var(--b1);
  box-shadow: 0 0 0 1px rgba(0,0,0,.4);
}
/* The wipe is two opposite slides: the mask moves in from the left while the band inside it moves
   back by the same amount, so the band stands still and is uncovered left to right. Transforms
   only, so the phone's compositor runs it without repainting. */
.bump__mask { position: relative; overflow: hidden; margin: 0 auto; max-width: 560px; transform: translateX(-101%);
  box-shadow: 0 22px 48px rgba(0,0,0,.6); will-change: transform; }
.bump__band { transform: translateX(101%); will-change: transform; }
/* the coloured wedge on the left edge */
.bump__edge { position: absolute; left: -14px; top: 0; bottom: 0; width: 40px; background: var(--b1); transform: skewX(-14deg); }
.bump__edge::after { content: ''; position: absolute; top: 0; bottom: 0; right: -10px; width: 4px; background: var(--b2); }
.bump__copy { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 18px 12px 44px; }
.bump__k {
  background: var(--k-bg); color: var(--k-ink); font: 800 13px/1 var(--display); letter-spacing: .16em;
  padding: 5px 12px 4px; transform: skewX(-14deg);
}
.bump__t {
  font: italic 800 clamp(48px, 15vw, 66px)/.86 var(--display); letter-spacing: .005em; text-transform: uppercase; color: var(--t-ink);
  text-shadow: 0 3px 0 rgba(0,0,0,.35); transform-origin: left center;
}
.bump--playoffs .bump__t { font-size: clamp(42px, 13vw, 56px); }
.bump--conf .bump__t {
  background: linear-gradient(180deg, #FFF6CF 0%, #FFD45A 45%, #E3A919 55%, #FFE58A 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,.4));
}
.bump--team.bump--conf .bump__t { background: linear-gradient(180deg, var(--m1) 0%, var(--m2) 45%, var(--m3) 55%, var(--m1) 100%);
  -webkit-background-clip: text; background-clip: text; }
.bump--team .bump__s { color: rgba(255,255,255,.75); }
.bump__s { font: 700 15px/1.2 var(--display); letter-spacing: .1em; color: var(--ink-2); text-transform: uppercase; }
/* a light passing over the band */
.bump__sweep {
  position: absolute; top: -10%; bottom: -10%; left: 0; width: 55%;
  background: linear-gradient(100deg, rgba(255,255,255,0) 20%, rgba(255,255,255,.1) 46%, rgba(255,255,255,.22) 50%, rgba(255,255,255,.1) 54%, rgba(255,255,255,0) 80%);
  transform: translateX(-120%); will-change: transform;
}
/* the stripe that streaks across ahead of the band */
.bump__lead {
  position: absolute; top: -6px; bottom: -6px; left: 0; width: 46%;
  background: linear-gradient(90deg, rgba(0,0,0,0), var(--b1) 30%, var(--b2) 80%, #fff);
  transform: translateX(-130%) skewX(-24deg); opacity: .95; will-change: transform;
}
.bump__k, .bump__t, .bump__s { opacity: 0; }

.bump--in .bump__lead { animation: bumpLead .5s cubic-bezier(.5, 0, .3, 1) forwards; }
.bump--in .bump__mask, .bump--in .bump__band { animation: bumpReveal .46s cubic-bezier(.16, 1, .3, 1) .1s forwards; }
.bump--in .bump__k { animation: bumpRise .36s cubic-bezier(.16, 1, .3, 1) .24s forwards; }
.bump--in .bump__t { animation: bumpTitle .5s cubic-bezier(.16, 1, .3, 1) .3s forwards; }
.bump--in .bump__s { animation: bumpRiseFlat .4s cubic-bezier(.16, 1, .3, 1) .44s forwards; }
.bump--in .bump__sweep { animation: bumpSweep .8s cubic-bezier(.45, 0, .2, 1) .66s forwards; }
.bump.bump--out .bump__mask { transform: none; animation: bumpOffMask .34s cubic-bezier(.7, 0, .84, 0) forwards; }
.bump.bump--out .bump__band { transform: none; animation: bumpOffBand .34s cubic-bezier(.7, 0, .84, 0) forwards; }
.bump.bump--out .bump__k, .bump.bump--out .bump__t, .bump.bump--out .bump__s { opacity: 1; animation: none; }
@keyframes bumpLead { to { transform: translateX(340%) skewX(-24deg); } }
@keyframes bumpReveal { to { transform: none; } }
@keyframes bumpOffMask { from { transform: none; } to { transform: translateX(101%); } }
@keyframes bumpOffBand { from { transform: none; } to { transform: translateX(-101%); } }
@keyframes bumpRise { from { opacity: 0; transform: translateX(-18px) skewX(-14deg); } to { opacity: 1; transform: skewX(-14deg); } }
@keyframes bumpTitle { from { opacity: 0; transform: translateX(-34px) scaleX(1.12); } to { opacity: 1; transform: none; } }
@keyframes bumpSweep { to { transform: translateX(260%); } }
@keyframes bumpRiseFlat { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- the verdict bar */
/* it wipes on from the left and a light runs across the gold */
.verdict--slam { position: relative; overflow: hidden; }
.verdict--slam::before { content: ''; position: absolute; inset: 0; z-index: 1; background: var(--ground); pointer-events: none;
  animation: verdictUncover .5s cubic-bezier(.16, 1, .3, 1) both; }
.verdict--won.verdict--slam::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; pointer-events: none; z-index: 2;
  background: linear-gradient(100deg, rgba(255,255,255,0) 15%, rgba(255,255,255,.75) 50%, rgba(255,255,255,0) 85%);
  transform: translateX(-120%) skewX(-18deg); animation: verdictSheen .9s cubic-bezier(.45, 0, .2, 1) .35s forwards;
}
@keyframes verdictUncover { from { transform: translateX(0); } to { transform: translateX(101%); } }
@keyframes verdictSheen { to { transform: translateX(300%) skewX(-18deg); } }

/* the free-agent SIGNED bar: a stamp and a light across it */
.offerbox__v--yes { position: relative; overflow: hidden; }
.offerbox__v--stamp { animation: stamp .42s cubic-bezier(.2, 1.4, .4, 1) both; }
.offerbox__v--stamp::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 45%;
  background: linear-gradient(100deg, rgba(255,255,255,0) 15%, rgba(255,255,255,.6) 50%, rgba(255,255,255,0) 85%);
  transform: translateX(-120%) skewX(-18deg); animation: verdictSheen .8s cubic-bezier(.45, 0, .2, 1) .25s forwards;
}
@keyframes stamp { 0% { transform: scale(1.25); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }

/* ---------------------------------------------------------------- the ring ceremony */
.ceremony {
  position: fixed; inset: 0; z-index: 20; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 20px var(--gutter);
  background: radial-gradient(130% 75% at 50% 33%, #3D2C06 0%, #17161F 46%, #06080F 78%); opacity: 0; transition: opacity .3s ease;
  will-change: opacity;                                  /* keeps its layer when the fade ends: no repaint mid-show */
}
.ceremony--in { opacity: 1; }
.ceremony--out { opacity: 0; }
/* three gold bands sweep the screen as it opens */
.ceremony__sweep { position: absolute; inset: 0; pointer-events: none; }
.ceremony__sweep i {
  position: absolute; top: -40%; bottom: -40%; left: 50%; width: 22vmax; margin-left: -11vmax;
  background: linear-gradient(90deg, #B07A08, #FFC93C 22%, #FFE58A 46%, #FFF6D6 50%, #FFE58A 54%, #FFC93C 78%, #B07A08);
  transform: translateX(-75vmax) rotate(24deg); will-change: transform;
}
.ceremony__sweep i:nth-child(2) { width: 6vmax; margin-left: -3vmax; background: #FFF6D6; }
.ceremony__sweep i:nth-child(3) { width: 4vmax; margin-left: -2vmax; background: var(--accent); opacity: 1; }
.ceremony--in .ceremony__sweep i { animation: cSweep .7s cubic-bezier(.4, 0, .3, 1) forwards; }
.ceremony--in .ceremony__sweep i:nth-child(2) { animation-delay: .07s; }
.ceremony--in .ceremony__sweep i:nth-child(3) { animation-delay: .14s; }
@keyframes cSweep { to { transform: translateX(95vmax) rotate(24deg); } }

.ceremony__box { position: relative; width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }

.ceremony__k { display: flex; align-items: center; gap: 12px; width: 100%; }
.ceremony__k::before, .ceremony__k::after { content: ''; flex: 1; height: 2px; background: linear-gradient(90deg, rgba(255,201,60,0), var(--gold)); transform-origin: right; }
.ceremony__k::after { background: linear-gradient(90deg, var(--gold), rgba(255,201,60,0)); transform-origin: left; }
.ceremony__kt { font: 800 15px/1 var(--display); letter-spacing: .22em; color: var(--gold); white-space: nowrap; }
.ceremony--in .ceremony__kt { animation: cFade .4s ease-out .45s both; }
.ceremony--in .ceremony__k::before, .ceremony--in .ceremony__k::after { animation: cRule .55s cubic-bezier(.16, 1, .3, 1) .5s both; }
@keyframes cRule { from { transform: scaleX(0); } to { transform: none; } }
@keyframes cFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.ceremony__stage { position: relative; display: flex; align-items: center; justify-content: center; }
.ring { position: relative; width: min(80vw, 300px); will-change: transform, opacity; }
.ring__art { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(0,0,0,.55)); }
.ring__bmp { display: block; width: 100%; height: auto; }
/* the light over the face (r 142 of the 360 × 300 art), in its own layer */
.ring__glint { position: absolute; inset: 0; pointer-events: none; overflow: hidden; clip-path: ellipse(39.44% 47.33% at 50% 50%); }
.ring__glint::before {
  content: ''; position: absolute; top: -10%; bottom: -10%; left: 0; width: 18%;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.42) 50%, rgba(255,255,255,0));
  transform: translateX(-120%) skewX(-18deg); animation: glint 2.8s ease-in-out 1.3s infinite; will-change: transform;
}
@keyframes glint { 0% { transform: translateX(-120%) skewX(-18deg); } 45%, 100% { transform: translateX(640%) skewX(-18deg); } }
.dec__face { position: relative; width: 100%; }
/* light turning slowly behind the ring */
.ceremony__rays {
  position: absolute; left: 50%; top: 50%; width: 820px; height: 820px; margin: -410px 0 0 -410px; pointer-events: none; will-change: transform, opacity;
  background: repeating-conic-gradient(from 0deg, rgba(255,201,60,.17) 0deg 3.5deg, rgba(255,201,60,0) 3.5deg 15deg);
  -webkit-mask-image: radial-gradient(circle, #000 14%, rgba(0,0,0,.6) 30%, transparent 58%); mask-image: radial-gradient(circle, #000 14%, rgba(0,0,0,.6) 30%, transparent 58%);
  opacity: 0;
}
.ceremony--in .ceremony__rays { animation: cRays 1s ease-out .9s forwards, cSpin 48s linear infinite; }
@keyframes cRays { to { opacity: 1; } }
@keyframes cSpin { to { transform: rotate(360deg); } }
.ceremony__flash {
  position: absolute; left: 50%; top: 50%; width: 130%; aspect-ratio: 1; transform: translate(-50%, -50%) scale(.5); pointer-events: none;
  background: radial-gradient(circle, rgba(255,251,230,.95) 0%, rgba(255,214,90,.55) 26%, rgba(255,201,60,0) 62%); opacity: 0; border-radius: 50%;
  will-change: transform, opacity;
}
.ceremony--in .ceremony__flash { animation: cFlash .8s cubic-bezier(.2, .7, .3, 1) .86s; }
@keyframes cFlash { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); } 14% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.55); } }
/* the ring drops in and lands */
.ceremony--in .ring { animation: ringDrop .6s cubic-bezier(.55, 0, .25, 1) .3s both; }
@keyframes ringDrop {
  0% { opacity: 0; transform: translateY(-30px) scale(2.1) rotate(-10deg); }
  45% { opacity: 1; }
  80% { transform: translateY(6px) scale(.965) rotate(0); }
  92% { transform: translateY(-2px) scale(1.005); }
  100% { opacity: 1; transform: none; }
}

.ceremony__title { position: relative; font: italic 800 clamp(54px, 17vw, 72px)/.9 var(--display); color: #fff; letter-spacing: .01em; text-shadow: 0 4px 0 rgba(0,0,0,.35); }
.ceremony--in .ceremony__title { animation: cTitle .5s cubic-bezier(.16, 1, .3, 1) 1.02s both; }
@keyframes cTitle { from { opacity: 0; transform: translateY(14px) scale(1.12); } to { opacity: 1; transform: none; } }
.ceremony__sub { font: 600 14px/1.3 var(--body); color: var(--ink-2); }
.ceremony--in .ceremony__sub { animation: cFade .45s ease-out 1.28s both; }
.ceremony__count { margin-top: 2px; background: var(--gold); color: #1A1102; font: 800 14px/1 var(--display); letter-spacing: .14em; padding: 6px 14px 5px; transform: skewX(-14deg); }
.ceremony--in .ceremony__count { animation: cCount .42s cubic-bezier(.2, 1.4, .4, 1) 1.5s both; }
@keyframes cCount { from { opacity: 0; transform: skewX(-14deg) scale(1.4); } to { opacity: 1; transform: skewX(-14deg); } }
.ceremony__go { margin-top: 14px; width: 100%; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .3s ease, transform .3s ease; }
.ceremony__go--ready { opacity: 1; transform: none; pointer-events: auto; }
.ceremony__go--ready:active { transform: translateY(3px); }


/* ---------------------------------------------------------------- the news flash (in the season replay)
   Dressed in the team's colours (app.js teamInk sets the tokens): --g1/--g2 the ground, --e1 the edge
   block and heavy rule, --a the accent (tag, lines, lit games), --n the numerals. The moment is loud:
   a ground of the team colour. The injury is quiet: night tinted with it, the colour only in its
   lines, and the games he'll miss drawn hollow. */
.flash { --g1: #1B2550; --g2: #0C1229; --e1: var(--coral); --a: var(--coral); --a-ink: #1A0508; --n: #fff; --n2: #fff; --n3: #fff;
  position: relative; margin: 2px 0 4px; }
.flash__band { position: relative; overflow: hidden; padding: 12px 14px 12px 28px; display: flex; flex-direction: column; gap: 10px;
  background: repeating-linear-gradient(115deg, rgba(255,255,255,.035) 0 14px, rgba(255,255,255,0) 14px 30px), linear-gradient(180deg, var(--g1), var(--g2) 88%);
  border-top: 3px solid var(--a); border-bottom: 7px solid var(--e1); box-shadow: 0 14px 34px rgba(0,0,0,.5); }
.flash--moment .flash__band { background: repeating-linear-gradient(115deg, rgba(255,255,255,.06) 0 14px, rgba(255,255,255,0) 14px 30px),
  radial-gradient(120% 140% at 100% 0%, rgba(255,255,255,.14), rgba(255,255,255,0) 55%), linear-gradient(160deg, var(--g1) 30%, var(--g2)); }
.flash--injury .flash__band { border-top-width: 2px; border-bottom: 3px solid var(--a); }
.flash__edge { position: absolute; left: -12px; top: 0; bottom: 0; width: 26px; background: var(--e1); transform: skewX(-14deg); }
.flash__edge::after { content: ''; position: absolute; top: 0; bottom: 0; right: -8px; width: 3px; background: var(--a); }
.flash--injury .flash__edge { width: 18px; }
.flash__top { display: flex; align-items: center; gap: 10px; }
.flash__tag { background: var(--a); color: var(--a-ink); font: 800 13px/1 var(--display); letter-spacing: .16em; padding: 5px 12px 4px; transform: skewX(-14deg); }
.flash--injury .flash__tag { background: none; color: #fff; box-shadow: inset 0 0 0 2px var(--a); }
.flash__when { font: 800 12px/1 var(--display); letter-spacing: .14em; color: rgba(255,255,255,.72); }
.flash__who { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.flash__num { font: italic 800 38px/1 var(--display); color: #fff; text-shadow: 3px 3px 0 var(--e1); min-width: 46px; }
.flash__n { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.flash__name { font: italic 800 26px/.95 var(--display); letter-spacing: .01em; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flash__line { font: 700 12px/1 var(--display); letter-spacing: .1em; color: rgba(255,255,255,.66); }
.flash__role { font: 800 11px/1 var(--display); letter-spacing: .14em; color: var(--a); }
.flash--allstar .flash__big { font-size: 34px; color: #fff; }
.flash--allstar .flash__who + .flash__who { border-top: 1px solid rgba(255,255,255,.14); padding-top: 10px; }
.flash__inj { font: 700 13px/1.2 var(--body); color: #fff; }
.flash__out { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.flash__big { font: italic 800 44px/.85 var(--display); color: var(--n); font-variant-numeric: tabular-nums; }
.flash__unit { font: 800 10.5px/1 var(--display); letter-spacing: .14em; color: rgba(255,255,255,.72); }
.flash__hero { display: flex; align-items: baseline; gap: 10px; }
.flash__huge { font: italic 800 clamp(64px, 20vw, 86px)/.82 var(--display); font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, var(--n2) 0%, var(--n) 45%, var(--n3) 55%, var(--n2) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(4px 4px 0 var(--ns, rgba(0,0,0,.4))); }
.flash__word { font: italic 800 26px/1 var(--display); letter-spacing: .02em; color: #fff; }
.flash__sub { margin: 0; font: 700 13.5px/1.3 var(--body); color: #fff; }
.flash__strip { display: grid; grid-template-columns: repeat(41, minmax(0, 1fr)); gap: 2px; }
.flash__g { display: block; height: 6px; background: rgba(255,255,255,.09); }
.flash__g--past { background: rgba(255,255,255,.26); }
.flash__g--now { box-shadow: 0 0 0 1px #fff; }
.flash__g--out { background: none; box-shadow: inset 0 0 0 1.5px var(--a); }
.flash__g--gold { background: var(--a); }
.flash__sweep { position: absolute; top: -10%; bottom: -10%; left: 0; width: 50%; pointer-events: none;
  background: linear-gradient(100deg, rgba(255,255,255,0) 20%, rgba(255,255,255,.09) 46%, rgba(255,255,255,.2) 50%, rgba(255,255,255,.09) 54%, rgba(255,255,255,0) 80%);
  transform: translateX(-120%); }
.flash__lead { position: absolute; z-index: 2; top: -4px; bottom: -4px; left: 0; width: 40%; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,0), var(--e1) 30%, var(--a) 85%, #fff); transform: translateX(-130%) skewX(-24deg); opacity: 0; }

/* in: the stripe streaks across, the band wipes in behind it, the type rises, the strip lights up */
.flash .flash__band { clip-path: inset(0 100% 0 0); }
.flash .flash__top, .flash .flash__who, .flash .flash__hero, .flash .flash__sub { opacity: 0; }
.flash--in .flash__lead { animation: flashLead .55s cubic-bezier(.5, 0, .3, 1) forwards; }
.flash--in .flash__band { animation: flashWipe .5s cubic-bezier(.16, 1, .3, 1) .08s forwards; }
.flash--in .flash__top { animation: flashRise .34s cubic-bezier(.16, 1, .3, 1) .22s forwards; }
.flash--in .flash__who, .flash--in .flash__hero { animation: flashTitle .48s cubic-bezier(.16, 1, .3, 1) .3s forwards; }
.flash--in .flash__sub { animation: flashRise .4s cubic-bezier(.16, 1, .3, 1) .42s forwards; }
.flash--in .flash__sweep { animation: flashSweep .9s cubic-bezier(.45, 0, .2, 1) .7s forwards; }
.flash .flash__g--out, .flash .flash__g--gold { opacity: 0; transform: scaleY(.3); }
.flash--in .flash__g--out, .flash--in .flash__g--gold { animation: flashCell .28s cubic-bezier(.16, 1, .3, 1) forwards; }
.flash--in.flash--injury .flash__band { animation: flashWipe .5s cubic-bezier(.16, 1, .3, 1) .08s forwards, flashJolt .36s ease-out .58s; }
@keyframes flashLead { 0% { opacity: .95; } to { transform: translateX(330%) skewX(-24deg); opacity: .95; } }
@keyframes flashWipe { to { clip-path: inset(0 0 0 0); } }
@keyframes flashRise { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@keyframes flashTitle { from { opacity: 0; transform: translateX(-30px) scaleX(1.1); } to { opacity: 1; transform: none; } }
@keyframes flashSweep { to { transform: translateX(260%); } }
@keyframes flashCell { to { opacity: 1; transform: none; } }
@keyframes flashJolt { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 55% { transform: translateX(3px); } 80% { transform: translateX(-1px); } }
