/* Order Desk. The page borrows from a carbonless duplicate order book:
   white top sheet = entered, yellow copy = the report you get back, pink copy = needs a person. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("fonts/caveat-latin.woff2") format("woff2");
  font-weight: 500 700;
  font-display: swap;
}

:root {
  color-scheme: only light; /* the paper metaphor has no dark version; stop browsers auto-inverting it */
  --bench: #e6eaee;      /* steel packing bench the sheets lie on */
  --sheet: #ffffff;      /* top copy */
  --yellow: #ffe97a;     /* second copy */
  --pink: #f9c3d1;       /* third copy: goes to whoever has to check */
  --ink: #12204d;        /* blue-black ink, for reading */
  --biro: #1d3fc4;       /* biro blue, for anything you can press */
  --stamp: #1b7a4b;      /* goods-in stamp green */
  --rule: #c9d3e6;       /* feint ruling on the sheets */
  --muted: #55607f;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 1.2rem + 3vw, 3.25rem);
  --step-4: clamp(2.3rem, 1.2rem + 3.2vw, 3.4rem);
  --measure: 62ch;
}

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

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

body {
  margin: 0;
  background: var(--bench);
  color: var(--ink);
  font: 400 var(--step-0)/1.55 "Archivo", system-ui, sans-serif;
  font-stretch: 100%;
}

a { color: var(--biro); text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--biro); outline-offset: 3px; }

.wrap { width: min(100% - 2rem, 72rem); margin-inline: auto; }

