/* Adam McKee Software Solutions: an architect's study model on a studio table.
   A bright studio wall, white foam-core boards with real thickness, one royal-blue acrylic piece.
   Soft daylight from the upper left. */

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

:root {
  --wall: #eeede9;           /* bright studio wall */
  --board: #ffffff;          /* foam-core face */
  --board-edge: #dddcd6;     /* foam-core thickness */
  --ink: #1a1b1e;
  --ink-soft: #56575c;       /* secondary text, 7.2:1 on white, 6.3:1 on the wall */
  --rule: #dcdbd5;
  --blue: #1f3f8f;           /* royal-blue acrylic */
  --blue-deep: #17306e;
  --on-blue: #f4f4f1;
  --on-blue-soft: #cdd6ec;   /* secondary text on blue, 6.5:1 */

  --font: "Archivo", "Segoe UI", system-ui, sans-serif;

  --gutter: clamp(1rem, 4vw, 3rem);
  --pad: clamp(2rem, 5vw, 4.5rem);

  /* Daylight from the upper left: soft shadows fall down and slightly right. */
  --board-shadow: 14px 26px 30px -22px rgb(30 30 25 / 0.32);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
  scrollbar-color: #b8b7b0 var(--wall);
}

body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  font-stretch: 100%;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--blue);
  color: var(--on-blue);
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: calc(68rem + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--board);
  color: var(--ink);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ---------- Masthead ---------- */

.masthead__inner {
  display: flex;
  align-items: center;
  padding-block: 1.75rem 1rem;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
}

.wordmark__name {
  font-size: 1.1875rem;
  font-weight: 800;
  font-stretch: 118%;
  letter-spacing: -0.01em;
}

.wordmark__trade {
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 500;
}

/* ---------- The studio table ---------- */

.hero {
  padding-block: clamp(1.5rem, 4vw, 3rem) clamp(3.5rem, 7vw, 5.5rem);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 9fr) minmax(0, 11fr);
  /* The page stops widening at about 1183px (68rem plus gutters). The gap and the photo stop
     growing just before that, so on wider screens nothing in the hero shifts. */
  gap: clamp(2rem, 4vw, 2.95rem);
  align-items: center;
}

.hero__person {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* The headshot as a print mounted on thin foam core, so it shows a narrow edge like the boards. */
.print {
  --thick: 4px;
  position: relative;
  flex: none;
  width: clamp(9rem, 17vw, 12.5rem);
  margin: 0;
  padding: 0.4rem;
  background: #fff;
  box-shadow: 0 1px 2px rgb(30 30 25 / 0.12), 4px 10px 16px -8px rgb(30 30 25 / 0.3);
}

.print img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.hero__name {
  /* The name always stays on one line. */
  white-space: nowrap;
  font-size: 1.375rem;
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1.2;
}

.hero__note {
  max-width: 20rem;
  margin-top: 0.3rem;
  color: var(--ink-soft);
  font-size: 1rem;
}

.hero h1 {
  margin-top: clamp(2rem, 4vw, 3rem);
  font-size: clamp(2.6rem, 5.4vw, 5rem);
  font-stretch: 118%;
  line-height: 1;
  letter-spacing: -0.03em;
}

.hero h1 .line {
  display: block;
}

.hero h1 .line + .line {
  color: var(--blue);
}

/* Royal-blue acrylic button: a lit top edge and a soft shadow. */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 2.25rem;
  padding: 1rem 1.5rem;
  border-radius: 6px;
  background: var(--blue);
  color: var(--on-blue);
  font-size: 1.0625rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35), 4px 10px 16px -8px rgb(23 48 110 / 0.55);
  transition: background-color 150ms var(--ease-out), transform 150ms var(--ease-out);
}

.button svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 150ms var(--ease-out);
}

.button:hover {
  background: var(--blue-deep);
}

.button:hover svg {
  transform: translateX(3px);
}

.button:active {
  transform: translateY(1px);
}

/* Section links under the button. */
.jump ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin-top: 1.5rem;
}

.jump a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-soft);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--rule);
}

.jump a:hover {
  color: var(--blue);
  text-decoration-color: currentColor;
}

/* The study model. */
.model {
  margin: 0;
}

.model picture {
  display: block;
}

