/* La luce della Fornace. Paper, brand pigment and a slow reflected oven light.
   Every decorative layer sits behind the products; the food stage stays ivory. */
.customer-app,
.customer-app.demo-layout,
.merch-app {
  --fornace-light-paper: #f7f1e4;
  --fornace-light-wine: #6b1024;
  --fornace-light-ink: #171717;
  --fornace-light-olive: #596047;
  --fornace-light-rule: #6b10242b;
  --fornace-light-field-one: 730px;
  --fornace-light-field-two: 1680px;
  --fornace-light-field-three: 2860px;
  position: relative;
  isolation: isolate;
  background-color: var(--fornace-light-paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='paper'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.76' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Cpath fill='%23596047' opacity='.045' filter='url(%23paper)' d='M0 0h160v160H0z'/%3E%3C/svg%3E");
  color: var(--fornace-light-ink);
}

/* A continuous wash, deliberately asymmetric rather than a set of card fills. */
.customer-app::before,
.merch-app::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70vw 460px at -22vw var(--fornace-light-field-one), #6b10245c 0%, #6b102426 46%, #6b102400 77%),
    radial-gradient(ellipse 63vw 620px at 119vw var(--fornace-light-field-two), #59604759 0%, #59604726 44%, #59604700 78%),
    radial-gradient(ellipse 72vw 640px at -25vw var(--fornace-light-field-three), #6b10242b 0%, #6b102410 48%, #6b102400 78%);
}

.customer-app::after,
.merch-app::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90vw 600px at 98% 900px, #e5ae6030 0%, #edc78716 51%, #edc78700 79%),
    radial-gradient(ellipse 70vw 800px at 0% 2200px, #efbf782e 0%, #efbf7800 76%);
}

.customer-app.demo-layout {
  --storefront-paper: var(--fornace-light-paper);
  --storefront-wine: var(--fornace-light-wine);
  --storefront-line: var(--fornace-light-rule);
  background-color: var(--fornace-light-paper);
}

.customer-app.demo-layout .top,
.customer-app.demo-layout .shell {
  background: transparent;
}

.customer-app .merch-showcase,
.customer-app .pizza-showcase,
.customer-app .drinks-showcase,
.merch-app .merch-gallery {
  position: relative;
  isolation: isolate;
  background: transparent;
}

/* These bounded layers can sleep independently when their scene leaves view.
   The middle remains quiet so ink and real garment colours carry the scene. */
.customer-app .merch-showcase::before,
.customer-app .pizza-showcase::before,
.customer-app .drinks-showcase::before,
.merch-app .merch-gallery::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 44% 59% at -2% 33%, #6b102452 0%, #6b102429 31%, #6b10240d 62%, #6b102400 91%),
    radial-gradient(ellipse 45% 58% at 105% 53%, #59604745 0%, #59604726 35%, #5960470a 68%, #59604700 96%);
}

.customer-app .merch-showcase::after,
.customer-app .pizza-showcase::after,
.customer-app .drinks-showcase::after,
.merch-app .merch-gallery::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  max-height: 960px;
  pointer-events: none;
  opacity: .82;
  transform: translate3d(-.8%, .3%, 0) scale(1.015);
  transform-origin: 72% 45%;
  background:
    radial-gradient(ellipse 32% 52% at 51% 36%, #fffaf3d9 0%, #fffaf380 48%, #fffaf300 90%),
    radial-gradient(ellipse 72% 30% at 56% 58%, #dfb77d3d 0%, #edc78724 38%, #edc78700 80%),
    radial-gradient(ellipse 66% 54% at 100% 12%, #efbd744a 0%, #efbd7426 41%, #efbd7400 76%);
}

.customer-app .pizza-showcase::before,
.customer-app .drinks-showcase::before {
  background:
    radial-gradient(ellipse 55% 30% at -18% 12%, #6b102433 0%, #6b10240e 48%, #6b102400 78%),
    radial-gradient(ellipse 48% 24% at 118% 90%, #59604730 0%, #5960470c 46%, #59604700 79%);
}

.customer-app .pizza-showcase::after,
.customer-app .drinks-showcase::after {
  background:
    radial-gradient(ellipse 64% 40% at 102% 13%, #efbd7499 0%, #efbd7440 41%, #efbd7400 77%),
    radial-gradient(ellipse 60% 30% at -4% 88%, #b36d333b 0%, #edbd7b24 43%, #edbd7b00 78%);
}

/* A solid, warm photographic stage is intentional: darken blending must never
   pick up a moving coloured wash under pizza or drinks. */
.customer-app .ps-stage,
.customer-app .pizza-showcase .ps-stage,
.customer-app .drinks-showcase .ps-stage {
  background: var(--fornace-light-paper);
}

/* Let the light approach the photographic paper gradually. These transitions
   are outside the stage, so the packshots always blend against solid ivory. */
.customer-app .ps-topline {
  background: linear-gradient(180deg, #f7f1e400 0%, #f7f1e46b 40%, var(--fornace-light-paper) 100%);
}

.customer-app .ps-gallery {
  position: relative;
  isolation: isolate;
  background: var(--fornace-light-paper);
}

.customer-app .ps-gallery::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 100%;
  left: 0;
  right: 0;
  height: 72px;
  pointer-events: none;
  background: linear-gradient(180deg, var(--fornace-light-paper) 0%, #f7f1e4c2 30%, #f7f1e445 70%, #f7f1e400 100%);
}

.customer-app .ps-selection {
  position: relative;
  z-index: 1;
}

/* A scene has no visible rectangular end: pigment and reflection dissolve back
   into the continuous paper before reaching the upper and lower boundaries. */
.customer-app .merch-showcase::before,
.customer-app .merch-showcase::after,
.customer-app .pizza-showcase::before,
.customer-app .pizza-showcase::after,
.customer-app .drinks-showcase::before,
.customer-app .drinks-showcase::after,
.merch-app .merch-gallery::before,
.merch-app .merch-gallery::after {
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 9%, #000 65%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 9%, #000 65%, transparent 100%);
}

/* A pool of reflected light gives the unchanged rail a physical ground. */
.customer-app .ms-stage::before,
.merch-app .merch-rack::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 14%;
  right: 14%;
  bottom: 2px;
  height: 24px;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, #6b10242b 0%, #6b102414 32%, #6b102400 74%);
}

.customer-app .ms-rail,
.merch-app .merch-rack-bar {
  background: linear-gradient(90deg, #6b102426, #6b102461 26%, #59604755 76%, #59604724);
  box-shadow: 0 1px 0 #fff9ef9c;
}

.customer-app .ms-hanger,
.merch-app .merch-hanger {
  stroke: #817668;
}

.customer-app .ps-topline p,
.merch-app .merch-eyebrow,
.merch-app .merch-topline {
  color: var(--fornace-light-olive);
}

.customer-app .ps-topline p::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 1px;
  margin-right: 8px;
  vertical-align: middle;
  background: currentColor;
}

.customer-app .ms-heading > a {
  color: var(--fornace-light-wine);
  font-weight: 700;
  letter-spacing: .055em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.customer-app .ms-heading h2,
.customer-app .ps-topline h2,
.customer-app .ps-product h3 {
  color: var(--fornace-light-wine);
}

.merch-app {
  --wine: var(--fornace-light-wine);
  --cream: var(--fornace-light-paper);
  --line: var(--fornace-light-rule);
  --fornace-light-field-one: 250px;
  --fornace-light-field-two: 790px;
  --fornace-light-field-three: 1500px;
}

.merch-app::after {
  background:
    radial-gradient(ellipse 88vw 660px at 105% 370px, #e5ae603d 0%, #edc78718 51%, #edc78700 79%),
    radial-gradient(ellipse 65vw 620px at -4% 1160px, #efbf7829 0%, #efbf7800 76%);
}

.merch-app .merch-gallery::before {
  background:
    radial-gradient(ellipse 44% 56% at -2% 30%, #6b102452 0%, #6b102429 32%, #6b10240d 63%, #6b102400 92%),
    radial-gradient(ellipse 45% 56% at 105% 50%, #59604745 0%, #59604726 35%, #5960470a 68%, #59604700 96%);
}

.merch-app .merch-details {
  background: #fbf7edee;
  border-color: var(--fornace-light-rule);
  box-shadow: 0 12px 40px #6b102405;
}

/* Products settle together. Pointer tracking remains immediate and never loops. */
.customer-app .product-rail-item,
.merch-app .merch-hanging {
  transition: transform 340ms cubic-bezier(.22, .68, .15, 1), left 340ms cubic-bezier(.22, .68, .15, 1);
}

.customer-app .product-rail-stage.is-dragging .product-rail-item,
.merch-app .merch-rack.is-dragging .merch-hanging {
  transition: none;
}

.customer-app .ms-buy,
.customer-app .ms-view button,
.customer-app .ps-quantity button,
.customer-app .ordering-choices button,
.customer-app .app-header-actions a,
.customer-app .app-header-actions button,
.customer-app .customer-nav a,
.merch-app .merch-size-cta,
.merch-app .merch-primary,
.merch-app .merch-secondary,
.merch-app .merch-sizes button,
.merch-app .merch-catalog button {
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

/* JavaScript only grants motion; all material and light exist without it. */
.customer-app [data-fornace-light-scene]::after,
.merch-app [data-fornace-light-scene]::after {
  animation: fornace-light-reflection 20s ease-in-out infinite alternate;
  animation-play-state: paused;
}

.customer-app .pizza-showcase[data-fornace-light-scene]::after {
  animation-duration: 24s;
  animation-delay: -7s;
}

.customer-app .drinks-showcase[data-fornace-light-scene]::after {
  animation-duration: 22s;
  animation-delay: -11s;
}

.customer-app [data-fornace-light-running="true"]::after,
.merch-app [data-fornace-light-running="true"]::after {
  animation-play-state: running;
}

.customer-app [data-fornace-light-still="true"]::after,
.merch-app [data-fornace-light-still="true"]::after {
  animation: none;
}

@keyframes fornace-light-reflection {
  from { opacity: .72; transform: translate3d(-.8%, .3%, 0) scale(1.015); }
  to { opacity: .96; transform: translate3d(.9%, -.5%, 0) scale(1.035); }
}

@media (max-width: 760px) {
  .customer-app {
    --fornace-light-field-one: 800px;
    --fornace-light-field-two: 1750px;
    --fornace-light-field-three: 2850px;
  }

  .customer-app::before,
  .merch-app::before {
    background:
      radial-gradient(ellipse 115vw 390px at -66vw var(--fornace-light-field-one), #6b10245e 0%, #6b102426 48%, #6b102400 78%),
      radial-gradient(ellipse 105vw 530px at 167vw var(--fornace-light-field-two), #59604726 0%, #59604715 45%, #59604700 78%),
      radial-gradient(ellipse 115vw 640px at -70vw var(--fornace-light-field-three), #6b10242b 0%, #6b102410 48%, #6b102400 78%);
  }

  .customer-app .merch-showcase::before,
  .merch-app .merch-gallery::before {
    background:
      radial-gradient(ellipse 57% 58% at -10% 34%, #6b102452 0%, #6b102429 30%, #6b10240d 61%, #6b102400 91%),
      radial-gradient(ellipse 55% 57% at 114% 48%, #59604745 0%, #59604726 34%, #5960470a 67%, #59604700 96%);
  }

  .customer-app .merch-showcase::after,
  .merch-app .merch-gallery::after {
    background:
      radial-gradient(ellipse 36% 52% at 51% 35%, #fffaf3d9 0%, #fffaf380 48%, #fffaf300 90%),
      radial-gradient(ellipse 78% 29% at 53% 59%, #dfb77d3d 0%, #edc78724 38%, #edc78700 80%),
      radial-gradient(ellipse 80% 53% at 123% 13%, #efbd744a 0%, #efbd7426 42%, #efbd7400 77%);
  }

  .merch-app {
    --fornace-light-field-one: 270px;
    --fornace-light-field-two: 800px;
    --fornace-light-field-three: 1550px;
  }
}

@media (prefers-reduced-motion: reduce), (update: slow) {
  .customer-app [data-fornace-light-scene]::after,
  .merch-app [data-fornace-light-scene]::after {
    animation: none;
  }

  .customer-app .product-rail-item,
  .merch-app .merch-hanging {
    transition: none;
    will-change: auto;
  }

  .customer-app .ms-buy,
  .customer-app .ms-view button,
  .customer-app .ps-quantity button,
  .customer-app .ordering-choices button,
  .customer-app .app-header-actions a,
  .customer-app .app-header-actions button,
  .customer-app .customer-nav a,
  .merch-app .merch-size-cta,
  .merch-app .merch-primary,
  .merch-app .merch-secondary,
  .merch-app .merch-sizes button,
  .merch-app .merch-catalog button {
    transition: none;
  }
}
