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

.events {
    position: relative;
    background: #3a0a12;
    container: esec / inline-size
}

.e-bg {
    position: absolute;
    inset: 0;
    background: #3a0a12 url(../assets/letter/bg-phone.webp) center / cover no-repeat
}

.e-inner {
    --edge: calc(clamp(44px, 13vw, 84px)*.66);
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(var(--edge) + 7cqi) 0 calc(var(--edge) + 8cqi)
}

.e-head {
    text-align: center;
    color: #f4ead9
}

.e-head>* {
    margin: 0
}

.e-kicker {
    font: 600 3.2cqi/1.3 Cormorant Garamond, Georgia, serif;
    letter-spacing: .3em;
    padding-left: .3em;
    text-transform: uppercase;
    color: #d4b06a
}

.e-title {
    font: 400 12cqi/1.15 Pinyon Script, cursive;
    color: #f4ead9;
    text-shadow: 0 .02em .12em rgba(20, 0, 5, .5)
}

.e-track {
    display: flex;
    gap: 4cqi;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    --deck-side: calc((100cqi - var(--deck-w, 76cqi)) / 2);
    scroll-padding-inline: var(--deck-side);
    padding: 6cqi var(--deck-side) 7cqi;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch
}

.e-track::-webkit-scrollbar {
    display: none
}

.events.is-tight .e-inner {
    padding: calc(var(--edge) + 2cqi) 0 calc(var(--edge) + 3cqi)
}

@container esec (max-width: 559.98px) {
    .events.is-tight .e-track {
        padding-top: 3cqi;
        padding-bottom: 4.5cqi
    }
}

.e-card {
    --k: 1;
    position: relative;
    flex: 0 0 var(--deck-w, 76cqi);
    scroll-snap-align: center;
    container-type: inline-size
}

.e-dots {
    display: flex;
    justify-content: center;
    gap: 3cqi;
    margin-top: -2cqi
}

.e-dots button {
    width: max(8px, 2.2cqi);
    height: max(8px, 2.2cqi);
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f4ead94d;
    cursor: pointer;
    transition: background-color .3s, transform .3s
}

.e-dots button[aria-current=true] {
    background: #d4b06a;
    transform: scale(1.3)
}

.e-card-in {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8cqi 7cqi;
    border-radius: 1.4cqi;
    background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(255, 250, 238, .5), transparent 70%), linear-gradient(90deg, rgba(120, 72, 30, .12), transparent 8%, transparent 92%, rgba(120, 72, 30, .12)), #f3e8d2 url(../assets/letter/paper.webp) center / cover;
    box-shadow: 0 2.4cqi 6cqi #10000480, 0 .4cqi 1cqi #1000044d;
    color: var(--ink);
    text-align: center
}

.e-card-in:before {
    content: "";
    position: absolute;
    inset: 3.4cqi;
    border: max(1px, .5cqi) solid rgba(178, 136, 66, .85);
    box-shadow: inset 0 0 0 max(1px, .45cqi) #f6ecd6e6, inset 0 0 0 max(2px, .75cqi) #7a233173;
    border-radius: .6cqi;
    pointer-events: none
}

.e-card-in>* {
    position: relative;
    margin: 0
}

.e-art {
    --art-h: 46cqi;
    width: 70cqi;
    height: var(--art-h);
    display: flex;
    align-items: center;
    justify-content: center
}

.e-art img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: var(--art-h);
    filter: drop-shadow(0 1.2cqi 1.4cqi rgba(92, 40, 30, .28))
}

.e-name {
    margin-top: 4.5cqi !important;
    font: 400 calc(15cqi * var(--k))/1.05 "Pinyon Script", cursive;
    color: var(--ink);
    text-shadow: 0 .012em 0 rgba(255, 255, 255, .7)
}

.e-when span {
    display: block
}

.e-date {
    margin-top: 1.2cqi;
    font: 600 calc(3.8cqi * var(--k))/1.4 "Cormorant Garamond", Georgia, serif;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-soft)
}

.e-time {
    font: italic 500 calc(5cqi * var(--k))/1.3 "Cormorant Garamond", Georgia, serif;
    color: var(--gold)
}

.e-venue {
    margin-top: 3cqi !important;
    padding-top: 3cqi;
    width: 76%;
    border-top: 1px solid rgba(169, 128, 63, .5)
}

.e-venue span {
    display: block
}

.e-place {
    font: 600 calc(5.4cqi * var(--k))/1.25 "Cormorant Garamond", Georgia, serif
}

.e-addr {
    font: 500 calc(4.2cqi * var(--k))/1.35 "Cormorant Garamond", Georgia, serif;
    color: var(--ink-soft)
}

.e-dress {
    margin-top: 3cqi !important;
    font: italic 500 calc(4.3cqi * var(--k))/1.35 "Cormorant Garamond", Georgia, serif;
    color: var(--ink-soft);
    text-wrap: balance
}

.e-dress span,
.e-prog:before {
    display: block;
    margin-bottom: .6cqi;
    font: 600 calc(3.1cqi * var(--k))/1.3 "Cormorant Garamond", Georgia, serif;
    font-style: normal;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--gold)
}

.e-prog {
    margin-top: 3cqi !important;
    padding: 0;
    list-style: none;
    font: 500 calc(4.2cqi * var(--k))/1.5 "Cormorant Garamond", Georgia, serif
}

