/* Editable Peregrine homepage layer over the exported shell. */
html:has(body.peregrine-home) {
  height: 100%;
  overflow: hidden;
}

.peregrine-home {
  height: 100%;
  background: #050a14;
  overflow: hidden;
  overscroll-behavior-y: contain;
  font-family: 'Geist', ui-sans-serif, system-ui, -apple-system, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-feature-settings: 'ss01', 'cv11', 'kern';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.005em;
}

.peregrine-home h1,
.peregrine-home h2,
.peregrine-home h3,
.peregrine-home h4,
.peregrine-home h5,
.peregrine-home h6,
.peregrine-home .ph-brand,
.peregrine-home .ph-kicker,
.peregrine-home .ph-button,
.peregrine-home .ph-morgan-status,
.peregrine-home .ph-morgan-proof,
.peregrine-home .ph-morgan-cta,
.peregrine-home .peregrine-home-nav-cta,
.peregrine-home .ph-nav-link {
  font-family: 'Inter Tight', 'Geist', ui-sans-serif, system-ui, -apple-system, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-feature-settings: 'ss01', 'cv11', 'kern', 'calt';
}

.peregrine-home h1,
.peregrine-home h2 {
  letter-spacing: -0.045em !important;
}

.peregrine-home h3,
.peregrine-home h4 {
  letter-spacing: -0.03em;
}

/* Hide native cursor on devices that have a fine pointer (desktop) */
@media (pointer: fine) {
  .peregrine-home,
  .peregrine-home * {
    cursor: none !important;
  }
}

/* Falcon cursor */
.ph-falcon-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  pointer-events: none;
  z-index: 9000;
  transform: translate3d(-100px, -100px, 0) rotate(-12deg);
  transition: opacity .25s ease;
  will-change: transform;
  opacity: 0;
  mix-blend-mode: screen;
}
.ph-falcon-cursor.is-ready { opacity: 1; }
.ph-falcon-cursor img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 8px rgba(104,199,255,0.55)) drop-shadow(0 0 18px rgba(79,142,247,0.35));
}
@media (pointer: coarse) { .ph-falcon-cursor { display: none; } }
@media (prefers-reduced-motion: reduce) { .ph-falcon-cursor { display: none; } }

/* Intro splash video */
.ph-intro-splash {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: #050a14;
  opacity: 1;
  transition: opacity .9s cubic-bezier(.16, 1, .3, 1);
  pointer-events: none;
}
.ph-intro-splash video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ph-intro-splash.is-leaving { opacity: 0; }
.ph-intro-splash.is-gone { display: none; }
@media (max-width: 767px) { .ph-intro-splash { display: none; } }

/* Cinematic film grain — sits behind sections so it textures the scene without dimming UI */
.peregrine-home::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
  animation: phGrainShift 1.6s steps(6) infinite;
}
@keyframes phGrainShift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -2%); }
  80%  { transform: translate(3%, 1%); }
  100% { transform: translate(0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .peregrine-home::after { animation: none; }
}

/* Cinematic vignette — sits behind sections so it only tints the scene, not buttons or nav */
.peregrine-home::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(5, 10, 20, 0.35) 92%, rgba(5, 10, 20, 0.65) 100%);
}

/* Slide progress rail (driven by anime.js) */
.ph-rail {
  position: fixed;
  top: 50%;
  right: clamp(14px, 2vw, 26px);
  transform: translateY(-50%);
  width: 14px;
  height: clamp(220px, 44vh, 360px);
  z-index: 70;
  pointer-events: none;
}
.ph-rail-track {
  position: relative;
  width: 100%;
  height: 100%;
}
.ph-rail-track::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  margin-left: -0.5px;
  background: linear-gradient(180deg, transparent, rgba(174, 205, 239, 0.18) 12%, rgba(174, 205, 239, 0.18) 88%, transparent);
}
.ph-rail-dot {
  position: absolute;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: rgba(174, 205, 239, 0.22);
  box-shadow: 0 0 0 1px rgba(5, 10, 20, 0.4);
  transition: background .35s ease;
}
.ph-rail-indicator {
  position: absolute;
  top: 0;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  margin-top: -5px;
  border-radius: 50%;
  background: linear-gradient(180deg, #d6f4ff, #4ba7f4);
  box-shadow:
    0 0 14px rgba(104, 199, 255, 0.7),
    0 0 32px rgba(79, 142, 247, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.55) inset;
  will-change: transform;
}
@media (max-width: 767px) { .ph-rail { display: none; } }

/* Keep phone icon SVG ready for stroke draw-in */
.ph-phone-icon path {
  paint-order: stroke fill;
}

/* =========================================================
   Phase 1 — scroll-mode overrides (replaces deck behavior)
   Activated by JS adding .is-scroll-mode to body.peregrine-home
   ========================================================= */
html:has(body.peregrine-home.is-scroll-mode) {
  height: auto;
  overflow-y: auto;
  overflow-x: hidden;
}
.peregrine-home.is-scroll-mode {
  height: auto;
  overflow: visible;
  background: transparent;
}
.peregrine-home.is-scroll-mode main {
  position: relative;
  height: auto;
  overflow: visible;
  perspective: none;
  transform-style: flat;
  background: transparent;
  z-index: 2;
}
.peregrine-home.is-scroll-mode .ph-section {
  position: relative;
  inset: auto;
  width: 100%;
  min-height: 100svh;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
  filter: none !important;
  transition: none !important;
  display: grid;
  place-items: center;
  padding: clamp(96px, 12vh, 132px) clamp(18px, 5vw, 72px);
  background: transparent;
  z-index: 2;
}

/* Text legibility against the cinema scene — drop shadow on key text */
.peregrine-home.is-scroll-mode .ph-section h1,
.peregrine-home.is-scroll-mode .ph-section h2,
.peregrine-home.is-scroll-mode .ph-section h3,
.peregrine-home.is-scroll-mode .ph-section p,
.peregrine-home.is-scroll-mode .ph-section .ph-kicker,
.peregrine-home.is-scroll-mode .ph-section .ph-morgan-status,
.peregrine-home.is-scroll-mode .ph-section .ph-morgan-proof,
.peregrine-home.is-scroll-mode .ph-caption-track,
.peregrine-home.is-scroll-mode .ph-caption-track span {
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.55),
    0 2px 14px rgba(0, 0, 0, 0.75),
    0 0 28px rgba(5, 10, 20, 0.55);
}
/* Voice caption track — give it a scrim halo for readability against any background */
.peregrine-home.is-scroll-mode .ph-caption-track {
  position: relative;
  isolation: isolate;
}
.peregrine-home.is-scroll-mode .ph-caption-track::before {
  content: "";
  position: absolute;
  inset: -8px -42px;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(5, 10, 20, 0.65) 0%, rgba(5, 10, 20, 0.35) 55%, transparent 90%);
  pointer-events: none;
}

/* Persistent cinema canvas behind everything */
.ph-cinema-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  display: block;
}
body:not(.peregrine-home) .ph-cinema-canvas { display: none; }

/* In scroll mode, make the rail dots clickable + tracking smoother */
.peregrine-home.is-scroll-mode .ph-rail-dot {
  pointer-events: auto;
  cursor: none;
  appearance: none;
  border: none;
  padding: 0;
  margin: 0;
  transition: background .28s ease, transform .28s ease;
}
.peregrine-home.is-scroll-mode .ph-rail-dot:hover {
  background: rgba(255, 255, 255, 0.55);
  transform: translate(-50%, -50%) scale(1.4);
}

