/* ==========================================================================
   Portfolio: the atlas.
   Each active investment is a plate cut from the same night map, framed on
   the company's headquarters, with the line from Austin drawn in. Below sit
   the seven ways we help, set as a course. The Investment History is in daybook.css.
   Loaded after rivers.css on the portfolio page only.
   ========================================================================== */

.drp-atlas-page main { display: block; }

/* ---------- active investments, on the night ground ---------- */
.atlas {
  position: relative;
  padding: clamp(56px, 7vw, 104px) 0 clamp(80px, 9vw, 136px);
  background: var(--night-deep);
  color: #C9D7E2;
  overflow: hidden;
}
/* a faint sheet of the engraved map behind the title, fading into night */
.atlas:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 620px;
  background: url('../img/night-towns.jpg') 50% 22% / cover no-repeat;
  opacity: 0.42;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 100%);
  pointer-events: none;
}
.atlas .drp-wrap { position: relative; }

.atlas-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px 72px;
  margin-bottom: clamp(48px, 6vw, 88px);
}
.atlas-head h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(46px, 6.4vw, 96px);
  line-height: 1;
  letter-spacing: -0.01em;
  color: #F3F6F8;
}
.atlas-intro { max-width: 30em; }
.atlas-sub {
  margin: 0 0 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(220, 238, 248, 0.42);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.3;
  color: #F3F6F8;
}
.atlas-intro p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(17px, 1.35vw, 19px);
  line-height: 1.65;
  color: #C9D7E2;
}
@media only screen and (min-width: 1000px) {
  .atlas-head { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: end; }
}

/* ---------- the plates ---------- */
.plates {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 64px 48px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media only screen and (min-width: 820px) {
  .plates { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 88px; }
}
.plate { margin: 0; }
.plate > a { display: block; height: 100%; color: inherit; text-decoration: none; }
.plate > a:focus-visible { outline: 2px solid var(--river); outline-offset: 10px; }

.plate-media { position: relative; display: block; aspect-ratio: 8 / 5; }
.plate-frame {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  background: var(--night);
  box-shadow: inset 0 0 0 1px rgba(183, 211, 226, 0.2);
}
.plate-frame:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 75% 85% at 50% 50%, rgba(9, 21, 38, 0) 55%, rgba(9, 21, 38, 0.55) 100%),
    linear-gradient(0deg, rgba(9, 21, 38, 0.55) 0, rgba(9, 21, 38, 0) 34%);
  box-shadow: inset 0 0 0 1px rgba(183, 211, 226, 0.2);
}
.plate-map { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }

