/* Dexign Studio — site stylesheet
   Load tokens.css first. Every colour, font and size comes from a token;
   there are no hex values in this file.

   Contents
     1. Base
     2. Layout helpers
     3. Type helpers
     4. Buttons
     5. Header and footer
     6. Home page sections
     7. Intake form
     8. Message pages (thanks, 404)
*/

/* 1. Base ---------------------------------------------------------------- */

/* Chivo and Space Mono, served from this site (downloaded from Google Fonts,
   SIL Open Font License — see assets/fonts/OFL-*.txt). Latin subset only.
   Chivo is one variable file covering every weight in use. */
@font-face {
  font-family: 'Chivo';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/chivo-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/space-mono-400-latin.woff2') format('woff2');
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--body-size);
  font-weight: var(--w-regular);
  line-height: var(--body-leading);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

h1, h2, h3, p, ul, ol, figure, fieldset {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

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

a {
  color: var(--signal);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

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

/* Any dark ground: white type, white focus ring (blue on black is too faint). */
.on-dark {
  color: var(--on-ink);
}

.on-dark a:not(.btn) {
  color: var(--on-ink);
}

.on-dark a:not(.btn):hover {
  color: var(--on-ink-body);
}

.on-dark :focus-visible {
  outline-color: var(--on-ink);
}

[hidden] {
  display: none !important;
}

/* 2. Layout helpers ------------------------------------------------------ */

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

.wrap--narrow {
  max-width: calc(860px + 2 * var(--gutter));
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--paper);
  color: var(--ink);
  font-weight: var(--w-medium);
  transform: translateY(-120%);
}

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

/* The blue square: bullet, or full stop after a number. Radius is 28% of its size. */
.square {
  display: inline-block;
  flex: none;
  width: 15px;
  height: 15px;
  border-radius: var(--square-radius);
  background: var(--signal);
}

.square--stop {
  width: 0.5em;
  height: 0.5em;
  margin-left: 0.2em;
  vertical-align: baseline;
}

/* The mark. Ink on paper, white on dark grounds; the square is always signal blue. */
.mark {
  flex: none;
}

.mark__d {
  fill: currentColor;
}

.mark__square {
  fill: var(--signal);
}

.brand {
  display: inline-flex;
  color: var(--ink);
  /* Clearspace: 2X on every side, X being the square (a fifth of the mark). */
  padding: 0.4em;
  margin: -0.4em;
}

.on-dark .brand {
  color: var(--on-ink);
}

/* 3. Type helpers -------------------------------------------------------- */

/* Space Mono labels: uppercase, tracked, 11px, never a sentence of body copy. */
.label {
  font-family: var(--font-mono);
  font-size: var(--label-size);
  font-weight: var(--w-regular);
  letter-spacing: var(--label-tracking);
  line-height: 1.6;
  text-transform: var(--label-transform);
  color: var(--graphite);
}

.on-dark .label {
  color: var(--on-ink-label);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 24px;
  margin-bottom: clamp(32px, 4vw, 52px);
  padding-top: 14px;
  border-top: 1px solid var(--line-strong);
}

.on-dark .section-head {
  border-top-color: var(--on-ink);
}

.section-head__num {
  font-family: var(--font-mono);
  font-size: var(--label-size);
  letter-spacing: var(--label-tracking);
  color: var(--graphite);
}

.on-dark .section-head__num {
  color: var(--on-ink-label);
}

.section-head__label {
  font-size: 12px;
  font-weight: var(--w-medium);
  letter-spacing: 0.2em;
  line-height: 1.6;
  text-transform: uppercase;
}

.section-head__aside {
  margin-left: auto;
}

/* 4. Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 20px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 14px;
  font-weight: var(--w-medium);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.btn--lg {
  padding: 15px clamp(20px, 4vw, 28px);
  font-size: 16px;
}

.btn--xl {
  padding: 18px 34px;
  font-size: 18px;
}

/* White on signal blue is only allowed at 18px+ or bold, so blue buttons are bold. */
.btn--signal {
  background: var(--signal);
  color: var(--on-ink);
  font-weight: var(--w-bold);
}

.btn--signal:hover {
  background: var(--paper);
  color: var(--ink);
}

.btn--ghost {
  background: transparent;
  border-color: var(--graphite);
  color: var(--on-ink);
}

.btn--ghost:hover {
  border-color: var(--on-ink);
  color: var(--on-ink);
}

.btn--outline {
  background: var(--paper);
  border-color: var(--ink);
  color: var(--ink);
}

.btn--outline:hover {
  background: var(--ink);
  color: var(--on-ink);
}

.btn--paper {
  background: var(--paper);
  color: var(--ink);
}

.btn--paper:hover {
  background: var(--ink);
  color: var(--on-ink);
}

.btn:disabled {
  cursor: progress;
  opacity: 0.7;
}

/* 5. Header and footer --------------------------------------------------- */

.site-header {
  background: var(--ink);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 14px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 clamp(14px, 2.4vw, 30px);
}

.nav__link {
  display: inline-block;
  padding-block: 12px;
  font-size: 14px;
  text-decoration: none;
}

.on-dark .nav__link {
  color: var(--on-ink-body);
}

.on-dark .nav__link:hover {
  color: var(--on-ink);
}

/* On a phone the whole header would take a fifth of the screen, so it only
   sticks once there is room for it on one line. */
@media (min-width: 720px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 20;
  }

  .site-header__inner {
    padding-block: clamp(14px, 1.8vw, 20px);
  }
}