/* Brain block — stacks the canvas + button vertically so the CTA is always visible */
.ph-brain-block {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(28px, 5vh, 56px);
  width: min(1120px, 92vw);
  max-width: 100%;
}
.ph-brain-block .ph-brain-only {
  width: 100%;
  max-width: min(1120px, 92vw);
}
.ph-brain-block .ph-visual-cta {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  transform: none;
}
.ph-brain-block .ph-visual-cta:hover {
  transform: translateY(-3px);
}
.ph-brain-block .ph-visual-cta::before {
  inset: -16px -36px;
}
@media (max-width: 767px) {
  .ph-brain-block {
    gap: 22px;
  }
  .ph-brain-block .ph-visual-cta {
    width: min(280px, 100%);
    transform: none;
  }
  .ph-brain-block .ph-visual-cta:hover {
    transform: translateY(-2px);
  }
}

/* Lenis core styling */
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-stopped {
  overflow: clip;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.peregrine-home *,
.peregrine-home *::before,
.peregrine-home *::after {
  box-sizing: border-box;
}

.ph-preview-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid rgba(174, 205, 239, .14);
  background: rgba(5, 10, 20, .76);
  backdrop-filter: blur(18px);
}

.ph-preview-header nav {
  height: 68px;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.ph-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #edf5ff;
  font-weight: 900;
  font-size: 18px;
  text-decoration: none;
}

.ph-brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.ph-nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
}

.ph-nav-link {
  color: #9fb3c9;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.ph-nav-link:hover {
  color: #edf5ff;
}

.peregrine-home-nav-cta {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 12px;
  color: #04111f !important;
  background:
    linear-gradient(180deg, #d6f4ff 0%, #80d2ff 45%, #4ba7f4 100%);
  border: 1px solid rgba(225, 248, 255, .78);
  font-size: 13px;
  font-weight: 950;
  text-decoration: none;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .72) inset,
    0 -11px 18px rgba(12, 84, 148, .22) inset,
    0 14px 30px rgba(0, 0, 0, .28),
    0 0 34px rgba(79, 142, 247, .28);
  transition: transform .18s cubic-bezier(.16, 1, .3, 1), box-shadow .18s cubic-bezier(.16, 1, .3, 1);
}

.peregrine-home-nav-cta:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .78) inset,
    0 -11px 18px rgba(12, 84, 148, .2) inset,
    0 18px 38px rgba(0, 0, 0, .32),
    0 0 44px rgba(104, 199, 255, .38);
}

.peregrine-home main {
  position: relative;
  height: 100svh;
  overflow: hidden;
  perspective: 1500px;
  transform-style: preserve-3d;
  background: #050a14;
  color: #edf5ff;
}

.ph-section {
  position: absolute;
  inset: 0;
  min-height: auto;
  overflow: hidden;
  background: #050a14;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 98%, -340px) scale(.84) rotateX(-18deg);
  transform-origin: 50% 50%;
  transition:
    opacity 700ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 760ms cubic-bezier(0.4, 0, 0.2, 1),
    filter 640ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform, filter;
}

.ph-section.is-active {
  z-index: 4;
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1) rotateX(0);
  filter: blur(0);
  transition:
    opacity 820ms cubic-bezier(0.32, 0.72, 0, 1) 60ms,
    transform 900ms cubic-bezier(0.32, 0.72, 0, 1) 60ms,
    filter 700ms cubic-bezier(0.32, 0.72, 0, 1) 60ms;
}

.ph-section.is-prev {
  z-index: 2;
  opacity: 0;
  transform: translate3d(0, -28%, -720px) scale(.58) rotateX(24deg);
  filter: blur(12px);
}

.ph-section.is-next {
  z-index: 1;
  opacity: 0;
  transform: translate3d(0, 82%, -430px) scale(.74) rotateX(-20deg);
  filter: blur(8px);
}

.ph-bg-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .52;
  background-image:
    linear-gradient(rgba(104, 199, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(104, 199, 255, .07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 74%);
}

.ph-hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 112px clamp(18px, 5vw, 72px) 64px;
}

.ph-hero::before,
.ph-agent::before,
.ph-crm::before,
.ph-close::before {
  content: "";
  position: absolute;
  inset: auto -12% -30% 42%;
  height: 520px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(79, 142, 247, .22), transparent 64%);
  filter: blur(22px);
  pointer-events: none;
}

.ph-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1240px, 100%);
  display: grid;
  justify-items: center;
  text-align: center;
}

.ph-hero-copy {
  max-width: 1120px;
}

.ph-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #68c7ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.ph-kicker span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #75dfa6;
  box-shadow: 0 0 18px rgba(117, 223, 166, .7);
}

.ph-hero h1,
.ph-story h2,
.ph-crm-title h2,
.ph-close h2 {
  margin: 22px 0 0;
  max-width: 11ch;
  color: #eef6ff;
  font-size: clamp(4.5rem, 9.6vw, 11rem);
  font-weight: 950;
  line-height: .88;
  letter-spacing: 0;
  text-transform: uppercase;
  animation: phTextArrive .9s cubic-bezier(.16, 1, .3, 1) both;
}

.ph-hero.is-active h1,
.ph-text-scene.is-active h2,
.is-active.ph-close h2 {
  min-height: 1.9em;
}

.ph-report-visual.is-active .ph-morgan-copy h1 {
  min-height: 1.56em;
}

.ph-hero.is-active h1.is-typing-copy::after,
.ph-report-visual.is-active .ph-morgan-copy h1.is-typing-copy::after,
.ph-text-scene.is-active h2.is-typing-copy::after,
.is-active.ph-close h2.is-typing-copy::after {
  content: "";
  display: inline-block;
  width: .055em;
  height: .78em;
  margin-left: .06em;
  vertical-align: -.05em;
  background: #68c7ff;
  box-shadow: 0 0 24px rgba(104, 199, 255, .72);
  animation: phCursor .75s steps(1) infinite;
}

.ph-hero h1 {
  max-width: 13ch;
}

@keyframes phTextArrive {
  from { opacity: 0; transform: translateY(42px) scale(.97); filter: blur(10px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.ph-hero p,
.ph-copy-block p,
.ph-crm-title p,
.ph-close p {
  margin: 24px 0 0;
  max-width: 58ch;
  color: #9fb3c9;
  font-size: clamp(1.05rem, 1.45vw, 1.32rem);
  line-height: 1.62;
}

.ph-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
  justify-content: center;
}

.ph-actions.center {
  justify-content: center;
}

.ph-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 11px;
  border: 1px solid rgba(174, 205, 239, .22);
  color: #edf5ff;
  background:
    linear-gradient(180deg, rgba(27, 47, 71, .96), rgba(8, 18, 32, .94));
  font-weight: 900;
  text-decoration: none;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .12) inset,
    0 -10px 24px rgba(0, 0, 0, .18) inset,
    0 14px 32px rgba(0, 0, 0, .24);
  transition:
    transform .18s cubic-bezier(.16, 1, .3, 1),
    border-color .18s cubic-bezier(.16, 1, .3, 1),
    box-shadow .18s cubic-bezier(.16, 1, .3, 1),
    background .18s cubic-bezier(.16, 1, .3, 1);
}

