:root {
  --paper: #f4f0dd; --ink: #33332f; --accent: #738561; --accent2: #a98a52;
  --font-display: 'Gilda Display', 'Times New Roman', serif; --font-body: 'EB Garamond', Georgia, serif; --font-script: 'Homemade Apple', cursive;
  --shadow: 44, 36, 24;
  --air: color-mix(in srgb, var(--paper) 84%, var(--ink));
  --cotton: var(--paper);
  --cream: color-mix(in srgb, var(--paper) 93%, var(--accent));
  --sage: var(--accent); --sage-deep: var(--accent-ink);
  --display: var(--font-display); --text: var(--font-body); --label: var(--font-body); --hand: var(--font-script);
}
html { background: var(--air); overflow-x: clip; }
html.snap { scroll-snap-type: y proximity; }
body { color: var(--ink); font-family: var(--text); font-size: 18px; line-height: 1.42; overflow-x: clip; }

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

/* 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; }
.cast { opacity: .3; }

/* The backdrop: linen, the landscape printed on it, and the light falling on it. */
.back { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; pointer-events: none; isolation: isolate; overflow: hidden;
  background: #efe9d8 url(/assets/fine-linen.webp) center / 50% auto; }
.back__plate { position: absolute; max-width: none; mix-blend-mode: multiply; visibility: hidden; transition: opacity .45s linear; }
.back__tint { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: multiply; }
.glow { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; visibility: hidden; will-change: transform, opacity; }

/* Light along the cut edges: back-lit at dusk, moonlit at night */
.rim { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; visibility: hidden; will-change: transform, opacity;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }

/* Sun and moon: cut-paper discs hung on fine wire */
.orb { position: absolute; left: 0; top: 0; width: 200px; height: 200px; transform-origin: 50% 50%; pointer-events: none; visibility: hidden; will-change: transform, opacity; }
.orb__disc { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; }
.orb__wire { position: absolute; left: 50%; bottom: 50%; width: 1px; height: 6000px; transform: translateX(-50%); background: linear-gradient(to top, rgba(40, 36, 30, .55), rgba(40, 36, 30, .4)); }
.orb--moon .orb__wire { background: rgba(200, 208, 222, .32); }

/* Props cut from the vignettes, standing in the scene */
.prop { position: absolute; left: 0; top: 0; pointer-events: none; visibility: hidden; transform-origin: 50% 0; will-change: transform, opacity; user-select: none; }
.prop .prop__img { position: relative; display: block; width: 100%; height: 100%; }
.prop .thread { bottom: calc(100% - 26px); }

/* The hour, as a small slip of paper */
.hourmark { position: fixed; z-index: 50; left: 22px; top: max(18px, env(safe-area-inset-top)); display: flex; align-items: center; gap: 9px; padding: 7px 14px 7px 9px; pointer-events: none;
  background: var(--paper) url(/assets/fine-cotton.webp) center / 600px; background-blend-mode: multiply; color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 1px 2px 3px rgba(var(--shadow), .25), 2px 10px 22px -8px rgba(var(--shadow), .45);
  font: 500 10.5px/1 var(--label); letter-spacing: .26em; text-transform: uppercase; font-variant-numeric: lining-nums tabular-nums; }
.hourmark svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1; stroke-linecap: round; }
.hourmark__ticks { stroke-width: .9; opacity: .7; }
.hourmark__hand { stroke: var(--accent-ink); stroke-width: 1.4; transform-origin: 12px 12px; }
.hourmark__pin { fill: var(--ink); stroke: none; }

/* 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: rgba(50, 44, 34, .62); box-shadow: 1px 0 0 rgba(255, 255, 255, .28); z-index: 2; }
.thread::after { content: ''; position: absolute; left: -3.5px; bottom: -4px; width: 8px; height: 8px; border-radius: 50%; background: #5f584a; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .55), 0 1px 0 rgba(255, 255, 255, .7); }
.card {
  position: relative; display: flex; flex-direction: column; min-height: var(--mh); padding: var(--pad);
  background: var(--paper) url(/assets/fine-cotton.webp) center / 900px; background-blend-mode: multiply;
  color: var(--ink); font-family: var(--font-body);
  box-shadow: 0 1px 0 var(--paper-3), inset 0 0 0 1px rgba(255, 255, 255, .25), 1px 3px 5px rgba(var(--shadow), .3), 5px 22px 44px rgba(var(--shadow), .34);
}
.cream .card { background-color: var(--cream); background-image: url(/assets/paper-sage-paper.webp); }
.sagecard .card { background: var(--accent) url(/assets/fine-cotton.webp) center / 900px; background-blend-mode: multiply; color: var(--on-accent); }
.deckle .card { background: var(--paper) url(/assets/fine-cotton.webp) center / 900px; background-blend-mode: multiply; 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); }
/* Dark papers: engravings printed on the card turn into light ink on dark. */
.is-dark-paper .hero__olive { filter: invert(1) brightness(.9); }
.is-dark-paper .venue__frame img { filter: invert(1) brightness(.85); mix-blend-mode: screen; }
/* A card taller than the screen scrolls inside itself instead of shrinking. */
.card.is-long { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }

