:root {
  --paper: #f4f0dd; --ink: #33332f; --accent: #738561; --accent2: #a98a52;
  --font-display: "Gilda Display", Georgia, serif; --font-body: "EB Garamond", Georgia, serif; --font-script: "Homemade Apple", cursive;
  --shadow: 44, 36, 24;
  --lab: var(--accent-ink);
  --table: color-mix(in srgb, var(--paper) 82%, var(--ink));
  --card-accent: color-mix(in srgb, var(--accent) 55%, var(--ink));
  --rule: color-mix(in srgb, var(--accent-ink) 34%, transparent);
  --margin: clamp(320px, 27vw, 430px);
}
html { background: var(--paper); overflow-x: clip; }
body {
  color: var(--ink); font: 400 19px/1.42 var(--font-body); overflow-x: clip;
  background: var(--paper) url(/assets/fine-cotton.webp) center top / 900px; background-blend-mode: multiply;
}
.book { position: relative; overflow-x: clip; }

/* Type: pressed, as on the suite */
.v-names, .v-h, .v-count__n {
  text-shadow: 0 1px 0 color-mix(in srgb, var(--paper) 70%, transparent), 0 -.5px 0 rgba(30, 26, 20, .25);
  -webkit-mask: url(/assets/letterpress-ink-texture.webp) center / 620px;
  mask: url(/assets/letterpress-ink-texture.webp) center / 620px;
  padding-block: .06em;
}
.colophon .v-h { color: var(--paper); text-shadow: 0 -1px 0 rgba(20, 24, 14, .5); }
.v-kicker, .v-count__l, .v-dl dt, .v-date b, .v-hosts span { font: 500 10.5px/1.4 var(--font-body); letter-spacing: .3em; text-transform: uppercase; color: var(--lab); }
.v-prose p + p { margin-top: 10px; }
.v-prose, .v-venue__addr { line-height: 1.38; }
.v-guest { font: italic 400 20px/1.2 var(--font-body); color: var(--lab); margin-bottom: 10px; }
.v-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.v-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.v-extra__img { width: 100%; max-height: 260px; object-fit: cover; margin-bottom: 16px; }
.v-dl { display: grid; gap: 14px; }
.v-dl dt { margin-bottom: 3px; }
.v-dl dd { font-size: 21px; line-height: 1.3; }
.v-small { font-size: 21px; font-style: italic; margin-top: 8px; }
.v-h { font: 400 clamp(34px, 3.2vw, 46px)/1.08 var(--font-display); color: var(--lab); margin-bottom: 18px; }

/* ---- a plate: bleeds off three edges, the fourth is the book's margin ---- */
.pin { height: calc(var(--len) * 100vh); height: calc(var(--len) * 100svh); }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.art { position: absolute; top: 0; bottom: 0; width: calc(100% - var(--margin) + 2.5vw); transform-origin: 50% 50%; will-change: transform; }
.plate--r .art { left: 0; }
.plate--l .art { right: 0; }
.art canvas { width: 100%; height: 100%; max-width: none; }
.margin {
  position: absolute; top: 0; bottom: 0; width: var(--margin); display: flex; flex-direction: column;
  padding: clamp(30px, 6.4vh, 64px) clamp(26px, 2.6vw, 44px) clamp(24px, 4.4vh, 44px);
}
.plate--r .margin { right: 0; }
.plate--l .margin { left: 0; }

.m-head .v-kicker { display: block; margin-bottom: clamp(8px, 1.6vh, 16px); }
.hour { font: 400 clamp(58px, 10vh, 92px)/1 var(--font-display); color: var(--accent-ink); font-variant-numeric: lining-nums; }
.hour, .moment { margin-bottom: 0; }
.moment { font: 400 clamp(30px, 5vh, 44px)/1.1 var(--font-display); color: var(--lab); margin-top: 2px; margin-bottom: 0; }
.until { margin-top: 10px; font-size: 21px; font-style: italic; }
.until time { font: 400 21px/1 var(--font-display); font-style: normal; color: var(--accent-ink); margin-right: 6px; }

