@import url("../../_ds/fonts.css");
@import url("../../_ds/theme.css");
@import url("../../_shared/chrome.css");
@import url("../../_shared/components.css");
@import url("../../_shared/audience-switcher.css");

/* ──────────────────────────────────────────────────────────
   /solutions/pricing-intelligence — the PRICING EDGE.
   Buyer-facing twin of /workflows/price-monitoring. Distinct
   composition: live price board hero, stale-price scrubber,
   decision crossfade, teal coverage band, closer.
   ────────────────────────────────────────────────────────── */

main { position: relative; z-index: 1; }

/* ═══ Act 1 — Hero ═══ */
.pi-hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  align-items: center;
  gap: clamp(40px, 6vw, 110px);
  padding: clamp(120px, 16vh, 180px) var(--page-gutter, 7vw) clamp(64px, 9vh, 110px);
  max-width: 1480px;
  margin: 0 auto;
}
.pi-hero-text { max-width: 620px; }
.pi-hero-h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--mkt-hero-xl);
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-wrap: balance;
}
.pi-hero-h1 em { font-style: normal; color: var(--text-primary); }
.pi-hero-sub {
  margin: clamp(20px, 2.4vw, 30px) 0 0;
  font-family: var(--font-base);
  font-size: var(--mkt-body);
  line-height: 1.55;
  color: var(--text-tertiary);
  max-width: 50ch;
}
.pi-hero-cta { margin-top: clamp(28px, 3.4vw, 40px); }
.pi-hero-x { margin-top: 22px; }

