/* Alter8ight 3D Scene Engine — shared frontend renderer and admin preview */
.a8p-hero-3d-host{position:absolute;z-index:1;pointer-events:auto;isolation:isolate;contain:paint;opacity:1;}
.a8p-hero-3d-host.a8p-scene-has-interactions{z-index:3;}
.a8p-scene-canvas{position:absolute;inset:0;display:block;width:100%;height:100%;outline:none;touch-action:pan-y;cursor:grab;opacity:0;transition:opacity .45s ease;}
.a8p-scene-ready .a8p-scene-canvas{opacity:1;}
.a8p-scene-dragging .a8p-scene-canvas{cursor:grabbing;}
.a8p-scene-unavailable .a8p-scene-canvas{display:none;}
.a8p-scene-fallback{position:absolute;inset:0;display:grid;place-items:center;opacity:0;transition:opacity .45s ease;pointer-events:none;background:radial-gradient(ellipse at 50% 50%,rgba(46,184,255,.07),transparent 58%);}
.a8p-scene-ready .a8p-scene-fallback{opacity:0;}
.a8p-scene-unavailable .a8p-scene-fallback{opacity:1;}
.a8p-scene-fallback-note{position:absolute;left:50%;bottom:5%;transform:translateX(-50%);max-width:90%;font-size:11px;letter-spacing:.02em;color:var(--a8p-muted,#858899);text-align:center;opacity:0;white-space:normal;padding:8px 12px;border:1px solid rgba(130,140,160,.2);border-radius:999px;background:rgba(255,255,255,.72);backdrop-filter:blur(8px);}
.a8p-scene-unavailable .a8p-scene-fallback-note,.a8p-scene-loading .a8p-scene-fallback-note{opacity:.9;}
.a8p-scene-ready .a8p-scene-fallback-note{opacity:0;}
.a8p-scene-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
.a8p-scene-embed{position:relative;width:100%;min-height:320px;aspect-ratio:16/10;overflow:hidden;border-radius:24px;background:radial-gradient(ellipse at 50% 48%,color-mix(in srgb,var(--a8p-accent,#FF2877) 10%,transparent),transparent 64%);isolation:isolate;}
.a8p-scene-embed .a8p-scene-canvas{position:absolute;inset:0;}
.a8p-scene-admin-preview{margin:18px 0 26px;padding:18px;border:1px solid #d9dce4;border-radius:16px;background:linear-gradient(145deg,#f8f9fc,#eff2f8);}
.a8p-scene-admin-preview-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin:0 0 12px;color:#171923;}
.a8p-scene-admin-preview-head b{display:block;font-size:15px;}
.a8p-scene-admin-preview-head p{margin:5px 0 0;color:#687083;font-size:12px;}
.a8p-scene-preview-status{display:inline-flex;align-items:center;max-width:48%;padding:7px 10px;border-radius:99px;background:#e4eaf2;color:#455168;font-size:11px;line-height:1.35;}
.a8p-scene-admin-canvas{min-height:300px;max-height:440px;aspect-ratio:16/8;border-radius:12px;background:radial-gradient(ellipse at 50% 50%,rgba(104,130,180,.13),transparent 68%),#11131b;}
.a8p-scene-admin-canvas .a8p-scene-fallback-note{color:#d1d7e5;}
.a8p-scene-admin-preview>.description{margin:10px 0 0;color:#687083;}
/* Shared hero canvas: text and 3D identity sit inside one uninterrupted background. */
.a8p-hero{
  position:relative;
  display:flex;
  align-items:center;
  min-height:clamp(590px,calc(100svh - 82px),820px);
  padding:0;
  overflow:hidden;
  isolation:isolate;
  background:var(--a8p-bg);
}
.a8p-hero:before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:
    radial-gradient(ellipse at 77% 44%,color-mix(in srgb,var(--a8p-accent) 12%,transparent),transparent 34%),
    radial-gradient(ellipse at 63% 18%,color-mix(in srgb,var(--a8p-accent-2) 12%,transparent),transparent 34%),
    linear-gradient(135deg,color-mix(in srgb,var(--a8p-bg) 97%,var(--a8p-accent) 3%),var(--a8p-bg) 52%,color-mix(in srgb,var(--a8p-bg) 96%,var(--a8p-accent-2) 4%));
}
.a8p-hero-3d-host{
  position:absolute;
  z-index:1;
  top:4%;right:0;bottom:4%;left:auto;
  width:54%;height:92%;
  min-height:0;max-height:none;
  transform:none;
  contain:layout paint;
  isolation:isolate;
  pointer-events:auto;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
.a8p-hero-3d-host .a8p-scene-canvas{width:100%;height:100%;background:transparent!important;}
.a8p-hero-3d-host .a8p-scene-fallback{background:transparent!important;}
.a8p-hero-3d-host .a8p-scene-fallback-note{background:color-mix(in srgb,var(--a8p-bg) 78%,transparent);}
.a8p-hero-content{
  position:relative;z-index:2;
  width:min(var(--a8p-container),calc(100% - 48px));
  margin-inline:auto;
  padding:clamp(36px,5.5vh,68px) 0;
  pointer-events:none;
}
.a8p-hero-content>*{pointer-events:auto;}
.a8p-hero-content>.a8p-eyebrow,
.a8p-hero-content>.a8p-display,
.a8p-hero-content>.a8p-hero-copy,
.a8p-hero-content>.a8p-hero-actions,
.a8p-hero-content>.a8p-hero-foot{max-width:47%;}
.a8p-hero .a8p-display{font-size:clamp(3rem,5.25vw,5.6rem);line-height:.96;max-width:47%;}
.a8p-hero-copy{max-width:43%;margin:22px 0 25px!important;font-size:clamp(15px,1.45vw,18px);line-height:1.7;}
.a8p-hero-actions{gap:10px;}
.a8p-hero-foot{margin-top:clamp(26px,4vh,50px);padding-top:15px;}
.a8p-scroll-cue{white-space:nowrap;}

/* Short landscape windows: common when a phone requests the desktop site. */
@media (min-width:900px) and (max-height:760px) and (pointer:fine){
  .a8p-hero{min-height:clamp(430px,calc(100svh - 82px),590px);}
  .a8p-hero-3d-host{top:2%;bottom:2%;height:96%;width:52%;}
  .a8p-hero-content{padding-block:25px;}
  .a8p-hero .a8p-display{font-size:clamp(2.45rem,4.65vw,4.2rem);}
  .a8p-hero-copy{font-size:14px;margin:15px 0 18px!important;}
  .a8p-hero-foot{margin-top:20px;padding-top:12px;}
}

/* Touch-first tablet / phone desktop-mode viewport: use a compact stacked stage. */
@media (min-width:900px) and (max-width:1100px) and (pointer:coarse),
       (min-width:900px) and (max-width:1100px) and (any-pointer:coarse){
  .a8p-hero{display:flex;flex-direction:column;align-items:stretch;min-height:0;padding:0 0 36px;}
  .a8p-hero-3d-host{position:relative;inset:auto;order:0;width:100%;height:clamp(270px,40vw,390px);min-height:0;max-height:390px;margin:0;-webkit-mask-image:linear-gradient(#000 78%,transparent);mask-image:linear-gradient(#000 78%,transparent);}
  .a8p-hero-content{order:1;width:min(var(--a8p-container),calc(100% - 44px));padding:20px 0 0;}
  .a8p-hero-content>.a8p-eyebrow,.a8p-hero-content>.a8p-display,.a8p-hero-content>.a8p-hero-copy,.a8p-hero-content>.a8p-hero-actions,.a8p-hero-content>.a8p-hero-foot{max-width:100%;}
  .a8p-hero .a8p-display{font-size:clamp(2.8rem,6vw,4.5rem);}
  .a8p-hero-copy{max-width:700px;font-size:16px;margin:18px 0 22px!important;}
  .a8p-hero-foot{margin-top:30px;}
}

/* Tablet and mobile portrait: the scene is a transparent upper layer, followed by content. */
@media(max-width:899px){
  .a8p-hero{display:flex;flex-direction:column;align-items:stretch;min-height:0;padding:0 0 34px;}
  .a8p-hero-3d-host{position:relative;inset:auto;order:0;width:100%;height:clamp(250px,48vw,370px);min-height:0;max-height:370px;margin:0;-webkit-mask-image:linear-gradient(#000 78%,transparent);mask-image:linear-gradient(#000 78%,transparent);}
  .a8p-hero-content{order:1;width:min(var(--a8p-container),calc(100% - 36px));padding:18px 0 0;}
  .a8p-hero-content>.a8p-eyebrow,.a8p-hero-content>.a8p-display,.a8p-hero-content>.a8p-hero-copy,.a8p-hero-content>.a8p-hero-actions,.a8p-hero-content>.a8p-hero-foot{max-width:100%;}
  .a8p-hero .a8p-display{font-size:clamp(3rem,8vw,5.25rem);max-width:850px;}
  .a8p-hero-copy{max-width:720px;font-size:16px;margin:18px 0 23px!important;}
  .a8p-hero-foot{margin-top:34px;}
}
@media(max-width:560px){
  .a8p-hero{padding-bottom:26px;}
  .a8p-hero-3d-host{height:clamp(205px,61vw,270px);max-height:270px;}
  .a8p-hero-content{width:calc(100% - 34px);padding-top:15px;}
  .a8p-hero .a8p-display{font-size:clamp(2.65rem,11.8vw,4.05rem);line-height:.98;}
  .a8p-hero-copy{font-size:15px;margin:17px 0 21px!important;}
  .a8p-hero-actions{display:grid;grid-template-columns:1fr;gap:9px;}
  .a8p-hero-actions .a8p-button{width:100%;justify-content:center;}
  .a8p-hero-foot{align-items:flex-start;gap:10px;flex-direction:column;margin-top:25px;}
}

@media(prefers-reduced-motion:reduce){.a8p-hero-3d-host,.a8p-scene-canvas,.a8p-scene-fallback{transition:none}.a8p-scene-canvas{cursor:default;}}

/* Object interaction UI: small discovery controls, tiny content prompt and on-demand detail overlay. */
.a8p-scene-canvas.a8p-scene-object-hover{cursor:pointer;}
.a8p-scene-interaction-ui{
  --a8p-scene-ui-panel:rgba(255,255,255,.94);
  --a8p-scene-ui-panel-strong:rgba(255,255,255,.985);
  --a8p-scene-ui-text:#171923;
  --a8p-scene-ui-muted:#505767;
  --a8p-scene-ui-border:rgba(23,25,35,.15);
  --a8p-scene-ui-soft:rgba(20,25,38,.065);
  position:absolute;inset:0;z-index:8;pointer-events:none;font-family:var(--a8p-font-body,inherit);
}
html[data-a8p-theme="dark"] .a8p-scene-interaction-ui{
  --a8p-scene-ui-panel:rgba(13,17,27,.92);
  --a8p-scene-ui-panel-strong:rgba(13,17,27,.985);
  --a8p-scene-ui-text:#F5F6FA;
  --a8p-scene-ui-muted:#C0C5D1;
  --a8p-scene-ui-border:rgba(255,255,255,.18);
  --a8p-scene-ui-soft:rgba(255,255,255,.09);
}
.a8p-platform .a8p-scene-interaction-ui button{font-family:var(--a8p-font-body,inherit);}
.a8p-platform .a8p-scene-explore-toggle{
  position:absolute;top:11px;right:11px;display:inline-flex;align-items:center;justify-content:center;min-height:29px;padding:5px 9px;
  border:1px solid var(--a8p-scene-ui-border);border-radius:999px;background:var(--a8p-scene-ui-panel);color:var(--a8p-scene-ui-muted);
  font-size:9px;font-weight:750;line-height:1;letter-spacing:.035em;box-shadow:0 5px 16px rgba(0,0,0,.09);
  backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);cursor:pointer;pointer-events:auto;opacity:.82;
  transition:background .2s ease,border-color .2s ease,opacity .2s ease;
}
.a8p-platform .a8p-scene-explore-toggle:hover,.a8p-platform .a8p-scene-explore-toggle[aria-expanded=true]{background:var(--a8p-scene-ui-panel-strong);border-color:var(--a8p-accent,#FF2877);color:var(--a8p-scene-ui-text);opacity:1;}
.a8p-platform .a8p-scene-object-menu{
  position:absolute;top:47px;right:11px;display:grid;gap:3px;width:min(230px,calc(100% - 22px));max-height:min(48%,300px);overflow:auto;padding:6px;
  border:1px solid var(--a8p-scene-ui-border);border-radius:13px;background:var(--a8p-scene-ui-panel-strong);color:var(--a8p-scene-ui-text);
  box-shadow:0 14px 38px rgba(0,0,0,.16);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);pointer-events:auto;
}
.a8p-scene-object-menu[hidden],.a8p-scene-content-prompt[hidden],.a8p-scene-content-overlay[hidden]{display:none!important;}
.a8p-platform .a8p-scene-object-choice{display:block;width:100%;padding:9px 10px;border:0;border-radius:8px;background:transparent;color:var(--a8p-scene-ui-text);font-size:11px;font-weight:650;line-height:1.35;text-align:left;cursor:pointer;transition:background .18s ease,color .18s ease;}
.a8p-platform .a8p-scene-object-choice:hover,.a8p-platform .a8p-scene-object-choice:focus-visible{outline:none;background:var(--a8p-scene-ui-soft);color:var(--a8p-accent-text);}
.a8p-platform .a8p-scene-content-prompt{
  position:absolute;left:50%;bottom:12px;display:flex;align-items:center;justify-content:center;gap:9px;max-width:calc(100% - 26px);padding:6px 8px 6px 11px;
  transform:translateX(-50%);border:1px solid var(--a8p-scene-ui-border);border-radius:999px;background:var(--a8p-scene-ui-panel-strong);color:var(--a8p-scene-ui-text);
  box-shadow:0 7px 24px rgba(0,0,0,.13);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);pointer-events:auto;
  animation:a8pScenePromptIn .22s ease both;
}
.a8p-platform .a8p-scene-content-prompt-title{display:block;max-width:150px;overflow:hidden;color:var(--a8p-scene-ui-muted);font-size:9px;font-weight:700;line-height:1.2;text-overflow:ellipsis;white-space:nowrap;}
.a8p-platform .a8p-scene-view-content{flex:none;padding:6px 9px;border:0;border-radius:999px;background:var(--a8p-accent,#FF2877);color:#fff;font-size:9px;font-weight:800;line-height:1.2;white-space:nowrap;cursor:pointer;}
.a8p-platform .a8p-scene-view-content:hover,.a8p-platform .a8p-scene-view-content:focus-visible{outline:2px solid var(--a8p-scene-ui-text);outline-offset:2px;filter:brightness(1.06);}
.a8p-platform .a8p-scene-content-overlay{
  position:absolute;inset:0;z-index:16;display:grid;place-items:center;padding:16px;pointer-events:auto;
  background:rgba(8,12,21,.36);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);
  animation:a8pSceneOverlayIn .18s ease both;
}
.a8p-platform .a8p-scene-content-dialog{
  width:min(420px,100%);max-height:min(82%,520px);overflow:auto;padding:16px 17px 18px;
  border:1px solid var(--a8p-scene-ui-border);border-radius:17px;background:var(--a8p-scene-ui-panel-strong);color:var(--a8p-scene-ui-text);
  box-shadow:0 22px 65px rgba(0,0,0,.24);pointer-events:auto;overscroll-behavior:contain;
  animation:a8pSceneDialogIn .22s cubic-bezier(.2,.75,.25,1) both;
}
.a8p-scene-content-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:11px;}
.a8p-platform .a8p-scene-object-eyebrow{color:var(--a8p-accent,#FF2877);font-size:9px;font-weight:850;letter-spacing:.17em;}
.a8p-platform .a8p-scene-object-close{flex:none;padding:7px 0;border:0;background:transparent;color:var(--a8p-scene-ui-muted);font-size:10px;font-weight:750;line-height:1;cursor:pointer;}
.a8p-platform .a8p-scene-object-close:hover{color:var(--a8p-accent-text);}
.a8p-platform .a8p-scene-object-title{margin:0 0 8px;color:var(--a8p-scene-ui-text);font:750 18px/1.2 var(--a8p-font-head,inherit);letter-spacing:-.025em;}
.a8p-platform .a8p-scene-object-description{margin:0 0 11px;color:var(--a8p-scene-ui-muted);font-size:12px;line-height:1.55;}
.a8p-platform .a8p-scene-object-details{padding-top:10px;border-top:1px solid var(--a8p-scene-ui-border);color:var(--a8p-scene-ui-text);font-size:11px;line-height:1.7;}
@keyframes a8pScenePromptIn{from{opacity:0;transform:translate(-50%,5px)}to{opacity:1;transform:translate(-50%,0)}}
@keyframes a8pSceneOverlayIn{from{opacity:0}to{opacity:1}}
@keyframes a8pSceneDialogIn{from{opacity:0;transform:translateY(7px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:560px){
  .a8p-platform .a8p-scene-explore-toggle{top:7px;right:7px;min-height:25px;padding:4px 7px;font-size:8px;opacity:.76;}
  .a8p-platform .a8p-scene-object-menu{top:39px;right:7px;width:min(205px,calc(100% - 14px));max-height:42%;padding:5px;}
  .a8p-platform .a8p-scene-object-choice{padding:8px 9px;font-size:10px;}
  .a8p-platform .a8p-scene-content-prompt{bottom:6px;gap:7px;max-width:calc(100% - 14px);padding:5px 6px 5px 9px;}
  .a8p-platform .a8p-scene-content-prompt-title{max-width:112px;font-size:8px;}
  .a8p-platform .a8p-scene-view-content{padding:5px 8px;font-size:8px;}
  .a8p-platform .a8p-scene-content-overlay{padding:10px;}
  .a8p-platform .a8p-scene-content-dialog{width:100%;max-height:84%;padding:13px 14px 15px;border-radius:14px;}
  .a8p-platform .a8p-scene-object-title{font-size:16px;}
  .a8p-platform .a8p-scene-object-description{font-size:11px;}
  .a8p-platform .a8p-scene-object-details{font-size:10px;line-height:1.65;}
}
@media(prefers-reduced-motion:reduce){.a8p-scene-explore-toggle,.a8p-scene-object-choice,.a8p-scene-content-prompt,.a8p-scene-content-overlay,.a8p-scene-content-dialog{transition:none!important;animation:none!important;}}


/* Saved-scene placement controls in Platform Settings. */
.a8p-scene-placement-preview-select{display:flex;align-items:center;gap:8px;margin-top:10px;color:#455168;font-size:12px;font-weight:600}
.a8p-scene-placement-preview-select select{max-width:290px;min-height:34px}
.a8p-scene-placement-manager{margin:22px 0 24px;padding:20px;border:1px solid #d9dfe9;border-radius:16px;background:linear-gradient(145deg,#fbfcfe,#f3f5f9)}
.a8p-scene-placement-manager-head h3{margin:5px 0 6px;color:#202534;font-size:17px}
.a8p-scene-placement-manager-head p{max-width:850px;margin:0 0 17px;color:#687083;line-height:1.6}
.a8p-scene-placement-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.a8p-scene-placement-field{display:flex;flex-direction:column;gap:6px;min-width:0;padding:13px;border:1px solid #e0e4ec;border-radius:11px;background:#fff}
.a8p-scene-placement-field strong{color:#242b3a;font-size:13px}
.a8p-scene-placement-field span{min-height:34px;color:#687083;font-size:12px;line-height:1.45}
.a8p-scene-placement-field select{width:100%;max-width:100%;min-height:38px}
.a8p-scene-no-published{margin:14px 0 0;padding:12px 14px;border-left:3px solid #ef315f;background:#fff;color:#455168}
.a8p-home-scene-placement{min-height:220px;height:clamp(230px,30vw,360px);max-height:390px;aspect-ratio:16/7;margin:26px auto 34px;border:1px solid color-mix(in srgb,var(--a8p-line,#d7d9e0) 52%,transparent);border-radius:24px;background:radial-gradient(ellipse at 50% 48%,color-mix(in srgb,var(--a8p-accent,#FF2877) 11%,transparent),transparent 65%),color-mix(in srgb,var(--a8p-surface,var(--a8p-bg)) 94%,var(--a8p-accent) 6%)}
.a8p-home-scene-placement .a8p-scene-canvas{width:100%;height:100%}
.a8p-home-scene-placement .a8p-scene-fallback-note{color:var(--a8p-muted,#858899)}
@media(max-width:782px){.a8p-scene-placement-grid{grid-template-columns:1fr}.a8p-scene-placement-manager{padding:14px}.a8p-scene-placement-preview-select{align-items:flex-start;flex-direction:column}.a8p-scene-placement-preview-select select{max-width:100%;width:100%}.a8p-home-scene-placement{height:clamp(210px,62vw,280px);min-height:210px;margin:20px auto 26px;border-radius:17px}}
