html,
body {
  overflow: hidden;
  position: relative;
  margin: 0;
  background-color: rgb(250, 228, 216);

  overscroll-behavior-y: none;
}

* {
  box-sizing: border-box;
}

.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  background-color: #fae4d8;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99;
  transition: opacity 1s ease-in-out;
}

.preloader-content {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preloader-content img {
  width: 30vw;
  animation: preloaderPulse 2s infinite ease-in-out;
}

@keyframes preloaderPulse {

  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.98);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.preloader.hidden {
  opacity: 0;
  pointer-events: none;
}

.main-title,
.message-container,
.save-the-date,
.scroll-button-container,
#heading-wrapper,
.scratch-objects {
  opacity: 0;
}

.playfair-regular {
  font-family: "Playfair", serif;
  font-optical-sizing: auto;
  font-weight: 100;
  font-style: normal;
  font-variation-settings: "wdth" 100;
}

.pattaya-regular {
  font-family: "Pattaya", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.rouge-script {
  font-family: "Rouge Script", cursive;
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Aroma Beauty";
  src: url("../assets/fonts/AromaBeauty-Regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Love Light";
  src: url("../assets/fonts/love\ light.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

#curtain-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;

  touch-action: none;
  overscroll-behavior: none;
}

#curtain-canvas {
  display: flex;
  position: absolute;
  object-fit: cover;
  width: 100%;
  height: 100dvh;
  transform: scale(1.1);

  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  touch-action: none;
}

.button-container {
  position: absolute;
  width: 100%;
  height: 100dvh;
  z-index: 10;

  display: flex;
  justify-content: center;
  align-items: center;
}

#open-button {
  opacity: 0;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  outline: none;

  background: rgba(85, 45, 23, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(5px);

  color: rgba(255, 255, 255, 0.95);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 4px;
  line-height: 1.4;
  transition: none;
  will-change: opacity;
  animation: pulse 3.5s ease-in-out infinite;
}

#open-button:hover {
  cursor: pointer;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    background: rgba(85, 45, 23, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
  }

  50% {
    transform: scale(1.05);
    background: rgba(85, 45, 23, 0.5);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
  }
}

.main-container {
  height: 100dvh;
  width: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  color: #552d17;
  overscroll-behavior-y: none;
}

.parallax-container {
  top: 0;
  height: 100dvh;
  width: 100%;
  z-index: 1;
  position: sticky;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;

  background-color: rgb(250, 228, 216);
}

.content-container {
  height: 100dvh;
  width: 100%;
  position: relative;
  display: block;
  background-color: rgb(250, 228, 216);
  box-shadow:
    0 -20px 40px rgba(0, 0, 0, 0.1),
    0 100px 0 0 rgb(250, 228, 216);

  z-index: 5;
  padding: 0;
}

.parallax-container::before,
.content-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  background-image: url("https://www.transparenttextures.com/patterns/paper-fibers.png");
  background-repeat: repeat;
  opacity: 1;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1;
}

.petal-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
}

#petal-canvas-back {
  z-index: 2;
  filter: blur(2px);
  opacity: 0.6;
}

#petal-canvas-front {
  z-index: 4;
}

.animation-container {
  margin-top: 20vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
}

.main-title {
  position: relative;
  display: flex;
  font-weight: 500;
  font-style: italic;
  letter-spacing: -3px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  font-size: 4rem;
  margin: 0;
}

.side {
  display: flex;
  align-items: center;
  overflow: visible;
  line-height: 0.8;
}

.side.top {
  padding-bottom: 25px;
  padding-right: 10px;
  z-index: 41;
}

.side.bottom {
  padding-top: 25px;
}

.anchor {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3rem;
  text-align: center;
  line-height: 0.5;
}

.message-container {
  width: 100%;
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  top: 190px;
  text-align: center;
  opacity: 0;
  margin-bottom: 85px;
}

.message {
  font-size: 1.2rem;
  font-weight: 500;
  white-space: nowrap;
  display: block;
}

.message-char {
  display: inline-block;
  opacity: 0;
  will-change: transform, opacity;
}

.message-char {
  display: inline-block;
  opacity: 0;
  will-change: transform, font-weight, opacity;
}

.scroll-button-container {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  bottom: 20px;
  z-index: 20;

  width: 50px;
  height: 50px;
  padding: 10px;
  border-radius: 50%;

  display: flex;
  justify-content: center;
  align-items: center;

  pointer-events: auto;

  background: rgba(0, 0, 0, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);

  animation: bounce 2s infinite ease-in-out;
}

#scroll-icon {
  display: flex;
  flex-direction: column;
  align-items: center;

  border: 0;
  background: none;
  cursor: pointer;

  color: white;
  letter-spacing: 1px;
  font-size: 0.9rem;
  opacity: 0.8;
  transition: opacity 0.3s ease;
  text-align: center;
}

#scroll-icon svg {
  color: white;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(6px);
  }
}

#flower-image {
  position: absolute;
  bottom: 0;
  width: 100%;
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
}

#scratch-heading {
  width: 100%;
  font-size: 1rem;
  display: flex;
  font-weight: 500;
  justify-content: center;
  align-items: center;
  transition: opacity 1s ease-in-out;
}

#scratch-heading.fadeOut {
  opacity: 0;
}

.etched {
  font-weight: 400;
  font-style: italic;
  font-size: 2rem;
  background-color: #e1b53d;
  -webkit-background-clip: text;
  -moz-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: rgba(245, 245, 245, 0.3) 1px 1px 1px;
}

.content {
  max-width: 750px;
  height: 100dvh;
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
  padding-top: 0;
  /*original was 80px*/
  z-index: 2;
  overflow: visible !important;
}

