/* richardpatey.com
   Playful and chunky: grid paper, thick ink borders, hard offset shadows,
   bright status colours. The tiles carry over from the old Carrd page.
   Light and dark follow the visitor's system setting. */

:root {
  --bg: #f3e4d9;
  --grid: #e8d3c5;
  --card: #fffdf7;
  --stripe: #fff6d8;
  --ink: #26241f;
  --muted: #5d5850;
  --edge: #26241f;
  --shadow: #26241f;

  --yellow: #ffd84d;
  --pink: #ff8fb8;
  --blue: #8ec5ff;
  --link: #1f4fd6;

  --live: #0f6b3a;
  --live-bg: #aef0c8;
  --sold: #6b4300;
  --sold-bg: #ffd84d;
  --retired: #55514a;
  --retired-bg: #e4ddd2;

  --todo: #7a5b00;
  --todo-bg: #fff1b8;

  --display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pixel: "Silkscreen", ui-monospace, Menlo, monospace;

  --wrap: 980px;
  --gutter: 16px;
  --r: 14px;
  --b: 3px;
  --lift: 6px;

  /* the tiles in the footer */
  --tile: var(--card);
  --tile-edge: var(--edge);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1a17;
    --grid: #262320;
    --card: #2a2723;
    --stripe: #312d27;
    --ink: #f3ede2;
    --muted: #bdb5a8;
    --edge: #f3ede2;
    --shadow: #f3ede2;
    --link: #9cc2ff;
    --retired-bg: #4a463f;
    --retired: #e4ddd2;
    --todo: #f3d36b;
    --todo-bg: #3b3113;
  }
}

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

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

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1.5px, transparent 1.5px),
    linear-gradient(90deg, var(--grid) 1.5px, transparent 1.5px);
  background-size: 40px 40px;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 3px; }
a:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 4px; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter) 56px;
  overflow-x: clip;
}

/* The chunky object: thick border, hard shadow, no blur. */
.card {
  background: var(--card);
  border: var(--b) solid var(--edge);
  border-radius: var(--r);
  box-shadow: var(--lift) var(--lift) 0 var(--shadow);
}

h1, h2 { font-family: var(--display); margin: 0; }

/* ---------- header ---------- */

.masthead { padding-top: 48px; }

.sticker {
  display: inline-block;
  margin: 0 0 22px;
  padding: 6px 14px;
  font-weight: 600;
  font-size: 0.92rem;
  background: var(--blue);
  color: #1b1a17;
  border: var(--b) solid var(--edge);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--shadow);
  transform: rotate(-2deg);
}

h1 {
  font-weight: 800;
  font-size: clamp(3rem, 11vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.hl {
  background: linear-gradient(transparent 58%, var(--yellow) 58%, var(--yellow) 92%, transparent 92%);
  padding: 0 0.06em;
}
@media (prefers-color-scheme: dark) {
  .hl { background: none; color: var(--yellow); }
}

.tagline {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.3rem, 3.6vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  max-width: 30ch;
  margin: 22px 0 0;
}

.bio {
  color: var(--muted);
  max-width: 56ch;
  margin: 14px 0 0;
}

.skyline {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 36px;
}
.skyline-fill { fill: var(--card); stroke: var(--edge); stroke-width: 3; vector-effect: non-scaling-stroke; }
.skyline-line {
  fill: none;
  stroke: var(--edge);
  stroke-width: 3;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* ---------- proof tiles ---------- */

.proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 28px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px 20px;
  color: #1b1a17;
  border: var(--b) solid var(--edge);
  border-radius: var(--r);
  box-shadow: 5px 5px 0 var(--shadow);
}
.stat--1 { background: var(--yellow); transform: rotate(-1.2deg); }
.stat--2 { background: var(--pink); transform: rotate(0.8deg); }
.stat--3 { background: var(--blue); transform: rotate(-0.6deg); }
.num {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 3.3rem);
  line-height: 1;
  letter-spacing: -0.04em;
}
.label { font-weight: 600; font-size: 0.98rem; line-height: 1.3; }

/* ---------- section bars ---------- */

.bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 14px;
  font-weight: 800;
  font-size: clamp(1.35rem, 4vw, 1.7rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: var(--ink);
  color: var(--bg);
  border-radius: 10px;
}

/* ---------- track record ---------- */

.record { margin-top: 64px; }

.record-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-bottom: 18px;
}
.tally { margin: 0; font-weight: 600; color: var(--muted); }

.record .card { overflow: hidden; }

table { width: 100%; border-collapse: collapse; }

thead th {
  text-align: left;
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--ink);
  padding: 12px 16px;
}
tbody tr + tr { border-top: 2px solid var(--edge); }
tbody tr:nth-child(even) { background: var(--stripe); }

td, tbody th {
  padding: 18px 16px;
  vertical-align: top;
  text-align: left;
}
td.icon, th.icon { width: 58px; padding-right: 0; }
td.icon { font-size: 1.6rem; line-height: 1.2; }

