@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f2f4f3;
  --surface: #fbfcfb;
  --ink: #121821;
  --muted: #556170;
  --line: #cfd6d6;
  --accent: #1b46c2;
  --sheet: #1b46c2;
  --on-sheet: #f4f7ff;
  --btn-bg: #1b46c2;
  --btn-fg: #f4f7ff;
  --row-active: #e3e9fb;
  --shadow: 0 24px 48px -24px rgb(18 40 110 / .35);
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1218;
    --surface: #141b24;
    --ink: #e8edf2;
    --muted: #9aa7b5;
    --line: #263140;
    --accent: #8aaaff;
    --sheet: #173a9e;
    --btn-bg: #8aaaff;
    --btn-fg: #0d1218;
    --row-active: #1d2a47;
    --shadow: 0 24px 48px -24px rgb(0 0 0 / .7);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: min(1320px, 100% - 3rem); margin-inline: auto; }

h1, h2 {
  font-stretch: 112%;
  font-weight: 700;
  letter-spacing: -.022em;
  line-height: 1.04;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 4.6vw, 4.125rem); }
h2 { font-size: clamp(1.875rem, 3.2vw, 2.875rem); }
.lede { color: var(--muted); font-size: 1.1875rem; max-width: 46ch; }
.eyebrow {
  font: 500 .75rem/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}

