/* Four Mile Genealogy
   The 1954 USGS Pineville quad up front, forest green, Public Sans for reading,
   Vollkorn for headlines and for clients' own questions (always italic: their words). */

@font-face { font-family: "Public Sans"; src: url("../fonts/public-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("../fonts/public-sans-latin-wght-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Vollkorn"; src: url("../fonts/vollkorn-latin-wght-normal.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Vollkorn"; src: url("../fonts/vollkorn-latin-wght-italic.woff2") format("woff2"); font-weight: 400 900; font-style: italic; font-display: swap; }

:root {
  --ink: #17221c;
  --muted: #535d57;
  --forest: #14301f;
  --forest-2: #1d4029;
  --tint: #eef4ea;
  --line: #dde5d9;
  --contour: #9a5a26;
  --water: #1f5c85;
  --water-dark: #15435f;
  --gold: #f4c76b;
  --gold-dark: #ebb44b;
  --serif: "Vollkorn", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --measure: 40rem;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #fff; color: var(--ink);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--water); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--water-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--water); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.08; letter-spacing: -0.015em; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 1.7rem + 3vw, 3.8rem); }
h2 { font-size: clamp(1.75rem, 1.4rem + 1.3vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
p, li, dd { text-wrap: pretty; }

.skip { position: absolute; left: 1rem; top: -4rem; background: #fff; color: var(--ink); padding: 0.6rem 1rem; z-index: 50; border-radius: 6px; }
.skip:focus { top: 1rem; }

.wrap { width: min(100% - 2.5rem, 74rem); margin-inline: auto; }
.measure { max-width: var(--measure); }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 650; font-size: 1rem; line-height: 1.2;
  padding: 0.9rem 1.4rem; border-radius: 999px; border: 0; cursor: pointer;
  text-decoration: none; background: var(--forest); color: #fff;
  transition: background-color 0.15s, box-shadow 0.15s;
}
.button:hover { background: var(--forest-2); color: #fff; }
.button--gold { background: var(--gold); color: #1b1a12; }
.button--gold:hover { background: var(--gold-dark); color: #1b1a12; }
.button--line { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.6); }
.button--line:hover { background: rgba(255, 255, 255, 0.08); color: #fff; box-shadow: inset 0 0 0 1.5px #fff; }

/* ---------- Header (sits on the map) ---------- */
.site-header { position: absolute; inset: 0 0 auto 0; z-index: 20; color: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 5rem; }
.wordmark { display: flex; align-items: center; gap: 0.65rem; font-family: var(--serif); font-weight: 650; font-size: 1.3rem; color: #fff; text-decoration: none; text-shadow: 0 1px 8px rgba(10, 30, 18, 0.35); }
.wordmark img { width: 30px; height: 30px; }
.wordmark:hover { color: #fff; }

.nav-inline { display: none; }
.nav-inline ul, .menu ul { list-style: none; margin: 0; padding: 0; }
.nav-inline ul { display: flex; align-items: center; gap: 1.6rem; }
.nav-inline a { color: rgba(255, 255, 255, 0.92); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.nav-inline a:hover { color: #fff; text-decoration: underline; }
.nav-inline a[aria-current="page"] { color: #fff; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
.nav-inline .button { padding: 0.6rem 1.1rem; font-size: 0.92rem; color: #1b1a12; }
.nav-inline .button:hover { text-decoration: none; color: #1b1a12; }

.menu summary {
  list-style: none; cursor: pointer; font-weight: 600; font-size: 0.95rem;
  padding: 0.5rem 1rem; border-radius: 999px; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.7); color: #fff;
}
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: #fff; color: var(--forest); }
.menu nav {
  position: absolute; left: 0.75rem; right: 0.75rem; top: 4.6rem;
  background: var(--forest); border-radius: var(--radius); padding: 0.5rem 1.25rem 1rem;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.5);
}
.menu li a { display: block; padding: 0.8rem 0; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.12); font-size: 1.05rem; }
.menu li:last-child a { border-bottom: 0; color: var(--gold); font-weight: 650; }
.menu a[aria-current="page"] { color: var(--gold); }

@media (min-width: 64rem) {
  .nav-inline { display: block; }
  .menu { display: none; }
}

/* ---------- Hero: the map ---------- */
.hero { position: relative; isolation: isolate; color: #fff; background: var(--forest); }
.hero__map {
  position: absolute; inset: 0; z-index: -1; overflow: hidden; container-type: size;
  background: #6f9a6a url("../img/fourmile-1954.webp") 0% 38% / cover no-repeat;
}
.hero__map::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(14, 36, 23, 0.96) 0%, rgba(14, 36, 23, 0.88) 45%, rgba(14, 36, 23, 0.45) 75%, rgba(14, 36, 23, 0.12) 100%);
}
.hero__body { padding: 8.5rem 0 3rem; }
.hero__copy { max-width: 36rem; }
.hero h1 { color: #fff; margin-bottom: 0.4em; }
.hero p { color: rgba(255, 255, 255, 0.86); margin: 0; font-size: 1.15rem; }
.hero a:not(.button) { color: #fff; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
.hero .aside { margin-top: 1.4rem; font-size: 0.95rem; color: rgba(255, 255, 255, 0.75); }

.hero--home { min-height: min(100svh, 52rem); display: flex; flex-direction: column; }
.hero--home .hero__body { flex: 1; display: flex; align-items: flex-end; padding: 15rem 0 5rem; }
.hero--home h1 { font-size: clamp(3rem, 1.8rem + 4.6vw, 5.4rem); line-height: 0.98; }
.hero--home p { font-size: 1.22rem; }

/* Pin on Fourmile, placed in map coordinates (the crop is 16:9, cover, anchored 0% 38%) */
.pin {
  position: absolute; z-index: 1; display: none; flex-direction: column; align-items: center;
  --w: max(100cqw, 177.78cqh); --h: max(100cqh, 56.25cqw);
  left: calc(var(--w) * 0.094);
  top: calc(var(--h) * 0.433 - (var(--h) - 100cqh) * 0.38);
  transform: translate(-50%, -100%);
}
.pin__label { background: #fff; color: var(--ink); font-size: 0.8rem; font-weight: 650; padding: 0.28rem 0.65rem; border-radius: 999px; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.5); }
.pin__dot { width: 14px; height: 14px; border-radius: 50%; background: #e0563c; border: 3px solid #fff; margin-top: 0.35rem; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }

.hero .hero__caption {
  position: absolute; left: 1.25rem; bottom: 1.1rem; margin: 0; font-size: 0.8rem; line-height: 1.3;
  color: #fff; background: rgba(14, 36, 23, 0.7); padding: 0.3rem 0.7rem; border-radius: 999px;
}

@media (min-width: 56rem) {
  .hero__map::after {
    background: linear-gradient(270deg, rgba(14, 36, 23, 0.95) 0%, rgba(14, 36, 23, 0.84) 42%, rgba(14, 36, 23, 0.3) 72%, rgba(14, 36, 23, 0.06) 100%);
  }
  .hero__body { padding: 9.5rem 0 4rem; }
  .hero__body .wrap { display: flex; justify-content: flex-end; }
  .hero--home .hero__body { align-items: center; padding: 7rem 0 5.5rem; }
  .pin { display: flex; }
}

/* ---------- Sections ---------- */
main { display: block; }
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.page { padding-top: clamp(2.5rem, 5vw, 4rem); padding-bottom: clamp(3.5rem, 7vw, 6rem); }
.page .measure > h2 { margin-top: 2em; }
.page .measure > h2:first-child { margin-top: 0; }
.sub { color: var(--muted); font-size: 1.1rem; }
.lede { font-size: 1.25rem; line-height: 1.55; }

/* Clients' questions, in their words */
.q { font-family: var(--serif); font-style: italic; font-size: 1.55rem; line-height: 1.22; margin: 0 0 0.5em; color: var(--ink); }

/* Home: what I work on */
.split-list { display: grid; gap: 2rem 4rem; }
@media (min-width: 56rem) { .split-list { grid-template-columns: 19rem 1fr; } }
.qlist { list-style: none; margin: 0; padding: 0; }
.qlist li { display: grid; gap: 0.3rem 2rem; padding: 1.6rem 0; border-top: 1px solid var(--line); }
.qlist li:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 48rem) { .qlist li { grid-template-columns: 1.15fr 1fr; align-items: baseline; } }
.qlist .q { margin: 0; }
.qlist li > p { margin: 0; color: var(--muted); }
.name { font-family: var(--sans); font-size: 0.85rem; font-weight: 650; letter-spacing: 0; color: var(--contour); margin: 0 0 0.35rem; }

/* Home: story band */
.band { background: var(--tint); }
.band-grid { display: grid; gap: 3rem; }
@media (min-width: 56rem) { .band-grid { grid-template-columns: 1.3fr 1fr; align-items: center; } }
.band__label { font-family: var(--sans); font-size: 0.85rem; font-weight: 650; color: var(--contour); margin: 0 0 1rem; letter-spacing: 0; }
.band blockquote { margin: 0 0 1.25rem; font-family: var(--serif); font-size: clamp(1.5rem, 1.15rem + 1.1vw, 2.1rem); line-height: 1.28; }
.band blockquote em { font-style: normal; color: var(--contour); }
.band a { font-weight: 650; }
.me { background: #fff; border-radius: 20px; padding: 1.75rem; display: flex; gap: 1.25rem; align-items: flex-start; }
.me__photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex: none; }
.me__title { font-size: 1.4rem; margin-bottom: 0.4rem; }
.me p { font-size: 1rem; color: var(--muted); margin-bottom: 0.7rem; }
.me p:last-child { margin-bottom: 0; }

/* Services */
.service { border-top: 1px solid var(--line); margin-top: 2.75rem; padding-top: 1.75rem; }
.service:first-child { margin-top: 0; }
.service h2 { margin-top: 0; }
.service dl { margin: 1.25rem 0 0; }
.service dt { font-size: 0.85rem; font-weight: 650; color: var(--contour); margin-top: 1.1rem; }
.service dd { margin: 0.2rem 0 0; }
.note { font-size: 1rem; color: var(--muted); margin-top: 1.1rem; }
.boundary { background: var(--tint); padding: 1.75rem 1.75rem 0.9rem; margin-top: 3rem; border-radius: var(--radius); }
.boundary h2 { font-size: 1.6rem; margin-top: 0; }

/* How it works: a real sequence, so it gets numbers */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 2rem 3.6rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -0.1rem;
  width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--forest); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 1rem;
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: calc(1.2rem - 1px); top: 2.6rem; bottom: 0.3rem; border-left: 2px solid var(--line); }
.steps h2 { font-size: 1.35rem; margin: 0 0 0.3em; }
.steps p { margin: 0; color: var(--muted); }

/* Stories */
.story h2 { font-size: clamp(2rem, 1.6rem + 1.5vw, 2.7rem); }
.story .byline { font-size: 0.92rem; color: var(--muted); margin-top: -0.3rem; }
.story .q { margin: 1.2em 0; }

/* FAQ */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; font-family: var(--serif); font-weight: 650; font-size: 1.3rem; line-height: 1.3; padding: 1.1rem 2.5rem 1.1rem 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 0.95rem; font-family: var(--sans); font-weight: 400; font-size: 1.6rem; color: var(--contour); }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 0.8rem; color: var(--muted); }

/* Contact form */
form { margin-top: 0.5rem; }
.field { margin-bottom: 1.6rem; }
label, legend { display: block; font-weight: 650; font-size: 1rem; margin-bottom: 0.35rem; }
.hint { display: block; font-size: 0.92rem; color: var(--muted); margin: -0.15rem 0 0.5rem; line-height: 1.45; }
.optional { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="email"], textarea {
  width: 100%; font: inherit; font-size: 1.05rem; color: var(--ink); background: #fff;
  border: 1.5px solid #c9d3c5; border-radius: 10px; padding: 0.75rem 0.9rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { min-height: 9rem; resize: vertical; line-height: 1.5; }
input:focus-visible, textarea:focus-visible { outline: none; border-color: var(--water); box-shadow: 0 0 0 4px rgba(31, 92, 133, 0.18); }
fieldset { border: 0; padding: 0; margin: 0 0 1.6rem; }
.checks { display: grid; gap: 0.55rem 1.5rem; margin-top: 0.4rem; }
@media (min-width: 36rem) { .checks { grid-template-columns: 1fr 1fr; } }
.checks label { font-weight: 400; display: flex; gap: 0.6rem; align-items: center; margin: 0; }
.checks input { width: 1.15rem; height: 1.15rem; accent-color: var(--forest); }
.warning { background: var(--tint); padding: 1rem 1.2rem; border-radius: 12px; font-size: 1rem; }
.hp { position: absolute; left: -9999px; }
.sent { margin-top: 1rem; padding: 1.6rem 1.75rem 0.8rem; background: var(--tint); border-radius: var(--radius); }
.sent h2 { margin-top: 0; font-size: 1.7rem; }
.sent:focus { outline: none; }
form[hidden], .sent[hidden] { display: none; }

/* Fill-ins Ian still owes (drafts build only) */
.todo { background: #fff3a8; outline: 1px dashed #b39500; padding: 0 0.2em; color: #4a3d00; }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest); color: rgba(255, 255, 255, 0.72); }
.site-footer .wrap { padding: 3rem 0 2.5rem; font-size: 0.92rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0 0 1.75rem; display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.site-footer p { margin: 0 0 0.4rem; max-width: 46rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .hero__map, .hero__caption { display: none; }
  .hero { background: none; color: var(--ink); }
  .hero h1, .hero p { color: var(--ink); }
  .hero__body { padding: 0; }
}
