/* Sprucebird. One stylesheet for every page. */

:root {
  --olive: #313821;
  --ink: #262d18;
  --cream: #e6e3d0;
  --text: #dcdcc6;
  --soft: #b6ba9a;
  --rule: rgba(230, 227, 208, 0.22);
  --field: rgba(230, 227, 208, 0.42);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

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

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

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

img { max-width: 100%; height: auto; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}
a:hover { color: #f6f4e8; text-decoration-thickness: 2px; }

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

.skip { position: absolute; left: -999rem; }
.skip:focus {
  left: 1rem; top: 1rem; z-index: 10;
  padding: 0.5rem 0.75rem;
  background: var(--cream); color: var(--ink);
}

/* ---- Page frame ----------------------------------------------
   Phone: logo and links across the top, then the page, then the
   address. Wider screens: logo, links and address run down the
   left like a letterhead and the page sits beside them. */

.page {
  max-width: 56rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.masthead img { display: block; width: 4.5rem; }
.masthead nav { display: flex; gap: 1.5rem; }
.masthead nav a { padding: 0.5rem 0; }
.masthead nav a[aria-current="page"] { text-decoration: none; color: var(--soft); }

main { margin-top: 2.5rem; }

.colophon {
  margin-top: 4rem;
  font-size: 0.9375rem;
  color: var(--soft);
}

/* The rule above the address is a fly line with a fly tied on.
   scripts/extras.js makes the line mend when you hover it. */
.flyline { display: flex; align-items: center; height: 16px; margin-bottom: 1.1rem; }
.flyline svg {
  display: block; overflow: visible;
  fill: none; stroke: var(--cream);
  stroke-linecap: round; stroke-linejoin: round;
}
.flyline__line { flex: 1; min-width: 0; height: 16px; opacity: 0.32; }
.flyline__line path { stroke-width: 1; vector-effect: non-scaling-stroke; }
.flyline__fly { flex: none; margin-left: -1px; opacity: 0.8; }
.flyline .solid { fill: var(--cream); }
.colophon address { font-style: normal; line-height: 1.75; }
.colophon p { margin-top: 1.25rem; }

@media (min-width: 54rem) {
  .page {
    display: grid;
    grid-template-columns: 9rem minmax(0, 35rem);
    grid-template-rows: auto 1fr;
    column-gap: 6rem;
    justify-content: center;
    padding: 5rem 2.5rem 6rem;
  }
  .masthead { grid-column: 1; grid-row: 1; display: block; }
  .masthead img { width: 8.25rem; }
  .masthead nav { display: block; margin-top: 2.5rem; }
  .masthead nav a { display: block; width: fit-content; padding: 0.2rem 0; }
  main { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
  .colophon {
    grid-column: 1; grid-row: 2; align-self: start;
    margin-top: 2.5rem;
  }
  /* the column is too narrow for both on one line */
  .colophon .dot { display: none; }
  .colophon p a { display: block; width: fit-content; }
}

/* ---- Text ---------------------------------------------------- */

h1, h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  color: var(--cream);
  text-wrap: balance;
}
h1 { font-size: clamp(2.15rem, 6.2vw, 2.95rem); margin-top: -0.14em; }
h2 { font-size: 1.75rem; margin-top: 3.25rem; }

p { margin: 1rem 0 0; }
h1 + p { margin-top: 1.4rem; }

strong { font-weight: 600; color: var(--cream); }

.plain { list-style: none; margin: 0; padding: 0; }
.plain li { margin-top: 1.1rem; }

.small { font-size: 0.9375rem; color: var(--soft); }

dl { margin: 1.25rem 0 0; }
dt { margin-top: 1rem; font-weight: 600; color: var(--cream); }
dd { margin: 0; }

/* ---- Forms --------------------------------------------------- */

form { margin-top: 1.75rem; }

.field { margin-top: 1.2rem; }

label, legend {
  display: block;
  padding: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--cream);
}
.optional { font-weight: 400; color: var(--soft); }

input[type="text"], input[type="email"], textarea {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.65rem 0.75rem;
  font: inherit;
  color: var(--cream);
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid var(--field);
  border-radius: 3px;
}
textarea { min-height: 9rem; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus { outline: 2px solid var(--cream); outline-offset: 1px; }
::placeholder { color: var(--soft); opacity: 0.8; }

fieldset { min-width: 0; margin: 1.2rem 0 0; padding: 0; border: 0; }
.checks label {
  display: flex; align-items: center; gap: 0.6rem;
  margin-top: 0.55rem;
  font-size: 1rem; font-weight: 400; color: var(--text);
}
.checks input {
  -webkit-appearance: none; appearance: none;
  display: grid; place-content: center; flex: none;
  width: 1.1rem; height: 1.1rem; margin: 0;
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid var(--field); border-radius: 2px;
}
.checks input:checked { background: var(--cream); border-color: var(--cream); }
.checks input:checked::after {
  content: "";
  width: 0.55rem; height: 0.3rem;
  border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: translateY(-1px) rotate(-45deg);
}

button {
  margin-top: 1.6rem;
  padding: 0.7rem 1.5rem;
  font: inherit; font-weight: 600;
  color: var(--ink);
  background: var(--cream);
  border: 0; border-radius: 3px;
  cursor: pointer;
}
button:hover { background: #f6f4e8; }
button:disabled { opacity: 0.6; cursor: default; }

.status { margin-top: 1rem; }

/* spam trap: off-screen, skipped by people and by keyboard */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---- Home ----------------------------------------------------- */

/* the opening lines, a size up from the rest */
.lede { font-size: 1.1875rem; line-height: 1.55; }
h1 + .lede { margin-top: 1.7rem; }

/* feature list: name on the left, what it does on the right */
.spec { margin-top: 1.75rem; }
.spec > div { padding: 0.95rem 0; border-top: 1px solid var(--rule); }
.spec > div:last-child { border-bottom: 1px solid var(--rule); }
.spec dt { margin: 0; }
.spec dd { margin-top: 0.2rem; }

@media (min-width: 40rem) {
  .spec > div { display: grid; grid-template-columns: 10.5rem 1fr; column-gap: 1.75rem; }
  .spec dd { margin-top: 0; }
}
