/* Offcut Bench - one stylesheet for the whole site.
   Written by hand; nothing clever in here. */

:root {
  --paper: #f6efdf;
  --paper-2: #ede3cc;
  --ink: #2b2118;
  --ink-soft: #5c4a3a;
  --walnut: #3b2616;
  --walnut-2: #54371f;
  --amber: #c9861a;
  --amber-pale: #f0d9a8;
  --rule: #d8c9a8;
  --on-walnut: #f3e6cc;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1d1611;
    --paper-2: #271e17;
    --ink: #eadfc9;
    --ink-soft: #b9a88e;
    --walnut: #120c08;
    --walnut-2: #3a2616;
    --amber: #e0a03a;
    --amber-pale: #4a3414;
    --rule: #43342a;
    --on-walnut: #eadfc9;
  }
}

* { box-sizing: border-box; }

html { font-size: 17px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, "Segoe UI", sans-serif;
  line-height: 1.6;
}

h1, h2, h3, .brand, .block-species {
  font-family: Rockwell, "Rockwell Nova", "Roboto Slab", "DejaVu Serif", "Sitka Small", Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
}

a { color: var(--amber); }
a:hover, a:focus { color: var(--ink); }

.wrap { max-width: 56rem; margin: 0 auto; padding: 0 1.25rem; }

/* ---- header band ---- */
.band { background: var(--walnut); color: var(--on-walnut); }
.band a { color: var(--on-walnut); text-decoration: none; }
.band a:hover, .band a:focus { color: var(--amber); text-decoration: underline; }

.top { border-bottom: 4px solid var(--amber); }
.top .wrap {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; padding-top: .8rem; padding-bottom: .8rem;
}
.brand { font-size: 1.25rem; letter-spacing: .02em; }
.top nav a { margin-left: 1.2rem; font-size: .95rem; }
.top nav a:first-child { margin-left: 0; }

/* ---- home title block ---- */
.title-block {
  background: var(--walnut-2);
  color: var(--on-walnut);
  padding: 3.5rem 0 3rem;
  border-bottom: 1px solid var(--walnut);
}
.title-block h1 { font-size: 3.4rem; margin: 0 0 .6rem; letter-spacing: -.01em; }
.title-block p { max-width: 34rem; margin: 0; font-size: 1.1rem; }
.title-block img { float: right; width: 11rem; height: auto; margin: 0 0 1rem 2rem; }

/* ---- alternating project list ---- */
.projects { list-style: none; margin: 2.5rem 0; padding: 0; }
.projects li {
  display: flex; align-items: stretch;
  margin-bottom: 1.6rem;
  border: 1px solid var(--rule);
  background: var(--paper-2);
}
.projects li:nth-child(even) { flex-direction: row-reverse; }
.p-text { flex: 1 1 auto; padding: 1.3rem 1.5rem; }
.p-text h2 { margin: 0 0 .4rem; font-size: 1.45rem; }
.p-text h2 a { color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--amber); }
.p-text h2 a:hover { color: var(--amber); }
.p-text p { margin: 0; color: var(--ink-soft); }
.p-block {
  flex: 0 0 11rem;
  display: flex; flex-direction: column; justify-content: center;
  padding: 1rem; text-align: center;
  background: var(--amber); color: #2b1a08;
}
.projects li:nth-child(3n+2) .p-block { background: var(--walnut-2); color: var(--on-walnut); }
.projects li:nth-child(3n) .p-block { background: #8a5a2b; color: #fbf1dc; }
.block-species { font-size: 1.3rem; }
.block-hours { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-top: .3rem; }

/* ---- article pages ---- */
main { padding: 2.2rem 0 3rem; }
article h1, .page h1 { font-size: 2.3rem; margin: 0 0 .3rem; }
.meta { color: var(--ink-soft); font-size: .92rem; margin: 0 0 1.6rem;
  padding-bottom: .8rem; border-bottom: 2px solid var(--rule); }
article p, .page p { max-width: 40rem; }
h2 { font-size: 1.3rem; margin: 2rem 0 .6rem; }

table.cut-list { border-collapse: collapse; width: 100%; max-width: 40rem; font-size: .95rem; }
.cut-list caption { text-align: left; color: var(--ink-soft); font-size: .85rem; padding-bottom: .4rem; }
.cut-list th, .cut-list td { text-align: left; padding: .45rem .7rem; border-bottom: 1px solid var(--rule); }
.cut-list thead th { background: var(--walnut-2); color: var(--on-walnut); border-bottom: 0; }
.cut-list tbody tr:nth-child(even) { background: var(--paper-2); }
.cut-list td.n { text-align: right; width: 3rem; }

.differently {
  max-width: 40rem;
  margin: 2rem 0;
  padding: 1rem 1.3rem;
  border-left: 6px solid var(--amber);
  background: var(--amber-pale);
}
.differently h2 { margin: 0 0 .4rem; font-size: 1.1rem; }
.differently p { margin: 0; }

.next { margin-top: 2.5rem; font-size: .95rem; }

dl.wall dt {
  font-family: Rockwell, "Rockwell Nova", "Roboto Slab", "DejaVu Serif", Georgia, serif;
  font-weight: 700; margin-top: 1.2rem;
}
dl.wall dd { margin: .2rem 0 0; max-width: 40rem; padding-left: .9rem; border-left: 3px solid var(--rule); }

.lost { text-align: center; padding: 3rem 0; }
.lost h1 { font-size: 4rem; margin: 0; color: var(--amber); }
.lost p { margin-left: auto; margin-right: auto; }

/* ---- footer band ---- */
.foot { border-top: 4px solid var(--amber); font-size: .88rem; }
.foot .wrap { padding-top: 1.2rem; padding-bottom: 1.4rem; }
.foot p { margin: .2rem 0; }

@media (max-width: 34rem) {
  .title-block h1 { font-size: 2.3rem; }
  .title-block img { float: none; display: block; margin: 0 0 1rem; width: 8rem; }
  .projects li, .projects li:nth-child(even) { flex-direction: column; }
  .p-block { flex-basis: auto; }
  .top nav { margin-top: .4rem; }
}