@media (max-width: 719px) {
  html { scroll-padding-top: 0; }
}

/* On a phone the same button sits directly below in the hero, and the
   header does not stick, so the header keeps to one row without it. */
@media (max-width: 559px) {
  .nav__cta { display: none; }
}

.site-footer {
  background: var(--ink);
  padding-block: clamp(32px, 4vw, 48px);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-footer__credit {
  display: flex;
  align-items: center;
  gap: 13px;
}

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.social a {
  font-family: var(--font-mono);
  font-size: var(--label-size);
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  text-decoration: none;
}

.on-dark .social a {
  color: var(--on-ink-label);
}

.on-dark .social a:hover {
  color: var(--on-ink);
}

/* 6. Home page sections -------------------------------------------------- */

.hero {
  background: var(--ink);
  padding-block: clamp(48px, 8vw, 120px) clamp(40px, 6vw, 88px);
}

/* Home page: the desk scene (assets/js/desk.js) stays fixed behind the hero, which is a window on to it. */
.hero--desk {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: clamp(560px, calc(100svh - 72px), 900px);
  clip-path: inset(0);
}

.hero--desk > .wrap {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero__scene {
  position: fixed;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}

.hero__scene.is-live {
  opacity: 1;
}

.hero__scene canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Keeps the words readable: ink behind the headline and along the bottom, clear over the desk. */
.hero--desk::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--ink) 0%, color-mix(in srgb, var(--ink) 70%, transparent) 40%, transparent 66%),
    linear-gradient(0deg, var(--ink) 0%, color-mix(in srgb, var(--ink) 80%, transparent) 30%, transparent 58%);
}

@media (max-width: 719px) {
  .hero--desk::after {
    background: linear-gradient(0deg, var(--ink) 0%, color-mix(in srgb, var(--ink) 86%, transparent) 55%, transparent 80%);
  }
}

.hero__title {
  margin-bottom: clamp(32px, 5vw, 56px);
  font-size: var(--hero-size);
  font-weight: var(--w-medium);
  letter-spacing: var(--hero-tracking);
  line-height: var(--hero-leading);
}

.hero__foot {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr));
  align-items: end;
  gap: clamp(24px, 4vw, 56px);
  padding-top: clamp(24px, 3vw, 36px);
  border-top: 1px solid var(--line-ink);
}

.hero__sub {
  max-width: 40ch;
  font-size: clamp(18px, 2.2vw, 25px);
  font-weight: var(--w-light);
  line-height: 1.45;
  color: var(--on-ink-body);
}

.hero__side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section {
  padding-block: var(--section-y);
}

