@font-face {
  font-family: "Bettrisia";
  src: url("fonts/Bettrisia Script Alt Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Janna";
  src: url("fonts/janna-2-thin.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ece2d9;
  --ink: #3f2d1f;
  --ink-2: #5a4433;
  --ink-3: #6f5a45;
  --gold: #7d6134;
  --gold-soft: #8f7043;

  --gutter: clamp(1.5rem, 6vw, 2.5rem);
  --measure: 33rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background-color: var(--paper);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background-color: var(--paper);
  color: var(--ink);
  font-family: "Janna", "Segoe UI", system-ui, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url("background/background02.png");
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: cover;
}

.invitation {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-inline: var(--gutter);
  padding-block: 24svh 26svh;
}

.sheet {
  max-width: var(--measure);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.orn {
  color: var(--gold);
}

.orn svg {
  display: block;
  width: clamp(3.4rem, 17vw, 4.6rem);
  height: auto;
}

.orn--crown {
  margin-bottom: 12svh;
}

.orn--foot {
  margin-top: 16svh;
}

.orn--foot svg {
  transform: scaleY(-1);
}

.names {
  margin: 0;
  font-family: "Bettrisia", "Snell Roundhand", cursive;
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.names__line {
  display: block;
  font-size: clamp(3.4rem, 17vw, 6rem);
  line-height: 1.04;
  white-space: nowrap;
  letter-spacing: 0.005em;
}

.names__amp {
  display: block;
  font-size: clamp(1.5rem, 7.4vw, 2.6rem);
  line-height: 1.1;
  color: var(--gold);
  margin-block: 0.16em 0.1em;
}

.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.7rem, 3vw, 1.1rem);
  width: min(100%, 17rem);
  color: var(--gold-soft);
}

.rule__line {
  flex: 1 1 auto;
  height: 1px;
  background-color: currentColor;
  opacity: 0.8;
}

.rule__mark {
  flex: 0 0 auto;
  width: 0.42rem;
  height: 0.42rem;
  background-color: currentColor;
  transform: rotate(45deg);
}

.rule--broad {
  margin-top: 7svh;
}

.rule--fine {
  width: min(100%, 11rem);
  margin-top: 11svh;
  opacity: 0.9;
}

.date {
  margin: 4.5svh 0 0;
  font-family: "Bettrisia", "Snell Roundhand", cursive;
  font-size: clamp(1.05rem, 4.6vw, 1.6rem);
  line-height: 1.5;
  color: var(--ink-2);
  letter-spacing: 0.1em;
}

.venue {
  margin: 8svh 0 0;
  max-width: 22rem;
  font-size: clamp(1.1rem, 5.1vw, 1.85rem);
  line-height: 1.85;
  color: var(--ink);
  text-wrap: balance;
}

.notes {
  margin-top: 46svh;
  display: flex;
  flex-direction: column;
  gap: 0.85em;
  color: var(--ink-3);
}

.notes__line {
  margin: 0;
  font-size: clamp(0.92rem, 3.9vw, 1.12rem);
  line-height: 2.05;
  letter-spacing: 0.02em;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(1.15rem);
  filter: blur(3px);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  filter: none;
  transition:
    opacity 1.15s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 1.15s cubic-bezier(0.22, 0.61, 0.36, 1),
    filter 0.85s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 48rem) {
  .invitation {
    padding-block: 28svh 30svh;
  }

  .names__line {
    font-size: 5.4rem;
  }

  .names__amp {
    font-size: 2.3rem;
  }

  .orn--crown {
    margin-bottom: 14svh;
  }

  .orn--foot {
    margin-top: 18svh;
  }

  .rule--broad {
    margin-top: 8svh;
  }

  .rule--fine {
    margin-top: 12svh;
  }

  .date {
    margin-top: 5svh;
  }

  .venue {
    margin-top: 9svh;
  }

  .notes {
    margin-top: 50svh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    transform: none;
    filter: none;
  }

  .js [data-reveal].is-in {
    transition: opacity 0.4s linear;
  }

  .orn--foot svg {
    transform: none;
  }
}
