/* Climbing rose vine (core/events/024), fork of core/events/022 for INV-01 v2 · Luxe: a fine climbing rose grows down
   through the celebrations as you scroll, curls a tendril towards each event and carries an open rose at each new day.
   The events sit on the page itself (no card each); a single event sits in a centred column with the vine at its left.
   Under reduced motion (no script) the still version is a drawn vine in CSS: a rose at the top, leaves, a curl to each
   event on a phone, a bud at the end, and a date on each event. */
.ev024 { background: var(--k-light-ground); color: var(--k-ink);
  --ev024-vx: 20px; --ev024-pad: 52px; --ev024-rose: 56px;
  --ev024-tint-a: var(--c-primary); --ev024-tint-a-deep: color-mix(in oklab, var(--c-primary) 65%, var(--c-primary-deep));
  --ev024-tint-b: #5B4F80; --ev024-tint-b-deep: #3D3460; --ev024-tint-centre: #8F8045; }
.ev024__inner { position: relative; z-index: 1; margin: 0 auto; padding: var(--k-section-pad) var(--k-gutter) 0; text-align: center; }
.ev024 .k-kicker + .k-title { margin-top: var(--k-s-2); }
.ev024-wrap { position: relative; margin-top: var(--k-s-8); padding: 24px 0 72px; }
.ev024__list, .ev024-row { position: relative; z-index: 1; margin: 0; padding: 0; list-style: none; }
.ev024__list { display: flex; flex-direction: column; gap: 56px; }
.ev024.is-grouped .ev024__list { padding-left: var(--ev024-pad); }

/* the vine layer: the stem, its leaves, thorns and tendrils (svg), the day roses (masks) */
.ev024-vine { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.ev024-vine__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ev024-leaf { transform-box: view-box; transform-origin: 0 0; }
.ev024-rosew { position: absolute; left: 0; top: 0; width: var(--ev024-rose); aspect-ratio: 1; translate: -50% -50%; opacity: 0; margin-top: 8px;
  transition: opacity .6s var(--k-ease), margin-top .6s var(--k-ease); }
.ev024-rosew.is-in { opacity: 1; margin-top: 0; }
.ev024-rosew__sway { position: absolute; inset: 0; transform-origin: 50% 70%; pointer-events: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* the open roses: watercolour alpha masks filled with the couple's colours (rose a) and the warm cream (rose b) */
.ev024-rose { position: absolute; inset: 0; }
.ev024-ink { position: absolute; inset: 0; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.ev024-ink--body { background: var(--k-card, #FFFFFF); }
.ev024-rose--a .ev024-ink--petal { background: var(--ev024-tint-a); }
.ev024-rose--a .ev024-ink--deep { background: var(--ev024-tint-a-deep); }
.ev024-rose--b .ev024-ink--petal { background: var(--ev024-tint-b); }
.ev024-rose--b .ev024-ink--deep { background: var(--ev024-tint-b-deep); }
.ev024-ink--leaf { background: var(--c-secondary-dark); }
.ev024-ink--centre { background: var(--ev024-tint-centre); }
.ev024-rose--a .ev024-ink--body { -webkit-mask-image: var(--glk-rose-a-3-body); mask-image: var(--glk-rose-a-3-body); }
.ev024-rose--a .ev024-ink--petal { -webkit-mask-image: var(--glk-rose-a-3-petal); mask-image: var(--glk-rose-a-3-petal); }
.ev024-rose--a .ev024-ink--deep { -webkit-mask-image: var(--glk-rose-a-3-deep); mask-image: var(--glk-rose-a-3-deep); }
.ev024-rose--b .ev024-ink--body { -webkit-mask-image: var(--glk-rose-b-3-body); mask-image: var(--glk-rose-b-3-body); }
.ev024-rose--b .ev024-ink--petal { -webkit-mask-image: var(--glk-rose-b-3-petal); mask-image: var(--glk-rose-b-3-petal); }
.ev024-rose--b .ev024-ink--deep { -webkit-mask-image: var(--glk-rose-b-3-deep); mask-image: var(--glk-rose-b-3-deep); }
.ev024-rose--b .ev024-ink--leaf { -webkit-mask-image: var(--glk-rose-b-3-leaf); mask-image: var(--glk-rose-b-3-leaf); }
.ev024-rose--b .ev024-ink--centre { -webkit-mask-image: var(--glk-rose-b-3-centre); mask-image: var(--glk-rose-b-3-centre); }

/* a day (built by the script): its label, then its events */
.ev024-day { display: flex; flex-direction: column; gap: 40px; }
.ev024-mark { display: flex; align-items: center; min-height: var(--ev024-rose); text-align: left; }
.ev024-mark__label { display: flex; flex-direction: column; align-items: flex-start; }
.ev024-mark__wd { font: 400 2.25rem/1.05 var(--k-font-script); color: var(--c-primary-deep); }
.ev024-mark__date { margin-top: 4px; font: 600 .8125rem/1.3 var(--k-font-body); letter-spacing: .22em; text-transform: uppercase; color: var(--k-ink-soft); }
.ev024-row { display: flex; flex-direction: column; gap: 56px; }

/* an event, set on the page: time, name, place, dress, then Map · Add to calendar */
.ev024-event { position: relative; text-align: center; }
.ev024.is-grouped .ev024-event { text-align: left; }
.ev024-event__date { margin: 0 0 6px; font: 600 .8125rem/1.3 var(--k-font-body); letter-spacing: .22em; text-transform: uppercase; color: var(--k-ink-soft); }
.ev024.is-grouped .ev024-event__date { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ev024-event__time { margin: 0; font: 600 1.25rem/1.2 var(--k-font-body); letter-spacing: .02em; color: var(--k-ink); }
.ev024-event__name { margin: 2px 0 8px; font: 400 clamp(2.25rem, 9vw, 2.75rem)/1.05 var(--k-font-script); color: var(--c-primary-deep); }
.ev024-event__venue { margin: 0; font: 500 1.125rem/1.3 var(--k-font-body); }
.ev024-event__addr { margin: 2px 0 0; font-style: italic; font-size: .9375rem; line-height: 1.35; color: var(--k-ink-soft); }
.ev024-event__dress { margin: 10px 0 0; font-style: italic; font-size: .9375rem; }
.ev024-event__dress span { margin-right: 4px; font: 600 .6875rem/1 var(--k-font-body); font-style: normal; letter-spacing: .2em; text-transform: uppercase; color: var(--k-ink-soft); }
.ev024-event__note { margin: 4px 0 0; font-style: italic; font-size: .9375rem; line-height: 1.35; color: var(--k-ink-soft); }
.ev024-event__acts { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 4px 22px; margin-top: 12px; }
.ev024.is-grouped .ev024-event__acts { justify-content: flex-start; }
.ev024-link, .ev024 .kjy-cal__toggle { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none;
  font: 600 .75rem/1 var(--k-font-body); letter-spacing: .18em; text-transform: uppercase; color: var(--c-primary-deep); cursor: pointer;
  text-decoration: underline 1px rgb(var(--c-primary-rgb) / .45); text-underline-offset: 7px; }
.ev024 .kjy-cal__toggle:active, .ev024-link:active { color: var(--c-primary); }
.ev024 .kjy-cal { text-align: center; }
.ev024 .kjy-cal__toggle { list-style: none; }
.ev024 .kjy-cal__toggle::-webkit-details-marker { display: none; }
.ev024 .kjy-cal__toggle::after { content: ""; width: 6px; height: 6px; margin-left: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.ev024 .kjy-cal[open] .kjy-cal__toggle::after { transform: translateY(2px) rotate(225deg); }
.ev024 .kjy-cal__menu { margin-top: 2px; padding: 2px 0; min-width: 200px; background: var(--k-paper); border: 1px solid rgb(var(--c-secondary-rgb) / .35); border-radius: 12px; }
.ev024 .kjy-cal__opt { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 var(--k-s-4); font-size: 1.0625rem; color: var(--c-primary); text-decoration: none; }
.ev024 .kjy-cal__opt + .kjy-cal__opt { border-top: 1px solid rgb(var(--c-secondary-rgb) / .25); }

/* before the vine reaches them (only while the script animates): each event drifts out from the vine as it writes in */
.ev024.is-moving .ev024-event, .ev024.is-moving .ev024-mark__label { transition: opacity .65s var(--k-ease), translate .65s var(--k-ease); }
.ev024.is-moving .ev024-event:not(.is-in) { opacity: 0; translate: -10px 0; }
.ev024.is-moving .ev024-mark:not(.is-in) .ev024-mark__label { opacity: 0; }

/* the still version (reduced motion: the script never runs): the vine drawn whole in CSS, down the left on a phone; the
   rose is shown only here, so its masks never load in motion mode */
.ev024-still { display: none; }
.motion-reduce .ev024-still { display: block; position: absolute; z-index: 0; top: 0; bottom: 0; left: calc(var(--ev024-vx) - 32px); width: 64px; pointer-events: none; }
.motion-reduce .ev024-still::before, .motion-reduce .ev024-still::after { content: ""; position: absolute; left: 0; right: 0; top: calc(var(--ev024-rose) * .6); bottom: 28px; }
.motion-reduce .ev024-still::before { background: var(--c-secondary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='192'%3E%3Cpath d='M0 0C8-10 22-11 30-4C22 2 10 5 0 0z' transform='translate(34 40) rotate(40) scale(.8)'/%3E%3Cpath d='M0 0C8-10 22-11 30-4C22 2 10 5 0 0z' transform='translate(30 136) scale(-.8 .8) rotate(40)'/%3E%3C/svg%3E") 0 0 / 64px 192px repeat-y;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='192'%3E%3Cpath d='M0 0C8-10 22-11 30-4C22 2 10 5 0 0z' transform='translate(34 40) rotate(40) scale(.8)'/%3E%3Cpath d='M0 0C8-10 22-11 30-4C22 2 10 5 0 0z' transform='translate(30 136) scale(-.8 .8) rotate(40)'/%3E%3C/svg%3E") 0 0 / 64px 192px repeat-y; }
.motion-reduce .ev024-still::after { background: var(--c-secondary-dark);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='192'%3E%3Cpath d='M32 0C36 48 36 48 32 96S28 144 32 192' fill='none' stroke='%23000' stroke-width='2.2'/%3E%3C/svg%3E") 0 0 / 64px 192px repeat-y;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='192'%3E%3Cpath d='M32 0C36 48 36 48 32 96S28 144 32 192' fill='none' stroke='%23000' stroke-width='2.2'/%3E%3C/svg%3E") 0 0 / 64px 192px repeat-y; }
.motion-reduce .ev024-still__rose { position: absolute; left: 50%; top: 0; width: var(--ev024-rose); aspect-ratio: 1; translate: -50% 0; }
.motion-reduce .ev024-still__bud { position: absolute; left: 50%; bottom: 26px; width: 10px; height: 16px; margin-left: -5px; border-radius: 50% / 60% 60% 40% 40%; background: var(--c-primary); }
.motion-reduce .ev024-still__bud::after { content: ""; position: absolute; left: -1px; right: -1px; top: -3px; height: 9px; background: var(--c-secondary-dark); clip-path: polygon(0 0, 50% 40%, 100% 0, 50% 100%); }
.motion-reduce .ev024__list { padding-top: calc(var(--ev024-rose) * .75); padding-left: var(--ev024-pad); }
.motion-reduce .ev024-event { text-align: left; }
.motion-reduce .ev024-event__acts { justify-content: flex-start; }
/* a curl from the vine to each event: a hairline joins the vine to the curl */
.motion-reduce .ev024-event::before { content: ""; position: absolute; top: 12px; left: calc(var(--ev024-vx) - var(--ev024-pad)); width: calc(var(--ev024-pad) - var(--ev024-vx) - 2px); height: 24px; background: var(--c-secondary-dark);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='24'%3E%3Cpath d='M1 15C9 13 17 9 22 11C27 13 26 20 21 19.5C17.5 19 18 15 21 15.5' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") right top / 32px 24px no-repeat, linear-gradient(#000 0 0) left 0 top 14.3px / calc(100% - 30px) 1.4px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='24'%3E%3Cpath d='M1 15C9 13 17 9 22 11C27 13 26 20 21 19.5C17.5 19 18 15 21 15.5' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") right top / 32px 24px no-repeat, linear-gradient(#000 0 0) left 0 top 14.3px / calc(100% - 30px) 1.4px no-repeat; }

/* tablets and laptops: the screen less a thin margin (92 % / 90 %); the vine down the middle, the events either side */
@media (min-width: 768px) {
  .ev024 { --ev024-frame: 92vw; --ev024-rose: 72px; --ev024-gap: 56px; }
  .ev024__inner { width: var(--ev024-frame); padding-inline: 0; }
  .ev024.is-grouped .ev024__list { padding-left: 0; gap: 72px; }
  .ev024-day { gap: 56px; }
  .ev024-mark { flex-direction: column; justify-content: flex-start; padding-top: calc(var(--ev024-rose) + 6px); text-align: center; }
  .ev024-mark__label { align-items: center; padding: 8px 32px 12px; background: radial-gradient(closest-side, var(--k-paper, #F7F4FB) 62%, rgb(247 244 251 / 0)); }
  .ev024-row { display: grid; grid-template-columns: minmax(0, 1fr) calc(2 * var(--ev024-gap)) minmax(0, 1fr); row-gap: 64px; align-items: start; }
  .ev024-row > [data-side="l"] { grid-column: 1; justify-self: end; }
  .ev024-row > [data-side="r"] { grid-column: 3; justify-self: start; }
  .ev024.is-grouped .ev024-event { width: min(100%, 460px); text-align: center; }
  .ev024.is-grouped .ev024-event__acts { justify-content: center; }
  .ev024.is-moving .ev024-event[data-side="l"]:not(.is-in) { translate: 10px 0; }
  .ev024-event__time { font-size: 1.375rem; }
  .ev024-event__name { font-size: 2.75rem; }
  /* a single event: the vine and its words as one centred group (as wide as they need, at most 640 px), the vine at the left */
  .ev024--one { --ev024-vx: 24px; --ev024-pad: 72px; }
  .ev024--one .ev024-wrap { width: fit-content; max-width: min(100%, 640px); margin-inline: auto; }
  .ev024--one.is-grouped .ev024__list { padding-left: var(--ev024-pad); }
  .ev024--one .ev024-mark { flex-direction: row; justify-content: flex-start; padding-top: 0; text-align: left; }
  .ev024--one .ev024-mark__label { align-items: flex-start; padding: 0; background: none; }
  .ev024--one .ev024-row { display: flex; flex-direction: column; }
  .ev024--one.is-grouped .ev024-event { width: auto; text-align: left; }
  .ev024--one.is-grouped .ev024-event__acts { justify-content: flex-start; }
  /* the still version: the vine down the middle, the events either side in pairs (no tendrils across the gap) */
  .motion-reduce .ev024-still { left: calc(50% - 32px); }
  .motion-reduce .ev024:not(.ev024--one) .ev024__list { display: grid; grid-template-columns: minmax(0, 1fr) calc(2 * var(--ev024-gap)) minmax(0, 1fr); gap: 72px 0; padding-left: 0; }
  .motion-reduce .ev024:not(.ev024--one) .ev024-event:nth-child(odd) { grid-column: 1; justify-self: end; }
  .motion-reduce .ev024:not(.ev024--one) .ev024-event:nth-child(even) { grid-column: 3; justify-self: start; }
  .motion-reduce .ev024:not(.ev024--one) .ev024-event { width: min(100%, 460px); text-align: center; }
  .motion-reduce .ev024:not(.ev024--one) .ev024-event__acts { justify-content: center; }
  .motion-reduce .ev024:not(.ev024--one) .ev024-event::before { display: none; }
  .motion-reduce .ev024--one .ev024__list { padding-left: var(--ev024-pad); }
  .motion-reduce .ev024--one .ev024-still { left: calc(var(--ev024-vx) - 32px); }
}
@media (min-width: 1100px) {
  .ev024 { --ev024-frame: min(90vw, 1728px); --ev024-rose: 84px; --ev024-gap: clamp(72px, 6vw, 120px); }
  .ev024-event__name { font-size: 3rem; }
}