.section--follow {
  padding-top: 0;
}

.section--ink {
  background: var(--ink);
}

.section__note {
  max-width: 60ch;
  margin-top: clamp(32px, 4vw, 52px);
  color: var(--graphite);
}

/* Bordered cell grid: services and pricing */
.cells {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.cell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(28px, 3.4vw, 40px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cells--services .cell {
  min-height: 240px;
}

.cell__title {
  font-size: clamp(21px, 2.4vw, 26px);
  font-weight: var(--w-medium);
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.cell__body {
  max-width: var(--body-measure);
  line-height: 1.6;
  color: var(--graphite);
}

.price-card {
  gap: 18px;
}

.price-card__name {
  font-size: clamp(20px, 2.3vw, 24px);
  font-weight: var(--w-medium);
  letter-spacing: -0.015em;
  line-height: 1.2;
}

/* The job the offer does, said first; the note below lists what is in it. */
.price-card__for {
  max-width: var(--body-measure);
  font-weight: var(--w-medium);
  line-height: 1.5;
  color: var(--ink);
}

.price-card__price {
  margin-top: -10px;
  font-size: clamp(28px, 3.6vw, 38px);
  font-weight: var(--w-medium);
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}

.section__note a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Home page: the prompt that sends people to /work/ */
.work-prompt {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: clamp(24px, 4vw, 48px);
}

.work-prompt__title {
  font-size: clamp(48px, 7.4vw, 112px);
  font-weight: var(--w-medium);
  letter-spacing: var(--display-tracking);
  line-height: 1;
}

.work-prompt__body {
  max-width: 44ch;
  margin-top: 16px;
  color: var(--graphite);
}

/* Work page: one block per brand. Each brand's colours and its pieces' positions are in work.css. */
.work-brand {
  position: relative;
  padding-block: clamp(140px, 18vw, 260px) var(--section-y);
  content-visibility: auto;
  contain-intrinsic-size: auto 1300px;
}

/* Each block fades in from the colour before it. Text starts below the fade. */
.work-brand::before,
.work-after::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: clamp(120px, 16vw, 240px);
  background: var(--brand-fade);
}

.work-brand > .wrap,
.work-after > .wrap {
  position: relative;
}

.work-brand .label {
  color: var(--brand-label);
}

.work-brand__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 48px;
  margin-bottom: clamp(28px, 4vw, 56px);
  padding-top: 20px;
  border-top: 1px solid var(--brand-rule);
}

.work-brand__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--label-tracking);
  color: var(--brand-label);
}

.work-brand__stop {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 4px;
  border-radius: var(--square-radius);
  background: var(--brand-stop);
}

.work-brand__title {
  margin-top: 12px;
  font-size: clamp(44px, 7.4vw, 104px);
  font-weight: var(--w-medium);
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.work-brand__what {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 460px;
}

/* What was made, as stops along a route: a square, the name, then a rule to the next. */
.route {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  line-height: 1.55;
  color: var(--brand-label);
}

.route__stop {
  display: flex;
  align-items: center;
  gap: 8px;
}

.route__stop::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: var(--square-radius);
  background: var(--brand-stop);
}

.route__stop:not(:last-child)::after {
  content: "";
  width: 22px;
  height: 1px;
  margin-right: 8px;
  background: var(--brand-rule);
}

/* A rail down each brand. It fills as you scroll through, where the browser can do that. */
.work-brand > .wrap::before,
.work-brand > .wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--gutter) / 2 - 1px);
  width: 2px;
  background: var(--brand-rule);
}

.work-brand > .wrap::after {
  background: var(--brand-stop);
  transform-origin: top;
}

@keyframes rail-fill {
  from { scale: 1 0; }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .work-brand > .wrap::after {
      animation: rail-fill linear both;
      animation-timeline: view();
      animation-range: entry 45% exit 55%;
    }
  }
}

.collage {
  position: relative;
  width: 100%;
}

.piece {
  position: absolute;
  margin: 0;
  overflow: hidden;
  border-radius: var(--img-radius);
  box-shadow: var(--brand-shadow);
}