/* the line from Austin: a soft glow, the brass line, and a bright pulse on hover */
.plate-map path { fill: none; stroke-linecap: round; }
.p-glow { stroke: var(--brass); stroke-width: 7; opacity: 0.14; }
.p-arc { stroke: #E9CC94; stroke-width: 1.7; opacity: 0.95; }
.p-pulse { stroke: #FFF2D6; stroke-width: 3.2; stroke-dasharray: 90 2000; stroke-dashoffset: 90; opacity: 0; }

/* the orchestrated moment: as a plate is reached, its line draws in and the pin lights.
   --d0 (set on each map) starts the line where it enters the frame, so no time is spent off-plate. */
.atlas-js .plate .p-arc { stroke-dasharray: 1000; stroke-dashoffset: var(--d0, 1000); transition: stroke-dashoffset 1.5s cubic-bezier(0.45, 0, 0.2, 1) 0.1s; }
.atlas-js .plate .p-glow { opacity: 0; transition: opacity 1s ease 1s; }
.atlas-js .plate .pin-hq { opacity: 0.45; transition: opacity 0.5s ease 1.3s; }
.atlas-js .plate.is-lit .p-arc { stroke-dashoffset: 0; }
.atlas-js .plate.is-lit .p-glow { opacity: 0.14; }
.atlas-js .plate.is-lit .pin-hq { opacity: 1; }
.atlas-js .plate.is-lit .pin-hq .pin-dot:after { animation: atlas-bloom 1.6s ease-out 1.4s both; }

/* answering the reader: hover or focus sends a pulse of light down the line */
.plate > a:hover .p-pulse,
.plate > a:focus-visible .p-pulse { animation: atlas-pulse 1.7s cubic-bezier(0.45, 0, 0.2, 1) both; }

@keyframes atlas-pulse {
  0% { stroke-dashoffset: 90; opacity: 1; }
  88% { stroke-dashoffset: -1000; opacity: 1; }
  100% { stroke-dashoffset: -1000; opacity: 0; }
}
@keyframes atlas-bloom {
  0% { opacity: 0.9; transform: scale(0.6); }
  100% { opacity: 0; transform: scale(3); }
}

/* pins sit in HTML so they keep one size at every width */
.pin { position: absolute; left: var(--x); top: var(--y); width: 0; height: 0; }
.pin-dot {
  position: absolute;
  left: -5px;
  top: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 2px var(--night-deep), 0 0 0 4px rgba(221, 190, 132, 0.4), 0 0 14px 3px rgba(221, 190, 132, 0.45);
}
.pin-dot:after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid var(--brass);
  border-radius: 50%;
  opacity: 0;
}
.pin-name {
  position: absolute;
  left: 13px;
  top: -10px;
  white-space: nowrap;
  font: 600 13px/1.4 var(--sans);
  letter-spacing: 0.02em;
  color: #F6E7C8;
  text-shadow: 0 0 3px var(--night-deep), 0 0 8px var(--night-deep), 0 0 2px var(--night-deep);
}
.pin--left .pin-name { left: auto; right: 13px; }
.pin-home .pin-dot {
  background: #F3F6F8;
  box-shadow: 0 0 0 2px var(--night-deep), 0 0 0 4px rgba(243, 246, 248, 0.35);
}
.pin-home .pin-name { color: #F3F6F8; font-weight: 500; }

/* the company's own mark, on a white card pinned to the foot of the plate */
.plate-logo {
  position: absolute;
  left: clamp(16px, 2vw, 24px);
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: clamp(150px, 15vw, 188px);
  height: clamp(76px, 7.4vw, 92px);
  padding: 12px 16px;
  background: #fff;
  transform: translateY(50%);
  box-shadow: 0 14px 30px rgba(3, 9, 18, 0.45);
}
.plate-logo img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; }

.plate-body { display: block; padding-top: calc(clamp(76px, 7.4vw, 92px) / 2 + 26px); }
.plate-name {
  margin: 0 0 10px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 2.7vw, 40px);
  line-height: 1.1;
  color: #F3F6F8;
}
.plate > a:hover .plate-name,
.plate > a:focus-visible .plate-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 7px; }
.plate-desc {
  display: block;
  max-width: 34em;
  margin: 0 0 22px;
  font-size: 17px;
  line-height: 1.6;
  color: #C2D2DE;
}
.plate-facts { margin: 0 0 22px; border-top: 1px solid rgba(183, 211, 226, 0.2); }
.plate-facts > div {
  display: grid;
  grid-template-columns: 9.5em minmax(0, 1fr);
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(183, 211, 226, 0.12);
  font-size: 15px;
  line-height: 1.5;
}
.plate-facts dt { color: #8FA6BA; font-weight: 500; }
.plate-facts dd { margin: 0; color: #E4EDF3; }
.plate-more {
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(220, 238, 248, 0.5);
  color: var(--river-hi);
  font-size: 15px;
  font-weight: 600;
}
.plate > a:hover .plate-more { border-bottom-color: var(--river-hi); }

@media only screen and (max-width: 520px) {
  .plate-facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .pin-name { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .p-pulse { display: none; }
  .pin-dot:after { animation: none !important; }
}

/* ---------- team bio pages: the title band opens on a plate of the night map ----------
   (the four active company pages now open on the line from Austin, voyage.css) */
.place-band {
  position: relative;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  background: var(--night-deep);
  overflow: hidden;
}
.place-band:before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../img/night-towns.jpg') 50% 30% / cover no-repeat;
  opacity: 0.34;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
  pointer-events: none;
}
.place-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  box-sizing: border-box;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 64px) var(--gutter) clamp(36px, 5vw, 64px);
}
html body .place-head h1.single-title {
  position: static;
  left: auto;
  width: auto;
  margin: 0;
  padding: 0;
  background: none !important;
  color: #F3F6F8;
  font-family: var(--display);
  font-size: clamp(42px, 5.4vw, 80px);
  line-height: 1.02;
}
.place-where {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 18px 0 0;
  font-family: var(--serif);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.4;
  color: #C9D7E2;
}
.place-where:before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-top: 0.5em;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 10px 2px rgba(221, 190, 132, 0.45);
}
.place-media { width: 100%; }
/* small screens: give the company text the same margins as the band above it */
@media only screen and (max-width: 767px) {
  .drp-place #inner-content { box-sizing: border-box; padding-left: var(--gutter); padding-right: var(--gutter); }
}
@media only screen and (min-width: 900px) {
  .place-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 500px); align-items: end; gap: 64px; }
  .place-title { padding-bottom: 6px; }
}

/* ---------- seven ways we help: a course, like a river with stops ---------- */
.ways { padding: clamp(64px, 8vw, 120px) 0; background: var(--paper); border-top: 1px solid var(--rule); }
.ways-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.ways-intro h2 {
  margin: 0 0 22px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 1.1;
  color: var(--ink);
  max-width: 12em;
}
.ways-intro p {
  margin: 0 0 14px;
  max-width: 30em;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
  color: var(--slate);
}
.ways-intro .text-links { margin-top: 28px; font-family: var(--sans); font-size: 16px; }
@media only screen and (min-width: 1000px) {
  .ways-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 96px; align-items: start; }
  .ways-intro { position: sticky; top: calc(var(--header-h) + 48px); }
}

.course { position: relative; counter-reset: way; --node: 46px; }
/* the river the steps sit on */
.course:before {
  content: "";
  position: absolute;
  left: calc(var(--node) / 2 - 1px);
  top: 8px;
  bottom: 30px;
  width: 2px;
  border-radius: 1px;
  background: linear-gradient(180deg, rgba(183, 211, 226, 0.2) 0%, var(--river) 8%, #8DB7CF 100%);
}
.course-label {
  position: relative;
  margin: 0 0 30px;
  padding-left: calc(var(--node) + 28px);
  max-width: 34em;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
}
.course-label:before {
  content: "";
  position: absolute;
  left: calc(var(--node) / 2 - 4px);
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 0 0 2px #8DB7CF;
}
.course-list + .course-label { margin-top: 12px; }
.course-list { margin: 0; padding: 0; list-style: none; }
.way {
  position: relative;
  margin: 0;
  padding: 0 0 40px calc(var(--node) + 28px);
  counter-increment: way;
}
.way:before {
  content: counter(way, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: -6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--node);
  height: var(--node);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px #9CC2D8, 0 0 0 6px var(--paper);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1;
  color: var(--ink);
}
.way h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(25px, 2.1vw, 30px);
  line-height: 1.15;
  color: var(--ink);
}
.way p { margin: 0; max-width: 36em; font-size: 17px; line-height: 1.65; color: var(--slate); }
.course-list:last-child .way:last-child { padding-bottom: 0; }
@media only screen and (max-width: 520px) {
  .course { --node: 40px; }
  .way, .course-label { padding-left: calc(var(--node) + 18px); }
  .way:before { font-size: 15px; }
}