/* Hero price board — hairline border on transparent, never a card fill */
.pi-board {
  position: relative;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-display, 20px);
  padding: clamp(18px, 1.8vw, 26px);
  box-shadow: 0 30px 70px -28px rgba(0, 0, 0, 0.6);
  width: 100%;
  max-width: 560px;
}
.pi-board-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-code);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
}
.pi-board-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #7ADAE6;
  box-shadow: 0 0 0 0 rgba(122, 218, 230, 0.5);
  animation: pi-pulse 2.2s ease-out infinite;
}
@keyframes pi-pulse {
  0% { box-shadow: 0 0 0 0 rgba(122, 218, 230, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(122, 218, 230, 0); }
  100% { box-shadow: 0 0 0 0 rgba(122, 218, 230, 0); }
}
.pi-board-sku { margin-left: auto; color: var(--text-quaternary); text-transform: none; letter-spacing: 0; font-style: italic; }
.pi-board-body { display: flex; flex-direction: column; padding: 6px 0; }
.pi-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px auto;
  align-items: center;
  gap: 14px;
  padding: 13px 8px;
  border-radius: 8px;
  transition: background 200ms ease;
  cursor: default;
}
.pi-row + .pi-row { border-top: 1px solid color-mix(in srgb, var(--border-subtle) 60%, transparent); }
.pi-row:hover .pi-row-name { color: var(--text-primary); }
.pi-row--you .pi-row-name { color: var(--text-primary); font-weight: var(--font-weight-medium); }
.pi-row-name {
  font-family: var(--font-code);
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pi-row-spark { display: block; height: 22px; opacity: 0; transition: opacity 220ms ease; }
.pi-row:hover .pi-row-spark { opacity: 1; }
.pi-row-spark svg { width: 100%; height: 100%; display: block; overflow: visible; }
.pi-row-spark path { fill: none; stroke: var(--text-quaternary); stroke-width: 1.5; }
.pi-row-price {
  font-family: var(--font-code);
  font-size: 14px;
  color: var(--text-primary);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.pi-row-diff {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  font-family: var(--font-code);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: #1D1612;
  background: #7ADAE6;
  border-radius: 999px;
  padding: 2px 8px;
  opacity: 0;
  pointer-events: none;
}
.pi-row-diff.is-flash { animation: pi-flash 2.4s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes pi-flash {
  0% { opacity: 0; transform: translateY(-50%) translateX(8px); }
  12% { opacity: 1; transform: translateY(-50%) translateX(0); }
  70% { opacity: 1; transform: translateY(-50%) translateX(0); }
  100% { opacity: 0; transform: translateY(-50%) translateX(0); }
}
.pi-board-foot {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-code);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-quaternary);
}
[data-pi-tick] { color: var(--text-tertiary); }

/* ═══ Act 2 — Stale prices scrubber ═══ */
.pi-stale {
  padding: clamp(110px, 16vh, 200px) var(--page-gutter, 7vw);
  max-width: 1180px;
  margin: 0 auto;
}
.pi-stale-head { max-width: 760px; }
.pi-stale-h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 4.4vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.028em;
  color: var(--text-primary);
  text-wrap: balance;
}
.pi-stale-h2 em { font-style: normal; color: var(--text-primary); }
.pi-stale-sub {
  margin: 22px 0 0;
  font-family: var(--font-base);
  font-size: var(--mkt-body);
  line-height: 1.55;
  color: var(--text-tertiary);
  max-width: 56ch;
}
.pi-scrub { margin-top: clamp(40px, 6vh, 72px); }
.pi-scrub-chart {
  position: relative;
  height: clamp(200px, 30vh, 280px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-default, 12px);
  overflow: hidden;
}
.pi-scrub-svg { width: 100%; height: 100%; display: block; }
.pi-scrub-gap { fill: color-mix(in srgb, var(--text-primary) 9%, transparent); stroke: none; transition: d 120ms linear; }
.pi-scrub-market { stroke: #7C4FE8; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; transition: d 120ms linear; }
.pi-scrub-you { stroke: var(--text-quaternary); stroke-width: 1.5; stroke-dasharray: 5 5; }
.pi-scrub-tag {
  position: absolute;
  font-family: var(--font-code);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 6px;
}
.pi-scrub-tag--you { left: 12px; top: calc(150 / 220 * 100% - 26px); color: var(--text-tertiary); }
.pi-scrub-tag--mkt { right: 12px; top: 14px; color: var(--text-secondary); }
.pi-scrub-rail { margin-top: 26px; display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.pi-scrub-range { -webkit-appearance: none; appearance: none; width: 100%; height: 2px; background: var(--border); border-radius: 2px; outline: none; cursor: pointer; }
.pi-scrub-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #7C4FE8; border: 3px solid var(--background); cursor: grab; }
.pi-scrub-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #7C4FE8; border: 3px solid var(--background); cursor: grab; }
.pi-scrub-read { margin: 0; font-family: var(--font-code); font-size: 13px; color: var(--text-tertiary); }
.pi-scrub-read-state { color: var(--text-primary); }

/* ═══ Act 3 — A price move is a decision (spotlight crossfade) ═══ */
/* sticky stage: scroll advances the active decision (pattern A + D) */
.pi-plays { position: relative; min-height: 360vh; }
.pi-plays-sticky {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(80px, 12vh, 140px) var(--page-gutter, 7vw);
  max-width: 1180px;
  margin: 0 auto;
}
.pi-plays-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.pi-plays-hint {
  margin: 0;
  font-family: var(--font-code);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-quaternary);
}
.pi-plays-h2 {
  margin: 0 0 clamp(36px, 5vh, 64px);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 4.4vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.028em;
  color: var(--text-primary);
  text-wrap: balance;
}
.pi-plays-h2 em { font-style: normal; color: var(--text-primary); }
.pi-plays-stage { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(30px, 5vw, 80px); align-items: start; }
.pi-plays-rail { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--border-subtle); }
.pi-play-tab {
  padding: 14px 18px;
  font-family: var(--font-code);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--text-quaternary);
  cursor: pointer;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color 180ms ease, border-color 180ms ease;
}
.pi-play-tab:hover { color: var(--text-secondary); }
.pi-play-tab[aria-selected="true"] { color: var(--text-primary); border-left-color: var(--text-primary); }
.pi-plays-frames { position: relative; min-height: clamp(220px, 30vh, 300px); display: grid; }
.pi-play { grid-area: 1 / 1; opacity: 0; transform: translateY(12px); transition: opacity 420ms cubic-bezier(0.22,1,0.36,1), transform 420ms cubic-bezier(0.22,1,0.36,1); pointer-events: none; }
.pi-play[data-active="true"] { opacity: 1; transform: none; pointer-events: auto; }
.pi-play-trigger {
  margin: 0;
  font-family: var(--font-code);
  font-size: var(--mkt-body-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7C4FE8;
}
.pi-play-move {
  margin: 20px 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--mkt-h3);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-wrap: balance;
  max-width: 18ch;
}