.ph-button.primary {
  position: relative;
  overflow: hidden;
  color: #06101d;
  background:
    linear-gradient(180deg, #b9edff 0%, #68c7ff 48%, #3f9eec 100%);
  border-color: rgba(208, 239, 255, .62);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .62) inset,
    0 -12px 24px rgba(4, 55, 106, .22) inset,
    0 18px 42px rgba(0, 0, 0, .26),
    0 0 40px rgba(79, 142, 247, .28);
}

.ph-button.primary::after {
  content: "";
  position: absolute;
  inset: -160% -40% auto;
  height: 160%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, .82) 0 1px, transparent 2px),
    linear-gradient(180deg, transparent, rgba(255, 255, 255, .28), transparent);
  background-size: 18px 18px, 100% 100%;
  transform: translateY(-100%) rotate(8deg);
  opacity: 0;
  pointer-events: none;
}

.ph-button.primary:hover::after,
.ph-button.primary:focus-visible::after {
  animation: phLightfall .75s cubic-bezier(.16, 1, .3, 1);
}

.ph-call-button {
  gap: 10px;
  isolation: isolate;
}

.ph-phone-icon {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  fill: currentColor;
  padding: 7px;
  margin-left: -4px;
  overflow: visible;
  border-radius: 999px;
  background: rgba(6, 16, 29, .13);
  box-shadow:
    0 0 0 1px rgba(6, 16, 29, .08) inset,
    0 0 18px rgba(6, 16, 29, .3),
    0 0 30px rgba(117, 223, 166, .44);
  animation: phPhoneGlow 1.8s ease-in-out infinite;
}

@keyframes phPhoneGlow {
  0%, 100% {
    transform: rotate(-5deg) scale(1);
    opacity: .9;
    box-shadow:
      0 0 0 1px rgba(6, 16, 29, .08) inset,
      0 0 18px rgba(6, 16, 29, .3),
      0 0 30px rgba(117, 223, 166, .38);
  }
  50% {
    transform: rotate(6deg) scale(1.13);
    opacity: 1;
    box-shadow:
      0 0 0 1px rgba(6, 16, 29, .08) inset,
      0 0 20px rgba(6, 16, 29, .35),
      0 0 46px rgba(117, 223, 166, .62);
  }
}

@keyframes phLightfall {
  0% { opacity: 0; transform: translateY(-100%) rotate(8deg); }
  18% { opacity: .92; }
  100% { opacity: 0; transform: translateY(124%) rotate(8deg); }
}

.ph-button:hover {
  transform: translateY(-3px);
  border-color: rgba(104, 199, 255, .55);
}

.ph-button:active {
  transform: translateY(1px) scale(.99);
}

.ph-button:focus-visible {
  outline: 3px solid rgba(117, 223, 166, .58);
  outline-offset: 4px;
}

.ph-call-card,
.ph-message-panel,
.ph-crm-console {
  border: 1px solid rgba(174, 205, 239, .18);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(19, 35, 55, .9), rgba(7, 17, 31, .95));
  box-shadow: 0 32px 100px rgba(0, 0, 0, .36);
}

.ph-call-card {
  padding: 22px;
  width: min(520px, 100%);
}

.ph-voice-stage {
  width: min(1280px, 100%);
  min-height: calc(100svh - 92px);
  padding: clamp(2px, 1vw, 12px) 0 clamp(14px, 2vw, 28px);
  display: grid;
  align-content: start;
  justify-items: center;
  gap: clamp(8px, 1.05vw, 14px);
  transform: translateY(clamp(22px, 5svh, 56px));
}

.ph-morgan-status {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-top: clamp(4px, 1.4svh, 14px);
  color: #9fb3c9;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.ph-morgan-status span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #75dfa6;
  box-shadow: 0 0 22px rgba(117, 223, 166, .72);
}

.ph-morgan-copy {
  display: grid;
  justify-items: center;
  text-align: center;
}

.ph-morgan-copy h1 {
  width: min(1120px, 100%);
  min-height: 0;
  margin: 0;
  color: #eef6ff;
  font-size: clamp(4.3rem, 11vw, 12.2rem);
  font-weight: 950;
  line-height: .78;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 0 42px rgba(104, 199, 255, .12);
}

.ph-morgan-copy h1 span {
  display: block;
  white-space: nowrap;
}

.ph-morgan-cta {
  min-width: min(520px, 100%);
  min-height: 70px;
  padding: 0 clamp(22px, 3vw, 34px);
  border-radius: 16px;
  background:
    linear-gradient(180deg, #d8f3ff 0%, #91d9ff 42%, #5aaef7 100%);
  border-color: rgba(224, 248, 255, .82);
  color: #04111f;
  font-size: clamp(1.06rem, 1.55vw, 1.28rem);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .74) inset,
    0 -16px 26px rgba(15, 88, 153, .24) inset,
    0 18px 44px rgba(0, 0, 0, .38),
    0 0 44px rgba(104, 199, 255, .34),
    0 0 92px rgba(117, 223, 166, .16);
  animation: phCallPulse 2.15s cubic-bezier(.16, 1, .3, 1) infinite;
}

.ph-morgan-cta:hover,
.ph-morgan-cta:focus-visible {
  transform: translateY(-3px) scale(1.025);
  border-color: rgba(222, 255, 237, .9);
}

.ph-voice-canvas {
  width: min(860px, 100%);
  height: clamp(96px, 11vw, 145px);
  display: block;
  margin: clamp(-6px, -.8vw, -2px) 0 clamp(-2px, -.4vw, 0px);
  filter: drop-shadow(0 0 38px rgba(104, 199, 255, .26));
}

.ph-caption-track {
  position: relative;
  min-height: 30px;
  margin: 0 auto;
  width: min(820px, 100%);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #9fb3c9;
  font-size: clamp(.74rem, .82vw, .86rem);
  font-weight: 820;
  line-height: 1.2;
  text-align: center;
  opacity: .82;
}

.ph-caption-track span {
  max-width: 64ch;
}

.ph-morgan-proof {
  color: #75dfa6;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}

@keyframes phCallPulse {
  0%, 100% {
    box-shadow:
      0 1px 0 rgba(255, 255, 255, .72) inset,
      0 -16px 26px rgba(15, 88, 153, .24) inset,
      0 18px 44px rgba(0, 0, 0, .38),
      0 0 44px rgba(104, 199, 255, .3),
      0 0 90px rgba(117, 223, 166, .14);
  }
  50% {
    box-shadow:
      0 1px 0 rgba(255, 255, 255, .82) inset,
      0 -16px 26px rgba(15, 88, 153, .18) inset,
      0 20px 50px rgba(0, 0, 0, .42),
      0 0 58px rgba(104, 199, 255, .46),
      0 0 128px rgba(117, 223, 166, .22);
  }
}

.ph-caption-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(7px);
  animation: phCaptionWord .28s cubic-bezier(.16, 1, .3, 1) forwards;
  animation-delay: calc(var(--w) * 34ms);
}

@keyframes phCaptionWord {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ph-card-top,
.ph-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(174, 205, 239, .14);
}

