/* Private events page */

.ev-h2{font-size:34px;line-height:1.15;margin:0}
.ev-head{display:grid;gap:10px;margin-bottom:28px;max-width:640px}
.ev-head--center{margin-inline:auto;text-align:center;justify-items:center}
.ev-head .eyebrow{line-height:normal}
.ev-head__lede{max-width:52ch}

/* ---------- hero: full-width photo behind a soft wash ---------- */
.ev-hero{position:relative;min-height:320px;display:flex;align-items:center;overflow:hidden;background:var(--lilac-soft)}
.ev-hero__img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 55%}
.ev-hero::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(100deg,rgba(251,246,236,.94) 30%,rgba(233,222,248,.55));
}
.ev-hero__inner{position:relative;z-index:1;width:100%;max-width:1180px;margin:0 auto;padding:56px var(--gutter)}
.ev-hero .eyebrow{line-height:normal}
.ev-hero__title{margin:8px 0 10px;font-size:46px;line-height:1.06;max-width:16ch}
.ev-hero__lede{max-width:46ch}
.ev-hero__actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:22px}

/* ---------- the two kinds of event: each card opens its own window ---------- */
.ev-ways{padding-top:72px;padding-bottom:32px}
.ev-ways__list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:26px}
.ev-way{position:relative;display:flex;flex-direction:column;background:var(--paper);border:1px solid var(--hairline);border-radius:24px;overflow:hidden;box-shadow:var(--shadow-card);transition:transform .2s ease,box-shadow .2s ease}
.ev-way--featured{border-color:var(--lilac-line)}
.ev-way__media{margin:0;height:440px;overflow:hidden;background:var(--lilac-soft)}
.ev-way__img{width:100%;height:100%;object-fit:cover;object-position:50% 40%;transition:scale .4s ease}
.ev-way__body{flex:1;display:flex;flex-direction:column;align-items:flex-start;padding:26px 30px 30px}
.ev-way__eyebrow{line-height:normal}
.ev-way__title{font-family:var(--serif);font-weight:500;font-size:32px;line-height:1.1;color:var(--plum);margin-top:8px}
.ev-way__text{margin-top:10px;font:14.5px/1.7 var(--sans);color:var(--stone);max-width:46ch;text-wrap:pretty}
.ev-way__best{margin-top:14px;font:italic 400 17px/1.4 var(--serif);color:var(--violet)}
.ev-way__actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px 22px;margin-top:auto;padding-top:22px}
.ev-way__more{
  display:inline-flex;align-items:center;gap:6px;padding:8px 0;border:none;background:none;cursor:pointer;
  font:600 14px/normal var(--sans);color:var(--violet);
}
.ev-way__more:hover{color:var(--plum)}
/* the whole card opens the window (the Book button sits above this and still books) */
.ev-way.is-clickable{cursor:pointer}
.ev-way.is-clickable .ev-way__more::after{content:"";position:absolute;inset:0;z-index:1;border-radius:24px}
.ev-way .ev-book-btn{position:relative;z-index:2}
.ev-way.is-clickable:hover{transform:translateY(-3px);box-shadow:0 22px 40px -26px rgba(75,59,110,.6)}
.ev-way.is-clickable:hover .ev-way__img{scale:1.03}
.ev-way.is-clickable:hover .ev-way__more [aria-hidden]{translate:3px 0}
.ev-way__more [aria-hidden]{transition:translate .2s ease}
.ev-note{margin:22px 2px 0;font:13px/1.7 var(--sans);color:var(--stone);text-align:center}
@media (prefers-reduced-motion:reduce){ .ev-way,.ev-way__img,.ev-way__more [aria-hidden]{transition:none} }

