/* ==========================================================================
   S · The home, under the work: what I do, the ten principles of How I work,
   selected clients and a last call to talk. On the wall's thirds: the label in
   the first, the words across the other two (as in an open project), a
   hairline between.
   ========================================================================== */

.hm {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--gap);
  padding: clamp(120px, 16vh, 200px) var(--gutter) 0;
}

.hm-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  padding: 20px 0 64px;
  border-top: 1px solid var(--line);
  text-wrap: pretty;
}

.hm .ab-label { grid-column: 1; margin: 0 0 12px; }
.hm-body { grid-column: 2 / -1; min-width: 0; }
.hm-body > p,
.hm .ab-services { max-width: 580px; }

/* What I do: two even lines, never two words left on the second. */
.hm-what { text-wrap: balance; }

.hm-more { margin-top: 20px; }
.hm .ab-services { margin-top: 24px; }

/* --- The ten principles: the names, split by lines. Pointing at one shows its line on the right,
   a taste of it; the rest is on How I work. --------------------------------------------------- */

.hm-lines { margin-top: 24px; border-bottom: 1px solid var(--line); }

.hm-lines a {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: baseline;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.hm-short {
  text-wrap: pretty;
  opacity: 0;
  translate: -4px 0;
  transition: opacity 150ms ease-out, translate 200ms var(--expo-out);
}

@media (hover: hover) and (pointer: fine) {
  .hm-lines a:hover .hm-short { opacity: 1; translate: 0 0; }
}

.hm-lines a:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; border-radius: 4px; }
.hm-lines a:focus-visible .hm-short { opacity: 1; translate: 0 0; }

/* --- Selected clients ---------------------------------------------------------------- */

.hm-clients { line-height: 1.6; }
.hm-clients a { text-decoration: underline; text-decoration-color: rgb(0 0 0 / 0.15); text-underline-offset: 3px; }

@media (hover: hover) {
  .hm-clients a:hover { text-decoration-color: currentColor; }
}

/* --- The last call: Tell me about your project, with a construction helmet ------------- */

.hm-cta { padding-bottom: 0; }

.hm-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: var(--pill-h);
  margin-top: 24px;
  padding: 0 20px;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.8);
  color: #fff;
  font-size: var(--t-ui);
  transition: background-color 150ms ease-out, scale 150ms ease-out;
}

.hm-btn:active { scale: 0.97; }
.hm-btn:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }

.hm-icon svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: var(--hand-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-origin: 50% 100%;
  transition: transform 260ms var(--expo-out);
}

/* Pointing at it, or pressing it on a phone, the helmet tips up off its brim, like a hat. */
.hm-btn:active .hm-icon svg { transform: translateY(-1.5px) rotate(-12deg); }

@media (hover: hover) and (pointer: fine) {
  .hm-btn:hover { background: rgb(0 0 0 / 0.92); }
  .hm-btn:hover .hm-icon svg { transform: translateY(-1.5px) rotate(-12deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hm-icon svg { transition: none; }
  .hm-short,
  .hm-btn { transition: none; }
}

/* --- Phone ---------------------------------------------------------------------------- */

/* No pointer to show a line with, so the principles are their names. */
@media (max-width: 900px) {
  .hm { grid-template-columns: minmax(0, 1fr); padding-top: 96px; }
  .hm-row { display: block; padding-bottom: 56px; }
  .hm-lines a { grid-template-columns: minmax(0, 1fr); }
  .hm-short { display: none; }
}
