/* Paper Fen — bindery & book conservation
   Single stylesheet. No external fonts, scripts or assets. */

:root {
  --ink:      #191d1a;
  --ink-soft: #5c625b;
  --paper:    #eaeae2;
  --paper-2:  #e0e2d7;
  --reed:     #b9bfae;
  --sedge:    #4f6455;
  --thread:   #8a3d52;

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

  --measure: 34rem;
  --gutter: 1.5rem;
  --spine: 2.75rem;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.62;
}

/* ---------- shell ---------- */

.shell {
  max-width: 52rem;
  margin: 0 auto;
  padding: 0 var(--gutter) 5rem;
}

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 2rem;
  padding: 2.25rem 0 1.75rem;
  border-bottom: 1px solid var(--reed);
}

.wordmark {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.wordmark span { color: var(--sedge); }

.nav {
  display: flex;
  gap: 1.25rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.nav a:hover,
.nav a:focus-visible { color: var(--ink); border-bottom-color: var(--thread); }

.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--reed); }

/* ---------- opening statement ---------- */

.opening { padding: 3.5rem 0 3rem; }

.opening p {
  max-width: 30rem;
  margin: 0;
  font-size: clamp(1.5rem, 1.05rem + 1.9vw, 2.125rem);
  line-height: 1.28;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.opening .trailing {
  margin-top: 1.5rem;
  max-width: var(--measure);
  font-size: 1.0625rem;
  line-height: 1.62;
  letter-spacing: 0;
  color: var(--ink-soft);
}

/* ---------- sewing-station spine ---------- */

.section {
  position: relative;
  padding: 2.75rem 0 0 var(--spine);
  border-top: 1px solid var(--reed);
  margin-top: 2.75rem;
}

.section::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 2.75rem;
  bottom: 0.5rem;
  width: 1px;
  background: var(--reed);
}

.section::after {
  content: "";
  position: absolute;
  left: 0;
  top: 3.35rem;
  width: 1.125rem;
  height: 2px;
  background: var(--sedge);
}

.section > :first-child { margin-top: 0; }

.label {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sedge);
  margin: 0 0 0.85rem;
}

h1, h2, h3 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--ink);
}

h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 1.25rem; }
h2 { font-size: 1.3125rem; line-height: 1.25; margin: 0 0 1rem; }
h3 { font-size: 1rem; line-height: 1.3; margin: 2rem 0 0.4rem; }

p { max-width: var(--measure); margin: 0 0 1.1rem; }

a { color: var(--ink); text-decoration-color: var(--thread); text-underline-offset: 0.16em; }

a:hover, a:focus-visible { color: var(--thread); }

/* ---------- work list ---------- */

.work { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }

.work li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px dotted var(--reed);
}

.work li:last-child { border-bottom: 0; }

.work .name { font-weight: 600; font-family: var(--sans); font-size: 0.9375rem; letter-spacing: -0.01em; }

.work .from {
  margin-left: auto;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.work .note { flex-basis: 100%; margin: 0; color: var(--ink-soft); font-size: 0.9375rem; }

/* ---------- ordered steps ---------- */

.steps { max-width: var(--measure); margin: 0; padding: 0 0 0 1.4rem; }

.steps li { margin-bottom: 0.9rem; padding-left: 0.35rem; }

.steps li::marker { font-family: var(--sans); font-size: 0.8125rem; color: var(--sedge); }

/* ---------- aside ---------- */

.plate {
  max-width: var(--measure);
  background: var(--paper-2);
  border-left: 2px solid var(--sedge);
  padding: 1.15rem 1.25rem;
  margin: 1.5rem 0;
}

.plate p:last-child { margin-bottom: 0; }

.plate p { font-size: 0.9375rem; }

/* ---------- contact ---------- */

.contact-line { font-size: 1.125rem; }

.detail {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--ink-soft);
  max-width: var(--measure);
}

/* ---------- foot ---------- */

.foot {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--reed);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.foot a { color: var(--ink-soft); }

/* ---------- 404 ---------- */

.lost { padding: 5rem 0 3rem; }

.lost h1 { font-size: 1.5rem; }

/* ---------- responsive ---------- */

@media (max-width: 34rem) {
  :root { --spine: 0rem; }

  .section { padding-left: 0; }
  .section::before, .section::after { display: none; }
  .masthead { padding-top: 1.75rem; }
  .opening { padding: 2.5rem 0 2rem; }
  .work .from { margin-left: 0; flex-basis: 100%; }
}

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

:focus-visible { outline: 2px solid var(--thread); outline-offset: 3px; }
