/* ===========================
   Global / Reset
   =========================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

* {
  --primary-font: 'EB Garamond', Garamond, Georgia, serif;

}

body {
  background-color: #f3efe3;
  color: #000000;
  font-family: var(--primary-font);
  font-size: 1.4rem;
  line-height: 1.4;
}

/* ===========================
   Navbar
   =========================== */
.navbar {
  background-color: #d0b24a;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px .5rem rgba(0, 0, 0, 0.25);
  transition: background-color 1s ease, box-shadow 1s ease;
}

.navbar.transparent {
  background-color: transparent;
  box-shadow: none;
}

.navbar.transparent .navbar-brand,
.navbar.transparent .navbar-links a,
.navbar.transparent .navbar-toggle {
  color: #000000;
}

.navbar.transparent .navbar-links a:hover,
.navbar.transparent .navbar-links a.active {
  color: #e3271c;
  border-bottom-color: #e3271c;
}

.navbar-inner {
  max-width: 42.5rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3rem;
  flex-wrap: wrap;
}

.navbar-brand {
  color: #e3271c;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: .75rem 0;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.navbar-brand-icon {
  width: 1.5rem;
  height: auto;
  display: block;
  filter: brightness(0) saturate(100%) invert(17%) sepia(95%) saturate(4000%) hue-rotate(352deg) brightness(97%);
}

.navbar.transparent .navbar-brand-icon {
  filter: none;
  opacity: 1;
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem 2px;
  flex-direction: column;
  gap: 5px;
  width: 1.625rem;
}

.navbar-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: #e3271c;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.navbar.transparent .navbar-toggle span {
  background-color: #000000;
}

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

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

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

.navbar-links {
  display: flex;
  list-style: none;
  gap: 1.25rem;
}

.navbar-links a {
  color: #e3271c;
  text-decoration: none;
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 4px .625rem;
  border-radius: 4px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: #e3271c;
  background-color: #b89d38;
}

.navbar.transparent .navbar-links a:hover,
.navbar.transparent .navbar-links a.active {
  color: #e3271c;
  background-color: rgba(26, 45, 90, 0.08);
}

@media (max-width: 37.5rem) {
  .navbar-toggle {
    display: flex;
  }

  .navbar-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease;
  }

  .navbar-links.open {
    max-height: 10rem;
    opacity: 1;
    padding-bottom: .625rem;
  }

  .navbar-links li a {
    display: block;
    padding: .5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

/* ===========================
   Page wrapper
   =========================== */
.page {
  max-width: 42.5rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.site-footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.85rem;
  color: #888;
}

.site-footer a {
  color: #888;
}

/* ===========================
   Shared header (inner pages)
   =========================== */
.site-header {
  display: grid;
  grid-template-columns: 1fr min-content 1fr;
  align-items: center;
  justify-content: space-between;
  background-color: #ffffff;
  margin: -2rem -1.5rem 1.5rem;
  padding: 1.75rem 2rem;
  border-bottom: 2px solid #e3271c;

  @media screen and (max-width: 42.5rem) {
    grid-template-columns: max-content;
    justify-content: center;
    justify-items: center;
  }
}

.site-header .header-name {
  font-size: 1.4rem;
  font-weight: bold;
  color: #e3271c;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
}

/* Clip the shield/stripes from the bottom of the SVG */
.header-logo-wrap {
  width: 6.875rem;
  overflow: hidden;
  flex-shrink: 0;
  margin-inline: 1.5rem;
}

.site-header .header-logo {
  width: 6.875rem;
  height: auto;
  display: block;
}

/* ===========================
   Index hero
   =========================== */
.hero {
  text-align: center;
  background-color: #ffffff;
  /* Break out of .page padding so white extends edge-to-edge */
  margin: -2rem -1.5rem 1.75rem;
  padding: 2rem 1.5rem 1.75rem;
  border-bottom: solid #000000 1px;
}

/* Clip the shield/stripes from the bottom of the SVG */
.hero-logo-wrap {
  width: 8.75rem;
  /* height: 96px; */
  /* overflow: hidden; */
  margin: 0 auto 1rem;
}

.hero-logo {
  width: 8.75rem;
  height: auto;
  display: block;
}

.hero-title {
  color: #e3271c;
  font-size: 3.6rem;
  font-weight: bold;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.05;
}

.hero-title span {
  display: block;
}

/* ===========================
   Intro paragraph
   =========================== */
.intro {
  margin-bottom: 1.75rem;
  font-size: 1.3rem;
  line-height: 1.4;
  color: #000000;
}

.intro p+ul,
.intro ul+p {
  margin-top: .5rem;
}

.intro ul {
  padding-left: 1.5rem;
  margin-block: .5rem;
}

/* ===========================
   Navigation cards
   =========================== */
.nav-cards {
  display: flex;
  gap: .5rem;
  margin-bottom: 2rem;
}

.nav-card {
  flex: 1;
  background-color: #d0b24a;
  /* color: #000000; */
  color: white;
  text-align: center;
  padding: 3rem .5rem;
  font-family: var(--primary-font);
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 1.4;
  text-decoration: none;
  border: #000000 solid 1px;
  cursor: pointer;
  display: block;
  transition: background-color 0.15s ease;
}

.nav-card:hover {
  background-color: #b89d38;
}

/* ===========================
   About / "What are good books"
   =========================== */
.about {
  font-size: 1.3rem;
  line-height: 1.4;
  margin-bottom: 2.25rem;
  color: #000000;
}

.about p+p {
  margin-top: .875rem;
}

/* ===========================
   Newsletter signup
   =========================== */
.newsletter {
  background-color: #f3efe3;
  border: 1px solid #000000;
  padding-inline: 1.5rem;
  padding-block: 1rem 2rem;
  text-align: center;
  max-width: 25rem;
  margin: 0 auto;
}

.newsletter-title {
  font-size: 2rem;
  line-height: 1;
  margin-block: 4px;
  font-weight: 500;
  color: #000000;
}

.newsletter-subtitle {
  font-size: 1.4rem;
  color: #000000;
}

.newsletter-form button.form-btn {
  display: block;
  margin-inline: auto;
}

.newsletter-form label {
  display: block;
  font-size: 1.3rem;
  font-weight: normal;
  color: #000000;
  margin-top: .75rem;
  text-align: left;
}

.newsletter-form input[type="text"],
.newsletter-form input[type="email"] {
  display: block;
  width: 100%;
  padding: 4px .5rem;
  font-size: 1rem;
  font-family: var(--primary-font);
  background-color: #fff;
  border: solid #000000 1px;
}

button.newsletter-submit {
  margin-top: 1rem;
}

span.newsletter-submit {
  padding: 1rem;
  margin: -1rem;
}


/* ===========================
   Inner page title & subtitle
   =========================== */
.page-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 500;
  color: #000000;
  margin-bottom: .625rem;
  padding-bottom: .625rem;
  /* border-bottom: 1px solid #1a2d5a; */
}

