/*! © 2026 Dastan Invites, dastaninvites.com. All rights reserved. This invitation's design, code, artwork and music may not be copied, reused or resold. */

.countdown {
    position: relative;
    aspect-ratio: var(--cd-r);
    overflow: hidden;
    background: #8a5532;
    isolation: isolate;
    container-type: inline-size;
    -webkit-tap-highlight-color: transparent
}

.cd-panel,
.cd-shade,
.cd-band,
.cd-sun,
.cd-petals {
    position: absolute;
    inset: 0;
    pointer-events: none
}

.cd-panel {
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat
}

.cd-shade {
    overflow: hidden
}

.cd-shade:before {
    content: "";
    position: absolute;
    left: -18%;
    top: -6%;
    width: 92%;
    aspect-ratio: var(--shade-r, 1.366);
    background: url(../assets/theme/shade.webp) 0 0 / 100% 100% no-repeat;
    opacity: .12;
    filter: blur(4px);
    mix-blend-mode: multiply;
    transform-origin: 0 0;
    transform: rotate(14deg);
    animation: kh-shade 12s ease-in-out infinite alternate
}

@property --csx {
    syntax: "<percentage>";
    inherits: false;
    initial-value: 30%;
}

@property --csy {
    syntax: "<percentage>";
    inherits: false;
    initial-value: 24%;
}

.cd-sun {
    z-index: 4;
    overflow: hidden;
    mix-blend-mode: soft-light;
    opacity: 0;
    transition: opacity 2.4s ease
}

.cd-sun:before {
    content: "";
    position: absolute;
    left: -46%;
    top: -30%;
    width: 92%;
    height: 60%;
    background: radial-gradient(closest-side, rgba(255, 228, 182, .4), transparent 70%);
    transform: translate(32.6087%, 40%)
}

.countdown.is-done .cd-sun {
    opacity: 1
}

.countdown.is-done .cd-sun:before {
    animation: cd-sun 26s ease-in-out infinite alternate
}

@keyframes cd-sun {
    0% {
        transform: translate(32.6087%, 40%)
    }
    35% {
        transform: translate(78.2609%, 83.3333%)
    }
    70% {
        transform: translate(41.3043%, 103.3333%)
    }
    to {
        transform: translate(71.7391%, 133.3333%)
    }
}

.cd-band {
    z-index: 4;
    background: linear-gradient(112deg, transparent 37%, rgba(255, 236, 196, .55) 46%, rgba(255, 222, 170, .75) 50%, rgba(255, 236, 196, .55) 54%, transparent 63%) 100% 0 / 280% 100% no-repeat;
    mix-blend-mode: soft-light;
    opacity: 0
}

.cd-area {
    position: absolute;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    container-type: size;
    --fit: 1;
    color: var(--snow);
    text-shadow: 0 0 .25em rgba(40, 18, 6, .65), 0 .04em .06em rgba(30, 12, 4, .8)
}

.cd-area>* {
    margin: 0
}

.cd-kicker {
    font: 700 calc(clamp(9px, min(3.6cqw, 13cqh), 16px) * var(--fit))/1.3 "Cormorant Garamond", Georgia, serif;
    letter-spacing: .28em;
    padding-left: .28em;
    text-transform: uppercase;
    color: #f6efe4
}

.cd-title {
    font: 400 calc(min(16cqw, 50cqh) * var(--fit))/1 "Italianno", cursive;
    padding: 0 .2em
}

.cd-date {
    font: 600 calc(clamp(10px, min(4.6cqw, 15cqh), 22px) * var(--fit))/1.3 "Cormorant Garamond", Georgia, serif;
    letter-spacing: .04em;
    margin-top: .1em !important
}

.cd-line {
    font: italic 500 calc(clamp(11px, min(6.4cqw, 30cqh), 22px) * var(--fit))/1.2 "Cormorant Garamond", Georgia, serif
}

.cd-save {
    margin-top: calc(min(1.6cqw, 6cqh) * var(--fit)) !important
}

.cd-cal {
    position: relative;
    display: inline-block
}

.cd-btn {
    padding: .62em 1.5em .52em;
    border: 1px solid rgba(251, 250, 246, .75);
    border-radius: 999px;
    background: #341a0c7a;
    color: var(--snow);
    font: 700 calc(clamp(9px, min(4.4cqw, 18cqh), 14px) * var(--fit))/1 "Cormorant Garamond", Georgia, serif;
    letter-spacing: .2em;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(30, 12, 4, .6);
    box-shadow: 0 2px 8px #1e0c0459, inset 0 0 0 1px #ffdcaa1f;
    cursor: pointer;
    transition: background .25s ease
}

.cd-btn:hover {
    background: #4624109e
}

.cd-btn:focus-visible {
    outline: 2px solid var(--snow);
    outline-offset: 3px
}

.cd-save[hidden] {
    display: none
}

.cd-disc {
    position: absolute;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    container-type: size;
    border-radius: 50%;
    color: var(--snow);
    text-shadow: 0 0 .22em rgba(60, 22, 6, .7), 0 .03em .05em rgba(40, 14, 4, .85)
}

.cd-disc:before {
    content: "";
    position: absolute;
    inset: 14%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(70, 28, 10, .32), rgba(70, 28, 10, .14) 60%, transparent);
    pointer-events: none
}

.cd-disc b {
    position: relative;
    font: 600 42cqw/.92 Cormorant Garamond, Georgia, serif;
    font-variant-numeric: lining-nums tabular-nums;
    letter-spacing: -.01em
}

.cd-disc b[data-len="3"] {
    font-size: 33cqw
}

.cd-disc b[data-len="4"] {
    font-size: 26cqw
}

.cd-disc small {
    position: relative;
    margin-top: 4.5cqw;
    font: 700 max(7px, 11.5cqw)/1 "Cormorant Garamond", Georgia, serif;
    letter-spacing: .12em;
    padding-left: .12em;
    text-transform: uppercase;
    color: #f6efe4
}

.cd-gleam {
    position: absolute;
    inset: -6%;
    border-radius: 50%;
    background: radial-gradient(circle at 36% 30%, rgba(255, 240, 210, .85), rgba(255, 196, 140, .35) 38%, transparent 70%);
    mix-blend-mode: screen;
    opacity: 0;
    pointer-events: none
}

.cd-cloth {
    position: absolute;
    z-index: 5;
    background-position: 0 0;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    transform-origin: 50% 0;
    filter: drop-shadow(0 .5cqw .7cqw rgba(40, 20, 8, .42));
    backface-visibility: hidden
}

.cd-down {
    cursor: pointer
}

.cd-up,
.countdown.is-shown .cd-down {
    opacity: 0;
    pointer-events: none
}

.countdown.is-shown .cd-up {
    opacity: 1
}

.countdown:not(.is-shown) :is(.cd-disc>b, .cd-disc>small, .cd-bottom>*) {
    opacity: 0
}

.cd-petals {
    z-index: 6;
    overflow: hidden
}

.cd-petal {
    position: absolute;
    left: 0;
    top: 0;
    background-image: url(../assets/cover/petals.webp);
    background-repeat: no-repeat;
    filter: drop-shadow(1px 2px 1.5px rgba(50, 25, 10, .3));
    will-change: transform, opacity
}

.cd-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap
}

@media(prefers-reduced-motion:reduce) {
    .cd-shade:before,
    .countdown.is-done .cd-sun:before {
        animation: none
    }
    .cd-petals {
        display: none
    }
}