.ph-card-top span,
.ph-panel-head span {
  color: #68c7ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.ph-card-top strong,
.ph-panel-head strong {
  color: #75dfa6;
  font-size: 12px;
  font-weight: 900;
}

.ph-orb {
  width: min(280px, 58vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 34px auto;
  border-radius: 50%;
  border: 1px solid rgba(104, 199, 255, .36);
  background:
    repeating-radial-gradient(circle, rgba(104, 199, 255, .2) 0 1px, transparent 1px 18px),
    radial-gradient(circle, rgba(79, 142, 247, .22), transparent 62%);
}

.ph-orb div {
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(104, 199, 255, .48);
  color: #edf5ff;
  background: #081625;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
  box-shadow: 0 0 46px rgba(79, 142, 247, .32);
}

.ph-call-steps {
  display: grid;
  gap: 10px;
}

.ph-call-steps.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ph-call-steps div {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(174, 205, 239, .13);
  background: rgba(5, 12, 22, .58);
}

.ph-call-steps span {
  color: #68c7ff;
  font-size: 12px;
  font-weight: 900;
}

.ph-call-steps p {
  margin: 0;
  color: #aec0d5;
  font-size: 14px;
}

.ph-inline-link,
.ph-text-link {
  display: inline-flex;
  margin-top: 18px;
  color: #68c7ff;
  font-weight: 900;
  text-decoration: none;
}

.ph-agent,
.ph-text-scene,
.ph-animation-scene,
.ph-crm,
.ph-close {
  padding: clamp(86px, 10vw, 136px) clamp(18px, 5vw, 72px) clamp(42px, 7vw, 92px);
}

.ph-report-visual {
  padding-top: 68px;
  padding-bottom: 24px;
}

.ph-text-scene,
.ph-animation-scene {
  display: grid;
  place-items: center;
}

.ph-text-scene {
  text-align: center;
}

.ph-text-scene .ph-copy-block,
.ph-text-scene .ph-crm-title {
  display: grid;
  justify-items: center;
  width: min(1280px, 100%);
  max-width: 1280px;
}

.ph-agent-grid {
  position: relative;
  z-index: 2;
  width: min(1320px, 100%);
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, .72fr);
  gap: clamp(28px, 5vw, 78px);
  align-items: center;
}

.ph-agent-grid .ph-copy-block {
  justify-items: start;
  text-align: left;
}

.ph-agent-grid .ph-actions {
  justify-content: flex-start;
}

.ph-animation-scene {
  background:
    radial-gradient(circle at 50% 50%, rgba(79, 142, 247, .16), transparent 42%),
    linear-gradient(180deg, #050a14, #07111f 48%, #050a14);
}

.ph-animation-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(104, 199, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(104, 199, 255, .055) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 50%, black, transparent 76%);
}

.ph-scene-wrap {
  position: relative;
  z-index: 2;
  width: min(1240px, 100%);
  display: grid;
  justify-items: center;
}

.ph-story {
  position: relative;
  z-index: 2;
  width: min(1240px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(380px, .74fr);
  gap: clamp(32px, 6vw, 82px);
  align-items: center;
}

.ph-visual-only {
  grid-template-columns: minmax(300px, .55fr) minmax(420px, .8fr);
}

.ph-copy-block h3 {
  margin: 18px 0 0;
  max-width: 11ch;
  color: #eef6ff;
  font-size: clamp(2.6rem, 4.8vw, 5.5rem);
  font-weight: 950;
  line-height: .96;
  letter-spacing: 0;
}

.ph-story h2,
.ph-crm-title h2,
.ph-close h2 {
  font-size: clamp(3rem, 5.8vw, 7.2rem);
  max-width: 17ch;
}

.ph-agent-text h2 {
  max-width: 18ch;
  font-size: clamp(3rem, 5.8vw, 7.2rem);
  line-height: .92;
}

.ph-agent-chat {
  position: relative;
  min-height: min(620px, 68svh);
  padding: clamp(18px, 2vw, 26px);
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 14px;
  border: 1px solid rgba(104, 199, 255, .18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 22% 8%, rgba(104, 199, 255, .18), transparent 28%),
    linear-gradient(180deg, rgba(13, 29, 48, .78), rgba(4, 10, 19, .86));
  box-shadow:
    0 36px 120px rgba(0, 0, 0, .4),
    0 0 90px rgba(79, 142, 247, .14);
  overflow: hidden;
}

.ph-agent-chat::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(104, 199, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(104, 199, 255, .055) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black, transparent 84%);
}

.ph-agent-chat-head,
.ph-agent-chat-log,
.ph-agent-chat-form,
.ph-agent-chat-audit {
  position: relative;
  z-index: 2;
}

.ph-agent-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(174, 205, 239, .13);
}

.ph-agent-chat-head span {
  color: #68c7ff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.ph-agent-chat-head strong {
  color: #75dfa6;
  font-size: 12px;
  font-weight: 900;
}

.ph-agent-chat-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 4px 3px 2px;
  scrollbar-width: thin;
}

.ph-agent-bubble {
  width: fit-content;
  max-width: 86%;
  padding: 13px 15px;
  border: 1px solid rgba(174, 205, 239, .13);
  border-radius: 16px;
  color: #dcecff;
  background: rgba(5, 12, 22, .66);
  font-size: clamp(.93rem, 1.05vw, 1.04rem);
  font-weight: 720;
  line-height: 1.42;
  animation: phBubbleIn .38s cubic-bezier(.16, 1, .3, 1) both;
}

.ph-agent-bubble.ai {
  align-self: flex-start;
  border-top-left-radius: 5px;
  box-shadow: 0 0 40px rgba(104, 199, 255, .08);
}

.ph-agent-bubble.user {
  align-self: flex-end;
  border-color: rgba(104, 199, 255, .32);
  border-top-right-radius: 5px;
  color: #06101d;
  background: #68c7ff;
}

@keyframes phBubbleIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.ph-agent-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.ph-agent-chat-form input {
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(174, 205, 239, .17);
  border-radius: 10px;
  color: #edf5ff;
  background: rgba(3, 9, 17, .72);
  font: inherit;
  font-weight: 720;
  outline: none;
}

.ph-agent-chat-form input:focus {
  border-color: rgba(104, 199, 255, .72);
  box-shadow: 0 0 0 4px rgba(104, 199, 255, .12);
}

.ph-agent-chat-form button,
.ph-agent-chat-audit {
  min-height: 48px;
  border: 1px solid rgba(208, 239, 255, .58);
  border-radius: 10px;
  color: #06101d;
  background: #68c7ff;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.ph-agent-chat-form button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.ph-agent-chat-audit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .35s cubic-bezier(.16, 1, .3, 1), transform .35s cubic-bezier(.16, 1, .3, 1);
}

.ph-agent-chat-audit.is-ready {
  opacity: 1;
  transform: translateY(0);
}

.ph-system-text h2,
.ph-crm-text h2,
.ph-close h2 {
  max-width: 17ch;
  font-size: clamp(3.2rem, 6vw, 7.6rem);
  line-height: .92;
}

.ph-agent-text .ph-copy-block p {
  max-width: 60ch;
  margin-top: clamp(24px, 3.5vw, 42px);
  color: #d6e5f6;
  font-size: clamp(1.18rem, 1.72vw, 2rem);
  font-weight: 760;
  line-height: 1.28;
}

.ph-crm-text h2 {
  max-width: 13ch;
}