.page-subtitle {
  font-size: 1.8rem;
  font-weight: normal;
  color: #000000;
  text-align: center;
  margin-bottom: 1.5rem;
}

.page-subtitle--center {
  text-align: center;
}

/* ===========================
   Content sections
   =========================== */
.content-section {
  margin-bottom: 1.5rem;
}

.section-heading {
  font-size: 1.6rem;
  font-weight: bold;
  color: #000000;
  margin-bottom: .5rem;
}

.content-section p {
  font-size: 1.3rem;
  line-height: 1.4;
  color: #000000;
}

.content-section p+p {
  margin-top: .75rem;
}

.meetup-schedule {
  font-size: 1rem;
  line-height: 1.8;
}

/* ===========================
   Contact form
   =========================== */
.contact-section {
  margin-bottom: 2rem;
}

.contact-prompt {
  font-size: 1rem;
  color: #000000;
  margin-bottom: 1rem;
  text-align: center;
}

.contact-form {
  border: 1px solid #1a2d5a;
  padding: 1.25rem 1.5rem;
  max-width: 23.75rem;
  margin: 0 auto;
}

.form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: .625rem;
}

.form-row:last-child {
  margin-bottom: 0;
}

.form-row label {
  font-size: 1.3rem;
  font-weight: normal;
  color: #000000;
  text-align: left;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row textarea {
  border: 1px solid #888;
  padding: 4px 6px;
  font-family: var(--primary-font);
  font-size: 1rem;
  background-color: #fff;
  color: #000000;
  flex: 1;
}

.form-row textarea {
  resize: vertical;
}

/* ===========================
   Book cover (placeholder + real image)
   =========================== */
.book-cover {
  width: 100%;
  max-width: 7.5rem;
  aspect-ratio: 3 / 4;
  background-color: #ddd8c4;
  border: 1px solid #bbb5a0;
  margin: 0 auto .5rem;
}

.book-cover-img {
  display: block;
  max-width: 7.5rem;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  margin: 0 auto .5rem;
}

/* ===========================
   Featured: 3-column book grid
   =========================== */
.book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 1rem;
  margin-bottom: 2rem;
}

.book-item {
  text-align: center;
  font-size: 1rem;
  color: #000000;
}

