/* Nontractors.com — shared styles. Colours live in tokens so a dark theme can swap them later. */
:root {
  --ground: #f4f1ea;
  --grid: rgba(28, 64, 110, .07);
  --grid-major: rgba(28, 64, 110, .12);
  --ink: #141414;
  --muted: #5b5a55;
  --red: #d61f1f;
  --fame: #b8860b;
  --card: rgba(255, 255, 255, .72);
  --card-solid: #fffdf8;
  --line: #d9d3c5;
  --tape: #f2c230;
  --tape-dark: #141414;
  --f-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --f-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  background-color: var(--ground);
  /* Blueprint paper: fine grid every 24px, heavier line every 120px, soft light from the top. */
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 60%),
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 100% 900px, 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-repeat: no-repeat, repeat, repeat, repeat, repeat;
  background-position: top center;
  color: var(--ink);
  font: 400 17px/1.55 var(--f-body);
  padding-top: env(safe-area-inset-top, 0px);
}
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The banner PNG has empty margins around the lettering; this frame crops to the lettering
   without editing the file (lettering sits at x 109-625, y 104-248 of the 669x373 image). */
.logo {
  display: block;
  width: min(640px, 100%);
  aspect-ratio: 516 / 144;
  overflow: hidden;
  margin: 0;
}
.logo img {
  display: block;
  width: calc(100% * 669 / 516);
  height: auto;
  max-width: none;
  margin-left: calc(-100% * 109 / 516);
  margin-top: calc(-100% * 104 / 516);
}

/* ---------- Home ---------- */
.home {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 28px;
  padding: 48px max(20px, env(safe-area-inset-left, 0px)) 40px max(20px, env(safe-area-inset-right, 0px));
  text-align: center;
}
.home .logo { animation: rise .7s ease-out both; }
.stamp {
  display: inline-block;
  font: 800 clamp(30px, 6vw, 46px)/1 var(--f-display);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--red);
  border: 4px solid var(--red);
  border-radius: 6px;
  padding: 8px 18px 6px;
  transform: rotate(-4deg);
  opacity: .9;
  animation: stamp .45s .5s cubic-bezier(.2, 1.6, .4, 1) both;
}
.lede {
  max-width: 34em;
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 2.2vw, 19px);
  animation: rise .7s .2s ease-out both;
}
.lede strong { color: var(--ink); font-weight: 500; }

.walls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  width: min(620px, 100%);
  animation: rise .7s .3s ease-out both;
}
.wall {
  position: relative;
  padding: 18px 18px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent-wall);
  border-radius: 10px;
  backdrop-filter: blur(2px);
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
a.wall:hover, a.wall:focus-visible { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(20, 20, 20, .1); }
.wall.fame { --accent-wall: var(--fame); }
.wall.shame { --accent-wall: var(--red); }
.wall svg { width: 30px; height: 30px; color: var(--accent-wall); }
.wall h2 { margin: 4px 0 2px; font: 800 24px/1.1 var(--f-display); letter-spacing: .04em; text-transform: uppercase; }
.wall p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
.wall .go {
  display: inline-block;
  margin-top: 10px;
  font: 700 15px/1 var(--f-display);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-wall);
}

.trades {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  animation: rise .7s .45s ease-out both;
}
.trades li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px 9px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 600 16px/1 var(--f-display);
  letter-spacing: .06em;
  text-transform: uppercase;
  backdrop-filter: blur(2px);
}
.trades svg { width: 20px; height: 20px; flex: none; color: var(--red); }