.piece--flat {
  box-shadow: none;
}

.piece a {
  color: inherit;
}

.piece--band {
  overflow: hidden;
}

.piece img,
.piece video {
  display: block;
  width: 100%;
  height: auto;
}

.piece--band picture,
.piece--band img {
  display: block;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 719px) {
  .work-brand .collage {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 10px;
    aspect-ratio: auto !important; /* work.css sets the desktop shape */
  }

  .work-brand .piece {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    height: auto;
    transform: none;
  }

  .work-brand .piece--wide {
    grid-column: 1 / -1;
  }

  .work-brand .piece--phone-hide {
    display: none;
  }

  .piece--band picture,
  .piece--band img {
    height: auto;
  }
}

/* A brand's palette and type */
.brand-spec {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr));
  gap: 44px 64px;
  margin-top: clamp(40px, 6vw, 88px);
  padding-top: 24px;
  border-top: 1px solid var(--brand-rule);
}

.brand-spec__title {
  margin-bottom: 20px;
  font-weight: var(--w-regular);
}

.swatches {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  list-style: none;
}

.swatch {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.swatch__chip {
  aspect-ratio: 3 / 4;
  margin-bottom: 8px;
  box-shadow: inset 0 0 0 1px var(--brand-rule);
}

.swatch__name {
  font-size: 14px;
  font-weight: var(--w-medium);
  line-height: 1.3;
}

.swatch__hex {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--brand-label);
  overflow-wrap: anywhere;
}

.specimens {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 0;
  list-style: none;
}

.specimen {
  margin-bottom: 4px;
}

.specimen--script {
  font-family: 'Pacifico', cursive;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.25;
}

.specimen--head {
  font-family: 'Poppins', Helvetica, Arial, sans-serif;
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.specimen--body {
  max-width: 46ch;
  font-family: 'Poppins', Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

.work-after {
  position: relative;
  padding-top: clamp(140px, 18vw, 260px);
}

/* Links to each brand, in the work page's hero */
.work-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  max-width: 560px;
  padding: 0;
  list-style: none;
  font-size: 15px;
  font-weight: var(--w-medium);
}

.work-jump a {
  display: flex;
  align-items: center;
  min-height: 44px;
}

/* Footer badges */
.tool-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
  max-width: 720px;
  padding: 0;
  list-style: none;
}

.tool-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--on-ink);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.tool-badge img {
  display: block;
  width: 16px;
  height: 16px;
}

@media (max-width: 719px) {
  .tool-badges {
    justify-content: flex-start;
  }
}

/* Skills and tools */
.tool-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
  gap: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 36px);
  padding: 0;
  list-style: none;
}

.tool-group__items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  padding: 0;
  list-style: none;
  color: var(--on-ink-body);
}

/* Full service list */
.menu-group {
  content-visibility: auto;
  contain-intrinsic-size: auto 520px;
}

.menu-group + .menu-group {
  margin-top: clamp(36px, 5vw, 56px);
}

.menu-group__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 24px;
  margin-bottom: 12px;
}

.menu-group__title {
  font-size: var(--headline-size);
  font-weight: var(--w-medium);
  letter-spacing: var(--headline-tracking);
  line-height: var(--headline-leading);
}

.menu {
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}

.menu__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 24px;
  padding-block: 14px;
  border-top: 1px solid var(--line);
}

.menu__name {
  font-weight: var(--w-medium);
}

.menu__price {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: var(--label-tracking);
  text-align: right;
  text-transform: uppercase;
}

.menu__note {
  grid-column: 1 / -1;
  max-width: var(--body-measure);
  line-height: 1.5;
  color: var(--graphite);
}

@media (max-width: 559px) {
  .menu__item {
    grid-template-columns: minmax(0, 1fr);
  }

  .menu__price {
    text-align: left;
  }
}

.menu-terms {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: var(--body-measure);
  margin-top: clamp(32px, 4vw, 52px);
  padding: 0;
  list-style: none;
  color: var(--graphite);
}

