/* Homepage Capabilities section: the 3D office tour (driven by /office/office.js).
   Without JS: the still render, then the cards stacked. With JS (.office-live): the
   section is a tall scroll track and #office-pin sticks while the cards change. */
#s-cap.office{position:relative;padding:0!important;min-height:0!important}
#s-cap.office-live{height:calc(100vh + 10 * 85vh)}
#office-pin{position:relative;overflow:hidden}
.office-live #office-pin{position:sticky;top:0;height:100vh;height:100dvh}   /* dvh: follows Safari's toolbars, so nothing ends above the real bottom */

#office-poster{display:block;width:100%;max-width:1200px;height:auto;margin:0 auto;padding:10vh clamp(24px,4vw,64px) 0}
.office-live #office-poster{position:absolute;left:34%;top:8%;width:64%;height:84%;max-width:none;padding:0;object-fit:contain;transition:opacity .9s}
#office-canvas{display:none}
.office-live #office-canvas{display:block;position:absolute;inset:0;width:100%;height:100%;opacity:0;transition:opacity .9s}
#office-pin.ready #office-canvas{opacity:1}
#office-pin.ready #office-poster{opacity:0}
/* a soft ink fade behind the card, so text never sits on a busy room */
.office-live #office-pin::after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,#141210 0%,rgba(20,18,16,0.9) 30%,rgba(20,18,16,0) 46%);opacity:0;transition:opacity .6s}
.office-live #office-pin:not([data-stop="intro"])::after{opacity:1}
#office-spots,#office-cards,#office-rail{z-index:1}

