/***************************************
VARIABLES
***************************************/

:root {
  --color-bg: #faf8f4;
  --color-bg-alt: #f0ece3;
  --color-ink: #2b2b26;
  --color-muted: #6b6a62;
  --color-primary: #2f5233;
  --color-primary-dark: #203a24;
  --color-accent: #b3852c;
  --color-card: #ffffff;
  --color-border: #e4ddd0;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Open Sans', sans-serif;
  --header-height: 112px;
  --max-width: 1080px;
}

/***************************************
GENERAL
***************************************/

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-ink);
  line-height: 1.7;
}

.wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 6%;
}

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

img {
  max-width: 100%;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-ink);
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
}

.skip-link:focus {
  left: 0;
}

.section {
  padding: 80px 0;
}

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

.section-title {
  font-size: 2em;
  margin-bottom: 0.3em;
}

.section-intro {
  color: var(--color-muted);
  max-width: 640px;
  margin-bottom: 2.5em;
}

/***************************************
HEADER / NAV
***************************************/

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 6%;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-name {
  font-family: var(--font-heading);
  font-size: 2.15em;
  font-weight: 700;
  color: var(--color-primary);
}

.logo-tag {
  font-size: 1em;
  color: var(--color-muted);
  font-family: var(--font-body);
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-block;
  padding: 10px 14px;
  font-weight: 600;
  color: var(--color-ink);
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}

.site-nav a.active {
  color: var(--color-primary);
  background: rgba(47, 82, 51, 0.1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/***************************************
HERO
***************************************/

.hero {
  padding: 110px 0 90px;
  text-align: center;
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8em;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 1em;
}

.hero h1 {
  font-size: 2.75em;
  line-height: 1.15;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.hero .lead {
  max-width: 620px;
  margin: 1.2em auto 2em;
  font-size: 1.15em;
  color: var(--color-muted);
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 30px;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  padding: 11px 26px;
}

.btn-ghost:hover {
  background: var(--color-primary);
  color: #fff;
}

/***************************************
BOOKS
***************************************/

.publisher-group {
  margin-bottom: 3.5em;
}

.publisher-name {
  font-size: 1.3em;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 1.5em;
}

.books {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 28px;
}

.book-card a {
  display: block;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  height: 100%;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.book-card a:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(43, 43, 38, 0.1);
}

.book-cover {
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.book-cover img {
  max-height: 220px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.book-card h4 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1em;
  margin: 16px 14px 4px;
  color: var(--color-ink);
}

.book-meta {
  font-size: 0.85em;
  color: var(--color-muted);
  margin: 0 14px 18px;
}

/***************************************
ABOUT
***************************************/

.about-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  text-align: center;
}

.profile-photo {
  display: block;
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 100%;
  border: 4px solid var(--color-card);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.about-copy {
  max-width: 680px;
  text-align: left;
}

/***************************************
CONTACT
***************************************/

.contact-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.contact-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 30px;
  align-self: start;
}

.contact-card h3 {
  font-size: 1.2em;
}

.contact-info {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-info a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 20px;
  background-repeat: no-repeat;
  background-size: 20px 20px;
  padding: 12px 16px 12px 44px;
  background-position: 14px center;
  border-radius: 8px;
  background-color: var(--color-bg-alt);
  font-weight: 700;
  font-size: 0.95em;
}

.contact-info li.mail a {
  background-image: url('../img/mail.png');
}

.contact-info a:hover {
  background-color: rgba(47, 82, 51, 0.12);
}

/***************************************
FOOTER
***************************************/

.site-footer {
  font-size: 0.8em;
  text-align: center;
  padding: 40px 0 60px;
  color: var(--color-muted);
}

/***************************************
RESPONSIVE
***************************************/

@media screen and (min-width: 720px) {
  .about-inner {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
  }

  .contact-inner {
    grid-template-columns: 1.4fr 1fr;
  }
}

@media screen and (max-width: 719px) {
  .site-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .site-nav.open {
    max-height: 300px;
  }

  .site-nav ul {
    flex-direction: column;
    padding: 10px 6%;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

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

  .nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero h1 {
    font-size: 2em;
  }
}
