/* grandefamily.us — shared styles. System fonts only; no external requests. */
:root {
  color-scheme: light dark;
  --bg: #fbf6ee;
  --bg-soft: #f3eadc;
  --card: #fffdf9;
  --text: #2b2420;
  --muted: #5c5048;
  --line: #e4d7c4;
  --accent: #9a3f1c;      /* terracotta, 6.6:1 on --bg */
  --accent-soft: #e9c9b0;
  --leaf: #5f7a4f;
  --leaf-2: #86a06f;
  --hill-1: #e7dcc7;
  --hill-2: #d9caae;
  --sun: #f2c48d;
  --house: #fffaf2;
  --roof: #b5532d;
  --window: #f6cf7a;
  --trunk: #7a5a43;
  --shadow: 0 1px 2px rgb(60 40 20 / .06), 0 8px 24px rgb(60 40 20 / .06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, Cambria, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --maxw: 44rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1714;
    --bg-soft: #231e1a;
    --card: #26201c;
    --text: #f1e8dc;
    --muted: #c4b6a6;
    --line: #3a312a;
    --accent: #f0a77e;
    --accent-soft: #5a3524;
    --leaf: #7f9c6c;
    --leaf-2: #a3bb8c;
    --hill-1: #2c2520;
    --hill-2: #362d26;
    --sun: #e2b27a;
    --house: #efe4d4;
    --roof: #c4643c;
    --window: #ffd88a;
    --trunk: #a07e63;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }

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

.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--accent); color: var(--bg);
  padding: .5rem .9rem; border-radius: .5rem; z-index: 10;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.wrap-wide { width: min(100% - 2.5rem, 64rem); margin-inline: auto; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap-wide {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: .9rem; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  color: var(--text); text-decoration: none;
  font-family: var(--serif); font-size: 1.15rem; font-weight: 600; letter-spacing: .01em;
}
.brand svg { width: 1.9rem; height: 1.9rem; flex: none; }
.nav ul { list-style: none; display: flex; gap: .25rem 1.25rem; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-size: .95rem; padding: .25rem 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }

/* Hero */
.hero { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(2rem, 5vw, 3.5rem); }
.hero .wrap-wide {
  display: grid; gap: clamp(1.5rem, 4vw, 3.5rem);
  grid-template-columns: 1fr; align-items: center;
}
@media (min-width: 52rem) { .hero .wrap-wide { grid-template-columns: 1.05fr 1fr; } }
.eyebrow {
  margin: 0 0 .75rem; color: var(--accent);
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; font-weight: 600; letter-spacing: -.005em; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.2rem); margin: 0 0 1rem; }
.lede { font-size: clamp(1.1rem, 2.2vw, 1.25rem); color: var(--muted); margin: 0 0 1.25rem; max-width: 34rem; }
.hero-art { width: 100%; max-width: 30rem; justify-self: center; }
.hero-art svg { width: 100%; height: auto; }

/* Hero art colours (driven by CSS variables so dark mode follows) */
.a-sun { fill: var(--sun); }
.a-hill1 { fill: var(--hill-1); }
.a-hill2 { fill: var(--hill-2); }
.a-house { fill: var(--house); stroke: var(--trunk); stroke-width: 2; }
.a-roof { fill: var(--roof); }
.a-door { fill: var(--roof); opacity: .85; }
.a-window { fill: var(--window); }
.a-frame { fill: none; stroke: var(--trunk); stroke-width: 2; }
.a-trunk { fill: none; stroke: var(--trunk); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.a-branch { fill: none; stroke: var(--trunk); stroke-width: 3; stroke-linecap: round; }
.a-leaf { fill: var(--leaf); }
.a-leaf2 { fill: var(--leaf-2); }
.a-smoke { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; opacity: .45; }
.a-path { fill: var(--bg-soft); }

/* Feature cards */
.features { padding-block: 0 clamp(2.5rem, 6vw, 4rem); }
.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 1rem;
  padding: 1.25rem 1.25rem 1.1rem; box-shadow: var(--shadow);
}
.card svg { width: 2rem; height: 2rem; color: var(--accent); margin-bottom: .6rem; }
.card h2 { font-size: 1.15rem; margin: 0 0 .35rem; }
.card p { margin: 0; color: var(--muted); font-size: .97rem; }

.note {
  margin-top: 2rem; padding: 1.1rem 1.25rem; border-radius: 1rem;
  background: var(--bg-soft); color: var(--muted); font-size: .97rem;
}
.note p { margin: 0; }

/* Prose pages */
.page { padding-block: clamp(2.25rem, 6vw, 4rem); }
.page h1 { font-size: clamp(2.1rem, 5.5vw, 3rem); margin: 0 0 .5rem; }
.page .meta { color: var(--muted); margin: 0 0 2rem; font-size: .95rem; }
.page h2 { font-size: 1.4rem; margin: 2.25rem 0 .6rem; padding-top: .25rem; }
.page h3 { font-size: 1.1rem; margin: 1.5rem 0 .4rem; }
.page p, .page li { max-width: 40rem; }
.page ul { padding-left: 1.25rem; }
.page li { margin-block: .35rem; }
.page li::marker { color: var(--accent); }
.summary {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: .75rem; padding: 1rem 1.25rem; box-shadow: var(--shadow);
}
.summary p { margin: .25rem 0; }
.toc { margin: 1.5rem 0 0; font-size: .95rem; }
.toc ol { margin: .4rem 0 0; padding-left: 1.25rem; columns: 2 14rem; column-gap: 2rem; }
.toc a { color: var(--muted); }
.toc a:hover { color: var(--accent); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: .92em; }

/* 404 */
.notfound { text-align: center; padding-block: clamp(3rem, 10vw, 6rem); }
.notfound svg { width: min(16rem, 70%); margin: 0 auto 1.5rem; height: auto; }
.notfound h1 { font-size: clamp(2rem, 6vw, 2.8rem); margin: 0 0 .5rem; }
.notfound p { color: var(--muted); margin: 0 auto 1.5rem; max-width: 28rem; }
.button {
  display: inline-block; background: var(--accent); color: var(--bg);
  padding: .65rem 1.2rem; border-radius: 999px; text-decoration: none; font-weight: 600;
}
.button:hover { filter: brightness(1.08); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); color: var(--muted); font-size: .92rem; }
.site-footer .wrap-wide {
  display: flex; flex-wrap: wrap; gap: .75rem 2rem; justify-content: space-between; align-items: center;
  padding-block: 1.5rem;
}
.site-footer p { margin: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

@media (prefers-reduced-motion: no-preference) {
  .a-smoke { animation: drift 6s ease-in-out infinite; }
  @keyframes drift { 0%,100% { transform: translateY(0); opacity: .45; } 50% { transform: translateY(-3px); opacity: .25; } }
}
@media print {
  .site-header nav, .skip-link, .hero-art { display: none; }
  body { background: #fff; color: #000; }
}
.a-post { fill: var(--trunk); }
.a-mouth { fill: var(--house); opacity: .25; }
.a-q { fill: var(--house); }
.a-sky { fill: var(--bg-soft); }
.a-path { fill: var(--bg); }