.e-prog:before {
    content: "Programme"
}

.e-prog span {
    display: inline-block;
    min-width: 4.6em;
    margin-right: .5em;
    text-align: right;
    font-weight: 600;
    color: var(--ink)
}

.e-actions {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 2.4cqi;
    width: 100%;
    margin-top: auto !important;
    padding-top: 5cqi
}

.e-btn {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1.4cqi;
    min-height: max(40px, calc(11cqi * var(--k)));
    padding: 0 2cqi;
    border: 1px solid rgba(169, 128, 63, .75);
    border-radius: 999px;
    background: #fffaf08c;
    color: var(--ink);
    font: 600 calc(4.3cqi * var(--k))/1 "Cormorant Garamond", Georgia, serif;
    letter-spacing: .02em;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color .2s, color .2s
}

.e-btn:hover {
    background: #fffaf0e6
}

.e-btn-cal {
    background: #5e1424;
    border-color: #5e1424;
    color: #f4ead9
}

.e-btn-cal:hover,
.e-btn-cal[aria-expanded=true] {
    background: #7a1d30
}

.e-btn svg {
    flex: none;
    width: 1.25em;
    height: 1.25em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round
}

.e-btn:focus-visible,
.e-cal-menu a:focus-visible,
.e-dots button:focus-visible {
    outline: 2px solid #d4b06a;
    outline-offset: 2px
}

.e-cal-menu {
    position: absolute;
    z-index: 3;
    right: 0;
    bottom: calc(100% - 3cqi);
    display: flex;
    flex-direction: column;
    min-width: 62cqi;
    padding: 1.4cqi;
    border: 1px solid rgba(169, 128, 63, .6);
    border-radius: 2.4cqi;
    background: #fffaf0;
    box-shadow: 0 2cqi 5cqi #28060c4d;
    text-align: left
}

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

.e-cal-menu a {
    padding: 2.4cqi 3cqi;
    border-radius: 1.6cqi;
    color: var(--ink);
    font: 600 calc(4.3cqi * var(--k))/1.2 "Cormorant Garamond", Georgia, serif;
    text-decoration: none
}

.e-cal-menu a small {
    display: block;
    font: italic 500 .82em/1.3 Cormorant Garamond, Georgia, serif;
    color: var(--ink-soft)
}

.e-cal-menu a:hover {
    background: #a9803f24
}

.e-cover {
    display: none;
    position: absolute;
    inset: 0;
    border-radius: 1.4cqi;
    background: linear-gradient(90deg, transparent 49.7%, rgba(20, 0, 5, .55) 50%, transparent 50.3%), url(../assets/events/medallion.webp) 50% 46% / 42cqi auto no-repeat, #4a0d18 url(../assets/letter/bg-tab.webp) center / cover;
    box-shadow: 0 2.4cqi 6cqi #10000480;
    pointer-events: none
}

.e-cover:before {
    content: "";
    position: absolute;
    inset: 3.4cqi;
    border: max(1px, .5cqi) solid rgba(212, 176, 106, .8);
    box-shadow: inset 0 0 0 max(2px, .8cqi) #3a0a1280, inset 0 0 0 max(3px, 1.1cqi) #d4b06a73;
    border-radius: .6cqi
}

.e-cover-l {
    clip-path: inset(0 50% 0 0);
    transform-origin: 0 50%
}

.e-cover-r {
    clip-path: inset(0 0 0 50%);
    transform-origin: 100% 50%
}

.events.is-waiting .e-cover {
    display: block
}

@container esec (min-width: 560px) {
    .e-bg {
        background-image: url(../assets/letter/bg-tab.webp)
    }
    .e-kicker {
        font-size: 2.1cqi
    }
    .e-title {
        font-size: 7.6cqi
    }
    .e-track {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 3.4cqi;
        overflow: visible;
        padding: 4.5cqi calc(7cqi + var(--deck-pad, 0px)) 3cqi
    }
    .e-card {
        --k: 1.06
    }
    .e-card:only-child {
        grid-column: 1 / -1;
        justify-self: center;
        width: calc((100% - 3.4cqi)/2)
    }
    .events.is-some .e-card:nth-child(odd):last-child {
        grid-column: 1 / -1;
        justify-self: center;
        width: calc((100% - 3.4cqi)/2)
    }
    .e-dots {
        display: none
    }
}

@media(min-aspect-ratio:6/5) {
    html.is-tablet .e-bg {
        background-image: url(../assets/letter/bg-land.webp)
    }
    html.is-tablet .e-kicker {
        font-size: 1.35cqi
    }
    html.is-tablet .e-title {
        font-size: 5cqi
    }
    html.is-tablet .e-track {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1.6cqi;
        padding: 2.4cqi calc(3.6cqi + var(--deck-pad, 0px)) 2cqi
    }
    html.is-tablet .e-card {
        --k: 1.22
    }
    html.is-tablet .e-card:only-child {
        width: calc((100% - 3 * 1.6cqi) / 4)
    }
    html.is-tablet .events.is-some .e-track {
        grid-template-columns: repeat(var(--cards), calc((100% - 3 * 1.6cqi) / 4));
        justify-content: center
    }
    html.is-tablet .events.is-some .e-card:nth-child(odd):last-child {
        grid-column: auto;
        justify-self: stretch;
        width: auto
    }
    html.is-tablet .e-art {
        --art-h: 42cqi
    }
}