:root {
  --cream: #f7f1e6;
  --cream-soft: #fbf6ec;
  --ink: #2b1d12;
  --ink-soft: #4a3a2c;
  --brown: #8a5a3b;
  --brown-dark: #6b4226;
  --gold: #b8893a;
  --burgundy: #7a2e2e;
  --line: #e3d8c5;
  --shadow: 0 6px 20px rgba(80, 50, 20, 0.08);
  --shadow-hover: 0 12px 30px rgba(80, 50, 20, 0.14);
  --radius: 10px;
  --radius-sm: 6px;
  --serif: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Subtle paper-grain texture on the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.45  0 0 0 0 0.32  0 0 0 0 0.18  0 0 0 0.07 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

main, header, footer { position: relative; z-index: 1; }

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

h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1.12; }
h2 { font-size: clamp(1.65rem, 3.2vw, 2.35rem); line-height: 1.18; }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.25; }

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

a {
  color: var(--brown-dark);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--burgundy); }

img { max-width: 100%; display: block; }

/* Layout */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}
.container-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* Header */
.site-header {
  background: rgba(251, 246, 236, 0.92);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(184,137,58,0.15);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}
.brand-logo {
  height: clamp(46px, 6.5vw, 80px);
  width: auto;
  max-width: 60vw;
  display: block;
  transition: opacity 0.2s ease;
}
.brand:hover .brand-logo { opacity: 0.75; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.5rem;
  color: var(--ink);
  cursor: pointer;
}

.nav ul {
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  font-size: 0.95rem;
  color: var(--ink-soft);
  font-weight: 500;
  letter-spacing: 0.3px;
  position: relative;
  padding: 0.25rem 0;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.25s ease;
}
.nav a:hover::after,
.nav a.active::after { width: 100%; }
.nav a.active { color: var(--brown-dark); }

/* Hero */
.hero {
  padding: clamp(4rem, 9vw, 7rem) 0 clamp(3.5rem, 7vw, 5.5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg,
      rgba(247, 241, 230, 0.92) 0%,
      rgba(247, 241, 230, 0.86) 40%,
      rgba(247, 241, 230, 0.94) 80%,
      var(--cream) 100%),
    radial-gradient(ellipse at 50% 0%, rgba(184, 137, 58, 0.18), transparent 65%),
    url("assets/hero-bg.jpg") center/cover no-repeat,
    var(--cream);
  border-bottom: 1px solid var(--line);
}
.hero > .container { position: relative; z-index: 2; }
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--gold), transparent);
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.6;
}
.hero::before { top: 0; }
.hero::after { bottom: 0; }

.hero .ornament {
  font-family: var(--serif);
  font-size: 1.8rem;
  color: var(--gold);
  letter-spacing: 1rem;
  margin-bottom: 1.2rem;
  opacity: 0.85;
}
.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: clamp(2px, 0.6vw, 5px);
  font-size: clamp(0.72rem, 0.8vw, 0.82rem);
  color: var(--gold);
  margin-bottom: 1.2rem;
  font-weight: 600;
}
.hero h1 {
  max-width: 880px;
  margin: 0 auto 1rem;
  font-weight: 500;
}
.hero h1 em {
  color: var(--brown-dark);
  font-style: italic;
}
.hero p.lead {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  font-size: 1.1rem;
  color: var(--ink-soft);
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Decorative section ornament divider */
.ornament-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  color: var(--gold);
  margin: 0 auto 2rem;
  max-width: 300px;
}
.ornament-divider::before,
.ornament-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}
.ornament-divider .glyph {
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1;
}

/* Sections */
section { padding: clamp(3rem, 7vw, 5.5rem) 0; position: relative; }
.section-title {
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.section-title .eyebrow {
  display: block;
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 0.75rem;
  color: var(--gold);
  margin-bottom: 0.9rem;
  font-weight: 600;
}
.section-title h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 0.6rem;
}
.section-title h2::after {
  content: "❦";
  display: block;
  color: var(--gold);
  font-size: 1rem;
  margin-top: 0.6rem;
  opacity: 0.7;
}

