:root {
  --wine-dark: #511419;
  --wine-deeper: #380a0e;
  --wine-mid: #6e1a20;
  --cream-bg: #fff7eb;
  --cream-card: #ece4d8;
  --gold-accent: #c9a24a;
  --coffee-dark: #4a2c18;
  --champagne: #e3cbb4;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background-color: #ffffff;
  color: var(--wine-dark);
  font-family: 'Lora', 'Times New Roman', serif;
  overflow-x: hidden;
}

/* Fonts utility classes */
.font-viaoda {
  font-family: 'Viaoda Libre', 'EB Garamond', serif;
}

.font-cormorant {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
}

.font-nautigal {
  font-family: 'The Nautigal', cursive;
}

.font-msmadi {
  font-family: 'Ms Madi', cursive;
}

.font-baskerville {
  font-family: Baskerville, 'EB Garamond', 'Times New Roman', serif;
}

.font-times {
  font-family: 'Times New Roman', 'Cormorant Garamond', serif;
}

.font-lora {
  font-family: 'Lora', 'Times New Roman', serif;
}

/* Keyframe Animations */
@keyframes drFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes envelope-away {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  15% {
    transform: translateY(10px) rotate(0.5deg);
    opacity: 1;
  }
  100% {
    transform: translateY(-120vh) rotate(-2deg);
    opacity: 0;
  }
}

@keyframes seal-pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 4px 20px rgba(74, 44, 24, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.3);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.07);
    box-shadow: 0 6px 35px rgba(74, 44, 24, 0.75), inset 0 2px 4px rgba(255, 255, 255, 0.4);
  }
}

@keyframes shine {
  0% {
    left: -100%;
  }
  50%, 100% {
    left: 120%;
  }
}

@keyframes ambient-fall {
  0% {
    transform: translateY(-8vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.55;
  }
  50% {
    transform: translateY(48vh) translateX(var(--sway, 20px)) rotate(180deg);
    opacity: 0.65;
  }
  92% {
    opacity: 0.45;
  }
  100% {
    transform: translateY(105vh) translateX(0) rotate(360deg);
    opacity: 0;
  }
}

/* Gift Box Animations */
@keyframes igbGiftBob {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes igbShadowPulse {
  0%, 100% {
    transform: scaleX(1);
    opacity: 0.32;
  }
  50% {
    transform: scaleX(0.88);
    opacity: 0.18;
  }
}

@keyframes igbSparkleAnim {
  0%, 100% {
    opacity: 0;
    transform: scale(0.4);
  }
  50% {
    opacity: 1;
    transform: scale(1.18);
  }
}

@keyframes igbHintPulse {
  0%, 100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

@keyframes igbBoxPop {
  0% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
  45% {
    transform: translateY(-14px) scale(1.08) rotate(-3deg);
  }
  100% {
    transform: translateY(-8px) scale(1.05) rotate(0deg);
  }
}

@keyframes igbConfettiFly1 {
  0% { transform: translate(0, 0) rotate(0); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(-55px, -130px) rotate(540deg); opacity: 0; }
}

@keyframes igbConfettiFly2 {
  0% { transform: translate(0, 0) rotate(0); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(46px, -150px) rotate(-460deg); opacity: 0; }
}

@keyframes igbConfettiFly3 {
  0% { transform: translate(0, 0) rotate(0); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(-12px, -160px) rotate(620deg); opacity: 0; }
}

@keyframes igbConfettiFly4 {
  0% { transform: translate(0, 0) rotate(0); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(28px, -115px) rotate(-340deg); opacity: 0; }
}

@keyframes igbConfettiFly5 {
  0% { transform: translate(0, 0) rotate(0); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(-34px, -105px) rotate(320deg); opacity: 0; }
}

@keyframes igbConfettiFly6 {
  0% { transform: translate(0, 0) rotate(0); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(58px, -88px) rotate(-240deg); opacity: 0; }
}

@keyframes igbConfettiFly7 {
  0% { transform: translate(0, 0) rotate(0); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(8px, -170px) rotate(420deg); opacity: 0; }
}

@keyframes igbConfettiFly8 {
  0% { transform: translate(0, 0) rotate(0); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(-46px, -78px) rotate(-200deg); opacity: 0; }
}

.igb-bob {
  animation: igbGiftBob 3s ease-in-out infinite;
}

.igb-shadow {
  animation: igbShadowPulse 3s ease-in-out infinite;
}

.igb-box {
  transition: transform 0.3s ease;
  transform-origin: 50% 100%;
}

.group:hover .igb-box {
  animation: igbBoxPop 0.7s cubic-bezier(.34, 1.56, .64, 1) forwards;
}

.igb-hint {
  animation: igbHintPulse 2s ease-in-out infinite;
}

.igb-sparkle {
  animation: igbSparkleAnim 2s ease-in-out infinite;
}

.igb-sparkle-2 {
  animation: igbSparkleAnim 2s ease-in-out 0.6s infinite;
}

.igb-sparkle-3 {
  animation: igbSparkleAnim 2s ease-in-out 1.2s infinite;
}

.igb-sparkle-4 {
  animation: igbSparkleAnim 2s ease-in-out 1.7s infinite;
}

.group:hover .igb-c1 {
  animation: igbConfettiFly1 1s ease-out 0.05s infinite;
}

.group:hover .igb-c2 {
  animation: igbConfettiFly2 1.1s ease-out 0.12s infinite;
}

.group:hover .igb-c3 {
  animation: igbConfettiFly3 0.95s ease-out 0.2s infinite;
}

.group:hover .igb-c4 {
  animation: igbConfettiFly4 1.15s ease-out 0.3s infinite;
}

.group:hover .igb-c5 {
  animation: igbConfettiFly5 1.05s ease-out 0.35s infinite;
}

.group:hover .igb-c6 {
  animation: igbConfettiFly6 1.2s ease-out 0.4s infinite;
}

.group:hover .igb-c7 {
  animation: igbConfettiFly7 0.9s ease-out 0.5s infinite;
}

.group:hover .igb-c8 {
  animation: igbConfettiFly8 1.1s ease-out 0.55s infinite;
}

/* Envelope opening transition */
.envelope-closing {
  animation: envelope-away 1.1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
}

/* Scroll reveal animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Custom scrollbar for guestbook */
.guestbook-scroll::-webkit-scrollbar {
  width: 5px;
}

.guestbook-scroll::-webkit-scrollbar-track {
  background: rgba(81, 20, 25, 0.06);
  border-radius: 9999px;
}

.guestbook-scroll::-webkit-scrollbar-thumb {
  background: rgba(81, 20, 25, 0.35);
  border-radius: 9999px;
}

