/* About page: intro, founders, how we work, design techniques and people.
   Loaded after css/site.css, which holds the banner, section bar and shared section pieces. */

/* ---------- Intro statement ----------
   A wide statement, then a ruled row: a serif lead on the left; the approach and
   what the studio does and designs on the right. */
.about-intro {
  padding: clamp(80px, 9vw, 140px) 0 clamp(16px, 2vw, 32px);
}
.about-statement {
  margin: 0;
  max-width: 28ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 3.6vw + .75rem, 4.75rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
.about-intro-foot {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 32px;
  row-gap: 32px;
  margin-top: clamp(48px, 6vw, 88px);
  padding-top: clamp(28px, 3vw, 44px);
}
.about-lead {
  grid-column: 1 / 7;
  margin: 0;
  max-width: 33ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.375rem, 1vw + 1rem, 1.875rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: pretty;
}
.about-detail { grid-column: 8 / 13; }
.about-sub {
  margin: 0;
  max-width: 34rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.about-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
  max-width: 34rem;
  margin: clamp(28px, 3vw, 40px) 0 0;
}
.about-facts .ruled { padding-top: 16px; }
.about-facts dd {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--ink);
}
.about-facts dt + dd { margin-top: 10px; }

/* ---------- 01 Founders ----------
   The founders side by side: a portrait each, with the name and role on a ruled caption below it. */
.founders-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(20px, 4vw, 64px);
  row-gap: 56px;
}
.founder {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.founder:nth-child(even) { --d: .12s; }

.founder-media {
  position: relative;
  margin: 0;
  aspect-ratio: 5 / 6;
  overflow: hidden;
  background: var(--plaster);
}
/* Stands in for a founder's portrait until the photograph is ready */
.founder-media--pending {
  display: grid;
  place-items: center;
  border: 1px solid #dcd6ce;
}
.founder-media--pending span {
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 300;
  letter-spacing: .04em;
  color: var(--stone);
}
.founder-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  /* The same warm grey tone as the rest of the page; colour comes back on hover */
  filter: grayscale(1) sepia(.16) contrast(1.02);
  transition: filter .8s ease, transform 1.4s var(--ease-out);
}
/* Keeps the reveal from site.css alongside the hover fade */
.js .founder-media img {
  transition: filter .8s ease, transform 1.4s var(--ease-out), clip-path 1.4s var(--ease-out) var(--d, 0s), scale 1.9s var(--ease-out) var(--d, 0s);
}
@media (hover: hover) {
  .founder:hover .founder-media img { filter: none; transform: scale(1.03); }
}

/* Caption: name on the left, role on the right, on a rule under the portrait */
.founder-body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  margin-top: clamp(18px, 1.8vw, 24px);
  padding-top: clamp(16px, 1.6vw, 22px);
  border-top: 1px solid var(--line);
}
.founder-body .founder-role { order: 2; margin: 0; }
.founder-body .founder-name { order: 1; }
.founder-role {
  margin: 0 0 14px;
  font: 500 0.75rem/1.4 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--olive);
}
.founder-name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 1.6vw + 1.1rem, 3.125rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.founder-quote {
  position: relative;
  margin: clamp(28px, 3vw, 40px) 0 0;
  padding-left: 28px;
  border-left: 1px solid var(--olive);
}
.founder-quote p {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.375rem, 1vw + .95rem, 1.75rem);
  line-height: 1.35;
  color: var(--ink);
  text-wrap: pretty;
}

.founder-bio {
  margin: clamp(24px, 2.6vw, 32px) 0 0;
  max-width: 34rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

.founder-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
  max-width: 34rem;
  margin: clamp(28px, 3vw, 40px) 0 0;
}
.founder-facts .ruled { padding: 16px 0 4px; }
.founder-facts dt,
.about-facts dt {
  font: 500 0.6875rem/1.4 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--stone);
}
.founder-facts dd {
  margin: 6px 0 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink);
}

/* ---------- 02 How we work ----------
   Dark band: heading, note and a photograph on the left (held in view while you read),
   numbered principles on the right. */