/* Pull quote / manifesto block */
.manifesto {
  background:
    linear-gradient(180deg, rgba(184,137,58,0.06), rgba(122,46,46,0.04)),
    var(--cream-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 5rem 0;
  text-align: center;
  position: relative;
}
.manifesto::before {
  content: "“";
  position: absolute;
  top: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-size: 9rem;
  line-height: 1;
  color: var(--gold);
  opacity: 0.18;
  pointer-events: none;
}
.manifesto blockquote {
  margin: 0 auto;
  max-width: 760px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 1.85rem);
  line-height: 1.5;
  color: var(--ink);
  padding: 0 1.5rem;
}
.manifesto cite {
  display: block;
  margin-top: 1.5rem;
  font-style: normal;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

/* Drop cap for elegant first paragraph */
.dropcap::first-letter {
  font-family: var(--serif);
  float: left;
  font-size: 4.2rem;
  line-height: 0.85;
  padding: 0.4rem 0.6rem 0 0;
  color: var(--brown-dark);
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--brown-dark);
  color: var(--cream-soft);
}
.btn-primary:hover { background: var(--burgundy); color: #fff; }

.btn-secondary {
  background: transparent;
  color: var(--brown-dark);
  border-color: var(--brown);
}
.btn-secondary:hover { background: var(--brown); color: var(--cream-soft); }

.btn-gold {
  background: var(--gold);
  color: #fff;
}
.btn-gold:hover { background: #a07526; color: #fff; }

/* Book cards grid — 4 items default, no orphan rows */
.books-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
@media (max-width: 1024px) {
  .books-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .books-grid { grid-template-columns: 1fr; max-width: 360px; margin-left: auto; margin-right: auto; }
}

/* Forced 2-column variant (home featured) */
.books-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 520px) {
  .books-grid-2 { grid-template-columns: 1fr; max-width: 360px; }
}

.book-card {
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}
.book-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 3px solid var(--gold);
  border-radius: var(--radius) var(--radius) 0 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.book-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}
.book-card:hover::before { opacity: 1; }

.book-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #ede0c8, #d8c5a3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.book-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 65%, rgba(43,29,18,0.18));
  pointer-events: none;
}
.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.book-card:hover .book-cover img { transform: scale(1.04); }

.book-body {
  padding: 1.75rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.book-tag {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.book-body h3 {
  font-size: 1.45rem;
  margin-bottom: 0.6rem;
  line-height: 1.2;
}
.book-body p {
  font-size: 0.96rem;
  flex: 1;
  margin-bottom: 1.4rem;
  font-style: italic;
  color: var(--ink-soft);
}
.book-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.book-actions .btn {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-size: 0.88rem;
}

/* Book detail page */
.book-detail {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
  padding-top: clamp(2rem, 5vw, 3.5rem);
  max-width: 1040px;
  margin: 0 auto;
}
@media (max-width: 760px) {
  .book-detail {
    grid-template-columns: 1fr;
    max-width: 480px;
  }
}
.book-detail .cover {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(80, 50, 20, 0.22), 0 0 0 1px rgba(184,137,58,0.25);
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #ede0c8, #d8c5a3);
  position: relative;
  transform: rotate(-1deg);
  transition: transform 0.4s ease;
}
.book-detail .cover:hover { transform: rotate(0deg) scale(1.01); }
.book-detail .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.book-detail h1 { margin-bottom: 0.25rem; }
.book-detail .author {
  font-family: var(--serif);
  font-style: italic;
  color: var(--brown);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}
.book-detail .description {
  font-size: 1.02rem;
  margin-bottom: 2rem;
}

.book-meta {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.25rem 0;
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 640px) {
  .book-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
}
.book-meta dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.book-meta dd {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink);
}

.book-detail .actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.other-books {
  background: var(--cream-soft);
  border-top: 1px solid var(--line);
  padding: 3rem 0;
  margin-top: 2rem;
}
.other-books h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.6rem;
}
.other-books-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  max-width: 760px;
  margin: 0 auto;
}
@media (max-width: 640px) {
  .other-books-list { grid-template-columns: 1fr; max-width: 320px; }
}
.other-books-list a {
  background: var(--cream);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  text-align: center;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.other-books-list a:hover {
  background: var(--brown-dark);
  color: var(--cream-soft);
  border-color: var(--brown-dark);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
  max-width: 980px;
  margin: 0 auto;
}
@media (max-width: 760px) {
  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}
.about-photo {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #ede0c8, #c9a877);
  box-shadow: var(--shadow);
  position: relative;
  border: 6px solid var(--cream-soft);
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-text p { font-size: 1.05rem; }

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  max-width: 1040px;
  margin: 0 auto;
}
@media (max-width: 880px) {
  .contact-layout {
    grid-template-columns: 1fr;
    max-width: 560px;
  }
}

.contact-letter {
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  position: relative;
  box-shadow: var(--shadow);
}
.contact-letter::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.5rem;
  right: 1.5rem;
  height: 3px;
  background: var(--gold);
  border-radius: 0 0 3px 3px;
}
.contact-letter p {
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 1.2rem;
}
.contact-letter p:last-child { margin-bottom: 0; }
.letter-sign {
  font-style: italic;
  color: var(--brown-dark);
  margin-top: 1.5rem !important;
  font-size: 1.2rem !important;
}

