/* ==========================================================================
   STYLE.CSS - WEBSIDENGAN PERNIKAHAN ELEGAN (KONSEP BUKU DIGITAL)
   ========================================================================== */

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

:root {
  --color-bg-ivory: #FDFBF7;
  --color-bg-paper: #FAF6EE;
  --color-gold-light: #F7E7CE;
  --color-gold-primary: #C5A880;
  --color-gold-dark: #8E6D3E;
  --color-gold-deep: #614A2B;
  --color-text-main: #2C2621;
  --color-text-muted: #6B6258;
  --color-emerald-deep: #1A3029;
  --font-heading: 'Playfair Display', serif;
  --font-serif: 'Cormorant Garamond', serif;
  --font-script: 'Great Vibes', cursive;
  --font-script-alt: 'Alex Brush', cursive;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --shadow-book: 0 20px 40px -15px rgba(44, 38, 33, 0.2), 0 0 0 1px rgba(197, 168, 128, 0.25);
  --shadow-page: 0 10px 30px -10px rgba(0, 0, 0, 0.12);
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  font-family: var(--font-body);
  background-color: #121614;
  color: var(--color-text-main);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(197, 168, 128, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(197, 168, 128, 0.08) 0%, transparent 40%),
    linear-gradient(180deg, #121815 0%, #0d1210 100%);
}

/* Typography Helpers */
.font-script {
  font-family: var(--font-script);
}

.font-script-alt {
  font-family: var(--font-script-alt);
}

.font-heading {
  font-family: var(--font-heading);
}

.font-serif {
  font-family: var(--font-serif);
}

/* Luxury Gold Text Gradient */
.gold-text-gradient {
  background: linear-gradient(135deg, #a37d47 0%, #e2c28e 35%, #ffd992 50%, #c4995a 75%, #8f652b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gold-badge {
  background: linear-gradient(135deg, rgba(197, 168, 128, 0.15), rgba(247, 231, 206, 0.25));
  border: 1px solid rgba(197, 168, 128, 0.5);
}

/* Noise / Texture effect */
.paper-pattern {
  background-color: var(--color-bg-paper);
  background-image: radial-gradient(rgba(197, 168, 128, 0.06) 1px, transparent 0);
  background-size: 16px 16px;
}

/* Book Container */
.book-stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  perspective: 1600px;
}

@media (min-width: 768px) {
  .book-stage {
    padding: 24px;
  }
}

.book-wrapper {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 90vh;
  height: 88dvh;
  max-height: 840px;
  background: var(--color-bg-paper);
  border-radius: 8px 20px 20px 8px;
  border-right: 4px solid #e8dfd0;
  box-shadow: 
    0 30px 60px -20px rgba(0, 0, 0, 0.65),
    6px 0 0 -1px #d7cbb7,
    10px 0 0 -2px #c5b69f,
    0 0 0 2px rgba(197, 168, 128, 0.45);
  overflow: hidden;
  user-select: none;
  display: flex;
  flex-direction: column;
}

/* Book Spine illusion on desktop & mobile */
@media (min-width: 640px) {
  .book-wrapper {
    box-shadow: 
      -14px 14px 28px -10px rgba(0, 0, 0, 0.75),
      0 30px 60px -20px rgba(0, 0, 0, 0.65),
      6px 0 0 -1px #d7cbb7,
      10px 0 0 -2px #c5b69f,
      0 0 0 2px rgba(197, 168, 128, 0.45);
  }
}

/* 3D Book Viewport & Stacked Pages */
.book-slider-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
  perspective: 1700px;
  perspective-origin: 45% 50%;
}

.book-slider-viewport.is-dragging {
  cursor: grabbing;
}

.book-slider-track {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.book-page {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px 20px 80px 26px;
  scrollbar-width: thin;
  scrollbar-color: rgba(197, 168, 128, 0.4) transparent;
  background-color: var(--color-bg-paper);
  background-image:
    linear-gradient(90deg, rgba(44, 38, 33, 0.14) 0%, rgba(44, 38, 33, 0.04) 4%, transparent 10%, transparent 96%, rgba(44, 38, 33, 0.04) 100%),
    radial-gradient(rgba(197, 168, 128, 0.07) 1px, transparent 0);
  background-size: 100% 100%, 16px 16px;
  transform-origin: left center;
  backface-visibility: hidden;
  will-change: transform, opacity;
  box-shadow: 10px 0 28px rgba(0, 0, 0, 0.18);
  --curl-shade: 0;
}

.book-page::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(255, 250, 240, 0.08) 0%,
    rgba(197, 168, 128, 0.06) 35%,
    rgba(30, 22, 16, 0.32) 100%
  );
  opacity: var(--curl-shade, 0);
  z-index: 5;
}

