/* ===========================================================
   Joshua D. Koester — Author Landing Page
   Stylesheet. Colors are CSS custom properties (:root) below —
   change a value there to re-theme the whole site.
   =========================================================== */

:root {
  --bg: oklch(15.5% 0.014 200);
  --bg-nav: oklch(15.5% 0.014 255 / 0.92);
  --border: oklch(30% 0.015 200);
  --border-dim: oklch(25% 0.015 200);
  --card-border: oklch(32% 0.015 200);

  --text: oklch(93% 0.008 200);
  --text-title: oklch(96% 0.006 200);
  --text-body: oklch(80% 0.014 255);
  --text-dim: oklch(78% 0.014 200);
  --text-dimmer: oklch(75% 0.015 200);
  --text-nav: oklch(90% 0.01 200);
  --text-muted: oklch(65% 0.015 200);
  --text-faint: oklch(60% 0.015 200);
  --text-mobile-link: oklch(85% 0.012 200);

  --accent: oklch(78% 0.15 85);
  --accent-hover: oklch(84% 0.15 85);
  --accent-bright: oklch(98% 0.01 85);
  --accent-dark: oklch(15% 0.02 85);
  --accent-pill: oklch(78% 0.15 85 / 0.28);
  --accent-border: oklch(78% 0.15 85 / 0.35);

  --card-bg: oklch(21% 0.016 200);
  --card-bg-alt: oklch(19% 0.018 200);
  --badge-bg: oklch(22% 0.016 200);

  --font-serif: 'Source Serif 4', serif;
  --font-sans: 'Public Sans', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
}

a { text-decoration: none; color: inherit; }
a:hover { color: var(--accent); }

::selection { background: var(--accent-pill); }

.section-pad { padding-left: 48px; padding-right: 48px; }

/* ---------- Nav ---------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 48px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-nav);
  backdrop-filter: blur(8px);
  z-index: 10;
  transition: padding 0.25s ease;
}
.nav.scrolled { padding-top: 12px; padding-bottom: 12px; }

.nav-logo { flex-shrink: 0; display: flex; align-items: center; }
.nav-logo img {
  height: 58px;
  width: auto;
  display: block;
  transition: height 0.25s ease;
}
.nav.scrolled .nav-logo img { height: 34px; }

.navlinks {
  display: flex;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-nav);
  flex-shrink: 0;
}
.navlinks a { padding: 8px 14px; border-radius: 5px; transition: background 0.15s ease, color 0.15s ease; }
.navlinks a:hover { color: var(--accent-bright); background: var(--accent-pill); }

.nav-cta {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent);
  padding: 9px 18px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.nav-cta:hover { color: var(--accent-dark); background: var(--accent-hover); }

.hamburger-btn {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  flex-shrink: 0;
  cursor: pointer;
}
.hamburger-btn span { width: 16px; height: 1.5px; background: var(--text); display: block; }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px 24px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: var(--text-mobile-link);
  padding: 12px 0;
  font-size: 16px;
  border-bottom: 1px solid var(--border-dim);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--accent); }

/* ---------- Hero ---------- */

.hero { max-width: 1180px; margin: 0 auto; padding: 88px 48px 96px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }

.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: 64px;
  line-height: 1.05;
  font-weight: 600;
  margin: 0 0 22px;
  color: var(--text-title);
}
.hero-dek {
  font-size: 21px;
  line-height: 1.62;
  color: var(--text-dim);
  max-width: 54ch;
  margin: 0 0 38px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--badge-bg);
  border: 1px solid var(--accent-border);
  padding: 9px 16px;
  border-radius: 4px;
  margin-bottom: 44px;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.hero-badge span.label { font-size: 13.5px; color: oklch(85% 0.02 200); }
.hero-badge strong { color: var(--text); }
.hero-badge .maverick-link { color: var(--text); font-weight: 600; border-bottom: 1px solid var(--accent-border); }
.hero-badge .maverick-link:hover { color: var(--accent); border-color: var(--accent); }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-primary {
  background: var(--accent);
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 26px;
  border-radius: 4px;
  transition: background 0.15s ease;
}
.btn-primary:hover { color: var(--accent-dark); background: var(--accent-hover); }
.btn-secondary {
  border: 1px solid oklch(45% 0.015 200);
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: 4px;
  transition: border-color 0.15s ease, color 0.15s ease;
  display: inline-block;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.hero-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  width: 100%;
  max-width: 380px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 35px 70px -20px oklch(0% 0 0 / 0.65), 0 0 100px 4px oklch(0% 0 0 / 0.5);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.hero-cover:hover {
  transform: rotate(-3deg) scale(1.03);
  box-shadow: 0 45px 90px -20px oklch(0% 0 0 / 0.7), 0 0 120px 6px oklch(0% 0 0 / 0.55);
}
.hero-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- About the Book ---------- */

.book { max-width: 780px; margin: 0 auto; padding: 20px 48px 100px; }
.book h2 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 22px;
}
.book .lede {
  font-size: 19px;
  line-height: 1.6;
  color: oklch(88% 0.012 200);
  margin: 0 0 22px;
  font-style: italic;
}
.book p { font-size: 17px; line-height: 1.75; color: var(--text-body); margin: 0 0 18px; }
.book .comp { font-size: 15.5px; line-height: 1.7; color: var(--text-muted); margin: 0; }

