/* ==========================================================================
   NADIR — subpage layer
   --------------------------------------------------------------------------
   Shared components for category subpages: figure cards, figure grids, and
   the sibling navigation that sits at the foot of every page in a category.
   Tokens come from apple.css. Loaded after it, so no !important is needed.
   ========================================================================== */

/* --- navigation ---------------------------------------------------------- */

/* apple.css fixes the menu grid at three columns because every menu it was
   written for had three or six items. Every category here has four. */
body.ap-site .nav-cluster-platform .nav-popover-list,
body.ap-site .nav-cluster-technology .nav-popover-list,
body.ap-site .nav-cluster-industries .nav-popover-list,
body.ap-site .nav-cluster-company .nav-popover-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.ap-site .mobile-menu button {
  border: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

/* --- page masthead ------------------------------------------------------- */

.pg-hero {
  padding: clamp(6rem, 12vh, 9rem) 0 clamp(2.5rem, 5vh, 4rem);
}

.pg-hero .ap-eyebrow {
  margin-bottom: 1rem;
}

.pg-hero h1 {
  max-width: 20ch;
  margin: 0 0 1.5rem;
  font-size: clamp(2.4rem, 5.4vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.032em;
  line-height: 1.06;
}

.pg-lede {
  max-width: 62ch;
  margin: 0;
  color: var(--ap-text-dim);
  font-size: clamp(1.0625rem, 1.5vw, 1.3125rem);
  line-height: 1.5;
}

/* Breadcrumb doubles as the category label; the category has no hub page yet,
   so the first crumb is deliberately plain text rather than a link. */
.pg-crumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  color: var(--ap-text-dim);
  font-family: var(--ap-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pg-crumb a {
  color: var(--ap-text-dim);
  text-decoration: none;
}

.pg-crumb a:hover {
  color: var(--ap-text);
}

.pg-crumb i {
  font-style: normal;
  opacity: 0.5;
}

/* --- figure cards -------------------------------------------------------- */

.pg-figs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2.75rem;
}

.pg-figs-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pg-fig {
  display: flex;
  min-width: 0;
  flex-direction: column;
  margin: 0;
  border: 1px solid var(--ap-rule);
  border-radius: var(--ap-radius);
  background: var(--ap-panel-2);
  overflow: hidden;
}

.pg-fig .nadir-figure {
  aspect-ratio: 16 / 10;
  background: #0d0d0e;
}

.pg-fig figcaption {
  padding: 1.05rem 1.25rem 1.3rem;
  border-top: 1px solid var(--ap-rule);
}

.pg-fig figcaption strong {
  display: block;
  margin-bottom: 0.32rem;
  color: var(--ap-text);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pg-fig figcaption span {
  display: block;
  color: var(--ap-text-dim);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* A wide card spans the grid and flattens its aspect, because the instruments
   that carry a whole argument (drift geometry, chain of custody) are drawn
   landscape and lose their axis labels when squeezed into a half column. */
.pg-fig-wide {
  grid-column: 1 / -1;
}

.pg-fig-wide .nadir-figure {
  aspect-ratio: 40 / 15;
}

/* --- embedded console panel ---------------------------------------------- */

/* The console draws a real UI on a 1200px surface and scales it down. Below
   roughly half that, its 10px labels stop being readable, so the panel is
   withdrawn rather than shipped as decorative texture. */
.pg-console {
  grid-column: 1 / -1;
}

.pg-console .nadir-figure {
  aspect-ratio: 16 / 10;
  background: #0b0b0c;
}

.pg-console canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

@media (max-width: 900px) {
  .pg-console {
    display: none;
  }
}

/* --- founder bios --------------------------------------------------------- */

.pg-bio {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
  margin-top: 3rem;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
}

.pg-bio + .pg-bio {
  margin-top: clamp(4rem, 8vh, 6.5rem);
  padding-top: clamp(4rem, 8vh, 6.5rem);
  border-top: 1px solid var(--ap-rule);
}

/* The bio bodies run to fourteen hundred pixels. Letting the identity column
   ride down with them keeps the face attached to the prose instead of
   stranding it against a column of empty black. */
.pg-bio > div:first-child {
  position: sticky;
  top: calc(var(--ap-header-h, 64px) + 2rem);
}

.pg-bio-media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ap-rule);
  border-radius: var(--ap-radius);
  background: var(--ap-panel-2);
}

/* Square rather than 4:5 because both source photographs sit the subject low
   in a tall frame; the wider crop cannot bring either face above centre.
   --pg-focus is per-photo since the two are framed differently. */
.pg-bio-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center var(--pg-focus, 50%);
}

.pg-bio-id {
  margin-top: 1.1rem;
}

.pg-bio-id strong {
  display: block;
  color: var(--ap-text);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.018em;
}

.pg-bio-id span {
  display: block;
  margin-top: 0.2rem;
  color: var(--ap-accent);
  font-family: var(--ap-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pg-bio-id em {
  display: block;
  margin-top: 0.6rem;
  color: var(--ap-text-dim);
  font-size: 0.875rem;
  font-style: normal;
  line-height: 1.5;
}

.pg-bio-body h3 {
  margin: 2rem 0 0.75rem;
  color: var(--ap-text);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.pg-bio-body h3:first-child {
  margin-top: 0;
}

.pg-bio-body p {
  max-width: 66ch;
  margin: 0 0 1.1rem;
  color: var(--ap-text-dim);
  font-size: 1rem;
  line-height: 1.62;
}

.pg-bio-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.6rem;
}

.pg-bio-links a {
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--ap-rule);
  border-radius: 999px;
  color: var(--ap-text-dim);
  font-size: 0.8125rem;
  text-decoration: none;
  transition: border-color 160ms var(--ap-ease), color 160ms var(--ap-ease);
}

.pg-bio-links a:hover {
  border-color: rgba(255, 122, 69, 0.5);
  color: var(--ap-text);
}

.pg-split-note {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.pg-split-note div {
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--ap-rule);
  border-radius: var(--ap-radius);
}

.pg-split-note strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--ap-accent);
  font-family: var(--ap-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pg-split-note p {
  margin: 0;
  color: var(--ap-text-dim);
  font-size: 0.9375rem;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .pg-bio {
    grid-template-columns: minmax(0, 1fr);
  }

  .pg-bio > div:first-child {
    position: static;
  }

  .pg-bio-media {
    max-width: 260px;
  }
}

/* --- pull quote / boundary callout --------------------------------------- */

.pg-note {
  margin-top: 2.5rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--ap-rule);
  border-left: 2px solid var(--ap-accent);
  border-radius: 0 var(--ap-radius) var(--ap-radius) 0;
  background: rgba(255, 122, 69, 0.04);
}

.pg-note p {
  max-width: 74ch;
  margin: 0;
  color: var(--ap-text);
  font-size: 1.0625rem;
  line-height: 1.55;
}

.pg-note p + p {
  margin-top: 0.75rem;
  color: var(--ap-text-dim);
  font-size: 0.9375rem;
}

/* --- sibling navigation -------------------------------------------------- */

.pg-next {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.pg-next a {
  display: block;
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--ap-rule);
  border-radius: var(--ap-radius);
  text-decoration: none;
  transition: border-color 180ms var(--ap-ease), background 180ms var(--ap-ease);
}

.pg-next a:hover {
  border-color: #46464a;
  background: rgba(245, 245, 247, 0.02);
}

.pg-next em {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--ap-accent);
  font-family: var(--ap-mono);
  font-size: 0.6875rem;
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pg-next strong {
  display: block;
  margin-bottom: 0.28rem;
  color: var(--ap-text);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pg-next span {
  display: block;
  color: var(--ap-text-dim);
  font-size: 0.875rem;
  line-height: 1.45;
}

.pg-next a[aria-current="page"] {
  border-color: rgba(255, 122, 69, 0.4);
  background: rgba(255, 122, 69, 0.05);
}

/* --- closing call to action ---------------------------------------------- */

.pg-cta {
  padding: clamp(4rem, 9vh, 7rem) 0 clamp(5rem, 10vh, 8rem);
  text-align: center;
}

.pg-cta h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.1;
}

.pg-cta p {
  max-width: 52ch;
  margin: 0 auto 2rem;
  color: var(--ap-text-dim);
  font-size: 1.0625rem;
  line-height: 1.5;
}

/* --- responsive ---------------------------------------------------------- */

@media (max-width: 1040px) {
  .pg-figs-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .pg-figs,
  .pg-figs-3 {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }

  .pg-fig-wide .nadir-figure {
    aspect-ratio: 16 / 11;
  }

  .pg-note {
    padding: 1.25rem 1.35rem;
  }
}

/* The instruments carry a lot of small type. Below the phone breakpoint a
   16:10 tile renders it at roughly six pixels, so give them more height
   rather than letting the labels collapse into texture. */
@media (max-width: 560px) {
  .pg-fig .nadir-figure,
  .pg-fig-wide .nadir-figure {
    aspect-ratio: 4 / 3.4;
  }
}
