/* Theme tokens come from /js/render/base.css and the doc theme; these are this template's defaults. */
: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;
  --cotton: color-mix(in srgb, var(--paper) 55%, #fff);
  --air: color-mix(in srgb, var(--paper) 82%, var(--ink));
  --accent-deep: var(--accent-ink);
  --shadow: 44, 36, 24;
  --hl: rgba(255, 255, 255, .7);
  --sheet-filter: none; --env-filter: none; --engr-filter: none;
}
html.is-dark { --shadow: 0, 0, 0; --hl: rgba(255, 255, 255, .06); --cotton: color-mix(in srgb, var(--paper) 88%, #fff); --engr-filter: invert(.88); }
html { background: var(--air); overflow-x: clip; }
body { color: var(--ink); font-family: var(--font-body); font-size: 18px; line-height: 1.42; overflow-x: clip; }

.track { width: 1px; pointer-events: none; }
.track i { display: block; width: 1px; }

/* The box of the theatre. The camera's axis stays at the middle of the small viewport,
   so a phone's collapsing address bar never moves the scene. */
.stage {
  position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; overflow: hidden; overflow: clip;
  background: var(--air) url(/assets/fine-linen.webp) center / cover; background-blend-mode: multiply;
  perspective: 1200px; perspective-origin: 50% 50vh; perspective-origin: 50% 50svh;
}
.world { position: absolute; left: 50%; top: 50vh; top: 50svh; width: 0; height: 0; transform-style: preserve-3d; will-change: transform; }

/* Sheets: rastered once at their native size, then only moved. */
.sheet, .cast { position: absolute; left: 0; top: 0; max-width: none; pointer-events: none; transform-origin: 0 0; will-change: transform; user-select: none; }
.sheet { filter: var(--sheet-filter); }
.sheet--env { filter: var(--env-filter); }
.cast { opacity: .3; }

/* A card hung inside the scene, from its thread */
.hang { opacity: 0; position: absolute; left: 0; top: 0; width: var(--w); transform-origin: 50% 0; will-change: transform, opacity; pointer-events: none; }
.hang.is-live { pointer-events: auto; }
.thread { position: absolute; left: 50%; bottom: calc(100% - 15px); width: 1px; height: 120vh; margin-left: -.5px; background: color-mix(in srgb, var(--ink) 60%, transparent); box-shadow: 1px 0 0 var(--hl); z-index: 2; }
.thread::after { content: ''; position: absolute; left: -3.5px; bottom: -4px; width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 75%, var(--paper)); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .55), 0 1px 0 var(--hl); }
.card {
  position: relative; display: flex; flex-direction: column; min-height: var(--mh); padding: var(--pad);
  background: var(--cotton) url(/assets/fine-cotton.webp) center / 900px; background-blend-mode: multiply;
  box-shadow: 0 1px 0 var(--line), inset 0 0 0 1px var(--hl), 1px 3px 5px rgba(var(--shadow), .3), 5px 22px 44px rgba(var(--shadow), .34);
  overscroll-behavior: contain;
}
.card.is-scroll { overflow-y: auto; scrollbar-width: thin; }
.cream .card { background-color: var(--paper); background-image: url(/assets/paper-sage-paper.webp); }
.sagecard .card { background-color: var(--accent); background-image: url(/assets/fine-envelope.webp); background-size: 760px; background-blend-mode: soft-light; color: var(--on-accent); box-shadow: 0 1px 0 var(--line), inset 0 0 0 1px rgba(255, 255, 255, .1), 1px 3px 5px rgba(var(--shadow), .34), 5px 22px 44px rgba(var(--shadow), .4); }
.sagecard .v-h { color: var(--on-accent); text-shadow: none; }
.sagecard { --ink: var(--on-accent); --ink-soft: var(--on-accent); --line: color-mix(in srgb, var(--on-accent) 35%, transparent); --accent-ink: var(--on-accent); }
/* Deckled hero sheet: the cut edge is a mask, the paper is the theme's */
.deckle .card { background-color: var(--cotton); background-image: url(/assets/fine-cotton.webp); background-size: 900px; box-shadow: none; padding: calc(var(--pad) + 24px);
  -webkit-mask: url(/assets/fine-deckle.webp) center / 100% 100% no-repeat; mask: url(/assets/fine-deckle.webp) center / 100% 100% no-repeat; }
.deckle .thread { display: none; }
.deckle::before { content: ''; position: absolute; inset: 26px; box-shadow: 2px 8px 18px rgba(var(--shadow), .34), 6px 26px 50px rgba(var(--shadow), .3); }

