/* ==========================================================
   GOOSE theme — flat cartoon: navy outlines, cream, sky blue
   ========================================================== */
:root {
    --g-navy: #2b2d42;
    --g-cream: #fffcf3;
    --g-beige: #e3d9c6;
    --g-sky: #bfe3f5;
    --g-beak: #f6a623;
    --fc6: #f6a623;
}

/* ---------- corner peeker (shows in every theme except goose) ---------- */
.goose-peek {
    position: fixed;
    width: 80px;
    height: 160px;
    z-index: 30;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.goose-peek.bl { left: 24px;  bottom: 0; }
.goose-peek.br { right: 24px; bottom: 0; transform: scaleX(-1); }
.goose-peek.tl { left: 50%;   top: 0; margin-left: -200px; transform: rotate(180deg) scaleX(-1); }
.goose-peek.tr { right: 24px; top: 0; transform: rotate(180deg); }
.goose-peek .peek-in {
    position: absolute;
    inset: 0;
    transform: translateY(105%);
    transition: transform .55s cubic-bezier(.34, 1.56, .64, 1);
}
.goose-peek.show .peek-in {
    transform: translateY(26%);
    animation: peekWiggle 1.2s ease-in-out .6s infinite;
}
.goose-peek.caught .peek-in {
    transform: translateY(20%) scale(1.15);
    transition: transform .2s ease;
    animation: none;
}
.goose-peek:hover .peek-in {
    transform: translateY(18%);
}
.goose-peek .goose-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    filter: drop-shadow(0 3px 0 rgba(43, 45, 66, .15));
}
.goose-peek .honk {
    position: absolute;
    top: -6px;
    left: 68px;
    padding: 3px 8px;
    border: 2.5px solid var(--g-navy);
    border-radius: 10px;
    background: #fff;
    color: var(--g-navy);
    font: 700 12px/1 'Rubik', sans-serif;
    white-space: nowrap;
    opacity: 0;
    transform: scale(.6);
    transition: .25s ease .5s;
}
.goose-peek.show .honk { opacity: 1; transform: scale(1); }
.goose-peek.br .honk { transform: scaleX(-1) scale(.6); }
.goose-peek.br.show .honk { transform: scaleX(-1); }
.goose-peek.tl .honk, .goose-peek.tr .honk { display: none; }
@keyframes peekWiggle {
    0%, 100% { rotate: 0deg; }
    25%      { rotate: -4deg; }
    75%      { rotate: 4deg; }
}

/* ---------- world background ---------- */
body.goose, .goose section {
    background-color: var(--g-sky);
}
.goose section {
    background-color: transparent;
}
body.goose > img,
.goose section i,
.goose #touch {
    display: none;
}
#gooseWorld {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity .8s ease;
}
body.goose #gooseWorld {
    opacity: 1;
}
body:not(.goose) #gooseWorld * {
    animation-play-state: paused !important;
}
#gooseWorld svg { display: block; width: 100%; height: auto; overflow: visible; }

.gw-sun {
    position: absolute;
    top: 3vh;
    right: 4vw;
    width: 130px;
}
.gw-sun .rays {
    transform-origin: 100px 100px;
    animation: gwSpin 30s linear infinite;
}
@keyframes gwSpin { to { transform: rotate(360deg); } }

.gw-cloud {
    position: absolute;
    left: 0;
    animation: gwCloud linear infinite;
}
@keyframes gwCloud {
    from { transform: translateX(-30vw); }
    to   { transform: translateX(110vw); }
}