.sub-title {
  width: 100%;
}

.save-the-date {
  font-family: "Love Light", serif;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  font-size: 2.2rem;
  opacity: 0;
  margin-top: -90px;
}

.right,
.left {
  display: flex;
}

.fill-text {
  position: relative;
  display: inline-block;
  color: rgb(0, 0, 0, 0);
  line-height: 1;
  --reveal-1: -150%;
  --reveal-2: -150%;

  padding-left: 20px;
  padding-right: 20px;
  margin-left: -20px;
  margin-right: -20px;

  overflow: visible !important;
}

.fill-text::before,
.fill-text::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  padding: inherit;
  white-space: nowrap;
}

.fill-text::before {
  color: #d4af37;
  z-index: 1;
  clip-path: polygon(-150% -100%,
      var(--reveal-1) -100%,
      var(--reveal-1) 200%,
      -150% 200%);
}

.fill-text::after {
  color: #552d17;
  z-index: 2;
  clip-path: polygon(-150% -100%,
      var(--reveal-2) -100%,
      var(--reveal-2) 200%,
      -150% 200%);
}

#map-canvas {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  margin-top: 0;
  z-index: -1;
  opacity: 0;
}

#heading-wrapper {
  opacity: 0;
  width: 100%;
  will-change: transform;
}

.scratch-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.scratch-unscrollable {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 20px 0;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.scratch-objects {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 28vw;
  gap: 3vw;
  justify-content: center;
  width: 100%;
  position: relative;
  margin-bottom: 5px;
}

.scratch-card {
  position: relative;
  border: 3px solid #e1b53d;
  border-radius: 50%;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.scratch-card-text {
  position: relative;
  font-family: "Aroma Beauty", "serif";
  padding-top: 4px;
  font-size: 1.7rem;
  font-weight: 800;
  filter: drop-shadow(0 4px 4px rgb(0 0 0 / 0.16));
  user-select: none;
  will-change: transform;
}

.scratch-card-text.animate {
  animation: pop-out-in cubic-bezier(0.65, 1.35, 0.5, 1) 1s;
}

.scratch-card-text.scratch-day {
  display: flex;
  align-items: center;
  gap: 5px;
}

.scratch-card-text-small {
  font-size: 1rem;
}

.scratch-card-cover-container {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  border-radius: 50%;
  width: 100%;
  height: 100%;
  overflow: hidden;

  filter: url("#remove-black");
  -webkit-filter: url("#remove-black");

  transition: opacity 0.4s;
  will-change: filter, transform;
}

.scratch-card-cover-container.clear {
  opacity: 0;
}

.scratch-card-canvas {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  opacity: 1;
}

.scratch-card-canvas.hidden {
  opacity: 0;
}

.scratch-card-canvas:active {
  cursor: grabbing;
}

.scratch-card-canvas-render {
  position: absolute;
  z-index: 15;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.scratch-card-canvas-render.hidden {
  display: none;
}

.scratch-card-cover {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #e1b53d;
  background-image: linear-gradient(to bottom right,
      #e1b53d,
      #f7da57,
      #feed93,
      #f7da57,
      #e1b53d);
}

.scratch-card-cover.shine::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(135deg,
      transparent 40%,
      rgb(255 255 255 / 0.8) 50%,
      transparent 60%);
  background-position: bottom right;
  background-size: 300% 300%;
  background-repeat: no-repeat;
}

.scratch-card-cover::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.1;
  filter: url("#noise");
  pointer-events: none;
}

.scratch-card-cover.shine.active-shine::before {
  animation: shine 6s infinite;
}

.etched {
  font-weight: 400;
  font-style: italic;
  font-size: 2rem;
  /* background-color: #e1b53d; */
  background-color: #bb9429;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: rgba(245, 245, 245, 0.3) 1px 1px 1px;
}

@keyframes shine {
  0% {
    background-position: 150% 150%;
  }

  25% {
    background-position: 0% 0%;
  }

  100% {
    background-position: 0% 0%;
  }
}

@keyframes pop-out-in {
  36% {
    transform: scale(1.125);
  }

  100% {
    transform: scale(1);
  }
}

.end-wrapper {
  margin-top: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.end-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  gap: 10px;
}

.location,
.invite-text,
.family-text {
  margin: 0;
}

.location {
  font-size: 1.3rem;
  font-weight: 600;
}

.family-text {
  font-size: 0.9rem;
}

.invite-text {
  font-size: 0.8rem;
}

#hotel-image {
  margin-top: -25px;
  display: block;
  width: 100%;
  height: auto;
  left: 0;
}

#hotel-image,
#end-wrapper {
  opacity: 0;
  transition: opacity 3s ease-in-out;
}

#hotel-image.fadeIn,
#end-wrapper.fadeIn {
  opacity: 1;
}

@media (min-width: 768px) {

  html,
  body {
    width: 768px;
    margin: 0 auto;
  }

  #real-website {
    scrollbar-gutter: stable both-edges;
    overflow-y: overlay;
  }

  .content-container {
    height: auto !important;
    width: 100%;
    position: relative;
    display: block;
  }

  .content {
    height: auto !important;
    max-width: 100% !important;
    width: 100%;
    margin: 0;
  }

  .message {
    white-space: nowrap;
  }

  canvas {
    display: block;
    width: 100% !important;
    left: 0;
  }

  .preloader {
    width: 768px;
    left: 50%;
    transform: translateX(-50%);
  }

  .preloader-content img {
    width: 120px;
  }

  .scratch-objects {
    grid-auto-columns: 180px;
    gap: 20px;
  }
}