/* Type */
.v-h, .press { color: var(--ink); text-shadow: 0 1px 0 var(--hl), 0 -.5px 0 rgba(30, 26, 20, .25); padding-block: .06em; font: 400 40px/1.08 var(--font-display); margin-bottom: 22px; }
.v-kicker, .lab { font: 500 10.5px/1.4 var(--font-body); letter-spacing: .3em; text-transform: uppercase; color: var(--accent-ink); }
.v-small { font-size: 20px; line-height: 1.32; }
.v-guest { font: italic 400 19px/1.3 var(--font-body); color: var(--accent-ink); margin-bottom: 8px; }
.rule { height: 1px; background: var(--line); box-shadow: 0 1px 0 var(--hl); }
.engr { width: 100%; filter: var(--engr-filter); }
.v-prose { display: grid; gap: .6em; font-size: 19px; line-height: 1.4; }
.v-link { margin-top: auto; padding-top: 14px; display: inline-flex; align-items: center; min-height: 44px; align-self: flex-start; font: 500 10.5px/1.4 var(--font-body); letter-spacing: .26em; text-transform: uppercase; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--accent-ink); }

/* Hero */
.c-hero { --w: 500px; --mh: 700px; --pad: 44px; }
.hero { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero__orn { width: 218px; height: 112px; object-fit: cover; margin-bottom: 18px; filter: var(--engr-filter); }
.hero .v-names { font: 400 76px/1.02 var(--font-display); margin-top: 18px; overflow-wrap: anywhere; }
.hero .v-names em { display: block; font: italic 400 34px/1.2 var(--font-body); color: var(--accent-ink); margin: 2px 0; }
.hero .v-hosts { margin-top: 10px; font-size: 18px; color: var(--ink-soft); }
.hero .v-hosts span { font: 500 10.5px/1.4 var(--font-body); letter-spacing: .3em; text-transform: uppercase; color: var(--accent-ink); margin-right: 6px; }
.hero .v-date { margin-top: auto; font-size: 21px; line-height: 1.32; }
.hero .v-date b { display: block; font: 500 10.5px/1.5 var(--font-body); letter-spacing: .3em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 9px; }
.hero .v-date__time { display: block; font-size: 18px; color: var(--ink-soft); }
.hero .v-place { font-size: 20px; margin-top: 16px; padding-top: 16px; position: relative; }
.hero .v-place::before { content: ''; position: absolute; left: 50%; top: 0; width: 56px; margin-left: -28px; height: 1px; background: var(--line); box-shadow: 0 1px 0 var(--hl); }

/* Countdown */
.c-countdown { --w: 430px; --mh: 500px; --pad: 44px; }
.c-countdown .card > * { margin-block: auto; }
.c-countdown .card { text-align: center; justify-content: center; gap: 18px; }
.v-count { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 0; margin: 10px 0; }
.v-count__cell { padding: 6px 0; }
.v-count__cell:nth-child(odd) { border-right: 1px solid var(--line); }
.v-count__n { display: block; font: 400 62px/1 var(--font-display); font-variant-numeric: lining-nums tabular-nums; text-shadow: 0 1px 0 var(--hl); }
.v-count__l { font: 500 10.5px/1.4 var(--font-body); letter-spacing: .3em; text-transform: uppercase; color: var(--accent-ink); }

/* Venue */
.c-venue { --w: 720px; --mh: 460px; --pad: 34px; }
.venue { flex: 1; display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; align-items: stretch; }
.venue__frame { position: relative; min-height: 0; }
.venue__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; filter: var(--engr-filter); }
.venue__copy { display: flex; flex-direction: column; }
.venue__copy .v-h { margin: 16px 0 4px; }
.venue__copy p { font-size: 18.5px; line-height: 1.34; }
.venue__copy .where { margin-bottom: 16px; color: var(--accent-ink); font-size: 20px; font-style: italic; }
.c-venue.no-art .venue { grid-template-columns: 1fr; }
.c-venue.no-art { --w: 460px; }

