:root {
  /* defaults (sage-paper); the document theme overrides --paper --ink --accent --accent2 and the fonts */
  --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;
  --fg: var(--ink); --tone: var(--accent-ink); --needle: var(--accent); --hair: color-mix(in srgb, var(--fg) 26%, transparent);
  --bg: #f4f0dd;
}
html.is-dark { --fg: var(--paper); --tone: color-mix(in srgb, var(--accent) 45%, var(--paper)); --needle: color-mix(in srgb, var(--accent) 55%, var(--paper)); }
html.paper-dark { --fg: var(--ink); --tone: var(--accent-ink); --needle: var(--accent); }
html { background: var(--bg); overflow-x: clip; }
body { color: var(--fg); 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; }

.stage { position: fixed; inset: 0; height: 100vh; height: 100lvh; overflow: hidden; background-color: var(--bg); color: var(--fg); transition: color .4s ease; }
.grain { position: absolute; inset: 0; background: url(/assets/fine-cotton.webp) center / 1100px; mix-blend-mode: multiply; opacity: .7; pointer-events: none; }
html.is-dark .grain, html.paper-dark .grain { opacity: .22; mix-blend-mode: screen; filter: invert(1); }
.sky { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--fg); opacity: 0; pointer-events: none; }
.frame { position: absolute; inset: 10px; border: 1px solid var(--hair); pointer-events: none; transition: border-color .4s; }
.frame::after { content: ''; position: absolute; inset: 4px; border: .5px solid var(--hair); }

/* ---- the dial ---- */
.dial { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; pointer-events: none; }
.vig { position: absolute; left: 50%; top: 50%; width: 63.2%; aspect-ratio: 1; transform: translate(-50%, -50%); }
.vig img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; max-width: none;
  -webkit-mask: radial-gradient(circle closest-side, #000 84%, transparent 99%); mask: radial-gradient(circle closest-side, #000 84%, transparent 99%);
  transition: filter .8s ease; will-change: opacity, transform; }
.vig img[data-key="moon"] { inset: 14%; width: 72%; height: 72%; }
html.is-dark .vig img, html.paper-dark .vig img { filter: invert(.88) sepia(.18) brightness(1.04); }
.face { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; color: var(--fg); transition: color .4s; }
.face .ink circle, .face .ink line { fill: none; stroke: currentColor; }
.face .ticks { opacity: .9; }
.face .dots { fill: currentColor; opacity: .5; }
.face .orbit { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-dasharray: .1 11; stroke-linecap: round; opacity: .55; }
.face .num { fill: currentColor; font: 400 25px var(--font-display); text-anchor: middle; dominant-baseline: central; letter-spacing: .04em; }
.face .num--big { font-size: 34px; }
.face .fleur { fill: var(--needle); }
.orb { transition: filter .8s; }
html.is-dark .orb, html.paper-dark .orb { filter: invert(.88) sepia(.2) brightness(1.08); }
.hand__halo { stroke: var(--bg); stroke-width: 9; opacity: .5; stroke-linecap: round; }
.hand__line { stroke: var(--needle); stroke-width: 2.6; stroke-linecap: round; }
.hand__lozenge { fill: var(--needle); stroke: var(--bg); stroke-width: 2; paint-order: stroke; }
.hand__tail { fill: none; stroke: var(--needle); stroke-width: 2.4; }
.hand__boss { fill: var(--needle); stroke: var(--bg); stroke-width: 3; paint-order: stroke; }
.hand__pin { fill: var(--bg); }

.readout { position: absolute; left: 0; top: 0; white-space: nowrap; font: 500 10.5px/1 var(--font-body); letter-spacing: .32em; text-transform: uppercase; font-variant-numeric: tabular-nums lining-nums; pointer-events: none; }
.readout b { font-weight: 500; color: var(--tone); }
.readout b:not(:empty)::after { content: ' · '; color: var(--fg); opacity: .6; }

/* ---- the words ---- */
.copy { position: absolute; inset: 0; pointer-events: none; }
.panel { position: absolute; overflow: hidden auto; text-align: center; visibility: hidden; opacity: 0; scrollbar-width: none; overscroll-behavior: contain; }
.panel::-webkit-scrollbar { display: none; }
.panel.is-live { pointer-events: auto; }
.is-wide .panel { text-align: left; }

.lab, .v-kicker { font: 500 10.5px/1.4 var(--font-body); letter-spacing: .3em; text-transform: uppercase; color: var(--tone); transition: color .4s; }
.rule { display: block; width: 56px; height: 1px; margin: 18px auto; background: currentColor; opacity: .3; }
.is-wide .rule { margin-left: 0; }
.v-h { font: 400 40px/1.06 var(--font-display); padding-block: .04em; margin-bottom: 12px; }
.v-prose p, .v-small { font-size: 18.5px; line-height: 1.4; }
.v-prose p + p { margin-top: 8px; }

