/* Local technology motion layer. Decorative only; business controls stay untouched. */
:root {
  --tech-deep: #082b59;
  --tech-blue: #2d7ff0;
  --tech-cyan: #55c8ff;
  --tech-mint: #42d3bd;
  --tech-line: rgba(45, 127, 240, 0.16);
  --tech-soft-line: rgba(85, 200, 255, 0.11);
  --tech-glow: 0 18px 56px rgba(21, 91, 170, 0.14);
}

html {
  scroll-behavior: smooth;
}

body {
  isolation: isolate;
}

.tust-tech-motion {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
  opacity: 0.88;
}

.site-shell,
.login-shell,
.loading-screen,
.dashboard {
  position: relative;
  z-index: 1;
}

.tust-tech-grid {
  position: absolute;
  inset: 0;
  opacity: 0.34;
  background-image:
    linear-gradient(var(--tech-soft-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--tech-soft-line) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 0%, rgba(0, 0, 0, 0.74) 42%, transparent 82%);
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, rgba(0, 0, 0, 0.74) 42%, transparent 82%);
}

.tust-tech-grid::before,
.tust-tech-grid::after {
  content: "";
  position: absolute;
  inset: 0;
}

.tust-tech-grid::before {
  background:
    linear-gradient(90deg, transparent 0 49.85%, rgba(78, 178, 255, 0.18) 50%, transparent 50.15%),
    linear-gradient(transparent 0 49.85%, rgba(78, 178, 255, 0.12) 50%, transparent 50.15%);
}

.tust-tech-grid::after {
  opacity: 0.42;
  background-image: radial-gradient(circle, rgba(61, 157, 241, 0.35) 1px, transparent 1.5px);
  background-size: 104px 104px;
}

.tust-tech-orb,
.tust-tech-pointer-glow {
  position: absolute;
  border-radius: 50%;
}

.tust-tech-orb-a {
  top: -18vw;
  left: -13vw;
  width: min(52vw, 760px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(68, 145, 247, 0.19), rgba(78, 181, 255, 0.07) 42%, transparent 70%);
}

.tust-tech-orb-b {
  right: -18vw;
  bottom: -24vw;
  width: min(58vw, 860px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(55, 211, 190, 0.15), rgba(69, 165, 241, 0.06) 48%, transparent 72%);
}

.tust-tech-pointer-glow {
  top: -220px;
  left: -220px;
  width: 440px;
  height: 440px;
  opacity: 0.42;
  background: radial-gradient(circle, rgba(72, 170, 255, 0.13), transparent 66%);
}

.tust-tech-beam {
  position: absolute;
  top: -30vh;
  left: 14%;
  width: 1px;
  height: 160vh;
  opacity: 0.35;
  transform: rotate(24deg);
  transform-origin: 50% 50%;
  background: linear-gradient(transparent, rgba(83, 199, 255, 0.58) 42%, rgba(71, 132, 240, 0.18) 60%, transparent);
  box-shadow: 0 0 28px rgba(74, 176, 255, 0.34);
}

.tust-tech-circuit {
  position: absolute;
  width: 210px;
  height: 108px;
  opacity: 0.38;
  border-top: 1px solid rgba(50, 141, 234, 0.34);
  border-right: 1px solid rgba(50, 141, 234, 0.22);
  border-radius: 0 22px 0 0;
}

.tust-tech-circuit::before,
.tust-tech-circuit::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border: 2px solid rgba(63, 164, 248, 0.52);
  border-radius: 50%;
  background: #f6fbff;
  box-shadow: 0 0 16px rgba(56, 167, 248, 0.54);
}

.tust-tech-circuit::before { top: -5px; left: -4px; }
.tust-tech-circuit::after { right: -5px; bottom: -5px; }
.tust-tech-circuit-a { top: 19%; right: 5%; }
.tust-tech-circuit-b { bottom: 10%; left: 4%; transform: rotate(180deg); }

.tust-tech-particle {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  opacity: 0.42;
  background: var(--tech-cyan);
  box-shadow: 0 0 0 4px rgba(80, 190, 255, 0.08), 0 0 18px rgba(64, 172, 255, 0.56);
}

html[data-motion-mode="full"] .tust-tech-orb,
html[data-motion-mode="full"] .tust-tech-pointer-glow {
  will-change: transform;
}

html[data-motion-mode="full"] .tust-tech-particle {
  will-change: transform, opacity;
}

.tust-tech-particle-1 { top: 14%; left: 9%; }
.tust-tech-particle-2 { top: 29%; right: 17%; }
.tust-tech-particle-3 { top: 58%; left: 18%; }
.tust-tech-particle-4 { top: 72%; right: 11%; }
.tust-tech-particle-5 { bottom: 9%; left: 44%; }
.tust-tech-particle-6 { top: 42%; right: 42%; }

/* Shared refinement for public and admin surfaces. */
.site-header,
.topbar {
  border-bottom-color: rgba(72, 137, 205, 0.18) !important;
  box-shadow: 0 8px 32px rgba(20, 74, 132, 0.055);
}

.multiproduct-hero,
.multiproduct-order-card,
.catalog-product-card,
.cart-summary,
.query-lookup-form,
.query-order-card,
.receipt-card,
.login-card,
.stat-card,
.product-card,
.review-card,
.modal {
  isolation: isolate;
}

.multiproduct-order-card,
.catalog-product-card,
.cart-summary,
.query-lookup-form,
.query-order-card,
.receipt-card,
.login-card,
.stat-card,
.product-card,
.review-card {
  border-color: rgba(75, 139, 207, 0.2) !important;
  box-shadow: var(--tech-glow);
}

