/* ============================================
   Kalendale Codex — Burnt Parchment Theme v1.1
   ============================================ */

/* ---------- Global Reset & Base ---------- */
html, body {
  margin: 0;
  padding: 0;
  background: url("img/parchment-bg.png") center/cover repeat fixed;
  color: #2b1b10;
  font-family: 'EB Garamond', 'Georgia', serif;
  line-height: 1.6;
}

/* Subtle vignette for extra depth */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, transparent 60%, rgba(0,0,0,0.25) 100%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- Header & Navigation ---------- */
header {
  background: rgba(255, 250, 235, 0.85);
  border-bottom: 2px solid #c4a873;
  padding: 25px 0 15px;
  text-align: center;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.25);
  position: relative;
  z-index: 1;
}

header h1 {
  margin: 0 0 8px;
  color: #4a2b00;
  font-weight: 700;
  letter-spacing: 1px;
  font-family: 'Uncial Antiqua', 'IM Fell English', serif;
  text-shadow: 0 1px 1px #fff4;
}

nav a {
  color: #7a4b00;
  margin: 0 10px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.2s;
}
nav a:hover   { color: #b56d00; }
nav a.active  { color: #b56d00; text-decoration: underline; }

/* ---------- Page Layout ---------- */
.page {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px 60px;
  position: relative;
  z-index: 1;
}

/* Paper-like main content panel */
#content {
  background: rgba(255, 255, 240, 0.9);
  border: 1px solid #c4a873;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.35);
  margin: 2rem auto;
  padding: 2rem 3rem;
  max-width: 900px;
  border-radius: 8px;
  backdrop-filter: blur(1px);
}

/* ---------- Row Layout (Bestiary Entries) ---------- */
.row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  padding: 26px 0;
  border-bottom: 1px solid #c4a873;
  align-items: start;
}

.row img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.4);
  object-fit: cover;
}

.row h2 {
  margin-top: 0;
  color: #4a2b00;
  font-family: 'Uncial Antiqua', 'IM Fell English', serif;
  text-shadow: 0 1px 0 #fff6;
}

.row p {
  margin: 0;
}

@media (max-width: 820px) {
  .row { grid-template-columns: 1fr; }
}

/* ---------- Image Expand-on-Click ---------- */
img.expandable {
  cursor: zoom-in;
  transition: transform 0.25s ease;
}

#overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.25s ease;
}

#overlay.visible {
  display: flex;
  opacity: 1;
}

#overlay img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 0 25px rgba(0,0,0,0.8);
  cursor: zoom-out;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

#overlay.visible img {
  transform: scale(1);
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  color: #000000;
  padding: 30px 0 60px;
  font-style: italic;
  text-shadow: 0 1px 0 #fff2;
}

/* Larger, more readable body text */
body {
  font-size: 1.3rem;      /* default is 1rem (~16 px); this = ~18 px */
  line-height: 1.7;       /* adds breathing room */
}

@media (max-width: 768px) {
  body {
    font-size: 1rem;
    line-height: 1.6;
  }
}

.page img, .row img {
  filter: brightness(1.15) contrast(1.05);
  transition: filter 0.3s ease;
}
.page img:hover {
  filter: brightness(1.25) contrast(1.1);
}