.ph-message-panel {
  padding: 22px;
  width: min(980px, 100%);
  min-height: 560px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.ph-chat-scene {
  position: relative;
  z-index: 2;
  width: min(1040px, 100%);
  display: grid;
  justify-items: center;
}

.ph-chat-line {
  width: fit-content;
  max-width: 88%;
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid rgba(174, 205, 239, .14);
  color: #d9e8f8;
  background: rgba(5, 12, 22, .72);
  line-height: 1.45;
  opacity: 0;
  transform: translateY(12px);
}

.ph-chat-line.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .45s cubic-bezier(.16, 1, .3, 1), transform .45s cubic-bezier(.16, 1, .3, 1);
}

.ph-chat-line::after {
  content: none;
}

.ph-chat-line.is-typing::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 1.05em;
  margin-left: 4px;
  vertical-align: -2px;
  background: #68c7ff;
  animation: phCursor .8s steps(1) infinite;
}

@keyframes phCursor {
  50% { opacity: 0; }
}

.ph-chat-line.owner {
  justify-self: end;
  background: rgba(104, 199, 255, .12);
  border-color: rgba(104, 199, 255, .28);
}

.ph-chat-line.agent {
  justify-self: start;
}

@keyframes phChatIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.ph-message-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .45s cubic-bezier(.16, 1, .3, 1), transform .45s cubic-bezier(.16, 1, .3, 1);
}

.ph-message-actions.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ph-message-actions button {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid rgba(104, 199, 255, .25);
  border-radius: 8px;
  color: #edf5ff;
  background: rgba(104, 199, 255, .1);
  font-weight: 850;
}

.ph-crm-inner {
  position: relative;
  z-index: 2;
  width: min(1240px, 100%);
  margin: 0 auto;
}

.ph-crm-title {
  max-width: 940px;
  margin-bottom: 0;
}

.ph-crm-title h2 {
  max-width: 13ch;
}

.ph-crm-grid {
  display: grid;
  grid-template-columns: minmax(420px, .98fr) minmax(380px, .72fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: stretch;
}

.ph-brain-only {
  position: relative;
  z-index: 2;
  width: min(1120px, 86vw);
  height: min(680px, 70svh);
  min-height: 520px;
  margin: 0 auto;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 46%, rgba(104, 199, 255, .2), transparent 23%),
    radial-gradient(circle at 50% 52%, rgba(67, 236, 159, .13), transparent 47%),
    linear-gradient(180deg, rgba(7, 18, 33, .28), rgba(5, 10, 20, .06));
}

.ph-brain-only::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 1px solid rgba(104, 199, 255, .12);
  box-shadow:
    0 0 0 48px rgba(104, 199, 255, .035),
    0 0 0 104px rgba(104, 199, 255, .024),
    0 0 120px rgba(104, 199, 255, .18);
  pointer-events: none;
}

.ph-visual-cta {
  position: absolute;
  left: 50%;
  bottom: clamp(56px, 6.5vw, 92px);
  z-index: 12;
  transform: translateX(-50%);
  min-height: 58px;
  padding: 0 clamp(22px, 2.6vw, 32px);
  font-size: clamp(0.98rem, 1.15vw, 1.08rem);
  border-radius: 14px;
  letter-spacing: -0.01em;
  isolation: isolate;
  background:
    linear-gradient(180deg, #e2f7ff 0%, #79ccff 46%, #3f9eec 100%);
  border-color: rgba(225, 248, 255, .82);
  color: #04111f !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .78) inset,
    0 -12px 22px rgba(8, 64, 120, .26) inset,
    0 18px 44px rgba(0, 0, 0, .42),
    0 0 38px rgba(104, 199, 255, .42),
    0 0 88px rgba(79, 142, 247, .26);
}

.ph-visual-cta::before {
  content: "";
  position: absolute;
  inset: -28px -52px;
  z-index: -1;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at center, rgba(5, 10, 20, 0.65) 0%, rgba(5, 10, 20, 0.35) 45%, transparent 75%);
  pointer-events: none;
  opacity: 0.95;
}

.ph-visual-cta::after {
  content: "→";
  display: inline-block;
  margin-left: 10px;
  font-weight: 950;
  transform: translateX(0);
  transition: transform .26s cubic-bezier(0.32, 0.72, 0, 1);
}

.ph-visual-cta:hover {
  transform: translateX(-50%) translateY(-3px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .82) inset,
    0 -12px 22px rgba(8, 64, 120, .22) inset,
    0 22px 54px rgba(0, 0, 0, .48),
    0 0 50px rgba(104, 199, 255, .56),
    0 0 110px rgba(79, 142, 247, .36);
}

.ph-visual-cta:hover::after {
  transform: translateX(4px);
}

.ph-flow-stage {
  position: relative;
  z-index: 2;
  width: min(1060px, 88vw);
  height: min(640px, 68svh);
  min-height: 500px;
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.ph-flow-stage::before,
.ph-flow-stage::after {
  content: "";
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  border: 1px solid rgba(104, 199, 255, .22);
  box-shadow: 0 0 70px rgba(104, 199, 255, .12);
  animation: phOrbitPulse 5s ease-in-out infinite;
}

.ph-flow-stage::after {
  inset: 25%;
  border-color: rgba(117, 223, 166, .18);
  animation-delay: -1.5s;
}

@keyframes phOrbitPulse {
  0%, 100% { transform: scale(.96); opacity: .5; }
  50% { transform: scale(1.04); opacity: .9; }
}

.ph-flow-core {
  width: clamp(150px, 18vw, 220px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(104, 199, 255, .42);
  color: #edf5ff;
  background: rgba(5, 12, 22, .9);
  font-weight: 950;
  text-align: center;
  box-shadow: 0 0 90px rgba(79, 142, 247, .34);
}

.ph-flow-item {
  position: absolute;
  min-width: 170px;
  padding: 13px 15px;
  border: 1px solid rgba(174, 205, 239, .16);
  border-radius: 12px;
  background: rgba(5, 12, 22, .76);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .28);
  animation: phFlowFloat 5.8s ease-in-out infinite;
}

.ph-flow-item span {
  display: block;
  color: #9fb3c9;
  font-size: 12px;
  font-weight: 850;
}

.ph-flow-item strong {
  display: block;
  margin-top: 3px;
  color: #edf5ff;
  font-size: 22px;
  line-height: 1;
}

.ph-flow-item.blue { left: 6%; top: 18%; }
.ph-flow-item.green { right: 8%; top: 20%; animation-delay: -.7s; }
.ph-flow-item.violet { left: 14%; bottom: 24%; animation-delay: -1.4s; }
.ph-flow-item.amber { right: 12%; bottom: 25%; animation-delay: -2.1s; }
.ph-flow-item.alt { left: 50%; top: 6%; transform: translateX(-50%); animation-delay: -2.8s; }

.ph-flow-item.blue strong { color: #68c7ff; }
.ph-flow-item.green strong { color: #75dfa6; }
.ph-flow-item.violet strong { color: #b9a4ff; }
.ph-flow-item.amber strong { color: #f6c86b; }

@keyframes phFlowFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -14px; }
}

.ph-video-stage {
  position: relative;
  z-index: 2;
  width: min(1180px, 88vw);
  height: min(680px, 70svh);
  min-height: 520px;
  display: grid;
  place-items: center;
}

.ph-crm-video {
  width: 100%;
  height: 100%;
  display: block;
  border: 1px solid rgba(104, 199, 255, .18);
  border-radius: 22px;
  object-fit: cover;
  background: #050a14;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .03) inset,
    0 42px 120px rgba(0, 0, 0, .44),
    0 0 90px rgba(79, 142, 247, .16);
}

.ph-video-stage-final {
  width: min(1220px, 90vw);
  height: min(720px, 74svh);
}

.ph-sound-toggle {
  position: absolute;
  left: 50%;
  bottom: clamp(22px, 5vw, 52px);
  z-index: 6;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(208, 239, 255, .56);
  border-radius: 999px;
  color: #06101d;
  background: #68c7ff;
  font-weight: 950;
  cursor: pointer;
  transform: translateX(-50%);
  box-shadow: 0 0 42px rgba(79, 142, 247, .34);
}

.ph-sound-toggle.is-on {
  color: #d8f7e8;
  background: rgba(5, 12, 22, .78);
  border-color: rgba(117, 223, 166, .38);
}

.ph-under-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}

.ph-brain-crm {
  position: relative;
  min-height: 620px;
  border: 1px solid rgba(104, 199, 255, .2);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 48%, rgba(104, 199, 255, .24), transparent 22%),
    radial-gradient(circle at 50% 48%, rgba(117, 223, 166, .12), transparent 46%),
    linear-gradient(180deg, rgba(12, 24, 38, .86), rgba(5, 12, 22, .94));
  overflow: hidden;
}

.ph-crm-canvas,
.ph-crm-labels {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ph-brain-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 150px;
  height: 150px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(104, 199, 255, .48);
  color: #edf5ff;
  background: #081625;
  font-weight: 950;
  text-align: center;
  box-shadow: 0 0 70px rgba(79, 142, 247, .38);
  z-index: 2;
}

.ph-node {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -50%);
  padding: 9px 11px;
  border: 1px solid rgba(104, 199, 255, .42);
  border-radius: 999px;
  color: #edf5ff;
  background: rgba(5, 12, 22, .78);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 0 28px rgba(79, 142, 247, .18);
  transition: opacity .2s ease;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.ph-node.is-dragging {
  cursor: grabbing;
  border-color: rgba(117, 223, 166, .78);
  background: rgba(7, 20, 34, .94);
  box-shadow: 0 0 42px rgba(117, 223, 166, .34);
}

@keyframes phFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.ph-crm-console {
  padding: 22px;
  display: grid;
  gap: 12px;
}

.ph-crm-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 15px;
  border: 1px solid rgba(174, 205, 239, .14);
  background: rgba(5, 12, 22, .64);
}

