@import url("fonts.css");

:root {
  --ink: #1c1210;
  --ink-soft: #4a3b34;
  --muted: #6a5a50;
  --crimson: #7a1c24;
  --crimson-dark: #5c141b;
  --crimson-deep: #3f0e14;
  --gold: #c4a35a;
  --gold-dark: #9a7a38;
  --gold-light: #e4c97a;
  --gold-pale: #f0e2b8;
  --cream: #f6f0e4;
  --cream-dark: #ebe3d2;
  --parchment: #fbf7ee;
  --white: #fffdf8;
  --rule: #d9c9a3;
  --shadow: rgba(28, 18, 16, 0.14);
  --header-h: 4.25rem;
  --max: 70rem;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--crimson);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--crimson-dark);
}

a:focus-visible,
button:focus-visible,
.nav-toggle:focus-visible + .nav-toggle-btn {
  outline: 2px solid var(--gold-dark);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  background: var(--crimson);
  color: var(--white);
  padding: 0.5rem 0.85rem;
  border-radius: 2px;
}

.skip-link:focus {
  top: 0.75rem;
  color: var(--white);
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  background: var(--parchment);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(196, 163, 90, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}

.brand:hover {
  color: var(--crimson);
}

.brand-mark {
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
}

.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
  white-space: nowrap;
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle-btn {
  display: none;
  margin-left: auto;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--rule);
  background: var(--white);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
}

.nav-toggle-btn span,
.nav-toggle-btn span::before,
.nav-toggle-btn span::after {
  display: block;
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}

.nav-toggle-btn span {
  top: 50%;
  transform: translateY(-50%);
}

.nav-toggle-btn span::before,
.nav-toggle-btn span::after {
  content: "";
  left: 0;
  right: 0;
}

.nav-toggle-btn span::before {
  top: -7px;
}

.nav-toggle-btn span::after {
  top: 7px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.15rem;
  margin-left: auto;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.35rem 0;
}

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

.site-nav a.btn-primary,
.site-nav a.btn-primary:hover {
  color: var(--white);
  background: var(--crimson);
  box-shadow: none;
  padding: 0.7rem 1.15rem;
  flex-shrink: 0;
  overflow: visible;
}

.header-cta {
  margin-left: 0.35rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--gold);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  padding: 0.7rem 1.15rem;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: var(--crimson);
  color: var(--white);
  border-color: var(--crimson-dark);
}

.btn-primary:hover {
  background: var(--crimson-dark);
  color: var(--white);
}

.btn-gold {
  background: var(--gold);
  color: var(--crimson-deep);
  border-color: var(--gold-dark);
}

.btn-gold:hover {
  background: var(--gold-light);
  color: var(--crimson-deep);
}

.btn-ghost {
  background: rgba(255, 253, 248, 0.06);
  color: var(--gold-pale);
  border-color: var(--gold);
}

.btn-ghost:hover {
  background: rgba(255, 253, 248, 0.14);
  color: var(--white);
}

/* Hero */
.hero {
  background:
    linear-gradient(180deg, rgba(63, 14, 20, 0.18), rgba(63, 14, 20, 0.55)),
    linear-gradient(135deg, var(--crimson-deep), var(--crimson) 55%, #8a2a32);
  color: var(--parchment);
  padding: 3.5rem 0 3.75rem;
  border-bottom: 4px solid var(--gold);
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.08;
  margin: 0 0 0.85rem;
  color: var(--white);
  letter-spacing: 0.01em;
}

.hero-rule {
  width: 4.5rem;
  height: 3px;
  background: var(--gold);
  border: 0;
  margin: 0 0 1.15rem;
}

.hero .lede {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  line-height: 1.45;
  max-width: 44rem;
  margin: 0 0 1rem;
  color: var(--gold-pale);
  text-wrap: balance;
}

.hero p {
  max-width: 38rem;
  margin: 0 0 1.5rem;
  color: var(--cream);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Sections */
main {
  flex: 1;
}

.section {
  padding: 3.25rem 0;
}

.section-muted {
  background: var(--cream-dark);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.75rem;
}

.section h2,
.page-hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.85rem, 3vw, 2.4rem);
  line-height: 1.15;
  margin: 0 0 0.5rem;
  color: var(--crimson-dark);
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin: 0 0 0.4rem;
}

.section .intro,
.prose p {
  color: var(--ink-soft);
  max-width: 42rem;
}

.page-hero {
  padding: 2.5rem 0 0.5rem;
}

.page-hero p {
  max-width: 42rem;
  color: var(--ink-soft);
}

/* Book grid */
.book-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.35rem;
}

.book-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-shadow: 0 8px 20px -16px var(--shadow);
  overflow: hidden;
}

.book-card:hover {
  border-color: var(--gold);
}

.cover-frame {
  background: #1a1010;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cover-frame:has(.cover-placeholder) {
  aspect-ratio: 2 / 3;
}

.cover-frame img {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center top;
}

.cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background:
    radial-gradient(ellipse at 50% 30%, #8a2a32, var(--crimson-deep));
  color: var(--gold-pale);
  text-align: center;
  padding: 1rem;
}

.cover-placeholder img {
  width: 3.25rem;
  height: 3.25rem;
  object-fit: contain;
}

.cover-placeholder span {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 0.95rem;
}

.book-body {
  padding: 1rem 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.book-body h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.25;
  margin: 0;
  color: var(--ink);
}

.book-body h3 a {
  color: inherit;
  text-decoration: none;
}

.book-body h3 a:hover {
  color: var(--crimson);
}

