/* Product pages (draft-plugin.html?id=<product id>). Only what draft.css does not already have: the shared
   announcement bar, nav, buttons, stage, cards and footer all come from draft.css unchanged.
   --accent is the product's own colour (set on <body> by draft-plugin.js); teal stays for buying. */

.pp { --pp-nav: 76px; --pp-bar: 56px; }

/* ---------- Page basics ---------- */
.pp-skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 60;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--text);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.pp-skip:focus { top: 12px; }
.pp :focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.pp main:focus { outline: none; }
.pp main section[id] { scroll-margin-top: calc(var(--pp-nav) + var(--pp-bar) + 16px); }
.pp .nav-links a[aria-current] { color: var(--text); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Product bar (under the nav, once the hero's buttons are gone) ---------- */
.pp-bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: rgba(9, 12, 16, 0.97);
  border-bottom: 1px solid rgba(43, 54, 68, 0.6);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-8px);
  visibility: hidden;
  transition: opacity .28s ease, transform .28s ease, visibility 0s linear .28s;
}
.pp-bar.is-shown {
  opacity: 1;
  transform: none;
  visibility: visible;
  transition: opacity .28s ease, transform .28s ease, visibility 0s;
}
.pp-bar:empty { display: none; }
.pp-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--pp-bar); }
.pp-bar-id { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; }
.pp-bar-id img { width: 28px; height: 28px; flex: none; }
.pp-bar-name { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; text-transform: uppercase; white-space: nowrap; }
.pp-bar-job { font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.pp-bar-actions { display: flex; align-items: center; gap: 18px; flex: none; }
.pp-bar-price { font-size: 13px; color: var(--muted); white-space: nowrap; }
.pp-bar .pp-bar-buy { height: 36px; padding: 0 16px; border-radius: 10px; font-size: 14px; }

/* ---------- Hero ---------- */
.pp-hero { padding: 64px 0 40px; }
.pp-id { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; }
.pp-tile { width: 60px; height: 60px; flex: none; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.5)); }
.pp-name {
  margin: 0;
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: uppercase;
}
.pp-id .pill { margin-left: 4px; }
.pp-hero .pp-promise {
  margin-top: 34px;
  font-size: clamp(46px, 7.6vw, 122px);
  line-height: 0.9;
  letter-spacing: -0.055em;
  text-wrap: balance;
}
.pp-hero .lead { text-wrap: pretty; }
.pp-cta { display: grid; justify-items: end; gap: 12px; flex-shrink: 0; }
.pp-price { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); }

/* The ▶ Hear button: a play triangle; while playing, three bars that follow the sound (and a stop square on hover). */
.pp-hear-icon { position: relative; display: inline-grid; place-items: center; width: 16px; height: 16px; flex: none; }
.pp-hear-icon svg { grid-area: 1 / 1; width: 14px; height: 14px; fill: currentColor; }
.pp-hear .pp-i-stop, .pp-hear .pp-i-bars { display: none; }
.pp-i-bars { grid-area: 1 / 1; align-items: flex-end; justify-content: center; gap: 2px; width: 14px; height: 14px; }
.pp-i-bars i {
  display: block;
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--accent);
  transform-origin: 50% 100%;
  transform: scaleY(calc(0.22 + var(--lvl, 0) * 0.6));
  transition: transform .09s linear;
}
.pp-i-bars i:nth-child(2) { transform: scaleY(calc(0.3 + var(--lvl, 0) * 0.7)); }
.pp-i-bars i:nth-child(3) { transform: scaleY(calc(0.18 + var(--lvl, 0) * 0.5)); }
.pp-hear.is-playing .pp-i-play, .pp-hear[aria-pressed="true"] .pp-i-play { display: none; }
.pp-hear.is-playing .pp-i-bars, .pp-hear[aria-pressed="true"] .pp-i-bars { display: flex; }
.pp-hear.is-playing:hover .pp-i-bars, .pp-hear[aria-pressed="true"]:hover .pp-i-bars,
.pp-hear.is-playing:focus-visible .pp-i-bars, .pp-hear[aria-pressed="true"]:focus-visible .pp-i-bars { display: none; }
.pp-hear.is-playing:hover .pp-i-stop, .pp-hear[aria-pressed="true"]:hover .pp-i-stop,
.pp-hear.is-playing:focus-visible .pp-i-stop, .pp-hear[aria-pressed="true"]:focus-visible .pp-i-stop { display: block; }