.ph-crm-item span {
  color: #aec0d5;
}

.ph-crm-item strong {
  font-size: 13px;
}

.ph-crm-item.blue strong { color: #68c7ff; }
.ph-crm-item.green strong { color: #75dfa6; }
.ph-crm-item.violet strong { color: #b9a4ff; }
.ph-crm-item.amber strong { color: #f6c86b; }

.ph-learning {
  margin-top: 8px;
  padding: 18px;
  border: 1px solid rgba(117, 223, 166, .2);
  background: rgba(117, 223, 166, .07);
}

.ph-learning span {
  color: #75dfa6;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.ph-learning p {
  margin: 10px 0 0;
  color: #b8c8d8;
  line-height: 1.55;
}

.ph-close {
  display: grid;
  place-items: center;
  text-align: center;
  padding-left: clamp(18px, 5vw, 72px);
  padding-right: clamp(18px, 5vw, 72px);
}

.ph-close > div {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.ph-close h2 {
  max-width: 14ch;
  text-align: center;
}

.ph-close p {
  max-width: 62ch;
}

.ph-audit-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}

.ph-audit-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ph-modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 38%, rgba(104, 199, 255, .18), transparent 42%),
    rgba(2, 6, 14, .82);
  backdrop-filter: blur(16px);
}

.ph-modal-card {
  position: relative;
  z-index: 2;
  width: min(680px, 100%);
  max-height: min(760px, calc(100svh - 40px));
  overflow: auto;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(174, 205, 239, .18);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(19, 35, 55, .96), rgba(7, 17, 31, .98));
  box-shadow: 0 40px 120px rgba(0, 0, 0, .48);
  transform: translateY(16px) scale(.98);
  transition: transform .32s cubic-bezier(.16, 1, .3, 1);
}

.ph-audit-modal.is-open .ph-modal-card {
  transform: translateY(0) scale(1);
}

.ph-modal-card h3 {
  margin: 18px 0 0;
  color: #edf5ff;
  font-size: clamp(2.1rem, 4.4vw, 4rem);
  line-height: .94;
}

.ph-modal-card p {
  margin: 14px 0 0;
  color: #9fb3c9;
  line-height: 1.55;
}

.ph-modal-close {
  position: absolute;
  right: 16px;
  top: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(174, 205, 239, .16);
  border-radius: 9px;
  color: #edf5ff;
  background: rgba(5, 12, 22, .72);
  font-size: 24px;
  cursor: pointer;
}

.ph-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin: 22px 0 16px;
}

.ph-modal-grid .wide,
.ph-modal-card .wide {
  grid-column: 1 / -1;
}

.ph-modal-card .ph-button.wide {
  width: 100%;
}

.ph-modal-submit {
  min-height: 58px;
  gap: 10px;
  border-radius: 13px;
  font-size: 1rem;
}

.ph-modal-call-action {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 68px;
  width: 100%;
  padding: 0 20px;
  background:
    linear-gradient(180deg, #b9ffd8 0%, #6fe6a4 50%, #3fc57c 100%) !important;
  border-color: rgba(225, 255, 238, .78) !important;
  color: #05120c !important;
  text-align: left;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .65) inset,
    0 -14px 24px rgba(16, 100, 58, .22) inset,
    0 20px 46px rgba(0, 0, 0, .3),
    0 0 46px rgba(117, 223, 166, .34) !important;
}

.ph-modal-call-action .ph-phone-icon {
  width: 28px;
  height: 28px;
  margin-left: 0;
}

.ph-modal-call-action span {
  display: block;
  line-height: 1;
}

.ph-modal-call-action strong {
  display: block;
  color: #05120c;
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  line-height: 1;
}

.ph-modal-call-action small {
  display: block;
  margin-top: 5px;
  color: rgba(5, 18, 12, .68);
  font-size: .82rem;
  font-weight: 950;
  line-height: 1;
}

.ph-modal-grid input,
.ph-modal-grid textarea {
  box-sizing: border-box;
  min-height: 48px;
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(174, 205, 239, .16);
  border-radius: 9px;
  padding: 0 14px;
  color: #edf5ff;
  background: rgba(5, 12, 22, .78);
  font: inherit;
}

.ph-modal-grid textarea {
  min-height: 106px;
  padding-top: 13px;
  resize: vertical;
}

.ph-modal-grid input:focus,
.ph-modal-grid textarea:focus {
  outline: 2px solid rgba(104, 199, 255, .42);
  border-color: rgba(104, 199, 255, .55);
}

.ph-modal-result {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(174, 205, 239, .16);
  border-radius: 9px;
  color: #c8d7e7;
  background: rgba(5, 12, 22, .6);
  line-height: 1.45;
}

.ph-modal-result.success {
  border-color: rgba(117, 223, 166, .32);
  background: rgba(117, 223, 166, .08);
}

.ph-modal-result.error {
  border-color: rgba(255, 111, 111, .35);
  background: rgba(255, 111, 111, .08);
}

