/* Trestle Web Studio: "Workshop" design language.
   Drafting-paper grid behind solid panels, heavy 2px rules, slab display,
   hyperlegible body, mono labels for real measurements (prices, steps). */

@font-face { font-family: "Zilla Slab"; src: url("/fonts/zilla-slab-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("/fonts/atkinson-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("/fonts/atkinson-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  /* Color */
  --paper: #eef1f0;
  --panel: #f8faf9;
  --ink: #18231f;
  --muted: #3f4d47;
  --spruce: #1f4d3f;
  --on-spruce: #ffffff;
  --signal: #a8420f;
  --grid: #d5dfdb;
  --rule: #18231f;
  --focus: #a8420f;
  --shadow: #18231f;

  /* Type */
  --font-display: "Zilla Slab", "Rockwell", Georgia, serif;
  --font-body: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Menlo, monospace;

  /* Space and structure */
  --max: 70rem;
  --gutter: 1rem;
  --cell: 2.5rem;
  --rule-w: 2px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111815;
    --panel: #18211d;
    --ink: #e8eeeb;
    --muted: #b9c6c0;
    --spruce: #8fd1b8;
    --on-spruce: #0d1a15;
    --signal: #f0a070;
    --grid: #1e2a25;
    --rule: #c9d6d0;
    --focus: #f0a070;
    --shadow: #000000;
    color-scheme: dark;
  }
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
}

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.3rem, 6vw, 3.9rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 4vw, 2.4rem); }
h3 { font-size: 1.35rem; }
p { margin: 0; }

a { color: var(--ink); text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 3px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
main:focus { outline: none; }

.label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal);
}

/* Skip link */
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--spruce); color: var(--on-spruce);
  padding: 0.75rem 1rem; font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* Header */
.site-header { background: var(--panel); border-bottom: var(--rule-w) solid var(--rule); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1.5rem; padding-block: 0.75rem; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; }
.brand svg { width: 2.25rem; height: auto; flex: none; }
.brand span { font-family: var(--font-body); font-weight: 400; font-size: 1rem; color: var(--muted); }
.nav-list { display: flex; flex-wrap: wrap; gap: 0 1.25rem; list-style: none; margin: 0; padding: 0; }
.nav-list a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 0.15rem; text-decoration: none; font-weight: 700; }
.nav-list a:hover, .nav-list a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 3px; }

/* Sections sit on the grid; content lives on solid panels */
.section { padding-block: 3.5rem; }
.section-head { display: grid; gap: 0.4rem; margin-bottom: 1.5rem; }
/* Text that sits directly on the grid gets a paper backing so lines never cut under it */
.section-head > * { justify-self: start; background: var(--paper); padding-inline: 0.3rem; margin-inline: -0.3rem; }
section[id] { scroll-margin-top: 1rem; }

.panel {
  background: var(--panel);
  border: var(--rule-w) solid var(--rule);
  padding: clamp(1.25rem, 3vw, 2.25rem);
}

/* Hero */
.hero { padding-block: 3rem 2.5rem; }
.hero .panel { display: grid; gap: 1.1rem; max-width: 50rem; box-shadow: 8px 8px 0 var(--shadow); }
.lede { font-size: 1.25rem; max-width: 40rem; }

.button {
  justify-self: start;
  display: inline-flex; align-items: center; min-height: 48px;
  background: var(--spruce); color: var(--on-spruce);
  font-weight: 700; padding: 0.75rem 1.35rem;
  text-decoration: none;
  border: var(--rule-w) solid var(--rule);
  box-shadow: 4px 4px 0 var(--shadow);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.button:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--shadow); text-decoration: underline; }

/* Services: one load-bearing beam split into bays */
.beam {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  background: var(--panel);
  border: var(--rule-w) solid var(--rule);
}
.bay { padding: 1.4rem 1.25rem; display: grid; gap: 0.5rem; align-content: start; border: 0 solid var(--rule); border-width: 0 var(--rule-w) var(--rule-w) 0; margin: 0 calc(-1 * var(--rule-w)) calc(-1 * var(--rule-w)) 0; }
.bay .price { font-family: var(--font-mono); font-size: 0.95rem; color: var(--signal); font-variant-numeric: tabular-nums; }
.bay p:last-child { font-size: 1rem; }

.note { margin-top: 1.5rem; max-width: 50rem; display: grid; gap: 0.4rem; }

/* Process: a real sequence, so steps are numbered */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: 0.4rem; align-content: start; }
.steps li::before { content: "Step " counter(step); font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--signal); }
.steps p { font-size: 1rem; }

/* Prose pages and narrow panels */
.prose { max-width: 50rem; display: grid; gap: 1rem; }
.prose ul { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.35rem; }
.prose h1 ~ h2 { font-size: 1.6rem; margin-top: 0.75rem; }

/* Footer */
.site-footer { background: var(--panel); border-top: var(--rule-w) solid var(--rule); padding-block: 1.25rem; color: var(--muted); font-size: 1rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }

@media (forced-colors: active) {
  .button, .skip-link { border: 2px solid ButtonText; }
  .panel, .beam { border-color: CanvasText; }
}
