/* Palette: page #F7F6F3, text #1A1A1A, muted #5C5A55, hairline #E4E1DA, accent #1F4B6E */
/* Type: system font stacks only. Serif for headings, UI sans for body, mono for labels. */

:root {
  --page: #F7F6F3;
  --text: #1A1A1A;
  --muted: #5C5A55;
  --hairline: #E4E1DA;
  --accent: #1F4B6E;

  --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
}

h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem);
}

h3 {
  font-size: 1.35rem;
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  margin: 0;
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.4rem;
}

a {
  color: var(--text);
  text-decoration-color: var(--muted);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

::selection {
  background: var(--hairline);
}

/* Layout */

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.prose {
  max-width: 720px;
}

main {
  padding: 3.5rem 0 4rem;
}

section + section {
  margin-top: 4.5rem;
}

.lede {
  font-size: 1.2rem;
  color: var(--text);
  max-width: 40ch;
  margin-top: 1.25rem;
}

.label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.muted {
  color: var(--muted);
}

/* Skip link */

.skip {
  position: absolute;
  left: -10000px;
  top: 0;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  background: var(--page);
  padding: 0.5rem 0.75rem;
  z-index: 10;
}

/* Masthead: letterhead rule under the wordmark */

.masthead {
  border-bottom: 1px solid var(--hairline);
}

.masthead-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-top: 1.25rem;
  padding-bottom: 1.1rem;
}

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

.masthead nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
}

.masthead nav li + li {
  margin-top: 0;
}

.masthead nav a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.masthead nav a:hover {
  border-bottom-color: var(--muted);
}

.masthead nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.4em;
}

/* The one action on the site */

.action {
  display: inline-block;
  background: var(--accent);
  color: var(--page);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.85rem 1.4rem;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

.action:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.action-row {
  margin-top: 2rem;
}

/* Home: opening */

.opening {
  padding-top: 0.5rem;
}

/* Home: problems, two columns of ruled blocks */

.problems {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem 3rem;
  margin-top: 2rem;
}

.problem {
  border-top: 1px solid var(--hairline);
  padding-top: 1.25rem;
}

.problem h3 a {
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--hairline);
}

.problem h3 a:hover {
  border-bottom-color: var(--muted);
}

.problem p {
  color: var(--muted);
  margin-top: 0.75rem;
  margin-bottom: 0;
}

/* Ledger: the services strip as a hairline-ruled scope schedule (signature element) */

.ledger {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  border-top: 1px solid var(--text);
}

.ledger li {
  margin: 0;
  border-bottom: 1px solid var(--hairline);
}

.ledger a {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
  padding: 1.1rem 0;
  text-decoration: none;
  color: var(--text);
}

.ledger a:hover .ledger-name {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.ledger-name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  line-height: 1.2;
}

.ledger-desc {
  color: var(--muted);
}

/* Home: how it works, a real sequence so numbering is earned */

.steps {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 2rem;
}

.steps li {
  margin: 0;
  border-top: 1px solid var(--hairline);
  padding-top: 1rem;
}

.steps h3 {
  margin-top: 0.4rem;
}

.steps p {
  color: var(--muted);
  margin: 0.6rem 0 0;
}

/* Services page: one anchored section per service, label column beside content */

.service {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--hairline);
  scroll-margin-top: 2rem;
}

.service + .service {
  margin-top: 3rem;
}

.service-meta p {
  margin-bottom: 0.9rem;
}

.service-meta .label {
  margin-bottom: 0.25rem;
}

.service-body h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0;
}

.service-body h3:first-child {
  margin-top: 0;
}

.service-body ul {
  margin-bottom: 0;
}

.service-tools {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 1.5rem;
}

/* About: practical facts */

.facts {
  margin: 2.5rem 0 0;
  border-top: 1px solid var(--hairline);
}

.facts div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--hairline);
}

.facts dt {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.facts dd {
  margin: 0;
}

/* Contact form */

.form {
  margin-top: 2rem;
}

.field {
  margin-bottom: 1.4rem;
}

.field label,
.field legend {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.field .hint {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.field input,
.field textarea,
.field select {
  display: block;
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--page);
  border: 1px solid var(--muted);
  border-radius: 0;
  padding: 0.7rem 0.8rem;
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible {
  outline-offset: 1px;
}

.field input:user-invalid,
.field textarea:user-invalid {
  border-color: var(--text);
  border-width: 2px;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#sent {
  display: none;
  border-top: 1px solid var(--text);
  padding-top: 1.25rem;
  margin-top: 2rem;
}

#sent:target {
  display: block;
}

#sent h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 2rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-inner {
  display: grid;
  gap: 1rem;
}

.footer-inner ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 0;
  margin: 0;
}

.footer-inner li + li {
  margin-top: 0;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  color: var(--muted);
}

/* Legal pages */

.legal h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 0.75rem;
}

.legal h2:first-of-type {
  margin-top: 1.5rem;
}

.legal p,
.legal li {
  color: var(--text);
}

/* 404 */

.quiet {
  padding: 5rem 0;
}

/* Photography: full-bleed band on home, inline frame on about */

.hero-image,
.inline-image {
  margin: 3rem 0 0;
}

.hero-image img,
.inline-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--hairline);
}

.hero-image figcaption,
.inline-image figcaption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 0.5rem;
}

.inline-image {
  margin: 0 0 2.5rem;
}

/* Wider screens */

@media (min-width: 720px) {
  main {
    padding: 5rem 0 6rem;
  }

  .problems {
    grid-template-columns: 1fr 1fr;
  }

  .ledger a {
    grid-template-columns: 17rem 1fr;
    gap: 2rem;
    align-items: baseline;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }

  .service {
    grid-template-columns: 15rem 1fr;
  }

  .facts div {
    grid-template-columns: 11rem 1fr;
    gap: 1.5rem;
    align-items: baseline;
  }

  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}
