@property --d { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --drift { syntax: "<angle>"; inherits: true; initial-value: 0deg; }

:root {
  color-scheme: light;
  --ground: #e6e8eb;
  --sheet: #ffffff;
  --tint: #f1f2f4;
  --ink: #000000;
  --ink-2: #45484d;
  --hair: #c5c8ce;
  --red: #d9200f;
  --yellow: #f7c600;
  --blue: #1c3f94;
  --grey: #c4c4bf;
  --hatch: repeating-linear-gradient(45deg, var(--ink) 0 2px, var(--sheet) 2px 9px);
  --edge: var(--ink);
  --focus: var(--blue);

  --col: 73rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --pad: clamp(1.25rem, 3vw, 2rem);
  --rule: 2px;
  --bar: 6px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --font: "Archivo", "Arial", system-ui, sans-serif;
  --text-sm: 0.875rem;
  --text-md: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #131518;
  --sheet: #1e2125;
  --tint: #282c31;
  --ink: #f1f2f4;
  --ink-2: #a8adb5;
  --hair: #3b4047;
  --blue: #3f66cf;
  --grey: #7f848c;
  --edge: #5d626b;
  --focus: #8eacff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #131518;
    --sheet: #1e2125;
    --tint: #282c31;
    --ink: #f1f2f4;
    --ink-2: #a8adb5;
    --hair: #3b4047;
    --blue: #3f66cf;
    --grey: #7f848c;
    --edge: #5d626b;
    --focus: #8eacff;
  }
}

* { box-sizing: border-box; }
html { overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--text-md);
  font-stretch: 100%;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, dl, dd, ul, ol, pre, figure { margin: 0; }
img, video { display: block; width: 100%; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.invert a:focus-visible { outline-color: var(--yellow); }

.top, main, .foot { width: min(100% - 2 * var(--gutter), var(--col)); margin-inline: auto; }
main { flex: 1; padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3.5rem, 8vw, 6rem); }

