/* Vigilante 4x4 design system: the two-line build ledger. Page stylesheets add to this, never restate it. */

/* TOKENS: palette, type scale and ledger measures. Use the variables, never raw hex or sizes. */
:root {
  --ground: #5F6A2A;
  --punch: #4A5320;
  --paper: #2F3517;
  --back: #414A1E;
  --ink: #E2F7C9;
  --build: #FF8938;
  --keep: #A8BCFF;
  --shade: rgba(20, 24, 8, .3);
  --hand: 'Kalam', 'Segoe Print', 'Bradley Hand', cursive;
  --text: 'Alegreya Sans', 'Gill Sans', 'Trebuchet MS', sans-serif;
  --fs-body: 1.0625rem;
  --fs-small: .9375rem;
  --fs-h1: 1.5625rem;
  --fs-h2: 1.5625rem;
  --fs-h3: 1.5625rem;
  --fs-quote: 2.125rem;
  --fs-price: 1.75rem;
  --rule-w: .1875rem;
  --lane: 4.625rem;
  --gutter: .5rem;
  --edge: .75rem;
  --pad: .875rem;
  --section: clamp(2.5rem, 9vh, 6.5rem);
  --dock-h: 3.25rem;
  --consent-h: 0rem;
}
@media (min-width: 48rem) {
  :root {
    --fs-body: 1.1875rem;
    --fs-small: 1rem;
    --fs-h1: 2rem;
    --fs-h2: 1.875rem;
    --fs-quote: 3.5rem;
    --fs-price: 2.25rem;
    --lane: 9.5rem;
    --gutter: 1.5rem;
    --edge: clamp(1.25rem, 3vw, 2.5rem);
    --pad: clamp(1.125rem, 2vw, 1.75rem);
  }
}

/* BASE: olive ground with the staggered punched-dot grid; text always goes on a .sheet or .tab. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-bottom: calc(var(--dock-h) + 1rem); }
body {
  margin: 0;
  background-color: var(--ground);
  background-image:
    radial-gradient(circle, var(--punch) .0625rem, transparent .1rem),
    radial-gradient(circle, var(--punch) .0625rem, transparent .1rem);
  background-size: 1rem 2rem;
  background-position: 0 0, .5rem 1rem;
  color: var(--ink);
  font: 400 var(--fs-body)/1.5 var(--text);
  font-synthesis: none;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
p, figure, dl, dd { margin: 0; }
p + p { margin-top: .75em; }
strong, b { font-weight: 400; }
[hidden] { display: none !important; }

/* HEADINGS: Kalam 400, lowercase, 25 to 34 px. h1/h2/h3 get it by default; .hand puts Kalam on anything else. */
h1, h2, h3, .hand {
  margin: 0;
  font-family: var(--hand);
  font-weight: 400;
  line-height: 1.25;
  text-transform: lowercase;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

/* LINKS: plain underlined text. .link is a 44px-tall action link (call, write, next station). */
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: .08em;
  text-underline-offset: .2em;
}
a:hover { text-decoration-thickness: .16em; text-decoration-color: var(--build); }
.link { display: inline-block; padding-block: .6rem; line-height: 1.4; }
:focus-visible { outline: var(--rule-w) solid var(--ink); outline-offset: .1875rem; }

/* TEXT BUTTON: every control is underlined ledger text. .text-btn; aria-pressed="true" marks the chosen one. */
.text-btn {
  display: inline-block;
  min-height: 2.75rem;
  padding: .6rem 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-thickness: .08em;
  text-underline-offset: .2em;
  white-space: nowrap;
  cursor: pointer;
}
.text-btn:hover { text-decoration-thickness: .16em; }
.text-btn[aria-pressed="true"] { text-decoration-thickness: var(--rule-w); text-decoration-color: var(--build); }

/* OPTIONS ROW: text controls in one row split by slashes. .options wrapping .text-btn children. */
.options { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .75rem; }
.options > * + *::before { content: "/"; display: inline-block; margin-right: .75rem; }

/* SWAP: notes that trade places in one fixed cell. [data-switch] holds buttons with data-show="id"; .swap holds .swap__item#id, .is-on shows. */
.swap { display: grid; }
.swap__item { grid-area: 1 / 1; visibility: hidden; }
.swap__item.is-on { visibility: visible; }

/* LEDGER: the page column. Wrap every band of a page in .ledger so the label lane lines up top to bottom. */
.ledger {
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: var(--edge);
}