/* The model runs a little past its column into the right margin, so it reads as the big object. */
.model img {
  width: calc(100% + 0.75 * var(--gutter));
  max-width: none;
  height: auto;
}

/* ---------- Foam-core boards ---------- */

.board,
.acrylic {
  --thick: 10px;
  position: relative;
  width: calc(100% - 2 * var(--gutter) - var(--thick));
  max-width: 68rem;
  margin: 0 auto clamp(3rem, 6vw, 4.5rem);
  padding: var(--pad);
}

.board {
  background: var(--board);
  box-shadow: var(--board-shadow);
}

/* The object's thickness: its bottom and right edges, away from the upper-left light,
   with mitred corners. It sits behind the face and shows past it. */
.print::after,
.board::after,
.acrylic::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  width: calc(100% + var(--thick));
  height: calc(100% + var(--thick));
  background: var(--board-edge);
  clip-path: polygon(calc(100% - var(--thick)) 0, 100% var(--thick), 100% 100%, var(--thick) 100%, 0 calc(100% - var(--thick)));
}

.board h2,
.acrylic h2 {
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-stretch: 115%;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.board__lede {
  max-width: 40rem;
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 1.1875rem;
}

/* Working together: four parts, each under a thin rule. */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem clamp(1.25rem, 3vw, 2.25rem);
  margin-top: 2.5rem;
}

.steps h3 {
  font-size: 1.1875rem;
  font-stretch: 108%;
  line-height: 1.25;
}

.steps p {
  margin-top: 0.55rem;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

/* A quiet link at the end of a board, pointing to proof elsewhere: blue because it's an action,
   with the button's sliding arrow. */
.board__more {
  margin-top: 2.5rem;
}

/* Inline, so the arrow follows the last word when the line wraps; the padding keeps a
   44px-tall tap area without changing the layout. */
.board__more a {
  padding-block: 0.7rem;
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
}

.board__more svg {
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
  margin-left: 0.4rem;
  vertical-align: -0.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 150ms var(--ease-out);
}

.board__more a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.board__more a:hover svg {
  transform: translateX(3px);
}

.fit p {
  max-width: 44rem;
}

.fit h2 + .fit__lead {
  margin-top: 1.25rem;
}

.fit__lead {
  margin-top: 0.75rem;
  font-size: 1.25rem;
  line-height: 1.5;
}

.fit__aside {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

/* Keeps a hyphenated word from breaking across lines. */
.nowrap {
  white-space: nowrap;
}

/* Testimonials. One, two, or many all work: with three or more, the first quote leads full width. */
.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 2.5rem clamp(1.5rem, 3vw, 2.5rem);
  margin-top: 2.5rem;
}

.quote {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding-top: 2.75rem;
}

/* A line divides one quote from the next, never the heading from the first. */
.quote + .quote {
  border-top: 1px solid var(--rule);
}

/* The first quote always leads, full width; the rest follow below it. A lone second quote
   takes the full width too, rather than sitting in half a row. */
.quote:first-child,
.quote:first-child + .quote:last-child {
  grid-column: 1 / -1;
}

.quote::before {
  content: "\201C";
  position: absolute;
  top: 0.35rem;
  left: -0.05rem;
  /* The grey of the model's shaded faces: blue is kept for the thing we're building. */
  color: #c9c9c3;
  font-size: 3.5rem;
  font-weight: 900;
  font-stretch: 125%;
  line-height: 1;
}

.quote blockquote {
  margin: 0 0 1.25rem;
}

.quote blockquote p {
  max-width: 46rem;
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.5;
}

/* The lead quote is set larger. */
.quote:first-child blockquote p {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
}

.quote figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5rem;
  margin-top: auto;
  font-size: 0.9375rem;
}

.quote__name {
  font-weight: 700;
}

.quote__role {
  color: var(--ink-soft);
}

/* ---------- The royal-blue acrylic panel ---------- */

.acrylic {
  container-type: inline-size;
  border-radius: 2px;
  background: var(--blue);
  color: var(--on-blue);
  box-shadow: 14px 26px 32px -22px rgb(23 48 110 / 0.6);
}

/* Acrylic glows along its cut edges: a thinner edge that runs from bright near the light
   to deep blue in the far corner, so it reads as lit material rather than an offset slab. */