.display { font-stretch: 125%; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.heading { font-stretch: 112%; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
.plane { min-width: 0; }
.measure { max-width: 62ch; }
.grid { display: grid; gap: 2rem; }
main.grid { gap: clamp(4rem, 9vw, 7rem); }

/* A slab is a face lifted --d off the page in oblique projection, with two side faces
   reaching down and right to its footprint. --sit is the depth at which the face fills
   its layout box, so only the sides overflow. --face colours the top, --end the sides. */
:is(.slab, .button) {
  position: relative;
  --face: var(--ink);
  --end: var(--yellow);
  --sit: 0px;
  background: var(--face);
  translate: calc(var(--sit) - var(--d)) calc(var(--sit) - var(--d));
  transition: --d 160ms var(--ease);
}
:is(.slab, .button)::before, :is(.slab, .button)::after {
  content: "";
  position: absolute;
  transform-origin: 0 0;
  pointer-events: none;
}
:is(.slab, .button)::before {
  left: 0;
  top: 100%;
  width: 100%;
  height: var(--d);
  background: color-mix(in srgb, var(--end) 66%, #000);
  transform: skewX(45deg);
}
:is(.slab, .button)::after {
  left: 100%;
  top: 0;
  width: var(--d);
  height: 100%;
  background: var(--end);
  transform: skewY(45deg);
}

.button {
  --sit: 6px;
  --d: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.75rem 1.5rem;
  color: var(--sheet);
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}
.button:hover { --d: 10px; }
.button:active { --d: 1px; }
.button-light { --face: var(--sheet); color: var(--ink); }

.link {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.top {
  display: flex;
  align-items: center;
  padding-block: 1.25rem;
  border-bottom: var(--rule) solid var(--ink);
}
.wordmark { display: inline-flex; align-items: center; font-size: 1.375rem; color: var(--ink); text-decoration: none; }
.wordmark::before {
  content: "";
  width: 0.625rem;
  height: 0.625rem;
  margin-right: 1.25rem;
  background: var(--red);
  box-shadow: 0.3125rem 0.3125rem 0 var(--yellow), 0.625rem 0.625rem 0 var(--blue);
  translate: 0 -0.3125rem;
}
.sign-in { margin-left: auto; }
.theme-toggle {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  background: linear-gradient(135deg, var(--ink) 50%, var(--sheet) 50%);
  box-shadow: 0 0 0 var(--rule) var(--ink);
  cursor: pointer;
}
.top .theme-toggle { margin-left: 1.25rem; }
.wordmark + .theme-toggle { margin-left: auto; }

.shot-frame { --face: var(--sheet); --end: var(--edge); --sit: 12px; --d: 12px; margin: 0 12px 12px 0; }
.shot { box-shadow: 0 0 0 var(--rule) var(--ink); }

/* Landing page */

.hero {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: 2rem clamp(2rem, 5vw, 4rem);
  min-height: min(70vh, 40rem);
}
.intro { display: flex; flex-direction: column; align-items: flex-start; gap: 1.5rem; }
.intro h1 { font-size: clamp(2.125rem, 3.6vw, 3rem); text-wrap: balance; }
.intro p { font-size: var(--text-lg); line-height: 1.5; }
.intro .free { font-size: var(--text-md); font-weight: 600; }

/* A commission statement taken apart: three sheets in axonometric view, with the flagged
   lines lifted off the page and pulled out to the side. Lengths are in cqw so the whole
   construction scales with the scene. */
.scene {
  position: relative;
  width: min(100%, 34rem);
  aspect-ratio: 1 / 1;
  margin-inline: auto;
  container-type: inline-size;
}
.stage {
  --gap: calc(12cqw + var(--spread, 0) * 9cqw);
  position: absolute;
  left: 27%;
  top: 22%;
  width: 42%;
  aspect-ratio: 5 / 7;
  transform-style: preserve-3d;
  transform: rotateX(calc(57deg + var(--tilt, 0deg))) rotateZ(calc(-36deg + var(--turn, 0deg) + var(--drift)));
  animation: drift 16s ease-in-out infinite alternate;
}
.page {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: translateZ(calc(var(--k) * var(--gap)));
  background:
    linear-gradient(var(--ink), var(--ink)) 9% 6% / 36% 3.5% no-repeat,
    repeating-linear-gradient(to bottom, transparent 0 calc(12.5% - 1px), var(--hair) calc(12.5% - 1px) 12.5%) 0 100% / 100% 82% no-repeat,
    var(--sheet);
  box-shadow: inset 0 0 0 var(--rule) var(--ink);
  animation: settle 1000ms var(--ease) both;
  animation-delay: calc(var(--k) * 150ms);
}
.strip {
  position: absolute;
  left: 9%;
  top: var(--at);
  width: 82%;
  height: 7%;
  background: var(--c);
  transform: translate3d(calc(var(--pull) * (1 + var(--spread, 0) * 0.5)), 0, 3.5cqw);
  animation: pull 900ms var(--ease) both;
  animation-delay: calc(1000ms + var(--s) * 110ms);
}
.wall {
  position: absolute;
  animation: raise 800ms var(--ease) both;
  animation-delay: 300ms;
}
.wall-back {
  left: -22%;
  top: -9%;
  width: 96%;
  height: 46cqw;
  background: var(--grey);
  transform-origin: 50% 0;
  transform: rotateX(90deg);
}
.floor {
  left: -34%;
  top: 26%;
  width: 92%;
  height: 92%;
  background: var(--ink);
  transform: translateZ(calc(var(--gap) * -0.8));
}
.float {
  position: absolute;
  left: 118%;
  top: 62%;
  width: 62%;
  height: 34%;
  background: var(--yellow);
  transform: translateZ(calc(var(--gap) * 0.5));
  animation: settle-float 1000ms var(--ease) both;
  animation-delay: 450ms;
}
@keyframes drift { from { --drift: -2.5deg; } to { --drift: 2.5deg; } }
@keyframes settle {
  from { opacity: 0; transform: translateZ(calc(var(--k) * var(--gap) + 40cqw)); }
}
@keyframes settle-float {
  from { opacity: 0; transform: translateZ(calc(var(--gap) * 0.5 + 40cqw)); }
}
@keyframes pull { from { transform: translate3d(0, 0, 0); } }
@keyframes raise {
  from { opacity: 0; }
}

.section-head h2, .why h2, .claim-plane h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
.split { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: start; gap: 2rem clamp(2rem, 5vw, 4rem); }
.split > :nth-child(n + 3) { grid-column: 2; }

.flags { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem 2rem; }
.flag { display: flex; flex-direction: column; gap: 0.5rem; }
.flag-slab {
  --sit: 14px;
  --d: 14px;
  --end: color-mix(in srgb, var(--face) 74%, #000);
  height: 6.5rem;
  margin: 0 14px calc(14px + 1.25rem) 0;
  transition: --d 800ms var(--ease) calc(var(--i) * 110ms);
}
.js .flags:not(.seen) .flag-slab { --d: 0px; }
.flag h3 { font-size: var(--text-xl); overflow-wrap: break-word; hyphens: auto; }
.flag p { max-width: 30ch; }
.flag-missing .flag-slab { --face: var(--red); }
.flag-underpaid .flag-slab { --face: var(--yellow); }
.flag-duplicate .flag-slab { --face: var(--blue); }
.flag-unknown .flag-slab { --face: var(--grey); }

.steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.5rem 2rem;
  list-style: none;
  padding: 0;
}
.step { display: flex; flex-direction: column; gap: 1rem; padding-top: 1.25rem; border-top: var(--rule) solid var(--ink); }
.step-number { font-size: clamp(2.75rem, 5vw, 4rem); }
.step p { max-width: 40ch; }

.why-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 2rem clamp(2rem, 5vw, 4rem); }
.why { display: flex; flex-direction: column; gap: 1.5rem; }
.claims-list { display: grid; padding: 0; list-style: none; border-top: var(--rule) solid var(--ink); }
.claims-list li { padding: 0.875rem 0; border-bottom: 1px solid var(--hair); }

.faq { display: grid; padding: 0.5rem var(--pad); background: var(--sheet); }
.faq-item { display: grid; gap: 0.5rem; padding: 1.5rem 0; }
.faq-item + .faq-item { border-top: 1px solid var(--hair); }
.faq-item h3 { font-size: var(--text-lg); font-stretch: 112%; font-weight: 700; line-height: 1.25; }
.faq-item p { max-width: 62ch; color: var(--ink-2); }

.plans { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.plan {
  --face: var(--sheet);
  --end: var(--edge);
  --sit: 10px;
  --d: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  margin: 0 10px 10px 0;
  padding: var(--pad);
}
.plan h3 { font-size: var(--text-xl); }
.price { font-size: clamp(2.5rem, 5vw, 4rem); font-variant-numeric: tabular-nums; white-space: nowrap; }
.price span { font-size: var(--text-lg); font-stretch: 100%; font-weight: 600; letter-spacing: 0; }
.plan .button { margin-top: auto; }
.plans-note { font-weight: 600; }

.closing {
  --sit: 16px;
  --d: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  margin: 0 16px 16px 0;
  padding: clamp(2rem, 6vw, 4.5rem);
  color: var(--sheet);
}
.closing p.display { font-size: clamp(2rem, 5vw, 4rem); }
.closing p { font-size: var(--text-lg); }

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding-block: 1.5rem 2.5rem;
  border-top: var(--rule) solid var(--ink);
  font-size: var(--text-sm);
}
.foot span { font-weight: 700; margin-right: auto; }

/* Legal pages */

.legal { display: flex; flex-direction: column; gap: 1rem; max-width: 52rem; padding: clamp(1.5rem, 5vw, 3.5rem); background: var(--sheet); }
.legal > * { max-width: 68ch; }
.legal h1 { font-size: clamp(2rem, 4vw, 3rem); }
.legal h2 { margin-top: 1.25rem; font-size: var(--text-xl); font-stretch: 112%; font-weight: 700; line-height: 1.2; }
.legal ul { display: grid; gap: 0.5rem; padding-left: 1.25rem; }
.legal .updated { font-size: var(--text-sm); font-weight: 600; color: var(--ink-2); }

/* Sample audit page */

main.report { gap: 2rem; }
.notice { padding: 1rem 1.25rem 1rem calc(1.25rem + var(--bar)); background: var(--sheet); box-shadow: inset var(--bar) 0 0 var(--ink); font-weight: 600; }

.summary-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem clamp(2rem, 5vw, 4rem); padding-block: 1.5rem; }
.summary { display: flex; flex-direction: column; gap: 1.25rem; }
.summary h1 { font-size: var(--text-xl); font-stretch: 112%; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
.total { font-size: clamp(2.75rem, 5.4vw, 4.5rem); font-variant-numeric: tabular-nums; }
.total-note { font-weight: 600; }
.tally { display: grid; border-top: var(--rule) solid var(--ink); }
.tally div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.625rem 0; border-bottom: 1px solid var(--hair); }
.tally dt { color: var(--ink-2); }
.tally dd { font-weight: 700; font-variant-numeric: tabular-nums; }
.notes { display: flex; flex-direction: column; gap: 1rem; }
.notes h2 { font-size: var(--text-xl); font-stretch: 112%; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
.notes p { color: var(--ink-2); }

.maker { background: var(--sheet); }
.maker-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem 2rem;
  padding: var(--pad);
}
.maker-head h2 { min-width: 0; font-size: clamp(1.75rem, 3vw, 2.5rem); overflow-wrap: anywhere; }
.owed { flex: none; text-align: right; }
.owed strong { display: block; margin-bottom: 0.375rem; font-size: 2rem; font-variant-numeric: tabular-nums; }
.owed span { font-size: var(--text-sm); color: var(--ink-2); }

.findings { list-style: none; padding: 0; }
.finding {
  position: relative;
  display: grid;
  gap: 0.875rem;
  padding: 1.25rem var(--pad) 1.5rem calc(var(--pad) + var(--bar));
  border-top: var(--rule) solid var(--ink);
}
.finding + .finding { border-top: 1px solid var(--hair); }
.finding::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: var(--bar); background: var(--kind); }
.finding-missing { --kind: var(--red); }
.finding-underpaid { --kind: var(--yellow); }
.finding-duplicate { --kind: var(--blue); }
.finding-unknown { --kind: var(--grey); }
.finding-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; }
.finding-head h3 { font-size: var(--text-lg); font-weight: 700; }
.finding-head .kind { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; color: var(--ink-2); }
.finding-head .kind::before { content: ""; width: 0.875rem; height: 0.875rem; background: var(--kind); }
.fields { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; }
.fields div { display: flex; flex-direction: column; }
.fields dt { font-size: var(--text-sm); color: var(--ink-2); }
.fields dd { font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.reason { max-width: 62ch; }
.evidence { display: grid; gap: 0.25rem; font-size: var(--text-sm); color: var(--ink-2); }
.evidence strong { font-weight: 600; color: var(--ink); }
.evidence ul { padding-left: 1.125rem; }

.held { position: relative; display: flex; flex-direction: column; gap: 1rem; padding: var(--pad) var(--pad) var(--pad) calc(var(--pad) + 24px); background: var(--sheet); }
.held::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 24px; background: var(--hatch); }
.held h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
.held .status { font-size: var(--text-lg); font-weight: 700; }
.held p { max-width: 62ch; }