.gw-ufo {
    position: absolute;
    top: 9vh;
    left: 0;
    width: 120px;
    animation: gwUfo 26s ease-in-out infinite;
}
.gw-ufo svg { animation: gwHover 2.4s ease-in-out infinite; }
.gw-beam {
    position: absolute;
    top: 34px;
    left: 30px;
    width: 60px;
    height: 110px;
    background: #e2ecc4;
    clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%);
    opacity: 0;
    z-index: -1;
    animation: gwBeam 26s ease-in-out infinite;
}
@keyframes gwUfo {
    0%   { transform: translateX(-160px); }
    35%  { transform: translateX(30vw); }
    50%  { transform: translateX(30vw); }
    100% { transform: translateX(110vw); }
}
@keyframes gwBeam {
    0%, 36%, 49%, 100% { opacity: 0; }
    39%, 46%           { opacity: .9; }
}
@keyframes gwHover {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

.gw-town {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 62vh;
}
#gooseWorld .gw-town svg { width: 100%; height: 100%; }

/* walking geese */
.gw-walker {
    position: absolute;
    left: 0;
    aspect-ratio: 60 / 120;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}
#gooseWorld .gw-walker svg { height: 100%; width: auto; }
.gw-walker.to-right { animation-name: gwWalkRight; }
.gw-walker.to-left  { animation-name: gwWalkLeft; }
.gw-walker.to-left .gw-waddle { transform: scaleX(-1); }
.gw-waddle { height: 100%; animation: gwWaddle .7s ease-in-out infinite; transform-origin: 50% 100%; }
.gw-walker.to-left .gw-waddle { animation-name: gwWaddleL; }
@keyframes gwWalkRight { from { transform: translateX(-140px); } to { transform: translateX(105vw); } }
@keyframes gwWalkLeft  { from { transform: translateX(105vw); } to { transform: translateX(-140px); } }
@keyframes gwWaddle  { 0%, 100% { rotate: -5deg; } 50% { rotate: 5deg; } }
@keyframes gwWaddleL { 0%, 100% { rotate: -5deg; } 50% { rotate: 5deg; } }

/* floating eggs / ufos / space geese (the "dots") */
.gw-float {
    position: absolute;
    bottom: 0;
    animation-name: gwRise, gwSway;
    animation-timing-function: linear, ease-in-out;
    animation-iteration-count: infinite, infinite;
    opacity: .95;
}
@keyframes gwRise {
    0%   { transform: translateY(20vh); opacity: 0; }
    8%   { opacity: .95; }
    92%  { opacity: .95; }
    100% { transform: translateY(-115vh); opacity: 0; }
}
@keyframes gwSway {
    0%, 100% { rotate: -10deg; translate: -10px 0; }
    50%      { rotate: 10deg;  translate: 10px 0; }
}

/* ---------- fonts ---------- */
.goose section h2,
.goose section h2 *,
.goose .countdown div,
.goose .text,
.goose h4 {
    font-family: 'Rubik', sans-serif;
}

/* ---------- the clock: cream badge with navy outline ---------- */
.goose section .box:before { display: none; }
.goose section .circle {
    background: var(--g-cream);
    border: 6px solid var(--g-navy);
    box-shadow: 0 10px 0 var(--g-navy);
    transition: box-shadow .15s ease, transform .15s ease;
}
.goose section .circle:before {
    top: 14px; left: 14px; right: 14px; bottom: 14px;
    background: var(--g-cream);
    border: 4px solid var(--g-beige);
}
.goose section .circle.poppuf:before { background: var(--g-cream); }
.goose section .circle.popbig {
    box-shadow: 0 4px 0 var(--g-navy);
    transform: translateY(6px);
}
.goose section h2 {
    color: var(--g-navy);
    font-weight: 700;
    font-size: 3.4em;
    line-height: 1.15;
    text-shadow: none;
}
.goose section .poppuf h2 { font-size: 3.5em; }
.goose span#year em,
.goose .countdown #second {
    color: var(--g-beak);
    -webkit-text-fill-color: var(--g-beak);
    -webkit-text-stroke: 2px var(--g-navy);
    text-shadow: none;
}
.goose .countdown div {
    width: 66px;
    margin: 0 4px;
    padding: 6px 0 4px;
    color: var(--g-navy);
    -webkit-text-fill-color: var(--g-navy);
    -webkit-text-stroke-width: 0;
    font-size: 1.5em;
    font-weight: 700;
    background: #fff;
    border: 3px solid var(--g-beige);
    border-radius: 14px;
    text-shadow: none;
}
.goose .countdown #second { -webkit-text-stroke: 1.5px var(--g-navy); }
.goose .countdown div:before,
.goose .countdown #second:before {
    bottom: -34px;
    font-size: .7rem;
    font-weight: 500;
    color: #6b6d7d;
    -webkit-text-fill-color: #6b6d7d;
    -webkit-text-stroke-width: 0;
    text-shadow: none;
}

