@import "tailwindcss";

/* Import elegant typography from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

@theme {
  --color-brand-bg: #faf6f0;
  --color-brand-primary: #70534c;
  --color-brand-primary-light: #8e6c64;
  --color-brand-accent: #e8d8ce;
  --color-brand-accent-light: #f3e9e3;
  --color-brand-dark: #2a1c18;
  
  --font-serif: "Cormorant Garamond", serif;
  --font-sans: "Plus Jakarta Sans", sans-serif;
}

/* Custom Base & Utility styles */
html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-brand-bg);
  color: var(--color-brand-dark);
  font-family: var(--font-sans);
  overflow-x: hidden;
}

/* Custom editorial selection highlight */
::selection {
  background-color: var(--color-brand-accent);
  color: var(--color-brand-dark);
}

/* Glassmorphism Navigation and Card enhancements */
.glass-nav {
  background-color: rgba(250, 246, 240, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(112, 83, 76, 0.08);
}

.glass-card {
  background-color: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(112, 83, 76, 0.1);
}

/* Elegant 3D Book Mockup Effect */
.book-container {
  perspective: 1200px;
}

.book {
  position: relative;
  width: 180px;
  height: 270px;
  transform-style: preserve-3d;
  transform: rotateY(-15deg);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease;
  box-shadow: 5px 5px 20px rgba(42, 28, 24, 0.15);
}

.book:hover {
  transform: rotateY(-5deg) translateY(-8px);
  box-shadow: 15px 20px 30px rgba(42, 28, 24, 0.25);
}

.book-cover {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: var(--color-brand-primary);
  border-radius: 2px 5px 5px 2px;
  z-index: 2;
  transform-origin: left;
  background-size: cover;
  background-position: center;
}

.book-spine {
  position: absolute;
  width: 30px;
  height: 100%;
  background: linear-gradient(90deg, #533b36 0%, var(--color-brand-primary) 50%, #533b36 100%);
  transform: rotateY(-90deg) translateZ(15px);
  left: -15px;
  z-index: 1;
}

.book-pages {
  position: absolute;
  width: 174px;
  height: 262px;
  background: #fbfbf6;
  border-left: 2px solid #e0dcd3;
  box-shadow: inset -3px 0px 5px rgba(0,0,0,0.05);
  transform: rotateY(0deg) translateZ(-5px);
  left: 4px;
  top: 4px;
  z-index: 0;
  border-radius: 0 3px 3px 0;
  background-image: linear-gradient(90deg, transparent 50%, rgba(0,0,0,0.02) 50%), linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 4px 100%, 100% 3px;
}

/* Custom micro-animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

/* Custom decorative frame */
.editorial-frame {
  position: relative;
  border: 1px solid rgba(112, 83, 76, 0.2);
  padding: 1rem;
}
.editorial-frame::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border: 1px solid rgba(112, 83, 76, 0.1);
  pointer-events: none;
}
