/* ============================================================
   Sari Memorial Homestead — SMHomestead
   Real skills. Real land. Real life.
   ------------------------------------------------------------
   Single stylesheet. Bright, warm farmhouse aesthetic.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Core farmhouse palette */
  --cream:        #FDFAF5;   /* main background — warm white */
  --cream-alt:    #F6EEDF;   /* alt section / wheat tint */
  --white:        #FFFFFF;   /* cards */
  --wheat:        #E8D5A8;   /* warm wheat accent */
  --wheat-soft:   #F3E6C4;

  --ink:          #2C2416;   /* body text — dark charcoal */
  --ink-soft:     #5A4F3C;   /* muted text */

  --forest:       #2D5016;   /* primary accent — deep forest green */
  --forest-dark:  #1F3A0F;   /* darker green (footer / hovers) */
  --forest-soft:  #3D6B1F;

  --terracotta:   #8B4513;   /* secondary accent — warm terracotta */
  --terracotta-d: #6E3510;

  --line:         #E6DAC4;   /* hairline borders */

  /* Typography */
  --font-head: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --maxw: 1100px;
  --radius: 10px;
  --shadow:    0 4px 16px rgba(139, 69, 19, 0.10);
  --shadow-lg: 0 12px 32px rgba(139, 69, 19, 0.16);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 1.05rem;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--forest-dark);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; }

a { color: var(--terracotta); text-decoration: none; }
a:hover { color: var(--terracotta-d); text-decoration: underline; }

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.muted { color: var(--ink-soft); }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.8em 1.6em;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-primary {
  background: var(--forest);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--forest-dark); color: #fff; }

/* Ghost button on light hero — terracotta outline */
.btn-ghost {
  background: transparent;
  color: var(--terracotta);
  border-color: var(--terracotta);
}
.btn-ghost:hover { background: var(--terracotta); color: #fff; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 250, 245, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-name {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--forest-dark);
  letter-spacing: -0.5px;
}
.brand-tag {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terracotta);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--forest);
  border-bottom-color: var(--forest);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--forest-dark);
  margin: 5px 0;
  border-radius: 2px;
  transition: 0.25s;
}

/* ---------- Hero (homepage) — bright wheat gradient ---------- */
.hero {
  position: relative;
  color: var(--ink);
  text-align: center;
  padding: clamp(4rem, 12vw, 8rem) 1.25rem;
  background: linear-gradient(135deg, var(--cream) 0%, var(--wheat-soft) 55%, var(--wheat) 100%);
  border-bottom: 1px solid var(--line);
}
.hero h1 { color: var(--forest-dark); }
.hero .tagline {
  font-family: var(--font-head);
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  margin-bottom: 1rem;
  color: var(--terracotta);
}
.hero .lead {
  max-width: 640px;
  margin: 0 auto 2rem;
  font-size: 1.12rem;
  color: var(--ink);
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
.section-head p { color: var(--ink-soft); }
.section-alt { background: var(--cream-alt); border-block: 1px solid var(--line); }

.kicker {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 700;
  margin-bottom: 0.6rem;
}

/* ---------- Pillar cards ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.4rem;
}
.pillar {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  border-top: 4px solid var(--forest);
}
.pillar:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}
.pillar .icon { font-size: 2rem; margin-bottom: 0.6rem; }
.pillar h3 { margin-bottom: 0.3rem; color: var(--forest-dark); }
.pillar p { font-size: 0.95rem; color: var(--ink-soft); margin: 0; }
.pillar:nth-child(2) { border-top-color: var(--terracotta); }
.pillar:nth-child(3) { border-top-color: var(--wheat); }
.pillar:nth-child(4) { border-top-color: var(--forest-soft); }
.pillar:nth-child(5) { border-top-color: var(--terracotta-d); }

/* ---------- Post grid ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.6rem;
}
.post-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post-thumb {
  height: 150px;
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-soft) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  line-height: 1;
}
.post-card:nth-child(3n+2) .post-thumb { background: linear-gradient(135deg, var(--terracotta) 0%, var(--wheat) 100%); }
.post-card:nth-child(3n+3) .post-thumb { background: linear-gradient(135deg, var(--wheat) 0%, var(--forest-soft) 100%); }
.post-body { padding: 1.3rem; flex: 1; display: flex; flex-direction: column; }
.post-cat {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--terracotta);
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.post-body h3 { font-size: 1.18rem; margin-bottom: 0.4rem; }
.post-body p { font-size: 0.95rem; color: var(--ink-soft); flex: 1; }
.post-meta { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.6rem; }

/* ---------- Email signup ---------- */
.signup {
  background: linear-gradient(135deg, var(--forest-dark) 0%, var(--forest) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3.2rem);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.signup h2 { color: #fff; }
.signup p { color: rgba(255,255,255,0.92); max-width: 520px; margin: 0 auto 1.6rem; }
.signup-form {
  display: flex;
  gap: 0.6rem;
  max-width: 460px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}
.signup-form input[type="email"] {
  flex: 1 1 220px;
  padding: 0.85em 1.1em;
  border-radius: 999px;
  border: 2px solid transparent;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--ink);
}
.signup-form input[type="email"]:focus { outline: 3px solid var(--wheat); }
.signup-note { font-size: 0.82rem; margin-top: 0.9rem; color: rgba(255,255,255,0.85); }
.form-msg { margin-top: 1rem; font-weight: 600; min-height: 1.2em; }

/* ---------- Page hero (interior pages) — forest banner ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--forest-dark) 0%, var(--forest) 100%);
  color: #fff;
  padding: clamp(3rem, 8vw, 5rem) 1.25rem;
  text-align: center;
}
.page-hero h1 { color: #fff; }
.page-hero p { color: rgba(255,255,255,0.92); max-width: 640px; margin: 0 auto; }

/* ---------- Prose (article / long-form) ---------- */
.prose { max-width: 720px; margin: 0 auto; }
.prose h2 { margin-top: 2rem; }
.prose ul { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.4rem; }
.prose blockquote {
  border-left: 4px solid var(--wheat);
  margin: 1.5rem 0;
  padding: 0.5rem 0 0.5rem 1.3rem;
  font-family: var(--font-head);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--forest);
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin: 2rem 0;
}
.stat {
  flex: 1 1 140px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat .num { font-family: var(--font-head); font-size: 2rem; color: var(--terracotta); font-weight: 700; }
.stat .label { font-size: 0.85rem; color: var(--ink-soft); }

/* Memorial accents */
.memorial-card {
  background: var(--cream-alt);
  border: 1px solid var(--line);
  border-left: 5px solid var(--wheat);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
  margin: 2rem 0;
}
.memorial-dates {
  font-family: var(--font-head);
  font-style: italic;
  color: var(--terracotta);
  font-size: 1.1rem;
}

/* ---------- Footer — deep forest, light text ---------- */
.site-footer {
  background: var(--forest-dark);
  color: rgba(255,255,255,0.85);
  padding: 3rem 1.25rem 1.5rem;
  margin-top: 2rem;
}
.footer-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}
.footer-grid h4 { color: #fff; font-size: 1rem; margin-bottom: 0.8rem; }
.footer-grid a { color: rgba(255,255,255,0.85); }
.footer-grid a:hover { color: var(--wheat); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.5rem; font-size: 0.95rem; }
.footer-brand .brand-name { color: #fff; font-size: 1.4rem; }
.footer-brand p { font-size: 0.92rem; max-width: 280px; }
.footer-bottom {
  max-width: var(--maxw);
  margin: 2rem auto 0;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(255,255,255,0.18);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 0.5rem 1.25rem 1rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}