/* hands */
.goose .clock:before {
    width: 18px; height: 18px;
    background-color: var(--g-beak);
    border: 3px solid var(--g-navy);
    box-shadow: none;
}
.goose .hr:before {
    width: 12px;
    background: var(--g-navy);
    border: none;
    border-radius: 6px;
    box-shadow: none;
}
.goose .mn:before {
    width: 7px;
    background: var(--g-navy);
    border: none;
    border-radius: 4px;
    box-shadow: none;
}
.goose .sc:before {
    width: 3px;
    background: var(--g-beak);
    box-shadow: none;
}

/* ---------- theme buttons ---------- */
.goose .label { color: var(--g-navy); }
.goose .text { font-weight: 500; }
.goose .indicator {
    background: var(--g-cream);
    border: 3px solid var(--g-navy);
    box-shadow: 0 4px 0 var(--g-navy);
}
.goose .indicator::before { box-shadow: none; }
.goose .indicator::after {
    background: var(--g-cream);
    box-shadow: none;
}

/* ---------- signature ---------- */
.goose h4 {
    color: var(--g-navy);
    font-weight: 500;
}

/* ---------- fireworks in beak orange ---------- */
body.goose #fireworks:before, body.goose #fireworks:after {
    animation: 1s bang ease-out infinite backwards,
               1s gravity ease-in infinite backwards,
               5s position linear infinite backwards;
    box-shadow: -120px 0 var(--fc6), 120px 0 var(--fc6), 0 120px var(--fc6), 0 -120px var(--fc6),
                45px 45px var(--fc6), -45px 45px var(--fc6), 85px 85px var(--fc6), -85px 85px var(--fc6),
                45px -45px var(--fc6), -45px -45px var(--fc6), 85px -85px var(--fc6), -85px -85px var(--fc6),
                65px 0 var(--fc6), -65px 0 var(--fc6), 0 65px var(--fc6), 0 -65px var(--fc6),
                100px 45px var(--fc6), -100px 45px var(--fc6), -50px 100px var(--fc6), 50px 100px var(--fc6),
                100px -45px var(--fc6), -100px -45px var(--fc6), -50px -100px var(--fc6), 50px -100px var(--fc6),
                5px 10px var(--fc6);
}
body.goose #fireworks:after {
    animation-delay: 1.25s, 1.25s, 1.25s;
    animation-duration: 1.25s, 1.25s, 6.25s;
}

@media only screen and (max-width: 600px) {
    .goose section h2 { font-size: 2.8em; }
    .gw-sun { width: 90px; }
    .goose-peek.tl { left: 24px; margin-left: 0; }
}

