/* About-page photography, using the colours of the active site theme. */

/* No visible "About" heading above the intro: the page opens with the portrait. It stays as the h1 for screen
 * readers and search engines. */
h1.dynamic-title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.content .about-intro {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
  margin: 1.75rem 0 2.75rem;
}

.content .about-portrait {
  position: relative;
  width: 210px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid var(--lab-accent);
}

.content .about-portrait .img-link {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
}

/* The asset itself is a circular crop with transparent corners. */
.content .about-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Fill the frame past the transparent margin of the circular asset. */
  transform: scale(1.075);
  margin: 0;
  border-radius: 0;
}

/* ---- "Please Stand By" on the portrait (_includes/about-standby.html) ----
 * 0-1.5s the test card with static, then it slowly fades away over the photo, wavering a little, while the photo warms up
 * from washed out to full colour. The animations switch shortens every animation to nothing, which leaves the card hidden. */
.content .about-standby {
  --standby-ink: #1c1b18;
  --standby-paper: #c4c0b4;
  --standby-bg: #121210;
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
  animation: about-standby 4s linear both;
}

html.lab-motion-off .content .about-standby { display: none; } /* not even for the one frame a shortened animation takes */

.content .about-standby-card {
  position: absolute;
  inset: 0;
  background: var(--standby-paper);
  animation: about-standby-card 4s linear both;
}

.content .about-standby-card svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--standby-ink);
  stroke-width: 1;
}

.content .about-standby-card .sb-paper { fill: var(--standby-paper); stroke: none; }
.content .about-standby-card .sb-inner { stroke: var(--standby-ink); stroke-width: 2.6; }
.content .about-standby-card .sb-ring { stroke-width: 3.6; }
.content .about-standby-card .sb-thin { stroke-width: 1.3; }
.content .about-standby-card .sb-dash { stroke-width: 1.4; stroke-dasharray: 3 2.5; }
.content .about-standby-card .sb-bars { stroke-width: 2.8; }
.content .about-standby-card .sb-lines { stroke: none; }
.content .about-standby-card pattern path { stroke-width: 1.3; }
.content .about-standby-card .sb-b1 { fill: #9a968c; stroke: none; }
.content .about-standby-card .sb-b2 { fill: #77746b; stroke: none; }
.content .about-standby-card .sb-b3 { fill: #53514b; stroke: none; }
.content .about-standby-card .sb-b4 { fill: #2b2a27; stroke: none; }
.content .about-standby-card stop { stop-color: #000; }

.content .about-standby-card .sb-num {
  fill: var(--standby-ink);
  stroke: none;
  font: 600 7px Georgia, serif;
  dominant-baseline: central;
  text-anchor: middle;
}

/* The bold, widely spaced lettering of the original, white with a dark drop. */
.content .about-standby-card .sb-title {
  fill: #f1ede2;
  stroke: none;
  font: 700 17px 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
  text-anchor: middle;
}

.content .about-standby-card .sb-title-shadow { fill: var(--standby-ink); }

/* Scanlines over the card and the static. */
.content .about-standby::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, #0000 0 2px, #00000040 2px 3px);
}

.content .about-standby-noise {
  position: absolute;
  inset: -50%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: about-standby-noise 4s linear both, about-standby-grain .3s steps(5) infinite;
}

/* The photo underneath warms up while the card fades away. */
.content .about-portrait > .img-link img {
  animation: about-standby-warm 2.5s ease-in-out 1.5s both;
}

@keyframes about-standby {
  0%, 10% { opacity: 1; visibility: visible; background: var(--standby-bg); } /* a dark screen while the card switches on */
  12%, 85% { opacity: 1; visibility: visible; background: #0000; }
  100% { opacity: 0; visibility: hidden; }
}

/* 4s: on at 0.3s, a roll at 1s, then from 1.5s a slow, wavering fade over the photo. */
@keyframes about-standby-card {
  0% { opacity: 1; transform: scale(.7, .015); filter: brightness(3); }     /* switched on: a bright line */
  7% { transform: scale(1, 1); filter: brightness(1.8); }
  12%, 22% { transform: none; filter: none; }
  24% { transform: translateY(-4%); }                                        /* the picture rolls */
  26% { transform: translateY(3%); }
  28%, 38% { transform: none; opacity: 1; }
  46% { opacity: .8; }
  50% { opacity: .9; }
  58% { opacity: .6; }
  62% { opacity: .7; }
  70% { opacity: .4; }
  74% { opacity: .45; }
  85%, 100% { opacity: 0; }
}

@keyframes about-standby-noise {
  0% { opacity: .8; }
  12%, 38% { opacity: .16; }
  58% { opacity: .26; }
  85% { opacity: .12; }
  100% { opacity: 0; }
}

@keyframes about-standby-grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-13%, 9%); }
  40% { transform: translate(8%, -17%); }
  60% { transform: translate(-6%, 21%); }
  80% { transform: translate(17%, 4%); }
  100% { transform: translate(0, 0); }
}

@keyframes about-standby-warm {
  0% { filter: brightness(1.3) contrast(.8) saturate(.3); }
  50% { filter: brightness(1.1) contrast(.92) saturate(.7); }
  100% { filter: none; }
}

.content .about-intro-copy > p:first-child {
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--heading-color);
}

.content .about-intro-copy > p:last-child,
.content .about-story-copy > p:last-child {
  margin-bottom: 0;
}

.content .about-story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
  align-items: center;
  gap: 1.75rem;
  margin: 1.25rem 0 2rem;
}

.content .about-story-photo-first {
  grid-template-columns: minmax(0, .85fr) minmax(0, 1fr);
}

.content .about-photo {
  width: 100%;
  margin: 0;
}

.content .about-photo .img-link {
  display: block;
  overflow: hidden;
  border: 1px solid var(--main-border-color);
  border-radius: 12px;
}

.content .about-photo img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  border-radius: 12px;
}

.content .about-photo figcaption {
  margin-top: .5rem;
  font-size: .85rem;
  line-height: 1.4;
  text-align: center;
  color: var(--text-muted-color);
}

/* Let's Connect: icon links only. */
.content .about-connect {
  display: flex;
  gap: .75rem;
  margin: 1rem 0 2rem;
}

.content .about-connect a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--lab-accent);
  border-radius: 50%;
  font-size: 1.25rem;
  color: var(--heading-color);
  text-decoration: none;
  transition: background-color .15s, color .15s;
}

.content .about-connect a:hover,
.content .about-connect a:focus-visible {
  background: var(--lab-accent);
  color: var(--main-bg);
}

@media (max-width: 767px) {
  .content .about-intro {
    grid-template-columns: 125px minmax(0, 1fr);
    gap: 1.25rem;
  }

  .content .about-portrait { width: 125px; }
  .content .about-intro-copy { display: contents; }
  .content .about-intro-copy > p:first-child { font-size: 1.05rem; }
  .content .about-intro-copy > p:last-child { grid-column: 1 / -1; }

  .content .about-story,
  .content .about-story-photo-first {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .content .about-photo { max-width: 380px; }
  .content .about-photo-meetup { margin-left: auto; }
}

@media (max-width: 420px) {
  .content .about-intro {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 1rem;
  }

  .content .about-portrait { width: 96px; }
}