/* ---------- photo gallery: an even grid of portrait photos (each one can be cropped) ---------- */
.ev-gallery{padding-top:56px;padding-bottom:40px}
.ev-photos{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.ev-photo{margin:0;aspect-ratio:4 / 5;border-radius:18px;overflow:hidden;background:var(--lilac-soft)}
.ev-photo__img{width:100%;height:100%;object-fit:cover}

/* ---------- closing call to action ---------- */
.ev-cta{padding-top:32px;padding-bottom:80px}
.ev-cta__band{
  display:grid;justify-items:center;gap:10px;text-align:center;
  background:var(--plum);color:#fff;border-radius:26px;padding:52px 28px;
}
.ev-cta__title{font-family:var(--serif);font-weight:500;font-size:38px;line-height:1.1}
.ev-cta__title em{font-style:italic;color:var(--blush)}
.ev-cta__body{font:15px/1.7 var(--sans);color:rgba(255,255,255,.85);max-width:44ch}
.ev-cta .ev-book-btn{margin-top:14px;box-shadow:0 14px 26px -14px rgba(0,0,0,.6)}

/* ---------- pop-up windows (booking form and event types) ---------- */
html:has(.ev-modal[open]){overflow:hidden}
.ev-modal{
  padding:0;border:none;background:transparent;color:inherit;overflow:visible;
  width:calc(100% - 48px);max-width:960px;max-height:none;
}
.ev-modal::backdrop{background:rgba(46,36,64,.55);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
.ev-modal[open]{animation:ev-pop .28s ease-out}
.ev-modal[open]::backdrop{animation:ev-fade .28s ease-out}
@keyframes ev-pop{from{opacity:0;transform:translateY(14px) scale(.985)}}
@keyframes ev-fade{from{opacity:0}}
@media (prefers-reduced-motion:reduce){ .ev-modal[open],.ev-modal[open]::backdrop{animation:none} }
.ev-close{
  position:absolute;top:14px;right:14px;z-index:3;width:40px;height:40px;
  display:grid;place-items:center;border-radius:50%;border:1px solid var(--lilac-line);
  background:var(--paper);color:var(--plum);font-size:26px;line-height:1;cursor:pointer;
}
.ev-close:hover{background:var(--lilac-soft)}

/* booking form: a photo beside the form */
.ev-dialog__box{
  position:relative;display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1fr);
  background:var(--paper);border-radius:24px;overflow:hidden;box-shadow:0 34px 80px -30px rgba(46,36,64,.7);
}
.ev-dialog__media{position:relative;background:var(--lilac-soft)}
.ev-dialog__img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .35s ease}
.ev-dialog__img.is-shown{opacity:1}
.ev-dialog__body{max-height:calc(100vh - 48px);max-height:calc(100dvh - 48px);overflow-y:auto;overscroll-behavior:contain;padding:30px 32px 30px}

