/* ========================================================================== 
   Base
   ========================================================================== */

:root {
  --bg: #f6f1e8;
  --text: #1f2528;
  --muted: #687176;
  --line: #d8cdbd;
  --accent: #9b4b2f;
  --accent-dark: #713521;
  --paper: #fffaf1;
  --shadow: rgba(31, 37, 40, 0.14);
  --paper-soft: rgba(255, 250, 241, 0.55);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}


/* ========================================================================== 
   Site layout
   ========================================================================== */

.site-header,
.site-footer,
.site-main {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.site-main {
  min-height: 60vh;
}

.page,
.book-showcase,
.imprint-section {
  max-width: 760px;
}

.page {
  padding: 28px 0 72px;
}

.page-header {
  margin-bottom: 32px;
}

.page-content,
.book-blurb-text,
.contact-intro,
.namesakes-intro,
.extras-section p {
  font-size: 1.1rem;
}

.page-content p,
.book-blurb-text p,
.contact-intro p,
.namesakes-intro p {
  margin: 0 0 1.2rem;
}


/* ========================================================================== 
   Typography
   ========================================================================== */

h1,
.book-blurb h2,
.about-section h2,
.extras-section h2 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.1;
}

h1 {
  margin: 0 0 24px;
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 1;
}

.book-blurb h2,
.extras-section h2 {
  margin: 0 0 20px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.about-section h2 {
  margin: 0 0 20px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}


/* ========================================================================== 
   Header and navigation
   ========================================================================== */

.site-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-logo {
  display: block;
  flex: 0 0 auto;
}

.site-logo img {
  width: 56px;
  height: auto;
  display: block;
}

.site-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-title {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.site-tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  gap: 20px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
}

.mobile-nav {
  display: none;
}

.mobile-nav summary {
  list-style: none;
  cursor: pointer;
  padding: 6px 10px;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav-links {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  display: grid;
  gap: 12px;
  min-width: 180px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: 0 14px 30px var(--shadow);
  z-index: 10;
}

.mobile-nav-links a {
  display: block;
  padding: 8px 10px;
  border-radius: 4px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.mobile-nav-links a:hover {
  background: rgba(155, 75, 47, 0.12);
  color: var(--accent-dark);
}

.mobile-nav-links a:focus-visible {
  background: rgba(155, 75, 47, 0.12);
  color: var(--accent-dark);
  outline: 2px solid rgba(155, 75, 47, 0.35);
  outline-offset: 2px;
}

.mobile-nav-links a:active {
  background: rgba(155, 75, 47, 0.18);
  color: var(--accent-dark);
}

/* ========================================================================== 
   Buttons
   ========================================================================== */

.button {
  display: inline-block;
  padding: 12px 18px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent);
  color: white;
  font: inherit;
  line-height: 1.6;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  background: transparent;
  color: var(--accent);
}


/* ========================================================================== 
   Home page
   ========================================================================== */

.hero {
  padding: 32px 0 72px;
}

.hero-with-cover {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  grid-template-areas:
    "title cover"
    "text  cover";
  column-gap: 48px;
  row-gap: 20px;
  align-items: start;
}

.hero-title-block {
  grid-area: title;
}

.hero-text {
  grid-area: text;
  max-width: 680px;
}

.hero-cover {
  grid-area: cover;
}

.hero-cover img {
  width: 100%;
  max-width: 400px;
  display: block;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(31, 37, 40, 0.18);
}

.hero-lede {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
}

.hero-text p {
  margin-top: 0;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 32px;
}


/* ========================================================================== 
   Books page
   ========================================================================== */

.book-cover-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  align-items: start;
}

.book-cover-card,
.map-card {
  margin: 0;
}

.book-cover-card img,
.map-card img {
  width: 100%;
  display: block;
}

.book-cover-card img {
  box-shadow: 0 18px 40px var(--shadow);
}

.book-cover-caption {
  padding-top: 18px;
}

.book-cover-caption h2 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  line-height: 1.2;
}

.book-status {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: var(--paper-soft);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}

.book-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}

