/*
 * Private preview: one continuous decorative surface for each document.
 * Load after the existing site CSS. Actual photographs, the art interlude,
 * welcome, screen transitions, identity assets and cursor are not restyled.
 */
#site {
  --continuity-dark: rgba(23, 24, 21, .94);
  --continuity-paper: rgba(240, 234, 222, .85);
  --continuity-paper-ink: #655542;
  position: relative;
  isolation: isolate;
}

/* A single, unanimated viewport-sized painting, not one crop per section.
 * Fixed positioning is deliberate; background-attachment remains scroll.
 * No filters, blends, scroll handlers or promoted animated texture layers.
 * #site is hidden by the existing welcome gate, so this never paints over it.
 */
#site::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: #e5ddcf;
  background-image:
    linear-gradient(rgba(240, 234, 222, .32), rgba(240, 234, 222, .32)),
    url('/assets/art-mineral-v3.png');
  background-position: center, center;
  background-size: cover, cover;
  background-repeat: no-repeat;
  background-attachment: scroll;
  contain: paint;
}

/* Dark reading surfaces retain the existing light foregrounds. These are
 * tonal washes only: every section reveals the same underlying painting.
 */
#main > .section,
#main > .hero,
#main > .contact,
#main > .event-ribbon,
#main > .material-ribbon,
#site > footer {
  background: var(--continuity-dark);
}

/* Preserve the established dark-on-paper reading zones. Both page-head
 * variants (editorial and material) use the same surface as the body.
 */
#main > .page-head,
#main > .product-showcase,
#main > .material-experience,
#main > .resource-hub,
#main > .social-section {
  background: var(--continuity-paper);
}

/* Retire only decorative section-local artwork and tiled grain. The hero's
 * architectural photograph, .art-interlude and all content images survive.
 */
#main > .page-head::after,
#main > .product-showcase::before,
#main > .material-experience::before,
#main > .social-section::before {
  content: none;
  background: none;
}
#main > .page-head > .material-art {
  display: none;
}

/* Cards are inset transparent panels, not fresh material crops. Actual
 * packaging/gallery image canvases, certificates, maps and swatches retain
 * their original backgrounds and colours for faithful interpretation.
 */
#main .event-next,
#main .event-recap,
#main .guide-grid > article,
#main .purchase-products > article {
  background: rgba(23, 24, 21, .18);
}
#main .showcase-grid > article,
#main .finish-card {
  background: rgba(255, 252, 245, .24);
}
#main .mood-card {
  background: rgba(234, 225, 206, .035);
}
#main .mood-card:hover,
#main .mood-card[aria-pressed=true] {
  background: rgba(234, 225, 206, .075);
}

/* Supporting copy must remain readable over both light and dark strata.
 * No type families, sizes, artwork labels or control-state colours change.
 */
#main > :is(.page-head, .product-showcase, .material-experience, .resource-hub, .social-section)
  :is(.page-description, .section-caption, .pack-credit, .showcase-source,
      .simulation-disclaimer, .resource-grid p, .scene-setting,
      .scene-setting > span, .product-identity p:not(.eyebrow),
      .tile-product-intro p:not(.eyebrow), .finish-heading p:not(.eyebrow),
      .showcase-grid > article > div > p:not(.eyebrow), .colour-heading,
      .material-page-links .text-link) {
  color: var(--continuity-paper-ink);
}
#main > :is(.page-head, .product-showcase, .material-experience, .resource-hub, .social-section) .eyebrow {
  color: #795a38;
}
#main > .material-experience .material-tabs button small,
#main > .material-experience .swatch > span,
#main > .material-experience .scene-options .reset-colour {
  color: #6e5942;
}
#main > .material-experience .swatch[aria-pressed=true] > span {
  color: #714624;
}
#main :is(.document-source, .concept-note, .pack-note, .section-bottom > p),
#site > footer {
  color: #b7a88c;
}

/* Mobile address-bar changes must not rescale the art during scrolling.
 * One large-viewport layer is retained, with normal background attachment;
 * the browser may composite it without repainting section-sized images.
 */
@media (max-width: 960px), (pointer: coarse) {
  #site::before {
    bottom: auto;
    height: 100vh;
    height: 100lvh;
    background-position: center, 42% center;
  }
}

/* No motion is added, including in the existing static and reduced modes. */
@media (prefers-reduced-motion: reduce) {
  #site::before {
    animation: none;
    transition: none;
  }
}

/* Preserve native high-contrast rendering rather than forcing the art. */
@media (forced-colors: active) {
  #site::before { content: none; }
  #main > .section,
  #main > .hero,
  #main > .page-head,
  #main > .contact,
  #main > .social-section,
  #main > .event-ribbon,
  #main > .material-ribbon,
  #site > footer {
    background: Canvas;
    color: CanvasText;
  }
}
