/* DuoDesk site: showcase pieces (class prefix sc-). Loaded after styles.css; uses its tokens (--max, --gutter,
   --ui, --mono, --ease, colours) with fallbacks. CSP-safe: no inline styles; JS only sets custom properties
   through CSSOM and toggles classes. */

/* ======================================================================
   App shot: the final app in a macOS-style window, a living glow behind it,
   a crossfade between three real screenshots (partials/app-shot.html, showcase.js)
   ====================================================================== */
@property --sc-c1 { syntax: "<color>"; inherits: true; initial-value: rgba(138, 92, 255, .55); }
@property --sc-c2 { syntax: "<color>"; inherits: true; initial-value: rgba(47, 214, 255, .4); }

.sc-shot { --sc-c1: rgba(138, 92, 255, .55); --sc-c2: rgba(47, 214, 255, .4); --sc-accent: #a98bff;
  position: relative; padding: 40px var(--gutter, 24px) 30px; transition: --sc-c1 1.6s ease, --sc-c2 1.6s ease;
  /* the drifting lights reach past the window; clip them sideways only (no page scroll on phones), let them bleed up/down */
  overflow-x: clip; }
/* one accent per view: it tints the glow behind the window and the tab's progress hairline */
.sc-shot[data-view="ask"] { --sc-c1: rgba(47, 214, 255, .5); --sc-c2: rgba(255, 61, 154, .32); --sc-accent: #6fe3ff; }
.sc-shot[data-view="mouse"] { --sc-c1: rgba(255, 179, 64, .42); --sc-c2: rgba(138, 92, 255, .4); --sc-accent: #ffc56e; }

.sc-stage {
  --sc-lift: 0deg; --sc-rx: 0deg; --sc-ry: 0deg; --sc-gx: 50%; --sc-gy: 0%;
  position: relative; isolation: isolate; max-width: var(--max, 1180px); margin: 0 auto; perspective: 2200px;
}

/* the living glow: two soft lights that drift slowly under the window */
.sc-aura { position: absolute; inset: 6% -2% -12%; z-index: -1; pointer-events: none; }
.sc-aura i { position: absolute; border-radius: 50%; will-change: transform; }
.sc-aura-a { left: 2%; top: 22%; width: 62%; height: 78%; background: radial-gradient(closest-side, var(--sc-c1), transparent); opacity: .75; animation: sc-drift-a 19s ease-in-out infinite alternate; }
.sc-aura-b { right: 0; top: 34%; width: 58%; height: 72%; background: radial-gradient(closest-side, var(--sc-c2), transparent); opacity: .65; animation: sc-drift-b 23s ease-in-out infinite alternate; }
.sc-off .sc-aura i { animation-play-state: paused; }
.sc-floor { position: absolute; left: 10%; right: 10%; bottom: -46px; height: 92px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .85), transparent); }

/* the window: lifts flat as it scrolls in, then follows the pointer by a degree or two */
.sc-tilt { transform-origin: 50% 0; transform: rotateX(calc(var(--sc-lift) + var(--sc-rx))) rotateY(var(--sc-ry)); will-change: transform; }
.sc-win { position: relative; margin: 0; border-radius: 16px; overflow: hidden; background: #0a0a0c;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .7), 0 2px 4px rgba(0, 0, 0, .3), 0 30px 60px -28px rgba(0, 0, 0, .75), 0 70px 140px -50px rgba(0, 0, 0, .95); }
/* hairline frame + a light catching the top edge */
.sc-win::after { content: ""; position: absolute; inset: 0; z-index: 4; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), inset 0 1px 0 rgba(255, 255, 255, .16); }
.sc-win::before { content: ""; position: absolute; z-index: 5; top: 0; left: 14%; right: 14%; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55) 50%, transparent); opacity: .7; }

