:root{--red:#e60012;--paper:#f3efe8;--cream:#f7f1e3}
*{box-sizing:border-box}
html,body{background:var(--red)}
body{margin:0;min-height:100vh;color:#fff;font-family:Inter,-apple-system,sans-serif;padding:clamp(28px,5vw,60px) 16px;position:relative;overflow-x:hidden}
.wrap{position:relative;z-index:1;max-width:1000px;margin:0 auto}

/* pearl snowballs */
.balls i,.fall i{position:absolute;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff,#e8e2d6 55%,#b9b2a6);box-shadow:0 2px 6px #0003}
.balls{position:absolute;inset:0;z-index:2;pointer-events:none}
/* floating pearls: bob up and down, and drift with the mouse (translate is set from JS) */
.balls i{--d:1;animation:bob 5s ease-in-out infinite alternate;translate:calc(var(--mx,0) * var(--d) * 1px) calc(var(--my,0) * var(--d) * 1px);transition:translate .6s ease-out}
.balls i:nth-child(odd){--d:2.2;animation-duration:6.5s}
.balls i:nth-child(3n){--d:3.4;animation-duration:4.2s;animation-delay:-2s}
.balls i:nth-child(4n){animation-delay:-3.5s}
@keyframes bob{from{transform:translateY(-10px)}to{transform:translateY(10px) scale(1.08)}}
/* slow falling pearls in the background */
.fall{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:0}
.fall i{top:-30px;opacity:.85;animation:drop linear infinite}
.fall i:nth-child(1){left:6%;width:8px;height:8px;animation-duration:14s}
.fall i:nth-child(2){left:18%;width:12px;height:12px;animation-duration:19s;animation-delay:-6s}
.fall i:nth-child(3){left:29%;width:6px;height:6px;animation-duration:11s;animation-delay:-3s}
.fall i:nth-child(4){left:41%;width:10px;height:10px;animation-duration:17s;animation-delay:-11s}
.fall i:nth-child(5){left:53%;width:7px;height:7px;animation-duration:13s;animation-delay:-8s}
.fall i:nth-child(6){left:64%;width:14px;height:14px;animation-duration:22s;animation-delay:-2s}
.fall i:nth-child(7){left:75%;width:8px;height:8px;animation-duration:15s;animation-delay:-12s}
.fall i:nth-child(8){left:86%;width:11px;height:11px;animation-duration:18s;animation-delay:-5s}
.fall i:nth-child(9){left:94%;width:6px;height:6px;animation-duration:12s;animation-delay:-9s}
.fall i:nth-child(10){left:12%;width:9px;height:9px;animation-duration:16s;animation-delay:-14s}
.fall i:nth-child(11){left:47%;width:5px;height:5px;animation-duration:10s;animation-delay:-4s}
.fall i:nth-child(12){left:70%;width:9px;height:9px;animation-duration:20s;animation-delay:-16s}
@keyframes drop{0%{transform:translate(0,0)}50%{transform:translate(24px,55vh)}100%{transform:translate(-8px,110vh)}}
/* pop a pearl when clicked */
.balls i{pointer-events:auto;cursor:pointer}
.balls i.pop{animation:pop .5s ease-out forwards}
@keyframes pop{to{transform:scale(2.4);opacity:0}}
@media(prefers-reduced-motion:reduce){.balls i,.fall i{animation:none}.fall{display:none}}
.balls i:nth-child(1){width:16px;height:16px;top:40px;left:8%}
.balls i:nth-child(2){width:10px;height:10px;top:12px;left:30%}
.balls i:nth-child(3){width:22px;height:22px;top:170px;right:4%}
.balls i:nth-child(4){width:12px;height:12px;top:230px;right:22%}
.balls i:nth-child(5){width:14px;height:14px;top:300px;left:3%}
.balls i:nth-child(6){width:9px;height:9px;top:20px;left:62%}
.balls i:nth-child(7){width:12px;height:12px;bottom:60px;right:4%}
.balls i:nth-child(8){width:16px;height:16px;bottom:140px;left:2%}

header{text-align:center}
.by{position:absolute;top:18px;right:20px;z-index:3;display:inline-flex;align-items:center;gap:8px;font-family:Unbounded,sans-serif;font-weight:600;font-size:clamp(.65rem,1.3vw,.82rem);letter-spacing:.03em;padding:6px 14px 6px 6px;border-radius:99px;background:#fff;color:var(--red);text-decoration:none;box-shadow:0 4px 0 #0000002e;transition:transform .15s,box-shadow .15s}
.by:hover{transform:translateY(-2px);box-shadow:0 6px 0 #0000002e}
.by:active{transform:translateY(2px);box-shadow:0 1px 0 #0000002e}
.by b{font-weight:800}
.by .in{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--red);color:#fff;font-family:Inter,sans-serif;font-weight:700;font-size:.78rem;letter-spacing:0}
.by .arr{transition:transform .15s}.by:hover .arr{transform:translate(2px,-2px)}
@media(max-width:1000px){body{padding-top:76px}}
h1{margin:0;font-family:Unbounded,sans-serif;font-weight:900;text-transform:uppercase;font-size:clamp(3.4rem,13vw,8.6rem);line-height:.95;letter-spacing:-.02em}
.sub{margin:14px auto 0;font-size:clamp(.95rem,1.8vw,1.1rem);line-height:1.5;opacity:.92}

.prog{display:flex;align-items:center;gap:14px;margin:clamp(24px,4vw,40px) 0 clamp(18px,3vw,28px);font-family:Unbounded,sans-serif;font-weight:600;font-size:.75rem;letter-spacing:.04em;white-space:nowrap}
.bar{flex:1;height:4px;background:#ffffff40;border-radius:9px;overflow:hidden}
.bar i{display:block;height:100%;width:0;background:#fff;transition:width 1s}

/* ---------- 24 boxes ---------- */
#grid{display:grid;grid-template-columns:repeat(6,1fr);gap:clamp(8px,1.5vw,14px)}
.cell{position:relative;aspect-ratio:1;perspective:1200px}
.page{position:absolute;inset:0;transform-origin:left center;transform-style:preserve-3d;transition:transform .8s cubic-bezier(.45,.05,.2,1)}
.cell.first .page{transform-origin:right center}
.page .f,.page .b{position:absolute;inset:0;border-radius:12px;backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden}
.page .f::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 40%,#0000003a);opacity:0;transition:opacity .4s}
.page .b{transform:rotateY(180deg);background:var(--paper) repeating-linear-gradient(transparent 0 15px,#e6001222 15px 16px)}
.page .f svg{position:absolute;inset:0;width:100%;height:100%}

.bg-cream{background:var(--cream)}
.bg-gold{background:linear-gradient(165deg,#ecd29b,#c99a52)}
.bg-red{background:linear-gradient(160deg,#ff4545,#b8101a);box-shadow:inset 0 0 0 2px #ffffff30}
.bg-green{background:linear-gradient(175deg,#0c5e3d,#1fb06b)}
.bg-dark{background:#0b4a35}

.num{position:absolute;left:0;right:0;bottom:7%;text-align:center;font-family:Unbounded,sans-serif;font-weight:800;font-size:clamp(1.1rem,2.8vw,1.9rem);color:#fff;line-height:1;text-shadow:0 2px 6px #0003}
.bg-cream .num{color:var(--red);text-shadow:none}
.date{position:absolute;top:8px;left:8px;font-family:Unbounded,sans-serif;font-weight:600;font-size:clamp(.45rem,.9vw,.6rem);letter-spacing:.04em;padding:3px 7px;border-radius:99px;background:#0000002e;color:#fff}
.bg-cream .date{background:#e600121a;color:var(--red)}

.under{position:absolute;inset:0;border-radius:12px;background:#0b4a35;box-shadow:inset 0 0 0 2px #ffffff22,inset 0 0 22px #0005;
  display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:8px;color:#fff;text-decoration:none}
.under .k{font-family:Unbounded,sans-serif;font-weight:800;font-size:clamp(.55rem,1.1vw,.7rem);letter-spacing:.08em;opacity:.7}
.under b{font-family:Unbounded,sans-serif;font-size:clamp(.7rem,1.5vw,.95rem);line-height:1.2;margin-top:8px;font-weight:800}
.under small{font-size:clamp(.55rem,1.1vw,.7rem);opacity:.8;margin-top:3px}

.cell:hover,.cell.flipped{z-index:5}
.cell.open{cursor:pointer}
.cell.open:hover .page,.cell.open.flipped .page{transform:rotateY(-176deg)}
.cell.open.first:hover .page,.cell.open.first.flipped .page{transform:rotateY(176deg)}
.cell.open:hover .page .f::after,.cell.open.flipped .page .f::after{opacity:1}
.cell.locked{cursor:not-allowed}
.cell.locked:hover .page,.cell.locked.flipped .page{transform:rotateY(-28deg)}
.cell.locked.first:hover .page,.cell.locked.first.flipped .page{transform:rotateY(28deg)}
.cell.today::before{content:"";position:absolute;inset:-5px;border:2px solid #fff;border-radius:16px}

footer{display:flex;justify-content:center;align-items:center;gap:clamp(16px,5vw,60px);flex-wrap:wrap;margin-top:clamp(28px,4vw,44px);font-size:.85rem}
footer a{color:#fff}

@media(max-width:760px){#grid{grid-template-columns:repeat(4,1fr)}}
@media(max-width:420px){#grid{grid-template-columns:repeat(3,1fr)}}
