:root {
  --primary: #1a1a1a;
  --secondary: #4a5568;
  --accent: #2563eb;
  --bg-light: #fafafa;
  --bg-white: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --radius-lg: 16px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'EB Garamond', serif;
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

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

/* Section 1: Book */
.book-section {
  padding: 80px 0;
  background: transparent;
}

.book-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  align-items: start;
}

.book-cover {
  position: sticky;
  top: 40px;
}

.book-cover-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: block;
  object-fit: cover;
}

.book-description {
  padding-top: 20px;
}

.book-title {
  font-family: 'EB Garamond', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.book-subtitle {
  font-size: 1.4rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-weight: 400;
}

.book-text {
  font-size: 1.3rem;
  line-height: 1.8;
  color: var(--text-secondary);
  text-align: justify;
}

.book-text p {
  margin-bottom: 24px;
}

.book-text p:last-child {
  margin-bottom: 0;
}

.book-text em {
  font-style: italic;
  color: var(--text-primary);
}

.book-text strong {
  font-weight: 600;
  color: var(--text-primary);
}

.book-actions {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.book-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 600px;
}

.prologue-btn {
  padding: 15px 36px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1.2rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'EB Garamond', serif;
  flex: 1;
  min-width: 220px;
  max-width: 280px;
  text-align: center;
}

.prologue-btn:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.prologue-btn:active {
  transform: translateY(0);
}

.book-cta {
  width: 100%;
  display: flex;
  justify-content: center;
  max-width: 600px;
}

.cta-button {
  display: inline-block;
  padding: 16px 40px;
  background: linear-gradient(135deg, var(--accent) 0%, #1e40af 100%);
  color: white;
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 1.3rem;
  font-weight: 600;
  transition: all 0.3s ease;
  font-family: 'EB Garamond', serif;
  box-shadow: var(--shadow-sm);
  text-align: center;
  width: 100%;
  max-width: 100%;
}

.cta-button:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.cta-button:active {
  transform: translateY(0);
}

/* Section 2: About */
.about-section {
  padding: 80px 0;
  background: transparent;
}

.about-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text h2 {
  font-family: 'EB Garamond', serif;
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 600;
  margin-bottom: 32px;
  color: var(--text-primary);
}

.about-text p {
  font-size: 1.3rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.about-text p:last-of-type {
  margin-bottom: 32px;
}

.contact-cta {
  margin-top: 40px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
}

.contact-cta p {
  margin: 0;
  font-size: 1.2rem;
}

.contact-cta a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.contact-cta a:hover {
  border-bottom-color: var(--accent);
}

.about-image {
  position: sticky;
  top: 40px;
}

.profile-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: block;
  object-fit: cover;
}

/* Section 3: Testimonials */
.testimonials-section {
  padding: 80px 0;
  background: transparent;
}

/* Section 4: Poetry */
.poetry-section {
  padding: 80px 0;
  background: transparent;
}

.poetry-section h2 {
  font-family: 'EB Garamond', serif;
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: 60px;
  color: var(--text-primary);
}

.poetry-carousel {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  padding: 0 20px;
}

.poetry-cards-container {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 20px 0;
  margin-bottom: 40px;
}

.poetry-cards-container::-webkit-scrollbar {
  display: none;
}

.poetry-card {
  min-width: 280px;
  max-width: 320px;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.poetry-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.poetry-card h3 {
  font-family: 'EB Garamond', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px 0;
}

.poetry-card p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0;
}

.poetry-card .poem-preview {
  margin-top: 16px;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.testimonials-section h2 {
  font-family: 'EB Garamond', serif;
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: 60px;
  color: var(--text-primary);
}

.testimonials-carousel {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.testimonial-slide {
  display: none;
  padding: 60px 40px;
  text-align: center;
}

.testimonial-slide.active {
  display: block;
  animation: fadeIn 0.5s ease-in;
}

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

.testimonial-slide blockquote {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  line-height: 1.8;
  color: var(--text-secondary);
  font-style: italic;
  margin: 0;
  padding: 0;
  border: none;
  quotes: '"' '"' "'" "'";
}

.testimonial-slide blockquote::before {
  content: open-quote;
  font-size: 4rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.3;
  vertical-align: -0.4em;
  margin-right: 8px;
}

.testimonial-slide blockquote::after {
  content: close-quote;
  font-size: 4rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.3;
  vertical-align: -0.4em;
  margin-left: 8px;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.carousel-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: rgba(255, 255, 255, 0.5);
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.carousel-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.1);
}

.carousel-dots {
  display: flex;
  gap: 12px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: var(--accent);
  transform: scale(1.2);
}

/* Section 4: Tools */

/* Mobile Responsive */
@media (max-width: 860px) {
  .container {
    padding: 0 16px;
  }

  .book-section,
  .about-section,
  .testimonials-section {
    padding: 60px 0;
  }

  .book-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .book-cover {
    position: static;
    max-width: 300px;
    margin: 0 auto;
  }

  .book-description {
    padding-top: 0;
  }

  .book-actions {
    margin-top: 36px;
    gap: 24px;
  }

  .book-buttons {
    gap: 16px;
    max-width: 100%;
  }

  .prologue-btn {
    min-width: 0;
    flex: 1;
    padding: 14px 24px;
    font-size: 1.1rem;
    max-width: none;
  }

  .book-cta {
    max-width: 100%;
  }

  .cta-button {
    padding: 15px 32px;
    font-size: 1.2rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image {
    position: static;
    max-width: 300px;
    margin: 0 auto;
  }

  .testimonial-slide {
    padding: 40px 20px;
  }

}

@media (max-width: 480px) {
  .book-section,
  .about-section,
  .testimonials-section {
    padding: 40px 0;
  }

  .book-title {
    font-size: 1.8rem;
  }

  .book-text,
  .about-text p {
    font-size: 1.2rem;
  }

  .testimonial-slide blockquote {
    font-size: 1.3rem;
  }

}

/* Prologue Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  overflow-y: auto;
}

.modal.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 700px;
  width: 100%;
  margin: 40px auto;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  z-index: 1001;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1002;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: rotate(90deg);
}

.modal-header {
  padding: 40px 40px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-family: 'EB Garamond', serif;
  font-size: 2rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.modal-body {
  padding: 30px 40px 40px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.modal-body p {
  font-size: 1.3rem;
  line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.modal-body p:last-child {
  margin-bottom: 0;
}

.poem {
  margin: 40px 0;
  padding: 30px;
  background: rgba(250, 250, 250, 0.3);
  border-radius: var(--radius);
  text-align: center;
}

.poem p {
  margin-bottom: 8px;
  font-size: 1.3rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.poem p:last-child {
  margin-bottom: 0;
}

.poem p em {
  font-style: italic;
  color: var(--text-primary);
  font-size: 1.3rem;
}

.poem br {
  line-height: 1.5;
}

.poetry-modal-content {
  max-width: 700px;
}

.poetry-modal-content .modal-body {
  font-size: 1.3rem;
  line-height: 1.9;
}

.poetry-modal-content .modal-body p {
  margin-bottom: 16px;
}

.poetry-modal-content .modal-body em {
  font-style: italic;
  color: var(--text-primary);
}

.poetry-modal-content .modal-body strong {
  font-weight: 600;
  color: var(--text-primary);
}

/* Mobile Modal Styles */
@media (max-width: 860px) {
  .modal.active {
    padding: 20px 16px;
    align-items: flex-start;
  }

  .modal-content {
    margin: 20px auto;
    max-height: 95vh;
    border-radius: var(--radius);
  }

  .modal-header {
    padding: 30px 30px 16px;
  }

  .modal-header h2 {
    font-size: 1.6rem;
  }

  .modal-body {
    padding: 24px 30px 30px;
  }

  .modal-body p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 20px;
  }

  .modal-close {
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .modal.active {
    padding: 10px;
  }

  .modal-content {
    margin: 10px auto;
    max-height: 98vh;
  }

  .modal-header {
    padding: 24px 24px 16px;
  }

  .modal-header h2 {
    font-size: 1.4rem;
  }

  .modal-body {
    padding: 20px 24px 24px;
  }

  .modal-body p {
    font-size: 1.1rem;
    margin-bottom: 18px;
  }

  .poem {
    margin: 30px 0;
    padding: 24px;
  }

  .poem p {
    font-size: 1.2rem;
    margin-bottom: 6px;
  }

  .poem p em {
    font-size: 1.2rem;
  }

  .cta-button {
    padding: 14px 28px;
    font-size: 1.2rem;
  }
}

