/* The Front-to-Back 3-Layer Infrastructure graphic (website/src/depth.mjs, motion in depth.js). Shared: any page that
   uses <!--@depth:...--> loads this file. The markup is the finished picture; .is-wait hides the parts until the
   graphic comes into view, .is-play runs the entrance once, .is-live runs the small loops while it is visible. */
.dx { display: block; width: 100%; height: auto; overflow: visible; font-family: Geist, system-ui, -apple-system, sans-serif; }
.dx-both__compact { display: none; }
/* compact and stack are drawn for phones: on a tablet they stay a comfortable size instead of filling the width */
.dx--compact, .dx--stack { max-width: 760px; margin-inline: auto; }
/* full from 1100px: below that its 14px labels would shrink under 10px */
@media (max-width: 1099px) { .dx-both__full { display: none; } .dx-both__compact { display: block; } }
.dx-a-m { text-anchor: middle; } .dx-a-e { text-anchor: end; }

/* light and materials */
.dx-s-bg0 { stop-color: #d7372b; stop-opacity: .16; } .dx-s-bg1 { stop-color: #d7372b; stop-opacity: 0; }
.dx-s-top0 { stop-color: #17120f; } .dx-s-top1 { stop-color: #241c18; }
.dx-s-fr0 { stop-color: #2a221e; } .dx-s-fr1 { stop-color: #14100e; }
.dx-s-sd0 { stop-color: #1c1613; } .dx-s-sd1 { stop-color: #0d0a09; }
.dx-s-gl0 { stop-color: #4a3f39; stop-opacity: .82; } .dx-s-gl1 { stop-color: #241d1a; stop-opacity: .86; } .dx-s-gl2 { stop-color: #120e0c; stop-opacity: .92; }
.dx-s-ga0 { stop-color: #7a2219; stop-opacity: .9; } .dx-s-ga1 { stop-color: #3d120d; stop-opacity: .9; } .dx-s-ga2 { stop-color: #1c0806; stop-opacity: .94; }
.dx-s-rf0 { stop-color: #f5efe6; stop-opacity: .07; } .dx-s-rf1 { stop-color: #f5efe6; stop-opacity: 0; } .dx-s-ra0 { stop-color: #ef5a4c; stop-opacity: .16; }
.dx-s-ed0 { stop-color: #5b4d46; stop-opacity: .95; } .dx-s-ed1 { stop-color: #1b1513; stop-opacity: .95; }
.dx-s-mt0 { stop-color: #3a302b; } .dx-s-mt1 { stop-color: #5a4b44; }
.dx-s-or0 { stop-color: #ffc2b9; } .dx-s-or1 { stop-color: #e5402f; } .dx-s-or2 { stop-color: #8a1b12; }
.dx-s-gw0 { stop-color: #ef5a4c; stop-opacity: .4; } .dx-s-gw1 { stop-color: #ef5a4c; stop-opacity: 0; }

/* the foundation and its five parts */
.dx-sh-slab { fill: #000; opacity: .75; }
.dx-sl-top { stroke: rgba(245, 239, 230, .1); stroke-width: 1; }
.dx-sl-front, .dx-sl-side { stroke: rgba(245, 239, 230, .06); stroke-width: 1; }
.dx-sl-edge { fill: none; stroke: rgba(245, 239, 230, .3); stroke-width: 1.2; }
.dx-sl-glow { fill: none; stroke: #ef5a4c; stroke-width: 2.4; stroke-linecap: round; opacity: .75; }
.dx-sl-bevel { fill: none; stroke: rgba(255, 246, 236, .1); stroke-width: 1; }
.dx-sh-mod { fill: #000; opacity: .7; }
.dx-md-front { fill: #2b2320; stroke: rgba(245, 239, 230, .14); stroke-width: 1; }
.dx-md-side { fill: #171210; stroke: rgba(245, 239, 230, .08); stroke-width: 1; }
.dx-md-top { stroke: rgba(245, 239, 230, .22); stroke-width: 1; }
.dx-md-lit { fill: none; stroke: rgba(255, 250, 244, .55); stroke-width: 1.1; }
.dx-md-ic { fill: none; stroke: #ef5a4c; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.dx-led { fill: #8fe6aa; }

/* the glass layers */
.dx-halo { opacity: .6; }
.dx-sh-panel { fill: #000; opacity: .55; }
.dx-gw { fill: #f5efe6; opacity: .07; } .dx-gw-adm { fill: #ef5a4c; opacity: .4; }
.dx-gl-top { fill: rgba(255, 246, 236, .32); }
.dx-gl-face { stroke: rgba(245, 239, 230, .34); stroke-width: 1.2; } .dx-gl-face--adm { stroke: #ef5a4c; stroke-width: 1.5; }
.dx-gl-lit { fill: none; stroke: rgba(255, 250, 244, .8); stroke-width: 1.4; stroke-linejoin: round; } .dx-gl-lit--adm { stroke: #ff978b; }
.dx-pierce { fill: none; stroke: rgba(245, 239, 230, .6); stroke-width: 1.1; }
.dx-pn-num { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-size: 46px; fill: #ef5a4c; }
.dx-pn-num--lg { font-size: 72px; }
.dx-pn-name { font-size: 32px; font-weight: 500; letter-spacing: -.015em; fill: #fff; }
.dx-pn-name--lg { font-size: 40px; }
.dx-pn-aud { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 13.5px; font-weight: 500; letter-spacing: .12em; fill: #d6cdc3; }

/* wires and the lights that travel them */
.dx-fl { fill: none; stroke: rgba(245, 239, 230, .6); stroke-width: 1.6; stroke-dasharray: 8 6; }
.dx-ld { fill: none; stroke: rgba(245, 239, 230, .45); stroke-width: 1.2; }
.dx-w-ag { fill: none; stroke: #e5513f; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dx-w-pp { fill: none; stroke: rgba(245, 239, 230, .75); stroke-width: 1.6; stroke-linecap: round; }
.dx-w-sp { fill: none; stroke: rgba(239, 90, 76, .6); stroke-width: 1.3; }
.dx-ah { fill: rgba(245, 239, 230, .9); } .dx-ah--red { fill: #ef5a4c; }
.dx-po { fill: #fff6ea; }
.dx-pu { fill: none; stroke: #ffd0c9; stroke-width: 3.2; stroke-linecap: round; opacity: 0; }
.dx-pu--cream { stroke: #fff6ea; } .dx-pu--big { stroke-width: 3.6; }

/* agents, gates, people, words */
.dx-ag-rim { fill: none; stroke: rgba(255, 255, 255, .3); stroke-width: 1; } .dx-ag-ic { fill: #fff; }
.dx-ag-ping, .dx-gt-ping { fill: none; opacity: 0; transform-box: fill-box; transform-origin: center; }
.dx-ag-ping { stroke: rgba(239, 90, 76, .75); stroke-width: 1.5; }
.dx-gt-ping { stroke: rgba(143, 230, 170, .85); stroke-width: 1.4; }
.dx-gt-c { fill: #2a7a4a; stroke: #8fe6aa; stroke-width: 1.3; }
.dx-gt-ic { fill: none; stroke: #fff; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.dx-sp { fill: #141110; stroke: #ef5a4c; stroke-width: 1.6; }
.dx-pp-c { fill: #1f1a18; stroke: rgba(245, 239, 230, .7); stroke-width: 1.4; }
.dx-pp-ic { fill: none; stroke: #f5efe6; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dx-fd-ic { fill: none; stroke: #ef5a4c; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dx-l-n { font-size: 18px; font-weight: 600; letter-spacing: -.01em; fill: #fff; }
.dx-l-s { font-size: 14px; fill: #c9bfb5; } .dx-l-s--fd { fill: #e6ded4; }
.dx-l-sp { font-size: 14px; fill: #ece4da; }
.dx-l-n--lg { font-size: 36px; } .dx-l-s--lg { font-size: 28px; }

/* focus: a page lights some parts (data-focus on the svg) and the rest steps back */
.dx [data-part] { transition: opacity .6s cubic-bezier(.2, .7, .1, 1); }
.dx[data-focus] [data-part] { opacity: var(--dx-dim, .16); } /* a page can soften the dimming: --dx-dim: .3 */
/* the Infrastructure agent (token build) works on every layer: when it is lit, its layers stay half lit so its
   arrows point at something */
.dx[data-focus~="build"] [data-part~="web"], .dx[data-focus~="build"] [data-part~="mem"], .dx[data-focus~="build"] [data-part~="adm"] { opacity: .5; }
.dx[data-focus~="found"] [data-part~="found"], .dx[data-focus~="web"] [data-part~="web"], .dx[data-focus~="mem"] [data-part~="mem"],
.dx[data-focus~="adm"] [data-part~="adm"], .dx[data-focus~="build"] [data-part~="build"], .dx[data-focus~="visitor"] [data-part~="visitor"],
.dx[data-focus~="member"] [data-part~="member"], .dx[data-focus~="ops"] [data-part~="ops"], .dx[data-focus~="flow"] [data-part~="flow"],
.dx[data-focus~="you"] [data-part~="you"], .dx[data-focus~="visitors"] [data-part~="visitors"], .dx[data-focus~="agents"] [data-part~="agents"] { opacity: 1; }

/* the entrance: the foundation, then the layers from front to back, then the agents and their words */
.dx.is-wait .dx-in-rise, .dx.is-wait .dx-in-fade, .dx.is-wait .dx-in-pop { opacity: 0; }
.dx.is-play .dx-in-rise { animation: dxRise 1.1s cubic-bezier(.2, .7, .1, 1) both; }
.dx.is-play .dx-in-fade { animation: dxFade .9s ease both; }
.dx.is-play .dx-in-pop { transform-box: fill-box; transform-origin: center; animation: dxPop .8s cubic-bezier(.3, 1.35, .4, 1) both; }
@keyframes dxRise { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: none; } }
@keyframes dxFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dxPop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
/* then it keeps working, while it is on screen */
.dx.is-live .dx-pu { opacity: 1; stroke-dasharray: var(--pd, 14) var(--pg, 200); stroke-dashoffset: var(--pd, 14); animation: dxTravel var(--pt, 3s) linear var(--dl, 0s) infinite; }
.dx.is-live .dx-ag-ping { animation: dxPing 4s ease-out infinite; }
.dx.is-live .dx-gt-ping { animation: dxPingG 6s ease-out infinite; }
.dx.is-live .dx-led { animation: dxLed 2.4s ease-in-out infinite; }
@keyframes dxTravel { 0% { stroke-dashoffset: var(--pd, 14); } 55%, 100% { stroke-dashoffset: var(--pe, -100); } }
@keyframes dxPing { 0% { opacity: .75; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(2.3); } }
@keyframes dxPingG { 0% { opacity: .85; transform: scale(1); } 35%, 100% { opacity: 0; transform: scale(2.6); } }
@keyframes dxLed { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .dx *, .dx [data-part] { animation: none !important; transition: none !important; }
  .dx-pu { display: none; }
}
