/* About page: scrollable chapters and the fixed particle portrait. */

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--sand);
  color: var(--sea);
  font:
    16px Arial,
    sans-serif;
}
button,
a {
  font: inherit;
  color: inherit;
}
a {
  text-decoration: none;
}
button {
  cursor: pointer;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--terra);
  outline-offset: 5px;
}
header {
  height: 90px;
  position: fixed;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4%;
  z-index: 5;
  background: linear-gradient(var(--sand) 20%, #eee2c9ed 65%, #eee2c900);
}
.logo {
  font:
    43px Georgia,
    serif;
  letter-spacing: -9px;
  padding-right: 10px;
}
nav {
  display: flex;
  gap: 34px;
}
nav a {
  font-size: 14px;
  padding: 12px 0;
  position: relative;
}
nav a:after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--terra);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
nav a:hover:after,
nav a[aria-current]:after {
  transform: scaleX(1);
}
nav a[aria-current] {
  color: var(--terra);
}
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.055;
  z-index: 3;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23000' filter='url(%23n)' d='M0 0h180v180H0z'/%3E%3C/svg%3E");
}
.scene {
  position: fixed;
  left: 0;
  top: 80px;
  width: 55vw;
  height: calc(100svh - 130px);
  pointer-events: none;
}
canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.scene-caption {
  position: absolute;
  bottom: 3%;
  left: 11%;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--olive);
}
.scene-caption b {
  font-weight: normal;
  color: var(--terra);
  margin-right: 15px;
}
.chapters {
  margin-left: 56%;
  width: 38%;
}
.chapter {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 125px 0 100px;
  position: relative;
}
.eyebrow {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--olive);
  margin: 0 0 24px;
}
.eyebrow span {
  color: var(--terra);
  margin-right: 16px;
}
h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: normal;
  letter-spacing: -0.065em;
  line-height: 0.99;
  margin: 0 0 30px;
}
h1 {
  font-size: clamp(65px, 7.5vw, 120px);
}
h2 {
  font-size: clamp(52px, 5.7vw, 90px);
}
h1 em,
h2 em {
  font-weight: normal;
  color: var(--terra);
}
.copy {
  font-size: clamp(15px, 1.25vw, 19px);
  line-height: 1.9;
  max-width: 420px;
  color: #385052;
  margin: 0 0 20px;
}
.small {
  font-size: 12px;
  color: var(--olive);
  line-height: 1.8;
}
.line {
  height: 2px;
  width: 70px;
  background: var(--olive);
  margin: 5px 0 25px;
}
.scroll-cue {
  font-size: 10px;
  letter-spacing: 2px;
  margin-top: 36px;
  color: var(--olive);
}
.scroll-cue span {
  display: inline-block;
  margin-left: 12px;
  color: var(--terra);
  animation: nudge 2s infinite;
}
.chapter a.cta {
  align-self: flex-start;
  border: 1px solid var(--sea);
  padding: 13px 23px;
  border-radius: 28px;
  font-size: 13px;
  margin-top: 20px;
  transition: 0.25s;
}
.chapter a.cta:hover {
  background: var(--sea);
  color: var(--sand);
}
.rail {
  position: fixed;
  left: 4%;
  bottom: 30px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 9px;
  letter-spacing: 1px;
}
.progress {
  height: 1px;
  width: 75px;
  background: #203e4225;
}
.progress i {
  display: block;
  height: 1px;
  width: 0;
  background: var(--terra);
}
.motion {
  position: fixed;
  right: 4%;
  bottom: 24px;
  z-index: 4;
  background: var(--sand);
  border: 1px solid #203e4233;
  border-radius: 30px;
  padding: 10px 14px;
  font-size: 10px;
}
.chapter-number {
  position: absolute;
  right: 0;
  bottom: 40px;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--olive);
}
.reveal {
  opacity: 0.25;
  transform: translateY(25px);
  transition:
    opacity 0.9s,
    transform 0.9s;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.wipe {
  position: fixed;
  inset: 0;
  background: var(--terra);
  transform: translateY(100%);
  z-index: 10;
  pointer-events: none;
}
.wipe.go {
  animation: wipe 0.7s cubic-bezier(0.7, 0, 0.25, 1);
}
.static-message {
  display: none;
}
@keyframes wipe {
  0% {
    transform: translateY(100%);
  }
  55%,
  100% {
    transform: translateY(0);
  }
}
@keyframes nudge {
  50% {
    transform: translateY(7px);
  }
}
@media (max-width: 700px) {
  header {
    height: 70px;
    padding: 0 6%;
  }
  .logo {
    font-size: 35px;
  }
  nav {
    gap: 17px;
  }
  nav a {
    font-size: 12px;
    min-height: 44px;
    padding: 15px 0;
  }
  .scene {
    width: 100%;
    height: 46svh;
    top: 75px;
    opacity: 0.88;
  }
  .scene-caption {
    left: 7%;
    bottom: 0;
    font-size: 7px;
    letter-spacing: 1px;
  }
  .chapters {
    margin: 0;
    width: 100%;
    position: relative;
  }
  .chapter {
    min-height: 115svh;
    padding: 57svh 8% 90px;
    background: linear-gradient(
      180deg,
      transparent 45%,
      #eee2c9ee 55%,
      var(--sand) 73%
    );
  }
  h1 {
    font-size: 65px;
  }
  h2 {
    font-size: 55px;
  }
  .copy {
    font-size: 14px;
    line-height: 1.8;
    max-width: 100%;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 2px;
    margin-bottom: 18px;
  }
  .chapter-number {
    right: 8%;
    bottom: 65px;
  }
  .rail {
    left: 6%;
    bottom: 23px;
    font-size: 8px;
    gap: 8px;
  }
  .progress {
    width: 44px;
  }
  .motion {
    right: 6%;
    bottom: 15px;
    font-size: 9px;
  }
  .scroll-cue {
    margin-top: 20px;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