.acrylic {
  --thick: 6px;
}

.acrylic::after {
  background: linear-gradient(135deg, #8aa5ec 0%, #4a6cc8 35%, var(--blue-deep) 100%);
}

.acrylic h2 {
  max-width: 16ch;
}

.acrylic p {
  max-width: 32rem;
  margin-top: 1.25rem;
  color: var(--on-blue-soft);
  font-size: 1.1875rem;
}

/* The contact form, set into the acrylic panel. Netlify collects it on deploy. */
.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
  max-width: 44rem;
  margin-top: 2.25rem;
}

/* Spam trap: hidden from people, filled in by bots. */
.contact-form__trap {
  display: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field--wide {
  grid-column: 1 / -1;
}

.field label {
  color: var(--on-blue);
  font-size: 1rem;
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.8rem 0.9rem;
  border: 0;
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1.0625rem;
  line-height: 1.5;
  /* Set slightly into the acrylic. */
  box-shadow: inset 0 2px 3px rgb(0 0 0 / 0.14);
}

.field textarea {
  min-height: 8.5rem;
  resize: vertical;
}

/* After someone has tried a field, mark what still needs fixing. */
.field input:user-invalid,
.field textarea:user-invalid {
  box-shadow: inset 0 2px 3px rgb(0 0 0 / 0.14), 0 0 0 3px #ffb7a8;
}

.send {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 1.6rem;
  border: 0;
  border-radius: 6px;
  background: var(--on-blue);
  color: var(--blue);
  font: 700 1.0625rem/1 var(--font);
  cursor: pointer;
  box-shadow: inset 0 1px 0 #fff, 4px 10px 16px -8px rgb(0 0 0 / 0.45);
  transition: background-color 150ms var(--ease-out), transform 150ms var(--ease-out);
}

.send svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 150ms var(--ease-out);
}

.send:hover {
  background: #fff;
}

.send:hover svg {
  transform: translateX(3px);
}

.send:active {
  transform: translateY(1px);
}

.send:disabled {
  cursor: progress;
  opacity: 0.75;
}

.contact-form[hidden],
.sent[hidden],
.form-error[hidden] {
  display: none;
}

.acrylic .form-error {
  max-width: none;
  margin-top: 0;
  padding: 0.75rem 1rem;
  border-radius: 3px;
  background: #fff1ee;
  color: #8a2414;
  font-size: 1rem;
  font-weight: 600;
}

/* The thank-you message that replaces the form. */
.sent {
  max-width: 44rem;
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgb(255 255 255 / 0.3);
}

.acrylic .sent__title {
  margin-top: 0;
  color: var(--on-blue);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  font-stretch: 115%;
  line-height: 1.15;
}

.sent__title:focus {
  outline: none;
}

.acrylic .sent p:not(.sent__title) {
  margin-top: 0.75rem;
}

.sent .send {
  margin-top: 1.75rem;
}

.acrylic :focus-visible {
  outline-color: var(--on-blue);
}

/* ---------- About page ---------- */

/* The page opens like the hero: the print beside a large heading, on the studio wall. */
.page-intro {
  padding-block: clamp(1.5rem, 4vw, 3rem) clamp(3rem, 6vw, 4.5rem);
}

