/* Page structure. The network is a fixed stage behind everything; content scrolls over it.
   Copy lives on one side of the screen and the formation owns the other. */
.stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
}
.stage-fx { z-index: 1; }
.no-gl .stage { display: none; }

main { position: relative; z-index: 2; overflow-x: clip; }

.wrap {
  position: relative;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px 0 120px;
}
.hero-copy {
  position: relative;
  max-width: min(680px, 52vw);
  display: flex;
  flex-direction: column;
  gap: 30px;
}
/* a soft dark pool behind the copy, so the network never fights the words */
.hero-copy::before {
  content: "";
  position: absolute;
  inset: -18% -28% -18% -40%;
  background: radial-gradient(ellipse 60% 55% at 42% 50%, rgba(0, 1, 6, 0.82) 0%, rgba(0, 1, 6, 0.5) 50%, rgba(0, 1, 6, 0) 100%);
  z-index: -1;
  pointer-events: none;
}
.lede { max-width: 560px; font-size: 19px; line-height: 1.65; color: var(--body); }

/* projects: one full-height chapter per project */
.projects { position: relative; padding-top: 18vh; }
.sec-head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 620px;
  padding-bottom: 4vh;
}
/* a soft dark pool behind section headings, which particles cross on their way between figures */
.sec-head { position: relative; }
.sec-head::before {
  content: "";
  position: absolute;
  inset: -30% -18% -30% -24%;
  background: radial-gradient(ellipse 62% 60% at 40% 50%, rgba(0, 1, 6, 0.8), rgba(0, 1, 6, 0) 100%);
  z-index: -1;
  pointer-events: none;
}
.note { font-size: 16px; line-height: 1.65; color: var(--muted); max-width: 520px; }
.project {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 10vh 0;
}

/* about: the gears take the left, the words take the right */
.about {
  position: relative;
  min-height: 110vh;
  display: flex;
  align-items: center;
  padding: 16vh 0;
}
.about-grid { display: grid; grid-template-columns: 1fr minmax(0, 580px); padding-right: calc(var(--gutter) + 48px); }
.about-copy {
  grid-column: 2;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.about-copy::before {
  content: "";
  position: absolute;
  inset: -8% -16% -8% -20%;
  background: linear-gradient(90deg, rgba(0, 1, 6, 0) 0%, rgba(0, 1, 6, 0.78) 22%, rgba(0, 1, 6, 0.78) 80%, rgba(0, 1, 6, 0) 100%);
  -webkit-mask: linear-gradient(180deg, transparent, #000 10%, #000 90%, transparent);
  mask: linear-gradient(180deg, transparent, #000 10%, #000 90%, transparent);
  z-index: -1;
  pointer-events: none;
}
.about-copy .card-link { align-self: flex-start; }

/* contact */
.contact {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 14vh 0 18vh;
}

/* Laptops and other short screens. The fixed nav (about 70 px) takes a large share of a short screen,
   so each chapter centres its card in the space below the nav rather than in the whole screen, and the
   hero and contact tighten so that all of their content sits above the fold */
@media (min-width: 900px) and (max-height: 780px) {
  .hero { padding: 92px 0 64px; }
  .hero-copy { gap: 22px; }
  .hero .kicker { font-size: var(--label-2); }
  .hero h1 { font-size: clamp(46px, min(6.4vw, 11.5vh), 104px); }
  .lede { font-size: 17px; line-height: 1.6; max-width: 520px; }
  .project { padding: calc(4vh + 70px) 0 4vh; }
  .sec-head { gap: 14px; }
}
/* The contact is where a visitor comes to rest, at the page's end with the footer (100 px) in view. Below
   about 940 px tall, the full-height section's panel rides up under the nav there, so it centres between
   the nav and the footer instead */
@media (min-width: 900px) and (max-height: 940px) {
  .contact { min-height: calc(100vh - 100px); min-height: calc(100svh - 100px); padding: 86px 0 16px; }
}
/* (and on the shortest, a maximized browser on a 1280 x 720 screen with its bookmarks bar showing, closer still) */
@media (min-width: 900px) and (max-height: 620px) {
  .contact { padding: 78px 0 10px; }
}

@media (max-width: 899px) {
  .hero { align-items: flex-end; padding: 46vh 0 96px; }
  .hero-copy { max-width: 100%; }
  .hero-copy::before { inset: -10% 0; background: radial-gradient(ellipse 80% 60% at 50% 55%, rgba(0, 1, 6, 0.85), rgba(0, 1, 6, 0) 100%); }
  .project { align-items: flex-end; padding: 42vh 0 10vh; min-height: 0; }
  .about { padding: 42vh 0 10vh; min-height: 0; }
  .about-grid { grid-template-columns: 1fr; padding-right: var(--gutter); }
  .about-copy { grid-column: 1; }
  .contact { align-items: flex-end; padding: 40vh 0 12vh; }
}
@media (max-width: 560px) {
  .lede { font-size: 17px; }
}