.byline {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.meta {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--crimson);
}

.blurb {
  margin: 0.15rem 0 0.5rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
  flex: 1;
}

.book-body .btn {
  width: 100%;
  margin-top: auto;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--gold-pale);
  color: var(--crimson-dark);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  width: max-content;
}

/* CTA band */
.cta-band {
  background: var(--crimson-dark);
  color: var(--cream);
  padding: 2.75rem 0;
  border-top: 3px solid var(--gold);
  border-bottom: 3px solid var(--gold);
}

.cta-band h2 {
  font-family: var(--serif);
  color: var(--white);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin: 0 0 0.5rem;
}

.cta-band p {
  margin: 0 0 1.15rem;
  max-width: 38rem;
  color: var(--gold-pale);
}

/* Split teaser */
.teaser-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.35rem;
}

.teaser {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.5rem 1.4rem 1.6rem;
}

.teaser h2 {
  font-size: 1.7rem;
}

.teaser p {
  color: var(--ink-soft);
  margin: 0 0 1rem;
}

/* About / prose */
.prose {
  max-width: 42rem;
}

.prose h2 {
  margin-top: 2rem;
}

.prose p {
  margin: 0 0 1rem;
}

/* Footer */
.site-footer {
  background: var(--crimson-deep);
  color: var(--cream-dark);
  padding: 2.5rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.75rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--gold-pale);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
}

.footer-brand:hover {
  color: var(--white);
}

.footer-brand img {
  width: 2rem;
  height: 2rem;
}

.site-footer h2 {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.7rem;
}

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

.site-footer li + li {
  margin-top: 0.35rem;
}

.site-footer a {
  color: var(--cream);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--gold-light);
}

.disclosure {
  margin: 1.75rem 0 0;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(196, 163, 90, 0.35);
  font-size: 0.85rem;
  color: var(--gold-pale);
}

.disclosure p {
  margin: 0 0 0.35rem;
}

/* Responsive */
@media (max-width: 1100px) {
  .book-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 800px) {
  .book-grid,
  .teaser-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .nav-toggle-btn {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--parchment);
    border-bottom: 1px solid var(--rule);
    flex-direction: column;
    align-items: stretch;
    padding: 0.85rem 1rem 1.35rem;
    gap: 0.15rem;
    box-shadow: 0 12px 24px -16px var(--shadow);
  }

  .site-nav a,
  .site-nav .btn {
    width: 100%;
    justify-content: flex-start;
  }

  .header-cta {
    margin-left: 0;
    margin-top: 0.4rem;
  }

  .nav-toggle:checked ~ .site-nav {
    display: flex;
  }

  .header-inner {
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .book-grid,
  .teaser-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    padding: 2.5rem 0 2.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Lens of Luther Substack logo */
.brand-logo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.hero-logo { display: block; width: 220px; height: 220px; max-width: 60vw; height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; margin: 0 auto 1.25rem; box-shadow: 0 6px 24px rgba(0,0,0,.25); border: 4px solid #c9a227; }
.hero-logo { margin: 0 0 1.25rem; }
@media (min-width: 820px) {
  .hero-logo { float: right; width: 300px; max-width: 34vw; margin: 0 0 1rem 2rem; }
  .hero .wrap::after { content: ""; display: block; clear: both; }
}


/* Contact form */
.contact-form {
  max-width: 36rem;
  display: grid;
  gap: 1rem;
  margin: 0;
}
.contact-form label,
.contact-form .label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.95rem;
  color: var(--ink);
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
}
.contact-form textarea {
  min-height: 10rem;
  resize: vertical;
}
.contact-form .btn {
  justify-self: start;
}
.form-status {
  max-width: 36rem;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin: 0 0 1.25rem;
}
.form-status.ok {
  background: #eef6ea;
  border: 1px solid #b7d3a8;
  color: #1d3b16;
}
.form-status.err {
  background: #fbeeee;
  border: 1px solid #e0b4b4;
  color: #5c141b;
}
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.footer-legal {
  font-size: 0.8rem;
}
.footer-legal a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* Updates index and book pages */
.cover-frame a {
  display: block;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.update-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
}

.update-card .cover-frame {
  background: #1a1010;
}

.update-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: auto;
}

.update-actions .btn {
  width: auto;
}

.update-layout {
  display: grid;
  grid-template-columns: minmax(14rem, 20rem) 1fr;
  gap: 2rem 2.5rem;
  align-items: start;
}

.update-cover {
  max-width: 20rem;
}

.update-cover .cover-frame {
  background: #1a1010;
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}

.update-cover img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.update-copy h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.85rem, 3vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 0.35rem;
  color: var(--crimson-dark);
}

.update-copy .byline {
  font-size: 1.05rem;
}

.update-copy .posted {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.update-buy {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 1.15rem 0 1.5rem;
}

.coming-note {
  margin: 1.15rem 0 1.5rem;
  font-weight: 600;
  color: var(--crimson);
}

.amazon-desc {
  color: var(--ink-soft);
  max-width: 42rem;
}

.amazon-desc p {
  margin: 0 0 1rem;
}

.amazon-desc ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.amazon-desc li {
  margin: 0 0 0.4rem;
}

.amazon-desc li:last-child {
  margin-bottom: 0;
}

.update-back {
  margin: 2rem 0 0;
}

@media (max-width: 1100px) {
  .update-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 800px) {
  .update-layout,
  .update-grid {
    grid-template-columns: 1fr;
  }

  .update-cover {
    max-width: 18rem;
    margin-inline: auto;
  }
}
