/* ---------- Foundations ---------- */
:root{
  --parchment: #f1eac2;
  --navy: #072041;
  --navy-hover: #0f4489;
  --navy-active: #1253a8;
  --ink: #241f10;
  --ink-soft: #55503a;
  --footer-text: #e0e0e0;
  --serif: Georgia, Palatino, "Palatino Linotype", "Times New Roman", Times, serif;
  --max-width: 1080px;
  --photo-shadow: 6px 6px 8px rgba(0, 0, 0, 0.5);
}

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

body{
  margin: 0;
  background: var(--parchment) url("images/background 1 - low quality.jpg") repeat left top;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.6;
}

.wrap{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

h1{
  font-family: var(--serif);
  font-weight: bold;
  font-size: 1.9rem;
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--ink);
}

p{ margin: 0 0 1em; }

a{ color: var(--navy); }
a:hover{ color: var(--navy-hover); }
a:active{ color: var(--navy-active); }

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

/* ---------- Header ---------- */
.site-header{ position: relative; }

.site-header img{ width: 100%; box-shadow: var(--photo-shadow); }

.site-nav{
  display: flex;
  position: absolute;
  top: 34%;
  right: 4%;
  gap: 2px;
}

.site-nav a{
  display: block;
  padding: 10px 18px;
  background: var(--navy);
  color: #fff;
  font-family: var(--serif);
  font-size: 0.95rem;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover{ background: var(--navy-hover); }
.site-nav a:active,
.site-nav a[aria-current="page"]{ background: var(--navy-active); }

/* ---------- Main / sections ---------- */
main{ padding: 44px 0 60px; }

.two-col{
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: start;
}

.two-col.reverse{ grid-template-columns: 0.85fr 1.15fr; }
.two-col.reverse .col-image{ order: -1; }

.col-image img{ width: 100%; height: auto; box-shadow: var(--photo-shadow); }

.subtitle{
  font-style: italic;
  color: var(--ink-soft);
  margin-top: -0.4em;
}

.buy-links{
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 1.5em;
}

.button{
  display: inline-block;
  font-family: var(--serif);
  font-size: 0.95rem;
  color: #fff;
  background: var(--navy);
  padding: 11px 22px;
  text-decoration: none;
}

.button:hover{ background: var(--navy-hover); color: #fff; }

/* ---------- Excerpts gallery ---------- */
.gallery-intro{ margin-bottom: 32px; max-width: 640px; }

.gallery{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.gallery figure{ margin: 0; box-shadow: var(--photo-shadow); align-self: start; }

.gallery img{ width: 100%; height: auto; }

.gallery .wide{ grid-column: span 2; }

.book-section + .book-section{
  margin-top: 56px;
  padding-top: 56px;
  border-top: 1px solid rgba(36, 31, 16, 0.15);
}

/* ---------- Footer ---------- */
.site-footer{
  position: relative;
  margin-top: 20px;
}

.site-footer img{ width: 100%; display: block; }

.site-footer .foot-content{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 0 28px;
}

.site-footer p{
  margin: 0;
  font-size: 12px;
  color: var(--footer-text);
  font-family: var(--serif);
}

.social-link{
  display: inline-flex;
  color: #fff;
  font-size: 20px;
  line-height: 1;
}

.social-link svg{ width: 20px; height: 20px; fill: currentColor; }

/* ---------- Responsive ---------- */
@media (max-width: 760px){
  .site-header{ padding-bottom: 0; }
  .site-nav{
    position: static;
    justify-content: center;
    flex-wrap: wrap;
  }
  .site-nav a{ padding: 10px 14px; font-size: 0.85rem; }

  main{ padding: 32px 0 48px; }

  .two-col, .two-col.reverse{
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .two-col.reverse .col-image{ order: 0; }
  .col-image{ max-width: 300px; }

  .gallery{ grid-template-columns: 1fr; }
  .gallery .wide{ grid-column: span 1; }

  .site-footer .foot-content{
    position: static;
    justify-content: center;
    padding: 10px 16px;
    background: var(--navy);
  }
}
