@import url('https://fonts.googleapis.com/css2?family=Alex+Brush&family=EB+Garamond:ital,wght@0,400..800;1,400..800&family=Plus+Jakarta+Sans:wght@200..800&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=boska@200,300,400,500,700,900,1&f[]=satoshi@300,400,500,700,900&display=swap');

* {
  box-sizing: border-box;
}

:root {
  --beige: #f5ebe0;
  --burgundy: #a94442;
  --ivory: #fffbf7;
  --gold: #d4af57;
  --text-dark: #bf7a4a;
}

html,
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: var(--text-dark);
}

.letter {
  position: fixed;
  inset: 0;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  z-index: 3;
}

.stamp {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 50%) rotate(0deg) scale(1);
  transform-origin: 50% 35%;
  z-index: 3;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  will-change: transform, opacity;
}

.stamp img {
  width: 150px;
  display: block;
}

.texture {
  position: absolute;
  left: 0;
  height: 50%;
  width: 100%;
  background-color: var(--beige);
  transition: transform 1s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.texture-top {
  top: 0;
  z-index: 2;
}

.texture-bottom {
  bottom: 0;
  z-index: 1;
}

.texture-shadow {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
}

.landing {
  min-height: 100vh;
  width: 100%;
  padding: 0;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
  background: #fff;
}

.landing .font-playfair {
  font-family: 'EB Garamond', serif;
}

.landing header h1.font-playfair,
.landing #story span.font-playfair {
  font-family: 'Alex Brush', cursive;
  font-weight: 400;
}

.landing header h1.font-playfair > span {
  display: inline-block;
  font-size: 0.58em;
  line-height: 1;
}

.landing .font-boska {
  font-family: 'Boska', serif;
}

.landing #story h2.font-playfair,
.landing #event h2.font-playfair,
.landing #gallery h2.font-playfair {
  font-family: 'EB Garamond', serif;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin-bottom: 1.25rem;
}

.landing #event h2.font-playfair {
  font-style: italic;
}

.landing .bg-beige-gradient {
  background: linear-gradient(135deg, #fff 0%, var(--beige) 100%);
}

.landing .paper-border {
  border: 1px solid rgba(212, 175, 87, 0.2);
  background-image: url('images/texture.png');
  background-size: 600px;
  background-blend-mode: overlay;
}

.landing .soft-shadow {
  box-shadow: 0 10px 40px rgba(169, 68, 66, 0.1);
}

.landing .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s ease-out;
}

.landing .reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.landing header {
  background-image: url('images/roses3.png');
  background-size: 1000px;
  background-repeat: no-repeat;
  background-position: center bottom;
}

.landing #event {
  background-image: url('images/roses3.png');
  background-size: 1000px;
  background-repeat: no-repeat;
  background-position: center bottom;
}

.landing #story {
  background-image: url('images/roses4.png');
  background-size: 400px;
  background-repeat: no-repeat;
  background-position: bottom right;
}

.landing #gallery {
  background-image: url('images/roses1.png');
  background-size: 40%;
  background-repeat: no-repeat;
  background-position: bottom left;
}

.landing .image-hover {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.landing .image-hover:hover {
  transform: scale(1.03);
}

.landing .monogram-circle {
  width: 120px;
  height: 120px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.landing .monogram-circle::after {
  content: '';
  position: absolute;
  width: 130px;
  height: 130px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  opacity: 0.3;
}

.letter.open .texture-top {
  transform: translateY(-105%);
}

.letter.open .texture-bottom {
  transform: translateY(105%);
}

.letter.open {
  pointer-events: none;
}

.letter.open .stamp {
  animation: stamp-peel 0.95s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes stamp-peel {
  0% {
    transform: translate(-50%, 50%) rotate(0deg) scale(1);
    opacity: 1;
  }

  35% {
    transform: translate(-50%, 46%) rotate(-3deg) scale(1.02);
    opacity: 1;
  }

  70% {
    transform: translate(-50%, 42%) rotate(4deg) scale(0.96);
    opacity: 0.85;
  }

  100% {
    transform: translate(-50%, 38%) rotate(-6deg) scale(0.9);
    opacity: 0;
  }
}

body.landing-visible {
  overflow-x: hidden;
}

body.landing-visible .landing {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.35s;
}

@media (max-width: 640px) {
  .stamp img {
    width: 120px;
  }

  .landing .landing-nav {
    padding: 16px 14px;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
  }

  .landing .landing-nav-links {
    width: 100%;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    font-size: 9px;
    letter-spacing: 0.2em;
  }

  .landing .landing-nav-links a {
    padding: 4px 6px;
  }

  .landing section,
  .landing footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .landing header {
    background-size: 1600px;
  }

  .landing #event {
    background-size: 1600px;
  }

  .landing #story h2.font-playfair,
  .landing #event h2.font-playfair,
  .landing #gallery h2.font-playfair {
    font-size: 2.35rem;
    margin-bottom: 1rem;
  }

  .landing header h1.font-playfair > span {
    display: block;
    font-size: 0.5em;
    margin: 0.04em 0;
  }

  .landing #gallery {
    background-size: 50% !important;
  }

  .landing #story {
    background-size: 50% !important;
  }

  .landing #story,
  .landing #gallery {
    background-size: 1000px;
  }
}