.m-head--hero { display: flex; flex-direction: column; flex: 1; }
.m-head--hero .v-hosts { margin-top: 8px; font-size: 19px; }
.v-date__time { font-size: 20px; color: var(--ink-soft); margin-left: 6px; }
.m-head--hero .v-names { font: 400 clamp(62px, 11.4vh, 104px)/1 var(--font-display); color: var(--lab); margin-top: clamp(4px, 1.4vh, 14px); }
.m-head--hero .v-names em { display: block; font: italic 400 .44em/1.25 var(--font-body); color: var(--accent-ink); }
.m-head--hero .v-date { margin-top: clamp(16px, 3.4vh, 34px); font-size: 22px; line-height: 1.28; }
.m-head--hero .v-date b { display: block; font: 500 10.5px/1.5 var(--font-body); letter-spacing: .3em; text-transform: uppercase; margin-bottom: 7px; }
.m-head--hero .v-place { margin-top: clamp(10px, 1.8vh, 18px); font-size: 20px; line-height: 1.28; font-style: italic; }
.cue { margin-top: auto; padding-bottom: 18px; padding-top: 12px; }

.notes { margin-top: clamp(14px, 2.6vh, 26px); font-size: clamp(17.5px, 2.15vh, 19px); line-height: 1.36; }
.notes p + p { margin-top: 8px; }
.sub { font: 500 10.5px/1.4 var(--font-body); letter-spacing: .3em; text-transform: uppercase; margin-bottom: clamp(7px, 1.2vh, 12px); padding-top: clamp(9px, 1.5vh, 14px); border-top: 1px solid var(--rule); }
.v-dl--x { display: grid; gap: clamp(5px, 1.05vh, 11px); }
.v-dl--x dt { font: 500 9.5px/1.4 var(--font-body); letter-spacing: .24em; text-transform: uppercase; color: var(--accent-ink); }
.v-dl--x dd { line-height: 1.24; }

/* The printed caption, set only once the plate is done */
.caption {
  margin-top: auto; padding-top: 12px; opacity: 0; display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap;
  font: 500 9.5px/1.5 var(--font-body); letter-spacing: .24em; text-transform: uppercase; color: var(--lab);
}
.caption i { flex: 0 0 22px; align-self: center; height: 1px; background: var(--rule); margin-inline: 4px; }
.caption em { font: italic 400 17px/1.2 var(--font-body); letter-spacing: 0; text-transform: none; }

/* The burin: a slim steel point, only while cutting */
.burin { position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0; pointer-events: none; will-change: transform, opacity; }
.burin::before {
  content: ''; position: absolute; left: -.6px; bottom: 0; width: 1.2px; height: 78px; transform-origin: 50% 100%; transform: rotate(38deg);
  background: linear-gradient(to top, var(--ink) 0, var(--ink) 22%, color-mix(in srgb, var(--ink) 50%, transparent) 60%, transparent 100%);
}
.burin::after { content: ''; position: absolute; left: -2px; top: -2px; width: 4px; height: 4px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--paper) 65%, transparent); }

/* ---- the leaves between plates ---- */
.leaf { position: relative; display: grid; align-items: center; gap: clamp(30px, 5vw, 90px); padding: clamp(70px, 13vh, 130px) clamp(24px, 8vw, 130px); grid-template-columns: 1fr 1fr; }
.vign { position: relative; }
.vign canvas { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }

.leaf--count { min-height: 92vh; }
.leaf--count .vign { height: min(66vh, 44vw); }
.leaf--venue .vign, .leaf--faq .vign { height: min(52vh, 34vw); }
.v-count { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vh, 30px) 0; margin: 18px 0; }
.v-count__cell { padding: 2px 0; }
.v-count__cell:nth-child(even) { padding-left: clamp(16px, 2.4vw, 38px); border-left: 1px solid var(--rule); }
.v-count__n { display: block; font: 400 clamp(62px, 7vw, 104px)/1 var(--font-display); color: var(--accent-ink); font-variant-numeric: lining-nums tabular-nums; }