/* Process steps */
/* Process steps, as a roadmap: one line through all five, a blue square at each stop. */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: clamp(32px, 4vw, 48px) 0;
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 30px clamp(20px, 2.4vw, 36px) 0 0;
}

.step::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--on-ink-label);
  transform-origin: left top;
}

.step::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 11px;
  height: 11px;
  border-radius: var(--square-radius);
  background: var(--signal);
}

@media (max-width: 719px) {
  .steps {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .step {
    padding: 0 0 36px 32px;
  }

  .step:last-child {
    padding-bottom: 0;
  }

  .step::before {
    right: auto;
    bottom: 0;
    left: 5px;
    width: 1px;
    height: auto;
  }

  .step::after {
    top: 2px;
  }
}

/* The number is set in the label grey; blue text on ink fails contrast, so the
   blue lives in the square full stop after it instead. */
.step__num {
  font-family: var(--font-mono);
  font-size: var(--label-size);
  letter-spacing: var(--label-tracking);
  color: var(--on-ink-label);
}

.step__title {
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: var(--w-medium);
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.step__body {
  line-height: 1.6;
  color: var(--on-ink-body);
}

/* Start a project: the one blue ground on the page. White type at 18px and up. */
.cta {
  background: var(--signal);
  padding-block: var(--section-y);
}

.cta__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  align-items: end;
  gap: clamp(32px, 5vw, 64px);
}

.cta__title {
  font-size: clamp(38px, 6.4vw, 76px);
  font-weight: var(--w-medium);
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.cta__body {
  max-width: 40ch;
  margin-top: 20px;
  font-size: clamp(18px, 2vw, 21px);
  font-weight: var(--w-light);
  line-height: 1.5;
}

.cta__side {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.cta__contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 18px;
  line-height: 1.5;
}

/* 7. Intake form --------------------------------------------------------- */

.page-stone {
  background: var(--stone);
}

.page-header {
  background: var(--ink);
  padding-block: clamp(28px, 5vw, 64px);
}

.page-header__inner {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 40px);
}

.page-header__text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-header__title {
  font-size: clamp(30px, 5.4vw, 56px);
  font-weight: var(--w-medium);
  letter-spacing: -0.03em;
  line-height: 1;
}

.page-header__intro {
  max-width: 56ch;
  font-size: clamp(17px, 1.9vw, 19px);
  font-weight: var(--w-light);
  line-height: 1.55;
  color: var(--on-ink-body);
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
}

.page-main {
  padding-block: clamp(28px, 5vw, 56px) 80px;
}

.intake {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 28px);
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: clamp(24px, 4vw, 44px);
  background: var(--paper);
  border: 1px solid var(--line);
}

.panel--ink {
  background: var(--ink);
  border-color: var(--ink);
  gap: 24px;
}

.section-head--panel {
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 14px;
  border-top: 0;
  border-bottom: 1px solid var(--line-strong);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 0;
  border: 0;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 22px;
}

.field__label {
  font-family: var(--font-mono);
  font-size: var(--label-size);
  letter-spacing: var(--label-tracking);
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--graphite);
}

.field__question {
  float: none;
  padding: 0;
  font-size: 17px;
  font-weight: var(--w-medium);
  line-height: 1.4;
}

.field__help {
  max-width: var(--body-measure);
  font-size: 15px;
  line-height: 1.5;
  color: var(--graphite);
}

.field__help + .input,
.field__help + .chips,
.field__help + .field-grid,
.field__help + .picker {
  margin-top: 4px;
}

/* Field borders use the lighter grey: it clears the 3:1 contrast needed to see a field. */
.input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--label);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.55;
}

textarea.input {
  resize: vertical;
}

.input::placeholder {
  color: var(--label);
  opacity: 1;
}

.input:focus-visible {
  outline-offset: -2px;
  border-color: var(--signal);
}

.input--file {
  padding: 10px;
  font-size: 15px;
}