/* ROW: one ledger line, label lane left and matter right, closed by a 3px rule. .row > .row__label + .row__matter; .row--keep / .row--build colour the rule, .row--bare drops it. */
.row {
  --rule: var(--paper);
  display: grid;
  grid-template-columns: var(--lane) minmax(0, 1fr);
  column-gap: var(--gutter);
  row-gap: .75rem;
  align-items: start;
  padding-top: .75rem;
}
.row::after {
  content: "";
  grid-column: 1 / -1;
  height: var(--rule-w);
  margin-top: .25rem;
  background: var(--rule);
}
.row--keep { --rule: var(--keep); }
.row--build { --rule: var(--build); }
.row--bare::after { content: none; }
.row__label { grid-column: 1; }
.row__matter { grid-column: 2; min-width: 0; }

/* TAB: the label in the lane, always on solid stock. .tab (deep olive), .tab--keep (periwinkle, "What we keep"), .tab--build (orange, "What we build"). Keep labels to two or three short words. */
.tab {
  display: block;
  margin: 0;
  padding: .4rem .45rem;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--fs-small);
  line-height: 1.2;
  text-transform: none;
  overflow-wrap: anywhere;
  box-shadow: .125rem .1875rem .5rem var(--shade);
}
.tab--keep { background: var(--keep); color: var(--paper); }
.tab--build { background: var(--build); color: var(--paper); }
@media (min-width: 48rem) { .tab { padding: .5rem .75rem; } }

/* ENTRY: the recurring device, one station = a .row--keep over a .row--build. section.entry[data-station]; site.js sets .is-current for page scripts. No marker is drawn in the outer margin: an entry carries no pseudo-element and no loose mark of its own, on any page, whatever a page stylesheet says. The mark lives in the masthead and the dock only. */
.entry { position: relative; padding-block: clamp(1.25rem, 4.5vh, 3.25rem); }
.entry::before, .entry::after,
[data-station]::before, [data-station]::after { content: none !important; display: none !important; }
.entry > svg[viewBox="0 0 30 14"],
[data-station] > svg[viewBox="0 0 30 14"] { display: none !important; }

/* SHEET: the solid deep-olive note all running text sits on, with a backing sheet showing behind. .sheet; .sheet--flat drops the backing. */
.sheet {
  background: var(--paper);
  color: var(--ink);
  padding: var(--pad);
  box-shadow: .375rem .375rem 0 var(--back), .5rem .875rem 1.25rem var(--shade);
}
.sheet--flat { box-shadow: none; }
.sheet > * + * { margin-top: .75rem; }

/* SPLIT: note beside print inside the matter column, so no row leaves half the window empty. .split (5:7), .split--flip (7:5). */
.split { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 60rem) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1.5rem 2rem; }
  .split--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}

/* PAGE OPENING: first row of every page. .opening on the .row; .opening__quote (the 56px owner line, home only), .opening__title on the h1, .opening__lede. */
.opening { padding-top: clamp(.75rem, 2.5vh, 1.5rem); }
.opening__quote {
  margin: 0;
  font-family: var(--hand);
  font-size: var(--fs-quote);
  line-height: 1.2;
  text-wrap: balance;
}
.opening__title { font-size: var(--fs-h1); }
.opening__lede { max-width: 48rem; }

/* FIGURE AND CAPTION: a photo mount whose edge crosses into the label gutter. figure.mount > .mount__print > img, then figcaption.mount__caption; .mount--tilt / .mount--tilt-back turn it half a degree; .mount--strip crops to a low 16:9 (set --strip-h). */
.mount { min-width: 0; }
.mount__print {
  display: block;
  margin-inline-start: calc(var(--gutter) * -.5);
  padding: .375rem;
  background: var(--back);
  box-shadow: .25rem .5rem 1rem var(--shade);
}
.mount__print img, .mount__print video { width: 100%; object-fit: cover; }
.mount--tilt .mount__print { transform: rotate(.5deg); }
.mount--tilt-back .mount__print { transform: rotate(-.5deg); }
.mount--strip .mount__print img, .mount--strip .mount__print video { aspect-ratio: 16 / 9; max-height: var(--strip-h, 44vh); }
.mount__caption {
  width: fit-content;
  max-width: 100%;
  margin-top: .75rem;
  padding: .5rem .75rem;
  background: var(--paper);
  font-size: var(--fs-small);
  line-height: 1.4;
}

/* FACTS: a ruled spec list, term left and value right. dl.facts > dt + dd. */
.facts { display: grid; grid-template-columns: minmax(0, 1fr); font-size: var(--fs-small); }
.facts dt { padding-top: .5rem; color: var(--keep); }
.facts dd { padding-bottom: .5rem; border-bottom: .0625rem solid var(--back); }
@media (min-width: 30rem) {
  .facts { grid-template-columns: minmax(7rem, auto) minmax(0, 1fr); }
  .facts dt { padding: .5rem 1.25rem .5rem 0; border-bottom: .0625rem solid var(--back); }
  .facts dd { padding-top: .5rem; }
}

/* PRICE: the figure in the matter column, set in Alegreya Sans. .price */
.price { font-size: var(--fs-price); line-height: 1.1; }

