@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

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

:root {
  --bg: #FAF8F4;
  --text: #2C2A26;
  --accent: #3D5A4C;
  --muted: #6B6760;
  --max-width: 640px;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.7;
  padding: 0 1.25rem;
}

/* ── Layout ── */

.site-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
}

section {
  padding: 4rem 0;
  border-top: 1px solid #E0DDD7;
}

section:first-of-type {
  border-top: none;
}

/* ── Typography ── */

h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(2rem, 6vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--text);
}

h2 {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

em {
  font-style: italic;
}

/* ── Hero ── */

#hero {
  padding-top: 5rem;
  padding-bottom: 4rem;
  border-top: none;
}

.hero-tagline {
  font-size: 1.05rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
}

.hero-cta {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.03em;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: opacity 0.15s;
}

.hero-cta:hover,
.hero-cta:focus {
  opacity: 0.7;
}

/* ── About ── */

.about-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.author-photo-wrap {
  flex: 0 0 auto;
  width: 140px;
}

.author-photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  filter: grayscale(15%);
}

#about p {
  font-size: 0.97rem;
}

@media (max-width: 480px) {
  .about-layout {
    flex-direction: column;
  }

  .author-photo-wrap {
    width: 110px;
  }
}

/* ── Book ── */

.book-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.book-cover {
  flex: 0 0 auto;
  width: 160px;
}

.book-cover img {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: 0 4px 24px rgba(44, 42, 38, 0.14);
}

.book-cover-placeholder {
  width: 160px;
  aspect-ratio: 2 / 3;
  background: #E8E4DC;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-cover-placeholder span {
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  padding: 0.5rem;
  font-family: Georgia, serif;
  font-style: italic;
}

.book-info {
  flex: 1 1 auto;
}

.book-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.25;
  margin-bottom: 0.25rem;
}

.book-subhead {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 1.25rem;
}

.book-description {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.buy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.buy-link {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.04em;
  border: 1px solid var(--accent);
  padding: 0.45rem 1rem;
  transition: background-color 0.15s, color 0.15s;
}

.buy-link:hover,
.buy-link:focus {
  background-color: var(--accent);
  color: var(--bg);
}

/* ── Contact ── */

#contact p {
  font-size: 0.95rem;
}

#contact a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

#contact a:hover,
#contact a:focus {
  opacity: 0.7;
}

/* ── Footer ── */

footer {
  padding: 2rem 0 3rem;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  border-top: 1px solid #E0DDD7;
}

/* ── Mobile ── */

@media (max-width: 540px) {
  html {
    font-size: 17px;
  }

  #hero {
    padding-top: 3.5rem;
  }

  .book-layout {
    flex-direction: column;
  }

  .book-cover,
  .book-cover-placeholder {
    width: 130px;
  }
}

@media (max-width: 360px) {
  html {
    font-size: 16px;
  }
}
