:root {
  --coral: #E07A5F;
  --coral-hover: #c96a51;
  --sage: #81B29A;
  --sage-dark: #6a9a82;
  --linen: #FAF6F1;
  --charcoal: #2D2D2D;
  --gold: #F2CC8F;
  --gold-dark: #d4b37a;
  --white: #ffffff;
  --gray-light: #f5f0ea;
  --gray-mid: #8a8580;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--linen);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--sage-dark);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--coral);
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---- NAV ---- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid rgba(45, 45, 45, 0.08);
  transition: box-shadow 0.3s;
}

.nav.scrolled {
  box-shadow: 0 2px 20px rgba(45, 45, 45, 0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--charcoal);
  letter-spacing: 0.01em;
}

.nav-logo:hover {
  color: var(--coral);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--charcoal);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--coral);
  transition: width 0.25s;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--charcoal);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---- HERO ---- */

.hero {
  padding: 7rem 0 4rem;
  background: linear-gradient(180deg, var(--white) 0%, var(--linen) 100%);
  min-height: 85vh;
  display: flex;
  align-items: center;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-cover {
  display: flex;
  justify-content: center;
}

.hero-cover img {
  width: 100%;
  max-width: 360px;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(45, 45, 45, 0.2), 0 8px 20px rgba(45, 45, 45, 0.1);
}

.hero-text {
  max-width: 480px;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--coral);
  margin-bottom: 0.75rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--charcoal);
  margin-bottom: 1rem;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 500;
  color: #4a4540;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.hero-blurb {
  font-size: 1.05rem;
  color: var(--charcoal);
  opacity: 0.85;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.15s;
  cursor: pointer;
  border: none;
}

.btn:hover {
  transform: translateY(-1px);
}

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

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

.btn-outline {
  background: transparent;
  color: var(--sage-dark);
  border: 2px solid var(--sage);
}

.btn-outline:hover {
  background: var(--sage);
  color: var(--white);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---- SECTIONS ---- */

section {
  padding: 5rem 0;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--charcoal);
}

.section-rule {
  width: 60px;
  height: 3px;
  background: var(--coral);
  margin: 0 auto 2.5rem;
  border: none;
}

/* ---- ABOUT THE BOOK ---- */

.about-book {
  background: var(--white);
}

.about-book-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.about-book-inner p {
  text-align: justify;
}

.about-book-inner p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  color: var(--charcoal);
  opacity: 0.9;
}

.features {
  list-style: none;
  text-align: left;
  max-width: 520px;
  margin: 0 auto;
}

.features li {
  padding: 0.6rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.95rem;
  color: var(--charcoal);
  opacity: 0.85;
}

.features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--coral);
  border-radius: 50%;
}

.about-book .btn {
  margin-top: 1rem;
}

/* ---- ABOUT THE AUTHOR ---- */

.about-author {
  background: var(--linen);
}

.about-author-inner {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 750px;
  margin: 0 auto;
}

.author-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--white);
  box-shadow: 0 4px 20px rgba(45, 45, 45, 0.1);
  background: var(--coral);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.about-author-text p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1rem;
  color: var(--charcoal);
  opacity: 0.9;
}

/* ---- NEWSLETTER ---- */

.newsletter {
  background: var(--charcoal);
  color: var(--white);
  text-align: center;
}

.newsletter .section-heading {
  color: var(--white);
}

.newsletter .section-rule {
  background: var(--coral);
}

.newsletter-text {
  font-size: 1.05rem;
  opacity: 0.9;
  max-width: 500px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.newsletter-form {
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  gap: 0.75rem;
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 0.85rem 1.2rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 0.95rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}

.newsletter-form input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.newsletter-form input[type="email"]:focus {
  border-color: var(--gold);
}

.newsletter-form .btn {
  background: var(--coral);
  color: var(--white);
  white-space: nowrap;
}

.newsletter-form .btn:hover {
  background: var(--coral-hover);
}

.newsletter-note {
  font-size: 0.8rem;
  opacity: 0.6;
  margin-top: 1rem;
}

/* ---- FOOTER ---- */

.footer {
  background: #3a3632;
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 0;
  text-align: center;
}

.footer-socials {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  list-style: none;
}

.footer-socials a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-socials a:hover {
  color: var(--coral);
}

.footer-socials svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.footer-copy {
  font-size: 0.8rem;
  opacity: 0.5;
}

/* ---- BOOK DETAIL PAGE ---- */

.book-detail {
  padding: 7rem 0 4rem;
}

.book-detail-inner {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3rem;
  align-items: start;
  max-width: 950px;
  margin: 0 auto;
}

.book-detail-cover {
  position: sticky;
  top: 84px;
  padding-top: 1.5rem;
}

.book-detail-cover img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 15px 50px rgba(45, 45, 45, 0.18);
}

.book-detail-info {
  text-align: left;
}

.book-detail-info h1 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

.book-detail-info .book-meta {
  font-size: 0.9rem;
  color: var(--gray-mid);
  margin-bottom: 1.5rem;
}

.book-detail-info .book-description {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.book-detail-info .book-description p {
  margin-bottom: 1rem;
}

.book-detail-features {
  list-style: none;
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--gray-light);
  border-radius: 8px;
}

.book-detail-features li {
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
  font-size: 0.95rem;
}

.book-detail-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--coral);
  border-radius: 50%;
}

.book-comps {
  font-style: italic;
  color: var(--gray-mid);
  margin-top: 1.5rem;
  font-size: 1rem;
}

.buy-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* ---- MOBILE ---- */

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0;
    border-bottom: 1px solid rgba(45, 45, 45, 0.08);
    box-shadow: 0 10px 30px rgba(45, 45, 45, 0.08);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    border-bottom: 1px solid rgba(45, 45, 45, 0.05);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    display: block;
    padding: 0.85rem 0;
    font-size: 1rem;
  }

  .hero {
    padding: 6rem 0 3rem;
    min-height: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-cover {
    order: -1;
  }

  .hero-cover img {
    max-width: 260px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-tagline {
    font-size: 1.05rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  section {
    padding: 3.5rem 0;
  }

  .section-heading {
    font-size: 1.6rem;
  }

  .about-author-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .author-photo {
    margin: 0 auto;
    width: 160px;
    height: 160px;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .book-detail-inner {
    grid-template-columns: 1fr;
  }

  .book-detail-cover {
    display: flex;
    justify-content: center;
    position: static;
    padding-top: 0;
  }

  .book-detail-cover img {
    max-width: 280px;
  }

  .book-detail-info h1 {
    font-size: 1.75rem;
  }

  .buy-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  .hero-cover img {
    max-width: 220px;
  }

  .hero-title {
    font-size: 1.75rem;
  }
}