/* Chips are real checkboxes and radio buttons, so they work without JavaScript. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  position: relative;
  display: inline-flex;
}

.chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.chip__text {
  display: inline-block;
  padding: 11px 17px;
  border: 1px solid var(--label);
  background: var(--paper);
  color: var(--graphite);
  font-size: 15px;
  line-height: 1.2;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.chip:hover .chip__text {
  border-color: var(--ink);
  color: var(--ink);
}

/* Selected: white on blue, bold (the brand's rule for small type on blue). */
.chip input:checked + .chip__text {
  border-color: var(--signal);
  background: var(--signal);
  color: var(--on-ink);
  font-weight: var(--w-bold);
}

.chip input:focus-visible + .chip__text {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

/* Image picker (added by intake.js) */
.picker {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.picker__meter {
  margin: 0;
}

.picker__message {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}

.picker__message:empty {
  display: none;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr));
  gap: 12px;
  width: 100%;
}

.thumb {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.thumb__media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--stone);
}

.thumb__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb__name {
  overflow: hidden;
  font-size: 14px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thumb__remove {
  align-self: flex-start;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--signal);
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}

.thumb__remove:hover {
  color: var(--ink);
}

.submit__title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: var(--w-medium);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.submit__body {
  max-width: 56ch;
  margin-top: -14px;
  line-height: 1.55;
  color: var(--on-ink-body);
}

.submit__status {
  max-width: 56ch;
  line-height: 1.55;
}

.submit__status:empty {
  display: none;
}

.submit__direct {
  max-width: 56ch;
  line-height: 1.55;
  color: var(--on-ink-body);
}

.submit__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line-ink);
}

.submit__foot a.label {
  text-decoration: none;
}

/* 8. Message pages (thanks, 404) ----------------------------------------- */

.page-ink {
  min-height: 100vh;
  background: var(--ink);
}

.message {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding-block: clamp(48px, 10vw, 140px);
}

.message .brand {
  margin-bottom: clamp(24px, 5vw, 56px);
}

.message__title {
  font-size: var(--display-size);
  font-weight: var(--w-medium);
  letter-spacing: var(--display-tracking);
  line-height: var(--display-leading);
}

.message__body {
  max-width: 40ch;
  font-size: var(--subhead-size);
  font-weight: var(--subhead-weight);
  line-height: var(--subhead-leading);
  color: var(--on-ink-body);
}

/* Six services: three across on desktop, two on a tablet, one on a phone. */
.cells--services,
.cells--pricing {
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}

/* ---- Scroll reveals. reveal.js adds .anim to <html> and .is-in as each thing scrolls into view.
   Without JavaScript, or with reduced motion, nothing here applies and everything is simply there. */
.anim .cell .square {
  scale: 0;
  transition: scale 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) var(--d, 0s);
}

.anim .cell > :not(.square),
.anim .step > * {
  opacity: 0;
  translate: 0 14px;
  transition: opacity 0.5s ease calc(var(--d, 0s) + 0.35s), translate 0.5s ease calc(var(--d, 0s) + 0.35s);
}

.anim .cell.is-in .square {
  scale: 1;
}

.anim .cell.is-in > *,
.anim .step.is-in > * {
  opacity: 1;
  translate: 0;
}

/* The roadmap: the square lands, the line runs to the next stop, then the words. */
.anim .step::after {
  scale: 0;
  transition: scale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) var(--d, 0s);
}

.anim .step::before {
  scale: 0 1;
  transition: scale 0.55s ease calc(var(--d, 0s) + 0.15s);
}

.anim .step.is-in::after,
.anim .step.is-in::before {
  scale: 1;
}

/* Work page: each piece settles in, and the route of what was made fills stop by stop. */
.anim .piece,
.anim .work-brand__title,
.anim .brand-spec {
  opacity: 0;
  translate: 0 28px;
  transition: opacity 0.6s ease, translate 0.6s ease, scale 0.6s ease;
}

.anim .piece {
  scale: 0.95;
}

.anim .piece.is-in,
.anim .work-brand__title.is-in,
.anim .brand-spec.is-in {
  opacity: 1;
  translate: 0;
  scale: 1;
}

.anim .route__stop {
  opacity: 0;
  transition: opacity 0.4s ease var(--d, 0s);
}

