/* =========================================================
   Product and documentation pages, in the exhibition's vocabulary.
   Loaded after redesign.css and wireframe.css. Open layouts, hairline
   dividers, framed media with captions beneath it, periwinkle emphasis.
   Pages carry .portfolio-page, so the living backdrop shows through.
   ========================================================= */

.portfolio-page {
  --pr-accent: #a9b6ff;
  --pr-accent-soft: rgba(169, 182, 255, 0.08);
  --pr-accent-line: rgba(169, 182, 255, 0.28);
  --pr-frame: #16181c;
  --pr-gutter: clamp(28px, 4.5vw, 72px);
}

/* Eyebrows and section labels are not part of this system. */
.portfolio-page .product-section .section-label,
.portfolio-page .product-story__eyebrow {
  display: none;
}

/* ── Hero ───────────────────────────────────────────── */

.portfolio-page .product-page-hero {
  padding-top: calc(var(--nav-height) + 52px);
  padding-bottom: 56px;
  border: 0;
  min-height: 0;
}

.product-page-hero > .container {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  grid-template-areas:
    "back  back"
    "title desc"
    "meta  actions"
    ".     purchase";
  column-gap: var(--pr-gutter);
  align-items: end;
}

.product-page-hero__back {
  grid-area: back;
  justify-self: start;
  min-height: 44px;
  margin-bottom: 28px;
  color: var(--text-secondary);
  font-size: 14px;
}

.product-page-hero__back svg {
  transition: transform 220ms var(--ease-out);
}

.portfolio-page .product-page-hero__title {
  grid-area: title;
  margin: 0;
  max-width: 14ch;
  font-size: clamp(3rem, 6.6vw, 6rem);
  line-height: 1.035;
  letter-spacing: -0.04em;
  font-weight: 500;
}

.portfolio-page .product-page-hero__desc {
  grid-area: desc;
  max-width: 52ch;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.product-page-hero__meta {
  grid-area: meta;
  align-self: start;
  margin: 28px 0 0;
  gap: 10px 14px;
}

.product-page-hero__platform {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-secondary);
}

.product-page-hero__actions {
  grid-area: actions;
  align-self: start;
  margin-top: 28px;
}

.product-page-hero__purchase {
  grid-area: purchase;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.product-page-hero__purchase-label {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-secondary);
}

.btn--disabled {
  opacity: 0.55;
}

.btn__tag {
  margin-left: 6px;
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: none;
}

/* ── Sections ───────────────────────────────────────── */

.portfolio-page .product-section {
  padding-block: 80px;
  border-top: 1px solid var(--border-medium);
  background: transparent;
}

.portfolio-page .product-callout-section--compact {
  padding-block: 0 56px;
  border-top: 0;
}

.portfolio-page .product-section[style*="padding-top"] {
  border-top: 0;
}

.portfolio-page .product-section__title {
  margin-bottom: 36px;
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.product-section__intro {
  margin-bottom: 36px;
}

.product-story {
  grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.1fr);
  gap: var(--pr-gutter);
}

.product-story__body {
  font-size: 16px;
}

.product-story__body p,
.product-section__intro p {
  line-height: 1.7;
}

/* ── Media: framed image, caption beneath on the page ── */

.screenshot-flow {
  gap: 26px;
}

.screenshot-row {
  gap: 26px;
}