.multiproduct-order-card::before,
.query-order-card::before,
.receipt-card::before,
.login-card::before,
.modal::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  right: 20px;
  left: 20px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(69, 179, 255, 0.64), rgba(57, 112, 234, 0.32), transparent);
}

.hero-heading h1,
.public-query-hero h1,
.page-heading h1,
.login-card h1 {
  text-wrap: balance;
}

.hero-heading .eyebrow,
.public-query-hero .eyebrow,
.page-heading .eyebrow,
.login-card .eyebrow {
  text-shadow: 0 0 24px rgba(48, 136, 230, 0.18);
}

.catalog-product-card {
  position: relative;
  overflow: hidden;
  transition: border-color 0.28s ease, box-shadow 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.catalog-product-card::after,
.stat-card::after,
.product-card::after,
.review-card::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  width: 56px;
  height: 56px;
  pointer-events: none;
  opacity: 0.56;
  background:
    linear-gradient(135deg, transparent 48%, rgba(75, 166, 242, 0.24) 49% 50%, transparent 51%),
    linear-gradient(90deg, transparent 73%, rgba(75, 166, 242, 0.2) 74% 76%, transparent 77%);
}

.catalog-product-card:hover {
  border-color: rgba(51, 137, 225, 0.36) !important;
  box-shadow: 0 22px 62px rgba(22, 86, 157, 0.17);
}

.catalog-product-media {
  background:
    linear-gradient(145deg, rgba(235, 246, 255, 0.9), rgba(249, 253, 255, 0.98)),
    repeating-linear-gradient(90deg, rgba(51, 133, 220, 0.04) 0 1px, transparent 1px 16px);
}

.primary-button,
.order-submit,
.catalog-refresh {
  position: relative;
  overflow: hidden;
}

.primary-button::after,
.order-submit::after {
  content: "";
  position: absolute;
  top: -70%;
  left: -52%;
  width: 34%;
  height: 240%;
  pointer-events: none;
  opacity: 0.5;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.56), transparent);
  transition: left 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.primary-button:hover::after,
.order-submit:hover::after {
  left: 122%;
}

.form-section,
.detail-section {
  position: relative;
}

.section-title::after,
.detail-section > h3::after {
  content: "";
  display: inline-block;
  width: 32px;
  height: 1px;
  margin-left: 10px;
  vertical-align: middle;
  background: linear-gradient(90deg, rgba(51, 137, 230, 0.52), transparent);
}

.segmented button,
.query-lookup-row input,
.order-card input,
.order-card select,
.order-card textarea,
.settings-form input,
.settings-form select,
.settings-form textarea {
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, transform 0.22s ease;
}

.segmented button:hover:not(.active) {
  border-color: rgba(57, 133, 219, 0.3);
  background: rgba(241, 248, 255, 0.92);
}

.catalog-quantity-control button:not(:disabled):active {
  transform: none;
}

html[data-motion-ready="true"] .order-card,
html[data-motion-ready="true"] .hero-heading,
html[data-motion-ready="true"] .catalog-product-card.is-entering,
html[data-motion-ready="true"] .login-card,
html[data-motion-ready="true"] [data-view-panel]:not([hidden]),
html[data-motion-ready="true"] .product-card,
html[data-motion-ready="true"] .review-card,
html[data-motion-ready="true"] .admin-aurora {
  animation: none !important;
}

html[data-motion-mode="lite"] .tust-tech-motion {
  opacity: 0.56;
}

html[data-motion-mode="lite"] .tust-tech-grid {
  opacity: 0.2;
  background-size: 64px 64px;
}

html[data-motion-mode="lite"] .tust-tech-beam,
html[data-motion-mode="lite"] .tust-tech-circuit,
html[data-motion-mode="lite"] .tust-tech-pointer-glow,
html[data-motion-mode="lite"] .tust-tech-particle,
html.mobile-webview-safe .tust-tech-beam,
html.mobile-webview-safe .tust-tech-circuit,
html.mobile-webview-safe .tust-tech-pointer-glow {
  display: none;
}

html.mobile-webview-safe .tust-tech-motion {
  opacity: 0.44;
}

@media (max-width: 767px) {
  html { scroll-behavior: auto; }

  .tust-tech-motion {
    opacity: 0.5;
  }

  .tust-tech-grid {
    opacity: 0.18;
    background-size: 64px 64px;
  }

  .tust-tech-beam,
  .tust-tech-circuit,
  .tust-tech-pointer-glow,
  .tust-tech-particle-4,
  .tust-tech-particle-5,
  .tust-tech-particle-6 {
    display: none;
  }

  .catalog-product-card,
  .multiproduct-order-card,
  .cart-summary,
  .query-order-card {
    box-shadow: 0 12px 34px rgba(21, 79, 142, 0.1);
  }

  .primary-button::after,
  .order-submit::after {
    display: none;
  }

  .cart-summary {
    position: sticky;
    top: auto;
    bottom: 76px;
    max-height: min(25vh, 164px);
    padding: 9px 10px;
  }

  .cart-lines {
    max-height: 54px;
    margin-top: 6px;
  }

  .cart-line {
    padding: 5px 7px;
  }

  .cart-line small {
    display: none;
  }

  .cart-totals {
    margin-top: 6px;
    padding-top: 6px;
  }
}

@media (hover: none), (pointer: coarse) {
  .catalog-product-card:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  .tust-tech-beam,
  .tust-tech-circuit,
  .tust-tech-pointer-glow,
  .tust-tech-particle {
    display: none !important;
  }

  .tust-tech-motion,
  .tust-tech-motion *,
  [data-motion-ready="true"] {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