.anim .route__stop::before {
  scale: 0;
  transition: scale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) var(--d, 0s);
}

.anim .route.is-in .route__stop {
  opacity: 1;
}

.anim .route.is-in .route__stop::before {
  scale: 1;
}

.route__stop:nth-child(2) { --d: 0.12s; }
.route__stop:nth-child(3) { --d: 0.24s; }
.route__stop:nth-child(4) { --d: 0.36s; }
.route__stop:nth-child(5) { --d: 0.48s; }
.route__stop:nth-child(6) { --d: 0.6s; }
.route__stop:nth-child(7) { --d: 0.72s; }
.route__stop:nth-child(8) { --d: 0.84s; }
.route__stop:nth-child(n + 9) { --d: 0.96s; }

/* Side by side, things arrive left to right. Stacked on a phone, each arrives as you reach it. */
@media (min-width: 720px) {
  .cell:nth-child(3n + 2) { --d: 0.12s; }
  .cell:nth-child(3n) { --d: 0.24s; }
  .step:nth-child(2) { --d: 0.45s; }
  .step:nth-child(3) { --d: 0.9s; }
  .step:nth-child(4) { --d: 1.35s; }
  .step:nth-child(5) { --d: 1.8s; }
}

@media (max-width: 719px) {
  .anim .step::before {
    scale: 1 0;
  }

  .anim .step.is-in::before {
    scale: 1;
  }
}

/* ---- Vision board (work page): pieces pinned on a dark wall. Where each one sits is in work.css.
   With a cursor, the wall leans towards it, a light follows it, and the piece under it lifts off. */
.board {
  padding-block: clamp(8px, 2vw, 24px) clamp(48px, 7vw, 96px);
  background: var(--ink);
}

.board__label {
  margin-bottom: clamp(20px, 3vw, 36px);
  padding-top: 20px;
  border-top: 1px solid var(--line-ink);
  color: var(--on-ink-label);
}

.board__wall {
  position: relative;
  perspective: 1500px;
}

.board__pins {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.3s ease-out;
}

.pin,
.note {
  position: absolute;
  transform: translateZ(var(--z, 0)) rotate(var(--rot, 0deg));
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.35s ease, opacity 0.5s ease, scale 0.5s ease;
}

.pin {
  box-shadow: 0 10px 24px color-mix(in srgb, var(--ink) 70%, transparent);
}

.pin a,
.pin img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

/* The pushpin is the blue square. */
.pin::after {
  content: "";
  position: absolute;
  top: -5px;
  left: calc(50% - 6px);
  width: 12px;
  height: 12px;
  border-radius: var(--square-radius);
  background: var(--signal);
  box-shadow: 0 2px 4px color-mix(in srgb, var(--ink) 60%, transparent);
}

.pin:hover,
.pin:focus-within {
  z-index: 5;
  transform: translateZ(110px) rotate(0deg) scale(1.05);
}

.note {
  display: grid;
  place-items: center;
  width: 7.4%;
  aspect-ratio: 1;
  border-radius: var(--square-radius);
  background: var(--signal);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--ink) 60%, transparent);
  color: var(--on-ink);
  font-size: clamp(9px, 1.05vw, 15px);
  font-weight: var(--w-bold);
  letter-spacing: -0.01em;
  --z: 60px;
}

/* The light: everything dims a little and the cursor carries a pool of light across the wall. */
.board__wall::after {
  content: "";
  position: absolute;
  inset: -6%;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), transparent 0, transparent 14%, color-mix(in srgb, var(--ink) 62%, transparent) 46%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.board__wall.is-lit::after {
  opacity: 1;
}

.anim .pin,
.anim .note {
  opacity: 0;
  scale: 1.12;
}

.anim .pin.is-in,
.anim .note.is-in {
  opacity: 1;
  scale: 1;
}

/* On a phone the wall becomes three columns of pinned pieces. */
@media (max-width: 719px) {
  .board .board__pins {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 14px 10px;
    aspect-ratio: auto;
  }

  .board .pin {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
  }

  .board .note {
    display: none;
  }
}