/* ---------- Stage: one window on the lit plinth, in the product's colour ---------- */
.stage-glow-single {
  left: 12%;
  width: 76%;
  bottom: -18%;
  height: 56%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 36%, transparent), transparent);
}
.stage-shot-single { width: 58%; left: 21%; top: 9%; z-index: 2; }
.stage-single:hover .stage-shot-single { transform: translateY(-6px); }

/* ---------- Listen ---------- */
.pp-listen-area { margin-top: 56px; }
.pp-listen-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: 760px;
  margin: 0 auto;
  padding: 52px 28px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 80% at 50% 120%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    var(--panel);
  text-align: center;
}
.pp-listen-fallback img { width: 52px; height: 52px; }
.pp-listen-fallback p { margin: 0; font-size: 17px; color: var(--text-2); }

/* ---------- What it does: the steps beside a close-up of the real window ---------- */
.pp-features { padding-top: 80px; }
.pp-tour {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
  margin-top: 64px;
}
.pp-tour-media { position: sticky; top: calc(var(--pp-nav) + var(--pp-bar) + 28px); }
.pp-tour-frame, .pp-step-shot {
  padding: 6%;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 70% 55% at 50% 104%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 72%),
    linear-gradient(180deg, #161c25 0%, #0b0f14 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.pp-zoom {
  position: relative;
  aspect-ratio: var(--shot-ar, 1560 / 1120);
  overflow: hidden;
  border-radius: 10px;
  background: #0b0f14;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.07);
}
.pp-zoom img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  transform-origin: 50% 50%;
  transform: translate(calc(var(--tx, 0) * 100%), calc(var(--ty, 0) * 100%)) scale(var(--s, 1));
}
.is-touring .pp-tour-media .pp-zoom img { transition: transform 1.1s cubic-bezier(.22, .7, .2, 1); will-change: transform; }