/* Lists */
.c-timeline { --w: 440px; --mh: 580px; --pad: 44px; }
.c-menu, .c-story { --w: 470px; --mh: 0px; --pad: 44px; }
.c-dress, .c-transport, .c-faq, .c-extra { --w: 470px; --mh: 0px; --pad: 44px; }
.c-gallery { --w: 560px; --mh: 0px; --pad: 34px; }
.c-timeline .card > .v-timeline { flex: 1; }
.v-timeline { display: flex; flex-direction: column; justify-content: space-between; }
.v-timeline li { display: grid; grid-template-columns: 96px 1fr; align-items: baseline; padding: 14px 0 16px; border-top: 1px solid var(--line); }
.v-timeline li:last-child { border-bottom: 1px solid var(--line); }
.v-timeline time { font: 400 28px/1 var(--font-display); font-variant-numeric: lining-nums; color: var(--accent-ink); }
.v-timeline__label { font-size: 22px; }
.v-timeline p { grid-column: 2; font-size: 16.5px; line-height: 1.35; color: var(--ink-soft); margin-top: 3px; }
.v-dl { display: grid; gap: 14px; }
.v-dl dt { font: 500 10px/1.4 var(--font-body); letter-spacing: .28em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 3px; }
.v-dl dd { font-size: 19.5px; line-height: 1.3; }
.v-faq { display: grid; gap: 18px; }
.v-faq dt { font: 500 18.5px/1.28 var(--font-body); margin-bottom: 4px; }
.v-faq dd { font-size: 17px; line-height: 1.38; }
.v-faq div + div { padding-top: 18px; border-top: 1px solid var(--line); }
.v-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.v-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: 0 1px 4px rgba(var(--shadow), .35); }
.v-extra__img { width: 100%; max-height: 220px; object-fit: cover; margin-bottom: 14px; }

/* Reply */
.c-rsvp { --w: 480px; --mh: 0px; --pad: 38px; }
.c-rsvp .v-h { text-align: center; margin-bottom: 8px; }
.c-rsvp .v-intro { text-align: center; margin-bottom: 14px; font-size: 17px; color: var(--ink-soft); }
.c-rsvp { --vf-ink: var(--ink); --vf-line: var(--ink); --vf-accent: var(--accent-ink); --vf-on-accent: var(--paper); --vf-bg: transparent; }

/* Gift */
.c-gift { --w: 440px; --mh: 540px; --pad: 44px; }
.c-gift .card { text-align: center; align-items: center; }
.c-gift .v-h { font-size: 36px; margin: 6px 0 16px; }
.c-gift .v-prose { font-size: 18.5px; }
.v-iban { margin: 20px 0 6px; font: 500 14px/1.5 var(--font-body); letter-spacing: .12em; 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: inherit; }
.v-copy span { border-bottom: 1px solid currentColor; padding-bottom: 3px; }
.sign { margin-top: auto; padding-top: 12px; font: 400 25px/1.9 var(--font-script); color: inherit; transform: rotate(-3deg); }

@media (max-width: 820px), (orientation: portrait) {
  body { font-size: 17px; }
  .c-hero { --w: 358px; --mh: 540px; --pad: 26px; }
  .deckle .card { padding: calc(var(--pad) + 18px) calc(var(--pad) + 12px); }
  .deckle::before { inset: 20px; }
  .hero__orn { width: 168px; height: 88px; margin-bottom: 10px; }
  .hero .v-names { font-size: 60px; margin-top: 12px; }
  .hero .v-names em { font-size: 28px; }
  .hero .v-date { font-size: 19px; }
  .hero .v-place { font-size: 18.5px; margin-top: 12px; padding-top: 12px; }
  .c-countdown, .c-timeline, .c-menu, .c-story, .c-dress, .c-transport, .c-faq, .c-extra, .c-gift, .c-gallery { --w: 350px; --pad: 28px; --mh: 0px; }
  .c-venue { --w: 350px; --pad: 26px; --mh: 0px; }
  .c-rsvp { --w: 350px; --pad: 24px; --mh: 0px; }
  .v-h, .press { font-size: 34px; margin-bottom: 16px; }
  .v-count__n { font-size: 54px; }
  .v-timeline li { grid-template-columns: 78px 1fr; }
  .v-timeline time { font-size: 25px; }
  .v-timeline__label { font-size: 20px; }
  .v-faq { gap: 14px; }
  .v-faq div + div { padding-top: 14px; }
  .v-faq dd { font-size: 16.5px; }
  .v-dl dd { font-size: 18px; }
  .venue { grid-template-columns: 1fr; gap: 16px; grid-template-rows: 200px auto; }
  .c-venue.no-art .venue { grid-template-rows: auto; }
  .c-gift .v-h { font-size: 32px; }
  .c-gift .v-prose { font-size: 17px; }
  .v-iban { font-size: 12.5px; letter-spacing: .04em; }
  .sign { font-size: 21px; }
}
