/* PIM-TNG reference consolidation — pass 4
   Fine-detail polish. Text/navigation are intentionally untouched. */

:root {
  --p4-max-heading: 50px;
  --p4-section-y: clamp(58px, 6.5vw, 92px);
  --p4-hero-y: clamp(46px, 5.4vw, 76px);
  --p4-rule: #d4e1ea;
  --p4-rule-strong: #bdd3e2;
  --p4-muted: #53697b;
  --p4-soft: #f5f8fb;
}

/* ------------------------------------------------------------
   TYPE SCALE — requested hard ceiling: no heading above 50px.
   ------------------------------------------------------------ */
.pim-h1 {
  font-size: clamp(38px, 4.2vw, var(--p4-max-heading)) !important;
  line-height: .96 !important;
  letter-spacing: -.045em !important;
  text-wrap: balance;
}

.pim-h2 {
  font-size: clamp(29px, 3vw, 40px) !important;
  line-height: 1.02 !important;
  letter-spacing: -.035em !important;
  text-wrap: balance;
}

.pim-h3, .pim-study-headline {
  font-size: min(22px, 1.375rem) !important;
  line-height: 1.12 !important;
  letter-spacing: -.022em !important;
}

/* Local exceptions that were deliberately oversized in earlier passes. */
.home-hero .pim-flow-payoff .pim-h1,
.site-page--features .feature-page-hero .pim-h1,
.consult-page > .pim-pagehero .pim-h1,
.site-page--agent .agent-page-hero .pim-h1,
.security-page > .page-hero .pim-h1,
.site-page--pricing .pim-pagehero .pim-h1,
.site-page--cases .pim-pagehero .pim-h1 {
  font-size: clamp(40px, 4vw, 50px) !important;
}

.pim-lede,
.pim-hero-support,
.page-hero-copy > p:not(.pim-eyebrow) {
  color: var(--p4-muted);
  line-height: 1.58;
}

.home-hero .pim-lede,
.site-page--agent .pim-pagehero .pim-lede,
.site-page--agent .pim-pagehero .pim-hero-support {
  color: rgba(231,243,252,.76);
}

.pim-eyebrow {
  letter-spacing: .075em;
  font-weight: 760;
}

/* ------------------------------------------------------------
   NAV — lighter visual weight, same items and destinations.
   ------------------------------------------------------------ */
.pim-nav .pim-shell,
.site-nav .pim-shell,
.pim-header .pim-shell {
  min-height: 58px;
}

.pim-nav a,
.site-nav a,
.pim-header a {
  font-size: 12px;
}

.pim-nav .pim-btn,
.site-nav .pim-btn,
.pim-header .pim-btn {
  min-height: 34px;
  padding: 7px 13px;
  border-radius: 3px;
}

/* ------------------------------------------------------------
   GLOBAL SPACING / SURFACES
   ------------------------------------------------------------ */
.pim-section,
.section,
.case-index,
.feature-section,
.agent-console-area {
  padding-top: var(--p4-section-y);
  padding-bottom: var(--p4-section-y);
}

.pim-pagehero,
.page-hero,
.feature-page-hero,
.agent-page-hero {
  padding-top: var(--p4-hero-y);
  padding-bottom: var(--p4-hero-y);
}

.section-intro,
.page-hero-copy {
  gap: 13px;
}

.section-intro {
  margin-bottom: clamp(28px, 3.4vw, 44px);
}

.pim-card,
.feature-panel,
.case-panel,
.pim-study,
.pim-plan,
.pim-console,
.product-shot-frame,
.pim-shot-frame {
  border-radius: 4px !important;
}

.pim-card,
.feature-panel,
.case-panel,
.pim-study,
.pim-plan {
  box-shadow: 0 8px 20px rgba(4,31,53,.045) !important;
}

/* ------------------------------------------------------------
   HOME — more compact hierarchy and stronger industrial rhythm.
   ------------------------------------------------------------ */
.home-hero {
  min-height: 0;
}

.home-hero .pim-flow-payoff {
  padding-top: clamp(58px, 7vw, 92px);
  padding-bottom: clamp(56px, 6.6vw, 86px);
}

.home-hero .pim-flow-payoff .pim-h1 {
  max-width: 8.8ch;
}

.home-hero .pim-flow-payoff .pim-lede {
  max-width: 555px;
  font-size: 15px;
}

.home-workflow-card {
  padding-top: 32px;
  padding-bottom: 34px;
}

.home-workflow-card .pim-h2 {
  font-size: 23px !important;
}

.home-workflow-number {
  font-size: 48px !important;
  line-height: .9;
}

.workflow-section .section-intro {
  margin-bottom: 18px;
}

.product-proof .section-intro .pim-h2 {
  max-width: 14ch;
}

.product-proof .product-audiences .pim-card {
  padding: 22px;
}

/* ------------------------------------------------------------
   FEATURES — reduce hero bulk, improve screenshot-to-copy ratio.
   ------------------------------------------------------------ */
.site-page--features .feature-page-hero {
  min-height: 520px;
}

.site-page--features .feature-page-hero .page-hero-copy {
  padding-right: min(53vw, 740px);
}

.site-page--features .feature-page-hero .pim-h1 {
  max-width: 9.3ch;
}

.site-page--features .feature-page-hero .pim-lede {
  max-width: 395px;
  font-size: 15px;
}

.site-page--features .feature-page-hero::after {
  top: 48px;
  bottom: 48px;
  width: min(49vw, 700px);
}

.site-page--features .feature-layout {
  gap: 24px;
}

.site-page--features .feature-rail {
  padding: 8px;
}

.site-page--features .feature-rail a,
.site-page--features .feature-rail button {
  min-height: 38px;
}