/* HAND-OFF: the last row before the footer, one plain link to the next station. .handoff on the .row, a.handoff__link inside its .sheet. */
.handoff { padding-bottom: .5rem; }
.handoff__link {
  display: inline-block;
  padding-block: .35rem;
  font-family: var(--hand);
  font-size: var(--fs-h2);
  line-height: 1.25;
  text-transform: lowercase;
}

/* PROSE: long reading on a sheet (legal and policy pages). .prose on a .sheet. */
.prose h2 { margin-top: 1.75rem; }
.prose h3 { margin-top: 1.25rem; }
.prose ul, .prose ol { margin: .75rem 0 0; padding-left: 1.25rem; }
.prose li + li { margin-top: .35rem; }

/* REVEAL ON SCROLL: text and photos stay still; a row's closing rule clicks across in four steps. Add .reveal to a .row. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal::after { transform: scaleX(0); transform-origin: left center; transition: transform .32s steps(4, end); }
  .js .reveal.is-seen::after { transform: none; }
}

/* UTILITIES: .visually-hidden for screen-reader text, .skip is the skip link. */
.visually-hidden {
  position: absolute;
  width: .0625rem;
  height: .0625rem;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: var(--edge);
  top: -5rem;
  z-index: 100;
  padding: .75rem 1rem;
  background: var(--ink);
  color: var(--paper);
}
.skip:focus { top: .5rem; }

/* MASTHEAD: the linked name, alone and large, scrolling away; the mark sits in the label lane. .masthead, .brand, .brand__mark, .brand__name. */
.masthead { padding-top: clamp(.75rem, 2.5vh, 1.5rem); }
.brand {
  display: grid;
  grid-template-columns: var(--lane) auto;
  column-gap: var(--gutter);
  justify-content: start;
  align-items: stretch;
  text-decoration: none;
}
.brand__mark { display: flex; align-items: center; padding: .5rem; background: var(--paper); }
.brand__bars { width: 100%; max-width: 4.5rem; height: auto; }
.brand__name {
  padding: .3rem .875rem .05rem;
  background: var(--paper);
  font-family: var(--hand);
  font-size: clamp(1.75rem, 1.45rem + 1.4vw, 2.25rem);
  line-height: 1.35;
}

/* DOCK: navigation fixed at the bottom on its own solid sheet; on a phone Tour opens the three workshop links upward. .dock, .dock__links, .dock__tour, .dock__set. */
.dock {
  position: fixed;
  z-index: 50;
  inset-inline: 0;
  bottom: var(--consent-h);
  background: var(--paper);
  border-top: var(--rule-w) solid var(--ground);
  box-shadow: 0 -.5rem 1rem var(--shade);
}
.dock__in {
  display: grid;
  grid-template-columns: var(--lane) minmax(0, 1fr);
  column-gap: var(--gutter);
  align-items: center;
  min-height: 3rem;
}
.dock__mark { display: flex; align-items: center; min-height: 2.75rem; }
.dock__bars { width: 2.75rem; height: auto; }
.dock__links { position: relative; display: flex; flex-wrap: wrap; align-items: center; column-gap: .625rem; }
.dock__set { display: contents; }
.dock__links a, .dock__tour {
  display: inline-block;
  min-height: 2.75rem;
  padding: .6rem 0;
  line-height: 1.4;
}
.dock__links a[aria-current="page"] { text-decoration-thickness: var(--rule-w); text-decoration-color: var(--keep); }
.dock__sep { font-style: normal; }
.dock__tour {
  display: none;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: .08em;
  text-underline-offset: .2em;
  cursor: pointer;
}
@media (max-width: 47.99rem) {
  .dock__wide { display: none; }
  .js .dock__tour { display: inline-block; }
  .js .dock__set {
    display: flex;
    flex-direction: column;
    position: absolute;
    left: -.75rem;
    bottom: calc(100% + .5rem);
    min-width: 10rem;
    padding: .25rem .75rem;
    background: var(--paper);
    border: var(--rule-w) solid var(--ground);
    box-shadow: .25rem .5rem 1rem var(--shade);
    visibility: hidden;
  }
  .js .dock__set.is-open { visibility: visible; }
  .js .dock__set .dock__sep { display: none; }
}

/* CALL CONTROL: phone only, one small call link pinned on its own sheet above the dock's right end. .call follows #consent in the markup and stands down while the consent strip is showing. */
.call { display: none; }
@media (max-width: 47.99rem) {
  .call {
    display: inline-block;
    position: fixed;
    z-index: 45;
    right: var(--edge);
    bottom: calc(var(--dock-h) + var(--consent-h) + .5rem);
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: .5rem .875rem;
    background: var(--paper);
    border: var(--rule-w) solid var(--ground);
    box-shadow: .25rem .5rem 1rem var(--shade);
    line-height: 1.4;
  }
  #consent:not([hidden]) ~ .call { display: none; }
}

