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

.events {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: calc(var(--seam-h) * .5 + 34px) 14px calc(var(--seam-h) * .5 + 48px);
    overflow-x: clip;
    -webkit-tap-highlight-color: transparent
}

.ev-head,
.ev-list {
    position: relative
}

.ev-head {
    text-align: center;
    margin-bottom: clamp(22px, 6cqi, 40px)
}

.ev-head>* {
    margin: 0
}

.ev-kicker {
    font: 700 clamp(11px, 3cqi, 14px)/1.3 "Cormorant Garamond", Georgia, serif;
    letter-spacing: .28em;
    padding-left: .28em;
    text-transform: uppercase;
    color: var(--kick)
}

.ev-title {
    font: 400 clamp(48px, 14cqi, 84px)/1.2 "Allura", cursive
}

.ev-title .ink {
    display: inline-block;
    padding: 0 .3em .1em
}

.ev-sub {
    font: italic 500 clamp(15px, 4.2cqi, 19px)/1.4 "Cormorant Garamond", Georgia, serif;
    color: var(--ink);
    opacity: .88
}

.ev-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    row-gap: 46px;
    width: 100%;
    max-width: 1180px
}

.ev {
    --tone: var(--mehndi);
    position: relative;
    width: min(100% - 30px, 380px);
    container-type: inline-size;
    --vw: 103cqi
}

.ev[hidden] {
    display: none
}

.ev-nikah {
    --tone: var(--nikah-edge)
}

.ev-baraat {
    --tone: var(--baraat)
}

.ev-walima {
    --tone: var(--walima)
}

@container (min-width: 600px) {
    .ev-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 70px;
        row-gap: 56px
    }
    .ev {
        width: min(100%, 380px)
    }
    .ev:nth-child(odd) {
        justify-self: end
    }
    .ev:nth-child(2n) {
        justify-self: start
    }
}

@container (min-width: 1080px) {
    .ev-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        column-gap: 64px
    }
    .ev {
        width: 100%
    }
}

@container (min-width: 600px) {
    .events.is-some .ev.is-odd-last {
        grid-column: 1 / -1;
        justify-self: center;
        width: min((100% - 70px) / 2, 380px)
    }
}

@container (min-width: 1080px) {
    .events.is-some .ev-list {
        grid-template-columns: repeat(var(--cards), calc((100% - 192px)/4));
        justify-content: center
    }
    .events.is-some .ev.is-odd-last {
        grid-column: auto;
        justify-self: stretch;
        width: 100%
    }
}

.ev-face {
    position: relative;
    z-index: 1;
    isolation: isolate;
    min-height: calc(100cqi * var(--pmin));
    padding: calc(100cqi * var(--pin-t)) calc(100cqi * var(--pin-r)) calc(100cqi * var(--pin-b) + 4px) calc(100cqi * var(--pin-l));
    filter: drop-shadow(0 1px 1px rgba(20, 50, 72, .16)) drop-shadow(0 10px 14px rgba(14, 40, 60, .18));
    text-align: center;
    font: 500 clamp(14px, 4.9cqi, 18px)/1.45 "Cormorant Garamond", Georgia, serif;
    color: var(--ink)
}

.ev-face:before,
.ev-face:after {
    content: "";
    position: absolute;
    z-index: -1;
    left: 0;
    right: 0;
    pointer-events: none
}

.ev-face:before {
    top: calc(100cqi * var(--pt));
    bottom: calc(100cqi * var(--pb));
    background-position: 0 0;
    background-size: 100% auto;
    background-repeat: repeat-y
}

.ev-face:after {
    top: 0;
    bottom: 0;
    background-position: 50% 0, 50% 100%;
    background-size: 100% auto, 100% auto;
    background-repeat: no-repeat
}

.ev-face>* {
    margin: 0
}

.ev-pic {
    width: 66%;
    aspect-ratio: var(--pic-r, 1);
    margin: 2px auto 10px !important;
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    filter: drop-shadow(0 2px 3px rgba(20, 50, 72, .22))
}

.ev-day {
    font: 700 clamp(10px, 3.1cqi, 12.5px)/1.3 "Cormorant Garamond", Georgia, serif;
    letter-spacing: .26em;
    padding-left: .26em;
    text-transform: uppercase;
    color: var(--kick)
}

.ev-name {
    font: 400 clamp(40px, 15cqi, 58px)/1.12 "Allura", cursive
}

.ev-name .ink {
    display: inline-block;
    padding: 0 .28em .08em
}

.ev-when {
    line-height: 1.35
}

.ev-dmy,
.ev-time {
    display: block
}

.ev-dmy {
    font-weight: 600;
    white-space: nowrap
}

.ev-time {
    font-style: italic
}

.ev-rule {
    position: relative;
    width: 62%;
    height: 1px;
    margin: 13px auto 12px !important;
    background: linear-gradient(90deg, transparent, var(--tone) 22%, var(--tone) 78%, transparent);
    opacity: .9
}

