/* @import 'tailwindcss'; - Commented out as Tailwind is not used in this CSS file */

@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../storage/framework/views/*.php';
@source '../**/*.blade.php';
@source '../**/*.js';

@theme {
    --font-sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
        'Segoe UI Symbol', 'Noto Color Emoji';
}

/* Curtain reveal overlay */
.curtain {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: auto;
    contain: paint;
    /* reference-style color tokens */
    --red-1: #b80f1f;
    /* base */
    --red-2: #8f0b18;
    /* shadow fold */
    --red-3: #d41728;
    /* highlight fold */
}

.curtain .panel {
    position: absolute;
    top: 0;
    width: 50vw;
    height: 100vh;
    /* folds + side shading + bottom darkening, like curtains.html */
    background:
        linear-gradient(to bottom, transparent 70%, rgba(0, 0, 0, .35)),
        linear-gradient(to right, rgba(0, 0, 0, .55), transparent 15%, transparent 85%, rgba(0, 0, 0, .55)),
        repeating-linear-gradient(90deg,
            var(--red-2) 0 10px,
            var(--red-1) 10px 24px,
            var(--red-3) 24px 34px,
            var(--red-1) 34px 48px);
    filter: saturate(1.1) contrast(1.02);
    background-color: var(--red-1);
    will-change: transform, opacity;
    overflow: hidden;
}

.curtain .left {
    left: 0;
    transform: translateX(0);
}

.curtain .right {
    right: 0;
    transform: translateX(0);
}

/* Modal */
.curtain .modal {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    color: #fff;
    padding: 24px;
}

.curtain .logo-mark {
    width: 160px;
    height: auto;
    margin: 8px 0 16px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .4));
    position: relative;
    z-index: 1;
    border-radius: 16px;
}

/* Inline grow slot holds logo, then tree at same spot */
.curtain .grow-slot {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 140px;
    height: 140px;
    margin: 8px 0 16px;
}

/* removed tree variant */

.curtain .modal-title {
    margin: 0 0 8px;
    font: 900 36px system-ui;
}

