/* Trekwork site. Palette and type per 04-competitive-edge-and-website.md.
   Copper (#A8603C) is 4.3:1 on paper, so it is used for underlines, rules
   and large text (24px+) only; small link text is navy. */

:root {
  --navy: #1B2A3A;
  --paper: #F6F3EE;
  --charcoal: #2E2E2E;
  --copper: #A8603C;
  --stone: #C9C3B8;

  --font: "Söhne", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 38rem;
  --page: 64rem;
  --gutter: 1.25rem;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--charcoal);
  font-family: var(--font);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  overflow-wrap: break-word;
}

@media (min-width: 40rem) {
  body { font-size: 1.125rem; } /* 18px */
}

h1, h2, h3 {
  color: var(--navy);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 0 0 0.75rem;
}

h1 { font-size: clamp(1.875rem, 1.3rem + 2.6vw, 2.75rem); max-width: 22ch; }
h2 { font-size: 1.5rem; margin-top: 3rem; }
h3 { font-size: 1.125rem; font-weight: 600; margin-top: 1.75rem; margin-bottom: 0.25rem; }

p, ul, ol, dl, table { margin: 0 0 1.25rem; }
ul, ol { padding-left: 1.25rem; }
li + li { margin-top: 0.5rem; }
strong { color: var(--navy); font-weight: 600; }

a {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--copper);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 3px; }
a:focus-visible {
  outline: 3px solid var(--copper);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.prose { max-width: var(--measure); }

/* Skip link */
.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  background: var(--navy);
  color: var(--paper);
  padding: 0.5rem 0.75rem;
  z-index: 10;
}
.skip:focus { top: 0.5rem; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--stone);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.wordmark {
  color: var(--navy);
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
}
.wordmark:hover { text-decoration: none; }

.site-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav li + li { margin-top: 0; }
.site-nav a {
  text-decoration-color: transparent;
  padding: 0.25rem 0;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration-color: var(--copper);
}

/* Main */
main { padding: 3rem 0 4rem; }
@media (min-width: 40rem) { main { padding-top: 4.5rem; } }

.lede {
  font-size: 1.1875rem;
  max-width: var(--measure);
}
@media (min-width: 40rem) { .lede { font-size: 1.3125rem; } }

hr {
  border: 0;
  border-top: 1px solid var(--stone);
  margin: 3rem 0;
}

/* Founder block: the portrait slot is an <img> with an empty src until the
   commissioned photograph exists. Empty, it is not rendered at all. */
.founder {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}
.founder .prose { flex: 1 1 20rem; }
.founder img {
  display: block;
  flex: 0 1 18rem;
  width: 100%;
  max-width: 18rem;
  height: auto;
}
.founder img[src=""],
.founder img:not([src]) { display: none; }

/* Values */
.values {
  list-style: none;
  padding: 0;
  max-width: var(--measure);
  counter-reset: value;
}
.values li {
  counter-increment: value;
  border-top: 1px solid var(--stone);
  padding: 1.25rem 0 0 2.25rem;
  margin: 0 0 1.25rem;
  position: relative;
}
.values li::before {
  content: counter(value);
  position: absolute;
  left: 0;
  top: 1.25rem;
  color: var(--copper);
  font-weight: 600;
}
.values li:last-child { border-bottom: 1px solid var(--stone); padding-bottom: 1.25rem; }

/* Price */
.price {
  color: var(--navy);
  font-size: clamp(2.75rem, 2rem + 4vw, 4.5rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 2rem 0 0.5rem;
}
.price-note { color: var(--charcoal); margin-bottom: 2.5rem; }

table {
  width: 100%;
  max-width: var(--measure);
  border-collapse: collapse;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--stone);
}
th { font-weight: 400; padding-right: 1rem; }
td { text-align: right; color: var(--navy); font-weight: 500; white-space: nowrap; }
thead th, thead td { font-size: 0.875rem; font-weight: 600; color: var(--navy); }

.ladder { max-width: var(--measure); padding-left: 1.5rem; }
.ladder li::marker { color: var(--copper); font-weight: 600; }

/* Security sheet */
.sheet {
  max-width: var(--measure);
  margin: 0;
}
.sheet dt {
  color: var(--navy);
  font-weight: 600;
  border-top: 1px solid var(--stone);
  padding-top: 1.25rem;
  margin-top: 1.25rem;
}
.sheet dd { margin: 0.25rem 0 0; }

/* The one call to action per page: the phone number */
.call {
  margin-top: 3.5rem;
  max-width: var(--measure);
}
.call a {
  color: var(--copper);
  font-size: 1.75rem;
  font-weight: 500;
  text-decoration: none;
}
.call a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

/* Footer */
.site-footer {
  background: var(--navy);
  color: var(--paper);
  padding: 2.5rem 0 3rem;
  font-size: 1rem;
}
.site-footer a {
  color: var(--paper);
  text-decoration-color: var(--copper);
}
.site-footer .wordmark { color: var(--paper); font-size: 1.25rem; }
.site-footer p { margin: 0.75rem 0 0; max-width: var(--measure); }
.site-footer .contact span + span::before {
  content: "·";
  padding: 0 0.6em;
  color: var(--stone);
}
.site-footer .promise { color: var(--stone); }

.founder h2 { margin-top: 0; }
caption {
  caption-side: top;
  text-align: left;
  color: var(--navy);
  font-weight: 600;
  padding-bottom: 0.5rem;
}
