@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Great+Vibes&family=Pinyon+Script&family=Plus+Jakarta+Sans:wght@300;400;500;600&display=swap');

@font-face {
  font-family: 'Snell Roundhand';
  src: url('../fonts/SnellRoundhand.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Snell Roundhand';
  src: url('../fonts/SnellRoundhand-Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}

:root {
  --color-terracotta: #8C3E36;
  --color-deepred: #BC1B1B;
  --color-cream: #F4F1EC;
  --color-cream-soft: #F2EEE3;
  --color-cream-dark: #E8E0D4;
  --color-dark: #3C3333;
  --color-gold: #C5A059;
  --color-gold-dark: #9A7B38;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--color-dark);
  background-color: #272121;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(140, 62, 54, 0.15) 0%, transparent 80%),
    radial-gradient(#3a3030 1px, transparent 1px);
  background-size: 100% 100%, 20px 20px;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Typography Helpers */
.font-serif-vintage {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

.font-script,
.font-snell {
  font-family: 'Snell Roundhand', 'Pinyon Script', cursive;
}

.font-calligraphy {
  font-family: 'Great Vibes', cursive;
}

.font-cinzel {
  font-family: 'Cinzel', serif;
}

/* App Mobile-first Container */
.app-container {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background-color: var(--color-cream);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5), 0 0 20px rgba(140, 62, 54, 0.2);
  overflow: hidden;
}

/* Section Slide Base */
.slide-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}

/* Aspect ratio 9:16 wrapper */
.slide-aspect {
  position: relative;
  width: 100%;
  padding-bottom: 177.77%; /* 1920 / 1080 = 1.7777 => 177.77% */
}

.slide-content-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Animations */
@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animate-spin-slow {
  animation: spinSlow 12s linear infinite;
}

.paused {
  animation-play-state: paused !important;
}

@keyframes pulseGently {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(140, 62, 54, 0.3);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 6px 22px rgba(140, 62, 54, 0.45);
  }
}

.animate-pulse-gentle {
  animation: pulseGently 2.4s ease-in-out infinite;
}

@keyframes pulseImageGentle {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 4px 10px rgba(140, 62, 54, 0.3));
  }
  50% {
    transform: scale(1.035);
    filter: drop-shadow(0 6px 18px rgba(140, 62, 54, 0.55));
  }
}

@keyframes pulseImageGentleLight {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.18));
  }
  50% {
    transform: scale(1.035);
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
  }
}

/* Vintage Stepped Rocking Heart Animation (Bergoyang Patah-patah) */
@keyframes heartSteppyRock {
  0% {
    transform: rotate(5deg) scale(1);
  }
  16.66% {
    transform: rotate(-8deg) scale(1.03);
  }
  33.33% {
    transform: rotate(3deg) scale(0.98);
  }
  50% {
    transform: rotate(14deg) scale(1.02);
  }
  66.66% {
    transform: rotate(-4deg) scale(1);
  }
  83.33% {
    transform: rotate(10deg) scale(0.99);
  }
  100% {
    transform: rotate(5deg) scale(1);
  }
}

.animate-heart-steppy-rock {
  animation: heartSteppyRock 2.4s steps(1) infinite;
  transform-origin: 50% 65%;
  will-change: transform;
}

.animate-pulse-img {
  animation: pulseImageGentle 2.4s ease-in-out infinite;
  transform-origin: center center;
  will-change: transform, filter;
}

.animate-pulse-img-light {
  animation: pulseImageGentleLight 2.4s ease-in-out infinite;
  transform-origin: center center;
  will-change: transform, filter;
}

@keyframes floatGentle {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.animate-float {
  animation: floatGentle 3s ease-in-out infinite;
}

/* Vintage Buttons */
.btn-vintage {
  background: linear-gradient(135deg, #8C3E36 0%, #6f2e27 100%);
  color: #fff;
  border-radius: 9999px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(140, 62, 54, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-vintage:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(140, 62, 54, 0.5);
  filter: brightness(1.08);
}

.btn-vintage:active {
  transform: translateY(1px);
}

.btn-vintage-light {
  background: #F4F1EC;
  color: #8C3E36;
  border: 1px solid rgba(140, 62, 54, 0.3);
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-vintage-light:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(140, 62, 54, 0.2);
}

/* Vinyl Player Widget */
.vinyl-player-widget {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 45;
  cursor: pointer;
  transition: transform 0.2s ease;
}

@media (min-width: 768px) {
  .vinyl-player-widget {
    right: calc(50% - 230px + 20px);
  }
}

.vinyl-disc {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle, #2b2b2b 25%, #181818 26%, #2b2b2b 40%, #181818 41%, #252525 60%, #111111 100%);
  border: 2px solid #C5A059;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vinyl-center {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #8C3E36;
  border: 1.5px solid #F4F1EC;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Toast Notifications */
#toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #3C3333;
  color: #F4F1EC;
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 90;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

#toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Lightbox Modal */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(20, 16, 16, 0.94);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
}

#lightbox.open {
  opacity: 1;
  visibility: visible;
}

/* Modal Backdrop */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: rgba(30, 24, 24, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #F4F1EC;
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border: 2px solid #8C3E36;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-card {
  transform: scale(1);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #272121;
}

::-webkit-scrollbar-thumb {
  background: #8C3E36;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a94b41;
}

/* ==========================================================================
   AR-RUM VINTAGE SUN ROTATION ANIMATION
   ========================================================================== */
@keyframes spinSun {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animate-spin-sun {
  animation: spinSun 22s linear infinite;
  transform-origin: 49.9% 45.8%; /* Centered precisely on the red spiral */
  will-change: transform;
}

/* ==========================================================================
   EVENT DETAILS - MUSICAL NOTES FLOW ANIMATION
   ========================================================================== */
@keyframes musicWaveFlow {
  0% {
    transform: translateY(0px) translateX(0px) rotate(0deg) scale(1);
    opacity: 0.95;
  }
  20% {
    transform: translateY(-4px) translateX(1.5px) rotate(2deg) scale(1.02);
    opacity: 1;
  }
  40% {
    transform: translateY(-8px) translateX(3px) rotate(3.5deg) scale(1.04);
    opacity: 0.9;
  }
  60% {
    transform: translateY(-3px) translateX(1px) rotate(-1deg) scale(1);
    opacity: 1;
  }
  80% {
    transform: translateY(2px) translateX(-1.5px) rotate(-2.5deg) scale(0.98);
    opacity: 0.92;
  }
  100% {
    transform: translateY(0px) translateX(0px) rotate(0deg) scale(1);
    opacity: 0.95;
  }
}

.animate-music-flow {
  animation: musicWaveFlow 3.4s ease-in-out infinite;
  transform-origin: 65% 74%; /* Anchored at the mouth of the gramophone horn in 1080x1920 canvas */
  will-change: transform, opacity;
}

/* ==========================================================================
   POLAROID GALLERY ULTRA-SMOOTH CAROUSEL
   ========================================================================== */
#polaroid-touch-area {
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}

#polaroid-slider-track {
  display: flex;
  height: 100%;
  width: 100%;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

#polaroid-slider-track > div {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
}

#polaroid-slider-track img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}