/* buttons: one radius system, 2px everywhere */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .875rem 1.5rem;
  border: 1.5px solid transparent;
  border-radius: 2px;
  font: 600 1rem/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s, border-color .2s;
}
.btn:active { transform: translateY(1px); }
.btn--small { padding: .625rem 1rem; font-size: .9375rem; }
.btn--primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn--primary:hover { background: color-mix(in srgb, var(--btn-bg) 86%, var(--ink)); }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--invert { background: var(--on-sheet); color: #12286e; }
.btn--invert:hover { background: #fff; }

/* nav */
.nav { border-bottom: 1px solid var(--line); }
.nav__row { display: flex; align-items: center; gap: 2rem; height: 68px; }
.brand {
  display: inline-flex; align-items: center; gap: .625rem;
  font-weight: 700; font-stretch: 112%; font-size: 1.0625rem;
  letter-spacing: -.01em; text-decoration: none;
}
.brand__mark { width: 26px; height: 26px; }
.brand__mark rect { fill: var(--sheet); }
.brand__mark path { stroke: #fff; stroke-width: 3; fill: none; }
.nav__links { display: flex; gap: 1.75rem; margin-left: auto; }
.nav__links a { color: var(--muted); font-size: .9375rem; text-decoration: none; }
.nav__links a:hover { color: var(--ink); }

/* hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
  padding-block: 2.5rem 5rem;
}
.hero__copy { display: grid; gap: 1.5rem; justify-items: start; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }

.sheet {
  background-color: var(--sheet);
  background-image:
    linear-gradient(rgb(255 255 255 / .07) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / .07) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--on-sheet);
  padding: 1.25rem 1.25rem 0;
  border-radius: 2px;
  box-shadow: var(--shadow);
}
.sheet figcaption {
  font: 400 .75rem/1 var(--mono);
  padding: .875rem 0 1.125rem;
  border-top: 1px solid rgb(255 255 255 / .28);
  margin-top: .75rem;
  max-width: 15rem;
  line-height: 1.5;
}
.plan { display: block; width: 100%; height: auto; }
.plan .layer { transition: opacity .35s var(--ease); }
.l-floor rect { fill: #fff; fill-opacity: 0; transition: fill-opacity .35s var(--ease); }
.l-walls > * { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: square; transition: stroke-width .35s var(--ease); }
.l-walls .ext { stroke-width: 4.5; }
.dims path { stroke: rgb(255 255 255 / .6); stroke-width: 1; fill: none; }
.dims text, .labels text {
  font: 500 10px var(--mono);
  fill: #fff;
  text-anchor: middle;
  letter-spacing: .04em;
}
.dims text { paint-order: stroke; stroke: var(--sheet); stroke-width: 8px; }
.labels text { text-transform: uppercase; }
.labels tspan { fill: rgb(255 255 255 / .7); text-transform: none; }
.cut { stroke: var(--sheet); stroke-width: 4; fill: none; }
.cut--ext { stroke-width: 6; }
.glass { stroke: #fff; stroke-width: 1; fill: none; }
.swing { stroke: rgb(255 255 255 / .7); stroke-width: 1; fill: none; }
.l-plumb > * { fill: none; stroke: rgb(255 255 255 / .75); stroke-width: 1.2; }
.l-elec circle { fill: var(--sheet); stroke: rgb(255 255 255 / .75); stroke-width: 1.2; }

/* estimate line hovered: light up the part of the plan it was measured from */
.plan[data-active] .layer { opacity: .3; }
.plan[data-active="walls"] .l-walls,
.plan[data-active="floor"] .l-floor,
.plan[data-active="elec"] .l-elec,
.plan[data-active="plumb"] .l-plumb { opacity: 1; }
.plan[data-active="walls"] .l-walls > * { stroke-width: 5; }
.plan[data-active="walls"] .l-walls .ext { stroke-width: 7; }
.plan[data-active="floor"] .l-floor rect { fill-opacity: .2; }
.plan[data-active="elec"] .l-elec circle { fill: #fff; stroke: #fff; }
.plan[data-active="plumb"] .l-plumb > * { fill: rgb(255 255 255 / .35); stroke: #fff; }

.estimate {
  position: relative;
  width: min(400px, 94%);
  margin: -3.25rem 0 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: var(--shadow);
  padding: 1rem 1.125rem .75rem;
}
.estimate table { width: 100%; border-collapse: collapse; font: 400 .8125rem/1.2 var(--mono); }
.estimate caption {
  text-align: left;
  font: 700 1rem/1.2 var(--sans);
  padding-bottom: .625rem;
}
.estimate caption span { display: block; font: 400 .75rem/1.4 var(--sans); color: var(--muted); margin-top: .125rem; }
.estimate th, .estimate td { padding: .4375rem .375rem; text-align: right; font-weight: 400; }
.estimate th:first-child { text-align: left; }
.estimate thead th { color: var(--muted); font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid var(--line); }
.estimate tbody th { font-family: var(--sans); font-size: .9375rem; font-weight: 500; }
.estimate tbody td:nth-child(2) { color: var(--muted); }
.estimate tbody tr { cursor: default; transition: background-color .2s; }
.estimate tbody tr.is-active { background: var(--row-active); }
.estimate tbody tr:focus-visible { outline-offset: -2px; }
.estimate tfoot th { font-family: var(--sans); color: var(--muted); }
.estimate tfoot tr:first-child > * { border-top: 1px solid var(--line); padding-top: .625rem; }
.estimate .total > * { color: var(--ink); font-weight: 500; font-size: 1.0625rem; padding-top: .5rem; }
.estimate .total th { font-weight: 700; }

/* how it works */
.how { padding-block: 5rem 6rem; }
.how h2 { max-width: 16ch; }
.steps { margin-top: 3.5rem; }
.steps li.reveal, .steps > li {
  display: grid;
  grid-template-columns: 4fr 5fr 3fr;
  gap: 2rem;
  align-items: baseline;
  padding-block: 2rem;
  border-top: 1px solid var(--line);
}
.steps h3 {
  font-size: clamp(2.5rem, 5.5vw, 5rem);
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
}
.steps p { color: var(--muted); max-width: 44ch; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }
.tags li {
  display: block;
  padding: .375rem .625rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  font: 500 .75rem/1 var(--mono);
  letter-spacing: .04em;
}

/* proposal */
.proposal {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 4.5rem;
  align-items: center;
  padding-block: 2rem 7rem;
}
.paper {
  background: #fdfdfb;
  color: #171c24;
  border-radius: 2px;
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 3.4vw, 3rem);
  transform: rotate(-1.2deg);
}
.paper__head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 1rem; border-bottom: 2px solid #171c24; }
.paper__head strong { font-size: 1.25rem; font-stretch: 112%; }
.paper__head span { font: 500 .75rem var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.paper__meta { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; padding-block: 1.25rem; font-size: .9375rem; }
.paper dt, .paper h4, .paper__price span, .paper__sign span {
  font: 500 .6875rem/1.4 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #5b6573;
}
.paper h4 { margin: .75rem 0 .5rem; }
.paper__scope { columns: 2; column-gap: 2rem; font-size: .9375rem; line-height: 1.7; }
.paper__price { display: flex; justify-content: space-between; align-items: baseline; margin-block: 1.5rem .75rem; padding: 1rem 1.125rem; background: #e9eefc; }
.paper__price strong { font: 500 clamp(1.5rem, 2.6vw, 2.125rem)/1 var(--mono); color: #1b46c2; }
.paper__pay { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.paper__pay th { text-align: left; font-weight: 400; padding: .25rem 0; }
.paper__pay td { text-align: right; font-family: var(--mono); font-size: .875rem; padding: .25rem 0; }
.paper__pay td:nth-child(2) { color: #5b6573; width: 4rem; }
.paper__sign { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; margin-top: 3rem; }
.paper__sign span { border-top: 1px solid #171c24; padding-top: .5rem; }
.note { margin-top: 1.5rem; font-size: .8125rem; color: var(--muted); }

.proposal__copy { display: grid; gap: 1.25rem; }
.points { margin-top: 1rem; display: grid; gap: 1.5rem; }
.points dt { font-weight: 700; font-size: 1.125rem; }
.points dd { color: var(--muted); max-width: 40ch; }
.points > div { padding-left: 1.125rem; border-left: 2px solid var(--accent); }

/* closing */
.cta { background: var(--sheet); color: var(--on-sheet); }
.cta__row {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 4rem;
  align-items: end;
  padding-block: 5.5rem;
}
.cta p { max-width: 40ch; margin-bottom: 1.5rem; color: rgb(244 247 255 / .88); }

.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.75rem;
  font-size: .875rem;
  color: var(--muted);
}

/* motion: load-in and scroll reveal, only when the visitor allows it */
@media (prefers-reduced-motion: no-preference) {
  .hero__copy > * { animation: rise .8s var(--ease) both; }
  .hero__copy > :nth-child(2) { animation-delay: .06s; }
  .hero__copy > :nth-child(3) { animation-delay: .12s; }
  .hero__copy > :nth-child(4) { animation-delay: .18s; }
  .sheet { animation: rise .9s var(--ease) .1s both; }
  .estimate { animation: rise .9s var(--ease) .55s both; }
  .l-walls > * { stroke-dasharray: 1; animation: draw 1.4s var(--ease) .35s both; }
  .js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .proposal__doc.reveal { transform: translateY(32px); }
  .js .proposal__doc.reveal.in { transform: none; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

@media (max-width: 900px) {
  .wrap { width: min(1320px, 100% - 2rem); }
  .nav__links { display: none; }
  .nav__row { justify-content: space-between; }
  .hero { grid-template-columns: 1fr; gap: 2.5rem; padding-block: 2.5rem 3.5rem; }
  .estimate { width: 100%; margin-top: 1rem; }
  .sheet figcaption { max-width: none; }
  .how { padding-block: 3rem 4rem; }
  .steps li.reveal, .steps > li { grid-template-columns: 1fr; gap: .75rem; padding-block: 1.5rem; }
  .tags { justify-content: flex-start; }
  .proposal { grid-template-columns: 1fr; gap: 2.5rem; padding-block: 1rem 4rem; }
  .paper { transform: none; }
  .paper__scope { columns: 1; }
  .cta__row { grid-template-columns: 1fr; gap: 2rem; padding-block: 3.5rem; }
  .foot { flex-direction: column; }
}