/* About, on the home page */
.about {
  width: min(760px, 100%);
  margin-top: 24px;
  padding: 28px clamp(18px, 4vw, 36px);
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: left;
  scroll-margin-top: 24px;
}
.about h2, .page-head h1 {
  margin: 0 0 12px;
  font: 800 clamp(28px, 5vw, 38px)/1.05 var(--f-display);
  letter-spacing: .03em;
  text-transform: uppercase;
}
.about h2 span { color: var(--red); }
.about p { margin: 0 0 14px; }
.about ul { margin: 0 0 14px; padding-left: 1.2em; }
.about li { margin-bottom: 6px; }
.about li strong { font-weight: 600; }
.about figure { float: right; width: min(220px, 42%); margin: 4px 0 12px 20px; }
.about figure img { display: block; width: 100%; height: auto; border-radius: 8px; }
.about figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.about .signoff { font-weight: 600; margin-bottom: 0; }
.about::after { content: ""; display: block; clear: both; }

/* ---------- Inner pages ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px max(20px, env(safe-area-inset-left, 0px)) 0 max(20px, env(safe-area-inset-right, 0px));
  width: min(1120px, 100%);
  margin: 0 auto;
}
.topbar .logo { width: 220px; }
.topbar nav { display: flex; gap: 18px; font: 700 16px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; }
.topbar nav a { text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.topbar nav a:hover, .topbar nav a[aria-current] { border-color: var(--red); }

.page {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 36px max(20px, env(safe-area-inset-left, 0px)) 48px max(20px, env(safe-area-inset-right, 0px));
}
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.page-head h1 { margin: 0; }
.page-head svg { width: 40px; height: 40px; color: var(--red); flex: none; }
.page-intro { margin: 0 0 28px; max-width: 46em; color: var(--muted); }

.shame-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 20px;
}
.entry {
  display: flex;
  flex-direction: column;
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  scroll-margin-top: 24px;
}
.entry:target { outline: 3px solid var(--red); outline-offset: 2px; }
.entry .shot {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: #222;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.entry .shot img, .entry video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.entry .shot:hover img, .entry .shot:focus-visible img { transform: scale(1.04); }
.entry video { aspect-ratio: 4 / 3; background: #111; object-fit: contain; }
.entry .x {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px 3px;
  background: var(--red);
  color: #fff;
  font: 800 13px/1 var(--f-display);
  letter-spacing: .1em;
  text-transform: uppercase;
  border-radius: 4px;
  transform: rotate(-3deg);
  pointer-events: none;
}
.entry .body { padding: 14px 16px 16px; display: grid; gap: 6px; }
.entry h2 { margin: 0; font: 800 23px/1.1 var(--f-display); letter-spacing: .02em; }
.entry p { margin: 0; color: var(--muted); font-size: 16px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.tag {
  padding: 3px 9px 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 700 12px/1.3 var(--f-display);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
}
.submit-note {
  margin-top: 32px;
  padding: 18px 20px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

/* Photo viewer */
.viewer {
  max-width: min(96vw, 1100px);
  max-height: 94vh;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #111;
  color: #eee;
  overflow: hidden;
}
.viewer::backdrop { background: rgba(10, 10, 10, .8); }
.viewer img { display: block; max-width: 100%; max-height: calc(94vh - 56px); margin: 0 auto; }
.viewer .cap { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; font: 700 18px/1.2 var(--f-display); letter-spacing: .03em; }
.viewer button { background: none; border: 1px solid #555; color: #eee; border-radius: 6px; padding: 6px 12px; font: inherit; font-size: 14px; cursor: pointer; }

/* ---------- Footer ---------- */
/* Caution tape along the bottom. 44px stripe period at 45deg = a 44*sqrt(2) square tile,
   so tiles (and the crawl) meet seamlessly. */
.tape {
  height: 34px;
  background: repeating-linear-gradient(-45deg, var(--tape) 0 22px, var(--tape-dark) 22px 44px);
  background-size: 62.2254px 62.2254px;
  border-block: 2px solid var(--tape-dark);
  animation: crawl 3s linear infinite;
}
footer {
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes stamp { from { opacity: 0; transform: rotate(-4deg) scale(1.8); } to { opacity: .9; transform: rotate(-4deg) scale(1); } }
@keyframes crawl { to { background-position: 62.2254px 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
@media (max-width: 520px) {
  .about figure { float: none; width: 100%; margin: 0 0 14px; }
}
