/* Steady Grace — sg.css — design pass 3b */

/* Self-hosted fonts: Jost (SIL OFL) and Source Serif 4 (SIL OFL). See /fonts/OFL.txt. */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/jost-variable-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/source-serif-4-variable-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/source-serif-4-variable-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Design tokens */
:root {
  --bg:           #FDFAF4;
  --bg-tint:      #F3EDDF;
  --text-dark:    #1D1810;
  --text-mid:     #3A3020;
  --accent:       #8A6520;
  --accent-hover: #6E5119;
  --border:       #E5DCC8;
  --white:        #FFFFFF;

  --max-w: 1120px;
  --prose-w: 760px;
}

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

html { font-size: 18px; scroll-behavior: smooth; }

body {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text-mid);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: 'Jost', system-ui, sans-serif;
  color: var(--text-dark);
  line-height: 1.25;
  font-weight: 600;
}
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 0.75rem; }
h2 { font-size: clamp(1.2rem, 3vw, 1.65rem); margin: 2rem 0 0.75rem; }
h3 { font-size: 1.15rem; font-weight: 500; margin: 1.5rem 0 0.5rem; }
h4 { font-size: 1rem; font-weight: 500; margin: 1.25rem 0 0.4rem; }

p { margin-bottom: 1.2rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

ul, ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
li { margin-bottom: 0.4rem; }

strong { font-weight: 700; color: var(--text-dark); }
em { font-style: italic; }

blockquote {
  padding: 0.5rem 0 0.5rem 1.25rem;
  border-left: 3px solid var(--border);
  margin: 1.5rem 0;
  color: var(--text-mid);
  font-style: italic;
}

/* Layout */
.sg-wrap {
  max-width: var(--prose-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main { flex: 1 0 auto; padding: 2rem 0 3rem; }

/* Header */
.sg-header {
  background: var(--bg);
  border-bottom: 2px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 10;
}
.sg-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
/* Logo slot: fixed height so a graphic logo can drop in later */
.sg-logo-slot {
  height: 2.4rem;
  display: flex;
  align-items: center;
}
.sg-logo-img {
  height: 100%;
  width: auto;
  display: block;
}
.sg-wordmark {
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: 0.01em;
  line-height: 2.4rem;
}

.sg-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  font-size: 0.9rem;
  font-family: 'Jost', system-ui, sans-serif;
  padding-left: 0;
  margin-bottom: 0;
}
.sg-nav li { margin-bottom: 0; }
.sg-nav a {
  color: var(--text-mid);
  text-decoration: none;
  padding: 0.3rem 0;
  display: inline-block;
}
.sg-nav a:hover { color: var(--accent); text-decoration: underline; }

/* Footer */
.sg-footer {
  background: var(--text-dark);
  color: var(--border);
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
  font-size: 0.9rem;
}
.sg-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.sg-footer-wordmark {
  display: block;
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.75rem;
}
.sg-footer-independence {
  font-size: 0.85rem;
  color: #A8977E;
  margin-bottom: 1.5rem;
  font-style: italic;
}
.sg-footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  margin-bottom: 1.5rem;
}
.sg-footer-col h3 {
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #A8977E;
  margin-bottom: 0.6rem;
}
.sg-footer-col ul { list-style: none; padding: 0; margin: 0; }
.sg-footer-col li { margin-bottom: 0.35rem; }
.sg-footer-col a { color: var(--border); text-decoration: none; }
.sg-footer-col a:hover { color: var(--white); text-decoration: underline; }
.sg-footer-copy { font-size: 0.8rem; color: #A8977E; margin-top: 1rem; }
.sg-footer a { color: var(--border); text-decoration: none; }
.sg-footer a:hover { color: var(--white); text-decoration: underline; }

/* Prose article wrapper */
.sg-article {
  max-width: var(--prose-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.sg-article-header { margin-bottom: 1.5rem; }
.sg-article-meta {
  font-size: 0.9rem;
  color: var(--text-mid);
  margin-top: 0.4rem;
  font-family: 'Jost', system-ui, sans-serif;
}
.sg-article-body { max-width: 100%; }

/* Featured image on article pages */
.sg-featured-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  margin-bottom: 1.5rem;
  border-radius: 3px;
}

/* Category hero image */
.sg-category-img {
  width: 100%;
  height: auto;
  aspect-ratio: 3/1;
  object-fit: cover;
  display: block;
  margin-bottom: 1.75rem;
  border-radius: 3px;
}

/* Breadcrumb */
.sg-breadcrumb {
  font-size: 0.85rem;
  color: var(--text-mid);
  margin-bottom: 1rem;
  font-family: 'Jost', system-ui, sans-serif;
}
.sg-breadcrumb a { color: var(--text-mid); text-decoration: none; }
.sg-breadcrumb a:hover { color: var(--accent); text-decoration: underline; }

/* Blog list (archive) */
.sg-post-list { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.sg-post-item { padding: 1.5rem 0; border-top: 1px solid var(--border); }
.sg-post-item:last-child { border-bottom: 1px solid var(--border); }
.sg-post-item h2 { margin: 0 0 0.4rem; font-size: 1.15rem; }
.sg-post-item h2 a { color: var(--text-dark); text-decoration: none; }
.sg-post-item h2 a:hover { text-decoration: underline; color: var(--accent); }
.sg-post-date { font-size: 0.8rem; color: var(--text-mid); margin-bottom: 0.4rem; font-family: 'Jost', system-ui, sans-serif; }
.sg-post-desc { font-size: 0.95rem; margin: 0; }

/* Hub / category intro */
.sg-hub-intro { margin-bottom: 1.5rem; }

/* Sitemap */
.sg-sitemap-section { margin-bottom: 2rem; }
.sg-sitemap-section ul { margin-top: 0.5rem; }

/* Audio page */
.audio-slot {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--bg-tint);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.audio-slot p { margin: 0; }

/* ---- HOME CARDS ---- */

.sg-home {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.sg-home-intro {
  max-width: var(--prose-w);
  margin: 0 auto 1.5rem;
}

.sg-home-hero-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/5;
  max-height: 340px;
  object-fit: cover;
  display: block;
  border-radius: 3px;
  margin-bottom: 2rem;
}

.sg-section-label {
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mid);
  margin-bottom: 1.25rem;
}

/* Lead card: newest post, full width */
.sg-lead-card {
  margin-bottom: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--white);
}
.sg-lead-card-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/7;
  max-height: 460px;
  object-fit: cover;
  display: block;
}
.sg-lead-card-body {
  padding: 1.5rem 2rem 1.75rem;
}
.sg-lead-card-meta {
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 0.75rem;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}
.sg-lead-card h2 {
  font-size: clamp(1.3rem, 3.5vw, 2rem);
  margin: 0 0 0.75rem;
}
.sg-lead-card h2 a { color: var(--text-dark); text-decoration: none; }
.sg-lead-card h2 a:hover { color: var(--accent); text-decoration: underline; }
.sg-lead-card-desc { font-size: 1rem; margin-bottom: 1rem; }

/* Side-image rows: image left, text right */
.sg-card-rows { margin-top: 0; }

.sg-card-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  align-items: start;
}
.sg-card-row:last-child { border-bottom: 1px solid var(--border); }
.sg-card-row-img {
  width: 100%;
  height: auto;
  aspect-ratio: 3/2;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}