.ev-rule i {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    translate: -50% -50%;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff 0 12%, var(--tone) 55%, color-mix(in srgb, var(--tone) 60%, #1b2b38));
    box-shadow: 0 0 0 2px #ffffffb3, 0 1px 2px #14324859
}

.ev-place {
    font-weight: 700;
    font-size: 1.08em;
    line-height: 1.25
}

.ev-addr {
    font-style: italic;
    margin-bottom: 12px !important
}

.ev-label {
    font: 700 clamp(9.5px, 2.9cqi, 11.5px)/1.3 "Cormorant Garamond", Georgia, serif;
    letter-spacing: .24em;
    padding-left: .24em;
    text-transform: uppercase;
    color: var(--kick)
}

.ev-sw {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin: 6px 0 5px !important
}

.ev-sw i {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .7), transparent 42%), var(--c);
    box-shadow: 0 0 0 1.5px #b7c2ca, 0 0 0 2.5px #fffc, 0 1px 3px #14324859
}

.ev-dress-words {
    font-style: italic;
    font-size: .94em;
    line-height: 1.3;
    text-wrap: balance
}

.ev-note {
    margin-top: 10px !important;
    font-size: .92em;
    line-height: 1.35;
    opacity: .9;
    text-wrap: balance
}

.ev-btns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 14px !important
}

.ev-cal {
    position: relative
}

.ev-btn {
    display: inline-block;
    padding: 9px 14px 8px;
    border: 1px solid rgba(23, 58, 82, .42);
    border-radius: 999px;
    background: #ffffff73;
    color: var(--ink);
    font: 700 clamp(10.5px, 3.3cqi, 12.5px)/1.1 "Cormorant Garamond", Georgia, serif;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer
}

.ev-btn-map {
    border-color: transparent;
    background: linear-gradient(180deg, #2b5a7a, #173a52);
    color: var(--pearl);
    box-shadow: 0 1px 2px #14324859
}

.ev-btn:hover {
    filter: brightness(1.08)
}

.ev-btn:focus-visible,
.ev-cal-menu a:focus-visible {
    outline: 2px solid var(--kick);
    outline-offset: 2px
}

.ev-cal-menu {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: calc(100% + 6px);
    translate: -50% 0;
    display: flex;
    flex-direction: column;
    width: max-content;
    max-width: min(250px, 92vw);
    padding: 6px;
    border: 1px solid rgba(86, 113, 127, .55);
    border-radius: 12px;
    background: #fbf9f3;
    box-shadow: 0 10px 24px #0e283c40;
    text-align: left
}

.ev-cal-menu[hidden] {
    display: none
}

.ev-cal-menu a {
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--ink);
    font: 700 15px/1.2 Cormorant Garamond, Georgia, serif;
    text-decoration: none
}

.ev-cal-menu a small {
    display: block;
    font: italic 500 13px/1.3 Cormorant Garamond, Georgia, serif;
    color: #173a52b8
}

.ev-cal-menu a:hover {
    background: #56717f1f
}

.ev-veil {
    position: absolute;
    z-index: 3;
    inset: -1.5cqi;
    margin: 0;
    padding: 0;
    border-width: 0;
    border-style: solid;
    border-color: transparent;
    border-image-repeat: stretch;
    background: none;
    cursor: pointer;
    filter: drop-shadow(0 2px 2px rgba(20, 50, 72, .16));
    transform-origin: 0 50%;
    -webkit-tap-highlight-color: transparent
}

.ev-veil:focus-visible {
    outline: 2px solid var(--kick);
    outline-offset: 4px
}

.ev-gathered {
    position: absolute;
    z-index: 2;
    top: -3%;
    bottom: -3.5%;
    left: 0;
    aspect-ratio: calc(var(--g-r, .3) * .56);
    translate: -64% 0;
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    filter: drop-shadow(2px 3px 3px rgba(20, 50, 72, .22));
    transform-origin: 30% 50%;
    opacity: 0;
    pointer-events: none
}

.ev.is-open .ev-gathered {
    opacity: 1
}

.ev.is-open .ev-veil {
    visibility: hidden
}

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

.ev-loose {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none
}

.ev-loose i {
    position: absolute;
    width: 10cqi;
    background-image: url(../assets/cover/petals.webp);
    background-repeat: no-repeat;
    filter: drop-shadow(1px 2px 1.5px rgba(20, 50, 70, .28))
}

.ev-loose i:nth-child(1) {
    right: -6%;
    top: 4%;
    rotate: 38deg
}

.ev-loose i:nth-child(2) {
    left: -5%;
    bottom: -2%;
    rotate: -126deg;
    width: 8.5cqi
}

.ev-loose i:nth-child(3) {
    right: -7%;
    bottom: 26%;
    rotate: 104deg;
    width: 9cqi
}

@media(prefers-reduced-motion:reduce) {
    .ev-veil,
    .ev-gathered {
        transition: none
    }
}

.ev-prog {
    margin-top: 10px !important
}

.ev-prog-k {
    margin: 0;
    font: 700 clamp(9.5px, 2.9cqi, 11.5px)/1.3 "Cormorant Garamond", Georgia, serif;
    letter-spacing: .24em;
    padding-left: .24em;
    text-transform: uppercase;
    color: var(--kick)
}

.ev-prog ol {
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    font-size: .92em;
    line-height: 1.4
}

.ev-prog li {
    text-align: center;
    text-wrap: balance
}

.ev-prog li span {
    margin-right: .4em;
    font-weight: 600
}