@font-face {
  font-family: Caveat;
  src: url("assets/figma/caveat.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper-surround: #f6eae4;
  --card-height: 100vh;
  --card-height: 100svh;
  --card-width: min(100vw, calc(var(--card-height) * 5 / 9));
  --olive: #848451;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-width: 0; height: 100%; }
body { background: var(--paper-surround); }
button, a, input { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
img { display: block; }
:focus-visible { outline: 2px solid #705039; outline-offset: 3px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.invitation-deck {
  height: var(--card-height);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
.invitation-deck::-webkit-scrollbar { display: none; }
.invitation-screen {
  position: relative;
  min-height: var(--card-height);
  isolation: isolate;
}
.invitation-snap {
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  pointer-events: none;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.invitation-stage {
  display: grid;
  place-items: center;
  height: var(--card-height);
  background: var(--screen-paper, var(--paper-surround));
}
.invitation-screen:focus { outline: none; }
.figma-card {
  position: relative;
  width: var(--card-width);
  aspect-ratio: 5 / 9;
  overflow: clip;
  isolation: isolate;
  container-type: inline-size;
  background: var(--screen-paper, var(--paper-surround));
}
.figma-card p, .figma-card h1, .figma-card h2, .figma-card figure { margin: 0; }
.figma-layer { position: absolute; transform-origin: 0 0; }
.figma-layer img, .figma-layer svg { width: 100%; height: 100%; display: block; }
.figma-text { white-space: pre-wrap; overflow-wrap: normal; }
.figma-art { pointer-events: none; user-select: none; }
.figma-hit {
  position: absolute;
  display: block;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  z-index: 2;
}
.figma-hit:focus-visible { outline-color: #4e4426; outline-offset: 1px; }
.figma-control {
  position: absolute;
  z-index: 2;
  margin: 0;
  border: 0;
  border-radius: .6cqw;
  color: #414141;
  padding: .5cqw 2cqw;
  font: 400 5.2cqw/1.05 Caveat, cursive;
  background: transparent;
}
.figma-control::placeholder { color: #695749; opacity: .8; }
.choice { position: absolute; z-index: 2; display: grid; place-items: center; cursor: pointer; }
.choice input { appearance: none; width: 100%; height: 100%; display: block; cursor: pointer; margin: 0; }
.choice input:checked { border: 2px solid #b68092; border-radius: inherit; }
.choice--drink input:checked::before {
  content: "✓";
  display: grid;
  place-items: center;
  color: #594d2b;
  font: bold 4.5cqw/1 system-ui, sans-serif;
}
.choice--attendance { border-radius: 50%; }
.choice--attendance:has(input:checked) { background: #fff5db3b; box-shadow: inset 0 0 0 .7cqw #e8adae; }
.choice--attendance input:checked { border: 0; }
.rsvp-fields { margin: 0; padding: 0; border: 0; }
.form-status {
  position: absolute;
  z-index: 3;
  left: 8cqw;
  right: 8cqw;
  bottom: 14cqw;
  padding: 1.4cqw 3cqw;
  background: #fff6eb;
  color: #514b34;
  text-align: center;
  font: 500 max(13px, 3.6cqw)/1.15 system-ui, sans-serif;
  border-radius: 1cqw;
  box-shadow: 0 2px 14px #382c2554;
  pointer-events: none;
}
.form-status:empty { opacity: 0; }
.form-status[data-state="error"] { color: #843946; }
.countdown-value { font-variant-numeric: tabular-nums; }
@media (min-width: 700px) {
  .figma-card { box-shadow: 0 0 50px #72574c25; }
}
@media (prefers-reduced-motion: reduce) {
  .invitation-deck { scroll-behavior: auto; }
}
/* Effects recorded on the corresponding Figma layers. */
[data-node-id="18:674"] { filter: drop-shadow(0 .4cqw .4cqw #0004); }
[data-node-id="18:677"] { filter: blur(11.1cqw); }
[data-node-id="36:1237"] { filter: blur(6.8cqw); }
[data-node-id="36:1289"] { filter: blur(16.2cqw); }
[data-node-id="10:381"] img { filter: brightness(.8586); }

.calendar-filters { position: absolute; }
.swipe-hint {
  position: absolute;
  z-index: 2;
  left: 4cqw;
  bottom: 1.8cqw;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 44px;
  padding-inline: .15rem .4rem;
  color: #535333;
  text-decoration: none;
  font: 700 clamp(1rem, 4.9cqw, 1.45rem)/1 Caveat, cursive;
}
.swipe-hint__arrow { width: clamp(17px, 5cqw, 23px); height: auto; }
.swipe-hint__pointer { display: none; }
.swipe-hint:hover span { text-decoration: underline; text-underline-offset: .14em; }
@media (hover: hover) and (pointer: fine) {
  .swipe-hint__touch { display: none; }
  .swipe-hint__pointer { display: inline; }
  .swipe-hint__arrow { rotate: 180deg; }
}

@media (prefers-reduced-motion: no-preference) {
  /* Let each stage stick for one more screen without moving the next snap point. */
  .invitation-screen:not(:last-child) {
    min-height: calc(2 * var(--card-height));
    margin-block-end: calc(-1 * var(--card-height));
  }
  .invitation-stage {
    position: sticky;
    top: 0;
  }
}
