/* Clark Renders — About (about.html). Built on showcase.css, work.css and project.css.
   Two screens that step like the homepage (never loose scrolling; see about.js):
     1. a short introduction, the biography and the signature as one composition
     2. "In good company": the architects and developers worked with
   The top of screen 2 (its heading) peeks up from the bottom of screen 1, so it's never missed.
   Phones: (1) introduction and signature, (2) biography, (3) In good company. */

.a-stage {
  --peek: clamp(54px, 8.5vh, 88px);
  position: relative; flex: 1; min-height: 0; overflow: hidden;
  margin: 0 var(--pad);
}
.a-track { height: 100%; transition: transform 650ms var(--ease-move); will-change: transform; }
.a-stage[data-at="collab"] .a-track { transform: translateY(calc(-100% + var(--peek))); }
.a-stage.instant .a-track, .a-stage.instant * { transition: none !important; }
.a-panel { position: relative; }
.a-p1 { height: calc(100% - var(--peek)); }
.a-p2 { height: 100%; border-top: 1px solid var(--line); }
/* laid out exactly like Services, so moving between the two pages nothing shifts: the same two columns,
   the introduction in the same place and size, text starting at the same indent (--nw) and the same
   running-text size (--fs-intro / --fs-body / --nw are shared, in showcase.css) */
.a-wrap { height: 100%; display: flex; flex-direction: column; }

/* ---------- screen 1: introduction, biography and signature ---------- */
.a-p1 .a-wrap { padding: 0 0 clamp(20px, 4vh, 44px); }
.a-intro {
  margin: clamp(0px, 1vh, 12px) 0 0; padding-left: var(--nw); max-width: calc(40em + var(--nw));
  font-size: var(--fs-intro); line-height: 1.45; font-weight: 500;
  text-transform: none; font-stretch: 100%;
}
.a-pair {
  margin: auto 0;   /* the biography and signature sit in the middle of the space below the introduction */
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);   /* as Services */
  column-gap: 6vw; align-items: end;
}
.a-text { padding-left: var(--nw); }
.a-text p {
  margin: 0 0 1.1em; max-width: 42em;
  font-size: var(--fs-body); line-height: 1.5; font-weight: 500;
  text-transform: none; font-stretch: 100%;
}
.a-text p:last-child { margin-bottom: 0; }
/* the signature closes the biography: level with its last lines, a personal sign-off */
.a-side { display: flex; flex-direction: column; align-items: flex-start; padding-bottom: 0.2em; }
.a-sig { line-height: 0.8; }
/* the scan (media/signature.png, black strokes on transparent) takes the text colour: black in light
   mode, white in dark (switched on automatically by site.js) */
.a-sig.has-scan {
  width: clamp(220px, 20vw, 340px); aspect-ratio: 1380 / 740; background: currentColor;
  -webkit-mask: url(media/signature.png) no-repeat left center / contain;
          mask: url(media/signature.png) no-repeat left center / contain;
}
.a-sig.has-scan .a-sig-text { visibility: hidden; }
.a-sig-text {
  display: inline-block; font-family: var(--serif); font-style: italic; font-weight: 400;
  text-transform: none; font-stretch: 100%; letter-spacing: -0.02em; white-space: nowrap;
  font-size: clamp(56px, 5vw, 92px); transform: rotate(-4deg); transform-origin: left bottom;
}
.a-name { margin: 1.1em 0 0; font-size: var(--fs-state); line-height: 1; letter-spacing: -0.005em; }
.a-creds { margin: 0.7em 0 0; color: var(--soft); }

/* ---------- screen 2: In good company ---------- */
.a-p2 .a-wrap { padding: clamp(14px, 2.2vh, 24px) 0 clamp(20px, 4vh, 44px) var(--nw); }
.a-gc-h {
  display: inline-flex; align-items: center; gap: 0.6em; width: max-content;
  font-size: var(--fs-state); line-height: 1.05; letter-spacing: -0.005em; text-align: left;
}
.a-gc-h .arr { transform: rotate(90deg); transition: transform 500ms var(--ease-out); }
.a-stage[data-at="collab"] .a-gc-h .arr { transform: rotate(-90deg); }
.a-gc-intro {
  margin: 0.9em 0 0; max-width: 40em; color: var(--soft);
  font-size: var(--fs-intro); line-height: 1.45; font-weight: 500;
  text-transform: none; font-stretch: 100%;
}
.a-group { margin-top: clamp(28px, 5.5vh, 60px); }
.a-group + .a-group { margin-top: clamp(24px, 4.5vh, 48px); }
.a-glab { margin: 0 0 clamp(12px, 2vh, 18px); padding-bottom: 10px; border-bottom: 1px solid var(--line); color: var(--soft); }
.a-group ul { list-style: none; margin: 0; padding: 0; columns: 4 15em; column-gap: clamp(24px, 3vw, 48px); }
.a-group li {
  break-inside: avoid; padding-bottom: 0.55em;
  font-size: clamp(14px, 1.08vw, 16.5px); line-height: 1.3; letter-spacing: 0.005em;
  color: color-mix(in srgb, var(--ink) 82%, var(--soft));
}

/* short laptop screens: a little tighter, never cramped */
@media (min-width: 901px) and (max-height: 780px) {
  .a-text p { margin-bottom: 0.9em; }
  .a-group li { padding-bottom: 0.4em; }
}

/* ---------- phones: (1) introduction and signature, (2) biography, (3) In good company ---------- */
@media (max-width: 900px) {
  .a-stage { --peek: 52px; }
  .a-p1 .a-wrap { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); padding: 4px 0 14px; }
  .a-intro, .a-pair { grid-area: 1 / 1; }
  .a-intro { align-self: start; margin-top: 0; padding-left: 0; }
  .a-text { padding-left: 0; }
  .a-p2 .a-wrap { padding-left: 0; }
  .a-pair { margin: 0; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); min-height: 0; }
  .a-text, .a-side { grid-area: 1 / 1; }
  .a-side { align-self: start; margin-top: 8.5em; }
  .a-text { align-self: start; max-height: 100%; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; }
  .a-text::-webkit-scrollbar { display: none; }
  .a-text p { margin-bottom: 0.9em; }
  .a-intro, .a-text, .a-side { transition: opacity 450ms ease 120ms, visibility 0s; }
  .a-stage[data-at="side"] .a-text,
  .a-stage[data-at="text"] .a-intro, .a-stage[data-at="text"] .a-side { opacity: 0; visibility: hidden; transition: opacity 400ms ease, visibility 0s 400ms; }
  .a-sig.has-scan { width: 240px; }
  .a-sig-text { font-size: 64px; }
  .a-name { font-size: 22px; }
  .a-p2 .a-wrap { padding: 14px 0 12px; }
  .a-gc-h { font-size: 20px; }

  .a-group { margin-top: 22px; }
  .a-group + .a-group { margin-top: 18px; }
  .a-glab { margin-bottom: 10px; padding-bottom: 6px; }
  .a-group ul { columns: 2; column-gap: 16px; }
  .a-group li { font-size: 12.5px; padding-bottom: 0.45em; }
}
@media (prefers-reduced-motion: reduce) { .a-track, .a-intro, .a-text, .a-side { transition: none !important; } }
