/* Parity AI — live-site additions: film hero (afterimage), signature, clients, thread.
   Self-contained; namespaced (phero/pclients/pprocess/thread/sig) — never touches memo-* rules.
   Tokens: memo amber #d89100 for page accents, logo gold #C9941A for the mark itself. */

:root {
  --plive-gold: #c9941a;
  --plive-cream: #f4f2ec;
}

/* ---------- Film hero (afterimage) ---------- */
.phero {
  position: relative;
  min-height: 100svh;
  background: #050b12;
  color: #e6e9ef;
  overflow: clip;
  display: flex;
  align-items: center;
}
.phero-media, .phero-media video, .phero-media picture, .phero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.phero-media { transition: transform 1.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 1.2s ease; }
.phero-media video { opacity: 0; transition: opacity 0.5s ease; }
.phero.is-ready .phero-media video { opacity: 1; }
.phero.is-failed .phero-media video { display: none; }
.phero-final { display: none; }
.phero.is-done .phero-final { display: block; }
.phero.is-done .phero-media video { opacity: 0; }

/* Afterimage: the last frame recedes behind a deep veil as the title card arrives */
.phero-veil {
  position: absolute;
  inset: 0;
  background: rgba(5, 11, 18, 0.82);
  opacity: 0.60;
  transition: opacity 1.1s ease;
  pointer-events: none;
}
.phero.is-resolving .phero-veil, .phero.is-done .phero-veil { opacity: 1; }
.phero.is-resolving .phero-media, .phero.is-done .phero-media {
  transform: scale(0.94);
  opacity: 0.85;
}

.phero-copy {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 8.5rem 24px 4rem;
}
.phero-kicker {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--memo-amber, #d89100);
}
.phero-copy h1 {
  font-family: "Instrument Serif", "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.02;
  font-size: clamp(3.2rem, 8vw, 6.6rem);
  color: var(--plive-cream);
  margin: 0.3em 0 0.35em;
}
.phero-lede {
  max-width: 33em;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.6;
  color: rgba(230, 233, 239, 0.82);
}
.phero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 1.8rem 0 2.4rem; }
.phero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.95em 1.6em;
  background: var(--plive-cream);
  color: #050b12;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.25s ease, background 0.25s ease;
}
.phero-btn:hover { transform: translateY(-1px); background: #fff; }
.phero-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.phero-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.95em 1.2em;
  border: 1px solid rgba(230, 233, 239, 0.45);
  color: rgba(230, 233, 239, 0.92);
  font-size: 0.92rem;
  text-decoration: none;
  transition: border-color 0.25s ease;
}
.phero-link:hover { border-color: rgba(230, 233, 239, 0.9); }
.phero-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.phero-trust p {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(230, 233, 239, 0.55);
  margin-bottom: 0.7rem;
}
.phero-trust div { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; font-size: 0.88rem; color: rgba(230, 233, 239, 0.75); }

/* Content is usable on first paint, independent of film buffering or JavaScript. */
.phero-body { opacity: 1; transform: none; }