.curtain .modal-sub {
    margin: 0 0 16px;
    font: 700 20px system-ui;
    color: #ffe7e7;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}

.curtain .modal-btn {
    display: inline-block;
    background: linear-gradient(135deg, #2d6a1e 0%, #1a4a14 100%);
    color: #fff;
    border-radius: 9999px;
    padding: 16px 32px;
    font: 800 18px system-ui;
    letter-spacing: .3px;
    cursor: pointer;
    user-select: none;
    transition: opacity .25s ease;
}

.curtain .modal-btn:hover {
    filter: brightness(1.05);
}

.curtain .modal-btn:active {
    transform: translateY(1px);
}

.curtain .modal-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Hidden checkbox orchestrates the sequence */
.curtain-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Tree */
.curtain .tree {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
}

.curtain .tree .trunk {
    width: 8px;
    height: 0;
    background: #5b3a29;
    border-radius: 4px;
}

.curtain .tree .canopy {
    width: 0;
    height: 0;
    opacity: 0;
    background: radial-gradient(circle at 50% 60%, #38a169 0 60%, #2f855a 61% 100%);
    border-radius: 50%;
    transform: translateY(8px);
}


.curtain .tree .tree-img {
    width: auto;
    height: auto;
    background: none;
    opacity: 0;
    transform: translateY(8px) scale(.95);
}

.curtain .tree .tree-img::before {
    content: "🌳";
    display: block;
    font-size: 120px;
    line-height: 1;
}

/* remove previous overlay folds; base now provides folds */
.curtain .panel::before {
    content: none;
}

/* Soft top spotlight inspired by reference image */
.curtain::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .45;
    mix-blend-mode: screen;
    background: radial-gradient(120% 70% at 50% -10%, rgba(255, 255, 255, .28), rgba(255, 255, 255, .12) 20%, rgba(0, 0, 0, 0) 55%);
}

/* Sequence: click YES -> fade modal, grow tree, roll curtains, then hide overlay */
.curtain-toggle:checked+.curtain .modal .modal-btn {
    opacity: 0;
    pointer-events: none;
}

.curtain-toggle:checked+.curtain .modal {
    animation: none;
}

.curtain-toggle:checked+.curtain .modal .logo-mark {
    animation: logoSet 0.6s ease forwards;
}


/* removed tree appear */

/* Removed center sapling/tree animations: now handled inside .grow-slot */

.curtain-toggle:checked+.curtain .left {
    animation: curtainLeft 1s 1.2s ease-out forwards;
}

.curtain-toggle:checked+.curtain .right {
    animation: curtainRight 1s 1.2s ease-out forwards;
}

.curtain-toggle:checked+.curtain .panel::before {
    animation: foldDrift 2.2s 1.2s ease-in-out forwards;
}

/* After sequence, hide and disable overlay */
/* Fade the entire overlay (including modal/logo/button) as curtains complete */
.curtain-toggle:checked+.curtain {
    animation: overlayFade .6s 1.7s ease-out forwards, curtainHide .3s 2.3s linear forwards;
}

/* trigger celebration confetti after overlay has faded */
.curtain-toggle:checked~.celebrate {
    animation: confettiShow .3s 2.3s linear forwards;
}

/* Ensure clicks pass through after hide */
.curtain-toggle:checked+.curtain {
    pointer-events: none;
}

@keyframes curtainLeft {
    0% {
        transform: translateX(0)
    }

    60% {
        transform: translateX(-94%) skewX(-1deg)
    }

    100% {
        transform: translateX(-100%) skewX(0)
    }
}

@keyframes curtainRight {
    0% {
        transform: translateX(0)
    }

    60% {
        transform: translateX(94%) skewX(1deg)
    }

    100% {
        transform: translateX(100%) skewX(0)
    }
}

@keyframes foldDrift {
    0% {
        background-position: 0 0, 0 0
    }

    50% {
        background-position: 20px 0, -20px 0
    }

    100% {
        background-position: 40px 0, -40px 0
    }
}

@keyframes modalFadeOut {
    to {
        opacity: 0;
        visibility: hidden
    }
}

@keyframes treeReveal {
    to {
        opacity: 1
    }
}

@keyframes trunkGrow {
    from {
        height: 0
    }

    to {
        height: 80px
    }
}

@keyframes canopyGrow {
    from {
        width: 0;
        height: 0;
        opacity: 0
    }

    to {
        width: 110px;
        height: 110px;
        opacity: 1
    }
}

@keyframes logoSet {
    to {
        opacity: 0;
        transform: translateY(24px) scale(.98)
    }
}



@keyframes curtainHide {
    to {
        opacity: 0;
        visibility: hidden
    }
}

@keyframes overlayFade {
    to {
        opacity: 0;
    }
}

/* Confetti (pure CSS, no JS) */
.confetti {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
}

.confetti .piece {
    position: absolute;
    width: 8px;
    height: 14px;
    border-radius: 2px;
    opacity: .95;
    transform: translateY(-20vh) rotate(0);
}

/* Color variety */
.confetti .piece:nth-child(odd) {
    background: #ffc107
}

.confetti .piece:nth-child(3n) {
    background: #28a745
}

.confetti .piece:nth-child(5n) {
    background: #17a2b8
}

.confetti .piece:nth-child(7n) {
    background: #e83e8c
}

.confetti .piece:nth-child(11n) {
    background: #fd7e14
}

/* Randomized positions and timings for 40 pieces */
.confetti .piece {
    animation: fall 4.6s ease-in forwards, spin 1.4s linear infinite;
}

.confetti .piece:nth-child(1) {
    left: 2%;
    animation-delay: .05s
}

.confetti .piece:nth-child(2) {
    left: 8%;
    animation-delay: .2s
}

.confetti .piece:nth-child(3) {
    left: 14%;
    animation-delay: .35s
}

.confetti .piece:nth-child(4) {
    left: 20%;
    animation-delay: .1s
}

.confetti .piece:nth-child(5) {
    left: 26%;
    animation-delay: .3s
}

.confetti .piece:nth-child(6) {
    left: 32%;
    animation-delay: .15s
}

.confetti .piece:nth-child(7) {
    left: 38%;
    animation-delay: .4s
}

.confetti .piece:nth-child(8) {
    left: 44%;
    animation-delay: .25s
}

.confetti .piece:nth-child(9) {
    left: 50%;
    animation-delay: .05s
}

.confetti .piece:nth-child(10) {
    left: 56%;
    animation-delay: .2s
}

.confetti .piece:nth-child(11) {
    left: 62%;
    animation-delay: .35s
}

.confetti .piece:nth-child(12) {
    left: 68%;
    animation-delay: .1s
}

.confetti .piece:nth-child(13) {
    left: 74%;
    animation-delay: .3s
}

.confetti .piece:nth-child(14) {
    left: 80%;
    animation-delay: .15s
}

.confetti .piece:nth-child(15) {
    left: 86%;
    animation-delay: .4s
}

.confetti .piece:nth-child(16) {
    left: 92%;
    animation-delay: .25s
}

.confetti .piece:nth-child(17) {
    left: 6%;
    animation-delay: .15s
}

.confetti .piece:nth-child(18) {
    left: 12%;
    animation-delay: .25s
}

.confetti .piece:nth-child(19) {
    left: 18%;
    animation-delay: .35s
}

.confetti .piece:nth-child(20) {
    left: 24%;
    animation-delay: .45s
}

.confetti .piece:nth-child(21) {
    left: 30%;
    animation-delay: .2s
}

.confetti .piece:nth-child(22) {
    left: 36%;
    animation-delay: .3s
}

.confetti .piece:nth-child(23) {
    left: 42%;
    animation-delay: .4s
}

.confetti .piece:nth-child(24) {
    left: 48%;
    animation-delay: .5s
}

.confetti .piece:nth-child(25) {
    left: 54%;
    animation-delay: .15s
}

.confetti .piece:nth-child(26) {
    left: 60%;
    animation-delay: .25s
}

.confetti .piece:nth-child(27) {
    left: 66%;
    animation-delay: .35s
}

.confetti .piece:nth-child(28) {
    left: 72%;
    animation-delay: .45s
}

.confetti .piece:nth-child(29) {
    left: 78%;
    animation-delay: .2s
}

.confetti .piece:nth-child(30) {
    left: 84%;
    animation-delay: .3s
}

.confetti .piece:nth-child(31) {
    left: 90%;
    animation-delay: .4s
}

.confetti .piece:nth-child(32) {
    left: 96%;
    animation-delay: .5s
}

.confetti .piece:nth-child(33) {
    left: 4%;
    animation-delay: .25s
}

.confetti .piece:nth-child(34) {
    left: 28%;
    animation-delay: .18s
}

.confetti .piece:nth-child(35) {
    left: 52%;
    animation-delay: .12s
}

.confetti .piece:nth-child(36) {
    left: 76%;
    animation-delay: .22s
}

.confetti .piece:nth-child(37) {
    left: 10%;
    animation-delay: .28s
}

.confetti .piece:nth-child(38) {
    left: 34%;
    animation-delay: .32s
}

.confetti .piece:nth-child(39) {
    left: 58%;
    animation-delay: .36s
}

.confetti .piece:nth-child(40) {
    left: 82%;
    animation-delay: .4s
}

@keyframes confettiFall {
    0% {
        transform: translateY(-20vh) translateX(0) rotate(0deg);
        opacity: 1
    }

    25% {
        transform: translateY(20vh) translateX(-8vw) rotate(180deg)
    }

    50% {
        transform: translateY(50vh) translateX(6vw) rotate(360deg)
    }

    75% {
        transform: translateY(80vh) translateX(-4vw) rotate(540deg)
    }

    100% {
        transform: translateY(110vh) translateX(0) rotate(720deg);
        opacity: 0
    }
}

@keyframes confettiShow {
    to {
        opacity: 1
    }
}

/* Celebrate alias (matches markup <div class="celebrate"><span class="c-piece">… */
.celebrate {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
}

.celebrate .c-piece {
    position: absolute;
    width: 8px;
    height: 14px;
    border-radius: 2px;
    opacity: .95;
    transform: translateY(-20vh) rotate(0);
}

/* start piece animations only when checkbox is checked; base start delay carried via --start */
.curtain-toggle:checked~.celebrate {
    --start: 4.1s;
}

.curtain-toggle:checked~.celebrate .c-piece {
    animation: confettiFall 4.6s ease-in forwards;
    animation-delay: var(--start, 0s);
}

/* Color variety */
.celebrate .c-piece:nth-child(odd) {
    background: #ffc107
}

.celebrate .c-piece:nth-child(3n) {
    background: #28a745
}

.celebrate .c-piece:nth-child(5n) {
    background: #17a2b8
}

.celebrate .c-piece:nth-child(7n) {
    background: #e83e8c
}

.celebrate .c-piece:nth-child(11n) {
    background: #fd7e14
}

/* Positions and delays for 40 pieces */
.celebrate .c-piece:nth-child(1) {
    left: 2%;
    animation-delay: .05s
}

.celebrate .c-piece:nth-child(2) {
    left: 8%;
    animation-delay: .2s
}

.celebrate .c-piece:nth-child(3) {
    left: 14%;
    animation-delay: .35s
}

.celebrate .c-piece:nth-child(4) {
    left: 20%;
    animation-delay: .1s
}

.celebrate .c-piece:nth-child(5) {
    left: 26%;
    animation-delay: .3s
}

.celebrate .c-piece:nth-child(6) {
    left: 32%;
    animation-delay: .15s
}

.celebrate .c-piece:nth-child(7) {
    left: 38%;
    animation-delay: .4s
}

.celebrate .c-piece:nth-child(8) {
    left: 44%;
    animation-delay: .25s
}

.celebrate .c-piece:nth-child(9) {
    left: 50%;
    animation-delay: .05s
}

.celebrate .c-piece:nth-child(10) {
    left: 56%;
    animation-delay: .2s
}

.celebrate .c-piece:nth-child(11) {
    left: 62%;
    animation-delay: .35s
}

.celebrate .c-piece:nth-child(12) {
    left: 68%;
    animation-delay: .1s
}

.celebrate .c-piece:nth-child(13) {
    left: 74%;
    animation-delay: .3s
}

.celebrate .c-piece:nth-child(14) {
    left: 80%;
    animation-delay: .15s
}

.celebrate .c-piece:nth-child(15) {
    left: 86%;
    animation-delay: .4s
}

.celebrate .c-piece:nth-child(16) {
    left: 92%;
    animation-delay: .25s
}

.celebrate .c-piece:nth-child(17) {
    left: 6%;
    animation-delay: .15s
}

.celebrate .c-piece:nth-child(18) {
    left: 12%;
    animation-delay: .25s
}

.celebrate .c-piece:nth-child(19) {
    left: 18%;
    animation-delay: .35s
}

.celebrate .c-piece:nth-child(20) {
    left: 24%;
    animation-delay: .45s
}

.celebrate .c-piece:nth-child(21) {
    left: 30%;
    animation-delay: .2s
}

.celebrate .c-piece:nth-child(22) {
    left: 36%;
    animation-delay: .3s
}

.celebrate .c-piece:nth-child(23) {
    left: 42%;
    animation-delay: .4s
}

.celebrate .c-piece:nth-child(24) {
    left: 48%;
    animation-delay: .5s
}

.celebrate .c-piece:nth-child(25) {
    left: 54%;
    animation-delay: .15s
}

.celebrate .c-piece:nth-child(26) {
    left: 60%;
    animation-delay: .25s
}

.celebrate .c-piece:nth-child(27) {
    left: 66%;
    animation-delay: .35s
}

.celebrate .c-piece:nth-child(28) {
    left: 72%;
    animation-delay: .45s
}

.celebrate .c-piece:nth-child(29) {
    left: 78%;
    animation-delay: .2s
}

.celebrate .c-piece:nth-child(30) {
    left: 84%;
    animation-delay: .3s
}

.celebrate .c-piece:nth-child(31) {
    left: 90%;
    animation-delay: .4s
}

.celebrate .c-piece:nth-child(32) {
    left: 96%;
    animation-delay: .5s
}

.celebrate .c-piece:nth-child(33) {
    left: 4%;
    animation-delay: .25s
}

.celebrate .c-piece:nth-child(34) {
    left: 28%;
    animation-delay: .18s
}

.celebrate .c-piece:nth-child(35) {
    left: 52%;
    animation-delay: .12s
}

.celebrate .c-piece:nth-child(36) {
    left: 76%;
    animation-delay: .22s
}

.celebrate .c-piece:nth-child(37) {
    left: 10%;
    animation-delay: .28s
}

.celebrate .c-piece:nth-child(38) {
    left: 34%;
    animation-delay: .32s
}

.celebrate .c-piece:nth-child(39) {
    left: 58%;
    animation-delay: .36s
}

.celebrate .c-piece:nth-child(40) {
    left: 82%;
    animation-delay: .4s
}

@media (prefers-reduced-motion: reduce) {

    .curtain,
    .curtain * {
        animation: none !important
    }

    .curtain {
        opacity: 0;
        visibility: hidden
    }
}

/* Celebration (JS-driven confetti + falling stars) */
.celebration {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

/* Confetti pieces that explode outward */
.confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    opacity: 1;
    will-change: transform, opacity;
    animation: confettiExplode var(--duration, 3s) var(--delay, 0s) ease-out forwards;
}

@keyframes confettiExplode {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    50% {
        opacity: 0.8;
        transform: translate(calc(var(--distance) * cos(var(--angle))),
                calc(var(--distance) * sin(var(--angle)))) rotate(180deg) scale(0.8);
    }

    100% {
        opacity: 0;
        transform: translate(calc(var(--distance) * cos(var(--angle)) * 1.5),
                calc(var(--distance) * sin(var(--angle)) * 1.5 + 100px)) rotate(360deg) scale(0.3);
    }
}

/* Falling stars from top */
.falling-star {
    position: absolute;
    font-size: 24px;
    line-height: 1;
    opacity: 1;
    will-change: transform, opacity;
    animation: starFall var(--fall-duration, 4s) ease-out forwards;
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.6));
}

@keyframes starFall {
    0% {
        opacity: 1;
        transform: translateY(-30px) translateX(0) rotate(0deg) scale(1);
    }

    20% {
        opacity: 1;
        transform: translateY(20vh) translateX(calc(var(--sway) * 0.3)) rotate(45deg) scale(1.1);
    }

    50% {
        opacity: 0.9;
        transform: translateY(50vh) translateX(calc(var(--sway) * 0.7)) rotate(90deg) scale(1);
    }

    80% {
        opacity: 0.6;
        transform: translateY(80vh) translateX(var(--sway)) rotate(135deg) scale(0.9);
    }

    100% {
        opacity: 0;
        transform: translateY(calc(100vh + 50px)) translateX(var(--sway)) rotate(180deg) scale(0.7);
    }
}