/* iaf-patent.css - Book-like Reading Experience */

:root {
  --paper-bg: #F9F7F1;
  --ink-color: #1A1A1A;
  --ink-light: #4A4A4A;
  --accent-color: #8C2A2A; 
  
  --font-body: 'Playfair Display', serif;
  --font-ui: 'Inter', sans-serif;
  
  --reading-width: 65ch;
}

body.book-body {
  background-color: var(--paper-bg);
  color: var(--ink-color);
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
  line-height: 1.8;
  font-size: 1.125rem; 
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

.paper-texture {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.book-nav {
  padding: 2rem;
  position: absolute;
  top: 0;
  left: 0;
  margin-bottom: 2rem;
}

.nav-back {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--ink-light);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.nav-back:hover {
  color: var(--ink-color);
}

.book-container {
  max-width: var(--reading-width);
  margin: 0 auto;
  padding: 6rem 1.5rem 8rem 1.5rem;
  position: relative;
  z-index: 1;
}

.book-title-page {
  text-align: center;
  margin-bottom: 6rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  animation: fadeUp 1.2s ease-out forwards;
}

.patent-badge {
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  color: var(--accent-color);
  margin-bottom: 1.5rem;
  display: inline-block;
}

.book-title {
  font-family: var(--font-body);
  font-size: 4rem;
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 1.5rem 0;
  font-style: italic;
  letter-spacing: -0.02em;
}

.book-subtitle {
  font-size: 1.25rem;
  color: var(--ink-light);
  margin-bottom: 2rem;
}

.book-divider {
  width: 40px;
  height: 2px;
  background-color: var(--ink-color);
  margin: 2rem auto;
}

.book-author {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-light);
}

.book-chapter {
  margin-bottom: 5rem;
  animation: fadeUp 1.2s ease-out forwards;
  opacity: 0;
}

.book-chapter:nth-child(1) { animation-delay: 0.1s; }
.book-chapter:nth-child(2) { animation-delay: 0.3s; }
.book-chapter:nth-child(3) { animation-delay: 0.5s; }
.book-chapter:nth-child(4) { animation-delay: 0.7s; }
.book-chapter:nth-child(5) { animation-delay: 0.9s; }

.chapter-number {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-color);
  margin: 0 0 0.5rem 0;
  text-align: center;
}

.chapter-title {
  font-size: 2.25rem;
  font-weight: 400;
  font-style: italic;
  text-align: center;
  margin: 0 0 3rem 0;
}

.book-content p {
  margin-bottom: 2rem;
  text-align: justify;
  text-justify: inter-word;
}

.drop-cap {
  float: left;
  font-size: 4.5rem;
  line-height: 0.8;
  padding-top: 0.2rem;
  padding-right: 0.5rem;
  padding-left: 0.1rem;
  font-weight: 400;
  font-style: italic;
  color: var(--ink-color);
}

.book-footer {
  text-align: center;
  margin-top: 6rem;
  padding-top: 3rem;
  font-family: var(--font-ui);
  color: var(--ink-light);
  font-size: 0.875rem;
  animation: fadeUp 1.2s ease-out forwards;
  animation-delay: 1.1s;
  opacity: 0;
}

.book-divider-small {
  width: 20px;
  height: 1px;
  background-color: var(--ink-light);
  margin: 0 auto 2rem auto;
  opacity: 0.5;
}

.book-btn-return {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.75rem 2rem;
  border: 1px solid var(--ink-color);
  color: var(--ink-color);
  text-decoration: none;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
}

.book-btn-return:hover {
  background-color: var(--ink-color);
  color: var(--paper-bg);
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .book-container {
    padding: 5rem 1.5rem 5rem;
  }
  
  .book-title {
    font-size: 2.75rem;
  }
  
  .book-content p {
    text-align: left;
    font-size: 1.05rem;
  }
  
  .drop-cap {
    font-size: 3.5rem;
  }
}