.claim-plane { display: flex; flex-direction: column; gap: 1.25rem; padding: var(--pad); background: var(--sheet); }
.claim-plane h2 { font-size: var(--text-xl); font-stretch: 112%; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
.claim {
  max-width: 48rem;
  padding: 1.25rem 1.5rem;
  background: var(--tint);
  box-shadow: inset var(--bar) 0 0 var(--ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .hero, .why-row, .summary-row, .split { grid-template-columns: minmax(0, 1fr); }
  .split > :nth-child(n + 3) { grid-column: auto; }
  .hero { min-height: 0; }
  .flags, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scene { width: min(100%, 28rem); }
}

@media (max-width: 760px) {
  .flags, .steps, .plans { grid-template-columns: minmax(0, 1fr); }
  .flag-slab { height: 4.5rem; }
  .maker-head { flex-wrap: wrap; }
  .owed { text-align: left; }
  .held { padding-left: calc(var(--pad) + 16px); }
  .held::before { width: 16px; }
  .claim { padding: 1rem 1rem 1rem calc(1rem + var(--bar)); font-size: var(--text-sm); }
}

@media (prefers-reduced-motion: reduce) {
  .stage, .page, .strip, .wall, .float { animation: none; }
  :is(.slab, .button), .flag-slab { transition: none; }
}
