/* Deep Roots Historical Research and Genealogy — preliminary site */
:root {
  --ink: #2a2118;
  --ink-soft: #4a3f32;
  --parchment: #f7f1e6;
  --parchment-dark: #ebe2d0;
  --cream: #fffbf4;
  --sepia: #8b6914;
  --sepia-deep: #6b4f0e;
  --burgundy: #5c2e2e;
  --burgundy-soft: #7a4545;
  --rule: #c9b896;
  --muted: #6e6356;
  --white: #fffef9;
  --shadow: 0 12px 40px rgba(42, 33, 24, 0.12);
  --radius: 10px;
  --font-serif: "Libre Baskerville", "Palatino Linotype", Palatino, Georgia, serif;
  --font-sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --max: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--parchment);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--burgundy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--sepia-deep); }
h1, h2, h3, .brand-name {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}
h1 { font-size: clamp(1.85rem, 4vw, 2.6rem); margin: 0 0 0.6em; }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); margin: 0 0 0.75em; }
h3 { font-size: 1.2rem; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 40rem; }
.muted { color: var(--muted); font-size: 0.95rem; }
.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.section { padding: 3.5rem 0; }
.section-alt { background: var(--cream); border-block: 1px solid var(--rule); }
.section-narrow { max-width: 720px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(247, 241, 230, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem 0; flex-wrap: wrap;
}
.brand { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.brand-name { font-size: 1.05rem; letter-spacing: 0.01em; }
.brand-tag { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.nav { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; align-items: center; }
.nav a {
  text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 0.95rem;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--burgundy); }
.nav-cta {
  background: var(--burgundy); color: var(--white) !important;
  padding: 0.45rem 0.9rem; border-radius: 999px; text-decoration: none !important;
}
.nav-cta:hover { background: var(--burgundy-soft); color: var(--white) !important; }
.nav-toggle {
  display: none; background: transparent; border: 1px solid var(--rule);
  border-radius: 6px; padding: 0.35rem 0.6rem; font: inherit; cursor: pointer;
}

/* Hero */
.hero {
  position: relative; min-height: 68vh; display: grid; align-items: end;
  color: var(--white); overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: #1a1410 center/cover no-repeat;
  transform: scale(1.02);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26,20,16,0.35) 0%, rgba(26,20,16,0.78) 70%, rgba(26,20,16,0.92) 100%);
}
.hero-content { position: relative; z-index: 1; padding: 5rem 0 2.5rem; }
.hero-kicker {
  display: inline-block; font-size: 0.8rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: #f0d9a0; margin-bottom: 0.75rem; font-weight: 600;
}
.hero h1 { color: var(--white); max-width: 16ch; }
.hero .lead { color: #f0e8da; }
.hero-credit {
  position: relative; z-index: 1; font-size: 0.72rem; color: #cbbda8;
  padding-bottom: 1rem; opacity: 0.9;
}

/* Buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.7rem 1.25rem; border-radius: 999px; font-weight: 650;
  text-decoration: none; border: 2px solid transparent; cursor: pointer; font: inherit;
}
.btn-primary { background: var(--burgundy); color: var(--white); }
.btn-primary:hover { background: var(--burgundy-soft); color: var(--white); }
.btn-secondary {
  background: transparent; border-color: rgba(255,255,255,0.55); color: var(--white);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.btn-outline {
  background: transparent; border-color: var(--burgundy); color: var(--burgundy);
}
.btn-outline:hover { background: var(--burgundy); color: var(--white); }
.btn-ink {
  background: var(--ink); color: var(--parchment);
}
.btn-ink:hover { background: var(--ink-soft); color: var(--parchment); }

/* Cards */
.grid-2 { display: grid; gap: 1.5rem; grid-template-columns: repeat(2, 1fr); }
.grid-3 { display: grid; gap: 1.5rem; grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--cream); border: 1px solid var(--rule); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card-img { aspect-ratio: 16/10; object-fit: cover; width: 100%; background: #ddd; }
.card-body { padding: 1.25rem 1.35rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.card-body p:last-child { margin-bottom: 0; }
.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--sepia-deep); background: var(--parchment-dark);
  padding: 0.25rem 0.55rem; border-radius: 999px; margin-bottom: 0.65rem; width: fit-content;
}
.price-tag { font-family: var(--font-serif); font-size: 1.15rem; color: var(--burgundy); margin-top: auto; padding-top: 0.75rem; }

/* Process */
.process {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.75rem; counter-reset: step;
}
.process-step {
  background: var(--cream); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1rem; text-align: center; font-size: 0.92rem;
}
.process-step strong { display: block; font-family: var(--font-serif); margin-bottom: 0.35rem; }
.process-step::before {
  counter-increment: step; content: counter(step);
  display: inline-flex; width: 1.7rem; height: 1.7rem; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--burgundy); color: white; font-weight: 700;
  font-size: 0.85rem; margin-bottom: 0.5rem;
}

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--cream); }
table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
th, td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { background: var(--parchment-dark); font-family: var(--font-serif); font-weight: 700; }
tr:last-child td { border-bottom: none; }
.note-box {
  background: #f3ead7; border-left: 4px solid var(--sepia);
  padding: 1rem 1.15rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.25rem 0;
}

