/* Stitch / broadcast UI utilities (complements Tailwind CDN) */
.material-symbols-outlined {
  font-family: "Material Symbols Outlined", sans-serif;
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.glass-panel {
  background: rgba(23, 31, 51, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Stitch _2: emphasized glass / command-center glow */
.glass-panel-glow {
  background: rgba(11, 19, 38, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(139, 92, 246, 0.22);
  box-shadow: 0 4px 40px rgba(139, 92, 246, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.tech-gradient {
  background: linear-gradient(135deg, #d0bcff 0%, #00a2e6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.signal-pulse-ring {
  position: relative;
}
.signal-pulse-ring::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  border: 1px solid rgba(78, 222, 163, 0.45);
  animation: signal-pulse 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}
@keyframes signal-pulse {
  0% {
    transform: scale(0.85);
    opacity: 0.6;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.text-gradient-primary {
  background: linear-gradient(to right, #d0bcff, #a078ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-primary {
  background: linear-gradient(135deg, #a078ff, #6d3bd7);
  color: #ffffff;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: 0 0 15px rgba(160, 120, 255, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.btn-primary:hover::after {
  opacity: 1;
}

.hero-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(160, 120, 255, 0.25), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(0, 162, 230, 0.12), transparent),
    radial-gradient(ellipse 50% 30% at 0% 80%, rgba(78, 222, 163, 0.08), transparent),
    linear-gradient(180deg, #060e20 0%, #0b1326 45%, #0b1326 100%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
}

/* Scroll reveal */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Client logo strip — outer rail (dark), each logo in white tile */
.clients-logos {
  position: relative;
  width: 100%;
  margin-top: 0;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(19, 27, 46, 0.9) 0%, rgba(11, 19, 38, 0.95) 100%);
  overflow: hidden;
  min-height: 5.5rem;
  padding: 0.65rem 0;
  transition: min-height 0.35s ease, overflow 0.35s ease;
}

.clients-logos:hover {
  overflow: visible;
  min-height: auto;
}

.clients-logos-wrapper {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.25rem;
  min-height: 4rem;
  will-change: transform;
}

.clients-logos:hover .clients-logos-wrapper[data-expanded="true"] {
  animation: none !important;
  flex-wrap: wrap;
  justify-content: center;
  transform: translateX(0) !important;
  width: 100% !important;
  max-width: 100%;
}

.client-logo-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.5rem;
  min-height: 3.75rem;
  min-width: 5.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.client-logo-item:hover {
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.12), 0 0 0 1px rgba(167, 139, 250, 0.2);
  transform: translateY(-1px);
}

.client-logo-item img {
  max-height: 2.6rem;
  max-width: 7.5rem;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  opacity: 1;
  filter: none;
}

@media (max-width: 768px) {
  .clients-logos {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    min-height: unset;
  }

  .clients-logos:hover {
    overflow-x: auto;
  }

  .clients-logos-wrapper {
    gap: 1rem;
    padding-right: 1rem;
  }
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.desktop-only {
  display: inline;
}

.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .desktop-only {
    display: none;
  }
  .mobile-only {
    display: inline;
  }
}

/* Floating rail */
.floating-rail {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-right: 0.25rem;
}

.floating-rail button,
.floating-rail a {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 0.5rem;
  min-width: 2.5rem;
  border-radius: 0.5rem 0 0 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(23, 31, 51, 0.85);
  backdrop-filter: blur(12px);
  color: #dae2fd;
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: none;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.08em;
}

.floating-rail a:hover,
.floating-rail button:hover {
  border-color: rgba(160, 120, 255, 0.4);
  color: #fff;
}

@media (max-width: 640px) {
  .floating-rail {
    display: none;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  z-index: 10000;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  clip: auto;
  padding: 0.65rem 1rem;
  margin: 0;
  overflow: visible;
  white-space: normal;
  background: linear-gradient(135deg, #a078ff, #6d3bd7);
  color: #fff;
  font-weight: 600;
  border-radius: 0.5rem;
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

/* ========== Services grid: breathing room (max 2 cols, no 4-up wall) ========== */
.site-section .services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  margin-top: 2.75rem;
}

@media (min-width: 768px) {
  .site-section .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1.75rem;
  }
}

@media (min-width: 1280px) {
  .site-section .services-grid {
    gap: 2.25rem 2rem;
  }
}

.site-section .service-card {
  background: rgba(23, 31, 51, 0.58);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 1rem;
  padding: 1.75rem 1.75rem 1.5rem;
  text-align: left;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

/* Stitch _2: top spectral accent */
.site-section .service-card::before {
  display: block;
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #a078ff, #00a2e6, #4edea3);
  opacity: 0.55;
  transition: opacity 0.25s ease;
}

.site-section .service-card:hover {
  border-color: rgba(160, 120, 255, 0.4);
  box-shadow: 0 8px 32px rgba(160, 120, 255, 0.08);
  transform: translateY(-2px);
}

.site-section .service-card:hover::before {
  opacity: 1;
}

.site-section .service-header {
  display: flex;
  align-items: flex-start;
  gap: 1.15rem;
  margin-bottom: 1.15rem;
}

.site-section .service-icon {
  width: 52px;
  height: 52px;
  border-radius: 0.5rem;
  background: rgba(160, 120, 255, 0.12);
  border: 1px solid rgba(160, 120, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0;
}

.site-section .service-icon svg {
  width: 26px;
  height: 26px;
  fill: #d0bcff;
}

.site-section .service-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
  line-height: 1.3;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
}

.site-section .service-card > p {
  color: #c8c0d8;
  line-height: 1.75;
  font-size: 0.925rem;
  margin: 0 0 0.25rem;
}

/* Collapsible scenario: default closed, less visual noise */
.site-section .service-scenario-details {
  margin-top: 1.15rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(6, 14, 32, 0.45);
  overflow: hidden;
}

.site-section .service-scenario-summary {
  cursor: pointer;
  list-style: none;
  padding: 0.7rem 1rem;
  font-size: 0.68rem;
  color: #89ceff;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
  transition: background 0.15s ease;
}

.site-section .service-scenario-summary::-webkit-details-marker {
  display: none;
}

.site-section .service-scenario-summary::marker {
  display: none;
}

.site-section .service-scenario-summary:hover {
  background: rgba(137, 206, 255, 0.06);
}

.site-section .service-scenario-summary::after {
  content: "+";
  margin-left: auto;
  font-size: 1rem;
  font-weight: 400;
  opacity: 0.65;
  line-height: 1;
}

.site-section .service-scenario-details[open] .service-scenario-summary::after {
  content: "−";
}

.site-section .service-scenario-details[open] .service-scenario-summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-section .service-scenario-details .service-scenario-text {
  padding: 0.85rem 1rem 1rem;
  margin: 0;
  font-size: 0.875rem;
  color: #b8b0c8;
  line-height: 1.65;
  border: none;
  background: transparent;
}

.site-section .scenarios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.site-section .scenario-card {
  display: flex;
  flex-direction: column;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top-color: rgba(167, 139, 250, 0.35);
  background: rgba(23, 31, 51, 0.55);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-section .scenario-card:hover {
  border-color: rgba(160, 120, 255, 0.35);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.site-section .scenario-image {
  height: 170px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #89ceff;
  font-size: 0.9rem;
}

.site-section .scenario-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-section .scenario-content {
  padding: 1.15rem 1.25rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.site-section .scenario-content h3 {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
}

.site-section .scenario-content p {
  color: #cbc3d7;
  font-size: 0.9rem;
  line-height: 1.65;
  flex: 1;
}

.site-section .scenario-link {
  color: #d0bcff;
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.site-section .scenario-link:hover {
  color: #ffffff;
}
