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

/* Typography & Reset */
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: #070F1E;
  color: #101D3A;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, .font-storybook {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
}

.font-serif-body {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #0A1326;
}
::-webkit-scrollbar-thumb {
  background: #D9A441;
  border-radius: 5px;
  border: 2px solid #0A1326;
}
::-webkit-scrollbar-thumb:hover {
  background: #F4C868;
}

/* Storybook Paper & Texture Utilities */
.paper-texture {
  background-color: #FAF4E6;
  background-image: 
    radial-gradient(hsla(39, 45%, 35%, 0.04) 1px, transparent 0),
    radial-gradient(hsla(39, 45%, 35%, 0.04) 1px, #FAF4E6 1px);
  background-size: 24px 24px, 24px 24px;
  background-position: 0 0, 12px 12px;
}

.dark-paper-texture {
  background-color: #101D3A;
  background-image: 
    radial-gradient(rgba(217, 164, 65, 0.05) 1px, transparent 0),
    radial-gradient(rgba(217, 164, 65, 0.03) 1px, #101D3A 1px);
  background-size: 32px 32px, 32px 32px;
  background-position: 0 0, 16px 16px;
}

/* Gold Text Gradient */
.gold-text-gradient {
  background: linear-gradient(135deg, #FFF1C5 0%, #D9A441 50%, #B38128 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Box Shadow & Glow Effects */
.book-page-shadow {
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(217, 164, 65, 0.5),
    inset 0 0 100px rgba(0, 0, 0, 0.35);
}

.paper-card-shadow {
  box-shadow: 
    0 20px 40px -5px rgba(10, 19, 38, 0.16),
    0 6px 15px rgba(0, 0, 0, 0.08),
    inset 0 0 0 1px rgba(217, 164, 65, 0.35);
}

.golden-path-glow {
  filter: drop-shadow(0 0 12px rgba(255, 217, 138, 0.95)) drop-shadow(0 0 25px rgba(217, 164, 65, 0.6));
}

/* 3D Perspective Card Tilt Effects */
.perspective-card {
  perspective: 1000px;
  transform-style: preserve-3d;
  transition: transform 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
  will-change: transform;
}

.perspective-card:hover {
  box-shadow: 
    0 30px 60px -12px rgba(10, 19, 38, 0.45),
    0 0 30px rgba(217, 164, 65, 0.35);
}

/* Drop Cap Styling */
.drop-cap::first-letter {
  font-family: 'Cinzel Decorative', serif;
  font-size: 3.8rem;
  line-height: 0.8;
  float: left;
  margin-right: 0.85rem;
  margin-top: 0.1rem;
  color: #9E2936;
  text-shadow: 2px 2px 0px #D9A441;
}

/* Ornate Filigree Corner Accents */
.filigree-corner-tl {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  border-top: 2px solid #D9A441;
  border-left: 2px solid #D9A441;
}
.filigree-corner-tr {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-top: 2px solid #D9A441;
  border-right: 2px solid #D9A441;
}
.filigree-corner-bl {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  border-bottom: 2px solid #D9A441;
  border-left: 2px solid #D9A441;
}
.filigree-corner-br {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-bottom: 2px solid #D9A441;
  border-right: 2px solid #D9A441;
}

/* Keyframe Animations */
@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

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