.leaf--venue { grid-template-columns: minmax(0, .82fr) minmax(0, 1fr); }
.vign--sq { height: min(60vh, 40vw); }
.v-venue__name { font: 400 clamp(44px, 5vw, 72px)/1.05 var(--font-display); margin: 8px 0 4px; }
.v-venue__loc { font-size: 24px; font-style: italic; color: var(--accent-ink); margin-bottom: 18px; }
.v-link {
  display: inline-flex; align-items: center; min-height: 44px; margin-top: 16px;
  font: 500 10.5px/1.4 var(--font-body); letter-spacing: .26em; text-transform: uppercase; color: var(--lab); text-decoration: none;
  border-bottom: 1px solid var(--lab);
}

.leaf--prog { grid-template-columns: 1fr; justify-items: center; padding-top: 0; gap: 20px; }
.vign--lights { width: 100vw; height: 25vw; max-height: 300px; }
.leaf--prog .leaf__text { width: min(640px, 100%); }
.leaf--prog .v-h { margin: 12px 0 24px; font-size: clamp(44px, 5vw, 72px); }
.v-timeline li { display: grid; grid-template-columns: 110px 1fr; align-items: baseline; gap: 8px; padding: 14px 0 15px; border-top: 1px solid var(--rule); }
.v-timeline li:last-child { border-bottom: 1px solid var(--rule); }
.v-timeline time { font: 400 32px/1 var(--font-display); color: var(--accent-ink); font-variant-numeric: lining-nums; }
.v-timeline__label { font-size: 24px; }
.v-timeline p { grid-column: 2; font-size: 17px; line-height: 1.3; }

.leaf--faq, .leaf--text { grid-template-columns: minmax(0, .7fr) minmax(0, 1fr); }
.leaf--text .vign { height: min(46vh, 30vw); }
.leaf--text .v-h { font-size: clamp(44px, 5vw, 72px); }
.leaf--wide { grid-template-columns: 1fr; }
.vign--olive { height: min(52vh, 34vw); }
.leaf--faq .v-h { font-size: clamp(44px, 5vw, 72px); margin-bottom: 26px; }
.v-faq { display: grid; gap: 20px; }
.v-faq dt { font: 500 21px/1.26 var(--font-body); margin-bottom: 4px; color: var(--ink); }
.v-faq div + div { padding-top: 20px; border-top: 1px solid var(--rule); }