.site-page--features .feature-panel {
  padding: clamp(24px, 3vw, 38px);
}

.site-page--features .feature-panel .pim-h2 {
  font-size: clamp(27px, 2.5vw, 34px) !important;
}

.site-page--features .product-shot-frame,
.site-page--features .pim-shot-frame {
  box-shadow: 0 14px 32px rgba(8,38,61,.10) !important;
}

/* ------------------------------------------------------------
   AGENT — denser operator composition, less empty hero space.
   ------------------------------------------------------------ */
.site-page--agent .agent-page-hero {
  min-height: 250px;
}

.site-page--agent .agent-page-hero .pim-h1 {
  max-width: 10ch;
}

.site-page--agent .agent-page-hero::after {
  height: 148px;
}

.site-page--agent .agent-console-area > .pim-shell > .section-intro {
  max-width: 620px;
  margin-bottom: 28px;
}

.site-page--agent .agent-console-area > .pim-shell > .section-intro .pim-h2 {
  font-size: clamp(29px, 3vw, 38px) !important;
}

.site-page--agent .pim-console {
  padding: 7px;
  box-shadow: 0 13px 28px rgba(5,33,58,.085) !important;
}

.site-page--agent .pim-console-bar {
  min-height: 38px;
}

.site-page--agent .pim-console-rail {
  max-height: 560px;
}

.site-page--agent .agent-run-panels .pim-console-panel,
.site-page--agent .pim-console-panels .pim-console-panel {
  min-height: 560px;
}

/* ------------------------------------------------------------
   CASES — editorial hierarchy and more deliberate image framing.
   ------------------------------------------------------------ */
.site-page--cases .case-index .case-grid {
  gap: 14px;
}

.site-page--cases .case-index .pim-study {
  padding: 0;
  overflow: hidden;
}

.site-page--cases .case-index .pim-study > :not(.editorial-media) {
  margin-left: 18px;
  margin-right: 18px;
}

.site-page--cases .case-index .pim-study .editorial-media {
  margin-bottom: 18px;
}

.site-page--cases .case-index .pim-study .pim-h3 {
  font-size: 17px !important;
}

.site-page--cases .case-index .pim-study-link {
  padding-bottom: 18px;
}

.case-detail > .case-editorial {
  gap: clamp(26px, 3.6vw, 50px);
}

.case-detail > .case-editorial .editorial-media {
  box-shadow: 0 12px 28px rgba(5,34,56,.06);
}

.case-detail > .case-editorial .editorial-gallery img {
  height: 76px;
}

/* ------------------------------------------------------------
   SERVICES / TRUST / PRICING
   ------------------------------------------------------------ */
.consult-page > .pim-pagehero {
  min-height: 340px;
}

.consult-page > .pim-pagehero .page-hero-copy {
  padding-right: min(50vw, 690px);
}

.consult-page > .pim-pagehero .pim-h1 {
  max-width: 8.5ch;
}

.consult-page > .pim-pagehero::after {
  top: 28px;
  bottom: 28px;
}

.security-page > .page-hero .pim-h1 {
  max-width: 9.5ch;
}

.site-page--pricing .pricing-grid,
.pricing-grid {
  gap: 0;
  border: 1px solid var(--p4-rule-strong);
  background: #fff;
}

.site-page--pricing .pim-plan,
.pricing-grid .pim-plan {
  border: 0 !important;
  border-right: 1px solid var(--p4-rule) !important;
  box-shadow: none !important;
}

.site-page--pricing .pim-plan:last-child,
.pricing-grid .pim-plan:last-child {
  border-right: 0 !important;
}

/* ------------------------------------------------------------
   BUTTONS — more technical, less app-store rounded.
   ------------------------------------------------------------ */
.pim-btn,
button.pim-btn,
a.pim-btn {
  border-radius: 3px !important;
  min-height: 38px;
  padding-top: 9px;
  padding-bottom: 9px;
}

/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 980px) {
  .pim-h1,
  .home-hero .pim-flow-payoff .pim-h1,
  .site-page--features .feature-page-hero .pim-h1,
  .consult-page > .pim-pagehero .pim-h1,
  .site-page--agent .agent-page-hero .pim-h1 {
    font-size: clamp(37px, 6vw, 48px) !important;
  }

  .site-page--features .feature-page-hero,
  .consult-page > .pim-pagehero {
    min-height: 0;
  }

  .site-page--features .feature-page-hero .page-hero-copy,
  .consult-page > .pim-pagehero .page-hero-copy {
    padding-right: 0;
  }

  .site-page--features .feature-page-hero .pim-lede {
    max-width: 600px;
  }

  .site-page--pricing .pricing-grid,
  .pricing-grid {
    gap: 12px;
    border: 0;
    background: transparent;
  }

  .site-page--pricing .pim-plan,
  .pricing-grid .pim-plan {
    border: 1px solid var(--p4-rule) !important;
  }
}

@media (max-width: 720px) {
  :root { --p4-section-y: 52px; --p4-hero-y: 44px; }

  .pim-h1,
  .home-hero .pim-flow-payoff .pim-h1,
  .site-page--features .feature-page-hero .pim-h1,
  .consult-page > .pim-pagehero .pim-h1,
  .site-page--agent .agent-page-hero .pim-h1 {
    font-size: clamp(34px, 10.5vw, 43px) !important;
    line-height: .98 !important;
  }

  .pim-h2 { font-size: clamp(27px, 8.5vw, 34px) !important; }

  .home-workflow-number { font-size: 40px !important; }

  .site-page--cases .case-index .case-grid { gap: 16px; }
}

/* Final PIM-TNG brand icon integration ------------------------------------ */
.pim-brand img[src*="pim-tng-icon-"] {
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}