/* ═══ Act 4 — Coverage band (SOLID teal, bloom reveal) ═══ */
.pi-cover {
  position: relative;
  isolation: isolate;
  padding: clamp(120px, 18vh, 220px) var(--page-gutter, 7vw);
  overflow: hidden;
}
.pi-cover-fill {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #7ADAE6;
  clip-path: circle(0% at 82% 0%);
  transition: clip-path 900ms cubic-bezier(0.22, 1, 0.36, 1);
}
.pi-cover.is-in .pi-cover-fill { clip-path: circle(150% at 82% 0%); }
.pi-cover-inner { max-width: 1080px; margin: 0 auto; }
.pi-cover-h2 {
  margin: 0 0 clamp(40px, 6vh, 72px);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 5vw, 84px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: #1D1612;
  text-wrap: balance;
}
.pi-cover-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 3vw, 48px); }
.pi-cover-k { font-family: var(--font-display); font-weight: 500; font-size: var(--mkt-h4); letter-spacing: -0.01em; color: #1D1612; }
.pi-cover-v { font-family: var(--font-base); font-size: var(--mkt-body-sm); line-height: 1.5; color: rgba(29, 22, 18, 0.78); max-width: 38ch; }

/* Topbar inversion over the teal band */

/* ═══ Act 5 — Closer ═══ */
.pi-end {
  min-height: 86vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(110px, 16vh, 200px) var(--page-gutter, 7vw);
}
.pi-end-frame { display: flex; flex-direction: column; align-items: center; gap: clamp(26px, 3vh, 40px); }
.pi-end-h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 6.5vw, 116px);
  line-height: 0.96;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-wrap: balance;
}
.pi-end-h2 em { font-style: normal; color: var(--text-primary); }
.pi-end-x { margin-top: 4px; }


/* ═══ Act 2 — From the page to a clean record ═══ */
.pi-extract {
  padding: clamp(110px, 16vh, 200px) var(--page-gutter, 7vw);
  max-width: 1280px;
  margin: 0 auto;
}
.pi-extract-head { max-width: 760px; margin-bottom: clamp(40px, 6vh, 72px); }
.pi-extract-h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 4.4vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.028em;
  color: var(--text-primary);
  text-wrap: balance;
}
.pi-extract-h2 em { font-style: normal; color: var(--text-primary); }
.pi-extract-sub { margin: 22px 0 0; font-family: var(--font-base); font-size: var(--mkt-body); line-height: 1.55; color: var(--text-tertiary); max-width: 58ch; }
.pi-extract-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 44px); align-items: stretch; }

