:root {
  --page-bg: #fff;
  --ink: #9fbf9c;
  --ink-soft: rgba(159, 191, 156, 0.92);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  scroll-snap-type: y mandatory;
}

body {
  position: relative;
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url("../img/background.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  pointer-events: none;
}

@media (max-width: 768px) {
  body::before {
    background-image: url("../img/background-mobile.jpeg");
  }
}

.invitation {
  position: relative;
  z-index: 1;
}

.copy-panel {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(32px, 6vw, 96px);
  scroll-snap-align: start;
  container-type: inline-size;
}

.invitation-copy {
  width: min(76vw, 860px);
  text-align: center;
  color: var(--ink);
}

.save-title,
.couple-names,
.panel-title,
.panel-line {
  margin: 0;
  font-weight: 400;
}

.save-title {
  margin-bottom: clamp(18px, 5.8cqw, 66px);
  font-family: "Satisfy", "Brush Script MT", cursive;
  font-size: clamp(62px, 9.4cqw, 136px);
  line-height: 0.95;
  color: var(--ink);
}

.couple-names {
  font-family: "Caveat Brush", "Caveat", "Bradley Hand", cursive;
  font-size: clamp(43px, 7.1cqw, 102px);
  line-height: 1;
  color: var(--ink-soft);
}

.panel-title {
  font-family: "Caveat Brush", "Caveat", "Bradley Hand", cursive;
  font-size: clamp(48px, 6.3cqw, 92px);
  line-height: 0.95;
  color: var(--ink);
}

.panel-line {
  margin-top: clamp(16px, 3cqw, 42px);
  font-family: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  font-size: clamp(38px, 4.6cqw, 66px);
  font-weight: 600;
  line-height: 1;
  color: var(--ink-soft);
}

.js .invitation-copy {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 900ms ease,
    transform 900ms ease;
}

.js .copy-panel.is-active .invitation-copy {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-snap-type: none;
  }

  .js .invitation-copy {
    transition: none;
  }
}