.how-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 32px;
  row-gap: 56px;
}
/* The aside runs the full height of the list, so its photograph can stay pinned while the heading scrolls away */
.how-aside {
  grid-column: 1 / 6;
  align-self: stretch;
}
.how-intro {
  margin: clamp(20px, 2.4vw, 28px) 0 0;
  max-width: 28rem;
  font-family: var(--serif);
  font-size: clamp(1.125rem, .5vw + .9rem, 1.3125rem);
  line-height: 1.5;
  color: rgba(236, 233, 227, .84);
}
.how-media {
  position: relative;
  margin: clamp(32px, 4vw, 48px) 0 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #2a2c26;
}
.how-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(.35) sepia(.12) brightness(.92);
}
.how-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 22, 18, 0) 55%, rgba(20, 22, 18, .65) 100%);
  pointer-events: none;
}
.how-media figcaption {
  position: absolute;
  z-index: 4;
  left: clamp(16px, 2vw, 24px);
  right: clamp(16px, 2vw, 24px);
  bottom: clamp(18px, 2.2vw, 26px);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, .88);
}
.how-media::after { z-index: 3; }

/* One photograph per value, stacked. The one on show wipes in over the last, from below when you scroll
   down and from above when you scroll back up, and settles from a slight zoom. */
/* Heading and intro sit above both columns, so the drawing and the first value start level */
.how-head .how-intro { margin: 0; }
.how-head + .how-grid { margin-top: 0; }
.how-media {
  margin-top: 0;
  position: sticky;
  top: calc(var(--header-h) + 40px);
  aspect-ratio: 4 / 3;
  max-height: calc(100vh - var(--header-h) - 80px);
  width: 100%;
}
.how-slides { position: absolute; inset: 0; }
.how-media .how-slide {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.js .how-media .how-slide {
  clip-path: inset(100% 0 0 0);
  scale: 1.14;
  transition: clip-path 1.1s var(--ease-out), scale 1.8s var(--ease-out);
}
.js .how-media[data-dir="up"] .how-slide { clip-path: inset(0 0 100% 0); }
.js .how-media.is-in .how-slide.is-active,
.js .how-media.is-in .how-slide.was-active { clip-path: inset(0 0 0 0); scale: 1; }
.how-media .how-slide.was-active { z-index: 1; }
.how-media .how-slide.is-active { z-index: 2; }
html:not(.js) .how-slide + .how-slide { display: none; }

/* Each slide is a line drawing on a faint drafting grid */
.how-media .how-slide {
  display: grid;
  place-items: center;
  background-color: #23251f;
  background-image:
    linear-gradient(rgba(236, 233, 227, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(236, 233, 227, .045) 1px, transparent 1px);
  background-size: 20px 20px;
}
.how-art {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: rgba(236, 233, 227, .86);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.how-art .a { stroke: #c9d1a8; }
.how-art .dash { stroke: #c9d1a8; stroke-dasharray: 3 4; opacity: .8; }
.how-art .dash.faint { stroke: rgba(236, 233, 227, .5); opacity: .55; }
.how-art text {
  fill: #c9d1a8;
  stroke: none;
  font: 500 8.5px/1 var(--sans);
  letter-spacing: .14em;
}
/* On show, the lines draw themselves in one after another, then the guide lines and labels fade up */
.js .how-media .how-art .ln { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.js .how-media .how-art .dash,
.js .how-media .how-art text { opacity: 0; }
.js .how-media.is-in .how-slide.is-active .how-art .ln,
.js .how-media.is-in .how-slide.was-active .how-art .ln {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.6s var(--ease-out) calc(.25s + min(var(--i, 0) * 35ms, 1.2s));
}
.js .how-media.is-in .how-slide.is-active .how-art .dash,
.js .how-media.is-in .how-slide.was-active .how-art .dash { opacity: .8; transition: opacity .9s ease .9s; }
.js .how-media.is-in .how-slide.is-active .how-art .dash.faint,
.js .how-media.is-in .how-slide.was-active .how-art .dash.faint { opacity: .55; }
.js .how-media.is-in .how-slide.is-active .how-art text,
.js .how-media.is-in .how-slide.was-active .how-art text { opacity: 1; transition: opacity .9s ease 1.1s; }

.how-caption {
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.how-count {
  flex: none;
  font: 500 0.75rem/1 var(--sans);
  letter-spacing: .1em;
  color: #d3dabb;
  font-variant-numeric: tabular-nums;
}
.how-caption-text { transition: opacity .3s ease, transform .5s var(--ease-out); }
.how-caption-text.is-out { opacity: 0; transform: translateY(6px); }

/* A thin bar per value along the foot of the photograph; the current one is filled */
.how-progress {
  position: absolute;
  z-index: 4;
  left: clamp(16px, 2vw, 24px);
  right: clamp(16px, 2vw, 24px);
  bottom: 10px;
  display: flex;
  gap: 6px;
}
.how-progress span {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, .22);
  overflow: hidden;
}
.how-progress span::after {
  content: "";
  display: block;
  height: 100%;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .8s var(--ease-out);
}
.how-progress span.is-on::after { transform: scaleX(1); }

/* The value being read stands out; the rest step back until you reach them */
.how-title,
.how-num { transition: color .6s ease, opacity .6s ease; }
.js .how-list.is-tracking .how-item:not(.is-current) .how-title { color: rgba(236, 233, 227, .42); }
.js .how-list.is-tracking .how-item:not(.is-current) .how-num { opacity: .45; }
.js .how-list.is-tracking .how-item.is-current .how-text { color: rgba(236, 233, 227, .84); }
.js .how-list.is-tracking .how-item.is-current .how-body { transform: translateX(8px); }

/* On small screens the photograph can't stay in view, so each value carries its own */
.how-thumb { display: none; }

.how-main { grid-column: 7 / 13; }
.how-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: how;
}
.how-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  column-gap: 16px;
  padding: clamp(28px, 3vw, 40px) 0 clamp(32px, 3.4vw, 44px);
}
.how-item:last-child { padding-bottom: clamp(36px, 4vw, 52px); }
.how-num {
  padding-top: .55em;
  font: 500 0.75rem/1 var(--sans);
  letter-spacing: .1em;
  color: #b7c09a;
  font-variant-numeric: tabular-nums;
}
.how-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.625rem, 1.2vw + 1rem, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.how-text {
  margin: 12px 0 0;
  max-width: 34rem;
  font-size: 0.96875rem;
  line-height: 1.65;
  color: var(--night-soft);
  transition: color .5s ease;
}
.how-body { transition: transform .7s var(--ease-out); }
@media (hover: hover) {
  .how-item:hover .how-body { transform: translateX(8px); }
  .how-item:hover .how-text { color: rgba(236, 233, 227, .84); }
}
.how-more {
  padding-top: clamp(28px, 3vw, 36px);
  border-top: 1px solid var(--night-line);
}

/* ---------- 03 Design techniques ----------
   A ruled grid of the eight design process steps on a plaster band. Each line icon redraws on hover. */
.techniques { background: var(--plaster); }
/* The call to action has no top padding of its own (it expects a paper section above), so give it room here */
.techniques + .cta { padding-top: clamp(72px, 8vw, 120px); }

.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #dcd6ce;
  border: 1px solid #dcd6ce;
}
.tech {
  display: flex;
  flex-direction: column;
  min-height: 320px;
  padding: clamp(28px, 3vw, 44px);
  background: var(--plaster);
  transition: background-color .5s ease;
}
.tech:nth-child(4n + 2) { --d: .1s; }
.tech:nth-child(4n + 3) { --d: .2s; }
.tech:nth-child(4n + 4) { --d: .3s; }

/* Line icons: each stroke is one unit long (pathLength="1"), so it can draw itself in */
.tech-icon {
  display: block;
  width: 48px;
  height: 48px;
  color: var(--olive);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: square;
}
.tech-icon > * { stroke-dasharray: 1 1; }

.tech-num {
  margin: auto 0 10px;
  padding-top: 48px;
  font: 500 0.6875rem/1.4 var(--sans);
  letter-spacing: .14em;
  color: var(--olive);
  font-variant-numeric: tabular-nums;
}
.tech-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, .9vw + 1rem, 1.875rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.tech-text {
  margin: 12px 0 0;
  max-width: 34ch;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--stone);
}

@keyframes icon-draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@media (hover: hover) {
  .tech:hover { background: var(--paper); }
  .tech:hover .tech-icon > * { animation: icon-draw 1.2s var(--ease-out) both; }
}

/* ---------- 04 People ---------- */
.people-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(40px, 4vw, 56px) clamp(16px, 2vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.person:nth-child(4n + 2) { --d: .08s; }
.person:nth-child(4n + 3) { --d: .16s; }
.person:nth-child(4n + 4) { --d: .24s; }

.person-media {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--plaster);
}
/* Portraits share one warm grey tone, and come into colour on hover */
.person-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  filter: grayscale(1) sepia(.16) contrast(1.02);
  transition: filter .8s ease, transform 1.4s var(--ease-out);
}
@media (hover: hover) {
  .person:hover .person-media img { filter: none; transform: scale(1.04); }
}

.person-name {
  margin: 18px 0 0;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.person-role {
  margin: 4px 0 0;
  font-size: 0.875rem;
  color: var(--stone);
}


/* ---------- Load and scroll reveals ---------- */
.js .tech-icon > * { stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease-out) calc(var(--d, 0s) + .25s); }
.tech.is-in .tech-icon > * { stroke-dashoffset: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .founder-facts { grid-template-columns: 1fr; }

  .tech-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tech:nth-child(n) { --d: 0s; }
  .tech:nth-child(even) { --d: .1s; }
}

@media (max-width: 960px) {
  .about-lead,
  .about-detail { grid-column: 1 / -1; }

  .how-aside,
  .how-main { grid-column: 1 / -1; }
  .how-aside { position: static; }
  .how-media { display: none; }
  .how-thumb {
    display: block;
    margin: 20px 0 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: #23251f;
    background-image:
      linear-gradient(rgba(236, 233, 227, .045) 1px, transparent 1px),
      linear-gradient(90deg, rgba(236, 233, 227, .045) 1px, transparent 1px);
    background-size: 20px 20px;
  }
  .js .how-list.is-tracking .how-item:not(.is-current) .how-title { color: inherit; }
  .js .how-list.is-tracking .how-item:not(.is-current) .how-num { opacity: 1; }
  .js .how-list.is-tracking .how-item.is-current .how-body { transform: none; }

  .tech-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tech:nth-child(n) { --d: 0s; }
  .tech:nth-child(even) { --d: .1s; }

  .people-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .person:nth-child(n) { --d: 0s; }
  .person:nth-child(3n + 2) { --d: .08s; }
  .person:nth-child(3n + 3) { --d: .16s; }
}

@media (max-width: 720px) {
  .founders-list { grid-template-columns: minmax(0, 1fr); row-gap: 48px; }
  .founder-media { aspect-ratio: 4 / 5; }
  .founder-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .how-item { grid-template-columns: 44px minmax(0, 1fr); column-gap: 8px; }

  .tech-grid { grid-template-columns: 1fr; }
  .tech { min-height: 0; }
  .tech:nth-child(n) { --d: 0s; }
  .tech-num { padding-top: 32px; }

  .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
  .person:nth-child(n) { --d: 0s; }
  .person:nth-child(even) { --d: .08s; }
  .person-name { margin-top: 14px; font-size: 1rem; }
  .person-role { font-size: 0.8125rem; }
}

@media (prefers-reduced-motion: reduce) {
  .js .tech-icon > * { stroke-dashoffset: 0; transition: none; }
  .tech-icon > * { animation: none !important; }
  .person-media img,
  .how-body,
  .how-text,
  .tech { transition: none; }
  /* Photographs swap with a quick fade instead of a wipe */
  .js .how-media .how-slide,
  .js .how-media[data-dir="up"] .how-slide { clip-path: none; scale: 1; opacity: 0; transition: opacity .3s ease; }
  .js .how-media .how-slide.is-active { opacity: 1; }
  .js .how-media .how-art .ln { stroke-dashoffset: 0 !important; transition: none !important; }
  .js .how-media .how-art .dash,
  .js .how-media .how-art text { opacity: .8 !important; transition: none !important; }
  .how-caption-text,
  .how-progress span::after { transition: none; }
}