/* BOARD: a small ruled board that steps up from the lower left above the dock (home price board and #promo). .board + .is-in, .board__row, .board__close; .board--loud is the orange offer. On a desk screen #promo keeps to the label lane, and site.js holds it down (.is-held) for as long as a photo mount or its caption stands beside its place, so it never lies on or against a print or a caption. */
.board {
  position: fixed;
  z-index: 40;
  left: var(--edge);
  bottom: calc(var(--dock-h) + var(--consent-h) + .75rem);
  width: max-content;
  max-width: min(24rem, calc(100vw - 6.5rem));
  padding: .25rem .875rem;
  background: var(--paper);
  color: var(--ink);
  font-size: var(--fs-small);
  box-shadow: .375rem .375rem 0 var(--back), .5rem .875rem 1.25rem var(--shade);
  transform: translateY(calc(100% + 1.5rem));
  opacity: 0;
  visibility: hidden;
  transition: transform .36s steps(4, end), opacity .36s steps(4, end), visibility 0s .36s;
}
.board.is-in { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
.board__row {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  column-gap: .75rem;
  margin: 0;
  padding-block: .45rem;
  border-bottom: var(--rule-w) solid var(--build);
}
.board__row + .board__row { margin-top: 0; border-bottom-color: var(--keep); }
.board--loud { background: var(--build); color: var(--paper); box-shadow: .375rem .375rem 0 var(--paper), .5rem .875rem 1.25rem var(--shade); }
.board--loud .board__row, .board--loud .board__row + .board__row { border-bottom-color: var(--paper); }
.board--loud :focus-visible { outline-color: var(--paper); }
@media (min-width: 48rem) {
  #promo {
    left: calc(max(0rem, (100vw - 80rem) / 2) + var(--edge));
    width: var(--lane);
    max-width: var(--lane);
    padding-inline: .625rem;
  }
  #promo .board__row { grid-template-columns: minmax(0, 1fr); }
  #promo.is-held, #promo.is-held.is-in {
    transform: translateY(calc(100% + 1.5rem));
    opacity: 0;
    visibility: hidden;
    transition-delay: 0s, 0s, .36s;
  }
}
@media (prefers-reduced-motion: reduce) { .board { transition: none; } }

/* CONSENT STRIP: a thin band across the full bottom edge; the dock and board lift above it. On a phone it is one short line with its two choices beside it. #consent > .consent__in, .consent__more (desk only). */
#consent {
  position: fixed;
  z-index: 60;
  inset-inline: 0;
  bottom: 0;
  background: var(--paper);
  color: var(--ink);
  border-top: var(--rule-w) solid var(--ink);
  font-size: var(--fs-small);
}
.consent__in { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1rem; padding-block: .25rem; }
.consent__in p { flex: 1 1 16rem; padding-block: .35rem; line-height: 1.35; }
@media (max-width: 47.99rem) {
  .consent__in { gap: 0 .875rem; padding-block: 0; }
  .consent__in p { flex: 1 1 auto; padding-block: .25rem; }
  .consent__more { display: none; }
}

/* FOOTER: the site stops on one unruled run-on line on a deep olive strip, with clearance for the dock. .foot, .foot__line. .foot__rest holds the address and the remaining links out of sight until the keyboard reaches them. */
.foot {
  position: relative;
  margin-top: var(--section);
  padding-block: .75rem calc(var(--dock-h) + var(--consent-h) + 1.5rem);
  background: var(--paper);
  font-size: var(--fs-small);
}
.foot__line { margin-block: 0; list-style: none; line-height: 1.4; }
.foot__line li { display: inline; }
.foot__line li + li::before { content: "\00b7"; margin-inline: .5em; }
.foot__line a, .foot__text { display: inline-block; padding-block: .7rem; }
.foot__rest:not(:focus-within) {
  position: absolute;
  width: .0625rem;
  height: .0625rem;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (max-width: 47.99rem) {
  .foot { padding-bottom: calc(var(--dock-h) + var(--consent-h) + 4.75rem); }
}

/* A page never scrolls sideways. */
html, body { overflow-x: clip; }
/* Past a full-HD window the whole page grows with the window - type, gaps and pictures
   together - so a very wide screen (or a page zoomed far out) shows the same composition,
   not a small column of text lost in an enormous picture. */
@media (min-width: 1921px) { html { font-size: calc(100vw / 120); } }
/* What can be pressed in the chrome lies above the page: a huge headline's line box reaching
   into the navigation must not swallow the clicks meant for the links. */
header a, header button, nav a, nav button { position: relative; z-index: 2; }
/* A visitor who asked the system for less motion gets none, whatever a page forgot. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