.contact-card-main {
  background:
    linear-gradient(180deg, rgba(184,137,58,0.06), transparent 70%),
    var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(2rem, 4vw, 2.75rem);
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.contact-card-main::after {
  content: "✉";
  position: absolute;
  top: -30px;
  right: -20px;
  font-size: 12rem;
  color: var(--gold);
  opacity: 0.06;
  line-height: 1;
  pointer-events: none;
}
.contact-tag {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 1rem;
}
.contact-card-main h2 {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  word-break: break-all;
  margin-bottom: 1rem;
  color: var(--ink);
  font-weight: 600;
}
.contact-card-main > p {
  font-size: 0.98rem;
  color: var(--ink-soft);
  margin-bottom: 1.75rem;
}

.btn-large {
  padding: 0.95rem 1.75rem;
  font-size: 1rem;
}

.contact-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.contact-meta > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}
.meta-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  font-weight: 600;
}
.meta-value {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
}
@media (max-width: 420px) {
  .contact-meta { grid-template-columns: 1fr; gap: 1rem; }
  .contact-meta > div { flex-direction: row; gap: 0.75rem; }
}

/* Featured highlights on home — 3 items, never an orphan */
.highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
  text-align: center;
}
@media (max-width: 760px) {
  .highlights {
    grid-template-columns: 1fr;
    max-width: 380px;
    margin: 0 auto;
  }
}
.highlight {
  padding: 2.5rem 1.5rem;
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.highlight::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: var(--gold);
  border-radius: 0 0 3px 3px;
}
.highlight:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.highlight .icon {
  color: var(--gold);
  margin: 0 auto 0.75rem;
  line-height: 1;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.highlight .icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.highlight h3 {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
  font-style: italic;
}
.highlight p { font-size: 0.95rem; margin-bottom: 0; }

/* Footer */
.site-footer {
  background:
    radial-gradient(ellipse at top, rgba(184,137,58,0.10), transparent 60%),
    #2a1c12;
  color: #d9c9b3;
  padding: 3.5rem 0 2.5rem;
  text-align: center;
  margin-top: 5rem;
  border-top: 3px solid var(--gold);
}
.site-footer .footer-signature {
  max-width: 220px;
  height: auto;
  margin: 0 auto 1rem;
  display: block;
  filter: invert(94%) sepia(18%) saturate(450%) hue-rotate(355deg) brightness(101%);
  opacity: 0.85;
}
.site-footer .footer-tag {
  font-family: var(--serif);
  font-style: italic;
  color: #c9b48f;
  font-size: 0.95rem;
  margin: 0 0 1.5rem;
}
.site-footer p { color: #b9a584; margin: 0.25rem 0; font-size: 0.85rem; }
.site-footer .footer-brand {
  font-family: var(--serif);
  font-weight: 600;
  color: #f3e3c4;
  font-size: 1.15rem;
  letter-spacing: 0.3px;
  margin: 0 0 0.25rem;
}
.site-footer .footer-divider {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 1.5rem auto;
  opacity: 0.6;
}

/* Responsive */
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream-soft);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav.open { max-height: 400px; }
  .nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
  }
  .nav li { border-top: 1px solid var(--line); }
  .nav li:first-child { border-top: 0; }
  .nav a {
    display: block;
    padding: 1rem 1.5rem;
  }
  .nav a::after { display: none; }

  .book-detail .cover {
    max-width: 320px;
    margin: 0 auto;
  }
  .about-photo {
    max-width: 220px;
    margin: 0 auto;
  }
}
