/* Chelastra Press site styles. Large type, high contrast, cozy and calm. */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-500.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-600.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-italic.woff") format("woff");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans";
  src: url("/assets/fonts/source-sans-400.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans";
  src: url("/assets/fonts/source-sans-italic.woff") format("woff");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans";
  src: url("/assets/fonts/source-sans-600.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans";
  src: url("/assets/fonts/source-sans-700.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F7F1E4;
  --paper-deep: #EFE6D4;
  --card: #FFFBF3;
  --ink: #1C1410;
  --ink-soft: #3A2E28;
  --burgundy: #6E1F1C;
  --burgundy-dark: #4E1513;
  --cream: #F7F1E4;
  --gold: #E8C56B;
  --rule: #C4A35A;
  --border: #D9CBB3;
  --focus: #1C1410;
  --shadow: 0 8px 24px rgba(28, 20, 16, 0.08);
  --max: 70rem;
  --text: 40rem;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Sans", "Source Sans Pro", "Segoe UI", sans-serif;
  font-size: 1.25rem; /* 20px */
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--burgundy);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--burgundy-dark); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -100px;
  background: var(--cream);
  color: var(--ink);
  padding: 0.6rem 1rem;
  z-index: 100;
  font-weight: 700;
}
.skip:focus { top: 1rem; }

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

/* Header */
.site-header {
  background: var(--burgundy);
  color: var(--cream);
  padding: 1rem 0 1.1rem;
  border-bottom: 4px solid var(--gold);
}
.site-header a { color: var(--cream); text-decoration: none; }
.site-header a:hover,
.site-header a:focus-visible { color: var(--gold); }
.site-header :focus-visible {
  outline-color: var(--gold);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  text-decoration: none;
}
.brand-name {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: clamp(1.85rem, 3vw, 2.35rem);
  letter-spacing: 0.02em;
  color: var(--cream);
}
.brand-mark {
  font-family: "Source Sans", sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.2rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.25rem;
}
.nav a {
  font-weight: 600;
  font-size: 1.15rem;
  padding: 0.55rem 0.8rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 3px solid transparent;
}
.nav a[aria-current="page"] {
  border-bottom-color: var(--gold);
  color: var(--gold);
}

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

.hero {
  padding: 3.25rem 0 2.75rem;
  background:
    linear-gradient(180deg, #f3ead8 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--border);
}
.eyebrow {
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: var(--burgundy);
  margin: 0 0 0.75rem;
}
.hero h1, h1.page-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.15rem, 5vw, 3.35rem);
  line-height: 1.2;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
  max-width: 16ch;
}
.lede {
  font-size: 1.35rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 36rem;
  margin: 0 0 1.75rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.15rem;
  padding: 0.7rem 1.35rem;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  border-radius: 4px;
  border: 2px solid var(--burgundy);
}
.btn-primary {
  background: var(--burgundy);
  color: var(--cream);
}
.btn-primary:hover {
  background: var(--burgundy-dark);
  border-color: var(--burgundy-dark);
  color: var(--cream);
}
.btn-secondary {
  background: transparent;
  color: var(--burgundy);
}
.btn-secondary:hover {
  background: var(--burgundy);
  color: var(--cream);
}

.section { padding: 3rem 0; }
.section + .section { padding-top: 0; }
.section-head {
  margin-bottom: 1.75rem;
}
.section h2, h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  line-height: 1.25;
  margin: 0 0 0.7rem;
}
.section p, .prose p { margin: 0 0 1rem; }
.section p:last-child, .prose p:last-child { margin-bottom: 0; }

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

/* Books */
.book-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 720px) {
  .book-grid { grid-template-columns: 1fr 1fr; gap: 1.75rem; }
}

.book-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.book-card a.cover-link { display: block; background: #efe6d4; }
.book-card img.cover {
  width: 100%;
  aspect-ratio: 850 / 1100;
  object-fit: cover;
  object-position: top center;
}
.book-body { padding: 1.2rem 1.25rem 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.kicker {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin: 0;
}
.book-body h2, .book-body h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 1.25;
  margin: 0;
}
.subtitle {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin: 0;
}
.book-body p { margin: 0.15rem 0 0; }
.badge {
  display: inline-block;
  align-self: flex-start;
  margin-top: auto;
  padding: 0.35rem 0.7rem;
  border: 2px solid var(--burgundy);
  color: var(--burgundy);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 4px;
}

/* Newsletter placeholder and other callouts */
.callout {
  background: var(--paper-deep);
  border: 1px solid var(--border);
  border-left: 6px solid var(--burgundy);
  border-radius: 6px;
  padding: 1.4rem 1.5rem;
  margin-top: 2rem;
}
.callout h2, .callout h3 { margin-bottom: 0.5rem; }

.placeholder-frame {
  border: 2px dashed var(--rule);
  background: var(--card);
  border-radius: 8px;
  padding: 2rem 1.5rem;
  text-align: center;
  margin: 1.5rem 0 0;
}
.placeholder-frame strong { display: block; font-size: 1.25rem; margin-bottom: 0.4rem; }

.page-hero { padding: 2.5rem 0 1.5rem; }
.page-hero h1 { max-width: 22ch; }

.prose { padding-bottom: 3rem; }
.prose ul {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}
.prose li { margin: 0.4rem 0; }
.prose li::marker { color: var(--burgundy); }

/* Footer */
.site-footer {
  background: var(--burgundy-dark);
  color: var(--cream);
  padding: 2rem 0 2.25rem;
  margin-top: auto;
  border-top: 4px solid var(--gold);
}
.site-footer a { color: var(--gold); }
.site-footer a:hover { color: var(--cream); }
.site-footer :focus-visible { outline-color: var(--gold); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  align-items: flex-start;
}
.footer-brand {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--cream);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.35rem;
}
.footer-note, .copyright {
  margin: 0;
  font-size: 1.05rem;
  color: #f0e4d0;
  max-width: 28rem;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.2rem;
}
.footer-nav a {
  font-weight: 600;
  padding: 0.5rem 0.7rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.footer-nav a:hover,
.footer-nav a[aria-current="page"] { border-bottom-color: var(--gold); }

/* 404 */
.not-found { padding: 3.5rem 0 4rem; text-align: left; }

@media (max-width: 639px) {
  .wrap, .wrap-text { width: min(var(--max), calc(100% - 1.75rem)); }
  .hero { padding: 2.25rem 0 2rem; }
  .lede { font-size: 1.25rem; }
  .header-inner { align-items: flex-start; }
  .nav { width: 100%; }
  .nav a { padding: 0.55rem 0.7rem 0.55rem 0; }
}
