/* Whirring brand book, version 1 (October 2026): the Hammertone palette as flat
   colors, Barlow type served from this site, square corners and 2 px Ink outlines.
   Every site loads this file first. */

@font-face {
  font-family: "Barlow";
  src: url("/fonts/Barlow-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/BarlowCondensed-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1F1C18;
  --hammertone: #4E6B58;
  --deep-pine: #2C4234;
  --enamel: #EEF0EA;
  --duck-canvas: #CDB98F;
  --toolbox-red: #C4432C;
  --caution-yellow: #EBB42E;
  --ink-muted: #6B655C;
  --paper: #FFFFFF;

  /* What sits on the current background. Each band below swaps these for the
     pairs the brand book lists for its color. */
  --text: var(--ink);
  --heading: var(--deep-pine);
  --link: var(--deep-pine);
  --muted: var(--ink-muted);
  --rule: var(--hammertone);
  --focus: var(--deep-pine);

  --gutter: 16px;
  --wrap: 1120px;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

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

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

body {
  margin: 0;
  background: var(--enamel);
  color: var(--text);
  font-family: "Barlow", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
}

h1, h2, h3, p, ul, dl, dd, address { margin: 0; }
address { font-style: normal; }
ul[class],
nav ul { list-style: none; padding: 0; }
img { display: block; max-width: 100%; height: auto; }

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

/* ---- bands ------------------------------------------------------------------ */

.band {
  padding-block: 56px;
  background: var(--enamel);
  color: var(--text);
}

@media (min-width: 768px) {
  .band { padding-block: 88px; }
}

.band--paper { background: var(--paper); }
.band--canvas { background: var(--duck-canvas); --muted: var(--ink); }

.band--hammertone,
.band--pine {
  --text: var(--paper);
  --heading: var(--paper);
  --link: var(--paper);
  --muted: var(--paper);
  --rule: var(--paper);
  --focus: var(--caution-yellow);
}

.band--hammertone { background: var(--hammertone); }
.band--pine { background: var(--deep-pine); }

/* ---- type ------------------------------------------------------------------- */

.display,
.heading,
h3 {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  color: var(--heading);
}

.display {
  font-size: 52px;
  line-height: 48px;
  max-width: 13em;
}

.heading {
  font-size: 34px;
  line-height: 34px;
}

h3 {
  font-size: 24px;
  line-height: 28px;
}

@media (min-width: 768px) {
  .display { font-size: 76px; line-height: 68px; }
  .heading { font-size: 46px; line-height: 43px; }
}

.lead {
  font-size: 19px;
  line-height: 28px;
  max-width: 36em;
}

.caption {
  font-size: 13px;
  line-height: 18px;
  color: var(--muted);
}

.label {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* The measure goes on the children so a .wrap.prose stays aligned with the
   rest of the page. */
.prose > * { max-width: 40em; }
.prose > * + * { margin-top: 16px; }
.prose > h2 { margin-top: 40px; }

.prose > h2,
.prose h2 {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 28px;
  line-height: 30px;
  color: var(--heading);
}

/* ---- links, focus, buttons --------------------------------------------------- */

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { text-decoration-thickness: 2px; }

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -200px;
  z-index: 10;
  padding: 8px 12px;
  background: var(--paper);
  color: var(--deep-pine);
}

.skip:focus { top: 12px; }

.button {
  display: inline-block;
  padding: 12px 22px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
}

.button:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* One per screen. Its Ink outline keeps it visible on Hammertone for people
   with red-green color blindness. */
.button--primary {
  background: var(--toolbox-red);
  border-color: var(--ink);
  color: var(--paper);
}

/* Secondary buttons over dark colors. */
.button--outline {
  border-color: var(--paper);
  color: var(--paper);
}

/* Where a button will go once it works, like the Mac download before Apple has
   notarized a build (D11). Not a link, so it never looks clickable. */
.button--soon {
  border-color: var(--text);
  color: var(--text);
  cursor: default;
}

.button--soon:hover { text-decoration: none; }

/* A switch says ON or OFF and differs in brightness as well as color: Caution
   Yellow with Ink text when on, Deep Pine with white text when off. */
.switch {
  display: inline-block;
  min-width: 48px;
  padding: 4px 8px;
  border: 2px solid var(--ink);
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.switch--on { background: var(--caution-yellow); color: var(--ink); }
.switch--off { background: var(--deep-pine); color: var(--paper); }

/* ---- rules, data plate, lockup, notice ---------------------------------------- */

/* Thin Hammertone rules between list items, in place of boxes. */
.rules { border-bottom: 1px solid var(--rule); }

.rules > li {
  border-top: 1px solid var(--rule);
  padding-block: 14px;
}

.rules h3 + p { margin-top: 4px; }

/* The badge on an old machine: Paper, a 2 px Deep Pine border, a Caution Yellow
   rivet in each corner and a ruled title. */
.plate {
  --text: var(--ink);
  --heading: var(--ink);
  --link: var(--deep-pine);
  --focus: var(--deep-pine);
  display: block;
  max-width: 420px;
  padding: 22px 28px 20px;
  border: 2px solid var(--deep-pine);
  background-color: var(--paper);
  background-image: url("/rivet.svg"), url("/rivet.svg"), url("/rivet.svg"), url("/rivet.svg");
  background-repeat: no-repeat;
  background-size: 9px 9px;
  background-position: left 7px top 7px, right 7px top 7px, left 7px bottom 7px, right 7px bottom 7px;
  color: var(--ink);
}

.plate__title {
  display: block;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 2px solid var(--deep-pine);
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plate dl > div {
  display: grid;
  grid-template-columns: 7.5em 1fr;
  gap: 12px;
  padding-block: 4px;
}

.plate dt {
  padding-top: 2px;
  color: var(--ink-muted);
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plate dd {
  font-size: 14px;
  line-height: 20px;
  overflow-wrap: anywhere;
}

/* A product logo with BUILT BY WHIRRING centered under it and a short rule
   between them. */
.lockup {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.lockup__logo {
  position: relative;
  display: block;
}

.lockup__logo .tm {
  position: absolute;
  left: 100%;
  top: -4px;
  margin-left: 2px;
}

.lockup__maker {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
  color: var(--ink);
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lockup__maker::before {
  content: "";
  width: 32px;
  margin-bottom: 8px;
  border-top: 2px solid var(--deep-pine);
}

/* On dark colors the whole lockup is white. */
.lockup--white .lockup__maker { color: var(--paper); }
.lockup--white .lockup__maker::before { border-top-color: var(--paper); }

.tm {
  font-size: 12px;
  line-height: 12px;
}

/* Caution Yellow with Ink text, for the one thing on a page that isn't final. */
.notice {
  padding: 16px 20px;
  border: 2px solid var(--ink);
  background: var(--caution-yellow);
  color: var(--ink);
}

.notice__label {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.notice__label + p { margin-top: 4px; }