/* ---------- egg-shaped clock ---------- */
.goose section .box {
    width: 430px;
    height: 540px;
    transition: .4s, height .4s;
}
.goose section .circle,
.goose section .circle:before {
    border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
}
.goose section .circle:before {
    /* a few soft egg speckles */
    background:
        radial-gradient(ellipse 14px 10px at 22% 70%, #f3e6c9 98%, transparent) ,
        radial-gradient(ellipse 9px 7px at 78% 64%, #f3e6c9 98%, transparent),
        radial-gradient(ellipse 11px 8px at 70% 84%, #f3e6c9 98%, transparent),
        radial-gradient(ellipse 7px 5px at 32% 86%, #f3e6c9 98%, transparent),
        radial-gradient(ellipse 8px 6px at 30% 22%, #f3e6c9 98%, transparent),
        radial-gradient(ellipse 6px 5px at 66% 16%, #f3e6c9 98%, transparent),
        var(--g-cream);
}
.goose section .circle.poppuf:before {
    background:
        radial-gradient(ellipse 14px 10px at 22% 70%, #f3e6c9 98%, transparent) ,
        radial-gradient(ellipse 9px 7px at 78% 64%, #f3e6c9 98%, transparent),
        radial-gradient(ellipse 11px 8px at 70% 84%, #f3e6c9 98%, transparent),
        radial-gradient(ellipse 7px 5px at 32% 86%, #f3e6c9 98%, transparent),
        radial-gradient(ellipse 8px 6px at 30% 22%, #f3e6c9 98%, transparent),
        radial-gradient(ellipse 6px 5px at 66% 16%, #f3e6c9 98%, transparent),
        var(--g-cream);
}
/* sit the clock in the wide, lower part of the egg */
.goose .clock,
.goose .timer-box {
    margin-top: 70px;
}
.goose .clock {
    width: 410px;
    height: 410px;
}
.goose .clock .sec, .goose .sc { width: 400px; height: 400px; }
.goose .sc:before { height: 195px; }
.goose span#year { margin-top: -175px; }
.goose .countdown { margin-top: 180px; }
@media only screen and (max-width: 600px) {
    .goose section .box { width: 380px; height: 480px; }
}

/* ==========================================================
   DAY / NIGHT
   ========================================================== */
body.goose { transition: background-color 1.2s ease; }
body.goose.night { background-color: #2a2552; }

/* sun / moon button */
#gooseSky {
    position: fixed;
    top: 3vh;
    right: 4vw;
    width: 130px;
    height: 130px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    z-index: 3;
    display: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform .2s ease;
}
body.goose #gooseSky { display: block; }
#gooseSky:hover { transform: scale(1.06); }
#gooseSky:active { transform: scale(.94); }
#gooseSky:focus-visible { outline: 3px dashed #fff3c4 !important; outline-offset: 4px; border-radius: 50%; }
#gooseSky span {
    position: absolute;
    inset: 0;
    transition: transform 1.1s cubic-bezier(.5, -0.3, .3, 1.3), opacity .8s ease;
}
#gooseSky svg { width: 100%; height: 100%; display: block; overflow: visible; }
#gooseSky .rays { transform-origin: 100px 100px; animation: gwSpin 30s linear infinite; }
#gooseSky .gs-moon { opacity: 0; transform: translateY(60px) rotate(-60deg) scale(.4); }
.night #gooseSky .gs-sun { opacity: 0; transform: translateY(60px) rotate(90deg) scale(.4); }
.night #gooseSky .gs-moon { opacity: 1; transform: none; }
.night #gooseSky .gs-moon svg { animation: gwMoonBob 4s ease-in-out infinite; }
@keyframes gwMoonBob { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }

/* stars in the sky */
.gw-star {
    position: absolute;
    opacity: 0;
    transition: opacity 1.2s ease;
}
.night .gw-star { opacity: 1; }
.gw-star svg { animation: gwTwinkle ease-in-out infinite; animation-duration: inherit; animation-delay: inherit; }
@keyframes gwTwinkle {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(.55) rotate(20deg); opacity: .5; }
}

/* darken the town, light the windows */
.gw-tint {
    position: absolute;
    inset: 0;
    background: #120f26;
    opacity: 0;
    transition: opacity 1.2s ease;
}
.night .gw-tint { opacity: .5; }
.gw-lights {
    opacity: 0;
    transition: opacity 1s ease .6s;
}
.night .gw-lights { opacity: 1; }
.gw-cloud { transition: opacity 1.2s ease; }
.night .gw-cloud { opacity: .18; }

/* geese go home: they hop away and vanish */
.gw-walker .gw-waddle {
    transition: opacity .7s ease, translate .7s ease, scale .7s ease;
}
.night .gw-walker .gw-waddle {
    opacity: 0;
    translate: 0 -30px;
    scale: .4;
}

/* only UFOs and stars float at night */
.gw-float.day-only,
.gw-float.night-only { transition: opacity 1s ease; }
.night .gw-float.day-only { opacity: 0 !important; visibility: hidden; transition: opacity 1s ease, visibility 0s 1s; }
.gw-float.night-only { visibility: hidden; }
.night .gw-float.night-only { visibility: visible; }
body:not(.night) .gw-float.night-only { opacity: 0 !important; }
.night .gw-ufo { filter: drop-shadow(0 0 12px rgba(158, 224, 255, .6)); }
.night .gw-beam { background: #fff3a8; }

/* page text on the dark sky */
.goose.night h4,
.goose.night .text.start,
.goose.night .state:hover ~ .label .text { color: #fff3c4; }
.goose.night section .circle {
    box-shadow: 0 10px 0 #15132b, 0 0 70px rgba(255, 243, 196, .25);
}

@media only screen and (max-width: 600px) {
    #gooseSky { width: 84px; height: 84px; top: 110px; right: 12px; }
}

/* chimney smoke */
.gw-smoke circle {
    fill: #fff;
    stroke: #2b2d42;
    stroke-width: 3;
    transform-box: fill-box;
    transform-origin: center;
    animation: gwSmoke 3.6s ease-in-out infinite;
}
.gw-smoke circle:nth-child(2) { animation-delay: -1.2s; }
.gw-smoke circle:nth-child(3) { animation-delay: -2.4s; }
@keyframes gwSmoke {
    0%   { transform: translate(0, 18px) scale(.4); opacity: 0; }
    25%  { opacity: 1; }
    100% { transform: translate(8px, -14px) scale(1.1); opacity: 0; }
}
.night .gw-smoke circle { fill: #8b86a8; }

/* ==========================================================
   NEW YEAR GOOSE PARTY (1 minute at 00:00)
   ========================================================== */
.gp-crew { position: absolute; inset: 0; transition: opacity 1s ease; }
.gp-crew.gp-out, #gooseConfetti.gp-out { opacity: 0; }

/* dancing geese */
.gp-dancer {
    position: absolute;
    aspect-ratio: 60 / 120;
    transform-origin: 50% 100%;
    animation: gpDance .55s ease-in-out infinite alternate;
}
.gp-dancer:nth-child(even) { animation-name: gpDance2; }
.gp-dancer:nth-child(n+5) svg.goose-svg { transform: scaleX(-1); }
#gooseWorld .gp-dancer svg.goose-svg { height: 100%; width: auto; }
@keyframes gpDance  { from { transform: translateY(0) rotate(-8deg); } to { transform: translateY(-26px) rotate(8deg); } }
@keyframes gpDance2 { from { transform: translateY(-18px) rotate(10deg) scaleY(.95); } to { transform: translateY(0) rotate(-6deg) scaleY(1.05); } }
.gp-balloon {
    position: absolute;
    left: 62%;
    top: -55%;
    width: 46%;
    animation: gwHover 1.6s ease-in-out infinite;
}

/* UFO towing a banner */
.gp-banner {
    position: absolute;
    top: 13vh;
    left: 0;
    display: flex;
    align-items: center;
    animation: gpTow 20s linear infinite;
}
.gp-ufo { width: 110px; order: 3; }
.gp-ufo svg { animation: gwHover 1.4s ease-in-out infinite; }
.gp-rope { order: 2; width: 50px; height: 3px; background: #2b2d42; margin-top: 6px; }
.gp-flag {
    order: 1;
    padding: 10px 26px 10px 22px;
    background: #fffcf3;
    border: 4px solid #2b2d42;
    border-radius: 10px 4px 4px 10px;
    color: #2b2d42;
    font: 700 26px/1 'Rubik', sans-serif;
    white-space: nowrap;
    box-shadow: 0 5px 0 #2b2d42;
    clip-path: polygon(0 0, 100% 0, 92% 50%, 100% 100%, 0 100%);
    animation: gpWave 1.2s ease-in-out infinite alternate;
}
@keyframes gpTow  { from { transform: translateX(-450px); } to { transform: translateX(110vw); } }
@keyframes gpWave { from { transform: skewY(-3deg); } to { transform: skewY(3deg); } }

/* confetti over everything */
#gooseConfetti {
    position: fixed;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    overflow: hidden;
    transition: opacity 1s ease;
}
#gooseConfetti i {
    position: absolute;
    top: -30px;
    animation-name: gpFall, gpFlip;
    animation-timing-function: linear, ease-in-out;
    animation-iteration-count: infinite, infinite;
    animation-fill-mode: backwards;
}
@keyframes gpFall { from { transform: translateY(0) rotate(0); } to { transform: translateY(110vh) rotate(720deg); } }
@keyframes gpFlip { 0%, 100% { scale: 1 1; } 50% { scale: .2 1; } }

/* the whole town joins in */
.party .gw-walker .gw-waddle { animation: gpHop .45s ease-in-out infinite alternate; }
.party.night .gw-walker .gw-waddle { opacity: 1; translate: 0 0; scale: 1; }
@keyframes gpHop { from { translate: 0 0; rotate: -6deg; } to { translate: 0 -16px; rotate: 6deg; } }
.goose.party section .circle { animation: gpEgg 1.1s ease-in-out infinite; }
@keyframes gpEgg { 0%, 100% { rotate: -3deg; } 50% { rotate: 3deg; } }
.party #gooseSky { animation: gpEgg .9s ease-in-out infinite; }

/* colourful fireworks during the goose party */
body.goose.party #fireworks:before { --fc6: #ef5da8; }
body.goose.party #fireworks:after  { --fc6: #2ec4b6; }
