/* ReparoHub — Showcase 3D Window (Class prefix sc-)
   Perspectiva 3D, tilt reativo ao cursor e abas com hairlines de progresso. */

@property --sc-c1 { syntax: "<color>"; inherits: true; initial-value: rgba(37, 99, 235, 0.55); }
@property --sc-c2 { syntax: "<color>"; inherits: true; initial-value: rgba(20, 184, 166, 0.40); }

.sc-shot {
  --sc-c1: rgba(37, 99, 235, 0.55);
  --sc-c2: rgba(20, 184, 166, 0.40);
  --sc-accent: #3b82f6;
  position: relative; padding: 40px var(--gutter, 24px) 30px;
  transition: --sc-c1 1.6s ease, --sc-c2 1.6s ease;
  overflow-x: clip;
}
.sc-shot[data-view="scheduling"] {
  --sc-c1: rgba(6, 182, 212, 0.50);
  --sc-c2: rgba(16, 185, 129, 0.35);
  --sc-accent: #14b8a6;
}
.sc-shot[data-view="customer"] {
  --sc-c1: rgba(37, 99, 235, 0.45);
  --sc-c2: rgba(6, 182, 212, 0.45);
  --sc-accent: #06b6d4;
}

.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;
}

/* Aura viva sob a janela */
.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: 20%; 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: 32%; 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);
}

/* Janela */
.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: 18px; overflow: hidden; background: #080b11;
  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);
}
.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, .18);
}
.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;
}

/* Barra superior macOS */
.sc-bar {
  position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 40px; padding: 0 16px; background: linear-gradient(#151d2a, #0d131c);
  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: #263345;
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .45); transition: background-color .6s ease;
}
.sc-act .sc-l1 { background: #ff5f57; }
.sc-act .sc-l2 { background: #febc2e; transition-delay: .06s; }
.sc-act .sc-l3 { background: #28c840; transition-delay: .12s; }

.sc-title {
  display: inline-flex; align-items: center; gap: 8px; font: 500 13px/1 var(--ui, system-ui);
  letter-spacing: -.01em; color: rgba(255, 255, 255, .68);
}
.sc-title img { width: 16px; height: 16px; object-fit: contain; }

/* Telas com crossfade */
.sc-screen { position: relative; aspect-ratio: 16 / 9.8; background: #07090e; 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); }

/* Reflexo sutil de vidro sob o mouse */
.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; }

/* Trilho de abas inferior */
.sc-tabs {
  display: flex; justify-content: center; gap: 4px; width: fit-content; max-width: 100%;
  margin: 36px auto 0; padding: 5px; border-radius: 20px;
  background: rgba(14, 20, 30, 0.65); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.sc-tab {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  min-width: 0; padding: 11px 20px 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, .1), 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, .35); 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, .6); }

.sc-tab::after {
  content: ""; position: absolute; left: 20px; right: 20px; 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: 20px; right: 20px; bottom: 7px; height: 1.5px; border-radius: 1px;
  background: var(--sc-accent, #2563eb); box-shadow: 0 0 8px var(--sc-accent, #2563eb);
  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); } }

@media (min-width: 900px) {
  .sc-stage { max-width: max(760px, min(var(--max, 1180px), calc((100vh - 280px) * 1.6))); }
  @supports (height: 100svh) { .sc-stage { max-width: max(760px, min(var(--max, 1180px), calc((100svh - 280px) * 1.6))); } }
  .sc-tabs { margin-top: 28px; }
}
@media (max-width: 720px) {
  .sc-win { border-radius: 12px; }
  .sc-bar { height: 32px; padding: 0 12px; }
  .sc-lights { gap: 6px; }
  .sc-lights i { width: 9px; height: 9px; }
  .sc-title { font-size: 11.5px; }
  .sc-tab { padding: 9px 12px 13px; }
  .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: 8px 6px 12px; }
  .sc-tab-k { font-size: 12px; 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; }
}