.sc-bar { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 38px; padding: 0 14px;
  background: linear-gradient(#18181c, #121215); border-bottom: 1px solid rgba(0, 0, 0, .6); box-shadow: 0 1px 0 rgba(255, 255, 255, .04); }
.sc-lights { display: flex; gap: 8px; }
.sc-lights i { position: relative; width: 12px; height: 12px; border-radius: 50%; background: #3a3a3f;
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .45); transition: background-color .6s ease; }
/* the window turns "active" (coloured lights) once it is in view, like a focused Mac window */
.sc-act .sc-l1 { background: #ff5f57; }
.sc-act .sc-l2 { background: #febc2e; transition-delay: .06s; }
.sc-act .sc-l3 { background: #28c840; transition-delay: .12s; }
/* glyphs on hover, drawn with two hairlines each */
.sc-lights i::before, .sc-lights i::after { content: ""; position: absolute; left: 3px; right: 3px; top: 5.4px; height: 1.2px; border-radius: 1px;
  background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .15s; }
.sc-act .sc-lights:hover i::before, .sc-act .sc-lights:hover i::after { opacity: 1; }
.sc-l1::before { transform: rotate(45deg); }
.sc-l1::after { transform: rotate(-45deg); }
.sc-l2::after { display: none; }
.sc-l3::after { transform: rotate(90deg); }
.sc-title { display: inline-flex; align-items: center; gap: 7px; font: 500 13px/1 var(--ui, system-ui); letter-spacing: -.005em; color: rgba(255, 255, 255, .62); }
.sc-title img { width: 14px; height: 14px; border-radius: 3.5px; }

.sc-screen { position: relative; aspect-ratio: 16 / 10; background: #0a0a0c; overflow: hidden; }
.sc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.018); filter: blur(6px);
  transition: opacity .9s var(--ease, ease), transform 1.4s var(--ease, ease), filter .9s var(--ease, ease); }
.sc-img.on { opacity: 1; transform: none; filter: none; }
.sc-img.leave { opacity: 0; transform: scale(.992); filter: blur(4px); }
/* glass: a soft light that follows the pointer */
.sc-sheen { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .6s ease;
  background: radial-gradient(520px circle at var(--sc-gx) var(--sc-gy), rgba(255, 255, 255, .07), transparent 60%), linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 28%); }
.sc-hover .sc-sheen { opacity: 1; }

/* the views: a glass rail of three tabs, each with a hairline that fills while it is shown */
.sc-tabs { display: flex; justify-content: center; gap: 4px; width: fit-content; max-width: 100%; margin: 40px auto 0; padding: 5px; border-radius: 20px;
  background: rgba(14, 14, 17, .55); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
html:not(.js) .sc-tabs { display: none; }
.sc-tab { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; padding: 11px 18px 15px; border-radius: 15px; text-align: left;
  transition: background-color .35s ease, box-shadow .35s ease; }
.sc-tab:hover { background: rgba(255, 255, 255, .035); }
.sc-tab.on { background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09), 0 10px 30px -18px rgba(0, 0, 0, .9); }
.sc-tab-k { font: 500 14px/1.2 var(--ui, system-ui); letter-spacing: -.01em; color: rgba(255, 255, 255, .55); transition: color .35s; white-space: nowrap; }
.sc-tab-d { font: 12px/1.3 var(--mono, monospace); color: rgba(255, 255, 255, .32); transition: color .35s; white-space: nowrap; }
.sc-tab.on .sc-tab-k { color: #fff; }
.sc-tab.on .sc-tab-d { color: rgba(255, 255, 255, .5); }
.sc-tab::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 7px; height: 1px; border-radius: 1px; background: rgba(255, 255, 255, .08); opacity: 0; transition: opacity .35s; }
.sc-tab.on::after { opacity: 1; }
.sc-prog { position: absolute; z-index: 1; left: 18px; right: 18px; bottom: 7px; height: 1px; border-radius: 1px; background: var(--sc-accent, #fff);
  box-shadow: 0 0 8px var(--sc-accent, #fff); transform: scaleX(0); transform-origin: 0 50%; opacity: 0; }
.sc-tab.on .sc-prog { opacity: .85; animation: sc-fill var(--sc-dur, 7s) linear forwards; animation-play-state: paused; }
.sc-run .sc-tab.on .sc-prog { animation-play-state: running; }
.sc-manual .sc-tab.on .sc-prog { animation: none; transform: scaleX(1); opacity: .6; }

@keyframes sc-drift-a { from { transform: translate3d(-4%, 2%, 0) scale(1); } to { transform: translate3d(6%, -4%, 0) scale(1.08); } }
@keyframes sc-drift-b { from { transform: translate3d(5%, -2%, 0) scale(1.05); } to { transform: translate3d(-6%, 4%, 0) scale(.95); } }
@keyframes sc-fill { to { transform: scaleX(1); } }

/* desktop: size the window so it and its tabs fit one screen together (Apple-style: the product and its controls in one view) */
@media (min-width: 900px) {
  .sc-stage { max-width: max(760px, min(var(--max, 1180px), calc((100vh - 284px) * 1.6))); }
  @supports (height: 100svh) { .sc-stage { max-width: max(760px, min(var(--max, 1180px), calc((100svh - 284px) * 1.6))); } }
  .sc-tabs { margin-top: 28px; }
}
@media (max-width: 720px) {
  .sc-shot { padding-top: 28px; }
  .sc-win { border-radius: 11px; }
  .sc-bar { height: 28px; padding: 0 10px; }
  .sc-lights { gap: 6px; }
  .sc-lights i { width: 9px; height: 9px; }
  .sc-lights i::before, .sc-lights i::after { display: none; }
  .sc-title { font-size: 11.5px; gap: 5px; }
  .sc-title img { width: 12px; height: 12px; }
  .sc-tabs { margin-top: 26px; }
  .sc-tab { padding: 10px 12px 14px; }
  .sc-tab-d { display: none; }
  .sc-tab::after, .sc-prog { left: 12px; right: 12px; }
}
@media (max-width: 440px) {
  .sc-tabs { width: 100%; }
  .sc-tab { flex: 1 1 0; align-items: center; justify-content: center; text-align: center; padding: 9px 8px 14px; }
  .sc-tab-k { font-size: 13px; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .sc-aura i { animation: none; }
  .sc-tilt { transform: none; }
  .sc-img, .sc-img.leave { transform: none; filter: none; transition: opacity .25s linear; }
  .sc-tab.on .sc-prog { animation: none; transform: scaleX(1); opacity: .6; }
}