/* Forms */
.form-panel {
  background: var(--cream); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow);
}
.form-panel + .form-panel { margin-top: 2rem; }
label { display: block; font-weight: 650; font-size: 0.92rem; margin: 0.85rem 0 0.35rem; }
input, select, textarea {
  width: 100%; padding: 0.65rem 0.75rem; border: 1px solid var(--rule);
  border-radius: 8px; font: inherit; background: var(--white); color: var(--ink);
}
textarea { min-height: 110px; resize: vertical; }
.checkbox-group { display: grid; gap: 0.4rem; margin-top: 0.4rem; }
.checkbox-group label {
  display: flex; gap: 0.55rem; align-items: flex-start; font-weight: 500; margin: 0;
}
.checkbox-group input { width: auto; margin-top: 0.3rem; }
.form-actions { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.form-hint { font-size: 0.85rem; color: var(--muted); margin: 0.5rem 0 0; }

/* About */
.about-layout { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 2rem; align-items: start; }
.portrait-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--rule); box-shadow: var(--shadow); }
.portrait-card img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.portrait-card figcaption { padding: 0.75rem 1rem; font-size: 0.8rem; color: var(--muted); background: var(--cream); }
.credential-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.credential-list li {
  padding: 0.65rem 0; border-bottom: 1px solid var(--rule); font-size: 0.98rem;
}
.credential-list li:last-child { border-bottom: none; }
.credential-list strong { display: block; font-family: var(--font-serif); }

/* Page banner */
.page-banner {
  position: relative; min-height: 220px; display: grid; align-items: end;
  color: white; overflow: hidden;
}
.page-banner .hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.page-banner .hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26,20,16,0.4), rgba(26,20,16,0.85));
}
.page-banner .container { position: relative; z-index: 1; padding: 3rem 0 1.75rem; }
.page-banner h1 { color: white; margin-bottom: 0.35em; }
.page-banner .lead { color: #f0e8da; margin: 0; }
.page-banner .hero-credit { padding: 0 0 0.75rem; position: relative; z-index: 1; }

/* Footer */
.site-footer {
  background: var(--ink); color: #d9cfbf; padding: 2.5rem 0 2rem; margin-top: 2rem;
}
.site-footer a { color: #f0d9a0; }
.footer-grid { display: grid; gap: 1.5rem; grid-template-columns: 2fr 1fr 1fr; }
.site-footer h3 { color: var(--parchment); font-size: 1rem; margin-bottom: 0.5rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.35rem; }
.footer-bottom {
  margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #4a3f32;
  font-size: 0.85rem; color: #a89a88;
}

/* Image credit line */
.img-credit { font-size: 0.75rem; color: var(--muted); margin-top: 0.35rem; }

@media (max-width: 900px) {
  .grid-3, .process { grid-template-columns: 1fr 1fr; }
  .about-layout, .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .grid-2, .grid-3, .process { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-block; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; }
  .nav.open { display: flex; }
  .hero { min-height: 560px; }
}
