:root {
  /* Theme: adjust palette or fonts here */
  --paper: #f5f0e6;
  --paper-deep: #ede6d9;
  --paper-ink: #d8cfbd;
  --ink: #2f2418;
  --ink-muted: #5b4c3a;
  --accent: #c6a676;
  --accent-dark: #a78657;
  --line: #d3c5ae;
  --shadow: 0 14px 30px rgba(0, 0, 0, 0.06);
  --serif: 'Libre Baskerville', 'Georgia', serif;
  --sans: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.page-background {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.4), transparent 35%),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.45), transparent 30%),
    radial-gradient(circle at 50% 80%, rgba(255, 255, 255, 0.35), transparent 35%),
    linear-gradient(120deg, var(--paper) 0%, var(--paper-deep) 100%);
}

body::before {
  /* Subtle paper grain */
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.45' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}

p {
  margin: 0 0 1em;
  color: var(--ink-muted);
}

a {
  color: var(--accent-dark);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--ink);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 6vw;
  background: rgba(245, 240, 230, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(4px);
}

.logo-mark {
  font-size: 1.5rem;
  color: var(--accent-dark);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.nav {
  margin-left: auto;
  display: flex;
  gap: 1rem;
  font-weight: 600;
}

.nav a {
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
  transition: background 160ms ease, color 160ms ease;
}

.nav a:hover {
  background: rgba(198, 166, 118, 0.15);
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  padding: 4.5rem 6vw 3.5rem;
  align-items: center;
}

.hero-content {
  max-width: 620px;
}

.hero h1 {
  font-size: clamp(2.1rem, 3vw, 2.8rem);
}

.lead {
  font-size: 1.05rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--accent-dark);
  margin-bottom: 0.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, border 120ms ease;
  font-family: var(--sans);
  color: var(--ink);
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--paper);
  box-shadow: var(--shadow);
  border-color: rgba(0, 0, 0, 0.05);
}

.button.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.08);
}

.button.ghost {
  background: transparent;
  border-color: var(--line);
}

.button.ghost:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.hero-visual {
  display: flex;
  justify-content: flex-end;
}

.hero-card {
  background: rgba(255, 255, 255, 0.9);
  padding: 0.75rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 14px;
  max-width: 320px;
}

.hero-card img {
  width: 100%;
  display: block;
  border-radius: 10px;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero-card-body {
  padding: 0.75rem 0.5rem 0.25rem;
}

.hero-card-title {
  margin: 0;
  font-weight: 700;
  font-family: var(--serif);
}

.hero-card-meta {
  margin: 0.35rem 0;
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.hero-card-note {
  margin: 0;
  font-size: 0.95rem;
}

.section {
  padding: 3.5rem 6vw;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
}

.section-header {
  max-width: 720px;
  margin-bottom: 1.5rem;
}

.section-description {
  max-width: 640px;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 220px));
  gap: 1.5rem;
  justify-content: start;
  align-items: start;
}

.collection-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.section-nav {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.section-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section-link {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.7);
  transition: border 120ms ease, color 120ms ease, transform 120ms ease;
}

.section-link:hover,
.section-link:focus {
  border-color: var(--accent);
  color: var(--ink);
  transform: translateY(-1px);
}

.collection-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin: 0;
  color: var(--ink);
}

.book-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 120ms ease, box-shadow 120ms ease, border 120ms ease;
}

.book-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.book-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.book-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.book-card h3 {
  font-size: 1.1rem;
}

.book-tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.2rem;
}

.book-meta {
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.book-desc {
  font-size: 0.95rem;
  margin: 0.25rem 0 0.5rem;
}

.card-actions {
  margin-top: auto;
}

.two-column {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.text-block {
  max-width: 720px;
}

.contact-section {
  align-items: start;
}

.contact-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.contact-block {
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--accent-dark);
  margin: 0 0 0.35rem;
}

.contact-value {
  font-size: 1.05rem;
  margin: 0;
}

.small-note {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin: 0.4rem 0 0;
}

.contact-block ul {
  list-style: none;
  padding: 0;
  margin: 0.2rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.contact-form {
  grid-column: span 2;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-row label {
  font-weight: 600;
  color: var(--ink);
}

.form-row input,
.form-row textarea {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  font-family: var(--sans);
  color: var(--ink);
  transition: border 120ms ease, box-shadow 120ms ease;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(198, 166, 118, 0.25);
}

.detail-hero {
  border-top: none;
}

.detail-header {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.detail-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: start;
}

.book-gallery {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.thumbnail-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.thumbnail-row img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border 120ms ease, transform 120ms ease;
}

.thumbnail-row img.active {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.detail-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
}

.detail-text h3 {
  margin-top: 0;
}

.image-nav {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.image-count {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin: 0.5rem 0 0;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 30;
}

.lightbox.active {
  display: flex;
}

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(25, 20, 15, 0.5);
  backdrop-filter: blur(2px);
}

.lightbox-content {
  position: relative;
  z-index: 1;
  padding: 1.25rem;
  width: min(90vw, 900px);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.lightbox-content img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper-ink);
}

.lightbox-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  font-size: 1.6rem;
  color: var(--ink);
  cursor: pointer;
}

.site-footer {
  padding: 1.5rem 6vw 2rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--ink-muted);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
}

@media (max-width: 720px) {
  .site-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    padding-top: 3rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-form {
    grid-column: span 1;
  }
}