.ph-modal-result a {
  color: #68c7ff;
  font-weight: 900;
}

@media (max-width: 980px) {
  .ph-hero-inner,
  .ph-story,
  .ph-crm-grid,
  .ph-agent-grid {
    grid-template-columns: 1fr;
  }

  .ph-agent-grid .ph-copy-block {
    justify-items: center;
    text-align: center;
  }

  .ph-agent-grid .ph-actions {
    justify-content: center;
  }

  .ph-agent-chat {
    width: min(680px, 100%);
    min-height: 390px;
  }

  .ph-hero {
    padding-top: 96px;
  }

  .ph-voice-stage {
    padding-left: 12px;
    padding-right: 12px;
  }

  .ph-morgan-copy h1 {
    font-size: clamp(2.8rem, 10vw, 6.2rem);
  }

  .ph-call-card,
  .ph-message-panel,
  .ph-crm-console {
    max-width: 680px;
  }

  .ph-brain-crm {
    min-height: 520px;
  }

  .ph-brain-only,
  .ph-flow-stage,
  .ph-video-stage {
    width: min(720px, 92vw);
    min-height: 500px;
  }

  .ph-call-steps.compact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  html:has(body.peregrine-home),
  .peregrine-home {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .peregrine-home main {
    width: 100vw;
    max-width: 100vw;
    overflow: hidden;
    perspective: none;
    transform-style: flat;
  }

  .ph-section {
    inset: 0 auto auto 0;
    width: 100vw;
    max-width: 100vw;
    height: 100svh;
    overflow: hidden;
    transform-origin: 50% 50%;
  }

  .ph-section.is-active {
    transform: none;
  }

  .ph-section.is-prev,
  .ph-section.is-next {
    transform: translateY(100%);
  }

  .ph-preview-header nav {
    height: 64px;
    width: min(100% - 28px, 1240px);
    gap: 12px;
  }

  .ph-brand {
    min-width: 0;
    gap: 8px;
    font-size: 17px;
  }

  .ph-brand img {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
  }

  .ph-nav-links {
    gap: 8px;
  }

  .ph-nav-link {
    display: none;
  }

  .peregrine-home-nav-cta {
    min-height: 36px;
    padding: 0 12px;
    font-size: 12px;
  }

  .ph-report-visual,
  .ph-agent,
  .ph-text-scene,
  .ph-animation-scene,
  .ph-crm,
  .ph-close {
    padding: 88px 16px 24px;
  }

  .ph-scene-wrap,
  .ph-text-scene .ph-copy-block,
  .ph-text-scene .ph-crm-title,
  .ph-agent-grid,
  .ph-video-stage,
  .ph-brain-only {
    width: 100%;
    max-width: 100%;
  }

  .ph-agent-grid {
    justify-items: center;
    gap: 18px;
  }

  .ph-agent-grid .ph-copy-block {
    width: 100%;
    justify-items: center;
  }

  .ph-text-scene,
  .ph-animation-scene,
  .ph-close {
    align-content: center;
    place-items: center;
  }

  .ph-text-scene > .ph-copy-block,
  .ph-text-scene > .ph-crm-title,
  .ph-close > div {
    position: absolute;
    left: 50%;
    right: auto;
    top: 50%;
    width: min(300px, calc(100vw - 48px));
    max-width: calc(100vw - 48px);
    transform: translate(-50%, -50%);
  }

  .ph-agent-grid {
    position: absolute;
    left: 50%;
    right: auto;
    top: 52%;
    width: min(260px, calc(100vw - 72px));
    max-width: calc(100vw - 72px);
    transform: translate(-50%, -50%);
  }

  .ph-hero h1,
  .ph-story h2,
  .ph-agent-text h2,
  .ph-system-text h2,
  .ph-crm-title h2,
  .ph-close h2 {
    width: min(100%, 358px);
    max-width: calc(100vw - 32px);
    font-size: clamp(2.35rem, 10.6vw, 3.05rem);
    line-height: .98;
    text-align: center;
    text-wrap: balance;
    overflow-wrap: normal;
  }

  .ph-agent-text h2 {
    width: min(100%, 296px);
    margin-left: auto;
    margin-right: auto;
    font-size: clamp(1.92rem, 8.2vw, 2.28rem);
    line-height: 1.02;
  }

  .ph-system-text h2,
  .ph-crm-text h2,
  .ph-close h2 {
    width: min(100%, 268px);
    font-size: clamp(1.92rem, 8vw, 2.2rem);
    line-height: .98;
  }

  .ph-close h2 {
    width: min(100%, 252px);
    font-size: clamp(1.82rem, 7.4vw, 2.05rem);
    line-height: .98;
  }

  .ph-kicker {
    max-width: calc(100vw - 32px);
    justify-content: center;
    gap: 8px;
    font-size: 10px;
    letter-spacing: .14em;
    text-align: center;
  }

  .ph-actions,
  .ph-actions.center {
    align-items: stretch;
    flex-direction: column;
    width: min(100%, 236px);
    max-width: calc(100vw - 64px);
    margin-top: 24px;
    margin-left: auto;
    margin-right: auto;
  }

  .ph-button {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 0 14px;
    font-size: .86rem;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
  }

  .ph-voice-stage {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    min-height: calc(100svh - 88px);
    padding: 0;
    align-content: center;
    justify-items: center;
    gap: 12px;
    transform: none;
  }

  .ph-morgan-status {
    max-width: 100%;
    margin-top: 0;
    gap: 8px;
    font-size: 10px;
    letter-spacing: .12em;
    white-space: normal;
    text-align: center;
  }

  .ph-morgan-copy {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
  }

  .ph-morgan-copy h1 {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    font-size: clamp(2.35rem, 11.5vw, 2.85rem);
    line-height: .9;
    letter-spacing: -.025em;
  }

  .ph-morgan-copy h1 span {
    width: 100%;
    max-width: 100%;
    white-space: normal;
  }

  .ph-morgan-cta {
    width: 100%;
    max-width: 300px;
    min-width: 0;
    min-height: 56px;
    padding-inline: 12px;
    border-radius: 14px;
    font-size: .78rem;
    justify-self: center;
    overflow: hidden;
  }

  .ph-call-button {
    gap: 8px;
  }

  .ph-call-button span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .ph-phone-icon {
    width: 18px;
    height: 18px;
    padding: 6px;
    margin-left: 0;
  }

  .ph-voice-canvas {
    width: 100%;
    height: clamp(74px, 21vw, 96px);
    margin: 0;
  }

  .ph-call-card {
    padding: 16px;
  }

  .ph-orb {
    width: min(220px, 68vw);
  }

  .ph-message-panel {
    min-height: auto;
  }

  .ph-agent-chat {
    width: 100%;
    min-height: 0;
    max-height: 236px;
    padding: 14px;
    border-radius: 16px;
  }

  .ph-agent-chat-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .ph-agent-chat-form {
    grid-template-columns: 1fr;
  }

  .ph-agent-chat-log {
    max-height: 120px;
  }

  .ph-agent-bubble {
    max-width: 100%;
    padding: 11px 12px;
    font-size: .82rem;
  }

  .ph-caption-track {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    min-height: 44px;
    padding: 0 4px;
    font-size: .72rem;
    line-height: 1.18;
  }

  .ph-caption-track span {
    max-width: 32ch;
  }

  .ph-morgan-proof {
    max-width: 30ch;
    font-size: 10px;
    line-height: 1.35;
    text-align: center;
  }

  .ph-crm-grid {
    gap: 22px;
  }

  .ph-brain-crm {
    min-height: 430px;
  }

  .ph-brain-only,
  .ph-flow-stage,
  .ph-video-stage {
    position: absolute;
    left: 50%;
    top: 52%;
    width: min(260px, calc(100vw - 72px));
    max-width: calc(100vw - 72px);
    min-height: 0;
    height: auto;
    transform: translate(-50%, -50%);
  }

  .ph-brain-only {
    display: grid;
    place-items: center;
    height: min(430px, 54svh);
    border-radius: 18px;
  }

  .ph-brain-only::before {
    inset: 18%;
    box-shadow:
      0 0 0 30px rgba(104, 199, 255, .035),
      0 0 0 64px rgba(104, 199, 255, .024),
      0 0 90px rgba(104, 199, 255, .16);
  }

  .ph-brain-core {
    width: 112px;
    height: 112px;
    font-size: .92rem;
  }

  .ph-node {
    max-width: 118px;
    padding: 6px 8px;
    font-size: 10px;
    line-height: 1.08;
    white-space: normal;
    text-align: center;
  }

  .ph-crm-labels {
    display: none;
  }

  .ph-video-stage {
    display: flex;
    flex-direction: column;
    gap: 18px;
    justify-content: center;
  }

  .ph-crm-video {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    max-height: 44svh;
    border-radius: 18px;
    object-fit: cover;
  }

  .ph-visual-cta {
    position: static;
    left: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
  }

  .ph-visual-cta:hover {
    transform: translateY(-2px);
  }

  .ph-brain-only .ph-visual-cta {
    position: absolute;
    left: 50%;
    right: auto;
    bottom: 14px;
    width: min(236px, calc(100% - 32px));
    max-width: 236px;
    transform: translateX(-50%);
  }

  .ph-brain-only .ph-visual-cta:hover {
    transform: translateX(-50%) translateY(-2px);
  }

  .ph-flow-item {
    min-width: 132px;
    padding: 10px 11px;
  }

  .ph-flow-item strong {
    font-size: 17px;
  }

  .ph-modal-grid {
    grid-template-columns: 1fr;
  }

  .ph-node {
    font-size: 10px;
    padding: 7px 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ph-section,
  .ph-button.primary::after,
  .ph-morgan-cta,
  .ph-chat-line,
  .ph-agent-bubble,
  .ph-agent-chat-audit,
  .ph-phone-icon,
  .ph-brain-crm::before,
  .ph-node,
  .ph-flow-stage::before,
  .ph-flow-stage::after,
  .ph-flow-item {
    animation: none !important;
    transition: none !important;
  }

  .ph-section,
  .ph-section.is-active,
  .ph-section.is-prev,
  .ph-section.is-next {
    transform: none;
    filter: none;
  }
}

/* Mobile production fallback: the desktop WebGL cinema canvas is disabled on phones,
   so direct section links like /#morgan need their own solid stage background. */
@media (max-width: 767px) {
  html:has(body.peregrine-home),
  .peregrine-home,
  .peregrine-home.is-scroll-mode {
    background-color: #050a14 !important;
    background-image:
      radial-gradient(circle at 18% 6%, rgba(104, 199, 255, 0.18), transparent 34vh),
      radial-gradient(circle at 86% 20%, rgba(79, 142, 247, 0.13), transparent 31vh),
      linear-gradient(180deg, #061225 0%, #050a14 44%, #030812 100%) !important;
    background-attachment: fixed;
  }

  .ph-cinema-canvas {
    display: none !important;
  }

  .peregrine-home main,
  .peregrine-home.is-scroll-mode main {
    background:
      linear-gradient(180deg, rgba(5, 10, 20, 0.08), rgba(5, 10, 20, 0.36)),
      transparent !important;
  }

  .ph-section,
  .peregrine-home.is-scroll-mode .ph-section {
    background:
      radial-gradient(circle at 50% 12%, rgba(104, 199, 255, 0.1), transparent 42%),
      linear-gradient(180deg, rgba(6, 18, 37, 0.92) 0%, rgba(5, 10, 20, 0.86) 50%, rgba(3, 8, 18, 0.96) 100%) !important;
  }

  .ph-report-visual,
  .peregrine-home.is-scroll-mode .ph-report-visual {
    background:
      radial-gradient(circle at 50% 24%, rgba(104, 199, 255, 0.16), transparent 36%),
      radial-gradient(circle at 18% 76%, rgba(117, 223, 166, 0.08), transparent 30%),
      linear-gradient(180deg, #07172c 0%, #050a14 54%, #030812 100%) !important;
  }

  .peregrine-home.is-scroll-mode .ph-section,
  .ph-section {
    min-height: 100svh;
    height: auto;
    padding: 84px 18px 32px !important;
  }

  .ph-scene-wrap,
  .ph-voice-stage,
  .ph-text-scene > .ph-copy-block,
  .ph-text-scene > .ph-crm-title,
  .ph-agent-grid,
  .ph-video-stage,
  .ph-brain-only,
  .ph-flow-stage,
  .ph-close > div {
    width: calc(100vw - 36px) !important;
    max-width: 390px !important;
  }

  .ph-text-scene > .ph-copy-block,
  .ph-text-scene > .ph-crm-title,
  .ph-agent-grid,
  .ph-video-stage,
  .ph-brain-only,
  .ph-flow-stage,
  .ph-close > div {
    left: 50%;
    top: 52%;
    transform: translate(-50%, -50%);
  }

  .ph-voice-stage {
    min-height: calc(100svh - 116px);
    gap: 16px;
    align-content: center;
  }

  .ph-morgan-copy,
  .ph-morgan-copy h1,
  .ph-caption-track {
    width: 100% !important;
    max-width: 100% !important;
  }

  .ph-morgan-copy h1 {
    font-size: clamp(3.35rem, 18vw, 5rem);
    line-height: .82;
  }

  .ph-hero h1,
  .ph-story h2,
  .ph-agent-text h2,
  .ph-system-text h2,
  .ph-crm-title h2,
  .ph-close h2 {
    width: 100% !important;
    max-width: 100% !important;
    font-size: clamp(2.65rem, 12.5vw, 4rem);
    line-height: .94;
  }

  .ph-agent-text h2,
  .ph-system-text h2,
  .ph-crm-text h2,
  .ph-close h2 {
    font-size: clamp(2.45rem, 11.5vw, 3.6rem);
  }

  .ph-copy-block p,
  .ph-crm-title p,
  .ph-close p {
    max-width: 34ch;
    font-size: 1rem;
    line-height: 1.48;
  }

  .ph-morgan-cta,
  .ph-actions,
  .ph-actions.center,
  .ph-visual-cta {
    width: 100% !important;
    max-width: 340px !important;
  }

  .ph-morgan-cta {
    min-height: 62px;
    font-size: .92rem;
  }

  .ph-voice-canvas {
    height: clamp(92px, 27vw, 124px);
  }

  .ph-agent-chat {
    max-height: 42svh;
  }

  .ph-agent-chat-log {
    max-height: 22svh;
  }

  .ph-brain-only {
    height: min(520px, 62svh);
  }

  .ph-brain-core {
    width: 136px;
    height: 136px;
  }

  .ph-node {
    max-width: 136px;
  }
}
