/* Dig Crew Construction: the crane's beam sways on its hook, the excavator arm bobs, the dump truck bed
   tips now and then and the clouds drift. The classic opening ("build") is the fallback if the film can't
   load: the crane swings in and the machines get to work. Only transform and opacity animate. */
[data-theme="dig"] .hero-art .dg-swing, [data-theme="dig"].tv-bd .dg-swing { transform-box: fill-box; transform-origin: 50% 0; animation: dg-swing 4.2s ease-in-out infinite alternate; }
[data-theme="dig"] .hero-art .dg-arm { transform-box: fill-box; transform-origin: 0 100%; animation: dg-scoop 3.6s ease-in-out infinite; }
[data-theme="dig"] .hero-art .dg-bed { transform-box: fill-box; transform-origin: 0 100%; animation: dg-tip 7s ease-in-out infinite; }
[data-theme="dig"] .hero-art .dg-cloud { animation: dg-drift 12s ease-in-out infinite alternate; }
[data-theme="dig"] .hero-art .dg-cloud2 { animation-duration: 16s; animation-delay: -6s; }
[data-theme="dig"] .hero-art .dg-under { display: none; }
[data-theme="dig"] .card { border-radius: 16px; box-shadow: var(--shadow), inset 0 -4px 0 rgba(255, 197, 51, .55); }
[data-theme="dig"] .btn { border-radius: 12px; letter-spacing: .02em; box-shadow: 0 4px 0 rgba(42, 29, 16, .25); }
[data-theme="dig"] .title { font-family: "Bungee", Impact, sans-serif; font-weight: 400; letter-spacing: .01em; text-shadow: 0 3px 0 rgba(255, 197, 51, .9); }
[data-theme="dig"] .card h2 { font-family: "Bungee", Impact, sans-serif; font-weight: 400; }
[data-theme="dig"] .eyebrow { color: var(--ink); letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; font-weight: 800; }
[data-theme="dig"] .divider::before, [data-theme="dig"] .divider::after { height: 6px; border-radius: 3px; background: repeating-linear-gradient(-45deg, #ff7a1a 0 8px, #fffbe6 8px 16px); }
[data-theme="dig"] .btn, [data-theme="dig"] .card h2, [data-theme="dig"] .title, [data-theme="dig"] .eyebrow { overflow-wrap: anywhere; }

/* the kid's photo: a stamp frame with a caution-stripe edge, like the site board on the crane */
[data-theme="dig"] .kp-stamp .kp-win { box-shadow: 0 0 0 4px #ffc533, 0 0 0 7px #2a2320; }

/* the Hard hat pass: safety-yellow card, a caution-stripe stub and a stamped title */
[data-theme="dig"] .ticket { background: linear-gradient(180deg, #ffd666, #ffc533); color: #2a2320; border-radius: 10px; box-shadow: 0 10px 22px rgba(42, 35, 32, .25), inset 0 0 0 2px #2a2320; }
[data-theme="dig"] .ticket .t-main { border-right: 2px dashed rgba(42, 35, 32, .55); }
[data-theme="dig"] .ticket small { color: #2a2320; letter-spacing: .2em; font-weight: 800; }
[data-theme="dig"] .ticket b { font-family: "Bungee", Impact, sans-serif; font-weight: 400; color: #2a2320; }
[data-theme="dig"] .ticket .t-stub { background: repeating-linear-gradient(-45deg, #ff7a1a 0 10px, #fffbe6 10px 20px); }

/* the classic opening (only if the film can't load) */
[data-theme="dig"] .op-art svg { overflow: visible; }
[data-theme="dig"] .op-art .dg-under { display: inline; }
[data-theme="dig"] .op-card { background: rgba(255, 253, 246, .92); color: var(--cardInk); box-shadow: 0 18px 50px rgba(42, 35, 32, .25); }
[data-theme="dig"] .op-build .op-line { color: var(--ink); text-shadow: 0 2px 0 rgba(255, 255, 255, .8); }
[data-theme="dig"] .op-build.op-run .dg-crane { animation: dg-in 1.2s .3s cubic-bezier(.2, .9, .3, 1.1) both; }
[data-theme="dig"] .op-build.op-run .dg-swing { transform-box: fill-box; transform-origin: 50% 0; animation: dg-lower 1.4s 1.4s cubic-bezier(.3, 1.3, .5, 1) both, dg-swing 4.2s 2.8s ease-in-out infinite alternate; }
[data-theme="dig"] .op-art { transform: scale(1.4); transform-origin: 30% 30%; transition: opacity 1.2s ease, transform 5s cubic-bezier(.33, .05, .2, 1); }
[data-theme="dig"] .op-pal { transform: translateY(40vh) scale(.6); opacity: 0; transition-property: transform, opacity; transition-timing-function: cubic-bezier(.3, 1.5, .5, 1); }
[data-theme="dig"] .op-run .op-art, [data-theme="dig"] .op-run .op-pal { opacity: 1; transform: none; }
[data-theme="dig"] .op-final .op-art, [data-theme="dig"] .op-final .op-pal { opacity: 1; transform: none; transition: none; }
[data-theme="dig"] .critter .cr-eye { transform-box: fill-box; transform-origin: center; animation: dg-blink 5.2s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -1.37s - .6s); }
@media (max-aspect-ratio: 4/5) { [data-theme="dig"] .op-art svg { transform: scale(1.35); transform-origin: 50% 100%; } }

/* Party TV */
[data-theme="dig"].tv-bd { opacity: .92; }

@keyframes dg-swing { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }
@keyframes dg-scoop { 0%, 100% { transform: rotate(0); } 40% { transform: rotate(8deg); } 60% { transform: rotate(-6deg); } }
@keyframes dg-tip { 0%, 60%, 100% { transform: rotate(0); } 72%, 86% { transform: rotate(-14deg); } }
@keyframes dg-drift { to { transform: translateX(16px); } }
@keyframes dg-in { from { opacity: 0; transform: translateX(-60px); } }
@keyframes dg-lower { from { transform: translateY(-50px); } }
@keyframes dg-blink { 0%, 93%, 100% { transform: scaleY(1); } 95.5% { transform: scaleY(.08); } }
@media (prefers-reduced-motion: reduce) {
  [data-theme="dig"] .hero-art *, [data-theme="dig"] .critter .cr-eye, [data-theme="dig"] .op-art *, [data-theme="dig"].tv-bd * { animation: none !important; }
}
