:root {
  --bg-base: #f4f7fb;
  --bg-surface: rgba(255, 255, 255, 0.65);
  --bg-surface-hover: rgba(255, 255, 255, 0.85);
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --accent: #9d1739;
  --accent-glow: rgba(157, 23, 57, 0.15);
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Inter', sans-serif;
  
  --glass-border: 1px solid rgba(255, 255, 255, 0.9);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(157, 23, 57, 0.04), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(66, 153, 225, 0.04), transparent 25%);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 4vw;
}

/* Navigation */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  border-bottom: var(--glass-border);
  padding: 1rem 0;
  margin-bottom: -1px; /* seamless */
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand a {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  background: linear-gradient(135deg, var(--text-primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  font-size: 1.05rem;
}

.nav-link:hover {
  color: var(--accent);
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  margin: 0;
}

.title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -2px;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--text-primary);
  margin-bottom: 2.5rem;
  letter-spacing: -1px;
}

h3 {
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

a { text-decoration: none; }

.hero-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 5vw;
  padding: 8vh 0;
}

@media (max-width: 900px) {
  .hero-split {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 15vh;
  }
}

.hero-left {
  position: relative;
  display: flex;
  justify-content: center;
  perspective: 1000px;
}

.book-cover {
  width: 100%;
  max-width: 360px;
  border-radius: 12px;
  box-shadow: 
    0 25px 50px -12px rgba(0,0,0,0.15), 
    0 0 80px -20px var(--accent-glow);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-style: preserve-3d;
}

.book-cover:hover {
  transform: translateY(-10px) rotateY(-8deg) rotateX(4deg);
  box-shadow: 
    30px 40px 60px -12px rgba(0,0,0,0.2), 
    0 0 120px -10px var(--accent-glow);
}

.author-name {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 300;
}

.book-meta {
  display: inline-block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 2.5rem;
}

.intro-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 3rem;
  max-width: 500px;
}

@media (max-width: 900px) {
  .intro-text { margin: 0 auto 3rem auto; }
}

.buy-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 900px) {
  .buy-buttons { justify-content: center; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: var(--glass-border);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.btn i {
  font-size: 1.25rem;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.btn:hover {
  background: var(--bg-surface-hover);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 1);
  box-shadow: 0 8px 25px rgba(0,0,0,0.05);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 30px -10px var(--accent-glow);
}

.btn-primary i {
  color: #fff;
}

.btn-primary:hover {
  background: #bd1a43;
  box-shadow: 0 15px 40px -10px rgba(189, 26, 67, 0.4);
  border-color: transparent;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 8vh 0;
}

.card {
  background: var(--bg-surface);
  border: var(--glass-border);
  border-radius: 24px;
  padding: 4vw;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.02);
}

.card-text {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.card-text p { margin-top: 0; margin-bottom: 1.5rem; }
.card-text p:last-child { margin-bottom: 0; }

.section-about {
  max-width: 900px;
  margin: 0 auto;
}

.section-preview {
  max-width: 900px;
  margin: 0 auto;
}

.letter-section {
  max-width: 900px;
  margin: 0 auto 10vh auto;
}

.letter-sign {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 3rem;
  color: var(--accent);
  display: block;
  margin-top: 3rem;
}

.review-cta {
  background: linear-gradient(145deg, rgba(157, 23, 57, 0.05), rgba(0,0,0,0));
  border: var(--glass-border);
  border-radius: 24px;
  padding: 3rem;
  text-align: center;
  margin-top: 5rem;
}

/* Gallery Grid */
.page-gallery {
  padding: 8vh 0;
  min-height: 80vh;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  border: var(--glass-border);
  background: #fff;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

footer {
  text-align: center;
  padding: 3rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-top: var(--glass-border);
  margin-top: 5vh;
}

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

.animate { opacity: 0; }
.animate.visible { animation: fadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 12, 16, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 50px rgba(0,0,0,0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.lightbox.active img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 3rem;
  color: #fff;
  font-size: 4rem;
  cursor: pointer;
  z-index: 1001;
  line-height: 1;
  font-weight: 300;
  user-select: none;
}

.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 3rem;
  font-weight: 300;
  cursor: pointer;
  z-index: 1001;
  padding: 1rem;
  user-select: none;
  transition: color 0.3s ease;
}

.lightbox-prev:hover, .lightbox-next:hover {
  color: var(--accent);
}

.lightbox-prev {
  left: 2vw;
}

.lightbox-next {
  right: 2vw;
}
