/* Trunnel & Co., Direction A: Strakes.
   Full bleed planks in sea greys; one oak peg runs down through all of them. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --salt: #f3f6f8;
  --weathered: #dfe6ec;
  --deep: #ccd6df;
  --tar: #1c1f21;
  --oak: #6e4a26;
  --tide: #4a5256;

  --gutter: 24px;
  --margin: 40px;
  --max: 1200px;
  --wrap: min(100% - 2 * var(--margin), var(--max));
  --seam: 6px;
  /* text clears the peg by a full gutter on both sides */
  --clear: 18px;
}

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

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

body {
  margin: 0;
  /* the footer plank sits on the bottom edge of short pages */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--salt);
  color: var(--tar);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 19px;
  line-height: 1.5;
  font-kerning: normal;
}

h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

a {
  color: var(--oak);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible {
  outline: 3px solid var(--oak);
  outline-offset: 3px;
  text-decoration: none;
}
a[aria-current="page"] { color: var(--tar); }

/* ---------- Container and grid ---------- */

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: start;
}

/* ---------- The peg ---------- */

.hull { position: relative; flex: 1 0 auto; }
.hull::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  width: 12px;
  /* centred in the gutter between columns 3 and 4 */
  left: calc((100% - var(--wrap)) / 2 + (var(--wrap) - 11 * var(--gutter)) / 4 + 2.5 * var(--gutter) - 6px);
  background: var(--oak);
}

/* ---------- Planks ---------- */

.plank-venture { background: var(--weathered); }
.plank-venture + .plank-venture { margin-top: var(--seam); }
.plank-foot { background: var(--deep); }

.plank-name { padding: 96px 0 88px; }
.plank-venture { padding: 56px 0 60px; }
.plank-run { padding: 72px 0 96px; }
.plank-foot { padding: 40px 0 48px; }
.plank-slim { padding: 48px 0 44px; }
.plank-text { padding: 40px 0 112px; }

/* ---------- Type ---------- */

