/* ============================================================
   D.M. Shepherd — Author Site
   Token system
   Paper   #EAE4D6  — aged paper background
   Ink     #1C231D  — near-black pine ink
   Ridge   #3C4F3D  — deep pine, primary
   Fog     #8B958A  — muted ridge-fog gray
   Brass   #A6793C  — lamp-brass accent
   Rust    #7A4B32  — spent-ember accent, used sparingly
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400;1,9..144,500&family=Source+Serif+4:ital,wght@0,400;0,500;1,400&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --paper: #E1E7EA;
  --paper-dim: #D6DEE2;
  --ink: #16212A;
  --ridge: #3E5C74;
  --ridge-dark: #202F3B;
  --fog: #8695A0;
  --brass: #B08948;
  --rust: #7C4A3C;

  --display: 'Fraunces', serif;
  --body: 'Source Serif 4', serif;
  --mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

a { color: var(--ridge); text-decoration-color: var(--brass); text-underline-offset: 3px; }
a:hover { color: var(--brass); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

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

.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Nav ---------- */
.site-nav {
  position: relative;
  z-index: 10;
  padding: 18px 0 0;
}
.site-nav .wrap {
  max-width: 900px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.site-nav .mark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
}
.site-nav .mark:hover { color: var(--ridge); }
.site-nav .links {
  display: flex;
  gap: 26px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.site-nav .links a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
}
.site-nav .links a:hover,
.site-nav .links a.active {
  color: var(--ridge);
  border-bottom-color: var(--brass);
}

/* ---------- Ridgeline hero ---------- */
.ridge-hero {
  position: relative;
  overflow: hidden;
  padding-top: 64px;
}
.ridge-hero .wrap { max-width: 900px; }
.ridge-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.ridge-hero .hero-content {
  position: relative;
  z-index: 2;
  padding: 18px 0 220px;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust);
  margin: 0 0 18px;
}
.hero-title {
  font-family: var(--display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(3.2rem, 7.5vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  color: var(--ink);
}
.hero-subtitle {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 26px;
}
.hero-hook {
  font-family: var(--body);
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ridge-dark);
  max-width: 46ch;
  margin: 0 0 34px;
}
.hero-meta {
  display: inline-flex;
  gap: 26px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--ridge-dark);
  background: rgba(234, 228, 214, 0.88);
  padding: 10px 18px;
  border-radius: 2px;
  border: 1px solid rgba(60, 79, 61, 0.15);
}
.hero-meta span { color: var(--brass); font-weight: 500; }

/* Ridge layers (SVG paths styled via CSS custom fills for easy tuning) */
.layer-far { fill: #B7C3CB; }
.layer-mid { fill: #7E93A1; }
.layer-near { fill: var(--ridge); opacity: 0.92; }
.layer-fog {
  fill: var(--paper);
  opacity: 0.55;
}

/* ---------- Buttons / CTA ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  background: var(--ridge);
  padding: 13px 22px;
  border-radius: 2px;
  border: 1px solid var(--ridge);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn:hover {
  background: var(--ridge-dark);
  color: var(--paper);
  transform: translateY(-1px);
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn.ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- Sections ---------- */
section {
  padding: 76px 0;
  position: relative;
}
.section-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 16px;
}
h2.section-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  margin: 0 0 22px;
  color: var(--ink);
}
.lede {
  font-size: 1.12rem;
  color: var(--ridge-dark);
  max-width: 58ch;
}
.divider {
  border: none;
  border-top: 1px solid #B9C4CA;
  margin: 0;
}

/* dark band, used sparingly for one grounded contrast moment */
.band-dark {
  background: var(--ridge-dark);
  color: var(--paper);
}
.band-dark .section-label { color: var(--brass); }
.band-dark h2.section-title { color: var(--paper); }
.band-dark .lede { color: #C4CDD3; }

/* ---------- Footer ---------- */
footer {
  padding: 48px 0 64px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--fog);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
footer a { color: var(--fog); }
footer a:hover { color: var(--brass); }

/* ---------- Book page specifics ---------- */
.jacket {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 640px) {
  .jacket { grid-template-columns: 1fr; }
}
.spine {
  aspect-ratio: 2 / 3;
  background: var(--ridge-dark);
  padding: 16px;
  box-sizing: border-box;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 18px 40px -18px rgba(22,33,42,0.5);
}
.spine img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1px;
  display: block;
}
.spine .spine-title {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  color: var(--paper);
  font-size: 1.3rem;
  line-height: 1.15;
}
.spine .spine-mark {
  font-family: var(--mono);
  color: var(--brass);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.facts {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.85rem;
}
.facts li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid #B9C4CA;
  color: var(--ridge-dark);
}
.facts li span:first-child { color: var(--fog); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.78rem; }

/* ---------- Contact page ---------- */
.contact-card {
  border: 1px solid #B9C4CA;
  background: var(--paper-dim);
  padding: 36px;
  border-radius: 2px;
}
.contact-email {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.6rem;
  color: var(--ridge);
  text-decoration: none;
}
.contact-email:hover { color: var(--brass); }

/* ---------- Simple page hero (non-home pages) ---------- */
.page-head {
  padding: 44px 0 32px;
}
.page-head h1 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.1rem, 4.6vw, 3rem);
  margin: 0 0 14px;
  color: var(--ink);
}

/* ---------- Author photo (About page) ---------- */
.photo-frame {
  display: inline-block;
  background: var(--ridge-dark);
  padding: 14px;
  border-radius: 4px;
  box-shadow: 0 18px 40px -18px rgba(22,33,42,0.5);
  margin: 0 0 36px;
}
.author-photo {
  width: 220px;
  display: block;
  border-radius: 2px;
  margin: 0;
}
