/* ============================================
   FAMILY HISTORY SITE — STYLESHEET
   Palette: aged paper, deep ink, warm sepia
   Type: Georgia (serif) + system-ui (body)
   ============================================ */

:root {
  --cream:      #F5F0E8;
  --ink:        #1C1A17;
  --sepia:      #7A5C3A;
  --warm-mid:   #C4A882;
  --rust:       #C9A84C;
  --border:     #D6CFC4;
  --card-bg:    #FDFAF5;

  --font-display: 'Courier New', Courier, monospace;
  --font-body:    system-ui, -apple-system, sans-serif;

  --max-width: 900px;
  --gap: 2rem;
}

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

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

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.7;
}

/* ── HEADER ── */
.site-header {
  background: var(--ink);
  color: var(--cream);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--warm-mid);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.site-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }

.site-nav a {
  color: var(--cream);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
  transition: opacity 0.15s;
}
.site-nav a:hover { opacity: 1; color: var(--warm-mid); }

/* ── MAIN ── */
.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* ── HERO ── */
.hero {
  text-align: center;
  padding: 4rem 1rem 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--sepia);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--sepia);
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.8;
}

/* ── POST GRID ── */
.recent-posts h2, .list-header h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--sepia);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--gap);
  margin-bottom: 2rem;
}

.post-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}
.post-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

.post-thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.post-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.post-card-body time {
  font-size: 0.78rem;
  color: var(--sepia);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.post-card-body h2, .post-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.3;
}

.post-card-body h2 a, .post-card-body h3 a {
  color: var(--ink);
  text-decoration: none;
}
.post-card-body h2 a:hover, .post-card-body h3 a:hover { color: var(--rust); }

.post-card-body p { font-size: 0.9rem; color: #555; flex: 1; }

.read-more {
  font-size: 0.85rem;
  color: var(--rust);
  text-decoration: none;
  font-weight: 600;
}
.read-more:hover { text-decoration: underline; }

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  background: var(--sepia);
  color: var(--cream);
  border-radius: 3px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s;
}
.btn:hover { background: var(--rust); }

/* ── SINGLE POST ── */
.post { max-width: 720px; margin: 0 auto; }

.post-header { margin-bottom: 2rem; }

.post-meta {
  font-size: 0.82rem;
  color: var(--sepia);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}
.post-meta a { color: var(--rust); text-decoration: none; }

.post-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.2;
  color: var(--ink);
}

.post-description {
  margin-top: 0.75rem;
  font-size: 1.05rem;
  color: var(--sepia);
  font-style: italic;
}

.post-hero-image {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 2rem;
}

.post-content { font-size: 1rem; line-height: 1.8; }
.post-content h2, .post-content h3 {
  font-family: var(--font-display);
  color: var(--sepia);
  margin: 2rem 0 0.75rem;
}
.post-content p { margin-bottom: 1.25rem; }
.post-content img { max-width: 100%; border-radius: 4px; }
.post-content blockquote {
  border-left: 3px solid var(--warm-mid);
  padding: 0.5rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--sepia);
  font-style: italic;
  background: #F0EBE0;
}

/* ── PHOTO GALLERY ── */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.photo-gallery figure { margin: 0; }
.photo-gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}
.photo-gallery figcaption {
  font-size: 0.78rem;
  color: var(--sepia);
  margin-top: 0.3rem;
  text-align: center;
}

/* ── VIDEO ── */
.post-video video {
  width: 100%;
  border-radius: 4px;
  margin: 1.5rem 0;
  background: #000;
}

/* ── COMMENTS ── */
.comments {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.comments h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--sepia);
  margin-bottom: 1.5rem;
}

/* ── SUBSCRIBE ── */
.subscribe-box {
  background: var(--ink);
  color: var(--cream);
  padding: 2.5rem 2rem;
  text-align: center;
}
.subscribe-box h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--warm-mid);
}
.subscribe-box p { opacity: 0.8; margin-bottom: 1.25rem; font-size: 0.95rem; }
.subscribe-box form {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.subscribe-box input[type="email"] {
  padding: 0.6rem 1rem;
  border: 1px solid var(--warm-mid);
  border-radius: 3px;
  background: #2C2A27;
  color: var(--cream);
  font-size: 0.95rem;
  width: 260px;
}
.subscribe-box button {
  padding: 0.6rem 1.25rem;
  background: var(--rust);
  color: #fff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.15s;
}
.subscribe-box button:hover { background: #A0442F; }

/* ── FOOTER ── */
.site-footer { margin-top: 4rem; }
.footer-note {
  text-align: center;
  font-size: 0.8rem;
  padding: 1rem;
  color: var(--sepia);
  opacity: 0.7;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .site-header { padding: 0.75rem 1rem; }
  .site-main { padding: 2rem 1rem; }
  .post-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