.sg-card-row-meta {
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 0.75rem;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}
.sg-card-row h2 {
  font-size: clamp(1rem, 2vw, 1.3rem);
  margin: 0 0 0.5rem;
}
.sg-card-row h2 a { color: var(--text-dark); text-decoration: none; }
.sg-card-row h2 a:hover { color: var(--accent); text-decoration: underline; }
.sg-card-row-desc { font-size: 0.95rem; margin-bottom: 0.6rem; }

/* Read more link */
.sg-read-more {
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
}
.sg-read-more:hover { color: var(--accent-hover); border-color: var(--accent); }

/* Home below-cards sections */
.sg-home-lanes {
  max-width: var(--prose-w);
  margin: 3rem auto 0;
}

/* Responsive */
@media (max-width: 700px) {
  html { font-size: 16px; }
  .sg-header-inner { flex-direction: column; align-items: flex-start; }
  .sg-nav { gap: 0 1rem; }
  .sg-nav a { padding: 0.5rem 0; }
  .sg-footer-cols { flex-direction: column; gap: 1.5rem; }
  .sg-card-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .sg-card-row-img { aspect-ratio: 3/2; width: 100%; }
  .sg-lead-card-body { padding: 1rem 1.25rem 1.25rem; }
  .sg-home-hero-img { aspect-ratio: 4/3; max-height: none; }
}
