/* Featured projects: lime panel that grows out of the hero corner, then scrolls sideways. */

/* Fallback (no JS / reduced motion): panel sits in normal flow below the hero text. */
html:not(.has-motion) .hero{height:auto;min-height:0;overflow:visible}
html:not(.has-motion) .hero>.hero-reveal{position:relative;top:auto;right:auto;width:auto;height:auto;margin:56px calc(-1*var(--gutter)) 0;border-radius:0}
html:not(.has-motion) .hero>.hero-reveal-label{display:none}
html:not(.has-motion) .work-panel{position:relative}
html:not(.has-motion) .gallery{overflow-x:auto}
html:not(.has-motion) .gcard{height:auto}

.hero>.hero-reveal{background:var(--accent);color:#0F0F0F;overflow:hidden}
.work-panel{position:absolute;inset:0;display:flex;flex-direction:column;padding:clamp(26px,4.5vh,52px) var(--gutter) clamp(22px,4vh,44px)}
.panel-top{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;padding-bottom:clamp(14px,2.4vh,24px);border-bottom:1px solid #0F0F0F}
.panel-top h2{font-size:clamp(40px,min(5.6vw,8.6vh),104px);font-weight:400;letter-spacing:-.065em;line-height:1}
.panel-meta{display:flex;flex-direction:column;align-items:flex-end;gap:8px;font-size:12px;text-transform:uppercase;letter-spacing:.03em;text-align:right}
.panel-hint{display:inline-flex;gap:8px;padding:8px 14px;border:1px solid #0F0F0F;border-radius:999px;text-transform:none;font-size:13px;letter-spacing:0}

.gallery{flex:1;min-height:0;display:flex;align-items:center;margin:clamp(16px,3vh,34px) calc(-1*var(--gutter)) 0;padding:0 var(--gutter)}
.gallery-track{display:flex;gap:clamp(18px,2.4vw,40px);height:100%;will-change:transform}
.gcard{--h:calc(100% - 64px);flex:none;display:flex;flex-direction:column;height:100%}
.gcard .stage{--bg:#FFFFFF;--word:#F0F0EB;height:var(--h);aspect-ratio:1.55;padding:0;display:grid;place-items:center;border-radius:clamp(16px,1.8vw,28px)}
.gcard .stage:before{display:none}
.gcard .stage-word{font-size:clamp(90px,15vh,190px)}
.gcard .laptop{width:72%;margin-top:-4%}
.gcard .phone{width:19%;right:7%;bottom:9%;border-radius:clamp(16px,2.4vh,30px);padding:.55%}
.gcard-alt .phone{right:auto;left:7%}
.gcard .phone-screen{border-radius:clamp(12px,2vh,25px)}
.gcard .phone-screen img{height:100%;object-fit:cover;object-position:50% 0}
.gcard .laptop-screen{border-radius:clamp(7px,1.2vh,14px) clamp(7px,1.2vh,14px) 3px 3px}
.gcard-caption{display:flex;align-items:center;gap:16px;height:64px;padding-top:14px}
.gcard-caption .showcase-num{margin:0;border-color:#0F0F0F}
.gcard-title{flex:1;min-width:0}
.gcard-title h3{font-size:clamp(20px,1.7vw,28px);font-weight:500;letter-spacing:-.04em;line-height:1.05}
.gcard-title p{font-size:13px;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gcard .showcase-link{padding:10px 16px;font-size:13px;white-space:nowrap}
.gcard .showcase-link:hover{background:#fff;color:#0F0F0F}

/* Label next to the small corner card */
.hero>.hero-reveal-label span:last-child{white-space:nowrap}

/* Two-up row for the shops */
.showcase-row-2{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:56px}
.showcase-row-2 .showcase-compact:nth-child(2){margin-top:clamp(0px,7vw,120px)}

/* Cursor trail: tiny devices */
.trail-item{position:absolute;left:0;top:0;opacity:0;will-change:transform,opacity;filter:drop-shadow(0 22px 26px #0f0f0f30)}
.t-laptop{width:clamp(190px,16vw,270px)}
.t-laptop .t-screen{aspect-ratio:16/10;background:#0c0c0d;border-radius:9px 9px 3px 3px;padding:2.2% 2.2% 3.2%;box-shadow:0 0 0 1px #b9b9bf}
.t-screen img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 0;border-radius:2px;background:#fff}
.t-base{height:9px;width:114%;margin-left:-7%;border-radius:1px 1px 50% 50%/1px 1px 100% 100%;background:linear-gradient(#f2f2f4,#c9c9ce 45%,#8d8d92)}
.t-phone{width:clamp(76px,6.2vw,104px)}
.t-phone .t-screen{aspect-ratio:9/19.3;background:#0c0c0d;border-radius:16px;padding:4.5%;box-shadow:0 0 0 1px #3a3a3e,0 0 0 2.5px #b9b9bf}
.t-phone .t-screen img{border-radius:12px}

@media(max-width:1000px){
  .panel-meta span:nth-child(2){display:none}
}
@media(max-width:640px){
  .work-panel{padding-top:28px}
  .panel-top{flex-direction:column;align-items:flex-start;gap:14px}
  .panel-top h2{font-size:clamp(38px,11vw,52px)}
  .panel-meta{flex-direction:row;align-items:center;gap:12px}
  .panel-meta span:first-child{display:none}
  .gcard{--h:auto;width:84vw;height:auto;justify-content:center}
  .gcard .stage{width:100%;height:auto;aspect-ratio:1.05}
  .gcard .laptop{width:84%;margin-top:-12%}
  .gcard .phone{width:28%;bottom:7%}
  .gcard-caption{height:auto;flex-wrap:wrap;gap:10px 12px}
  .gcard-caption .showcase-num{display:none}
  .gcard-title p{white-space:normal}
  .showcase-row-2{grid-template-columns:1fr}
  .showcase-row-2 .showcase-compact:nth-child(2){margin-top:0}
}

/* Portrait tablets: one project fits the screen width. */
@media(min-width:641px) and (max-aspect-ratio:1/1){
  .gcard{--h:auto;width:min(80vw,760px);height:100%;justify-content:center}
  .gcard .stage{width:100%;height:auto;aspect-ratio:1.3}
}
/* No-motion fallback on wide screens: keep the laptop within one screen. */
@media(min-width:641px){
  html:not(.has-motion) .gcard{width:min(72vw,980px)}
  html:not(.has-motion) .gcard .stage{width:100%;height:auto}
}

/* Touch: smaller floating devices that drift in beside the card */
@media(max-width:640px){.t-laptop{width:118px}.t-phone{width:52px}.trail-item{filter:drop-shadow(0 14px 16px #0f0f0f2e)}}

/* Phones: equal caption height so every project card sits at the same level. */
@media(max-width:640px){.gcard-caption{min-height:96px;align-content:flex-start}}