/* Reply: the suite's card, on linen */
.linen {
  position: relative; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 480px); justify-content: center; align-items: center; gap: clamp(20px, 5vw, 80px);
  padding: clamp(60px, 11vh, 110px) clamp(20px, 7vw, 110px);
  background: var(--table) url(/assets/fine-linen.webp) center / cover; background-blend-mode: multiply;
}
.vign--env { height: min(60vh, 34vw); }
.card {
  padding: 40px 42px 30px; color: var(--ink);
  background: var(--paper-2) url(/assets/paper-sage-paper.webp) center / 900px; background-blend-mode: multiply;
  box-shadow: 0 1px 1.5px rgba(var(--shadow), .42), 1px 6px 16px rgba(var(--shadow), .24), 3px 16px 40px rgba(var(--shadow), .16), inset 0 0 0 1px color-mix(in srgb, var(--paper) 40%, transparent);
}
.card .v-h { text-align: center; margin-bottom: 16px; color: var(--ink); }
.card .v-intro { text-align: center; font-style: italic; margin-bottom: 10px; }
.card .v-rsvp { max-height: min(560px, calc(100svh - 240px)); overflow-y: auto; overscroll-behavior: contain; padding: 2px 4px 6px; margin: 0 -4px; }
/* Colophon: gift and signature on the sage envelope stock */
.colophon {
  color: var(--paper); text-align: center; padding: clamp(50px, 9vh, 90px) 24px clamp(60px, 10vh, 110px);
  background: var(--card-accent) url(/assets/fine-envelope.webp) center / 760px; background-blend-mode: soft-light;
}
.vign--glasses { width: min(260px, 58vw); height: min(260px, 58vw); margin: 0 auto 16px; }
.colophon__text { width: min(560px, 100%); margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.colophon .v-h { color: var(--paper); font-size: clamp(36px, 4vw, 54px); margin-bottom: 18px; }
.colophon__text .v-prose, .colophon__text .v-prose p { font-size: 20px; line-height: 1.42; }
.colophon .v-iban { margin: 26px 0 6px; font: 500 13px/1.5 var(--font-body); letter-spacing: .1em; overflow-wrap: anywhere; }
.v-copy {
  min-height: 44px; padding: 0 2px; background: none; border: 0; cursor: pointer;
  font: 500 10px/1.4 var(--font-body); letter-spacing: .28em; text-transform: uppercase; color: var(--paper);
}
.v-copy span { border-bottom: 1px solid rgba(244, 240, 221, .6); padding-bottom: 3px; }
.colophon .sign { margin-top: 44px; font: 400 clamp(25px, 3vw, 34px)/1.9 var(--font-script); transform: rotate(-3deg); }

.is-still .pin { height: auto; }
.is-still .stage { position: relative; }
.is-still .caption { opacity: 1; }
.is-still .burin { display: none; }

/* ---- phones and portrait: plate above, margin below, longer notes run on after it ---- */
@media (max-width: 900px), (max-aspect-ratio: 1/1) {
  body { font-size: 18px; }
  .stage { display: flex; flex-direction: column; }
  .art { position: relative; flex: 1 1 0; min-height: 0; width: 100%; left: auto; right: auto; }
  .margin { position: relative; width: 100%; flex: none; left: auto; right: auto; padding: 8px 24px 16px; }
  .plate--r .margin, .plate--l .margin { left: auto; right: auto; }
  .plate--first .margin { padding-top: 0; }
  .m-head--hero { flex: none; }
  .hour { font-size: clamp(54px, 10vh, 76px); }
  .moment { font-size: clamp(28px, 4.2vh, 36px); margin-top: 0; }
  .m-head .v-kicker { margin-bottom: 4px; }
  .until { margin-top: 2px; font-size: 19px; }
  .m-head--hero .v-names { font-size: clamp(50px, 7.6vh, 72px); margin-top: 2px; line-height: .98; }
  .m-head--hero .v-names em { display: inline; font-size: .56em; margin: 0 .24em; }
  .m-head--hero .v-date { margin-top: 10px; font-size: 20px; }
  .m-head--hero .v-date b { margin-bottom: 2px; }
  .m-head--hero .v-place { margin-top: 4px; font-size: 18px; }
  .m-head .cue { position: absolute; right: 24px; bottom: 16px; margin: 0; padding: 0; }
  .caption { padding-top: 10px; margin-top: 0; }
  .after:not(:empty) { padding: 22px 24px 54px; }
  .notes { margin-top: 0; font-size: 18.5px; }
  .notes .sub:first-child { padding-top: 14px; }
  .v-dl--x { gap: 11px; }
  .leaf, .leaf--venue, .leaf--faq, .linen { grid-template-columns: minmax(0, 1fr); padding: 64px 24px; gap: 26px; }
  .leaf--count { min-height: 0; }
  .leaf--count .vign { height: 62vw; }
  .v-count__n { font-size: 66px; }
  .leaf--prog { padding-top: 0; justify-items: stretch; }
  .vign--lights { width: calc(100vw); margin-inline: -24px; height: 25vw; }
  .v-timeline li { grid-template-columns: 84px 1fr; }
  .v-timeline time { font-size: 26px; }
  .v-timeline__label { font-size: 21px; }
  .leaf--venue .vign, .leaf--faq .vign, .leaf--text .vign { height: 46vw; }
  .vign--env { height: 52vw; }
  .card { padding: 30px 26px 22px; }
  .colophon__text .v-prose, .colophon__text .v-prose p { font-size: 18.5px; }
}

/* Tablets and tall embeds: a portrait page, but with room for larger type */
@media (min-width: 600px) and (max-aspect-ratio: 1/1) {
  .margin { padding: 14px 44px 26px; }
  .plate--first .margin { padding-top: 6px; }
  .m-head--hero .v-names { font-size: 96px; }
  .m-head--hero .v-date { font-size: 26px; }
  .m-head--hero .v-place { font-size: 23px; }
  .m-head .cue { right: 44px; bottom: 26px; }
}

/* Room for the floating guide under the plate's margin */
@media (max-width: 900px), (max-aspect-ratio: 1/1) {
  .is-guided:not(.is-embed) .margin { padding-bottom: 72px; }
}
