/* ==========================================================================
   Tenance scenes: 3D product illustrations (pure CSS, bilingual text)
   Builds on .d3 / .d3-stage / .d3-card from redesign.css.
   ========================================================================== */

@property --h { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --n { syntax: "<integer>"; inherits: false; initial-value: 0; }
@property --p { syntax: "<number>"; inherits: false; initial-value: 0; }

.d3 { container-type: inline-size; --ink: #1a2a20; --forest: #2d4a3a; --forest-d: #16241c; --terra: #e09b6b; --cream: #faf6ee; --sand: #efe7d6; }
.d3 .d3-card { font-size: clamp(8.5px, 2.25cqi, 14px); }
.d3 .d3-chip { color: var(--ink); font-size: clamp(8.5px, 2.1cqi, 13px); white-space: nowrap; }
.d3--wide { aspect-ratio: 16 / 9; }
.d3--3x2 { aspect-ratio: 3 / 2; }
.d3--4x3 { aspect-ratio: 4 / 3; }
.d3--sq { aspect-ratio: 1 / 1; }
.d3--mini { aspect-ratio: 16 / 10; }
.d3--mini .d3-card { font-size: clamp(8px, 4.2cqi, 12.5px); padding: 10px 12px; border-radius: 14px; }
.d3--mini .d3-chip { font-size: clamp(8px, 4cqi, 12px); padding: 6px 10px; }
.d3-stage { will-change: transform; }

/* Pause everything that is not on screen (scenes.js toggles .is-live). */
.js-scenes .d3:not(.is-live) *,
.js-scenes .d3:not(.is-live) *::before,
.js-scenes .d3:not(.is-live) *::after { animation-play-state: paused !important; }

/* Mockup slots that now hold a scene lose their old frame chrome. */
.showcase-frame:has(> .d3) { overflow: visible; background: transparent; border: 0; padding-top: 12px; }
.feature-media:has(> .d3) { padding: 12px 18px; overflow: hidden; }
.feature-media > .d3 { width: 100%; max-width: 520px; }
.split-media > .d3 { width: 100%; max-width: 520px; }
.vacancy-card > .d3 { margin: -6px -8px 18px; width: calc(100% + 16px); }
.hero-visual > .d3 { width: 100%; }
.sc-slot { width: 100%; max-width: 540px; }

/* Shared atoms */
.sc-k { font: 700 0.74em/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; opacity: .6; }
.sc-big { font-family: var(--font-display); font-weight: 600; font-size: 2.1em; line-height: 1; letter-spacing: -0.01em; }
.sc-mid { font-family: var(--font-display); font-weight: 600; font-size: 1.35em; line-height: 1.1; }
.sc-muted { opacity: .62; }
.sc-pill { display: inline-block; padding: .3em .7em; border-radius: 999px; font-weight: 700; font-size: .82em; background: rgba(90,200,106,.16); color: #23733a; }
.sc-pill.warn { background: rgba(224,155,107,.2); color: #9a5326; }
.sc-pill.dark { background: var(--forest); color: var(--cream); }
.d3-card.dark .sc-pill { background: rgba(90,200,106,.22); color: #b8f0c2; }
.sc-av { width: 2.2em; height: 2.2em; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: .85em; color: var(--cream); background: linear-gradient(140deg, #46705b, #22392c); }
.sc-av.t { background: linear-gradient(140deg, #f0b48a, #c87b4b); color: var(--ink); }
.sc-sp { flex: 1; }
.sc-bar { height: .5em; border-radius: 99px; background: rgba(26,42,32,.08); overflow: hidden; }
.sc-bar > i { display: block; height: 100%; width: var(--v); border-radius: inherit; background: linear-gradient(90deg, var(--forest), #46705b); transform-origin: left; animation: sc-grow-x 2.4s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--dl, .2s); }
.sc-bar.t > i { background: linear-gradient(90deg, #c87b4b, var(--terra)); }
@keyframes sc-grow-x { from { scale: 0 1; } }

/* Count-up numbers: <span class="sc-count" style="--to:950"></span> */
.sc-count { counter-reset: n var(--n); animation: sc-count 2.2s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: var(--dl, .3s); }
.sc-count::after { content: counter(n); }
@keyframes sc-count { to { --n: var(--to); } }
.sc-count.down { --n: var(--from); animation-name: sc-count-down; }
@keyframes sc-count-down { from { --n: var(--from); } to { --n: var(--to); } }

/* Motion: gentle sway of the whole stage */
.m-sway { animation: sc-sway 14s ease-in-out infinite; }
@keyframes sc-sway { 0%,100% { rotate: 0 1 0 0deg; } 50% { rotate: 0 1 0 6deg; } }

/* Motion: staggered sequence that loops (chat, lists). Children get --i. */
.m-seq > * { opacity: 0; animation: sc-seq var(--T, 11s) cubic-bezier(.2,.8,.2,1) infinite; animation-delay: calc(var(--i, 0) * var(--gap, 1.3s)); }
@keyframes sc-seq { 0% { opacity: 0; translate: 0 12px; scale: .96; } 5%,82% { opacity: 1; translate: 0 0; scale: 1; } 92%,100% { opacity: 0; translate: 0 -6px; } }

/* Motion: slide in from the right, stay (payments, transactions) */
.m-in > * { animation: sc-in 9s cubic-bezier(.2,.8,.2,1) infinite; animation-delay: calc(var(--i, 0) * .7s); }
@keyframes sc-in { 0% { opacity: 0; translate: 24% 0; } 8%,86% { opacity: 1; translate: 0 0; } 96%,100% { opacity: 0; translate: -6% 0; } }
.m-in .sc-pill { animation: sc-pop 9s cubic-bezier(.16,1,.3,1) infinite; animation-delay: calc(var(--i, 0) * .7s + .6s); }
@keyframes sc-pop { 0%,6% { scale: 0; } 12%,86% { scale: 1; } 96%,100% { scale: 0; } }

/* Typing dots and voice waveform */
.sc-typing { display: inline-flex; gap: .28em; padding: .9em 1.1em; border-radius: 16px 16px 16px 4px; background: #efe7d6; }
.sc-typing i { width: .45em; height: .45em; border-radius: 50%; background: #8a8478; animation: sc-blink 1.2s infinite; }
.sc-typing i:nth-child(2) { animation-delay: .2s; } .sc-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes sc-blink { 0%,60%,100% { opacity: .25; translate: 0 0; } 30% { opacity: 1; translate: 0 -3px; } }
.sc-wave { display: flex; align-items: center; gap: 3px; height: 2.2em; }
.sc-wave i { width: 3px; height: 100%; border-radius: 3px; background: var(--terra); animation: sc-wave 1.1s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -0.13s); }
@keyframes sc-wave { from { scale: 1 .15; } to { scale: 1 1; } }

/* Isometric city (hero) */
.iso { position: absolute; left: 50%; top: 58%; width: 0; height: 0; transform-style: preserve-3d; transform: rotateX(58deg) rotateZ(-40deg); }
.iso-plate { position: absolute; width: var(--pw); height: var(--pd); translate: -50% -50%; border-radius: 22px; background: linear-gradient(135deg, #f3ecdf, #e2d6be); box-shadow: 0 0 0 1px rgba(26,42,32,.07), 0 70px 90px -30px rgba(20,33,25,.4); transform-style: preserve-3d; }
.iso-plate::before { content: ""; position: absolute; inset: 8%; border-radius: 14px; background-image: linear-gradient(rgba(26,42,32,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(26,42,32,.06) 1px, transparent 1px); background-size: 9% 9%; }
.box { position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--d); transform-style: preserve-3d; --h: 0px; animation: sc-rise 1.8s cubic-bezier(.2,.8,.2,1) forwards, sc-breathe 6s ease-in-out 2s infinite; animation-delay: var(--dl, 0s), calc(var(--dl, 0s) + 2s); }
@keyframes sc-rise { to { --h: var(--H); } }
@keyframes sc-breathe { 0%,100% { --h: var(--H); } 50% { --h: calc(var(--H) * 1.06); } }
.box > i { position: absolute; display: block; }
.box .t { inset: 0; transform: translateZ(var(--h)); background: var(--top, #f8f2e7); border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); }
.box .f { left: 0; top: 100%; width: 100%; height: var(--h); transform-origin: top; transform: rotateX(90deg); background: repeating-linear-gradient(180deg, transparent 0 9px, rgba(250,246,238,.22) 9px 12px), var(--front, #2d4a3a); }
.box .s { left: 0; top: 0; width: var(--h); height: 100%; transform-origin: left; transform: rotateY(-90deg); background: repeating-linear-gradient(90deg, transparent 0 9px, rgba(250,246,238,.14) 9px 12px), var(--side, #1e3328); }
.box.t2 { --top: #f6d6bd; --front: #e09b6b; --side: #b87445; }
.box.t3 { --top: #ffffff; --front: #d9cdb4; --side: #bcae92; }
.sc-beacon { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #5ac86a; transform: translateZ(var(--z, 60px)); box-shadow: 0 0 0 0 rgba(90,200,106,.5); animation: sc-beacon 2.4s ease-out infinite; }
@keyframes sc-beacon { 0% { box-shadow: 0 0 0 0 rgba(90,200,106,.55); } 100% { box-shadow: 0 0 0 26px rgba(90,200,106,0); } }

/* AI core with orbiting tasks */
.core { position: absolute; left: 50%; top: 50%; width: 24cqi; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #fff7ec 0, #f3c29f 18%, #e09b6b 38%, #2d4a3a 76%, #101a14 100%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 30px 80px -12px rgba(224,155,107,.6), 0 0 140px rgba(224,155,107,.35); animation: sc-core 5s ease-in-out infinite; }
.core::before { content: ""; position: absolute; inset: -16%; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 62%, rgba(224,155,107,.95) 80%, transparent 100%); -webkit-mask: radial-gradient(circle, transparent 63%, #000 64%, #000 67%, transparent 68%); mask: radial-gradient(circle, transparent 63%, #000 64%, #000 67%, transparent 68%); animation: sc-spin 3.2s linear infinite; }
.core::after { content: ""; position: absolute; inset: 22% 26% 52% 30%; border-radius: 50%; background: radial-gradient(rgba(255,255,255,.7), transparent 70%); filter: blur(2px); }
@property --o1x { syntax: "<percentage>"; inherits: false; initial-value: 32%; }
@property --o1y { syntax: "<percentage>"; inherits: false; initial-value: 28%; }
@property --o2x { syntax: "<percentage>"; inherits: false; initial-value: 70%; }
@property --o2y { syntax: "<percentage>"; inherits: false; initial-value: 42%; }
@property --o3x { syntax: "<percentage>"; inherits: false; initial-value: 40%; }
@property --o3y { syntax: "<percentage>"; inherits: false; initial-value: 82%; }
.core {
  background:
    radial-gradient(circle at 38% 32%, transparent 46%, rgba(16,26,20,.45) 76%, rgba(10,18,13,.85) 100%),
    radial-gradient(circle at var(--o1x) var(--o1y), rgba(255,232,206,.95), rgba(255,232,206,0) 36%),
    radial-gradient(circle at var(--o2x) var(--o2y), #e5865a, rgba(229,134,90,0) 52%),
    radial-gradient(circle at var(--o3x) var(--o3y), #4f8a6a, rgba(79,138,106,0) 55%),
    radial-gradient(circle at 50% 50%, #eaa979, #b8643f 62%, #2d4a3a);
  animation: sc-core 5s ease-in-out infinite, orb-flow 11s ease-in-out infinite;
}
@keyframes orb-flow {
  0%, 100% { --o1x: 32%; --o1y: 28%; --o2x: 70%; --o2y: 42%; --o3x: 40%; --o3y: 82%; }
  33% { --o1x: 56%; --o1y: 24%; --o2x: 30%; --o2y: 62%; --o3x: 76%; --o3y: 70%; }
  66% { --o1x: 30%; --o1y: 46%; --o2x: 64%; --o2y: 78%; --o3x: 22%; --o3y: 50%; }
}
@keyframes sc-core { 0%,100% { scale: 1; } 50% { scale: 1.05; } }
@keyframes sc-spin { to { rotate: 360deg; } }
.ring { position: absolute; left: 50%; top: 50%; width: var(--s); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; border: 1px solid rgba(45,74,58,.22); animation: sc-ring 4.5s ease-out infinite; animation-delay: var(--dl, 0s); }
@keyframes sc-ring { 0% { scale: .55; opacity: 0; } 25% { opacity: 1; } 100% { scale: 1.2; opacity: 0; } }
.orbit-plane { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; transform: rotateX(66deg); }
.orbit-path { position: absolute; width: calc(var(--r) * 2); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; border: 1px dashed rgba(45,74,58,.25); }
.orbit { position: absolute; width: 0; height: 0; transform-style: preserve-3d; animation: sc-spin var(--t, 26s) linear infinite; animation-delay: var(--dl, 0s); }
.orbit > .arm { position: absolute; transform: translateX(var(--r)); transform-style: preserve-3d; }
.orbit > .arm > .ctr { transform-style: preserve-3d; animation: sc-spin var(--t, 26s) linear infinite reverse; animation-delay: var(--dl, 0s); }
.orbit > .arm > .ctr > .d3-chip { position: absolute; translate: -50% -50%; transform: rotateX(-66deg); }

/* Toggle switchboard */
.sw { margin-left: auto; position: relative; display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; border-radius: 999px; background: rgba(26,42,32,.08); font-size: .8em; font-weight: 600; min-width: 13em; }
.sw > span { position: relative; z-index: 1; text-align: center; padding: .45em 0; opacity: .7; }
.sw > b { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / 3); border-radius: 999px; background: var(--forest); box-shadow: 0 0 0 1px rgba(26,42,32,.12), 0 4px 10px -4px rgba(20,33,25,.4); animation: var(--a) 7s cubic-bezier(.6,0,.2,1) infinite; animation-delay: var(--dl, 0s); }
@keyframes sw-auto { 0%,100% { translate: 0 0; background: #d7e6dc; } }
@keyframes sw-ask-auto { 0%,40% { translate: 100% 0; background: #f7d8c2; } 50%,90% { translate: 0 0; background: #d7e6dc; } 100% { translate: 100% 0; background: #f7d8c2; } }
@keyframes sw-ask-off { 0%,45% { translate: 100% 0; background: #f7d8c2; } 55%,90% { translate: 200% 0; background: #e2ded6; } 100% { translate: 100% 0; background: #f7d8c2; } }
@keyframes sw-off { 0%,100% { translate: 200% 0; background: #e2ded6; } }

/* Vertical ticker (logs, ledgers) */
.ticker { overflow: hidden; height: var(--th, 9em); -webkit-mask: linear-gradient(transparent, #000 18%, #000 82%, transparent); mask: linear-gradient(transparent, #000 18%, #000 82%, transparent); }
.ticker > div { animation: sc-tick var(--tt, 14s) linear infinite; }
@keyframes sc-tick { to { translate: 0 -50%; } }

/* Chart atoms */
.sc-cols { display: flex; align-items: flex-end; gap: 6%; height: 7em; padding-top: .5em; }
.sc-cols > i { flex: 1; height: var(--v); border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #46705b, #2d4a3a); transform-origin: bottom; animation: sc-col 6s cubic-bezier(.2,.8,.2,1) infinite; animation-delay: calc(var(--i, 0) * .12s); }
.sc-cols > i.t { background: linear-gradient(180deg, #f0b48a, #e09b6b); }
@keyframes sc-col { 0% { scale: 1 0; } 18%,80% { scale: 1 1; } 100% { scale: 1 0; } }
.sc-svg { width: 100%; height: auto; overflow: visible; display: block; }
.sc-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: sc-draw 6s cubic-bezier(.4,0,.2,1) infinite; animation-delay: var(--dl, .3s); }
@keyframes sc-draw { 0% { stroke-dashoffset: 1; } 40%,85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.sc-draw-once { stroke-dasharray: 1; stroke-dashoffset: 1; animation: sc-draw1 2.6s cubic-bezier(.4,0,.2,1) forwards; animation-delay: var(--dl, .3s); }
@keyframes sc-draw1 { to { stroke-dashoffset: 0; } }
.sc-ring-fill { stroke-dasharray: 100; stroke-dashoffset: 100; animation: sc-ringfill 2.6s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: var(--dl, .3s); }
@keyframes sc-ringfill { to { stroke-dashoffset: var(--off, 0); } }

/* Kanban: one ticket travels across three lanes */
.kb { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4%; height: 100%; position: relative; }
.kb-lane { border-radius: 14px; background: rgba(26,42,32,.05); padding: .8em; display: grid; align-content: start; gap: .6em; }
.kb-mini { height: 2.6em; border-radius: 10px; background: #fff; box-shadow: 0 6px 14px -8px rgba(20,33,25,.35); }
.kb-move { position: absolute; top: 34%; left: 0; width: 30.6%; animation: sc-kb 9s cubic-bezier(.6,0,.2,1) infinite; z-index: 2; }
@keyframes sc-kb { 0%,22% { translate: 0 0; rotate: 0deg; } 30% { rotate: 3deg; } 36%,58% { translate: 113% 0; rotate: 0deg; } 66% { rotate: 3deg; } 72%,94% { translate: 226% 0; rotate: 0deg; } 100% { translate: 0 0; } }
.kb-move .st { display: grid; } .kb-move .st > * { grid-area: 1 / 1; animation: sc-kbst 9s infinite; opacity: 0; }
.kb-move .st > :nth-child(1) { animation-name: sc-kbs1; } .kb-move .st > :nth-child(2) { animation-name: sc-kbs2; } .kb-move .st > :nth-child(3) { animation-name: sc-kbs3; }
@keyframes sc-kbs1 { 0%,30% { opacity: 1; } 34%,100% { opacity: 0; } }
@keyframes sc-kbs2 { 0%,32% { opacity: 0; } 36%,66% { opacity: 1; } 70%,100% { opacity: 0; } }
@keyframes sc-kbs3 { 0%,68% { opacity: 0; } 72%,96% { opacity: 1; } 100% { opacity: 0; } }

/* Flip cascade (module wall, templates) */
.tiles { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 3.2%; transform-style: preserve-3d; }
.tile { aspect-ratio: 1.35; border-radius: 16px; padding: .9em; display: grid; align-content: space-between; background: linear-gradient(160deg, #fff, #f4ede0); border: 1px solid rgba(255,255,255,.9); box-shadow: 0 24px 40px -22px rgba(20,33,25,.45); color: var(--ink); animation: sc-flip 8s cubic-bezier(.5,0,.2,1) infinite; animation-delay: calc(var(--i) * .16s); backface-visibility: visible; }
.tile.dark { background: linear-gradient(160deg, #2d4a3a, #16241c); color: var(--cream); border-color: rgba(255,255,255,.12); }
.tile.t { background: linear-gradient(160deg, #f3c29f, #e09b6b); }
.tile svg { width: 1.8em; height: 1.8em; }
@keyframes sc-flip { 0%,12% { transform: rotateY(0) translateZ(0); } 20% { transform: rotateY(180deg) translateZ(30px); } 28%,100% { transform: rotateY(360deg) translateZ(0); } }

/* Fan of documents */
.fan { position: absolute; inset: 0; display: grid; place-items: center; transform-style: preserve-3d; }
.fan > .d3-card { position: absolute; width: 44%; aspect-ratio: .78; left: 28%; top: 10%; animation: sc-fan 8s cubic-bezier(.5,0,.2,1) infinite; transform-origin: 50% 110%; }
@keyframes sc-fan { 0%,10%,92%,100% { rotate: 0deg; translate: 0 0; } 30%,72% { rotate: var(--r); translate: var(--tx) 0; } }
.doc-lines { display: grid; gap: .55em; margin-top: .8em; }
.doc-lines i { display: block; height: .45em; border-radius: 9px; background: rgba(26,42,32,.1); }
.doc-lines i:nth-child(3n) { width: 70%; } .doc-lines i:nth-child(4n) { width: 84%; }

/* Scan line over a document */
.scan { position: relative; overflow: hidden; }
.scan::after { content: ""; position: absolute; left: 0; right: 0; height: 22%; top: -22%; background: linear-gradient(180deg, transparent, rgba(224,155,107,.35) 70%, rgba(224,155,107,.9) 100%); animation: sc-scan 4s cubic-bezier(.5,0,.5,1) infinite; }
@keyframes sc-scan { 0% { top: -22%; } 70%,100% { top: 100%; } }

/* Signature */
.sig-path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: sc-sign 6s cubic-bezier(.5,0,.3,1) infinite; }
@keyframes sc-sign { 0%,15% { stroke-dashoffset: 1; } 55%,90% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.sig-stamp { animation: sc-stamp 6s cubic-bezier(.16,1,.3,1) infinite; }
@keyframes sc-stamp { 0%,56% { scale: 0; opacity: 0; } 62%,92% { scale: 1; opacity: 1; } 100% { scale: 1; opacity: 0; } }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35em; margin-top: .7em; }
.cal > span { aspect-ratio: 1; border-radius: 8px; display: grid; place-items: center; font-size: .82em; background: rgba(26,42,32,.04); }
.cal > span.h { font-weight: 700; background: none; opacity: .5; aspect-ratio: auto; }
.cal > span.ev { background: rgba(224,155,107,.18); color: #8a4a21; font-weight: 700; animation: sc-ev 6s infinite; animation-delay: calc(var(--i) * 1.2s); }
.cal > span.ev.g { background: rgba(45,74,58,.12); color: var(--forest); }
@keyframes sc-ev { 0%,100% { box-shadow: 0 0 0 0 rgba(224,155,107,0); scale: 1; } 8% { box-shadow: 0 0 0 4px rgba(224,155,107,.35); scale: 1.12; } 18% { box-shadow: 0 0 0 0 rgba(224,155,107,0); scale: 1; } }

/* Broadcast ripple */
.bc-ring { position: absolute; left: 50%; top: 50%; width: 70%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; border: 2px solid rgba(224,155,107,.5); animation: sc-ring 3.6s ease-out infinite; animation-delay: var(--dl, 0s); }
.bc-av { position: absolute; left: var(--x); top: var(--y); translate: -50% -50%; animation: sc-ping 3.6s ease-out infinite; animation-delay: var(--dl); }
@keyframes sc-ping { 0%,30%,100% { scale: 1; box-shadow: 0 0 0 0 rgba(90,200,106,0); } 40% { scale: 1.18; box-shadow: 0 0 0 6px rgba(90,200,106,.35); } 60% { scale: 1; } }

/* Moving dots along a horizontal rail (flows, bank sync) */
.rail { position: absolute; height: 2px; background: repeating-linear-gradient(90deg, rgba(45,74,58,.35) 0 6px, transparent 6px 12px); }
.rail > i { position: absolute; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--terra); box-shadow: 0 0 0 4px rgba(224,155,107,.25); animation: sc-rail var(--rt, 3s) cubic-bezier(.5,0,.5,1) infinite; animation-delay: var(--dl, 0s); }
@keyframes sc-rail { 0% { left: 0; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
.fly { position: absolute; animation: sc-fly 6s cubic-bezier(.5,0,.3,1) infinite; animation-delay: var(--dl, 0s); }
@keyframes sc-fly { 0% { translate: 0 0; opacity: 0; scale: .8; } 10% { opacity: 1; scale: 1; } 70% { translate: var(--fx) var(--fy); opacity: 1; } 80%,100% { translate: var(--fx) var(--fy); opacity: 0; scale: .9; } }

/* Horizontal carousel */
.carousel { overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.carousel > div { display: flex; gap: 4%; width: max-content; animation: sc-car 18s linear infinite; }
@keyframes sc-car { to { translate: -50% 0; } }
.listing { width: 38cqi; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 20px 34px -20px rgba(20,33,25,.45); font-size: clamp(8.5px, 2.2cqi, 13px); color: var(--ink); }
.listing .ph { aspect-ratio: 1.6; background: linear-gradient(160deg, rgba(255,255,255,.0) 40%, rgba(22,36,28,.35)), var(--ph, linear-gradient(135deg, #f3c29f, #2d4a3a)); position: relative; }
.listing .ph::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 0; height: 52%; background: linear-gradient(#faf6ee, #e9dfcc); clip-path: polygon(0 34%, 50% 0, 100% 34%, 100% 100%, 0 100%); opacity: .92; }
.listing .bd { padding: .8em 1em; display: grid; gap: .3em; }

/* Gauge (semicircle) */
.gauge { position: relative; }
.gauge svg { width: 100%; display: block; }
.gauge .sc-mid { position: absolute; left: 0; right: 0; bottom: 6%; text-align: center; }

/* Mini scenes inside vacancy cards */
.net-node { position: absolute; left: var(--x); top: var(--y); translate: -50% -50%; }
.net-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.net-svg line { stroke: rgba(45,74,58,.35); stroke-width: 1.5; stroke-dasharray: 4 5; animation: sc-dash 1.4s linear infinite; }
@keyframes sc-dash { to { stroke-dashoffset: -18; } }

@media (prefers-reduced-motion: reduce) {
  .d3 *, .d3 *::before, .d3 *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; }
  .m-seq > *, .m-in > * { opacity: 1; }
}

/* Chips are placed absolutely inside a stage unless a wrapper positions them. */
.d3-stage > .d3-chip { position: absolute; }
.feature-media:has(> .d3) { min-height: 0; padding: 18px; }

/* Float with margin so inline translate (used for centring) keeps working. */
@keyframes d3float { 0%,100% { margin-top: 0; } 50% { margin-top: -10px; } }
.sw { min-width: 10.5em; }

/* ==========================================================================
   Site polish (company feel): typography, texture, states, footer mark
   ========================================================================== */
h1, h2, h3, h4 { text-wrap: balance; }
p, .lede { text-wrap: pretty; }
.stat strong, .hero-stats strong, .sc-big, .sc-mid { font-variant-numeric: tabular-nums; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }

/* Faint engineering grid behind the hero, fading out at the edges */
.hero > .container { position: relative; z-index: 1; }
.hero .hero-grid::before { content: ""; position: absolute; inset: -12% -6% -18%; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(26,42,32,.11) 1px, transparent 1.2px); background-size: 22px 22px;
  -webkit-mask: radial-gradient(70% 70% at 70% 45%, #000 20%, transparent 75%); mask: radial-gradient(70% 70% at 70% 45%, #000 20%, transparent 75%); }

/* Announcement pill (hero) */
.announce { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; padding: 5px 12px 5px 5px; border-radius: 999px;
  background: rgba(255,255,255,.7); border: 1px solid var(--line); color: var(--forest-ink); font-size: 13.5px; font-weight: 500; text-decoration: none;
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 8px 24px -14px rgba(20,33,25,.35); transition: border-color 200ms, box-shadow 200ms, transform 200ms; }
.announce-tag { padding: 4px 10px; border-radius: 999px; background: var(--forest-ink); color: var(--cream); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; position: relative; overflow: hidden; }
.announce-tag::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%); translate: -120% 0; animation: announce-shine 4.5s ease-in-out infinite; }
@keyframes announce-shine { 0%, 60% { translate: -120% 0; } 85%, 100% { translate: 120% 0; } }
.announce svg { width: 14px; height: 14px; transition: translate 200ms; }
@media (hover: hover) and (pointer: fine) {
  .announce:hover { border-color: var(--terracotta); transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 14px 30px -16px rgba(20,33,25,.45); }
  .announce:hover svg { translate: 3px 0; }
}

/* Consistent icon tiles (replace clip-art pngs) */
.ic-tile { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; margin-bottom: 20px; color: var(--forest);
  background: linear-gradient(150deg, #fff, var(--cream-2)); border: 1px solid var(--line); box-shadow: 0 1px 0 #fff inset, 0 10px 20px -14px rgba(20,33,25,.5);
  transition: transform 300ms var(--ease-out), background 300ms, color 300ms; }
.ic-tile svg { width: 22px; height: 22px; }
.bento-item .ic-tile { width: 38px; height: 38px; border-radius: 12px; margin: 0; flex-shrink: 0; }
.bento-item .ic-tile svg { width: 18px; height: 18px; }
@media (hover: hover) and (pointer: fine) {
  .card:hover .ic-tile { transform: translateY(-2px) rotate(-3deg); background: linear-gradient(150deg, var(--forest), var(--forest-ink)); color: var(--cream); }
}

/* Interaction states */
.btn { transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out), background 200ms; }
@media (hover: hover) and (pointer: fine) { .btn:hover { transform: translateY(-1px); } }
.btn:active { transform: translateY(0) scale(.98); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; border-radius: 8px; }
.card-core { transition: box-shadow 300ms var(--ease-out); }

/* Orb on a dark background (home page Tenance AI showcase) */
.orb-dark .core { width: 17cqi; }
.orb-dark .ring { border-color: rgba(250,246,238,.16); }
.orb-dark .orbit-path { border-color: rgba(250,246,238,.18); }
.orb-dark::before { background: radial-gradient(45% 60% at 50% 50%, rgba(224,155,107,0.26), rgba(224,155,107,0) 70%); }
@media (max-width: 600px) { .orb-dark.d3 { aspect-ratio: 1 / 1; } .orb-dark .core { width: 22cqi; } }

@media (max-width: 860px) { .hero-visual { width: 100%; max-width: 440px; } }
@media (max-width: 600px) { .d3--wide { aspect-ratio: 1 / 1; } .d3--3x2 { aspect-ratio: 4 / 3.4; } }

/* No hover jump at the scene border; tilt comes from scenes.js only. */
.d3:hover .d3-stage:not([style*="transform"]) { transform: rotateX(18deg) rotateY(-22deg) rotateZ(4deg); }

/* Home page: copy beside the scene so the dark showcases stay compact */
@media (min-width: 900px) {
  .showcase--split { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(32px, 4vw, 48px); }
  .showcase--split .showcase-frame { margin-top: 0; }
  .showcase--split .showcase-frame > .d3 { aspect-ratio: 16 / 11; }
  .showcase--split .d3 .d3-card { font-size: clamp(8px, 1.95cqi, 13px); padding: 1.1em 1.25em; border-radius: 18px; }
  .showcase--split .d3 .d3-chip { font-size: clamp(8px, 1.85cqi, 12px); }
  .showcase--split .showcase-head h2 { font-size: clamp(26px, 2.6vw, 34px); }
}

/* Home page spacing and merged blocks */
.section--flush-b { padding-bottom: clamp(24px, 3vw, 40px); }
.vacancy-grid--compact { max-width: 1000px; margin: 0 auto; gap: 16px; }
.vacancy-grid--compact .vacancy-card { padding: 20px 20px 22px; }
.vacancy-grid--compact .vacancy-card > .d3 { margin: -4px -6px 22px; width: calc(100% + 12px); }
.vacancy-grid--compact .vacancy-card h3 { font-size: 17px; }
.vacancy-grid--compact .vacancy-card p { font-size: 14px; margin-top: 6px; }

.cta-band--split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: center; text-align: left; padding: clamp(36px, 5vw, 56px); }
.cta-band--split .cta-main, .cta-band--split .cta-res { position: relative; }
.cta-band--split .cta-actions { justify-content: flex-start; margin-top: 26px; }
.cta-res { display: block; padding: 26px 28px; border-radius: var(--r-md); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: var(--cream); transition: background 260ms var(--ease-out), transform 260ms var(--ease-out); }
.cta-res:hover { background: rgba(255,255,255,.1); transform: translateY(-2px); }
.cta-res-k { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--terracotta); }
.cta-res h3 { color: var(--white); font-size: clamp(20px, 2vw, 24px); margin: 10px 0 8px; }
.cta-band--split .cta-res p { margin: 0; font-size: 14.5px; color: rgba(250,246,238,.72); }
.cta-res-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-weight: 600; font-size: 14.5px; color: var(--white); }
.cta-res-link svg { width: 15px; height: 15px; transition: transform 200ms var(--ease-out); }
.cta-res:hover .cta-res-link svg { transform: translate(3px, -2px); }
@media (max-width: 860px) { .cta-band--split { grid-template-columns: 1fr; } }

/* About: five scattered tools merge into one app */
.d3.about-merge { aspect-ratio: 2.3 / 1; margin-top: 26px; }
.about-merge::before { background: radial-gradient(40% 60% at 50% 50%, rgba(224,155,107,.28), rgba(224,155,107,0) 70%); }
.mg-chip { position: absolute; left: 50%; top: 50%; translate: -50% -50%; padding: .5em .95em; border-radius: 999px; background: rgba(255,255,255,.95); color: #1a2a20; font-size: clamp(9px, 2.6cqi, 13px); font-weight: 600; white-space: nowrap; box-shadow: 0 14px 26px -14px rgba(0,0,0,.6); animation: mg-in 7s cubic-bezier(.65,0,.35,1) infinite; animation-delay: calc(var(--i) * .35s); }
@keyframes mg-in {
  0%, 12% { transform: translate(var(--x), var(--y)) scale(1); opacity: 0; }
  20%, 46% { transform: translate(var(--x), var(--y)) scale(1); opacity: 1; }
  64%, 100% { transform: translate(0, 0) scale(.35); opacity: 0; }
}
.mg-core { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: flex; align-items: center; gap: .55em; padding: .8em 1.2em; border-radius: 18px; background: linear-gradient(160deg, #e7a679, #c97a4e); color: #fff; font: 700 clamp(11px, 3cqi, 16px)/1 var(--font-display); box-shadow: 0 0 0 0 rgba(224,155,107,.5), 0 20px 40px -18px rgba(0,0,0,.6); animation: mg-core 7s ease-out infinite; }
.mg-core img { width: 1.6em; height: 1.6em; }
@keyframes mg-core {
  0%, 58% { scale: 1; box-shadow: 0 0 0 0 rgba(224,155,107,.55), 0 20px 40px -18px rgba(0,0,0,.6); }
  66% { scale: 1.12; }
  80% { scale: 1; box-shadow: 0 0 0 22px rgba(224,155,107,0), 0 20px 40px -18px rgba(0,0,0,.6); }
  100% { scale: 1; box-shadow: 0 0 0 0 rgba(224,155,107,0), 0 20px 40px -18px rgba(0,0,0,.6); }
}

/* ── Resources page ── */
.res-hero { padding-bottom: 24px; }
.res-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.res-hero-visual { width: 100%; max-width: 560px; justify-self: end; }
.res-jump { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.res-jump a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 9px 10px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink); transition: border-color 200ms var(--ease-out), transform 200ms var(--ease-out); }
.res-jump a:not(:has(b)) { padding-left: 16px; }
.res-jump a:hover { border-color: var(--forest); transform: translateY(-1px); }
.res-jump b { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; background: var(--forest); color: var(--cream); font-size: 13px; }

.res-head { max-width: 640px; margin-bottom: 28px; }
.res-head h2 { margin-top: 12px; }
.res-head p { margin-top: 12px; color: var(--muted); }

.res-bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.res-card { position: relative; display: flex; flex-direction: column; padding: 26px 26px 22px; border-radius: var(--r-lg); background: var(--paper); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out), border-color 300ms var(--ease-out); }
.res-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(45,74,58,.22); }
.res-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.res-card-top .ic-tile { margin-bottom: 0; }
.res-tag { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 5px 10px; border-radius: 999px; background: rgba(26,42,32,.05); }
.res-card h3 { font-size: 18px; font-weight: 600; line-height: 1.3; }
.res-card p { margin-top: 8px; color: var(--muted); font-size: 14.5px; flex-grow: 1; }
.res-go { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-weight: 600; font-size: 14.5px; color: var(--forest); }
.res-arrow { width: 15px; height: 15px; flex: none; transition: transform 200ms var(--ease-out); }
.res-card:hover .res-arrow, .res-guide:hover .res-arrow, .res-soc:hover .res-arrow { transform: translate(3px, -2px); }
.res-card--wide { grid-column: span 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); grid-template-rows: auto auto 1fr auto; column-gap: 32px; background: linear-gradient(150deg, #fffdf8, #f4ecdd); }
.res-card--wide > :not(.res-preview) { grid-column: 1; }
.res-card--wide .res-preview { grid-column: 2; grid-row: 1 / -1; align-self: center; }
.res-preview { display: grid; gap: 14px; padding: 22px; border-radius: 18px; background: #fff; box-shadow: 0 22px 44px -28px rgba(20,33,25,.45); }
.res-prow { display: grid; grid-template-columns: 7.5em 1fr; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.res-prow .sc-bar { height: 10px; }
.res-prow .sc-bar > i { animation: res-bar 5s cubic-bezier(.2,.8,.2,1) infinite; animation-delay: var(--dl, 0s); }
@keyframes res-bar { 0% { scale: 0 1; } 30%, 85% { scale: 1 1; } 100% { scale: 0 1; } }

.res-guides { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 56px); padding: clamp(28px, 4vw, 48px); border-radius: var(--r-lg); background: var(--forest-deep, #16241c); color: var(--cream); position: relative; overflow: hidden; }
.res-guides::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 10% 0%, rgba(224,155,107,.2), transparent 50%); pointer-events: none; }
.res-guides-intro { position: relative; }
.res-guides-intro .ic-tile { background: rgba(255,255,255,.08); color: var(--terracotta); box-shadow: none; display: grid; margin-bottom: 18px; }
.res-guides-intro .eyebrow { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: var(--cream); }
.res-guides-intro h2 { color: var(--white); margin-top: 14px; font-size: clamp(24px, 2.6vw, 32px); }
.res-guides-intro p { margin-top: 12px; color: rgba(250,246,238,.72); }
.res-guide-list { position: relative; display: grid; gap: 10px; align-content: center; }
.res-guide { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 18px 20px; border-radius: 18px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); color: var(--cream); text-decoration: none; transition: background 260ms var(--ease-out), border-color 260ms var(--ease-out); }
.res-guide:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); }
.res-num { font-family: var(--font-display); font-weight: 600; font-size: 22px; color: var(--terracotta); font-variant-numeric: tabular-nums; }
.res-guide h3 { color: var(--white); font-size: 16.5px; font-weight: 600; line-height: 1.3; }
.res-guide p { margin-top: 4px; color: rgba(250,246,238,.66); font-size: 14px; }
.res-guide .res-arrow { color: var(--cream); }

.res-socials { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.res-soc { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 18px 20px; border-radius: 20px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: transform 260ms var(--ease-out), box-shadow 260ms var(--ease-out); }
.res-soc:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.res-soc .ic-tile { margin-bottom: 0; width: 42px; height: 42px; }
.res-soc b { display: block; font-size: 15px; }
.res-soc small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.res-soc .res-arrow { color: var(--forest); }

@media (max-width: 960px) {
  .res-hero-grid { grid-template-columns: 1fr; }
  .res-hero-visual { justify-self: center; max-width: 480px; }
  .res-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .res-guides { grid-template-columns: 1fr; }
  .res-socials { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .res-bento, .res-socials { grid-template-columns: 1fr; }
  .res-card--wide { grid-column: auto; grid-template-columns: 1fr; }
  .res-card--wide .res-preview { grid-column: 1; grid-row: auto; margin-top: 18px; order: 3; }
  .res-guide { grid-template-columns: auto 1fr; }
  .res-guide .res-arrow { display: none; }
}
@media (max-width: 640px) {
  .res-hero { padding-bottom: 0; }
  .res-hero-visual { width: 94%; margin-top: -8px; }
  .res-hero-visual .d3.d3--3x2 { aspect-ratio: 16 / 11.5; }
  .res-hero::after { display: none; }
}