.name {
  font-weight: 700;
  font-size: clamp(72px, 10vw - 24px, 120px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.keep { white-space: nowrap; }

.lede {
  font-size: clamp(20px, 1.25vw + 10px, 28px);
  line-height: 1.3;
}

.plank-venture h2 {
  font-weight: 600;
  font-size: clamp(30px, 2.5vw + 8px, 44px);
  line-height: 1;
  letter-spacing: -0.01em;
}
.plank-run h2 {
  font-weight: 600;
  font-size: 32px;
  line-height: 1.1;
}
.plank-text h1 {
  font-weight: 700;
  font-size: clamp(44px, 4vw + 4px, 64px);
  line-height: 1;
  letter-spacing: -0.01em;
}

.what, .more, .text p { max-width: 36em; }
.more { margin-top: 0.5em; }
.text p + p { margin-top: 1em; }

.name-link {
  font-weight: 700;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.name-link a { color: var(--tar); text-decoration: none; }
.name-link a:hover { text-decoration: underline; text-decoration-thickness: 3px; }

/* link rows: 44px tall targets */
.contact a, .go a, .foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.plank-foot { font-size: 16px; line-height: 1.6; }
.foot-name { font-weight: 600; }
.foot-address { color: var(--tide); }
.foot-address a { display: inline-block; padding: 10px 0; }

/* ---------- Wide composition ---------- */

@media (min-width: 1040px) {
  /* name plank: the trunnel line sits beside the name, on its baseline */
  .plank-name .grid { row-gap: 40px; }
  .plank-name .name { grid-column: 4 / 13; grid-row: 1; }
  .plank-name .lede { grid-column: 4 / 13; grid-row: 2; }
  /* contact sits left of the peg, level with the foot of the name */
  .plank-name .contact {
    grid-column: 1 / 4;
    grid-row: 1;
    align-self: end;
    padding-right: var(--clear);
    margin-bottom: -10px;
  }

  /* venture planks and how it's run */
  .plank-venture h2, .plank-run h2 { grid-column: 1 / 4; grid-row: 1 / span 2; }
  .what { grid-column: 4 / 10; grid-row: 1; }
  .more { grid-column: 4 / 10; grid-row: 2; }
  .go { grid-column: 10 / 13; grid-row: 1; margin-top: -8px; }
  .plank-venture h2 { margin-top: -2px; }

  /* keep text a gutter's width off the peg, so it never reads as a border */
  .name, .lede, .what, .more, .name-link, .plank-text .text, .foot-address {
    padding-left: var(--clear);
  }

  /* privacy: name and contact share one row */
  .plank-slim .grid { align-items: center; }
  .name-link { grid-column: 4 / 10; grid-row: 1; }
  .plank-slim .contact { grid-column: 10 / 13; grid-row: 1; margin-top: 0; }
  .plank-text { padding-top: 56px; }
  .plank-text h1 { grid-column: 1 / 4; }
  /* the text runs to the container's right edge, under the contact column,
     set larger so the measure stays near 70 characters */
  .plank-text .text {
    grid-column: 4 / 13;
    padding-top: 0.5em;
    font-size: clamp(20px, 1.667vw + 2.67px, 24px);
    line-height: 1.45;
  }
  .plank-text .text p { max-width: none; }

  /* footer */
  .foot-name { grid-column: 1 / 4; }
  .foot-address { grid-column: 4 / 10; }
  .foot-links { grid-column: 10 / 13; margin-top: -10px; }
  .foot-address a { padding: 0; min-height: 0; }
}

/* ---------- Narrow composition: peg at the page edge ---------- */

@media (max-width: 1039px) {
  /* the peg stands in from the edge so the planks show on both sides of it,
     and text clears it by a full gutter */
  :root { --indent: clamp(46px, 6vw + 22px, 86px); }

  body { font-size: 18px; }

  .grid { display: block; }
  .wrap {
    width: auto;
    max-width: 40rem;
    margin: 0 20px 0 var(--indent);
  }

  .hull::before { left: 12px; width: 10px; }

  .name { font-size: clamp(72px, 6vw + 48px, 104px); }
  .lede { font-size: clamp(20px, 1.25vw + 15px, 26px); margin-top: 18px; }

  .contact a, .go a, .foot-links a { min-height: 48px; }
  .foot-address a { min-height: 48px; display: inline-flex; align-items: center; padding: 0; }

  .plank-venture { padding: 24px 0 26px; }
  .plank-venture h2, .plank-run h2 { margin-bottom: 10px; }
  .go { margin-top: 2px; }
  .more { margin-top: 4px; }

  .plank-run { padding: 32px 0 56px; }
  .plank-foot { padding: 28px 0 32px; }
  .foot-address { margin-top: 4px; }
  .foot-links { margin-top: 4px; }

  /* the email is in the footer a screen below, so the masthead drops it */
  .contact .mail { display: none; }

  /* privacy */
  .plank-slim { padding: 32px 0 20px; }
  .name-link { font-size: 30px; margin-bottom: 4px; }
  .name-link a { display: inline-flex; align-items: center; min-height: 48px; }
  .plank-text { padding: 24px 0 72px; }
  .plank-text h1 { margin-bottom: 16px; }

  /* home: name, what it is, then both ventures on the first screen;
     contact follows in the footer */
  .home .hull { display: flex; flex-direction: column; }
  .home .plank-name,
  .home .plank-name > .wrap,
  .home main { display: contents; }
  .home .plank-name .wrap > * {
    margin-left: var(--indent);
    margin-right: 20px;
    max-width: 40rem;
  }
  .home .name { order: 1; padding-top: 36px; }
  .home .lede { order: 2; padding-bottom: 28px; }
  .home .plank-venture { order: 3; }
  /* home: X is in how it's run and the email in the footer, so no masthead list */
  .home .contact { display: none; }
  .home .plank-run { order: 6; }
}
