/* Keep the existing canvas, panel, and scroll stages; replace its backdrop. */
#hero3dCanvas {
  background:
    radial-gradient(ellipse at 85% 5%, rgba(255, 225, 93, 0.5) 0%, rgba(255, 225, 93, 0.12) 32%, rgba(255, 225, 93, 0) 65%),
    linear-gradient(120deg, #101010 0%, #1B1D20 58%, #292A25 100%);
}

#stage1 .canvas-wrapper {
  position: relative;
  border-radius: 0 !important;
  background: #101010;
  box-shadow: none;
}

#stage1 #hero3dCanvas {
  z-index: 3 !important;
  background: transparent;
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 600' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M600 200H1200V600H600ZM400 200H600V300H400ZM600 100H800V200H600ZM1000 100H1200V200H1000Z'/%3E%3C/svg%3E");
}

.home-mosaic-surface {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(6, 1fr);
  pointer-events: none;
  z-index: 0;
}
.home-mosaic-surface.has-top-extension {
  top: -33.333333%;
  height: 133.333333%;
  grid-template-rows: repeat(8, minmax(0, 1fr));
}
.mosaic-block { background: #1D1426; pointer-events: auto; touch-action: none; cursor: default; }
#stage1 .mosaic-block[data-tile-row="6"][data-tile-column="4"]:not(.is-user-video),
#stage1 .mosaic-block[data-tile-row="8"][data-tile-column="4"]:not(.is-user-video),
#stage1 .mosaic-block[data-tile-row="3"][data-tile-column="8"]:not(.is-user-video),
#stage1 .mosaic-block[data-tile-row="2"][data-tile-column="8"]:not(.is-user-video),
#stage1 .mosaic-block[data-tile-row="2"][data-tile-column="9"]:not(.is-user-video) { background: #1D1426 !important; }
body[data-tile-interaction-enabled="true"] .mosaic-block { cursor: grab; }
.mosaic-block.is-dragging { z-index: 30; cursor: grabbing; transition: none !important; }
.mosaic-block.is-motif-drag-preview { background: rgba(255,196,0,.75) !important; outline: 2px solid #fff; }
.mosaic-block:nth-child(7n) { background: #181817; }
.mosaic-plain-grey { background: #181817; }
.home-mosaic-surface[data-mosaic-shape="shape-1"] > .mosaic-top-extension {
  display: contents;
}
.mosaic-coordinate-grid {
  position: absolute;
  z-index: 5;
  top: -33.333333%;
  left: 0;
  width: 100%;
  height: 133.333333%;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(8, minmax(0, 1fr));
  pointer-events: auto;
}
.mosaic-coordinate {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 3px;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
  font: 700 clamp(8px, .68vw, 11px)/1.25 Inter, sans-serif;
  cursor: default;
  touch-action: none;
  user-select: none;
}
.mosaic-coordinate[hidden] { display: none !important; }
body[data-tile-interaction-enabled="true"] .mosaic-coordinate { cursor: grab; }
.mosaic-coordinate > span {
  display: inline-block;
  padding: 1px 3px;
  border-radius: 2px;
  background: rgba(0, 0, 0, .58);
  letter-spacing: .02em;
  text-shadow: 0 1px 2px #000;
  pointer-events: none;
}
.mosaic-coordinate:hover > span { background: rgba(255, 196, 0, .92); color: #111; text-shadow: none; }
.mosaic-coordinate.is-dragging { cursor: grabbing; }
[data-home-globe-video="true"] #stage1 .mosaic-block.is-user-black { background: #1D1426 !important; }
[data-home-globe-video="true"] #stage1 .mosaic-block.is-user-video { background: transparent !important; }
.mosaic-block.user-added-tile { background: transparent !important; }
.mosaic-block.user-added-tile.is-user-black { background: #1D1426 !important; }
.home-panorama #stage1 .mosaic-coordinate:focus-visible { outline: 2px solid #FFC400; outline-offset: -2px; }
@keyframes eden-tile-arrive {
  from { opacity: 0; }
  to { opacity: 1; }
}
#stage1 .home-mosaic-surface > .mosaic-block,
#stage1 .eden-symbol-tiles > * {
  animation: eden-tile-arrive .85s cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: .08s;
}
#stage1 .home-mosaic-surface > .mosaic-block:nth-child(3n),
#stage1 .eden-symbol-tiles > :nth-child(2n) { animation-delay: .2s; }
#stage1 .home-mosaic-surface > .mosaic-block:nth-child(3n + 1),
#stage1 .eden-symbol-tiles > :nth-child(3n) { animation-delay: .35s; }
@media (prefers-reduced-motion: reduce) {
  #stage1 .home-mosaic-surface > .mosaic-block,
  #stage1 .eden-symbol-tiles > * { animation: none; }
}
.mosaic-accent { background: #FFE15D; width: 28%; height: 45%; align-self: end; justify-self: end; }

/* Small architectural accents sit inside the mosaic's empty tiles. */
.eden-symbol-tiles {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(6, 1fr);
  z-index: 4;
  pointer-events: none;
}
body[data-tile-studio-initializing="true"] #stage1 .eden-symbol-tiles {
  visibility: hidden;
}
.eden-symbol-tile {
  border-radius: 18px;
  color: #FFDE59;
  background:
    radial-gradient(ellipse at 0% 0%, #101010 0%, transparent 65%),
    radial-gradient(ellipse at 100% 100%, #101010 0%, transparent 65%),
    radial-gradient(ellipse at 100% 0%, rgba(16,16,16,.8), transparent 58%),
    radial-gradient(ellipse at 0% 100%, rgba(16,16,16,.85), transparent 58%),
    radial-gradient(ellipse at 42% 56%, rgba(90,55,112,.4), transparent 66%),
    linear-gradient(130deg, #101010 12%, #23192A 48%, #101010 90%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.eden-symbol-tile svg { width: 72%; height: 78%; }
.symbol-bible { position: relative; }
.bible-quadrants {
  background: #101010;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.bible-quarter { position: relative; border-radius: 12px; }
.bible-quarter-art {
  position: absolute;
  width: calc(200% + 6px);
  height: calc(200% + 6px);
}
.open-pages-motif { position: absolute; width: 100% !important; height: 100% !important; inset: 0; color: #F2E8D5; }
.symbol-bible .cropped-bible {
  position: absolute;
  width: 76%;
  height: 88%;
  right: 12%;
  bottom: 6%;
  color: #F2E8D5;
  opacity: 1;
  transform: none;
}
.symbol-dove { position: relative; }
.symbol-dove .cropped-dove {
  position: absolute;
  width: 62%;
  height: 62%;
  left: 19%;
  top: 10%;
  color: #F2E8D5;
  opacity: 1;
  transform: rotate(6deg);
}
.symbol-bible { grid-column: 2 / 4; grid-row: 3 / 5; }
.symbol-covenant-backing { grid-column: 5 / 7; grid-row: 1 / 3; min-width: 0; min-height: 0; }
.symbol-covenant { width: 100%; height: 100%; color: #D6A640; }
.symbol-grey-cube { grid-column: 4 / 5; grid-row: 4 / 5; background: #181817; }
.symbol-bible-grey-cube { grid-column: 2 / 3; grid-row: 2 / 3; background: #181817; }
.symbol-covenant .covenant-ark {
  width: 78%;
  height: 78%;
  color: #F2E8D5;
  opacity: 1;
}
.symbol-dove-backing { grid-column: 4 / 6; grid-row: 5 / 7; background: #101010; min-width: 0; min-height: 0; }
.symbol-dove-backing .symbol-dove { width: 100%; height: 100%; }
.symbol-arc { grid-column: 11 / 12; grid-row: 4 / 5; }
.symbol-arc { position: relative; }
.symbol-arc .olive-beak {
  position: absolute;
  width: 78%;
  height: 78%;
  left: 11%;
  top: 11%;
  color: #F2E8D5;
  opacity: .85;
}
.symbol-arc span { width: 54%; aspect-ratio: 1; border-radius: 100% 0 0 0; background: #F2E8D5; box-shadow: inset -12px -6px 0 #FFDE59; }

.eden-geometry {
  position: relative;
  pointer-events: none;
  z-index: 3;
  align-self: center;
  justify-self: center;
  width: 42%;
  aspect-ratio: 1;
}
.geometry-quarter {
  background: #FFE15D;
  border-radius: 100% 0 0 0;
  width: 52%;
  opacity: .85;
}
.geometry-open-bible { width: 78%; color: #FFE15D; opacity: .85; }
.geometry-open-bible svg { display: block; width: 100%; height: 100%; }
.geometry-bible-pages { overflow: hidden; background: #44304D; }
.geometry-bible-pages svg { display: block; width: 100%; height: 100%; }
.geometry-outline {
  border: 1px solid rgba(255,225,93,.5);
  border-radius: 0 0 12px 0;
}
.geometry-outline::after {
  content: '';
  position: absolute;
  inset: 30%;
  background: #FFE15D;
  opacity: .7;
}
.geometry-step {
  width: 35%;
  background: #FFE15D;
  clip-path: polygon(0 0, 50% 0, 50% 50%, 100% 50%, 100% 100%, 0 100%);
  align-self: end;
}

.camera-mosaic {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
  perspective: 800px;
  container-type: inline-size;
}

.camera-mosaic .camera-frame {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: clamp(24px, var(--size), 15vw);
  aspect-ratio: 1408 / 768;
  background: rgba(16,16,16,.12);
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255,225,93,.45);
  box-shadow: 0 3px 12px rgba(16,16,16,.35);
  opacity: 0;
  transition: opacity .25s ease, left 1.2s ease, top 1.2s ease, width 1.2s ease;
}

.camera-mosaic .camera-depth-0 { z-index: 3; }
.camera-frame { overflow: hidden; }
.camera-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.camera-mosaic .camera-depth-1 { z-index: 2; }
.camera-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(68,48,77,.28), rgba(39,23,47,.2));
}
.camera-mosaic .camera-depth-2 { z-index: 1; filter: blur(.6px); border-color: rgba(255,225,93,.14); }

.camera-mosaic.is-visible .camera-frame {
  opacity: var(--opacity);
  transition-delay: var(--delay);
  animation: testimony-fade 7s ease-in-out infinite both;
  animation-delay: calc(var(--delay) * 6);
}

@keyframes testimony-fade {
  0%, 100% { opacity: 0; }
  25%, 60% { opacity: var(--opacity); }
}

.camera-mosaic.is-gathered .camera-frame {
  left: var(--mosaic-x);
  top: var(--mosaic-y);
  width: var(--mosaic-width);
  height: var(--mosaic-height);
  aspect-ratio: auto;
  transform: none;
  border: 0;
  box-shadow: none;
  animation: none;
  opacity: 1;
  transition-delay: 0s;
}

.camera-mosaic.is-gathered .intro-only-frame { opacity: 0; visibility: hidden; }
.camera-mosaic.is-gathered .camera-frame:first-child { opacity: 0; visibility: hidden; }
.camera-mosaic.is-gathered .charcoal-mosaic-tile { background: #242424; opacity: 1; }
.camera-mosaic.is-gathered .charcoal-mosaic-tile img,
.camera-mosaic.is-gathered .charcoal-mosaic-tile::after { visibility: hidden; }



.camera-mosaic:not(.is-gathered) .mosaic-extra {
  visibility: hidden;
  opacity: 0;
  animation: none;
}

.globe-viewfinder {
  position: absolute;
  inset: 26px 32px;
  z-index: 12;
  pointer-events: none;
  color: #F6F3E9;
  opacity: 0;
  transition: opacity 0.45s ease;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-shadow: 0 1px 5px #101010;
}

.globe-viewfinder.is-recording {
  opacity: 0.85;
}

.viewfinder-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border: solid currentColor;
  border-width: 0;
}

.viewfinder-corner.top-left { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.viewfinder-corner.top-right { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.viewfinder-corner.bottom-left { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.viewfinder-corner.bottom-right { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

.viewfinder-record {
  position: absolute;
  top: 14px;
  left: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.viewfinder-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FFE15D;
  box-shadow: 0 0 5px rgba(255, 225, 93, 0.3);
}

.viewfinder-timecode {
  position: absolute;
  right: 15px;
  bottom: 14px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
  .camera-mosaic .camera-depth-2 { display: none; }
  .camera-mosaic .camera-frame { max-width: 18vw; }
  .camera-mosaic.is-gathered .camera-frame { max-width: none; }
  .globe-viewfinder { inset: 20px; font-size: 9px; }
  .viewfinder-corner { width: 20px; height: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .camera-mosaic .camera-frame { transition: none; transition-delay: 0s; }
  .camera-mosaic.is-visible .camera-frame { animation: none; }
  .globe-viewfinder { transition: none; }
}