h1, h2, h3 { font-stretch: 122%; font-weight: 800; line-height: 1.04; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
h1 { font-size: var(--step-4); font-stretch: 114%; text-wrap: wrap; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-stretch: 112%; line-height: 1.2; letter-spacing: 0; }
p { margin: 0; max-width: var(--measure); }
p + p { margin-top: 0.9em; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.25rem; }
.brand { font-weight: 800; font-stretch: 122%; font-size: var(--step-1); color: var(--ink); text-decoration: none; }
.top nav { display: flex; gap: 1.5rem; align-items: center; font-size: var(--step--1); font-weight: 600; }
.top nav a { color: var(--ink); text-decoration: none; }
.top nav a:hover { text-decoration: underline; }
@media (max-width: 40rem) { .top nav a:not(.button) { display: none; } }

.button {
  display: inline-block;
  background: var(--biro);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 0.8em 1.25em;
  border-radius: 3px;
  text-decoration: none;
  box-shadow: 0 2px 0 #12297f;
}
.button:hover { background: #1632a3; }
.button:active { transform: translateY(2px); box-shadow: none; }
.top nav a.button { color: #fff; padding: 0.55em 1em; }
.top nav a.button:hover { text-decoration: none; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding-block: clamp(2rem, 6vw, 5rem) clamp(3rem, 8vw, 6.5rem); }
.hero .lede { font-size: var(--step-1); line-height: 1.45; margin-top: 1.5rem; max-width: 34ch; }
.hero .action { margin-top: 2rem; }
.hero .action small { display: block; margin-top: 0.9rem; font-size: var(--step--1); color: var(--muted); max-width: 40ch; }
@media (max-width: 56rem) { .hero { grid-template-columns: 1fr; } }

.sheets { position: relative; padding: 0 0 1rem 0; }
.paper { background: var(--sheet); border-radius: 2px; box-shadow: 0 1px 1px rgba(18, 32, 77, 0.18), 0 10px 24px -12px rgba(18, 32, 77, 0.45); }

.note {
  width: min(88%, 25rem);
  padding: 1.1rem 1.4rem 2.6rem;
  transform: rotate(-2.2deg);
  background: #fbfbf4 repeating-linear-gradient(to bottom, transparent 0 1.72rem, #d5deee 1.72rem calc(1.72rem + 1px));
  font: 500 1.42rem/1.72rem "Caveat", cursive;
  color: #1a2f8f;
}
.note p { max-width: none; margin: 0; }
.note p + p { margin-top: 0; }

.entry { position: relative; margin: -1.4rem 0 0 auto; width: min(96%, 31rem); padding: 1.1rem 1.25rem 1.25rem; }
.entry header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.1rem 1rem; padding-bottom: 0.6rem; border-bottom: 2px solid var(--ink); }
.entry header strong { font-stretch: 122%; font-weight: 800; white-space: nowrap; }
.entry header span { font-size: var(--step--1); color: var(--muted); font-variant-numeric: tabular-nums; }
.lines { list-style: none; margin: 0; padding: 0; font-size: var(--step--1); }
.lines li { display: grid; grid-template-columns: 6.2rem 1fr 2.2rem; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.lines .code { font-weight: 700; font-variant-numeric: tabular-nums; }
.lines .qty { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.lines li.check { background: var(--pink); margin-inline: -1.25rem; padding-inline: 1.25rem; border-bottom: 0; }
.lines li.check .code { font-weight: 600; }
.stamp { position: absolute; right: 1rem; bottom: -0.9rem; transform: rotate(-7deg); color: var(--stamp); border: 3px solid currentColor; border-radius: 4px; padding: 0.15rem 0.6rem; font-stretch: 122%; font-weight: 800; font-size: var(--step--1); background: rgba(255, 255, 255, 0.85); }

/* the one animated moment: lines copy through to the clean sheet */
@media (prefers-reduced-motion: no-preference) {
  .lines li, .stamp { opacity: 0; animation: copy-through 0.5s ease-out forwards; }
  .lines li:nth-child(1) { animation-delay: 0.7s; }
  .lines li:nth-child(2) { animation-delay: 1.3s; }
  .lines li:nth-child(3) { animation-delay: 1.9s; }
  .stamp { animation: stamp-down 0.25s cubic-bezier(0.2, 1.4, 0.4, 1) 2.7s forwards; }
}
@keyframes copy-through { from { opacity: 0; transform: translateY(-0.4rem); } to { opacity: 1; transform: none; } }
@keyframes stamp-down { from { opacity: 0; transform: rotate(-7deg) scale(1.6); } to { opacity: 1; transform: rotate(-7deg) scale(1); } }

/* ---------- sections ---------- */
.band { padding-block: clamp(3rem, 7vw, 5.5rem); }
.band > .wrap > h2 { max-width: 18ch; }
.band > .wrap > h2 + p { margin-top: 1.25rem; font-size: var(--step-1); line-height: 1.45; }
.band.white { background: var(--sheet); }
.band.yellow { background: var(--yellow); }

.steps { list-style: none; counter-reset: step; margin: 2.75rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 1rem; }
.steps li::before { content: counter(step); display: block; font-stretch: 125%; font-weight: 800; font-size: var(--step-3); line-height: 1; margin-bottom: 0.75rem; }
.steps p { margin-top: 0.5rem; }
@media (max-width: 52rem) { .steps { grid-template-columns: 1fr; gap: 2rem; } }

.report { margin-top: 2.75rem; padding: 1.5rem; overflow-x: auto; }
.report table { width: 100%; min-width: 38rem; border-collapse: collapse; font-size: var(--step--1); }
.report caption { text-align: left; font-weight: 800; font-stretch: 122%; font-size: var(--step-1); padding-bottom: 0.25rem; }
.report caption span { display: block; font-weight: 400; font-stretch: 100%; font-size: var(--step--1); color: var(--muted); }
.report th { text-align: left; font-weight: 600; color: var(--muted); padding: 0.9rem 0.75rem 0.5rem 0; border-bottom: 2px solid var(--ink); }
.report td { padding: 0.65rem 0.75rem 0.65rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.report td.num, .report th.num { text-align: right; font-variant-numeric: tabular-nums; padding-right: 0; }
.report tr.check td { background: var(--pink); }
.report tr.check td:first-child { padding-left: 0.75rem; }
.report .why { display: block; margin-top: 0.2rem; font-weight: 600; }
.ok { color: var(--stamp); font-weight: 700; }

.cases { margin-top: 2.75rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
.cases div { border-left: 6px solid var(--pink); padding-left: 1.1rem; }
.cases p { margin-top: 0.5rem; }
@media (max-width: 52rem) { .cases { grid-template-columns: 1fr; gap: 1.75rem; } }

.price { margin-top: 2.5rem; border-collapse: collapse; width: min(100%, 40rem); }
.price th, .price td { text-align: left; padding: 0.9rem 0; border-bottom: 1px solid var(--ink); vertical-align: baseline; }
.price th { font-weight: 400; padding-right: 2rem; }
.price td { font-stretch: 122%; font-weight: 800; font-size: var(--step-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.price td small { font-size: var(--step--1); font-stretch: 100%; font-weight: 400; }
.after-price { margin-top: 1.5rem; }

.faq { margin-top: 2.25rem; max-width: 46rem; border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--ink); }
.faq summary { cursor: pointer; padding: 1.05rem 2rem 1.05rem 0; font-weight: 700; font-size: var(--step-1); line-height: 1.3; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 0.85rem; font-weight: 400; font-size: 1.6rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details > p { padding-bottom: 1.25rem; }
.faq details > p + p { margin-top: -0.4rem; }

.closing { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 2rem; }
.closing h2 { max-width: 16ch; }

footer { padding-block: 2.5rem 3.5rem; font-size: var(--step--1); color: var(--muted); }
footer p { max-width: none; }
footer a { color: inherit; }

/* ---------- plain text pages ---------- */
.prose { padding-block: 2rem 5rem; }
.prose h1 { font-size: var(--step-3); margin-bottom: 1.5rem; }
.prose h2 { font-size: var(--step-1); font-stretch: 112%; line-height: 1.25; letter-spacing: 0; margin: 2.25rem 0 0.6rem; }
.prose ul { max-width: var(--measure); padding-left: 1.2rem; margin: 0.6rem 0; }