.screenshot-item {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.screenshot-item img,
.doc-media {
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: var(--pr-frame);
}

.screenshot-item figcaption {
  padding: 14px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.screenshot-item figcaption strong {
  color: var(--text-primary);
  font-weight: 500;
}

.screenshot-item--native {
  max-width: 720px;
}

.marchingworld-lod-gallery .screenshot-item {
  background: transparent;
}

.product-video {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.product-video video {
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: #090a0c;
}

.product-video figcaption {
  padding: 14px 0 0;
  border: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.doc-media-wrap {
  margin-block: 28px;
}

/* ── Feature list: open rows ────────────────────────── */

.feature-list {
  gap: 0;
  border-bottom: 1px solid var(--border-medium);
}

.feature-item {
  gap: 24px;
  padding: 28px 0;
  border: 0;
  border-top: 1px solid var(--border-medium);
  border-radius: 0;
  background: transparent;
}

.feature-item__icon {
  width: 44px;
  height: 44px;
  align-self: flex-start;
  border: 1px solid var(--pr-accent-line);
  border-radius: 50%;
  background: var(--pr-accent-soft);
  color: var(--pr-accent);
}

.feature-item__title {
  margin-bottom: 8px;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.feature-item__desc {
  max-width: 68ch;
  font-size: 15px;
  line-height: 1.65;
}

/* ── Documentation panels: one centred column ───────────
   The title and text sit at a readable measure; screenshots and tables
   take the full width of the column and are centred beneath them. */

.product-doc-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: min(100%, 1240px);
  margin-inline: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.product-doc-panel > * {
  min-width: 0;
}

.product-doc-panel > .product-section__title,
.product-doc-panel > .product-doc-panel__title {
  max-width: 24ch;
  margin-bottom: 4px;
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
}

.product-doc-panel .screenshot-item figcaption,
.product-doc-panel .doc-media-wrap figcaption {
  text-align: center;
}

.product-doc-panel .screenshot-item--native,
.product-doc-panel .doc-media-wrap {
  margin-inline: auto;
}

.product-doc-panel .doc-media,
.product-doc-panel .screenshot-item img {
  margin-inline: auto;
}

.product-doc-intro {
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.8fr);
  gap: var(--pr-gutter);
}

.product-doc-intro > .product-doc-panel {
  display: block;
  width: auto;
  margin-inline: 0;
}

.product-doc-intro > .product-doc-panel > .product-section__title,
.product-doc-intro > .product-doc-panel > .product-doc-panel__title {
  margin-bottom: 24px;
}

.product-doc-panel--sticky {
  position: static;
}

.product-doc-text {
  font-size: 16px;
  line-height: 1.7;
  max-width: 68ch;
}

.product-doc-text + .product-doc-text {
  margin-top: 16px;
}

.product-doc-content {
  gap: 24px;
}

.product-docs-grid {
  gap: 0 40px;
  margin-top: 36px;
}

.product-doc-card {
  padding: 22px 0 26px;
  border: 0;
  border-top: 1px solid var(--border-medium);
  border-radius: 0;
  background: transparent;
}

.product-doc-card__title {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.product-doc-card__text {
  font-size: 15px;
}

.product-doc-toc__list {
  gap: 0;
  margin-top: 8px;
  border-bottom: 1px solid var(--border-medium);
}

.product-doc-toc__link {
  grid-template-columns: 40px minmax(0, 1fr);
  min-height: 52px;
  padding: 14px 0;
  border: 0;
  border-top: 1px solid var(--border-medium);
  border-radius: 0;
  background: transparent;
  font-size: 15px;
}

.product-doc-toc__number {
  font-size: 12px;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  color: var(--pr-accent);
}

.product-doc-subsection + .product-doc-subsection {
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
}

.product-doc-subtitle {
  margin-bottom: 12px;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.product-doc-list,
.product-doc-note {
  max-width: 76ch;
}

.product-doc-list li {
  font-size: 15px;
}

.product-doc-list li::before {
  background: var(--pr-accent);
  opacity: 0.8;
}

.product-doc-list--ordered li::before {
  background: none;
  color: var(--pr-accent);
  opacity: 1;
}

/* Notes, tables, and code stay contained: they are data, not layout. */

.product-doc-note {
  padding: 18px 22px;
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.product-doc-note--important {
  border-color: var(--pr-accent-line);
  background: var(--pr-accent-soft);
}

.product-doc-note__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--pr-accent);
}

.product-doc-note__text {
  font-size: 15px;
}

.product-doc-table-wrap,
.benchmark-table-wrap {
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  background: rgba(13, 14, 17, 0.6);
  scrollbar-width: thin;
  scrollbar-color: #596173 transparent;
}

.product-doc-table th,
.benchmark-table thead th {
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.035);
}

.product-doc-code {
  border-radius: 10px;
  background: #0f1013;
  border-color: var(--border-medium);
  scrollbar-width: thin;
  scrollbar-color: #596173 transparent;
}

/* ── Callouts: dev note, cancellation, disclaimer ───── */

.dev-note {
  padding: 18px 22px;
  border: 1px solid var(--pr-accent-line);
  border-radius: 12px;
  background: var(--pr-accent-soft);
}

.dev-note__icon {
  color: var(--pr-accent);
}

.dev-note--archived {
  border-color: rgba(232, 180, 191, 0.3);
  background: rgba(232, 180, 191, 0.05);
}

.dev-note--archived .dev-note__icon {
  color: #e8b4bf;
}

.cancellation-banner {
  max-width: 62ch;
  padding: 18px 22px;
  border-color: rgba(232, 180, 191, 0.3);
  border-radius: 12px;
  background: rgba(232, 180, 191, 0.05);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.cancellation-banner__header {
  color: #e8b4bf;
}

.cancellation-banner__tag {
  letter-spacing: 0.02em;
  text-transform: none;
}

.screenshot-disclaimer {
  border-color: var(--pr-accent-line);
  border-radius: 12px;
  background: var(--pr-accent-soft);
}

.screenshot-disclaimer__icon {
  color: var(--pr-accent);
}

/* ── MarchingWorld ──────────────────────────────────── */

.product-section--surface-nets {
  background: transparent;
}

.marchingworld-benchmarks {
  border-block: 1px solid var(--border-medium);
  background: rgba(255, 255, 255, 0.022);
}

.benchmark-summary {
  border-block: 1px solid var(--border-medium);
}

.benchmark-summary__item strong {
  color: var(--pr-accent);
}

.benchmark-summary__item span {
  font-size: 13px;
  color: var(--text-secondary);
}

.benchmark-figure {
  border: 1px solid var(--border-medium);
  border-radius: 14px;
}

.benchmark-notes h3 {
  font-size: 17px;
  font-weight: 500;
}

.benchmark-notes p {
  font-size: 15px;
  color: var(--text-secondary);
}

.benchmark-history {
  border: 1px solid var(--border-medium);
  border-radius: 14px;
  background: transparent;
}

.benchmark-history summary:focus-visible {
  outline: 3px solid #7186ff;
  outline-offset: 5px;
}

.benchmark-history__toggle {
  color: var(--pr-accent);
}

.benchmark-history__toggle::before {
  letter-spacing: 0.02em;
  text-transform: none;
}

.benchmark-history__disclaimer {
  border: 1px solid var(--pr-accent-line);
  border-radius: 12px;
  background: var(--pr-accent-soft);
}

.benchmark-history__disclaimer strong {
  color: var(--pr-accent);
}

.lod-view-pair__heading h3 {
  font-size: 19px;
  font-weight: 500;
}

.rebuild-status {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  gap: var(--pr-gutter);
}

.rebuild-status__ledger {
  border-color: var(--border-medium);
  border-radius: 14px;
  background: rgba(13, 14, 17, 0.55);
}

.rebuild-status__label {
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 13px;
}

.rebuild-status__label--ready {
  color: #b4dfc5;
}

.rebuild-status__label--rebuild {
  color: #ead5a4;
}

/* ── Stereo Depth ───────────────────────────────────── */

.stereo-depth-hero {
  background: transparent;
}

.stereo-research-question::after {
  display: none;
}

.stereo-pipeline {
  border-radius: 14px;
  background: transparent;
}

.stereo-pipeline__step {
  background: rgba(255, 255, 255, 0.02);
}

.stereo-pipeline__step::after {
  background: var(--pr-accent);
  opacity: 0.55;
}

.stereo-pipeline__index {
  color: var(--pr-accent);
}

.stereo-pipeline__step h3 {
  font-size: 17px;
  font-weight: 500;
}

.stereo-pipeline__step p {
  font-size: 14px;
  color: var(--text-secondary);
}

.stereo-observation-section {
  background: transparent;
}

.stereo-observation {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  gap: var(--pr-gutter);
}

.stereo-observation__priorities {
  border-radius: 14px;
  background: rgba(13, 14, 17, 0.55);
}

.stereo-observation__label {
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 13px;
  color: #e8b4bf;
}

.stereo-observation__priorities li::before {
  background: #e8b4bf;
}

.stereo-metrics {
  border-radius: 14px;
}

.stereo-metric {
  background: rgba(255, 255, 255, 0.025);
}

.stereo-metric dt {
  font-weight: 500;
}

.stereo-metric dd {
  color: var(--text-secondary);
}

.stereo-privacy-note {
  border-left-width: 1px;
  border-left-color: var(--pr-accent-line);
  color: var(--text-secondary);
}

/* ── Responsive ─────────────────────────────────────── */

@media (hover: hover) and (pointer: fine) {
  .product-page-hero__back:hover {
    color: var(--pr-accent);
  }

  .product-page-hero__back:hover svg {
    transform: translateX(-3px);
  }

  .product-doc-toc__link:hover {
    color: var(--text-primary);
    border-color: var(--pr-accent-line);
    background: transparent;
  }

  .product-doc-toc__link:hover .product-doc-toc__number {
    color: #fff;
  }
}

@media (max-width: 1050px) {
  .product-page-hero > .container {
    grid-template-columns: 1fr;
    grid-template-areas:
      "back"
      "title"
      "desc"
      "meta"
      "actions"
      "purchase";
  }

  .portfolio-page .product-page-hero__title {
    max-width: none;
    margin-bottom: 24px;
  }

  .product-doc-intro,
  .product-story {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 760px) {
  .portfolio-page .product-page-hero {
    padding-top: calc(var(--nav-height) + 34px);
    padding-bottom: 36px;
  }

  .portfolio-page .product-page-hero__title {
    font-size: clamp(2.55rem, 11vw, 4.2rem);
  }

  .portfolio-page .product-page-hero__desc {
    font-size: 15px;
  }

  .portfolio-page .product-section {
    padding-block: 52px;
  }

  .portfolio-page .product-section__title {
    margin-bottom: 24px;
  }

  .screenshot-row {
    gap: 22px;
  }

  .feature-item {
    gap: 16px;
    padding: 22px 0;
  }

  .feature-item__icon {
    width: 38px;
    height: 38px;
  }

  .product-docs-grid {
    gap: 0;
  }

  .product-doc-text {
    font-size: 15px;
  }
}

/* Feature rows: name on the left, description beside it, so rows fill the width. */
@media (min-width: 900px) {
  .feature-item__content {
    display: grid;
    grid-template-columns: minmax(200px, 0.55fr) minmax(0, 1.45fr);
    gap: 8px var(--pr-gutter);
    align-items: baseline;
  }

  .feature-item__title {
    margin-bottom: 0;
  }
}

/* ── Full-screen image viewer (shared with the Lab behaviour) ── */
.pv-trigger{position:relative;display:block;width:100%;padding:0;margin:0;border:0;background:none;border-radius:12px;cursor:zoom-in;text-align:left;color:inherit}
.pv-trigger:focus-visible{outline:3px solid var(--focus-ring,#7186ff);outline-offset:4px}
.pv-trigger img{transition:transform 260ms var(--ease-out,ease),border-color 180ms ease}
.pv-trigger__badge{position:absolute;right:10px;bottom:10px;display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;background:rgba(17,18,20,.82);border:1px solid rgba(255,255,255,.16);color:var(--text-primary);font-size:11px;line-height:1;pointer-events:none;backdrop-filter:blur(6px);transition:background-color 160ms ease,border-color 160ms ease}
.pv-trigger__badge svg{width:13px;height:13px;flex-shrink:0}
.pv-lightbox{position:fixed;inset:0;z-index:1200;display:flex;flex-direction:column;background:rgba(11,13,17,.95);backdrop-filter:blur(10px);opacity:0;pointer-events:none;transition:opacity 180ms ease}
.pv-lightbox.is-open{opacity:1;pointer-events:auto}
.pv-lightbox[hidden]{display:none}
.pv-lightbox__bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px clamp(14px,2vw,28px);border-bottom:1px solid var(--border-subtle);background:rgba(17,18,20,.88);flex-shrink:0}
.pv-lightbox__count{font-size:13px;color:var(--text-secondary);font-variant-numeric:tabular-nums}
.pv-lightbox__actions{display:flex;align-items:center;gap:8px}
.pv-lightbox__btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:42px;min-width:42px;padding:0 14px;border-radius:999px;border:1px solid var(--border-medium);background:var(--bg-raised);color:var(--text-primary);font:inherit;font-size:13px;font-weight:500;cursor:pointer;transition:background-color 150ms ease,border-color 150ms ease}
.pv-lightbox__btn:hover{background:#282c35;border-color:#6374d8}
.pv-lightbox__btn[aria-pressed="true"]{background:var(--accent-primary,#4f61cd);border-color:#7186ff;color:#fff}
.pv-lightbox__btn:focus-visible{outline:3px solid var(--focus-ring,#7186ff);outline-offset:3px}
.pv-lightbox__stage{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;overflow:auto;padding:clamp(12px,2.5vw,32px);-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y pinch-zoom}
.pv-lightbox__img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;border-radius:10px;background:#191b21;border:1px solid var(--border-subtle);cursor:zoom-in;user-select:none;transition:width 180ms ease}
.pv-lightbox.is-zoomed .pv-lightbox__stage{align-items:flex-start;justify-content:flex-start}
.pv-lightbox.is-zoomed .pv-lightbox__img{max-width:none;max-height:none;width:max(175vw,1380px);cursor:grab}
.pv-lightbox.is-zoomed .pv-lightbox__img.is-portrait{width:max(115vw,680px)}
.pv-lightbox.is-dragging .pv-lightbox__img{cursor:grabbing}
.pv-lightbox__caption{padding:12px clamp(16px,2.5vw,32px) 16px;border-top:1px solid var(--border-subtle);background:rgba(17,18,20,.88);font-size:13px;line-height:1.5;color:var(--text-secondary);text-align:center;flex-shrink:0}
@media(hover:hover) and (pointer:fine){
}
.pv-trigger--fit{display:block;width:fit-content;max-width:100%;margin-inline:auto}
.pv-trigger img{margin-inline:auto}
.pv-trigger__badge{opacity:0;transition:opacity 160ms ease,background-color 160ms ease,border-color 160ms ease}
.pv-trigger:focus-visible .pv-trigger__badge,.pv-trigger:hover .pv-trigger__badge{opacity:1}
@media(hover:none){.pv-trigger__badge{opacity:1}}