/* Type */
.press, .v-h, .v-names { color: var(--ink); text-shadow: 0 1px 0 color-mix(in srgb, var(--paper) 55%, #fff), 0 -.5px 0 color-mix(in srgb, var(--ink) 35%, transparent); padding-block: .06em; }
.sagecard .press, .sagecard .v-h { color: var(--on-accent); text-shadow: 0 -1px 0 rgba(0, 0, 0, .28), 0 1px 0 rgba(255, 255, 255, .14); }
.lab, .v-kicker, .v-count__l, .v-dl dt, .hour__dl dt { font: 500 11.5px/1.4 var(--label); letter-spacing: .26em; text-transform: uppercase; color: var(--accent-ink); }
.sagecard .lab { color: var(--on-accent); }
.head, .v-h { font: 400 40px/1.08 var(--display); }
.rule { height: 1px; background: var(--line); box-shadow: 0 1px 0 color-mix(in srgb, var(--paper) 55%, #fff); }
.v-small { font-size: 19px; line-height: 1.34; }
.v-intro { margin: 6px 0 10px; font-style: italic; color: var(--ink-soft); }
.v-prose { font-size: 19px; line-height: 1.4; display: grid; gap: 10px; }
.v-link { display: inline-flex; align-items: center; min-height: 44px; font: 500 11.5px/1.4 var(--label); letter-spacing: .24em; text-transform: uppercase; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--accent-ink); align-self: flex-start; }

/* Card sizes: a width and the padding per scene type */
.c-hero { --w: 500px; --mh: 700px; --pad: 44px; }
.c-countdown { --w: 430px; --mh: 500px; --pad: 44px; }
.c-venue { --w: 720px; --mh: 460px; --pad: 34px; }
.c-timeline { --w: 440px; --mh: 0px; --pad: 44px; }
.c-story, .c-menu, .c-transport, .c-faq, .c-extra, .c-dress { --w: 470px; --mh: 0px; --pad: 44px; }
.c-gallery { --w: 600px; --mh: 0px; --pad: 36px; }
.c-hour { --w: 420px; --mh: 0px; --pad: 42px; }
.c-rsvp { --w: 470px; --mh: 0px; --pad: 38px; }
.c-gift { --w: 440px; --mh: 540px; --pad: 44px; }
.c-faq, .c-menu, .c-transport, .c-story, .c-dress, .c-extra { --mh: 420px; }

/* Hero */
.hero { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero__olive { width: 218px; height: 112px; object-fit: cover; margin-bottom: 18px; }
.hero .v-guest { font-style: italic; color: var(--accent-ink); margin-bottom: 8px; font-size: 18px; }
.v-names { font: 400 76px/1.02 var(--display); margin-top: 18px; overflow-wrap: anywhere; }
.v-names em { display: block; font: italic 400 34px/1.2 var(--font-body); color: var(--accent-ink); margin: 2px 0; text-shadow: none; }
.v-hosts { margin-top: 10px; font-size: 18px; color: var(--ink-soft); }
.v-hosts span { font: 500 11px/1.4 var(--label); letter-spacing: .22em; text-transform: uppercase; color: var(--accent-ink); margin-right: .4em; }
.hero .v-date { margin-top: auto; padding-top: 18px; font-size: 21px; line-height: 1.32; }
.hero .v-date b { display: block; font: 500 11.5px/1.5 var(--label); letter-spacing: .26em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 9px; }
.v-date__time { font-variant-numeric: lining-nums; }
.hero .v-place { font-size: 20px; margin-top: 14px; padding-top: 14px; 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 color-mix(in srgb, var(--paper) 55%, #fff); }

/* Countdown */
.c-countdown .card, .c-countdown .cd { flex: 1; }
.cd { display: flex; flex-direction: column; justify-content: center; text-align: 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(--display); font-variant-numeric: lining-nums tabular-nums; }
.cd .v-small { font-size: 20px; }

/* Venue */
.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: grayscale(.2) contrast(1.02); mix-blend-mode: multiply; }
.venue__copy { display: flex; flex-direction: column; }
.venue__copy .v-h { margin: 16px 0 4px; font-size: 20px; }
.v-venue__name { font: 400 40px/1.08 var(--display); margin: 14px 0 4px; }
.v-venue__loc { font-size: 20px; font-style: italic; color: var(--accent-ink); margin-bottom: 12px; }
.v-venue__addr { font-size: 18.5px; line-height: 1.34; }
.venue__copy .v-link { margin-top: auto; }
.venue__copy .v-h { font: 500 11.5px/1.4 var(--label); letter-spacing: .26em; text-transform: uppercase; color: var(--accent-ink); text-shadow: none; margin: 0; }

/* Sections */
.sect { flex: 1; display: flex; flex-direction: column; }
.sect > .v-h { margin-bottom: 22px; }
.v-dl { display: grid; gap: 14px; flex: 1; align-content: space-between; }
.v-dl dt { 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 19px/1.28 var(--font-body); margin-bottom: 4px; }
.v-faq dd { font-size: 17.5px; line-height: 1.38; color: var(--ink-soft); }
.v-faq div + div { padding-top: 18px; border-top: 1px solid var(--line); }
.v-extra__img { width: 100%; max-height: 220px; object-fit: cover; margin-bottom: 14px; }
.v-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.v-gallery figure { aspect-ratio: 4 / 3; overflow: hidden; }
.v-gallery img { width: 100%; height: 100%; object-fit: cover; }

/* An hour of the day */
.hour { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hour__t { font: 400 66px/1 var(--display); font-variant-numeric: lining-nums; color: var(--accent-ink); letter-spacing: .01em; text-shadow: 0 1px 0 color-mix(in srgb, var(--paper) 55%, #fff); }
.hour .rule { width: 46px; margin: 16px auto 14px; }
.hour .head { margin-bottom: 4px; }
.hour__p { margin-top: 12px; font-size: 19px; line-height: 1.38; max-width: 22em; color: var(--ink-soft); }

/* Reply */
.reply-wrap { flex: 1; min-width: 0; }
.c-rsvp .v-h { text-align: center; margin-bottom: 12px; }
.c-rsvp .v-intro { text-align: center; }
.c-rsvp .card { --vf-bg: transparent; }

/* Gift */
.gift { flex: 1; display: flex; flex-direction: column; text-align: center; align-items: center; }
.gift .v-h { font-size: 36px; margin: 6px 0 16px; }
.gift .v-prose { font-size: 18.5px; line-height: 1.4; justify-items: center; }
.v-iban { margin: 20px 0 6px; font: 500 13px/1.5 var(--label); letter-spacing: .1em; overflow-wrap: anywhere; }
.v-copy { min-height: 44px; padding: 0 2px; background: none; border: 0; cursor: pointer; font: 500 11px/1.4 var(--label); letter-spacing: .26em; text-transform: uppercase; color: inherit; }
.v-copy span { border-bottom: 1px solid currentColor; padding-bottom: 3px; }
.gift .sign { margin-top: auto; padding-top: 12px; font: 400 25px/1.9 var(--font-script); transform: rotate(-3deg); overflow-wrap: anywhere; }

@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__olive { width: 168px; height: 88px; margin-bottom: 10px; }
  .v-names { font-size: 60px; margin-top: 12px; }
  .v-names em { font-size: 28px; }
  .hero .v-date { font-size: 19px; }
  .hero .v-place { font-size: 18.5px; }
  .c-countdown, .c-timeline, .c-story, .c-menu, .c-transport, .c-faq, .c-extra, .c-dress, .c-gift, .c-hour, .c-gallery { --w: 350px; --pad: 28px; --mh: 0px; }
  .hour__t { font-size: 54px; }
  .hour .rule { margin: 12px auto 10px; }
  .hour__p, .v-dl dd { font-size: 17.5px; }
  .hourmark { left: 50%; transform: translateX(-50%); padding: 6px 12px 6px 8px; font-size: 9.5px; }
  .c-venue { --w: 350px; --pad: 26px; --mh: 0px; }
  .c-rsvp { --w: 350px; --pad: 24px; --mh: 0px; }
  .head, .v-h { font-size: 34px; }
  .sect > .v-h { margin-bottom: 16px; }
  .v-count__n { font-size: 54px; }
  .v-faq { gap: 14px; }
  .v-faq div + div { padding-top: 14px; }
  .v-faq dd { font-size: 16.5px; }
  .v-prose { font-size: 17.5px; }
  .venue { grid-template-columns: 1fr; gap: 16px; grid-template-rows: 200px auto; }
  .v-venue__name { font-size: 34px; }
  .gift .v-h { font-size: 32px; }
  .gift .v-prose { font-size: 17px; }
  .v-iban { font-size: 12px; letter-spacing: .04em; }
  .gift .sign { font-size: 21px; }
}
@media (max-width: 380px) { .c-hero { --w: 300px; --pad: 20px; } .v-names { font-size: 48px; } .c-countdown, .c-timeline, .c-story, .c-menu, .c-transport, .c-faq, .c-extra, .c-dress, .c-gift, .c-hour, .c-gallery, .c-venue { --w: 296px; --pad: 22px; } .c-rsvp { --w: 296px; --pad: 18px; } .hour__t { font-size: 46px; } }
@media (max-width: 380px) { .vora-badge { bottom: auto; top: max(14px, env(safe-area-inset-top)); } }
