/* Portfolio showcase: a slider of project sheets with full-site scroll previews. Loaded only by /portfolio/.
   Follows the page theme: light drafting paper in day shift, dark in night shift. */

/* ---------- heading row and controls ---------- */
.show-head { position: relative; display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 30px; }
.show-ctrl { display: flex; align-items: center; gap: 14px; }
.show-count { font: 400 14px/1 var(--mono); letter-spacing: .08em; color: var(--ink-soft); min-width: 7ch; text-align: right; }
.show-count b { color: var(--ink); font-weight: 400; }
.show-btn { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--rule); background: var(--bg); color: var(--ink);
  font-size: 20px; line-height: 1; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.show-btn:hover:not(:disabled) { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.show-btn:disabled { opacity: .35; cursor: default; }
.show-btn:focus-visible, .show-track:focus-visible, .show-dots button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- slider ---------- */
.show-track { position: relative; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.show-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; }
.slide-inner { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.slide-num { display: inline-flex; align-items: center; gap: 10px; font: 400 13px/1 var(--mono); letter-spacing: .1em; color: var(--ink-soft); }
.slide-num::before { content: ""; width: 28px; height: 4px; background: var(--brand); }   /* client color as a plate, not as text */
.slide-info h2 { font-stretch: 75%; font-weight: 800; font-size: clamp(34px, 4vw, 52px); margin: 18px 0 10px; }
.slide-info p { color: var(--ink-soft); margin: 0 0 22px; }
.slide-link { display: inline-flex; gap: 8px; align-items: center; margin-top: 22px; color: var(--ink); text-decoration: none; font-weight: 600;
  padding: 11px 16px; border-radius: 2px; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--ink), inset 0 -4px 0 var(--brand); }
.slide-link:hover { background: var(--ink); color: var(--bg); }
.slide-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.slide-links .slide-link { margin-top: 0; }
.slide-link-ghost { box-shadow: inset 0 0 0 1.5px var(--rule); background: transparent; }
.slide-media { position: relative; padding: 0 9% 8% 0; }
.slide-media .phone-frame { position: absolute; right: 0; bottom: 0; width: 22%; }
.show-dots { position: relative; display: flex; justify-content: center; gap: 10px; margin-top: 34px; }
.show-dots button { width: 34px; height: 4px; padding: 10px 0; border: 0; background: var(--rule-soft); background-clip: content-box; cursor: pointer; }
.show-dots button[aria-current="true"] { background-color: var(--ink); }
.show-foot { position: relative; margin: 18px 0 0; text-align: center; font: 400 12px/1.5 var(--mono); color: var(--ink-soft); }

/* ---------- screens and the full-site scroll preview ---------- */
.bf { border-radius: 8px; overflow: hidden; background: #fff;
  box-shadow: 0 40px 80px -36px rgba(32, 40, 43, .45), 0 0 0 1px var(--rule-soft); }
.bf-top { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #E9E5DC; }
.bf-top i { width: 9px; height: 9px; border-radius: 50%; background: #C9C3B6; }
.bf-top span { margin: 0 auto; font: 400 11px/1 var(--mono); color: #4B5A60; background: #fff; padding: 5px 34px; border-radius: 4px; }
.scroll-view { position: relative; aspect-ratio: 16 / 10; overflow: hidden; cursor: ns-resize; outline-offset: -3px; }
.scroll-view img { display: block; width: 100%; height: auto; transform: translateY(0); transition: transform .9s var(--ease); will-change: transform; }
.scroll-view:hover img, .scroll-view:focus-visible img, .scroll-view.scrolling img {
  transform: translateY(var(--dist, 0px)); transition: transform var(--dur, 8s) linear;
}
.scroll-hint { position: absolute; left: 12px; bottom: 12px; font: 400 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em;
  color: var(--ivory); background: rgba(28, 36, 39, .82); padding: 7px 9px; border-radius: 3px; pointer-events: none; transition: opacity .3s; }
.scroll-view:hover .scroll-hint, .scroll-view.scrolling .scroll-hint, .scroll-view:focus-visible .scroll-hint { opacity: 0; }
.phone-frame { border-radius: 18px; border: 5px solid #11171A; overflow: hidden; background: #fff; box-shadow: 0 30px 60px -24px rgba(32, 40, 43, .55); }
.phone-frame img { display: block; width: 100%; height: auto; }

/* ---------- responsive / motion ---------- */
@media (max-width: 1000px) {
  .slide-inner { grid-template-columns: 1fr; }
  .slide-info { order: 2; }
}
@media (max-width: 640px) {
  .show-head { align-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  /* no auto-scroll: the preview becomes a normal scrollable box */
  .scroll-view { overflow-y: auto; cursor: auto; }
  .scroll-view img, .scroll-view:hover img, .scroll-view:focus-visible img, .scroll-view.scrolling img { transform: none; transition: none; }
  .scroll-hint { display: none; }
  .show-track { scroll-behavior: auto; }
}