.page-intro__inner {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.page-intro h1 {
  font-size: clamp(2.4rem, 4.6vw, 4rem);
  font-stretch: 118%;
  line-height: 1;
  letter-spacing: -0.03em;
}

.page-intro__lead {
  max-width: 38rem;
  margin-top: 1.25rem;
  font-size: 1.25rem;
  line-height: 1.5;
}

/* How I think: one question per row, lines between them. */
.calls {
  margin-top: 2rem;
}

.calls li {
  max-width: 44rem;
}

.calls li + li {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.calls h3 {
  font-size: 1.1875rem;
  font-stretch: 108%;
  line-height: 1.25;
}

.calls p {
  margin-top: 0.55rem;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

.page-prose {
  max-width: 44rem;
  margin-top: 1.25rem;
  font-size: 1.1875rem;
  line-height: 1.6;
}

/* The page's one action: the Send button's look, as a link back to the contact form. */
.send--link {
  margin-top: 2rem;
  text-decoration: none;
}

/* On phones, like the home page hero: the photo, heading, and opening paragraph are centred. */
@media (max-width: 30rem) {
  .page-intro__inner {
    flex-direction: column;
    text-align: center;
  }

  .page-intro__lead {
    margin-inline: auto;
  }
}

/* ---------- Foot ---------- */

.foot {
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.foot p {
  white-space: nowrap;
}

/* Footer links read like the section links: quiet, underlined, and tall enough to tap. */
.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--rule);
}

.foot a:hover {
  color: var(--blue);
  text-decoration-color: currentColor;
}

.foot__gap,
.foot__year {
  margin-left: 1rem;
}

/* The company name carries the footer: a touch heavier and darker than the lines around it. */
.foot__name {
  color: var(--ink);
  font-weight: 600;
}

/* The insurance note sits on its own line under the company name, a quiet line for
   anyone setting me up as a vendor. */
.foot__insured {
  display: block;
}

/* Three parts: the company name, the faith line centred between, and the links on the right.
   Equal side columns keep the middle truly centred. */
.foot__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.25rem 1.5rem;
  padding-block: 0 2rem;
}

.foot__inner > :last-child {
  justify-self: end;
}

.foot__faith abbr {
  text-decoration: none;
}

/* A Latin cross drawn in the text's own colour and weight, so it looks the same everywhere
   (a font's cross varies by device, and some phones show it as an emoji). */
.foot__cross {
  display: inline-block;
  width: 0.62em;
  height: 0.86em;
  margin-inline: 0.7em;
  vertical-align: -0.08em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
}

/* On narrower screens the three parts stack, the faith line on its own between the name and
   the links. */
@media (max-width: 52rem) {
  /* Every line gets the links' 44px tap height, so the three lines sit evenly spaced. */
  .foot__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .foot__inner > p {
    line-height: 44px;
  }

  .foot__inner > :last-child {
    justify-self: start;
  }
}

/* ---------- Narrower screens ---------- */

@media (max-width: 64rem) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Lines divide items, never a heading from the first row: the steps gain lines only
     where the grid wraps into more rows. */
  .steps li:nth-child(n + 3) {
    padding-top: 1rem;
    border-top: 1px solid var(--rule);
  }
}

@media (max-width: 52rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .model img {
    width: 100%;
    max-width: 28rem;
    margin-inline: auto;
  }

  .steps,
  .contact-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps li + li {
    padding-top: 1rem;
    border-top: 1px solid var(--rule);
  }

  /* Quotes stack on phones, so the lead quote matches the rest. */
  .quote:first-child:not(:only-child) blockquote p {
    font-size: 1.1875rem;
  }
}

@media (max-width: 30rem) {
  body {
    font-size: 1.0625rem;
  }

  .masthead__inner {
    justify-content: center;
  }

  /* The photo, name, headline, button, and links are centred. */
  .hero__text {
    text-align: center;
  }

  .hero__person {
    flex-direction: column;
  }

  .print {
    width: 12rem;
  }

  .hero__note {
    margin-inline: auto;
  }

  .jump ul {
    justify-content: center;
  }

  .fit__lead {
    font-size: 1.125rem;
    text-wrap: wrap;
  }
}

/* Very narrow phones (folding phones are about 300px wide). */
@media (max-width: 24rem) {
  :root {
    --gutter: 0.6rem;
    --pad: 1.25rem;
  }

  .wordmark {
    gap: 0.4rem;
  }

  .wordmark__name {
    font-size: 1.0625rem;
    white-space: nowrap;
  }

  .wordmark__trade {
    font-size: 0.75rem;
    white-space: nowrap;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .button {
    padding: 0.9rem 1.15rem;
    font-size: 1rem;
    white-space: nowrap;
  }

  .jump ul {
    gap: 0 1rem;
  }

  .board h2 {
    font-size: 1.75rem;
  }

  .acrylic h2 {
    font-size: 2rem;
  }
}

/* Windows high-contrast mode drops shadows; give the key objects real edges. */
@media (forced-colors: active) {
  .button,
  .send {
    border: 2px solid ButtonText;
  }

  .field input,
  .field textarea {
    border: 1px solid CanvasText;
  }

  .board,
  .acrylic {
    outline: 1px solid CanvasText;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