/* event type: photo gallery beside the description and details */
.ev-detail{max-width:1040px}
.ev-detail__box{
  position:relative;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);
  background:var(--paper);border-radius:24px;overflow:hidden;box-shadow:0 34px 80px -30px rgba(46,36,64,.7);
}
.ev-detail__gallery{display:flex;flex-direction:column;background:var(--lilac-soft);min-width:0}
.ev-detail__main{position:relative;flex:1 1 auto;height:min(620px, calc(100vh - 48px));height:min(620px, calc(100dvh - 48px));overflow:hidden}
.ev-detail.has-thumbs .ev-detail__main{height:min(540px, calc(100vh - 48px - 88px));height:min(540px, calc(100dvh - 48px - 88px))}
.ev-detail__img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .3s ease}
.ev-detail__img.is-shown{opacity:1}
.ev-detail__nav{
  position:absolute;top:50%;z-index:2;translate:0 -50%;width:42px;height:42px;
  display:grid;place-items:center;border-radius:50%;border:none;background:rgba(255,255,255,.88);
  color:var(--plum);font-size:28px;line-height:1;cursor:pointer;box-shadow:0 8px 18px -10px rgba(46,36,64,.6);
}
.ev-detail__nav:hover{background:#fff}
.ev-detail__nav span{margin-top:-3px}
.ev-detail__nav--prev{left:14px}
.ev-detail__nav--next{right:14px}
.ev-detail__thumbs{display:flex;gap:8px;padding:12px 14px;overflow-x:auto;background:var(--paper);border-top:1px solid var(--hairline)}
.ev-detail__thumb{
  flex:0 0 auto;width:52px;height:64px;padding:0;border:2px solid transparent;border-radius:10px;
  overflow:hidden;background:var(--lilac-soft);cursor:pointer;opacity:.7;transition:opacity .15s ease,border-color .15s ease;
}
.ev-detail__thumb:hover{opacity:1}
.ev-detail__thumb[aria-pressed="true"]{border-color:var(--lilac);opacity:1}
.ev-detail__thumbimg{width:100%;height:100%;object-fit:cover}
.ev-detail__info{
  max-height:calc(100vh - 48px);max-height:calc(100dvh - 48px);overflow-y:auto;overscroll-behavior:contain;
  padding:40px 36px 34px;display:flex;flex-direction:column;align-items:flex-start;
}
.ev-detail__info .eyebrow{line-height:normal}
.ev-detail__title{margin-top:8px;padding-right:40px;font:500 36px/1.08 var(--serif);color:var(--plum)}
.ev-detail__info .ev-way__best{margin-top:10px}
.ev-detail__about{margin-top:16px}
.ev-detail__info .ev-details{margin-top:22px}
.ev-detail__note{margin-top:18px}
.ev-detail__actions{margin-top:24px}

/* details list (window and edit-mode panels) */
.ev-details{display:grid;gap:0;margin:0;width:100%}
.ev-detail-row{padding:14px 0;border-top:1px dashed var(--lilac-line)}
.ev-detail-row:last-child{border-bottom:1px dashed var(--lilac-line)}
.ev-detail-row__title{font:600 13.5px var(--sans);color:var(--plum-ink)}
.ev-detail-row__body{margin:3px 0 0;font:13.5px/1.65 var(--sans);color:var(--stone);text-wrap:pretty}

/* the booking form itself (pop-up for visitors, on the page in edit mode) */
.ev-panel__title{font-family:var(--serif);font-size:28px;font-weight:600;line-height:normal;color:var(--plum);padding-right:44px}
.ev-panel__reply{font:12.5px var(--sans);color:var(--stone);margin-top:3px}
.ev-dialog .stitch,.ev-panel .stitch{margin:16px 0 18px}
.ev-form .form-row > *{min-width:0}
/* the design's boxes use the browser's normal line height and default (darker, easier to read) placeholder grey */
.ev-form .input{line-height:normal}
.ev-form .input::placeholder{color:#757575;opacity:1}
.ev-input--short{padding-block:10px}
.ev-choice__label{margin-bottom:7px}
.ev-chips{list-style:none;margin:0;padding:0}
.ev-chip{display:flex}
.ev-chips .chip-btn{line-height:normal}
/* the box under the occasion chips when "Other" is picked (js/events.js) */
.ev-other{margin-top:10px}
.ev-other .ev-hint{display:block;margin-top:5px}
.chip-btn.is-on{background:var(--lilac);color:#fff;border-color:transparent;box-shadow:var(--shadow-chip)}
.ev-form textarea.input{min-height:84px}
.ev-submit{margin-top:4px;padding:14px;line-height:normal;white-space:normal;box-shadow:0 12px 20px -12px rgba(139,106,200,.85)}
.ev-submit[aria-disabled="true"]{opacity:.7;cursor:progress}
/* the line under the button that links to the privacy page (a tall enough tap target on a phone) */
.ev-form .form-privacy{margin-top:-4px;text-align:center;font:12.5px/1.5 var(--sans);color:var(--stone)}
.ev-form .form-privacy a{display:inline-block;padding:4px 0;color:var(--violet);border-bottom:1px solid var(--lilac-line)}
.ev-form .form-privacy a:hover{color:var(--plum)}
.form-privacy__hint{font-style:italic}
/* the server named something to fix (js/site.js); the email link when saving didn't work */
.ev-form .form-status.is-error{color:#A62E1B;background:var(--blush-soft)}
.ev-form .form-status a{color:inherit;font-weight:600;text-decoration:underline;overflow-wrap:anywhere}
.ev-form .input[aria-invalid="true"]{border-color:var(--cherry)}

/* ---------- edit mode: the windows' words and photos sit on the page ---------- */
/* one panel per event type, full width, so the editor's photo buttons fit on each photo */
.ev-more{display:grid;gap:26px;padding-top:28px;padding-bottom:24px}
.ev-more__panel{padding:26px 28px 30px;scroll-margin-top:110px;transition:box-shadow .3s ease}
/* jumped to from its card ("Change the photos and words in its window") */
.ev-more__panel:target{box-shadow:0 0 0 3px var(--lilac),0 18px 40px -24px rgba(91,74,134,.6)}
.ev-more__panel .eyebrow{line-height:normal}
.ev-more__title{margin-top:6px;font:500 28px/1.1 var(--serif);color:var(--plum)}
.ev-more__about{margin-top:12px}
.ev-more__panel .ev-details{margin-top:18px}
.ev-more__label{margin-top:22px;margin-bottom:4px}
.ev-more__label--words{margin-top:10px}
.ev-more__hint{margin:0 0 14px;max-width:72ch;font:13px/1.55 var(--sans);color:var(--stone)}
/* every photo of the window in order: the card's own photo, then the list of extra ones */
.ev-more__gallery{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;align-items:start}
.ev-more__gallery > .ev-more__photos{grid-column:2 / -1}
.ev-more__photos{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.ev-more__photo{position:relative;margin:0;aspect-ratio:4 / 5;border-radius:14px;overflow:hidden;background:var(--lilac-soft)}
.ev-more__img{width:100%;height:100%;object-fit:cover}
.ev-more__tag{position:absolute;left:10px;bottom:10px;padding:3px 10px;border-radius:999px;background:rgba(46,36,64,.78);color:#fff;font:600 11.5px/1.5 var(--sans);pointer-events:none}
/* on each card in edit mode: jump to its window's panel */
.ev-way__edit{
  align-self:flex-start;display:inline-flex;align-items:center;gap:6px;margin-top:16px;padding:8px 14px;border-radius:999px;
  font:600 12.5px/1.3 var(--sans);color:var(--violet);background:var(--lilac-soft);border:1px dashed var(--lilac);
}
.ev-way__edit:hover{background:#E2D3F7}
.ev-formwrap{padding-bottom:80px;scroll-margin-top:136px}
.ev-formwrap .ev-panel{max-width:560px;margin-inline:auto;padding:26px 26px 28px}
.ev-hint{font:italic 12px/1.5 var(--sans);letter-spacing:normal;text-transform:none;color:var(--stone)}
.ev-panel .ed-note{margin-bottom:18px}
/* room for the editor's "+ Add" button that sits under each list */
.is-editing .ev-ways__list,.is-editing .ev-chips[data-ed-list],.is-editing .ev-photos,.is-editing .ev-more__photos{margin-bottom:42px}
.is-editing .ev-note{margin-top:0}

/* ---------- responsive ---------- */
@media (max-width:1024px){
  .ev-hero__title{font-size:42px}
  .ev-way__media{height:380px}
  .ev-detail__info{padding:36px 28px 30px}
  .ev-detail__title{font-size:32px}
}
@media (max-width:900px){
  .ev-ways{padding-top:56px}
  .ev-ways__list{gap:20px}
  .ev-way__media{height:320px}
  .ev-way__body{padding:22px 22px 26px}
  .ev-way__title{font-size:28px}
  .ev-photos{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .ev-photo{border-radius:14px}
  .ev-more__gallery{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ev-more__gallery > .ev-more__photos{grid-column:1 / -1;grid-template-columns:repeat(2,minmax(0,1fr))}
  .ev-formwrap{scroll-margin-top:106px}
}
/* single-column layout and touch screens: 40px+ chips */
@media (max-width:900px),(pointer:coarse){
  .ev-chips .chip-btn{min-height:40px;padding:10px 16px;font-size:12.5px}
}
@media (max-width:760px){
  .ev-hero{min-height:0}
  .ev-hero::after{background:linear-gradient(180deg,rgba(251,246,236,.94) 25%,rgba(251,246,236,.8) 60%,rgba(233,222,248,.62))}
  .ev-hero__inner{padding-block:48px 44px}
  .ev-hero__title{font-size:38px}
  .ev-h2{font-size:28px}
  .ev-ways__list{grid-template-columns:1fr}
  .ev-way__media{height:360px}
  .ev-cta{padding-bottom:56px}
  .ev-cta__band{padding:40px 22px;border-radius:22px}
  .ev-cta__title{font-size:32px}

  /* the booking window becomes a sheet that slides up from the bottom, with a strip of photo on top */
  .ev-dialog{width:100%;max-width:none;margin:auto 0 0}
  .ev-dialog[open]{animation-name:ev-sheet}
  @keyframes ev-sheet{from{transform:translateY(40px);opacity:0}}
  .ev-dialog__box{grid-template-columns:1fr;border-radius:22px 22px 0 0}
  .ev-dialog__media{height:120px}
  .ev-dialog__body{max-height:calc(100vh - 136px);max-height:calc(100dvh - 136px);padding:24px 20px calc(24px + env(safe-area-inset-bottom))}
  .ev-close{background:rgba(255,255,255,.92)}
  .ev-panel__title{font-size:26px;padding-right:0}
  .ev-formwrap .ev-panel{padding:22px 20px 24px}

  /* an event type fills the screen: big swipeable photo on top, words below, all one scroll */
  .ev-detail{width:100vw;max-width:100vw;height:100vh;height:100dvh;margin:0}
  .ev-detail__box{display:block;height:100%;border-radius:0;overflow-y:auto;overscroll-behavior:contain;box-shadow:none}
  .ev-detail__main,.ev-detail.has-thumbs .ev-detail__main{height:min(112vw, 60vh);height:min(112vw, 60dvh)}
  .ev-detail__info{max-height:none;overflow:visible;padding:24px var(--gutter) calc(34px + env(safe-area-inset-bottom))}
  .ev-detail__title{padding-right:0;font-size:30px}
  .ev-detail .ev-close{position:fixed;top:12px;right:12px}
  .ev-detail__nav{width:38px;height:38px}
  .ev-detail__actions{width:100%}
  .ev-detail__actions .btn{width:100%}
  .ev-more__panel{padding:22px 20px 24px}
}
@media (max-width:560px){
  .ev-way__media{height:300px}
  /* edit mode on a phone: one photo per row so the photo buttons fit */
  .is-editing .ev-photos,.is-editing .ev-more__gallery,.is-editing .ev-more__gallery > .ev-more__photos{grid-template-columns:1fr}
}
@media (max-width:420px){
  .ev-hero__title{font-size:34px}
  .ev-hero__inner{padding-block:40px 38px}
}