/* ---------- The Signature ---------- */
.phero-sig, .hero-sig {
  width: clamp(210px, 22vw, 300px);
  margin-bottom: 1.3rem;
  color: var(--plive-cream);
  pointer-events: none;
  filter: drop-shadow(0 2px 16px rgba(5, 11, 18, 0.5));
}
.sig { width: 100%; height: auto; overflow: visible; }
.sig-g {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 0.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.sig-g--ai { fill: var(--plive-gold); stroke: var(--plive-gold); }
.sig-rule { stroke: var(--plive-gold); stroke-width: 1.2; stroke-linecap: square; }
.sig-nib { fill: var(--plive-gold); opacity: 0; display: none; }
.has-js .hero-sig.is-armed .sig-g { fill-opacity: 0; }
.has-js .hero-sig.is-armed .sig-nib { filter: drop-shadow(0 0 4px rgba(201, 148, 26, 0.95)); }

/* ---------- Exponent logo lockup (nav + footer) ---------- */
.plogo { height: 24px; width: auto; display: block; }
.plogo-word { fill: currentColor; }
/* The memo stylesheet paints all brand svgs as ink strokes (.memo-brand svg
   { fill:none; stroke:currentColor }) which killed the gold exponent — outrank it. */
.memo-brand svg.plogo { fill: currentColor; stroke: none; stroke-width: 0; width: auto; height: 28px; }
.memo-brand svg.plogo .plogo-word, .memo-brand svg.plogo .plogo-word path { fill: currentColor; stroke: none; }
.memo-brand svg.plogo .plogo-ai, .memo-brand svg.plogo .plogo-ai path { fill: var(--plive-gold); stroke: none; }
.memo-brand-footer svg.plogo { height: 24px; }
.plogo-holder { display: inline-flex; align-items: center; }

/* ---------- Process strip (the hero's 01–04, preserved) ---------- */
.pprocess { padding: clamp(3rem, 6vw, 4.5rem) 24px 0; }
.pprocess-inner { max-width: 1160px; margin: 0 auto; }
.pprocess .memo-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (max-width: 980px) { .pprocess .memo-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pprocess .memo-steps { grid-template-columns: 1fr; gap: 1.1rem; } }

/* ---------- Selected clients ---------- */
.pclients { padding: clamp(3.5rem, 7vw, 6rem) 24px; }
.pclients-inner { max-width: 1160px; margin: 0 auto; }
.pclients-head { margin-bottom: 2.4rem; }
.pclients-head .memo-kicker { margin-bottom: 0.6rem; }
.pclients-head h2 {
  font-family: "Instrument Serif", "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.08;
  color: var(--memo-ink, #050b12);
  margin: 0;
}
.pclient-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pclient {
  background: #fff;
  border: 1px solid var(--memo-rule-soft, rgba(5, 11, 18, 0.11));
  flex: 0 1 258px;
  min-height: 178px;
  padding: 1.9rem 1.3rem;
  display: grid;
  grid-template-rows: 64px auto;
  align-content: center;
  align-items: center;
  justify-items: center;
  gap: 1.3rem;
  transition: border-color 0.3s ease;
}
.pclient:hover { border-color: rgba(5, 11, 18, 0.28); }
.pclient-logo { width: auto; height: auto; max-width: 82%; object-fit: contain; }
.pclient-logo--t2p { max-height: 32px; }
.pclient-logo--templ { max-height: 58px; }
.pclient-logo--amh { max-height: 64px; }
.pclient-logo--pearl { max-height: 52px; }
.pclient-logo--summit { max-height: 40px; }
.pclient-logo--powerhouse { max-height: 44px; }
.pclient-logo--bushcare { max-height: 46px; }
.pclient-sector {
  font-size: 0.66rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--memo-muted, rgba(5, 11, 18, 0.66));
  text-align: center;
}

/* ---------- Thread of work ---------- */
.thread-wrap { position: relative; }
.thread {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
  overflow: visible;
}
.thread path {
  fill: none;
  stroke: var(--memo-amber, #d89100);
  stroke-width: 2;
  stroke-linecap: square;
  vector-effect: non-scaling-stroke;
  opacity: 0.85;
}
.thread-node {
  position: absolute;
  z-index: 6;
  width: 12px;
  height: 12px;
  border: 2px solid var(--memo-amber, #d89100);
  border-radius: 50%;
  background: var(--memo-bg, #f8f7f3);
  transform: translate(-5px, -6px);
  transition: background 0.4s ease, box-shadow 0.4s ease;
  pointer-events: none;
}
.thread-node.is-on {
  background: var(--memo-amber, #d89100);
  box-shadow: 0 0 0 5px rgba(216, 145, 0, 0.16);
}
.thread-square {
  position: absolute;
  z-index: 6;
  width: 8px;
  height: 8px;
  background: var(--memo-amber, #d89100);
  transform: translate(-3px, -4px) scale(0);
  transition: transform 0.35s ease;
  pointer-events: none;
}
.thread-square.is-on { transform: translate(-3px, -4px) scale(1); }
@media (max-width: 900px) {
  .thread, .thread-node, .thread-square { display: none; }
}

/* ---------- Section reveals (JS-tagged; page complete without JS) ---------- */
.has-js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.has-js .reveal.is-on { opacity: 1; transform: none; }

/* ---------- Mobile compact ---------- */
@media (max-width: 640px) {
  .phero-copy { padding: 7rem 20px 3rem; }
  .phero-actions { margin: 1.4rem 0 1.8rem; }
  .pclients-head { margin-bottom: 1.5rem; }
  .pclient-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--memo-rule-soft, rgba(5, 11, 18, 0.11));
    border: 1px solid var(--memo-rule-soft, rgba(5, 11, 18, 0.11));
  }
  .pclient {
    border: 0;
    flex: none;
    min-height: 0;
    padding: 0.85rem 0.5rem 0.7rem;
    grid-template-rows: 34px auto;
    gap: 0.4rem;
  }
  .pclient:last-child { grid-column: span 2; }
  .pclient-logo { max-width: 78%; }
  .pclient-logo--t2p { max-height: 19px; }
  .pclient-logo--templ { max-height: 32px; }
  .pclient-logo--amh { max-height: 34px; }
  .pclient-logo--pearl { max-height: 29px; }
  .pclient-logo--summit { max-height: 23px; }
  .pclient-logo--powerhouse { max-height: 25px; }
  .pclient-logo--bushcare { max-height: 27px; }
  .pclient-sector { font-size: 0.5rem; letter-spacing: 0.1em; }
}

/* ---------- Reduced motion: everything simply stands ---------- */
@media (prefers-reduced-motion: reduce) {
  .phero-media video { display: none; }
  .phero-final { display: block; }
  .phero-veil { opacity: 1; transition: none; }
  .phero-media { transform: scale(0.94); transition: none; }
  .has-js .phero-body { opacity: 1; transform: none; transition: none; }
  .hero-sig .sig-g { fill-opacity: 1; }
  .hero-sig .sig-nib { display: none; }
  .has-js .reveal { opacity: 1; transform: none; transition: none; }
  .thread-node, .thread-square { transition: none; }
}