.reviews {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  font-size: 14.5px;
  color: oklch(70% 0.02 200);
  flex-wrap: wrap;
}
.reviews .stars { color: var(--accent); font-weight: 600; }
.reviews .stars:hover { text-decoration: underline; color: var(--accent); }
.reviews .sep { color: oklch(45% 0.015 200); }
.reviews .goodreads:hover { color: var(--text); }

.buy-row { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.buy-row a {
  flex: 1;
  min-width: 150px;
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 14px 20px;
  border-radius: 5px;
  color: var(--text-nav);
  font-weight: 500;
  font-size: 15px;
  transition: border-color 0.15s ease;
}
.buy-row a.btn-primary, .buy-row a.btn-secondary {
  background: initial;
  border-radius: 4px;
}
.buy-row a:hover { color: var(--text-nav); border-color: var(--accent); }

/* ---------- Next Book ---------- */

.next { max-width: 780px; margin: 0 auto 100px; padding: 0 48px; }
.next-card {
  border: 1px solid var(--accent-border);
  background: var(--card-bg-alt);
  border-radius: 8px;
  padding: 40px;
}
.next-card .eyebrow {
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.next-card h3 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 14px;
}
.next-card p { font-size: 16px; line-height: 1.7; color: var(--text-dim); margin: 0 0 12px; }
.next-card p:last-of-type { margin-bottom: 22px; }
.next-card .subscribe {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
  border-bottom: 1px solid var(--accent-border);
}
.next-card .subscribe:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Author Bio ---------- */

.bio { max-width: 1000px; margin: 0 auto 100px; padding: 0 48px; }
.bio-grid { display: grid; grid-template-columns: 220px 1fr; gap: 44px; align-items: center; }
.bio-photo {
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--card-border);
}
.bio-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bio h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 16px;
}
.bio p { font-size: 16px; line-height: 1.75; color: var(--text-dim); margin: 0 0 16px; }
.bio p:last-child { margin-bottom: 0; }

/* ---------- Newsletter ---------- */

.newsletter { max-width: 780px; margin: 0 auto 110px; padding: 0 48px; }
.newsletter-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 44px;
  text-align: center;
}
.newsletter-card h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px;
}
.newsletter-card p {
  font-size: 15.5px;
  color: var(--text-dimmer);
  margin: 0 0 26px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 32px 48px;
  position: relative;
  overflow: visible;
}
.cat-swap {
  position: absolute;
  left: 48px;
  bottom: 0;
  width: 130px;
  height: 131px;
  z-index: 5;
  cursor: default;
}
.cat-swap img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.3s ease;
}
.cat-swap .tent { opacity: 0; }
.cat-swap:hover .reg { opacity: 0; }
.cat-swap:hover .tent { opacity: 1; }

.footer-row {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.footer-row .copyright { font-size: 13.5px; color: var(--text-faint); }
.footer-row .sep { color: oklch(45% 0.015 200); font-size: 13.5px; }
.footer-row .contact { font-size: 13.5px; color: oklch(70% 0.02 200); }
.footer-row .contact:hover { color: var(--text); }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .navlinks { display: none; }
  .hamburger-btn { display: flex; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-cover { order: -1; max-width: 340px; margin: 0 auto; }
  .bio-grid { grid-template-columns: 1fr; }
  .bio-photo { max-width: 220px; margin: 0 auto; }
  .buy-row { flex-direction: column; }
  .footer-row { flex-direction: column; align-items: flex-start; gap: 20px; }
  .hero h1 { font-size: 44px; }
  .section-pad, .hero, .book, .next, .bio, .newsletter, .footer, .nav {
    padding-left: 24px;
    padding-right: 24px;
  }
  .cat-swap { position: static; margin: 0 auto 20px; }
}
