/* Fonts: Playfair Display for headings, Inter for body */
:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #666666;
  --brand: #1a1a1a;
  --accent: #0f766e; /* teal */
  --border: #e5e5e5;
  --container: 1120px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Ensure full width sections have white background on wider screens */
body {
  background: #ffffff;
}

/* Main content wrapper for full HD constraint */
.main-wrapper {
  max-width: 1920px;
  margin: 0 auto;
  margin-top: 65px;
  background: #ffffff;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  background: #000;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
}

.uppercase {
  text-transform: uppercase;
}

/* Header */
.site-header {
  position: fixed;
  height: 65px;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
  width: 100%;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font-family: Droid Serif;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.12em;
  text-decoration: none;
  color: var(--brand);
}
.site-nav .nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  padding: 8px 10px;
  border-radius: 8px;
}
.nav-list {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 4px;
}

/* Parallax Section */
.parallax {
  height: 100vh;
  overflow: hidden;
  position: relative;
  max-width: 1920px;
  margin: 0 auto;
}

.parallax img {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  will-change: transform;
  z-index: 1;
}

/* Change parallax image for screens smaller than 1350px */
@media (max-width: 1349px) {
  .parallax img {
    content: url('../images/front_elis_marvelous_adventures_book2.jpg');
  }
}

/* Change parallax image for screens smaller than 800px */
@media (max-width: 800px) {
  .parallax img {
    /* Use the small source and make the image span full width (avoid side-cropping).
       JS will apply vertical-only transforms so we keep left:0 and translateY centering. */
    content: url('../images/front_elis_marvelous_adventures_book_small.jpg');
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: auto;
    object-fit: cover; /* keeps good crop when needed */
    transform: translateY(-50%);
    will-change: transform;
    z-index: 1;
  }

  /* Slightly reduce parallax section height on very small screens for a better crop */
  .parallax { height: 60vh; }
}

/* Eli Series Section */
.eli-series {
  padding: 0 24px;
  /* text-align: center; */
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); 
}

.eli-series h3 {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1.5rem;
    color: var(--text);
  }

/* Books Section */
.books {
  padding: 30px 0;
  background: #fff;
}

.books h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2.5rem;
  font-weight: 600;
  text-align: center;
  margin: 0 0 3rem;
  color: var(--text);
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.book-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease, max-height 0.3s ease;
  height: 800px;
  position: relative;
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.book-card.expanded {
  height: auto;
  max-height: none;
}

.book-card:not(.expanded) .expand-btn {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  right: 2rem;
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  z-index: 10;
}

.book-card.expanded .expand-btn {
  position: static;
  align-self: flex-start;
  margin-top: 1rem;
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.expand-btn:hover {
  background: #0d5d56;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
}

.expand-btn:active {
  transform: translateY(0);
}

.book-image {
  width: 100%;
  height: 300px;
  overflow: hidden;
  background: #f8f9fa;
  flex-shrink: 0;
}

.book-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.book-card:hover .book-image img {
  transform: scale(1.05);
}

.book-content {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.book-card:not(.expanded) .book-content::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 1));
  pointer-events: none;
  z-index: 5;
}

.book-content h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--text);
  line-height: 1.3;
}

.book-content p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

.about {
  padding: 2rem;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about .container {
  display: flex;
  align-items: center;
  gap: 3rem;
  width: 70%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.about img {
  width: 30%;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.about-content {
  width: 70%;
  padding-left: 2rem;
}

.about-content h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 600;
  margin: 00;
  color: var(--text);
}

.about-content p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.1rem;
  margin: 0;
}

/* Footer */
.site-footer { 
  border-top: 1px solid var(--border); 
  padding: 24px 0; 
  background: #fff; 
}
.footer-inner { 
  display: flex; 
  gap: 16px; 
  flex-wrap: wrap; 
  align-items: center; 
  justify-content: space-between; 
}

/* Responsive */
@media (max-width: 900px) {
  .site-nav .nav-toggle { display: inline-block; }
  .nav-list { 
    display: none; 
    position: absolute; 
    right: 24px; 
    /* top: 64px;  */
    background: #fff; 
    border: 1px solid var(--border); 
    border-radius: 12px; 
    padding: 12px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); 
  }
  .nav-list.open { display: grid; gap: 8px; }
  
  .parallax { height: 80vh; }
  
  .books-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .books h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
}

@media (min-width: 900px) and (max-width: 1500px) {
  .about .container {
    width: 100%;
    padding: 0;
  }
}

@media (max-width: 900px) {
  .about .container {
    flex-direction: column;
    gap: 2rem;
    width: 90%;
  }
  
  .about img {
    width: 100%;
    order: 1;
  }
  
  .about-content {
    width: 100%;
    padding-left: 0;
    /* text-align: center; */
    order: 2;
  }
  
  .about-content h2 {
    font-size: 2rem;
  }
}

@media (max-width: 600px) {
  .parallax { height: 70vh; }
  
  .books {
    padding: 30px 0;
  }
  
  .books h2 {
    font-size: 1.75rem;
  }
  
  .book-content {
    padding: 1.5rem;
  }
  
  .book-content h3 {
    font-size: 1.25rem;
  }
  
  .book-image {
    height: 250px;
  }
  
  .about {
    padding: 1.5rem;
  }
  
  .about .container {
    padding: 1.5rem;
  }
  
  .about-content h2 {
    font-size: 1.75rem;
  }
  
  .about-content p {
    font-size: 1rem;
  }
}