.name {
  width: 27%;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.ext { font-size: 0.85em; margin-left: 3px; }
.years {
  display: block;
  margin-top: 4px;
  font-family: var(--pixel);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.status { width: 150px; text-align: right; }
thead th.status { text-align: right; }

.badge {
  display: inline-block;
  white-space: nowrap;
  font-family: var(--pixel);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 5px 10px 4px;
  border: 2px solid var(--edge);
  border-radius: 8px;
  box-shadow: 2px 2px 0 var(--shadow);
}
.badge--live { color: var(--live); background: var(--live-bg); }
.badge--sold { color: var(--sold); background: var(--sold-bg); }
.badge--retired { color: var(--retired); background: var(--retired-bg); }
@media (prefers-color-scheme: dark) {
  .badge--live, .badge--sold { border-color: #1b1a17; box-shadow: 2px 2px 0 #000; }
}

.row--retired .blurb { color: var(--muted); }

/* Link to the press release or write-up on a sold row. */
.press {
  display: block;
  width: fit-content;
  margin-top: 8px;
  font-family: var(--pixel);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 2px solid currentColor;
}
.press:hover { background: var(--yellow); color: #1b1a17; }

/* Visible until the row's todo is cleared in projects.json. */
.todo {
  display: block;
  margin-top: 8px;
  padding: 4px 8px;
  font-size: 0.8rem;
  color: var(--todo);
  background: var(--todo-bg);
  border-left: 3px solid var(--todo);
}

/* ---------- hazard tape ---------- */

.tape {
  margin: 60px -40px 0;
  padding: 10px 0;
  text-align: center;
  background: repeating-linear-gradient(-45deg, var(--yellow) 0 22px, #1b1a17 22px 44px);
  border-top: var(--b) solid #1b1a17;
  border-bottom: var(--b) solid #1b1a17;
  transform: rotate(-1deg);
}
.tape span {
  display: inline-block;
  padding: 4px 14px 3px;
  font-family: var(--pixel);
  font-size: 0.9rem;
  text-transform: uppercase;
  color: #1b1a17;
  background: var(--yellow);
  border: 2px solid #1b1a17;
}

/* ---------- now ---------- */

.now { margin-top: 60px; }
.now .bar { margin-bottom: 18px; }
.note {
  padding: 22px 26px;
  background: var(--yellow);
  color: #1b1a17;
  transform: rotate(0.4deg);
}
.note p {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.15rem, 3vw, 1.4rem);
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.note a { color: #1b1a17; text-decoration-color: #1b1a17; }
.note .cta {
  display: inline-flex;
  width: fit-content;
  height: 50px;
  margin-top: 18px;
  background: var(--pink);
  color: #1b1a17;
  border-color: #1b1a17;
  box-shadow: 4px 4px 0 #1b1a17;
}
.note .cta:hover { box-shadow: 1px 1px 0 #1b1a17; }
@media (prefers-color-scheme: dark) {
  .note { border-color: #1b1a17; }
}

/* ---------- footer ---------- */

.foot {
  margin-top: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
}
.links {
  list-style: none;
  margin: 0;
  padding: 0 6px 6px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Chunky tiles with a hard offset shadow, carried over from the Carrd page. */
.tile {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  background: var(--tile);
  color: var(--tile-edge);
  border: var(--b) solid var(--tile-edge);
  border-radius: 13px;
  box-shadow: 5px 5px 0 var(--tile-edge);
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.tile--icon { width: 56px; }
.tile--icon svg { width: 26px; height: 26px; }
.tile--text { padding: 0 18px; font-weight: 800; background: var(--pink); color: #1b1a17; }
.tile:hover {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--tile-edge);
}
.tile:focus-visible { outline-offset: 5px; border-radius: 13px; }

.small { margin: 0; color: var(--muted); font-size: 0.9rem; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .tile { transition: none; }
}

/* ---------- phones: the table becomes stacked cards ---------- */

@media (max-width: 680px) {
  body { font-size: 16px; background-size: 32px 32px; }
  .masthead { padding-top: 28px; }

  .proof { grid-template-columns: 1fr; gap: 16px; }
  .stat { padding: 14px 18px 16px; }
  .num { font-size: 2.5rem; }

  thead { display: none; }
  table, tbody, tr, td, tbody th { display: block; }
  tbody tr {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    grid-template-areas:
      "icon name status"
      ".    blurb blurb";
    column-gap: 10px;
    padding: 16px 14px;
  }
  td, tbody th { padding: 0; }
  td.icon { grid-area: icon; width: auto; font-size: 1.35rem; }
  .name { grid-area: name; width: auto; font-size: 1.1rem; align-self: center; }
  .status { grid-area: status; width: auto; align-self: start; }
  .blurb { grid-area: blurb; margin-top: 6px; font-size: 0.95rem; }
  .badge { font-size: 0.66rem; padding: 4px 7px 3px; }

  .links { gap: 12px; }
  .tape span { font-size: 0.75rem; }
  .note { padding: 18px 18px; }
}
