/* ScienceHub Labs UI Refresh v1 — presentation layer only.
   Deliberately does not alter canvas, GPS, data, routes, or application state. */
:root {
  --sh-bg: #07111f;
  --sh-panel: rgba(18, 35, 58, .84);
  --sh-panel-soft: rgba(23, 46, 72, .66);
  --sh-line: rgba(157, 210, 232, .18);
  --sh-text: #f5fbff;
  --sh-muted: #b2c6d3;
  --sh-cyan: #62def4;
  --sh-yellow: #ffd166;
  --sh-violet: #c6b2ff;
  --sh-radius: 20px;
  --sh-ease: cubic-bezier(.23, 1, .32, 1);
}

html { background: var(--sh-bg); }
body {
  background:
    radial-gradient(circle at 12% 8%, rgba(98, 222, 244, .09), transparent 28rem),
    radial-gradient(circle at 88% 28%, rgba(198, 178, 255, .08), transparent 30rem),
    var(--sh-bg);
  color: var(--sh-text);
}

.site-shell {
  background: transparent;
}
.site-shell header {
  background: rgba(7, 17, 31, .76);
  border-color: var(--sh-line) !important;
  backdrop-filter: blur(18px);
}
.site-shell header a,
.site-shell header button {
  transition: color .18s var(--sh-ease), background-color .18s var(--sh-ease), border-color .18s var(--sh-ease), transform .18s var(--sh-ease);
}
.site-shell header button:hover { transform: translateY(-1px); }

.hero-section {
  background:
    radial-gradient(circle at 78% 26%, rgba(255, 209, 102, .12), transparent 18rem),
    radial-gradient(circle at 72% 54%, rgba(98, 222, 244, .15), transparent 28rem),
    linear-gradient(135deg, #081526 0%, #0b1c30 55%, #10152c 100%);
}
.hero-section h1,
.hero-section h2 {
  text-wrap: balance;
}
.hero-section p {
  color: var(--sh-muted);
  max-width: 42rem;
}

/* Featured labs and Showcase cards: softer corners, clearer hierarchy. */
.lab-card,
.showcase-card,
.instrument-card,
.app-library-card,
.live-instrument-card {
  border-color: var(--sh-line) !important;
  border-radius: var(--sh-radius) !important;
  background: linear-gradient(145deg, var(--sh-panel), var(--sh-panel-soft)) !important;
  box-shadow: 0 16px 44px rgba(0, 0, 0, .16);
  transition: transform .2s var(--sh-ease), border-color .2s var(--sh-ease), box-shadow .2s var(--sh-ease);
}
.lab-card:hover,
.showcase-card:hover,
.instrument-card:hover,
.app-library-card:hover,
.live-instrument-card:hover {
  border-color: rgba(98, 222, 244, .55) !important;
  box-shadow: 0 20px 55px rgba(0, 0, 0, .24), 0 0 0 1px rgba(98, 222, 244, .08);
  transform: translateY(-3px);
}
.app-card-icon {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(98, 222, 244, .2), rgba(98, 222, 244, .06));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.app-card-body h4 { font-size: 20px; }
.app-card-body p,
.app-card-features { color: var(--sh-muted); font-size: 12px; line-height: 1.65; }
.app-card-tags { gap: 7px; }
.app-card-tags span {
  border: 1px solid rgba(157, 210, 232, .18);
  border-radius: 999px;
  padding: 5px 8px;
  color: #a9c7d4;
  background: rgba(255,255,255,.035);
}
.app-download-btn {
  min-height: 42px;
  padding: 11px 16px;
  box-shadow: 0 8px 20px rgba(98, 222, 244, .14);
  transition: transform .16s var(--sh-ease), box-shadow .16s var(--sh-ease), filter .16s var(--sh-ease);
}
.app-download-btn:hover { filter: brightness(1.08); box-shadow: 0 10px 25px rgba(98, 222, 244, .24); }
.app-download-btn:active { transform: scale(.97); }

/* Navigation menu becomes easier to scan on touch screens. */
.site-shell header + div,
.site-shell .mobile-menu {
  border-color: var(--sh-line) !important;
  background: rgba(7, 17, 31, .94) !important;
  backdrop-filter: blur(18px);
}

/* Clear keyboard focus without adding any runtime behavior. */
:where(a, button, input, textarea, select):focus-visible {
  outline: 3px solid rgba(255, 209, 102, .78);
  outline-offset: 3px;
}

.download-modal,
.instrument-modal {
  border-color: rgba(98, 222, 244, .4) !important;
  border-radius: 24px !important;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .52), 0 0 0 1px rgba(255,255,255,.04);
}
.modal-input { min-height: 46px; }

@media (max-width: 720px) {
  .hero-section { min-height: 650px; }
  .hero-section h1 { font-size: clamp(2.7rem, 14vw, 4.5rem); line-height: .96; }
  .app-library-card,
  .lab-card,
  .showcase-card,
  .instrument-card,
  .live-instrument-card {
    border-radius: 17px !important;
  }
  .app-library-card { align-items: flex-start; gap: 12px; padding: 14px; }
  .app-card-icon { width: 44px; height: 44px; border-radius: 13px; }
  .app-card-body h4 { font-size: 18px; }
  .app-download-btn { width: 100%; justify-content: center; margin-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .lab-card:hover,
  .showcase-card:hover,
  .instrument-card:hover,
  .app-library-card:hover,
  .live-instrument-card:hover { transform: none; }
}
