/* Layout: one drawing sheet. A ruled frame, the wordmark dimensioned like a part
   on a shop drawing, and a title block in the lower right. Single blueprint look. */
:root {
  --paper: #133a70;
  --paper-lift: #1a4a8a;
  --ink: #eef4ff;
  --ink-soft: rgba(238, 244, 255, .72);
  --rule: rgba(238, 244, 255, .5);
  --grid-minor: rgba(238, 244, 255, .055);
  --grid-major: rgba(238, 244, 255, .11);
  --tape: #ffc928;
  --tape-ink: #1c1a0f;

  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  padding: clamp(16px, 2.4vw, 32px);
  background-color: var(--paper);
  /* Drafting-sheet grid: the page is a blueprint, so the grid is the material, not decoration.
     Flat paper underneath, no glow. */
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-minor) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
/* Room under the sheet for the chat button, so it never sits on the title block. */
body { padding-bottom: 92px; }

.sheet {
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule);
  outline-offset: 5px;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  margin: 6px;
  min-height: calc(100% - 12px);
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hero {
  align-self: center;
  padding: clamp(2rem, 6vh, 4rem) clamp(1rem, 6vw, 6rem);
  min-width: 0;
}

.mark { display: inline-block; max-width: 100%; }

h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.6rem, 16.5vw, 12.5rem);
  line-height: .86;
  letter-spacing: .01em;
  text-transform: uppercase;
  white-space: nowrap;
}
h1 .cut {
  color: transparent;
  -webkit-text-stroke: clamp(1px, .16vw, 2px) var(--ink);
}

/* Dimension line under the wordmark, drawn the way a shop drawing calls out a width. */
.dim {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: .75rem;
  margin-top: clamp(.9rem, 2vw, 1.6rem);
  padding-inline: 0;
  font-family: var(--mono);
  font-size: clamp(.75rem, 1.1vw, .95rem);
  font-weight: 500;
  letter-spacing: .06em;
}
.dim::before, .dim::after {
  /* extension lines dropping from the ends of the wordmark */
  content: "";
  position: absolute;
  top: -.7rem;
  bottom: -.45rem;
  width: 1px;
  background: var(--rule);
}
.dim::before { left: 0; }
.dim::after { right: 0; }
.dim-line {
  position: relative;
  height: 1px;
  background: var(--ink);
}
.dim-line::after {
  /* architectural tick: a short 45 degree slash where the dimension meets the extension line */
  content: "";
  position: absolute;
  top: 50%;
  width: 15px;
  height: 1.5px;
  background: var(--ink);
  transform: translate(-50%, -50%) rotate(-45deg);
}
.dim-line.a::after { left: 0; }
.dim-line.b::after { left: 100%; }
.dim-line.a { transform-origin: right center; }
.dim-line.b { transform-origin: left center; }
.dim-value { white-space: nowrap; }

.lede {
  margin: clamp(1.6rem, 4vw, 2.6rem) 0 0;
  max-width: 24ch;
  font-size: clamp(1.25rem, 2.5vw, 1.9rem);
  font-weight: 500;
  line-height: 1.25;
  text-wrap: balance;
}
.sub {
  margin: .9rem 0 0;
  max-width: 44ch;
  text-wrap: balance;
  color: var(--ink-soft);
  font-size: clamp(.95rem, 1.2vw, 1.05rem);
}

/* Bottom edge of the sheet: site links on the left, title block on the right. */
.sheet-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
}
.links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.links a { color: var(--ink-soft); text-decoration: none; text-underline-offset: .2em; }
.links a:hover { color: var(--ink); text-decoration: underline; }
.links a:focus-visible { outline: 2px solid var(--tape); outline-offset: 3px; }