.book-under-shadow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(20, 15, 10, 0.45) 0%,
    rgba(20, 15, 10, 0.18) 35%,
    transparent 85%
  );
  opacity: 0;
  z-index: 19;
}

.book-page::-webkit-scrollbar {
  width: 4px;
}

.book-page::-webkit-scrollbar-thumb {
  background: rgba(197, 168, 128, 0.4);
  border-radius: 4px;
}

@media (min-width: 640px) {
  .book-page {
    padding: 36px 32px 90px 36px;
  }
}

/* Page Frame and Corners */
.page-ornament-frame {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(197, 168, 128, 0.32);
  border-radius: 6px 14px 14px 6px;
  pointer-events: none;
  z-index: 24;
}

.corner-ornament {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: rgba(197, 168, 128, 0.65);
  pointer-events: none;
  z-index: 24;
}

.corner-top-left {
  top: 8px;
  left: 8px;
  border-top: 2px solid;
  border-left: 2px solid;
  border-top-left-radius: 4px;
}

.corner-top-right {
  top: 8px;
  right: 8px;
  border-top: 2px solid;
  border-right: 2px solid;
  border-top-right-radius: 4px;
}

.corner-bottom-left {
  bottom: 8px;
  left: 8px;
  border-bottom: 2px solid;
  border-left: 2px solid;
  border-bottom-left-radius: 4px;
}

.corner-bottom-right {
  bottom: 8px;
  right: 8px;
  border-bottom: 2px solid;
  border-right: 2px solid;
  border-bottom-right-radius: 4px;
}

/* Floating Navigation Buttons */
.nav-arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(253, 251, 247, 0.92);
  border: 1px solid rgba(197, 168, 128, 0.6);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold-dark);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 30;
  backdrop-filter: blur(4px);
}

.nav-arrow-btn:hover {
  background: #ffffff;
  color: var(--color-gold-deep);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 10px 25px rgba(197, 168, 128, 0.4);
}

.nav-arrow-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.nav-arrow-btn.btn-prev {
  left: 12px;
}

.nav-arrow-btn.btn-next {
  right: 12px;
}

.nav-arrow-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

/* Bottom Bar Controller */
.book-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: linear-gradient(180deg, rgba(250, 246, 238, 0.85) 0%, rgba(250, 246, 238, 0.98) 100%);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(197, 168, 128, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 25;
}

/* Cover Overlay Modal */
.cover-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: radial-gradient(circle at center, #1b2420 0%, #0e1311 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.7s;
}

.cover-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.cover-card {
  width: 100%;
  max-width: 440px;
  background: var(--color-bg-paper);
  border-radius: 24px;
  padding: 40px 24px;
  position: relative;
  text-align: center;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(197, 168, 128, 0.45);
  animation: floatUp 0.8s ease-out;
}

@keyframes floatUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Music Player Floating Disc */
.music-toggle-btn {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(250, 246, 238, 0.95);
  border: 1.5px solid var(--color-gold-primary);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold-deep);
  cursor: pointer;
  z-index: 50;
  transition: all 0.3s ease;
}

.music-toggle-btn.is-playing .music-icon-disc {
  animation: spinDisc 4s linear infinite;
}

/* Container Audio YouTube Tersembunyi (Hanya Musik, Tanpa Video) */
.yt-audio-hidden {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 2px;
  height: 2px;
  opacity: 0.001;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
}

@keyframes spinDisc {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Floating Share / Guest Generator Button */
.btn-floating-generator {
  position: fixed;
  bottom: 80px;
  right: 18px;
  background: linear-gradient(135deg, #C5A880 0%, #8E6D3E 100%);
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: 9999px;
  box-shadow: 0 10px 25px rgba(142, 109, 62, 0.4);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  z-index: 45;
  transition: all 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-floating-generator:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 14px 28px rgba(142, 109, 62, 0.5);
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(26, 48, 41, 0.95);
  color: #FDFBF7;
  padding: 12px 24px;
  border-radius: 9999px;
  border: 1px solid rgba(197, 168, 128, 0.5);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  font-size: 13px;
  font-weight: 500;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-image {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(197, 168, 128, 0.5);
}

/* Animations & Microinteractions */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(197, 168, 128, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(197, 168, 128, 0);
  }
}

.pulse-btn {
  animation: pulseGlow 2.5s infinite;
}

/* Form Styles */
input, select, textarea {
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-gold-primary);
  box-shadow: 0 0 0 3px rgba(197, 168, 128, 0.2);
}