/* cover */
.v-guest { font: italic 400 19px/1.3 var(--font-body); color: var(--tone); margin-bottom: 6px; }
.v-names { margin: 12px 0 14px; font: 400 54px/1.02 var(--font-display); overflow-wrap: anywhere; }
.v-names em { font: italic 400 .62em/1 var(--font-body); color: var(--tone); padding: 0 .12em; }
.is-wide .v-names { font-size: clamp(64px, 6.4vw, 96px); }
.is-wide .v-names em { display: block; margin: 4px 0 2px; font-size: .42em; padding: 0; }
.v-hosts { font-size: 18px; margin-bottom: 6px; } .v-hosts span { font-style: italic; color: var(--tone); }
.v-date { font-size: 21px; line-height: 1.3; }
.v-date b { display: block; margin-bottom: 6px; font: 500 10.5px/1.5 var(--font-body); letter-spacing: .3em; text-transform: uppercase; color: var(--tone); }
.v-date__time { display: block; font-style: italic; color: var(--tone); }
.v-place { position: relative; margin-top: 16px; padding-top: 16px; font-size: 19px; font-style: italic; }
.v-place::before { content: ''; position: absolute; left: 50%; top: 0; width: 56px; height: 1px; margin-left: -28px; background: currentColor; opacity: .3; }
.is-wide .v-place::before { left: 0; margin-left: 0; }

/* countdown */
.v-count { display: grid; grid-template-columns: repeat(4, 1fr); margin: 16px 0 14px; max-width: 420px; margin-inline: auto; }
.is-wide .v-count { margin-inline: 0; }
.v-count__cell + .v-count__cell { border-left: 1px solid var(--hair); }
.v-count__n { display: block; font: 400 44px/1.05 var(--font-display); font-variant-numeric: lining-nums tabular-nums; }
.v-count__l { display: block; font: 500 9px/1.4 var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--tone); }

/* a moment of the day */
.roman { font: 400 15px/1 var(--font-display); letter-spacing: .42em; color: var(--tone); padding-left: .42em; }
.is-wide .roman { padding-left: 0; }
.when { margin: 8px 0 0; font-weight: 400; }
.when time { display: block; font: 400 68px/1 var(--font-display); font-variant-numeric: lining-nums; letter-spacing: .01em; }
.when span { display: block; margin-top: 4px; font: italic 400 30px/1.15 var(--font-body); overflow-wrap: anywhere; }
.is-wide .when time { font-size: clamp(80px, 7.4vw, 112px); }
.is-wide .when span { font-size: 36px; }
.body { margin-top: 18px; }
.body p { font-size: 19px; line-height: 1.4; max-width: 30em; margin-inline: auto; }
.is-wide .body p { margin-inline: 0; }
.prog { display: flex; justify-content: center; gap: 0; margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--hair); font: 500 10px/1 var(--font-body); letter-spacing: .14em; font-variant-numeric: tabular-nums lining-nums; }
.is-wide .prog { justify-content: flex-start; max-width: 380px; }
.prog li { flex: 1; text-align: center; opacity: .6; padding-top: 2px; position: relative; }
.is-wide .prog li { flex: none; padding-right: 22px; text-align: left; }
.prog li.is-on { opacity: 1; color: var(--tone); }
.prog li.is-on::before { content: ''; position: absolute; left: 50%; top: -18px; width: 7px; height: 7px; margin-left: -3.5px; background: var(--needle); transform: rotate(45deg); }
.is-wide .prog li.is-on::before { left: 0; margin-left: 12px; }

