/* CS Peters — static site (rebuilt from saved pages, no WordPress) */
:root {
  --palette1: #315131;
  --palette2: #1469a0;
  --palette3: #000000;
  --palette4: #777777;
  --palette5: #4a5568;
  --palette8: #f7fafc;
  --palette9: #ffffff;
  --content-width: 1290px;
  --font-body: Arial, Helvetica, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 99999;
  padding: 0.75rem 1rem;
  background: var(--palette1);
  color: var(--palette9);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--palette4);
  background: var(--palette8);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: var(--palette2);
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-body);
  color: var(--palette3);
  line-height: 1.5;
  margin: 0 0 0.75em;
}

h1 {
  font-size: clamp(1.25rem, 4vw, 2rem);
  font-weight: 700;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--palette2);
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.1rem;
  color: var(--palette2);
}

p {
  margin: 0 0 1em;
}

.site-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Title bar */
.site-title-bar {
  background: var(--palette1);
  color: var(--palette9);
  text-align: center;
  padding: 0.5rem 1.5rem;
  text-shadow: 1px 1px 2px var(--palette3);
}

.site-title-bar h1 {
  margin: 0;
  color: inherit;
  font-size: clamp(1.1rem, 3vw, 1.75rem);
}

/* Carousel */
.hero-carousel {
  position: relative;
  background: #1a1a1a;
  overflow: hidden;
}

.hero-carousel__slides {
  position: relative;
  min-height: 200px;
  aspect-ratio: 800 / 250;
  max-height: 40vh;
}

@media (min-width: 900px) {
  .hero-carousel__slides {
    max-height: none;
  }
}

.hero-carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.45s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
}

.hero-carousel__slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.hero-carousel__btn:hover {
  background: rgba(0, 0, 0, 0.65);
}

.hero-carousel__btn--prev {
  left: 0.75rem;
}

.hero-carousel__btn--next {
  right: 0.75rem;
}

.hero-carousel__btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.hero-carousel__btn--prev svg {
  transform: scaleX(-1);
}

/* Nav */
.nav-strip {
  background: var(--palette2);
  border-top: 5px solid var(--palette1);
  border-bottom: 5px solid var(--palette1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-strip__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 2px solid var(--palette9);
  color: var(--palette9);
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 2.25rem;
}

.nav-list a {
  color: var(--palette9);
  text-decoration: none;
  font-size: 18px;
  padding: 0.35rem 0;
  display: inline-block;
}

.nav-list a:hover,
.nav-list a:focus {
  color: var(--palette9);
  opacity: 0.92;
  text-decoration: none;
}

.nav-list a[aria-current="page"] {
  font-weight: 700;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
  }

  .nav-list {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0 0;
  }

  .nav-strip.is-open .nav-list {
    display: flex;
  }
}

/* Main */
main {
  background: var(--palette9);
}

.content-area {
  padding: 3rem 0;
}

@media (max-width: 767px) {
  .content-area {
    padding: 2rem 0;
  }
}

/* Home intro grid */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .intro-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.intro-lead {
  color: var(--palette4);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.5;
  margin: 0 0 1rem;
}

.intro-text p {
  font-size: 1.1rem;
}

.intro-photo {
  text-align: center;
}

.intro-photo img {
  border: 2px solid var(--palette2);
  max-width: 300px;
}

/* Book layout */
.book-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .book-layout {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    align-items: start;
  }
}

.book-cover {
  text-align: center;
}

.book-cover img {
  border: 2px solid var(--palette2);
  max-width: 250px;
}

.reviews p {
  font-style: italic;
  margin-bottom: 1.25em;
}

.synopsis {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

/* Purchase */
.purchase-grid {
  display: grid;
  gap: 2rem;
  margin: 2rem 0;
}

@media (min-width: 600px) {
  .purchase-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.purchase-card {
  text-align: center;
  padding: 1rem;
}

.purchase-card img {
  margin-bottom: 1rem;
  border: 2px solid var(--palette2);
}

.purchase-card .isbn {
  margin: 0.5rem 0;
}

.purchase-link {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: var(--palette1);
  color: var(--palette9) !important;
  text-decoration: none !important;
  border-radius: 4px;
  font-weight: 600;
}

.purchase-link:hover {
  background: var(--palette2);
}

.publisher-block {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}

@media (min-width: 600px) {
  .publisher-block {
    grid-template-columns: auto 1fr;
  }
}

.publisher-block img {
  max-width: 200px;
}

/* Contact form */
.contact-form {
  max-width: 560px;
  margin-top: 1.5rem;
}

.form-field {
  margin-bottom: 1.25rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: var(--palette3);
}

.form-field .req {
  color: #c53030;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font: inherit;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
}

.form-field textarea {
  min-height: 140px;
  resize: vertical;
}

.form-submit {
  padding: 0.65rem 1.5rem;
  font: inherit;
  font-weight: 600;
  background: var(--palette1);
  color: var(--palette9);
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.form-submit:hover {
  background: var(--palette2);
}

.form-note {
  font-size: 0.9rem;
  color: var(--palette5);
  margin-top: 1rem;
}

/* Footer */
.site-footer {
  background: var(--palette1);
  color: var(--palette9);
  padding: 1.5rem 1rem 2rem;
  margin-top: 0;
  border-top: 5px solid var(--palette2);
}

.footer-grid {
  max-width: var(--content-width);
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
    align-items: start;
  }
}

.footer-sitemap h2,
.footer-sitemap h3 {
  color: var(--palette9);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.footer-sitemap ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-sitemap a {
  color: var(--palette9);
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.8;
  display: block;
}

.footer-sitemap a:hover,
.footer-sitemap a:focus {
  text-decoration: none;
  opacity: 0.92;
}

.footer-copy {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  font-size: 1.1rem;
}

.footer-copy svg {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