.book-links a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.book-links a::after {
  content: " ↗";
  font-size: 0.85em;
}

.book-links a:hover {
  color: var(--accent);
}

.book-blurb {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.book-blurb-text {
  max-width: 680px;
}


/* ========================================================================== 
   About page
   ========================================================================== */

.about-page .page-header {
  margin-bottom: 24px;
}

.about-page > .about-section:first-of-type {
  padding-top: 0;
}

.about-section {
  padding: 36px 0;
}

.about-section + .about-section {
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.author-section {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.about-photo img {
  width: 100%;
  display: block;
  border: 1px solid var(--line);
  box-shadow: 0 14px 30px var(--shadow);
}

.author-bio {
  min-width: 0;
}

.author-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-flag {
  display: inline-block;
  width: clamp(28px, 0.85em, 42px);
  height: clamp(18px, 0.56em, 28px);
  border-radius: 2px;
  background: linear-gradient(
    to bottom,
    #0057b7 0%,
    #0057b7 50%,
    #ffd700 50%,
    #ffd700 100%
  );
}

/* ========================================================================== 
   Maps & Extras page
   ========================================================================== */

.extras-list {
  display: grid;
  gap: 28px;
}

.extras-section {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.extras-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.extras-section h2 {
  margin-bottom: 12px;
}

.extras-section p {
  margin: 0;
  color: var(--muted);
}

.extras-actions {
  margin-top: 18px;
}

.map-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 24px;
}

.map-card-large {
  grid-column: 1 / -1;
}

.map-card a {
  display: block;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 12px 26px var(--shadow);
}

.map-card figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}


/* ========================================================================== 
   Contact page
   ========================================================================== */

.contact-intro {
  margin-bottom: 32px;
}

.contact-form {
  display: grid;
  gap: 18px;
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-field label {
  color: var(--text);
  font-weight: 700;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--text);
  font: inherit;
}

.form-field textarea {
  resize: vertical;
}

.botcheck {
  display: none;
}


/* ========================================================================== 
   Namesakes page
   ========================================================================== */

.namesakes-hero {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  margin-bottom: 40px;
}

.namesakes-logo img {
  width: 100%;
  display: block;
}

.namesakes-intro {
  max-width: 680px;
  margin-bottom: 36px;
}

.rat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.rat-card {
  background: var(--paper-soft);
  border: 1px solid var(--line);
}

.rat-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.rat-details {
  margin: 0;
  padding: 16px;
}

.rat-details div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  padding: 6px 0;
}

.rat-details dt {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rat-details dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}


/* ========================================================================== 
   Footer
   ========================================================================== */

.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}


/* ========================================================================== 
   Responsive
   ========================================================================== */

@media (max-width: 760px) {
  h1 {
    font-size: clamp(2.6rem, 13vw, 4rem);
  }

  .desktop-nav {
    display: none;
  }

  .mobile-nav {
    display: block;
  }

  .site-logo img {
    width: 46px;
  }

  .hero {
    padding: 28px 0 64px;
  }

  .hero-with-cover {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "cover"
      "text";
    row-gap: 24px;
  }

  .hero-cover img {
    width: 100%;
    max-width: 420px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .button {
    text-align: center;
  }

  .book-cover-pair {
    gap: 4px;
  }

  .book-cover-caption {
    padding-top: 14px;
  }

  .book-cover-caption h2 {
    font-size: 1rem;
  }

  .book-status {
    min-height: 52px;
    padding: 6px 8px;
    font-size: 0.72rem;
  }

  .book-blurb {
    margin-top: 36px;
    padding-top: 28px;
  }

  .author-section,
  .map-gallery {
    grid-template-columns: 1fr;
  }

  .about-photo img {
    max-width: 260px;
  }

  .map-gallery {
    gap: 24px;
  }

  .map-card,
  .map-card-large {
    grid-column: auto;
  }

  .rat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .namesakes-hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .namesakes-logo img {
    max-width: 260px;
  }

}

@media (max-width: 560px) {
  .rat-grid {
    grid-template-columns: 1fr;
  }
}