/* generic blocks */
.v-dl { display: grid; gap: 12px; }
.v-dl dt { font: 500 10px/1.4 var(--font-body); letter-spacing: .26em; text-transform: uppercase; color: var(--tone); margin-bottom: 2px; }
.v-dl dd { margin: 0; font-size: 19px; line-height: 1.28; }
.v-venue__name { font: 400 38px/1.08 var(--font-display); margin: 4px 0; }
.v-venue__loc { font-size: 21px; font-style: italic; color: var(--tone); }
.v-venue__addr { margin-top: 6px; font-size: 18px; }
.v-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; font: 500 10.5px/1.4 var(--font-body); letter-spacing: .26em; text-transform: uppercase; color: var(--fg); text-decoration: none; }
.v-link::after { content: ''; display: block; width: 26px; height: 1px; margin-left: 10px; background: var(--needle); }
.v-timeline li + li { margin-top: 8px; } .v-timeline time { font: 400 24px/1 var(--font-display); color: var(--tone); margin-right: 10px; }
.v-faq { display: grid; gap: 14px; text-align: left; }
.v-faq dt { font: 500 18px/1.28 var(--font-body); margin-bottom: 3px; }
.v-faq dd { margin: 0; font-size: 17px; line-height: 1.38; }
.v-iban { margin: 18px 0 2px; font: 500 12.5px/1.5 var(--font-body); letter-spacing: .1em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.v-copy { pointer-events: auto; 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(--fg); }
.v-copy span { border-bottom: 1px solid var(--needle); padding-bottom: 3px; }
.v-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; } .v-gallery img { width: 100%; height: 110px; object-fit: cover; }
.v-extra__img { width: 100%; max-height: 150px; object-fit: cover; margin-bottom: 10px; }
.p-rsvp { text-align: left; }
.p-rsvp .v-h { text-align: center; }
.is-wide .p-rsvp .v-h { text-align: left; }
.v-rsvp { --vf-ink: var(--fg); --vf-bg: var(--bg); --vf-accent: var(--needle); }

/* phones */
@media (max-width: 699px), (orientation: portrait) {
  body { font-size: 17px; }
  .v-h { font-size: 33px; }
  .when time { font-size: 58px; }
  .when span { font-size: 27px; }
  .body { margin-top: 12px; }
  .body p { font-size: 18px; }
  .v-dl { gap: 9px; } .v-dl dd { font-size: 17.5px; }
  .prog { margin-top: 18px; }
  .v-venue__name { font-size: 32px; }
  .v-iban { font-size: 11.5px; letter-spacing: .05em; }
  .v-faq dd { font-size: 16.5px; }
}
@media (max-height: 700px) and (orientation: portrait) {
  .v-names { font-size: 44px; }
  .when time { font-size: 48px; }
  .when span { font-size: 24px; }
}

/* phones held sideways */
@media (max-height: 540px) and (orientation: landscape) {
  body { font-size: 16px; }
  .lab, .v-kicker { font-size: 9.5px; }
  .v-h { font-size: 28px; margin-bottom: 8px; }
  .is-wide .v-names { font-size: 46px; margin: 6px 0 8px; }
  .is-wide .v-names em { display: inline; font-size: .62em; }
  .v-date { font-size: 18px; }
  .rule { margin-block: 10px; }
  .v-place { font-size: 17px; margin-top: 10px; padding-top: 10px; }
  .is-wide .when time { font-size: 50px; }
  .is-wide .when span { font-size: 24px; }
  .body { margin-top: 8px; }
  .body p, .v-dl dd, .v-prose p, .v-venue__addr { font-size: 16px; }
  .v-venue__loc { font-size: 18px; } .v-venue__name { font-size: 28px; }
  .v-dl { gap: 6px; }
  .prog { margin-top: 14px; padding-top: 10px; }
  .v-faq { gap: 8px; } .v-faq dt { font-size: 16px; } .v-faq dd { font-size: 15px; }
}

/* tablets upright */
@media (min-width: 600px) and (orientation: portrait) {
  body { font-size: 19px; }
  .lab, .v-kicker { font-size: 11.5px; }
  .v-names { font-size: 82px; margin: 16px 0 18px; }
  .v-date { font-size: 24px; }
  .v-place { font-size: 22px; }
  .when time { font-size: 84px; }
  .when span { font-size: 36px; }
  .body p, .v-dl dd { font-size: 21px; }
  .v-h { font-size: 44px; }
}
@media (min-width: 1100px) and (min-height: 700px) {
  .is-wide .body p, .is-wide .v-dl dd { font-size: 21px; }
  .is-wide .v-date { font-size: 23px; }
  .is-wide .v-place { font-size: 21px; }
  .is-wide .prog { font-size: 11px; }
  .is-wide .v-venue__addr, .is-wide .v-prose p { font-size: 19.5px; }
  .is-wide .v-faq dd { font-size: 18px; }
}
@media (max-height: 620px) and (orientation: portrait) {
  .v-names { font-size: 36px; margin: 6px 0 8px; }
  .v-date { font-size: 18px; }
  .v-date b { margin-bottom: 2px; }
  .v-place { font-size: 16px; margin-top: 8px; padding-top: 8px; }
  .when time { font-size: 42px; }
  .when span { font-size: 22px; }
  .body { margin-top: 6px; }
  .body p, .v-dl dd, .v-prose p { font-size: 15.5px; }
  .prog { margin-top: 10px; }
  .v-h { font-size: 28px; }
  .v-count__n { font-size: 34px; }
}
