/* The Lifetime Achievement Award scroll (award.js). Black and metallic gold on a cosmic stage. */
.award {
  --w: min(92vw, 940px, calc((100svh - 130px) * 1122 / 1100)); /* the open award always fits the screen */
  --gold: #f3c76a; --ease-roll: cubic-bezier(.5, .05, .2, 1); --roll: 1.9s;
  position: fixed; inset: 0; z-index: 88; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: #010103; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s .6s;
}
.award.is-shown { opacity: 1; visibility: visible; transition: opacity .6s ease, visibility 0s; }
.award--page { position: relative; min-height: 100svh; z-index: 2; }
body.award-showing { overflow: hidden; }

/* deep black space with faint midnight-blue galaxies that drift very slowly */
.award__sky { position: fixed; inset: -6%; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 50% at 50% 45%, rgba(0, 0, 0, .1), rgba(0, 0, 0, .75) 80%), url("../img/space.jpg") center / cover no-repeat;
  filter: saturate(.55) hue-rotate(18deg) brightness(.5); animation: awardDrift 140s ease-in-out infinite alternate; }
@keyframes awardDrift { to { transform: translate(-2.5%, 1.5%) scale(1.06); } }
.award__dust { position: fixed; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }

.award__close { position: fixed; z-index: 3; top: max(14px, env(safe-area-inset-top)); left: max(14px, env(safe-area-inset-left)); width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  font-size: 28px; line-height: 1; color: #f8e3b0; background: rgba(10, 8, 4, .75); border: 1px solid rgba(243, 199, 106, .55); box-shadow: 0 0 16px rgba(243, 199, 106, .25); }

.award__stage { position: relative; z-index: 2; width: var(--w); margin: auto; padding: 64px 0 24px; display: flex; flex-direction: column; align-items: center; }

/* the scroll: rolled up, it is only as tall as the rod; unrolled, as tall as the award */
.award__scroll { position: relative; width: 100%; height: calc(var(--w) * 195 / 1122); transition: height var(--roll) var(--ease-roll); }
.award.is-open .award__scroll { height: calc(var(--w) * 1100 / 1122); }
.award__rolled, .award__open { position: absolute; left: 0; top: 0; width: 100%; }
.award__rolled { transition: opacity .45s ease; }
.award__rolled-img, .award__open-img, .award__rod { display: block; width: 100%; height: auto;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3.5%, #000 96.5%, transparent); mask-image: linear-gradient(90deg, transparent, #000 3.5%, #000 96.5%, transparent); }
/* the rolled scroll fades into the night on every side (sides on the wrapper, top and bottom on the picture) */
.award__rolled { -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.award__rolled-img { -webkit-mask-image: linear-gradient(180deg, transparent 2%, #000 17%, #000 90%, transparent); mask-image: linear-gradient(180deg, transparent 2%, #000 17%, #000 90%, transparent); }
.award.is-open .award__rolled { opacity: 0; pointer-events: none; }

/* moving highlights that catch the gold (overlay leaves the black leather black) */
.award__shine { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: overlay; opacity: .8;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  background: linear-gradient(105deg, transparent 42%, rgba(255, 226, 160, .55) 50%, transparent 58%) no-repeat; background-size: 260% 100%; background-position: 140% 0;
  animation: awardShine 9s ease-in-out infinite; }
@keyframes awardShine { 0%, 55% { background-position: 140% 0; } 100% { background-position: -40% 0; } }

/* the gold globe in the emblem: the button that unrolls the award */
.award__globe { position: absolute; left: 49.55%; top: 53.85%; width: 8.65%; aspect-ratio: 1; transform: translate(-50%, -50%); padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.award__globe::before { content: ""; position: absolute; inset: -60%; border-radius: 50%; } /* a bigger target for fingers */
/* the globe: a gold world map turning inside the circle, with shading, a travelling glow and points of light */
.award__gg { position: relative; display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: #050402; transition: box-shadow .4s ease, filter .4s ease; }
.award__gg-map { position: absolute; inset: 0; background: url("../img/award/gold-map.webp") repeat-x; background-size: 200% 116%; background-position: 200% 50%; animation: awardSpin 14s linear infinite; }
@keyframes awardSpin { from { background-position: 200% 50%; } to { background-position: 0% 50%; } }
.award__gg::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 36% 30%, rgba(255, 240, 200, .28), transparent 42%), radial-gradient(circle at 50% 50%, transparent 50%, rgba(0, 0, 0, .75) 100%);
  box-shadow: inset 0 0 6px 1px rgba(255, 214, 130, .7); }
.award__gg-sweep { position: absolute; inset: 0; mix-blend-mode: overlay; background: linear-gradient(90deg, transparent 35%, rgba(255, 236, 180, .6) 50%, transparent 65%) no-repeat; background-size: 300% 100%; animation: awardSweep 6s ease-in-out infinite; }
@keyframes awardSweep { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.award__gg i { position: absolute; width: 7%; height: 7%; border-radius: 50%; opacity: 0; background: radial-gradient(circle, #fff 0, #ffe7a8 35%, rgba(255, 200, 100, 0) 70%); animation: awardPing 4.2s ease-out infinite; }
.award__gg i:nth-of-type(1) { left: 30%; top: 34%; }
.award__gg i:nth-of-type(2) { left: 58%; top: 28%; animation-delay: .7s; }
.award__gg i:nth-of-type(3) { left: 44%; top: 56%; animation-delay: 1.4s; }
.award__gg i:nth-of-type(4) { left: 66%; top: 50%; animation-delay: 2.1s; }
.award__gg i:nth-of-type(5) { left: 24%; top: 58%; animation-delay: 2.8s; }
.award__gg i:nth-of-type(6) { left: 52%; top: 40%; animation-delay: 3.5s; }
/* the big globe on the open award turns too (its picture globe: centre 558,343 in the open scroll, radius about 136) */
.award__gg--big { position: absolute; left: 49.73%; top: 31.18%; width: 24.6%; height: auto; aspect-ratio: 1; transform: translate(-50%, -50%);
  -webkit-mask-image: radial-gradient(closest-side, #000 90%, transparent 100%); mask-image: radial-gradient(closest-side, #000 90%, transparent 100%); }
.award__gg--big .award__gg-map { animation-duration: 24s; filter: brightness(1.15); }
.award__gg--big::after { background: radial-gradient(circle at 40% 32%, rgba(255, 240, 200, .22), transparent 45%), radial-gradient(closest-side, transparent 62%, rgba(0, 0, 0, .55) 92%, rgba(255, 210, 120, .45) 100%); box-shadow: none; }
@keyframes awardPing { 0% { opacity: 0; transform: scale(.3); } 14% { opacity: 1; transform: scale(1.7); } 55%, 100% { opacity: 0; transform: scale(.8); } }
@media (hover: hover) { .award__globe:hover .award__gg, .award__globe:focus-visible .award__gg { filter: brightness(1.3); box-shadow: 0 0 22px 6px rgba(255, 205, 100, .55), 0 0 60px 18px rgba(255, 190, 70, .25); } }
@media (hover: none) { .award__gg { animation: awardTapGlow 4s ease-in-out infinite; } }
@keyframes awardTapGlow { 0%, 60%, 100% { box-shadow: 0 0 0 0 rgba(255, 205, 100, 0); } 80% { box-shadow: 0 0 20px 6px rgba(255, 205, 100, .5); } }

/* the award unrolls: the bottom rod travels down as the scroll opens behind it */
.award__open { visibility: hidden; clip-path: inset(0 0 91.9% 0); transition: clip-path var(--roll) var(--ease-roll), visibility 0s var(--roll); }
.award__rod { position: absolute; left: 0; top: 3%; transition: top var(--roll) var(--ease-roll); }
.award.is-open .award__open { visibility: visible; clip-path: inset(0 0 0 0); transition: clip-path var(--roll) var(--ease-roll), visibility 0s; }
.award.is-open .award__rod { top: 89.18%; }

/* "Click to unroll" and the chevrons, then "Roll it back up" in the same spot */
.award__cta, .award__reroll { margin-top: 18px; cursor: pointer; background: none; border: 0; color: #f6dfa6; font: 600 13px/1 "Cormorant Garamond", Georgia, serif; letter-spacing: .38em; text-transform: uppercase; }
.award__cta { display: flex; flex-direction: column; align-items: center; gap: 10px; transition: opacity .4s ease; text-shadow: 0 0 10px rgba(255, 200, 100, .5); }
.award__cta span { font-size: clamp(12px, 1.5vw, 15px); }
.award__cta svg { width: 26px; height: 26px; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(255, 200, 100, .8)); animation: awardChev 2s ease-in-out infinite; }
@keyframes awardChev { 0%, 100% { transform: translateY(0); opacity: .55; } 50% { transform: translateY(5px); opacity: 1; } }
.award.is-open .award__cta { opacity: 0; pointer-events: none; height: 0; margin: 0; overflow: hidden; }
.award__reroll { display: none; padding: 14px 26px; border-radius: 999px; border: 1px solid rgba(243, 199, 106, .55); background: rgba(10, 8, 4, .6); }
.award.is-open .award__reroll { display: inline-block; animation: awardFadeIn .8s ease calc(var(--roll) - .2s) both; }
@keyframes awardFadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 640px) { .award { --w: min(100vw, calc((100svh - 130px) * 1122 / 1100)); } }
@media (prefers-reduced-motion: reduce) {
  .award { --roll: .01s; }
  .award__sky, .award__shine, .award__globe::after, .award__cta svg, .award__gg-sweep, .award__gg i { animation: none; }
  .award__gg-map { animation-duration: 28s; }
  .award__gg--big .award__gg-map { animation-duration: 48s; }
}
/* the gold shower when the award opens shows over the scroll */
body.award-showing .burst { z-index: 89; }
