:root {
  color-scheme: light;
  --concrete: #e9ecee;
  --sheet: #ffffff;
  --ink: #15212b;
  --ink-soft: #4a5762;
  --rule: #c9d0d5;
  --amber: #f5b324;
  --amber-deep: #dc9a0a;

  /* Ontario locate paint colours, used only on the example ticket. */
  --paint-red: #d7262e;
  --paint-yellow: #f2c200;
  --paint-orange: #f07d1a;
  --paint-blue: #1f6fc4;
  --paint-green: #2e8b47;

  --measure: 34rem;
  --gutter: clamp(1rem, 4vw, 3rem);
}

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

html {
  font-family: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--concrete);
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.55;
}

h1, h2, h3 {
  margin: 0;
  font-stretch: 125%;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.25rem, 5.4vw, 3.9rem); font-weight: 850; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 750; line-height: 1.2; }
p { margin: 0; }

a { color: inherit; }
a:focus-visible, .button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* Header */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.25rem var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-stretch: 112%;
  font-size: 1.2rem;
  text-decoration: none;
}
.top-link {
  font-weight: 600;
  text-underline-offset: 3px;
}

/* Shared */

main > section {
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) var(--gutter);
}

.button {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  background: var(--amber);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 4px;
  font-weight: 750;
  font-stretch: 110%;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--ink);
}
.button:hover { background: var(--amber-deep); }
.button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero-copy h1 { max-width: 14ch; }
.lede {
  max-width: var(--measure);
  margin: 1.5rem 0 2rem;
  font-size: 1.2rem;
  color: var(--ink-soft);
}
.fine {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* The example ticket: the one loud thing on the page. */

.ticket {
  margin: 0;
  background: var(--sheet);
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(1.2deg);
}
.ticket-head {
  padding: 1.1rem 1.25rem 0.9rem;
  border-bottom: 2px solid var(--ink);
}
.ticket-job { font-weight: 750; font-size: 1.05rem; line-height: 1.3; }
.ticket-no { font-size: 0.9rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.owners { list-style: none; margin: 0; padding: 0; }
.owner {
  display: grid;
  grid-template-columns: 0.9rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 1.25rem 0.75rem 0;
  border-bottom: 1px solid var(--rule);
}
/* A painted stripe, like a locate mark: slightly uneven at the edge. */
.owner::before {
  content: "";
  grid-column: 1;
  align-self: stretch;
  margin: -0.75rem 0;
  background: var(--paint);
  clip-path: polygon(0 0, 100% 4%, 82% 50%, 100% 96%, 0 100%);
}
.owner-name { font-weight: 650; }
.owner-status {
  font-size: 0.92rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.owner-status.is-waiting,
.owner-status.is-attention {
  padding: 0.15rem 0.5rem;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  font-weight: 650;
}
.owner-status.is-attention { background: #fff1c7; }
.owner-status.is-waiting { border-style: dashed; }

.ticket-foot {
  padding: 0.9rem 1.25rem 1rem;
  font-size: 0.95rem;
}
.ticket-foot strong { display: block; }

/* Steps: a real sequence, so it's numbered. */

.steps h2 { margin-bottom: 2.5rem; }
.steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  padding-top: 1rem;
  border-top: 3px solid var(--ink);
}
.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 0.6rem;
  font-size: 2.6rem;
  font-weight: 850;
  font-stretch: 125%;
  line-height: 1;
}
.steps h3 { margin-bottom: 0.6rem; }
.steps p { color: var(--ink-soft); }

/* Morning email */

.digest {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.digest-copy p { margin-top: 1rem; max-width: var(--measure); color: var(--ink-soft); }
.mail {
  margin: 0;
  padding: 1.25rem 1.4rem;
  background: var(--sheet);
  border: 2px solid var(--ink);
  border-radius: 6px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  overflow-x: auto;
}
.mail-head { color: var(--ink-soft); }

/* Limits */

.limits dl {
  margin: 2rem 0 0;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  column-gap: clamp(2rem, 5vw, 4rem);
}
.limits dt {
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
  font-weight: 750;
  font-stretch: 110%;
  font-size: 1.15rem;
  line-height: 1.3;
}
.limits dd {
  margin: 0;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
  max-width: var(--measure);
  color: var(--ink-soft);
}

/* Note from Joe */

.note {
  background: var(--ink);
  color: #f1f3f4;
  border-radius: 6px;
}
main > section.note {
  width: calc(100% - 2 * var(--gutter));
  max-width: calc(72rem - 2 * var(--gutter));
  margin-bottom: clamp(3rem, 8vw, 5rem);
  padding: clamp(2rem, 6vw, 4rem);
}
.note h2 { margin-bottom: 1.25rem; }
.note p { max-width: var(--measure); margin-bottom: 1rem; color: #c8d0d6; }
.note .button { margin-top: 1rem; box-shadow: 3px 3px 0 var(--amber-deep); border-color: var(--amber); }
.note .button:focus-visible { outline-color: var(--amber); }

/* Footer */

.foot {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 var(--gutter) 3rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.foot p { max-width: 40rem; margin-bottom: 0.4rem; }

/* Narrow screens */

@media (max-width: 900px) {
  .hero, .digest { grid-template-columns: minmax(0, 1fr); }
  .steps ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ticket { transform: none; box-shadow: 5px 5px 0 var(--ink); }
}
@media (max-width: 600px) {
  .steps ol { grid-template-columns: minmax(0, 1fr); }
  .limits dl { grid-template-columns: minmax(0, 1fr); }
  .mail { padding: 1rem; font-size: 0.74rem; }
  .limits dd { border-top: 0; padding-top: 0; }
  .owner { grid-template-columns: 0.7rem minmax(0, 1fr); row-gap: 0.15rem; }
  .owner::before { grid-row: 1 / span 2; }
  .owner-status { grid-column: 2; text-align: left; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .button:active { transform: none; }
}