.book-title {
  /* margin-bottom: 2px; */
}

.book-author {
  /* margin-bottom: 2px; */
}

.book-links a {
  color: #000000;
  font-size: 1rem;
}

.book-links a:hover {
  color: #e3271c;
}

/* ===========================
   Recommended: 2-column grid
   =========================== */
.rec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem 2rem;
  margin-bottom: 1.5rem;
}

.rec-book-item {
  font-size: 1rem;
  color: #000000;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.rec-book-item p+p {
  margin-top: 4px;
}

.rec-book-item a {
  color: #000000;
  text-decoration: underline;
}

.rec-book-item a:hover {
  color: #e3271c;
}

@media (max-width: 32.5rem) {
  .nav-cards {
    flex-direction: column;
  }

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

  .book-cover,
  .book-cover-img {
    max-width: 11.25rem;
  }

  .rec-grid {
    grid-template-columns: 1fr;
  }

  .request-section {
    flex-direction: column;
    align-items: stretch;
  }

  .request-btn {
    flex: none;
    width: 100%;
    padding: .75rem .625rem;
  }

  .suggestion-form {
    display: block;
    width: 100%;
  }

  .contact-form {
    max-width: 100%;
    padding: 1rem;
  }

  .form-row input[type="text"],
  .form-row input[type="email"],
  .form-row textarea {
    width: 100%;
  }

  .form-row span {
    display: none;
  }
}

/* ===========================
   Recommended: CTA text
   =========================== */
.rec-cta {
  font-size: 1.3rem;
  color: #000000;
  text-align: center;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

/* ===========================
   Recommended: request section
   =========================== */
.request-section {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: .75rem;
  margin-bottom: 2rem;
}

.request-btn {
  flex: 0 0 12.5rem;
  background-color: #d0b24a;
  color: #FFFFFF;
  font-family: var(--primary-font);
  font-size: 1rem;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  padding: .875rem .625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.5;
  border: solid #000000 1px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.request-btn:hover {
  background-color: #b89d38;
}

.suggestion-form-wrap {
  flex: 1;
  text-align: center;
}

.suggestion-title {
  font-size: 1.3rem;
  font-weight: bold;
  color: #000000;
  margin-bottom: .625rem;
  line-height: 1.4;
}

.suggestion-form {
  display: inline-block;
  text-align: left;
  border: 1px solid #1a2d5a;
  padding: 1.25rem 1.5rem;
}

.suggestion-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 6px;
  font-size: 1rem;
  color: #000000;
}

.suggestion-row label {
  font-size: 1rem;
  color: #000000;
  text-align: left;
}

.suggestion-row input {
  border: 1px solid #888;
  padding: 3px 5px;
  font-family: var(--primary-font);
  font-size: 1rem;
  background-color: #fff;
  width: 100%;
  color: #000000;
}

/* ===========================
   Form submit button & success
   =========================== */
.form-btn {
  background-color: #d0b24a;
  color: #f3efe3;
  font-family: var(--primary-font);
  font-size: 1rem;
  font-weight: bold;
  border: none;
  padding: 5px .875rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.form-btn:hover {
  background-color: #e3271c;
}

.form-success {
  font-size: 1rem;
  color: #000000;
  font-style: italic;
  text-align: center;
  padding: .5rem 0;
}

.form-error {
  font-size: 1rem;
  color: #e3271c;
  font-style: italic;
  text-align: center;
  padding: .5rem 0;
}

/* ===========================
   Shared footer (inner pages)
   =========================== */
.site-footer {
  display: grid;
  grid-template-columns: 1fr min-content 1fr;
  align-items: center;
  justify-content: space-between;
  background-color: #ffffff;
  margin: 2rem -1.5rem -3rem;
  padding: 1.75rem 2rem;
  border-top: 2px solid #e3271c;

  @media screen and (max-width: 42.5rem) {
    grid-template-columns: max-content;
    justify-content: center;
    justify-items: center;
  }
}

.site-footer .footer-name {
  font-size: 1.3rem;
  font-weight: bold;
  color: #e3271c;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.site-footer .footer-name:first-child,
.site-header .header-name:first-child {
  text-align: right;
}

.footer-logo-wrap {
  width: 6.875rem;
  overflow: hidden;
  flex-shrink: 0;
  margin-inline: 1rem;
}

.site-footer .footer-logo {
  width: 6.875rem;
  height: auto;
  display: block;
}

.dev-credit {
  margin-right: 1rem;
  margin-top: 2rem;
  display: flex;
  font-size: 1rem;

  span {
    margin-left: auto;
  }

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

  a:hover {
    color: #e3271c;
  }
}