/* the product page mock — hairline frame, transparent */
.pi-page { border: 1px solid var(--border-subtle); border-radius: var(--radius-default, 12px); overflow: hidden; display: flex; flex-direction: column; }
.pi-page-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--border-subtle); }
.pi-page-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.pi-page-url { margin-left: 10px; font-family: var(--font-code); font-size: 12px; color: var(--text-quaternary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-page-body { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: clamp(16px, 2vw, 26px); padding: clamp(20px, 2.4vw, 32px); align-items: center; flex: 1; }
.pi-prod-media { aspect-ratio: 3 / 4; border-radius: 10px; border: 1px solid var(--border-subtle); overflow: hidden; }
.pi-prod-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.pi-defs { position: absolute; width: 0; height: 0; }
.pi-prod-brand { margin: 0; font-family: var(--font-code); font-size: 11px; letter-spacing: 0.16em; color: var(--text-quaternary); }
.pi-prod-title { margin: 8px 0 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(18px, 1.7vw, 24px); line-height: 1.1; color: var(--text-primary); }
.pi-prod-pricing { margin: 16px 0 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pi-prod-price { font-family: var(--font-display); font-weight: 500; font-size: var(--mkt-h4); color: var(--text-primary); }
.pi-prod-was { font-family: var(--font-base); font-size: 14px; color: var(--text-quaternary); }
.pi-prod-save { font-family: var(--font-code); font-size: 11px; color: var(--text-tertiary); border: 1px solid var(--border-subtle); border-radius: 999px; padding: 2px 8px; }
.pi-prod-meta { margin: 14px 0 0; display: flex; gap: 16px; font-family: var(--font-base); font-size: 13px; color: var(--text-tertiary); }
.pi-prod-btn { margin-top: 20px; display: inline-block; font-family: var(--font-base); font-size: 13px; font-weight: var(--font-weight-medium); color: var(--text-quaternary); border: 1px solid var(--border-subtle); border-radius: 8px; padding: 9px 16px; }

/* the record / the call panel */
.pi-extract-panel { display: flex; flex-direction: column; border: 1px solid var(--border-subtle); border-radius: var(--radius-default, 12px); overflow: hidden; }
.pi-extract-seg { padding: 6px 14px 0; border-bottom: 1px solid var(--border-subtle); }
.pi-extract-views { position: relative; display: grid; flex: 1; }
.pi-extract-view { grid-area: 1 / 1; margin: 0; padding: clamp(18px, 2vw, 28px); overflow-x: auto; font-family: var(--font-code); font-size: var(--mkt-body-xs); line-height: 1.7; opacity: 0; pointer-events: none; transition: opacity 300ms ease; }
.pi-extract-view[data-active="true"] { opacity: 1; pointer-events: auto; }
.pi-extract-view code { white-space: pre; }
.x-p { color: var(--text-quaternary); }
.x-k { color: var(--text-secondary); }
.x-s { color: var(--text-tertiary); }
.x-n, .x-b { color: var(--text-primary); }
.x-hi { color: #7ADAE6; }
.x-c { color: var(--text-quaternary); }
.x-fn { color: var(--text-primary); font-weight: var(--font-weight-medium); }

/* ═══ Reveals ═══ */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 700ms cubic-bezier(0.22,1,0.36,1), transform 700ms cubic-bezier(0.22,1,0.36,1); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ═══ Wide-desktop tiers ═══ */
@media (min-width: 1600px) { .pi-hero { max-width: 1640px; }  }
@media (min-width: 1920px) { .pi-hero { max-width: 1820px; } }

/* ═══ Breakpoints / mobile ═══ */
@media (max-width: 900px) {
  .pi-hero { grid-template-columns: 1fr; gap: clamp(40px, 7vh, 60px); min-height: 0; }
  .pi-board { max-width: 100%; }
  /* mobile: drop the sticky scroll-stage, fall back to tap tabs */
  .pi-plays { min-height: 0; }
  .pi-plays-sticky { position: static; min-height: 0; padding: clamp(90px, 13vh, 130px) var(--page-gutter, 7vw); }
  .pi-plays-hint { display: none; }
  .pi-plays-stage { grid-template-columns: 1fr; gap: 28px; }
  .pi-extract-stage { grid-template-columns: 1fr; }
  .pi-plays-rail { flex-direction: row; flex-wrap: wrap; border-left: 0; gap: 6px; }
  .pi-play-tab { border-left: 0; border-bottom: 2px solid transparent; margin-left: 0; padding: 8px 12px; }
  .pi-play-tab[aria-selected="true"] { border-left-color: transparent; border-bottom-color: var(--text-primary); }
}
@media (max-width: 600px) {
  
  .pi-cover-list { grid-template-columns: 1fr; }
  .pi-plays-frames { min-height: 240px; }
  /* board: drop the hover-only sparkline column on touch + flash the diff
     near the name so it never overlaps the price. */
  .pi-row { grid-template-columns: minmax(0, 1fr) auto; }
  .pi-row-spark { display: none; }
  .pi-row-diff { right: auto; left: 8px; top: auto; bottom: 4px; transform: none; }
  .pi-row-diff.is-flash { animation: pi-flash-m 2.4s cubic-bezier(0.22, 1, 0.36, 1); }
  /* long cross-links: block + text-decoration underline so the rule hugs
     the wrapped words and the arrow stays with the last one. */
  .pi-hero-x, .pi-end-x {
    display: block; border-bottom: none; padding-bottom: 0;
    text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px;
    text-decoration-color: var(--border);
  }
  .pi-end-x { text-align: center; }
}
@keyframes pi-flash-m { 0% { opacity: 0; } 12% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .pi-board-dot, .pi-row-diff.is-flash { animation: none; }
  .pi-cover-fill { transition: none; }
}

/* ═══ Wide screens — let the acts breathe (≥1920 / ≥2560) ═══ */
@media (min-width: 1920px) {
  .pi-extract { max-width: 1480px; }
  .pi-cover-inner { max-width: 1380px; }
}
@media (min-width: 2560px) {
  .pi-extract { max-width: 1760px; }
  .pi-cover-inner { max-width: 1600px; }
}