/* Title block, lower right, as on any drawing sheet. */
.title-block {
  flex: 0 1 30rem;
  margin-left: auto;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: rgba(19, 58, 112, .55);
}
.cell {
  padding: .6rem .8rem .7rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  min-width: 0;
}
.cell.wide, .cell:last-child { border-right: 0; }
.title-block .cell:nth-last-child(-n+3) { border-bottom: 0; }
.cell.wide { grid-column: 1 / -1; }
.cell dt {
  font-family: var(--mono);
  font-size: .65rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.cell dd {
  margin: .2rem 0 0;
  font-size: .95rem;
  font-weight: 500;
}
.cell dd.fine {
  margin-top: .4rem;
  font-size: .78rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink-soft);
}
.title-block { margin-block: 0; margin-right: 0; }
.cell a { color: var(--ink); text-underline-offset: .2em; }
.cell a:focus-visible { outline: 2px solid var(--tape); outline-offset: 3px; }
.chip {
  display: inline-block;
  padding: .12rem .5rem .16rem;
  background: var(--tape);
  color: var(--tape-ink);
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Detail sections: callouts drawn on the same sheet. */
.detail {
  border-top: 1px solid var(--rule);
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1rem, 6vw, 6rem);
  min-width: 0;
}
.tag {
  margin: 0;
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
h2 {
  margin: .6rem 0 0;
  max-width: 16ch;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: .95;
  text-transform: uppercase;
  text-wrap: balance;
}
.pitch {
  margin: 1.1rem 0 0;
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.4;
}
.steps {
  list-style: none;
  margin: clamp(1.75rem, 4vw, 3rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--rule);
  background: rgba(19, 58, 112, .55);
}
.steps li {
  padding: 1rem 1.1rem 1.2rem;
  border-right: 1px solid var(--rule);
  min-width: 0;
}
.steps li:last-child { border-right: 0; }
.steps .no {
  display: block;
  font-family: var(--mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .14em;
  color: var(--tape);
}
.steps strong { display: block; margin-top: .45rem; font-size: 1.1rem; font-weight: 500; }
.steps span.what { display: block; margin-top: .3rem; color: var(--ink-soft); font-size: .95rem; }
.sms {
  margin: .7rem 0 0;
  padding: .6rem .75rem;
  border: 1px solid var(--rule);
  border-radius: 12px 12px 12px 2px;
  background: var(--ink);
  color: #10294f;
  font-size: .9rem;
  line-height: 1.35;
}
.offer {
  margin: clamp(1.75rem, 4vw, 3rem) 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: start;
}
.price {
  margin: 0;
  padding-left: 1rem;
  border-left: 4px solid var(--tape);
}
.price b {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
  text-transform: uppercase;
}
.price span { display: block; margin-top: .5rem; max-width: 34ch; color: var(--ink-soft); }
.gets { margin: 0; padding-left: 1.1rem; }
.gets li { margin-top: .45rem; }
.gets li:first-child { margin-top: 0; }
.gets li::marker { color: var(--tape); }
.cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.btn {
  display: inline-block;
  padding: .7rem 1.1rem .75rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: var(--mono);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
}
.btn.main { background: var(--tape); border-color: var(--tape); color: var(--tape-ink); }
.btn:hover { background: var(--ink); border-color: var(--ink); color: #10294f; }
.btn:focus-visible { outline: 2px solid var(--tape); outline-offset: 3px; }
.try { margin: 1.25rem 0 0; max-width: 52ch; color: var(--ink-soft); font-size: .95rem; }
.try a { color: var(--ink); text-underline-offset: .2em; }

/* Detail B: the parts list. Cells share hairlines, like a schedule on a drawing. */
.parts {
  list-style: none;
  margin: clamp(1.75rem, 4vw, 3rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--rule);
  background: var(--rule);
}
.parts li { padding: 1rem 1.1rem 1.2rem; background: var(--paper); min-width: 0; }
.parts .no {
  display: block;
  font-family: var(--mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .14em;
  color: var(--tape);
}
.parts strong { display: block; margin-top: .45rem; font-size: 1.1rem; font-weight: 500; }
.parts .what { display: block; margin-top: .3rem; color: var(--ink-soft); font-size: .95rem; }
.parts .wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: start;
}
.report {
  margin: 0;
  padding: .8rem .9rem .9rem;
  border: 1px dashed var(--rule);
  font-family: var(--mono);
  font-size: .82rem;
  line-height: 1.5;
}
.report .cap {
  display: block;
  margin-bottom: .5rem;
  color: var(--tape);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.report .row { display: flex; justify-content: space-between; gap: 1rem; padding: .22rem 0; border-top: 1px solid var(--grid-major); }
.report .row span:last-child { text-align: right; }

/* Detail D: questions, two to a row. */
.qa {
  margin: clamp(1.75rem, 4vw, 3rem) 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem clamp(1.5rem, 4vw, 3.5rem);
}
.qa div { border-top: 1px solid var(--rule); padding-top: .9rem; min-width: 0; }
.qa dt { font-size: 1.1rem; font-weight: 500; }
.qa dd { margin: .35rem 0 0; max-width: 48ch; color: var(--ink-soft); }

@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; }
  .steps li { border-right: 0; border-bottom: 1px solid var(--rule); }
  .steps li:last-child { border-bottom: 0; }
  .offer { grid-template-columns: 1fr; }
  .parts { grid-template-columns: 1fr; }
  .parts .wide { grid-template-columns: 1fr; }
  .qa { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .sheet-head span:last-child { display: none; }
  .title-block { flex-basis: 100%; border-left: 0; }
}

/* One drawn-in moment on load. The resting state is the finished drawing. */
@media (prefers-reduced-motion: no-preference) {
  .dim-line { animation: draw .9s cubic-bezier(.2, .7, .2, 1) .15s both; }
  .dim-value { animation: fade .5s ease .75s both; }
  .dim::before, .dim::after { animation: fade .4s ease both; }
  @keyframes draw { from { transform: scaleX(0); } }
  @keyframes fade { from { opacity: 0; } }
}

/* Home page: the project index, one row per thing Perkbuilt makes. */
.home .detail { padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 6vw, 6rem); }
.projects { list-style: none; margin: 1rem 0 0; padding: 0; border: 1px solid var(--rule); background: rgba(19, 58, 112, .55); max-width: 46rem; }
.projects a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: .4rem 1.25rem;
  padding: 1rem 1.1rem;
  color: var(--ink);
  text-decoration: none;
}
.projects a:hover { background: rgba(238, 244, 255, .08); }
.projects a:focus-visible { outline: 2px solid var(--tape); outline-offset: -2px; }
.projects .name { font-family: var(--display); font-weight: 800; font-size: 1.7rem; line-height: 1; text-transform: uppercase; }
.projects .what { color: var(--ink-soft); }
.projects .go { font-family: var(--mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--tape); white-space: nowrap; }
@media (max-width: 640px) {
  .projects a { grid-template-columns: 1fr; }
}

/* Readability pass: brighter secondary text, larger body and label sizes,
   and more room to tap the footer and contact links on a phone. */
:root { --ink-soft: rgba(238, 244, 255, .86); }
.sheet-head, .tag, .links, .steps .no, .parts .no, .chip, .projects .go { font-size: .8125rem; }
.dim { font-size: clamp(.8125rem, 1.1vw, .95rem); }
.sub { font-size: clamp(1.0625rem, 1.3vw, 1.125rem); }
.steps span.what, .parts .what, .projects .what, .try, .qa dd, .price span, .gets li { font-size: 1.0625rem; }
.sms { font-size: 1rem; }
.btn { font-size: .875rem; }
.report { font-size: .9rem; }
.report .cap { font-size: .78rem; }
.cell dt { font-size: .78rem; }
.cell dd { font-size: 1rem; }
.cell dd.fine { font-size: .875rem; }
.links { padding-block: .35rem; }
.links a { display: inline-block; padding: .7rem 0; }
.cell dd:not(.fine) a { display: inline-block; padding: .5rem 0; }

/* Polish pass, Oct 2: the promise reads as a headline, the dimension line names the
   product instead of measuring it, and the included list drops numbers it never needed. */
.lede.big {
  max-width: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: .95;
  letter-spacing: .01em;
  text-transform: uppercase;
}
.dim-value { letter-spacing: .12em; text-transform: uppercase; }
.parts .no { display: none; }
.parts strong { margin-top: 0; }
@media (max-width: 640px) {
  h1, .hero.split h1 { font-size: 19.5vw; }
  .dim-value { font-size: .6875rem; letter-spacing: .08em; }
}

/* Impeccable critique pass, Oct 9: the one tappable row carries the yellow fill, the
   status chip in the title block steps back to an outlined tag, the outlined half of
   the wordmark keeps a stroke you can read in sunlight, and contact links get a full
   44px tap height. */
.cell .chip { background: transparent; color: var(--tape); box-shadow: inset 0 0 0 1px var(--tape); }
.projects .go {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  background: var(--tape);
  color: var(--tape-ink);
  font-weight: 500;
}
.projects a:hover .go { filter: brightness(1.06); }
h1 .cut { -webkit-text-stroke-width: max(1.5px, .16vw); }
@media (min-width: 1280px) { h1 .cut { -webkit-text-stroke-width: 2px; } }
.links a { padding-block: .75rem; }
.cell dd:not(.fine) a { padding-block: .625rem; }
