/* Nordic Wood Relaxation — website v1 ("Quiet Nordic Minimalism").
   Temporary foundation styling, NOT final brand canon. One file, no build step,
   system fonts only (no third-party requests). Replace wholesale in Website 2.0. */

:root {
  --bg: #f5f2ec;
  --text: #1f1e1c;
  --muted: #5a5750;
  --rule: #ddd7cc;
  --accent: #3f5446;
  --accent-soft: #e6e8e0;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 38rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161715;
    --text: #e8e5de;
    --muted: #a7a399;
    --rule: #33342f;
    --accent: #a9bcaa;
    --accent-soft: #22261f;
  }
}

*, *::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-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* ---- Links & focus ---- */
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color 160ms ease, color 160ms ease;
}
a:hover { text-decoration-color: var(--accent); color: var(--accent); }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -3rem;
  padding: 0.5rem 0.75rem;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  z-index: 10;
}
.skip-link:focus { top: 1rem; }

/* ---- Frame ---- */
.wrap {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
  padding-bottom: 1rem;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.0625rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.wordmark:hover { color: var(--text); }

main { flex: 1; }

/* ---- Type ---- */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* ---- Home ---- */
.hero {
  padding: clamp(4rem, 14vh, 9rem) 0 clamp(3.5rem, 10vh, 6rem);
}
.hero h1 {
  font-size: clamp(2.25rem, 1.4rem + 4vw, 4.25rem);
  max-width: 14ch;
}
.hero .lede {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  max-width: 34rem;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  color: var(--muted);
}

.notes {
  display: grid;
  gap: clamp(2.5rem, 5vw, 3.5rem);
  padding: clamp(3rem, 7vw, 4.5rem) 0 clamp(4rem, 10vw, 7rem);
  border-top: 1px solid var(--rule);
}
@media (min-width: 48rem) {
  .notes { grid-template-columns: repeat(3, 1fr); gap: 3rem; }
}
.notes h2 {
  font-size: 1.25rem;
  margin-bottom: 0.9rem;
}
.notes p { color: var(--muted); font-size: 0.975rem; }
.notes p a { color: var(--text); }

/* ---- Documents (privacy, terms, 404) ---- */
.doc {
  max-width: var(--measure);
  padding: clamp(3rem, 9vh, 5.5rem) 0 clamp(4rem, 10vw, 6rem);
}
.doc h1 { font-size: clamp(2rem, 1.5rem + 2.5vw, 3rem); }
.doc .meta {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9375rem;
}
.doc .summary {
  margin: 2.5rem 0 0;
  padding: 1.5rem 1.5rem 1.5rem 1.25rem;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
}
.doc h2 {
  font-size: 1.375rem;
  margin: 3rem 0 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.doc h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
}
.doc ul { padding-left: 1.2rem; margin: 0 0 1.1em; }
.doc li { margin-bottom: 0.5em; }
.doc li::marker { color: var(--muted); }
.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  overflow-wrap: anywhere;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.875rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  padding-top: 1.75rem;
  padding-bottom: 2.25rem;
}
.site-footer p { margin: 0; }
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer a { text-decoration-color: transparent; }
.site-footer a:hover, .site-footer a:focus-visible { text-decoration-color: currentColor; }
.site-footer a[aria-current="page"] { color: var(--text); }

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

.doc .back { margin-top: 2rem; }
