/* 01 / Showcase — full-bleed project picker with Work / Wireframe / Design System views */
.ws-stack{position:relative}
.ws{position:sticky;top:72px;z-index:1;height:calc(100svh - 72px);min-height:560px;max-height:1080px;padding:0;box-sizing:border-box}
.ws-frame{position:relative;height:100%;display:grid;grid-template-columns:minmax(260px,21%) minmax(360px,30%) minmax(0,1fr);overflow:hidden;background:#101010;border-top:1px solid #262626;transform:scale(calc(1 - var(--ws-cover,0) * .05));transform-origin:50% 0}
.ws-frame:after{content:'';position:absolute;inset:0;z-index:6;background:#000;opacity:calc(var(--ws-cover,0) * .65);pointer-events:none}
.ws-stack>.ws+section{position:relative;z-index:2;border-radius:22px 22px 0 0;transition:box-shadow .3s ease}
.ws-stack.is-covering>.ws+section{box-shadow:0 -30px 80px #000a}

/* left — project list */
.ws-side{display:flex;flex-direction:column;min-height:0;padding:32px clamp(24px,2.2vw,40px) 26px;background:var(--ivory);color:#111}
.ws .ws-eyebrow{margin:0;font-size:12px;letter-spacing:.12em;color:#5b5953}
.ws .ws-side-title{margin:12px 0 26px;font-family:Inter,'IBM Plex Sans Thai',sans-serif;font-size:clamp(40px,3.6vw,64px);font-weight:500;line-height:1;letter-spacing:-.055em;color:#111}
.ws-list{flex:1;min-height:0;margin:0;padding:0;list-style:none;overflow-y:auto;border-top:1px solid #d6d1c4;scrollbar-width:thin}
.ws-item{display:flex;align-items:baseline;gap:14px;width:100%;padding:15px 6px;border:0;border-bottom:1px solid #d6d1c4;background:none;color:#7a766d;font:inherit;text-align:left;cursor:pointer;transition:color .2s ease,padding .25s ease}
.ws-num{flex:none;width:22px;font-size:12px;letter-spacing:.04em;color:#a19c91}
.ws-iname{font-size:18px;font-weight:500;letter-spacing:-.02em;line-height:1.3}
.ws-item:hover{color:#111}
.ws-item[aria-current]{padding-left:18px;color:#111;background:linear-gradient(var(--yellow),var(--yellow)) 0 50%/5px 58% no-repeat}
.ws-item[aria-current] .ws-num{color:#111}
.ws-side-foot{padding-top:18px}
.ws-all{padding:0 0 4px;border:0;border-bottom:1px solid #111;background:none;color:#111;font:inherit;font-size:14px;cursor:pointer}
.ws-all:hover{border-color:transparent}

/* middle — project info */
.ws-info{display:flex;flex-direction:column;min-height:0;padding:32px clamp(26px,2.8vw,48px) 34px;color:var(--ivory)}
.ws-top{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.ws-count{margin:0;font-size:clamp(44px,4vw,64px);font-weight:500;letter-spacing:-.05em;line-height:1}
.ws-count span{color:#575757}
.ws-arrows{display:flex;gap:8px}
.ws-arrows button{width:42px;height:42px;border:1px solid #555;border-radius:50%;background:none;color:var(--ivory);font-size:20px;line-height:1;cursor:pointer;transition:background-color .2s,color .2s,border-color .2s}
.ws-arrows button:hover{background:var(--ivory);color:#111;border-color:var(--ivory)}
.ws-body{margin-top:auto;padding-top:24px;transition:opacity .22s ease,transform .3s ease}
.ws-body.is-out{opacity:0;transform:translateY(calc(var(--ws-dir,1) * 14px))}
.ws-cat{margin:0 0 14px;font-size:11px;letter-spacing:.14em;color:var(--yellow)}
.ws .ws-name{margin:0 0 18px;font-size:clamp(38px,3.6vw,60px);font-weight:500;letter-spacing:-.05em;line-height:1.02;color:var(--ivory)}
.ws-desc{display:-webkit-box;margin:0 0 12px;overflow:hidden;font-size:16px;line-height:1.75;color:#cfccc5;-webkit-line-clamp:4;-webkit-box-orient:vertical}
.ws-note{margin:0;font-size:12px;letter-spacing:.02em;color:#8d8d8d}
.ws-tabs{display:flex;flex-wrap:wrap;gap:8px;width:fit-content;max-width:100%;margin:26px 0 18px;padding:0;border:0;border-radius:0}
.ws-tabs button{display:flex;align-items:center;gap:8px;padding:9px 16px;border:1px solid #3a3a3a;border-radius:100px;background:none;color:#bdbdbd;font:inherit;font-size:14px;cursor:pointer;transition:background-color .2s,border-color .2s,color .2s}
.ws-tabs button span{font-size:11px;color:#7a7a7a}
.ws-tabs button:hover{color:var(--ivory);border-color:#6a6a6a}
.ws-tabs button[aria-selected="true"]{background:var(--yellow);border-color:var(--yellow);color:#111}
.ws-tabs button[aria-selected="true"] span{color:#5a5200}
.ws-tabs.is-single button{cursor:default}
.ws-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.ws-actions.is-single{grid-template-columns:1fr}
.ws-btn{display:flex;align-items:center;justify-content:center;gap:8px;height:54px;padding:0 16px;border-radius:6px;font:inherit;font-size:15px;text-decoration:none;cursor:pointer;transition:background-color .2s,border-color .2s,color .2s}
.ws-solid{border:1px solid var(--ivory);background:var(--ivory);color:#111}
.ws-solid:hover{border-color:var(--yellow);background:var(--yellow)}
.ws-ghost{border:1px solid #666;background:none;color:var(--ivory)}
.ws-ghost:hover{border-color:var(--ivory)}

/* right — picture fills the whole frame */
.ws-stage{position:relative;min-height:0;overflow:hidden;background:#1a1a19}
.ws-stage:before,.ws-stage:after{content:'';position:absolute;left:0;right:0;z-index:2;pointer-events:none}
.ws-stage:before{top:0;height:110px;background:linear-gradient(#000000a6,transparent)}
.ws-stage:after{bottom:0;height:140px;background:linear-gradient(transparent,#000000bf)}
.ws-corner{position:absolute;top:22px;z-index:3;font:500 11px/1 Inter,'IBM Plex Sans Thai',sans-serif;letter-spacing:.14em;color:#f6f4edd9}
.ws-tl{left:26px}
.ws-tr{right:26px}
.ws-shot{position:absolute;inset:0;z-index:1;display:block;padding:0;border:0;background:none;cursor:zoom-in}
.ws-shot img,.ws-shot video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transform:scale(1);transition:opacity .6s ease,transform 1.2s cubic-bezier(.2,.7,.2,1)}
.ws-shot img.is-entering,.ws-shot video.is-entering{opacity:0;transform:scale(1.04)}
.ws-shot img.is-leaving,.ws-shot video.is-leaving{opacity:0}
.ws-shot:focus-visible{outline:3px solid var(--blue);outline-offset:-3px}
.ws-shot-bar{position:absolute;left:26px;right:26px;bottom:22px;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:14px;font-size:14px;color:#f6f4ede6;pointer-events:none}
.ws-cap{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.ws-shot-ctl{display:flex;flex:none;align-items:center;gap:12px;pointer-events:auto}
.ws-vbtn{display:flex;align-items:center;gap:7px;height:36px;padding:0 14px;border:1px solid #f6f4ed80;border-radius:100px;background:#0006;backdrop-filter:blur(6px);color:var(--ivory);font:500 12px/1 'IBM Plex Sans Thai',Inter,'IBM Plex Sans Thai',sans-serif;white-space:nowrap;cursor:pointer}
.ws-vbtn[hidden]{display:none}
.ws-vbtn span{font-size:9px}
.ws-vbtn:hover{border-color:var(--yellow);color:var(--yellow)}
.ws-shot-nav{display:flex;flex:none;align-items:center;gap:12px;font:500 12px/1 Inter,'IBM Plex Sans Thai',sans-serif;letter-spacing:.08em;pointer-events:auto}
.ws-shot-nav[hidden]{display:none}
.ws-shot-nav button{width:36px;height:36px;border:1px solid #f6f4ed80;border-radius:50%;background:#0006;backdrop-filter:blur(6px);color:var(--ivory);font-size:17px;line-height:1;cursor:pointer}
.ws-shot-nav button:hover{border-color:var(--yellow);color:var(--yellow)}

/* live components (Luxury Lite orbit, Stable site) fill the frame */
.ws-live{position:absolute;inset:0;z-index:1;display:none}
.ws-stage.is-live .ws-live{display:block}
.ws-stage.is-live .ws-shot,.ws-stage.is-live .ws-shot-bar,.ws-stage.is-live .ws-tl,.ws-stage.is-live:before,.ws-stage.is-live:after{display:none}
.ws-stage.is-live .ws-tr{top:18px;right:18px;display:flex;align-items:center;gap:8px;padding:8px 13px;border-radius:100px;background:#000000a6;backdrop-filter:blur(8px);color:var(--ivory)}
.ws-stage.is-live .ws-tr:before{content:'';width:7px;height:7px;border-radius:50%;background:var(--yellow);box-shadow:0 0 10px var(--yellow)}
.ws-live .orb{position:absolute;inset:0;width:100%;height:100%!important;aspect-ratio:auto;min-height:0;max-height:none}
.ws-live .ss-stage{position:absolute;inset:0;height:auto}
.ws-live .ss-play{display:none}

/* auto-slide progress */
.ws-progress{position:absolute;left:0;right:0;bottom:0;z-index:4;height:3px;background:#ffffff1f;opacity:0;transition:opacity .3s;pointer-events:none}
.ws-stage.has-auto .ws-progress{opacity:1}
.ws-progress i{display:block;width:0;height:100%;background:var(--yellow)}
.ws-stage.is-timing .ws-progress i{animation:ws-prog var(--ws-auto,4.5s) linear forwards}
@keyframes ws-prog{to{width:100%}}

/* enlarged picture */
.ws-zoom{width:min(1500px,calc(100vw - 40px));max-width:none;max-height:calc(100dvh - 40px);margin:auto;padding:0;border:0;background:transparent;color:var(--ivory);overflow:visible}
.ws-zoom::backdrop{background:#000d;backdrop-filter:blur(10px)}
.ws-zoom img,.ws-zoom video{display:block;max-width:100%;max-height:calc(100dvh - 120px);margin:0 auto;border-radius:10px;object-fit:contain}
.ws-zoom p{margin:14px 0 0;text-align:center;font-size:13px;color:#cfcfcf}
.ws-zoom-close{position:fixed;top:18px;right:22px;display:flex;align-items:center;gap:10px;border:0;background:none;color:var(--ivory);font:inherit;font-size:13px;cursor:pointer}
.ws-zoom-close span{font-size:26px;line-height:1}

/* compact desktops */
@media(min-width:761px) and (max-height:800px){
  .ws-item{padding:10px 6px}
  .ws-iname{font-size:16px}
  .ws .ws-side-title{margin:8px 0 16px;font-size:clamp(36px,3vw,48px)}
  .ws-count{font-size:44px}
  .ws .ws-name{font-size:clamp(32px,3vw,46px);margin-bottom:12px}
  .ws-desc{-webkit-line-clamp:3;font-size:15px}
  .ws-tabs{margin:18px 0 14px}
  .ws-btn{height:46px}
}
@media(min-width:761px) and (max-height:619px){.ws{position:relative;top:auto;height:auto}.ws-frame{height:640px;transform:none}.ws-frame:after{display:none}}

/* tablet: project chips on top */
@media(max-width:1100px){
  .ws-frame{grid-template-columns:minmax(320px,44%) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}
  .ws-side{grid-column:1/-1;flex-direction:row;align-items:center;gap:18px;padding:14px 20px}
  .ws .ws-side-title{flex:none;margin:0;font-size:30px}
  .ws .ws-eyebrow,.ws-side-foot{display:none}
  .ws-list{display:flex;gap:6px;overflow-x:auto;overflow-y:hidden;border:0;scrollbar-width:none}
  .ws-list::-webkit-scrollbar{display:none}
  .ws-list li{flex:none}
  .ws-item,.ws-item[aria-current]{gap:7px;padding:9px 15px;border:1px solid #d6d1c4;border-radius:100px;white-space:nowrap;background:none}
  .ws-item[aria-current]{border-color:#111;background:#111;color:var(--ivory)}
  .ws-item[aria-current] .ws-num{color:var(--yellow)}
  .ws-num{width:auto}
  .ws-iname{font-size:15px}
}

/* phone and portrait tablet: normal flow, picture above the details */
@media(max-width:760px),(max-width:1100px) and (orientation:portrait){
  .ws{position:relative;top:auto;height:auto;min-height:0;max-height:none}
  .ws-frame{display:flex;flex-direction:column;height:auto;transform:none}
  .ws-frame:after{display:none}
  .ws-side{flex-direction:column;align-items:stretch;gap:14px;padding:24px 18px 16px}
  .ws .ws-eyebrow{display:block;font-size:11px}
  .ws .ws-side-title{font-size:44px}
  .ws-list{margin:0 -18px;padding:0 18px}
  .ws-stage{order:2;height:min(115vw,480px)}
  .ws-corner{top:16px;font-size:10px}
  .ws-tl{left:18px}.ws-tr{right:18px}
  .ws-shot-bar{left:18px;right:18px;bottom:16px;font-size:12px}
  .ws-info{order:3;padding:24px 18px 28px}
  .ws-top{align-items:center}
  .ws-count{font-size:42px}
  .ws-body{margin-top:0;padding-top:18px}
  .ws .ws-name{font-size:38px}
  .ws-desc{-webkit-line-clamp:5;font-size:15px}
  .ws-actions{grid-template-columns:1fr}
  .ws-stack>.ws+section{border-radius:0;box-shadow:none}
}
@media(prefers-reduced-motion:reduce){.ws-frame{transform:none}.ws-body,.ws-shot img,.ws-item{transition:none}}

.ws-zoom [hidden]{display:none}
.ws-zoom video{width:100%;background:#000}
@media(max-width:650px){.ws-vbtn{height:32px;padding:0 11px;font-size:11px}.ws-shot-ctl{gap:8px}}
@media(prefers-reduced-motion:reduce){.ws-shot video{transition:none}}
/* demo video: no top shade or case label over the light UI; a small DEMO pill instead */
.ws-stage.is-vid:before,.ws-stage.is-vid .ws-tl{display:none}
.ws-stage.is-vid .ws-tr{top:18px;right:18px;display:flex;align-items:center;gap:8px;padding:8px 13px;border-radius:100px;background:#000000a6;backdrop-filter:blur(8px);color:var(--ivory)}
.ws-stage.is-vid .ws-tr:before{content:'';width:7px;height:7px;border-radius:50%;background:var(--yellow);box-shadow:0 0 10px var(--yellow)}
.ws-stage.is-vid:after{height:120px;background:linear-gradient(transparent,#000000b3)}

/* scroll room where the pinned showcase fades away piece by piece before the next section slides up */
@media(min-width:761px) and (min-height:620px) and (orientation:landscape),(min-width:1101px) and (min-height:620px){.ws-stack>.ws+section{margin-top:85vh}}
.ws-shot video[data-fit=contain]{object-fit:contain;background:#0d0d0c}
/* sections after the pinned Showcase slide over it */
.ws-stack>.ws~section{position:relative;z-index:2}
.ws-shot img[data-fit=contain]{object-fit:contain;background:#f5f5f5}

/* portrait tablet: roomier than the phone version */
@media(min-width:761px) and (max-width:1100px) and (orientation:portrait){
  .ws-side{padding:30px 32px 18px}
  .ws-list{margin:0 -32px;padding:0 32px}
  .ws .ws-side-title{font-size:56px}
  .ws-stage{height:62vw}
  .ws-tl{left:32px}.ws-tr{right:32px}
  .ws-shot-bar{left:32px;right:32px;bottom:22px}
  .ws-info{padding:30px 32px 40px}
  .ws .ws-name{font-size:48px}
  .ws-desc{-webkit-line-clamp:4;font-size:16px;max-width:60ch}
  .ws-actions{grid-template-columns:1fr 1fr}
}

/* project dots: how many projects there are and which one is on show (phone / portrait tablet) */
.ws-side-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px}
.ws-dots{display:none;align-items:center;gap:8px;flex:none;padding-bottom:4px}
.ws-dots-i{display:flex;align-items:center;gap:5px}
.ws-dots-i i{width:6px;height:6px;border-radius:6px;background:#c9c3b6;transition:width .3s ease,background-color .3s ease}
.ws-dots-i i.is-on{width:20px;background:#111}
.ws-dots-n{min-width:38px;font:500 12px/1 Inter,sans-serif;letter-spacing:.04em;color:#8a8579}
.ws-dots-n b{color:#111;font-weight:600}
.ws-dots button{display:grid;place-items:center;width:30px;height:30px;padding:0;border:1px solid #d6d1c4;border-radius:50%;background:none;color:#111;font:400 18px/1 Inter,sans-serif;cursor:pointer}
.ws-dots button:active{background:#111;color:var(--ivory)}
@media(max-width:760px),(max-width:1100px) and (orientation:portrait){
  .ws-frame{overflow:visible}
  .ws-side{position:sticky;z-index:6;transition:box-shadow .25s ease}
  .ws-side.is-stuck{box-shadow:0 10px 24px -14px #0006}
  .ws-side .ws-side-title,.ws-side .ws-eyebrow{transition:opacity .25s ease}
  .ws-side.is-stuck .ws-side-title,.ws-side.is-stuck .ws-eyebrow{opacity:0}
  .ws-dots{display:flex}
  .ws .ws-side-head .ws-side-title{margin:0}
}
@media(max-width:400px){.ws-dots{gap:6px}.ws-dots-i{gap:4px}.ws-dots-i i{width:5px;height:5px}.ws-dots-i i.is-on{width:16px}.ws-dots button{width:28px;height:28px}}
@media(max-width:480px){.ws-dots button{display:none}}
