:root {
  --black: #111111;
  --white: #ffffff;
  --grey-bg: #f6f5f3;
  --grey-line: #e4e2de;
  --grey-text: #6b6b6b;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body {
  font-size: 17px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--grey-line);
}

.nav-logo {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-logo .logo-dots {
  display: inline-flex;
  gap: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

.nav-logo .logo-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #C9A66B;
  display: inline-block;
}

.nav-links {
  display: flex;
  gap: 36px;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.nav-links a {
  color: var(--grey-text);
  transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--black); }

/* Hero */
.hero {
  text-align: center;
  padding: 120px 0 100px;
}

.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey-text);
  margin-bottom: 24px;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 76px;
  line-height: 1.05;
  margin: 0 0 28px;
  letter-spacing: 0.01em;
}

.hero p.tagline {
  font-size: 19px;
  color: var(--grey-text);
  max-width: 480px;
  margin: 0 auto 40px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 15px 34px;
  font-size: 15px;
  letter-spacing: 0.03em;
  border-radius: 2px;
  border: 1px solid var(--black);
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: var(--black);
  color: var(--white);
}

.btn-primary:hover { background: #333; }

.btn-secondary {
  background: transparent;
  color: var(--black);
}

.btn-secondary:hover { background: var(--grey-bg); }

/* Sections */
section { padding: 90px 0; }

.section-alt { background: var(--grey-bg); }

.section-heading {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 600;
  margin: 0 0 16px;
  text-align: center;
}

.section-sub {
  text-align: center;
  color: var(--grey-text);
  max-width: 560px;
  margin: 0 auto 56px;
  font-size: 16px;
}

/* Book grid */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 260px));
  justify-content: center;
  gap: 48px;
}

.book-card {
  text-align: center;
}

.book-cover {
  aspect-ratio: 2 / 3;
  background: var(--black);
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  margin-bottom: 24px;
  font-family: var(--serif);
}

.book-cover .cover-eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 18px;
}

.book-cover .cover-title {
  font-size: 22px;
  line-height: 1.3;
  font-weight: 600;
}

.book-cover-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 24px;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.16)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.1));
}

.cover-mobile-only { display: none; }

.book-cover-img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 1px 4px 4px 1px;
}

.book-cover-wrap::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 10px;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0));
  border-radius: 2px 0 0 2px;
}

.book-detail .book-cover-wrap {
  margin-bottom: 0;
  position: sticky;
  top: 40px;
}

.book-card h3 {
  font-family: var(--serif);
  font-size: 21px;
  margin: 0 0 8px;
}

.book-card .book-desc {
  color: var(--grey-text);
  font-size: 15px;
  margin: 0 0 18px;
}

.book-card .book-price {
  font-size: 15px;
  margin-bottom: 18px;
  color: var(--grey-text);
}

.book-card .book-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Book detail page */
.book-detail {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 72px;
  padding-top: 80px;
  padding-bottom: 80px;
}

.book-detail .book-cover {
  aspect-ratio: 2 / 3;
  width: 100%;
  margin-bottom: 0;
  position: sticky;
  top: 40px;
}

.book-detail h1 {
  font-family: var(--serif);
  font-size: 42px;
  margin: 0 0 8px;
  line-height: 1.15;
}

.book-detail .book-subtitle {
  color: var(--grey-text);
  font-size: 17px;
  margin-bottom: 32px;
}

.book-detail .price-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 36px;
}

.book-detail .price {
  font-size: 22px;
  font-family: var(--serif);
}

.book-detail h2 {
  font-family: var(--serif);
  font-size: 24px;
  margin: 48px 0 16px;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--grey-line);
}

.toc-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--grey-line);
  display: flex;
  justify-content: space-between;
  color: var(--grey-text);
  font-size: 15px;
}

.toc-list li span:first-child { color: var(--black); }

.review {
  border-left: 2px solid var(--black);
  padding-left: 20px;
  margin-bottom: 28px;
  font-style: italic;
  color: #333;
}

.review cite {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-size: 13px;
  color: var(--grey-text);
  letter-spacing: 0.03em;
}

/* About */
.prose {
  max-width: 620px;
  margin: 0 auto;
  font-size: 18px;
}

.prose p { margin-bottom: 24px; }

/* Contact form */
.contact-form {
  max-width: 520px;
  margin: 0 auto;
}

.form-row { margin-bottom: 22px; }

label {
  display: block;
  font-size: 14px;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
  color: var(--grey-text);
}

input, textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  font-family: var(--sans);
  border: 1px solid var(--grey-line);
  border-radius: 2px;
  background: var(--white);
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--black);
}

textarea { min-height: 140px; resize: vertical; }

#form-status {
  margin-top: 18px;
  font-size: 14px;
  color: var(--grey-text);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--grey-line);
  padding: 48px 0;
  text-align: center;
  color: var(--grey-text);
  font-size: 14px;
}

.site-footer .footer-links {
  display: flex;
  gap: 28px;
  justify-content: center;
  margin-bottom: 18px;
}

@media (max-width: 720px) {
  .hero h1 { font-size: 46px; }
  .book-detail { grid-template-columns: 1fr; padding-top: 24px; gap: 0; }
  .book-detail .book-cover-wrap { position: static; max-width: 220px; margin: 0 auto 40px; }
  section { padding: 60px 0; }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .nav-links { gap: 20px; font-size: 14px; }

  .book-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 200px)); }

  .cover-desktop-only { display: none; }
  .cover-mobile-only { display: block; max-width: 220px; margin: 0 auto 32px; }
}