.pp-steps { list-style: none; margin: 0; padding: 0; }
.pp-step { padding: 40px 0; border-top: 1px solid var(--line); }
.pp-step:first-child { padding-top: 6px; border-top: 0; }
.pp-step-shot { display: none; }
.pp-step-n {
  font-family: var(--label);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: color-mix(in srgb, var(--accent) 78%, white);
}
.pp-step h3 { margin: 12px 0 14px; font-size: clamp(26px, 2.3vw, 34px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.08; }
.pp-step p { margin: 0; max-width: 520px; font-size: 18px; line-height: 1.55; color: var(--text-2); text-wrap: pretty; }

@media (min-width: 1001px) {
  .is-touring .pp-step {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 46vh;
    padding: 0;
    border-top: 0;
  }
  .is-touring .pp-step-body { transition: opacity .5s ease; }
  .is-touring .pp-step:not(.is-active) .pp-step-body { opacity: 0.3; }
}

/* ---------- Facts ---------- */
.pp-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.pp-fact { padding: 34px 28px 38px; border-left: 1px solid var(--line); }
.pp-fact:first-child { padding-left: 0; border-left: 0; }
.pp-fact dt {
  font-family: var(--label);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.pp-fact dd { margin: 16px 0 0; }
.pp-fact strong {
  display: flex;
  align-items: flex-end;
  min-height: 0.98em;
  font-size: clamp(46px, 5vw, 74px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.98;
  color: var(--text);
}
.pp-fact-formats strong {
  min-height: calc(clamp(46px, 5vw, 74px) * 0.98);
  font-size: clamp(28px, 2.7vw, 40px);
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.pp-fact span { display: block; max-width: 280px; margin-top: 12px; font-size: 15px; line-height: 1.5; color: var(--text-2); }

/* ---------- Buy ---------- */
.pp-buy {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(56px, 7vw, 96px) 28px clamp(48px, 6vw, 72px);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 55% 60% at 50% 118%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 72%),
    linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 100%);
  text-align: center;
  overflow: hidden;
}
.pp-buy-tile { width: 112px; height: 112px; filter: drop-shadow(0 22px 40px rgba(0, 0, 0, 0.6)); }
.pp-buy-name {
  margin: 28px 0 0;
  font-size: clamp(44px, 5.4vw, 80px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  text-transform: uppercase;
}
.pp-buy .pill { margin-top: 18px; }
.pp-buy-price { margin: 30px 0 0; font-size: 17px; font-weight: 600; color: var(--muted); }
.pp-buy .btn { min-width: 220px; margin-top: 18px; }
.pp-buy-what { margin: 16px 0 0; font-size: 14px; color: var(--muted); text-wrap: balance; }
.pp-bundle-link {
  width: min(520px, 100%);
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  font-weight: 700;
  color: var(--buy);
  text-decoration: none;
  transition: color .18s;
}
.pp-bundle-link:hover { color: var(--buy-hi); }

/* ---------- More from Shapesound (the home page's cards, three across) ---------- */
.pp-more { padding-top: 40px; }
.pp-more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 64px; }
.pp-more-grid .plinth img { width: 80%; }
.pp-more-grid .card-meta { flex-wrap: wrap; row-gap: 12px; padding: 22px 18px 0; }
.pp-more-grid .card-name { font-size: 26px; }
.pp-more-grid .card-copy { padding: 12px 18px 0; font-size: 16px; }

/* ---------- Smaller screens ---------- */
@media (max-width: 1000px) {
  .pp-cta { justify-items: start; }
  .pp-tour { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 48px; }
  .pp-tour-media { display: none; }
  .pp-step, .pp-step:first-child { padding: 0 0 56px; border-top: 0; }
  .pp-step-shot { display: block; margin-bottom: 26px; padding: 5%; }
  .pp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-fact, .pp-fact:first-child { padding: 28px 20px 30px 0; border-left: 0; border-top: 1px solid var(--line); }
  .pp-fact:nth-child(-n+2) { border-top: 0; }
  .pp-fact:nth-child(2n) { padding-left: 20px; border-left: 1px solid var(--line); }
  .pp-more-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .pp { --pp-nav: 64px; --pp-bar: 52px; }
  .pp-bar-price, .pp-bar-job { display: none; }
  .pp-hero { padding-top: 44px; }
  .pp-tile { width: 48px; height: 48px; }
  .pp-name { font-size: 30px; }
  /* --fit is the product's longest headline line in em (draft-plugin.js), so each line stays whole on a phone */
  .pp-hero .pp-promise { margin-top: 26px; font-size: clamp(34px, calc((100vw - 38px) / var(--fit, 8.6)), 52px); }
  .pp-cta { width: 100%; }
  .stage-shot-single { width: 86%; left: 7%; top: 12%; }
  .pp-listen-area { margin-top: 40px; }
  .pp-listen-fallback { padding: 40px 20px; }
  .pp-features { padding-top: 64px; }
  .pp-step h3 { font-size: 26px; }
  .pp-step p { font-size: 17px; }
  .pp-fact strong { font-size: 44px; }
  .pp-fact-formats strong { min-height: calc(44px * 0.98); font-size: 26px; }
  .pp-fact span { font-size: 14px; }
  .pp-buy { padding: 52px 18px 44px; border-radius: 24px; }
  .pp-buy-tile { width: 92px; height: 92px; }
  .pp-buy .btn { width: 100%; }
  .pp-more-grid { margin-top: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .pp-bar, .pp-bar.is-shown { transform: none; transition: none; }
  .pp-i-bars i, .pp-i-bars i:nth-child(2), .pp-i-bars i:nth-child(3) { transform: scaleY(0.6); transition: none; }
}

.pp-manual { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-hi); }
.pp-manual:hover { color: var(--text); }
