:root {
  /* Royal Vintage Palette */
  --vin-gold: #d4af37;
  --vin-gold-dark: #aa8b2e;
  --vin-burgundy: #4a0404;
  --vin-wood: #3d2b1f;
  --vin-parchment: #f4e4bc;
  --vin-ink: #1a1a1a;
  --vin-cream: #fff9eb;
  
  --wf-bg: var(--vin-wood);
  --wf-text: var(--vin-parchment);
  --wf-border: var(--vin-gold);
  
  --font-display: 'Playfair Display', serif;
  --font-body: 'Crimson Text', serif;
  
  --radius: 4px;
  --shadow: 0 10px 30px rgba(0,0,0,0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--vin-ink);
  background-image: url("https://www.transparenttextures.com/patterns/dark-leather.png");
  color: var(--vin-parchment);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3, .nav-logo {
  font-family: var(--font-display);
  color: var(--vin-gold);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 4rem);
}

header {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px border var(--vin-gold);
  background: rgba(26, 26, 26, 0.9);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.nav-logo {
  font-size: 2rem;
  font-weight: 900;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--vin-parchment);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.nav-links a:hover {
  color: var(--vin-gold);
}

/* Hero Section */
.hero {
  position: relative;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, transparent 20%, var(--vin-ink) 100%);
  z-index: 1;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  filter: sepia(0.5) contrast(1.2);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-content h1 {
  font-size: 5rem;
  margin-bottom: 1rem;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
  animation: fadeInDown 1.5s ease;
}

.hero-content p {
  font-size: 1.5rem;
  font-style: italic;
  margin-bottom: 2rem;
  animation: fadeInUp 1.5s ease 0.5s both;
}

/* Shelf Section */
.shelf-section {
  padding: 80px 0;
  background: var(--vin-wood);
  background-image: url("https://www.transparenttextures.com/patterns/wood-pattern.png");
  border-top: 5px solid var(--vin-gold-dark);
  border-bottom: 5px solid var(--vin-gold-dark);
}

.shelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 30px;
  padding: 40px;
  background: rgba(0,0,0,0.3);
  border: 10px solid #2a1b0f;
  box-shadow: inset 0 0 50px rgba(0,0,0,0.8);
}

.book {
  height: 250px;
  background: var(--vin-burgundy);
  border-left: 5px solid var(--vin-gold);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s;
  position: relative;
  box-shadow: 5px 5px 15px rgba(0,0,0,0.5);
}

.book::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,0.1);
}

.book:hover {
  transform: translateY(-20px) scale(1.05);
  box-shadow: 0 20px 40px rgba(0,0,0,0.8);
  z-index: 10;
}

.book-title {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--vin-gold);
  margin-bottom: 5px;
}

.book-author {
  font-size: 0.7rem;
  opacity: 0.8;
  text-transform: uppercase;
}

/* Detail Page Layout */
.book-focus {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  min-height: 80vh;
  padding: 40px 0;
  animation: zoomInShelf 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.book-spine-large {
  width: 350px;
  height: 500px;
  background: var(--vin-burgundy);
  border-left: 20px solid var(--vin-gold);
  box-shadow: 20px 20px 60px rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  position: relative;
  margin: 0 auto;
}

.book-spine-large::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 15px; width: 2px;
  background: rgba(255,255,255,0.2);
}

/* Success Animation */
.success-animation {
  height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.flying-book {
  width: 100px;
  height: 140px;
  background: var(--vin-burgundy);
  border-left: 5px solid var(--vin-gold);
  margin-bottom: 40px;
  animation: bookFlyAway 2s forwards ease-in-out;
  position: relative;
}

.success-text {
  animation: fadeInUp 1s forwards 1.5s;
  opacity: 0;
}

@keyframes bookFlyAway {
  0% { transform: scale(1) translate(0, 0) rotate(0); opacity: 1; }
  50% { transform: scale(0.5) translate(100px, -100px) rotate(45deg); opacity: 0.5; }
  100% { transform: scale(0) translate(400px, -400px) rotate(90deg); opacity: 0; }
}

@keyframes zoomInShelf {
  0% { transform: scale(0) translateY(-200px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* Subscription Cards */
.tier-section {
  padding: 80px 0;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.tier-card {
  background: var(--vin-ink);
  border: 2px solid var(--vin-gold);
  padding: 40px;
  text-align: center;
  position: relative;
  transition: transform 0.3s;
}

.tier-card:hover {
  transform: scale(1.02);
}

.tier-card h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.tier-price {
  font-size: 3rem;
  color: var(--vin-gold);
  margin-bottom: 2rem;
}

.tier-features {
  list-style: none;
  margin-bottom: 2rem;
  text-align: left;
}

.tier-features li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tier-donation-info {
  margin-top: 20px;
  padding: 15px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px dashed var(--vin-gold);
  font-style: italic;
  font-size: 0.9rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 30px;
  background: var(--vin-gold);
  color: var(--vin-ink);
  text-decoration: none;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.btn:hover {
  background: var(--vin-cream);
  box-shadow: 0 0 20px var(--vin-gold);
}

.btn-outline {
  background: transparent;
  color: var(--vin-gold);
  border: 1px solid var(--vin-gold);
}

/* Donation Incentive Component */
.donation-banner {
  background: var(--vin-burgundy);
  padding: 40px;
  border: 4px double var(--vin-gold);
  margin-top: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.donation-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

/* Footer */
footer {
  margin-top: 100px;
  padding: 60px 0;
  background: #0d0d0d;
  border-top: 2px solid var(--vin-gold);
  text-align: center;
}

.placeholder-image {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--vin-wood);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.placeholder-image::after {
  content: attr(data-label);
  color: var(--vin-gold);
  font-family: var(--font-display);
}