/* cards */
#office-cards{display:grid;gap:44px;padding:6vh clamp(24px,4vw,64px) 12vh}
.office-live #office-cards{position:absolute;inset:0;padding:0;display:block;pointer-events:none}
#office-cards article{max-width:440px}
.office-live #office-cards article{position:absolute;left:clamp(24px,4vw,64px);top:50%;width:min(420px,31vw);transform:translateY(-46%);opacity:0;visibility:hidden;transition:opacity .45s,transform .7s cubic-bezier(.2,.7,.2,1),visibility 0s .45s}
.office-live #office-cards article.on{opacity:1;visibility:visible;transform:translateY(-50%);pointer-events:auto;transition:opacity .45s,transform .7s cubic-bezier(.2,.7,.2,1),visibility 0s}
.o-kick{font-family:'JetBrains Mono';font-size:12px;letter-spacing:0.2em;color:#C6A05A;margin-bottom:14px;font-weight:400}
.o-title{font-family:'Bebas Neue';font-size:clamp(30px,3.3vw,54px);line-height:1;letter-spacing:0.01em;margin-bottom:18px}
.o-num{font-family:'JetBrains Mono';font-size:12px;letter-spacing:0.12em;color:#C6A05A}
.o-name{font-family:'Bebas Neue';font-weight:400;font-size:clamp(40px,4.6vw,80px);line-height:0.92;margin:10px 0 16px}
[data-stop="end"] .o-name{font-size:clamp(36px,3.8vw,64px)}
.o-desc{font-size:clamp(16px,1.3vw,20px);line-height:1.5;color:rgba(242,238,230,0.74);margin-bottom:16px}
.o-note{font-size:14px;line-height:1.5;color:rgba(242,238,230,0.5);border-left:2px solid rgba(198,160,90,0.6);padding-left:12px;margin-bottom:16px}
.o-local{font-family:'JetBrains Mono';font-size:11px;letter-spacing:0.12em;color:rgba(242,238,230,0.42)}
.o-local a{color:rgba(198,160,90,0.85)}
.o-hint{font-family:'JetBrains Mono';font-size:11px;letter-spacing:0.2em;color:rgba(242,238,230,0.42);margin-top:28px}
.o-stack{font-family:'JetBrains Mono';font-size:12.5px;letter-spacing:0.08em;line-height:1.6;color:#C6A05A}
.o-demo{display:inline-block;margin-top:16px;font-family:'JetBrains Mono';font-size:12px;letter-spacing:0.1em;color:#F2EEE6;border:1px solid rgba(198,160,90,0.5);padding:8px 12px;border-radius:2px}
.o-demo:hover{border-color:#C6A05A;color:#C6A05A}
.o-cta{display:flex;flex-wrap:wrap;gap:6px 16px;align-items:center}
.o-btn{display:inline-block;margin-top:16px;font-family:'JetBrains Mono';font-size:12.5px;letter-spacing:0.12em;text-transform:uppercase;color:#141210;background:#C6A05A;padding:15px 20px;border-radius:2px}
.o-btn:hover{color:#141210;background:#F2EEE6}

/* "+" room markers on the overview */
#office-spots{position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity .4s}
#office-spots.on{opacity:1}
#office-spots button{position:absolute;left:0;top:0;width:0;height:0;border:0;background:none;padding:0;cursor:pointer;pointer-events:none}
#office-spots.on button{pointer-events:auto}
#office-spots span{position:absolute;left:-15px;top:-15px;width:30px;height:30px;border-radius:50%;background:rgba(20,18,16,0.82);border:1px solid #C6A05A;color:#C6A05A;font:400 20px/27px 'JetBrains Mono',monospace;text-align:center}
/* the pulse ring only scales and fades, so it never repaints over the 3D */
#office-spots span::after{content:'';position:absolute;inset:-1px;border-radius:50%;border:1px solid #C6A05A;opacity:0;pointer-events:none}
#office-spots.on span::after{animation:oPulse 2.6s infinite}
#office-spots em{position:absolute;left:22px;top:-12px;white-space:nowrap;font:normal 11px/24px 'JetBrains Mono',monospace;letter-spacing:0.08em;color:#141210;background:#C6A05A;padding:0 8px;border-radius:2px;opacity:0;transform:translateX(-4px);transition:opacity .25s,transform .25s;pointer-events:none}
#office-spots button:hover em,#office-spots button:focus-visible em{opacity:1;transform:none}
#office-spots button:hover span,#office-spots button:focus-visible span{background:#C6A05A;color:#141210}
@keyframes oPulse{0%{transform:scale(1);opacity:.7}70%{transform:scale(1.8);opacity:0}100%{transform:scale(1.8);opacity:0}}
.still #office-spots{display:none}

/* stop rail */
#office-rail{display:none}
.office-live #office-rail{display:flex;position:absolute;right:clamp(14px,2vw,30px);top:50%;transform:translateY(-50%);flex-direction:column;gap:6px}
#office-rail button{width:22px;height:22px;border:0;background:none;padding:0;cursor:pointer;display:grid;place-items:center}
#office-rail button::after{content:'';width:6px;height:6px;border-radius:50%;background:rgba(242,238,230,0.28);transition:background .3s,transform .3s}
#office-rail button.on::after{background:#C6A05A;transform:scale(1.6)}
#office-rail button:hover::after{background:#F2EEE6}

/* phones and portrait screens: the building on top, the card underneath */
@media (max-width:820px),(max-aspect-ratio:1/1){
  #s-cap.office-live{height:calc(100svh + 10 * 80svh)}
  .office-live #office-poster{left:4%;width:92%;top:5%;height:50%}
  .office-live #office-cards article{left:16px;right:16px;width:auto;top:auto;bottom:calc(88px + env(safe-area-inset-bottom, 0px));transform:translateY(14px);background:rgba(26,23,18,0.9);border:1px solid rgba(198,160,90,0.22);border-radius:6px;padding:18px 18px 20px}
  .office-live #office-cards article.on{transform:none}
  .o-name{font-size:clamp(34px,9vw,52px);margin:6px 0 10px}
  .o-title{font-size:clamp(26px,7vw,40px);margin-bottom:12px}
  .o-desc{font-size:15px;margin-bottom:10px}
  .o-note{font-size:13px;margin-bottom:10px}
  .o-hint{margin-top:14px}
  .o-stack{font-size:11px}
  .o-demo,.o-btn{margin-top:12px}
  .office-live #office-rail{right:8px;top:30%}
  .office-live #office-pin::after{background:linear-gradient(0deg,#141210 0%,rgba(20,18,16,0.85) 30%,rgba(20,18,16,0) 46%)}
  /* compact cards on phones so the room above stays in view (the 3D frames it in the top 45%);
     #office-cards outranks the general card rules further down */
  .office-live #office-cards article{padding:14px 16px 16px}
  .office-live #office-cards .o-stack,.office-live #office-cards .o-langs,.office-live #office-cards .o-local,.office-live #office-cards .o-hint{display:none}
  .office-live #office-cards .o-num{font-size:11px}
  .office-live #office-cards .o-name{font-size:clamp(28px,8vw,38px);margin:4px 0 8px}
  .office-live #office-cards .o-title{font-size:clamp(24px,6.6vw,32px);margin-bottom:8px}
  .office-live #office-cards .o-desc{font-size:14px;line-height:1.45;margin-bottom:6px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;line-clamp:4;overflow:hidden}
  .office-live #office-cards article > .o-demo,.office-live #office-cards .o-acts .o-demo{display:none}   /* the room's demo button and CTA are enough here */
  .office-live #office-cards .o-note{font-size:12.5px;margin:6px 0 0}
  .office-live #office-cards .o-try{margin-top:10px;padding:8px 12px;font-size:11px}
  .office-live #office-cards .o-acts{gap:0 12px}
  .office-live #office-cards .o-ask{margin-top:12px;font-size:10.5px}
  .office-live #office-cards .o-btn{padding:12px 16px;font-size:11.5px}
  #office-spots em{display:none}
}
@media (prefers-reduced-motion:reduce){#office-spots.on span::after{animation:none}}

/* live demos, opened inside the room (office.js) */
.o-try,.o-lang{display:none}
.office-live .o-try{display:inline-block;margin-top:16px;font-family:'JetBrains Mono';font-size:12px;letter-spacing:0.12em;color:#141210;background:#C6A05A;border:0;padding:9px 14px;border-radius:2px;cursor:pointer}
.office-live .o-try:hover{background:#F2EEE6}
.o-acts{display:flex;flex-wrap:wrap;gap:0 14px;align-items:center}
.o-langs{display:none;font-size:14px;color:rgba(242,238,230,0.6);margin:4px 0 0}
.office-live .o-langs{display:block}
.office-live .o-lang{display:inline-block;font:500 13px Manrope,sans-serif;color:#F2EEE6;background:none;border:1px solid rgba(198,160,90,0.45);border-radius:999px;padding:3px 10px;margin:4px 2px 0;cursor:pointer}
.office-live .o-lang:hover{border-color:#C6A05A;color:#C6A05A}
#office-scrim{position:absolute;inset:0;background:rgba(20,18,16,0.72);opacity:0;pointer-events:none;transition:opacity .35s;z-index:2}
#office-demo{position:absolute;left:35%;right:4%;top:6%;bottom:13%;z-index:3;display:flex;flex-direction:column;background:#141210;border:1px solid rgba(198,160,90,0.45);border-radius:6px;overflow:hidden;opacity:0;transform:scale(.96);pointer-events:none;transition:opacity .35s,transform .45s cubic-bezier(.2,.7,.2,1)}
#office-demo.phone{left:calc(35% + (61% - min(400px,61%)) / 2);right:auto;width:min(400px,61%);border-radius:26px;border-width:6px;border-color:#2a2622}
.demo-open #office-scrim{opacity:1;pointer-events:auto}
.demo-open #office-demo{opacity:1;transform:none;pointer-events:auto}
.od-bar{display:flex;align-items:center;gap:12px;padding:8px 10px 8px 14px;border-bottom:1px solid rgba(198,160,90,0.25);font-family:'JetBrains Mono';font-size:11px;letter-spacing:0.12em;color:#C6A05A;flex-shrink:0}
.od-bar span{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.od-bar a{color:rgba(242,238,230,0.75);white-space:nowrap}
.od-bar a:hover{color:#C6A05A}
.od-bar button{background:none;border:1px solid rgba(242,238,230,0.25);color:#F2EEE6;width:30px;height:30px;border-radius:50%;font-size:16px;line-height:1;cursor:pointer;flex-shrink:0}
.od-bar button:hover{border-color:#C6A05A;color:#C6A05A}
#office-demo iframe{flex:1;width:100%;border:0;background:#141210}
.od-wait{position:absolute;inset:44px 0 0;display:grid;place-items:center;font-family:'JetBrains Mono';font-size:11px;letter-spacing:0.2em;color:rgba(242,238,230,0.45);pointer-events:none;transition:opacity .3s}
#office-demo.loaded .od-wait{opacity:0}
@media (max-width:820px),(max-aspect-ratio:1/1){
  #office-demo,#office-demo.phone{left:8px;right:8px;top:8px;bottom:max(84px,11svh);width:auto;border-radius:8px;border-width:1px;border-color:rgba(198,160,90,0.45)}
  .demo-open #office-cards,.demo-open #office-rail{visibility:hidden}
}
.office-live .o-dup{display:none}
.o-ask{display:none}
.office-live .o-ask{display:block;margin-top:14px;padding:0;background:none;border:0;border-bottom:1px solid rgba(198,160,90,0.6);color:#C6A05A;font-family:'JetBrains Mono';font-size:11.5px;letter-spacing:0.12em;cursor:pointer}
.office-live .o-ask:hover{color:#F2EEE6;border-color:#F2EEE6}
