* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

:root {
  --swarm-accent-rgb: 96, 224, 162;
}

@keyframes swarmSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

body {
  background: #000;
  color: #fff;
  font-family: 'Roboto', sans-serif;
  overflow: hidden;
  overflow-x: hidden !important;
  margin: 0;
  padding: 0;
}

body.loaded {
  overflow-y: auto;
  overflow-x: hidden !important;
}

/* Prevent scrolling beyond kaleidoscope section */
body.loaded #landingContent {
  max-height: 200vh;
  overflow-y: hidden;
}


/* Hero Section */
body:not(.swarm-mode) .hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative;
  z-index: 10;
}

body:not(.swarm-mode) h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 100;
  letter-spacing: 0.3em;
  margin-bottom: 1rem;
}

body:not(.swarm-mode) .scramble {
  font-weight: lighter;
}

body:not(.swarm-mode) .tagline {
  font-size: 1.2rem;
  opacity: 0;
  transform: translateY(20px);
}

body:not(.swarm-mode) .subtext {
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(20px);
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.5rem;
}

/* Kaleidoscope Section */
body:not(.swarm-mode) .kaleidoscope-section {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  opacity: 0;
  visibility: hidden;
  overflow: visible;
}

body:not(.swarm-mode) .kaleidoscope-stage {
  position: relative;
  width: 1700px;
  height: 1700px;
  will-change: transform;
  backface-visibility: hidden;
  contain: paint;
  z-index: 10;
  transform-origin: 50% 50%;
  padding-top: 40px;

}

body:not(.swarm-mode) .kaleidoscope-wrapper {
  position: relative;
  width: 1700px;
  height: 1700px;
  will-change: transform;
  backface-visibility: hidden;
  contain: paint;
  z-index: 10;
  transform-origin: 50% 50%;
  isolation: isolate;
}

body:not(.swarm-mode) .kalo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1800px;
  height: 1800px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.15) 35%, rgba(255, 255, 255, 0) 70%);
  opacity: 0;
  filter: blur(10px);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
  transform-origin: 50% 50%;
}

body.swarm-mode .kalo-glow {
  background: radial-gradient(circle at 50% 50%, rgba(var(--swarm-accent-rgb), 0.35), rgba(var(--swarm-accent-rgb), 0.15) 35%, rgba(var(--swarm-accent-rgb), 0) 70%);
}

body:not(.swarm-mode) .kaleidoscope-svg {
  width: 90%;
  height: 90%;
  opacity: 1;
  transition: filter 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transform-origin: 50% 50%;
  will-change: transform;
  backface-visibility: hidden;
  z-index: 0;
}

.kaleidoscope-svg.glow {
  filter: brightness(1.5) drop-shadow(0 0 18px rgba(255, 255, 255, 0.12)) drop-shadow(0 0 60px rgba(255, 255, 255, 0.08));
}

.gold-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1700px;
  height: 1700px;
  transform: translate(-50%, -50%);
  transform-origin: 50% 50%;
  will-change: transform;
  backface-visibility: hidden;
  opacity: 0;
  z-index: 2;
  /* filter: grayscale(100%) contrast(1.75) brightness(1.04); */
}

.dot-container {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -49%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 10;
}

.dot-container.visible {
  opacity: 1;
  pointer-events: auto;
}

.dot-wrapper {
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 12px;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.dot {
  position: relative;
  left: 50%;
  top: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  width: 35px;
  height: 35px;
  background: rgba(255, 255, 255, 0.5);
  padding: .2rem;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.9;
  transition: opacity 0.25s ease;
}

.dot:hover {
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.7);
}

.dot:hover img {
  opacity: 1;
}

.dot.active {
  transform: translate(-50%, -50%) scale(1.3);
  border: 3px solid white;
  box-shadow: 0 0 30px rgba(255, 255, 255, 1), 0 0 60px currentColor;
}

.dot-label {
  --label-accent: rgba(255, 255, 255, 0.35);
  position: absolute;
  top: 50%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 225px;
  max-width: 225px;
  height: 80px;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--label-accent);
  background: rgba(9, 16, 24, 0.82);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: auto;
  z-index: 1;
  cursor: pointer;
  white-space: normal;
  overflow-wrap: anywhere;
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
}

.dot-container.visible .dot-label {
  opacity: 1;
}

.dot-label.at-top {
  font-size: 1.3rem !important;
  font-weight: 300 !important;
  opacity: 1 !important;
  z-index: 100;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  white-space: nowrap !important;
  padding: 0.75rem 1.25rem;
}

.service-details {
  position: absolute;
  top: 170px;
  left: 50%;
  transform: translate(-50%, -10%);
  width: min(1200px, 92vw);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  z-index: 8;
  transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: visible;
  height: 800px;
}

.service-details.visible {
  opacity: 1;
  pointer-events: auto;
}

.service-title {
  font-size: clamp(2rem, 8vw, 6rem);
  line-height: 1;
  letter-spacing: inherit;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.6rem;
  transition: color 0.5s ease;
}

.pathway-tagline {
  font-size: 3rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.8rem;
}

.pathway-overview {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: 2.2rem;
}

.cards-3,
.cards-2 {
  display: grid;
  gap: 1.2rem;
}

.cards-3 {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 2rem;
}

.cards-2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 900px) {
  .cards-3 {
    grid-template-columns: 1fr;
  }

  .cards-2 {
    grid-template-columns: 1fr;
  }
}

.card.glass {
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: left;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

#serviceDetails .cards-3 .card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.card.glass:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.8rem;
}

.service-icon svg {
  width: 62px;
  height: 62px;
}

.card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.card p {
  font-size: 1rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  background: rgba(74, 222, 128, 0.2);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.4);
}

.service-cards-badge {
  display: inline-block;
  padding: 0rem 0.75rem;
  border-radius: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  background: none;
  border: none;
}

.actions {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.btn.primary {
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.9), rgba(34, 197, 94, 0.9));
  border-color: rgba(74, 222, 128, 0.5);
  font-weight: 600;
}

.btn.primary:hover {
  background: linear-gradient(135deg, rgba(74, 222, 128, 1), rgba(34, 197, 94, 1));
  border-color: rgba(74, 222, 128, 0.7);
  box-shadow: 0 12px 32px rgba(74, 222, 128, 0.3);
}

.btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 3px;
}

#landingContent {
  position: relative;
  z-index: 2;
  transition: opacity 0.6s ease;
}

body.swarm-mode {
  --page-bg: radial-gradient(circle at top, #091018, #030509 55%);
  --hero-bg: linear-gradient(180deg, rgba(15, 35, 55, 0.65), rgba(5, 8, 12, 0.95));
  --card-slate: rgba(8, 17, 24, 0.85);
  --card-muted: rgba(9, 20, 29, 0.75);
  --card-cream: rgba(235, 241, 238, 0.12);
  --accent-green: #60e0a2;
  --accent-teal: #35a39b;
  --accent-peach: #f0c8a8;
  --text-primary: #f7fbff;
  --text-secondary: rgba(241, 247, 255, 0.75);
  --card-border: rgba(173, 224, 204, 0.18);
  --card-shadow: 0 24px 80px rgba(6, 15, 23, 0.6);
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --glow-opacity: 0.75;
  --hero-glow: rgba(var(--swarm-accent-rgb), 0.9);
  background: var(--page-bg);
  color: var(--text-primary);
  font-family: 'Roboto', sans-serif;
  letter-spacing: 0.03em;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-y: auto;
  overflow-x: hidden !important;
}

body.swarm-mode #landingContent {
  opacity: 1 !important;
}

body.swarm-mode #mainNav {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

body.swarm-mode .page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--page-bg);
}

body.swarm-mode main {
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  width: 100%;
}

body.swarm-mode .hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8rem 1.5rem 3rem;
  text-align: center;
  overflow: hidden;
}

body.swarm-mode .hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-bg);
  opacity: 0.75;
  filter: blur(30px);
  z-index: -2;
}

body.swarm-mode .hero::after {
  content: '';
  position: absolute;
  width: 1320px;
  height: 1320px;
  border-radius: 100%;
  background: radial-gradient(circle, rgba(var(--swarm-accent-rgb), 0.19), rgba(5, 9, 15, 0));
  filter: blur(60px);
  z-index: -1;
  top: -259px;
}

#swarmBackButton {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: rgb(255, 255, 255);
  text-align: left;
  margin: 0 0 1rem;
  display: block;
  transition: color 0.3s ease;
  cursor: pointer;
  z-index: 999999 !important;
  position: relative !important;
  pointer-events: auto !important;
  align-self: flex-start;
  margin-left: 1.5rem;
}

#swarmBackButton:hover {
  color: rgb(var(--swarm-accent-rgb));
}

body.swarm-mode .hero-graphic {
  z-index: 1;
  pointer-events: none;
}

body.swarm-mode .hero-logo {
  font-size: clamp(1.8rem, 1.5rem + 1.2vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.18em;
  color: rgb(var(--swarm-accent-rgb));
  text-shadow: 0 0 18px rgba(var(--swarm-accent-rgb), 0.35);
  margin-bottom: 2.5rem;
  text-transform: uppercase;
  text-align: center;
  padding-top:4rem;
}

body.swarm-mode .hero-graphic {
  position: relative;
  width: clamp(220px, 40vw, 420px);
  height: clamp(220px, 40vw, 420px);
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: visible;
}

body.swarm-mode #kaleidoscopeStage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: 50% 50%;
  width: 1700px;
  height: 1700px;
}

body.swarm-mode #kaleidoscopeWrapper {
  width: 1700px;
  height: 1700px;
  position: relative;
}

body.swarm-mode #kaloGlow {
  width: 1800px;
  height: 1800px;
}

body.swarm-mode .hero-graphic::after {
  content: '';
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle, rgba(var(--swarm-accent-rgb), 0.18), rgba(var(--swarm-accent-rgb), 0));
  filter: blur(70px);
  z-index: 0;
}

body.swarm-mode #goldRing,
body.swarm-mode #dotContainer {
  display: none !important;
}

@keyframes spin {
  from {
    transform: rotate(0deg) scale(1.02);
  }

  to {
    transform: rotate(360deg) scale(1.02);
  }
}

@keyframes gentleSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

#swarmOverlay,
#kaleidoscopeOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000;
  z-index: 12000;
  overflow-y: auto;
  overflow-x: hidden !important;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#kaleidoscopeOverlay {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
}

body.swarm-mode #swarmOverlay {
  opacity: 1;
  pointer-events: auto;
}

body.kaleidoscope-mode #kaleidoscopeOverlay {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

#swarmOverlay #swarmBackButton {
  margin-left: clamp(1.5rem, 4vw, 3rem);
}

.swarm-chat-toggle {
  position: fixed;
  bottom: 2.5rem;
  left: 2.5rem;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(9, 16, 24, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1500;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  touch-action: manipulation;
}

.swarm-chat-toggle:hover {
  transform: translateY(-3px);
  border-color: rgba(96, 224, 162, 0.55);
  box-shadow: 0 26px 55px rgba(6, 15, 23, 0.55), inset 0 0 0 1px rgba(96, 224, 162, 0.35);
}

.swarm-chat-toggle:focus-visible {
  outline: 2px solid rgba(96, 224, 162, 0.7);
  outline-offset: 3px;
}

.swarm-chat-toggle img {
  width: 54%;
  height: 54%;
  filter: drop-shadow(0 0 14px rgba(var(--swarm-accent-rgb), 0.45));
  animation: gentleSpin 48s linear infinite;
}

body.swarm-mode .swarm-chat-toggle {
  display: flex;
}

@media (max-width: 720px) {
  .swarm-chat-toggle {
    bottom: 1.25rem;
    left: 1.25rem;
    width: 58px;
    height: 58px;
  }
}

body.swarm-mode .hero-graphic img {
  width: 100%;
  height: 100%;
  filter: brightness(1.35) saturate(1.1);
  z-index: 0;
}

body.swarm-mode h1 {
  font-size: clamp(2.5rem, 2.3rem + 3vw, 5rem);
  font-weight: 100;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-top: 3.25rem;
  margin-bottom: 1rem;
}

body.swarm-mode .hero-content {
  display: flex;
  flex-direction: column;
  margin: 3rem 300px auto;
  text-align: left;
  gap: 2.5rem;
}

body.swarm-mode .tagline-block {
  text-align: left;
  font-size: clamp(1.15rem, 1.05rem + 0.6vw, 1.65rem);
  color: var(--text-secondary);
  letter-spacing: 0.06em;
}

body.swarm-mode .card-grid {
  display: grid;
  gap: 1.5rem;
}

body.swarm-mode .card-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.swarm-mode .card-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.swarm-mode .feature-card,
body.swarm-mode .audience-card {
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  background: var(--card-slate);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  transition: transform 0.35s ease, border-color 0.35s ease, background 0.35s ease;
  position: relative;
  overflow: hidden;
}

/* Card border animations now handled by SVG system (svg-card-borders.js) */

body.swarm-mode .audience-card.tech-orchestration {
  background: linear-gradient(155deg, rgba(96, 224, 162, 0.26), rgba(40, 70, 60, 0.12));
}

body.swarm-mode .audience-card.seamless-rollout {
  background: linear-gradient(155deg, rgba(244, 114, 182, 0.36), rgba(244, 114, 182, 0.12));
}

/* Pink border animation for seamless-rollout card */
body.swarm-mode .audience-card.seamless-rollout::before {
  background: linear-gradient(180deg, #f472b6, rgba(244, 114, 182, 0.3));
}

body.swarm-mode .audience-card.seamless-rollout::after {
  background: linear-gradient(90deg, #f472b6, rgba(244, 114, 182, 0.3));
}

body.swarm-mode .feature-card:nth-child(2) {
  background: var(--card-muted);
}

body.swarm-mode .feature-card:nth-child(3) {
  background: linear-gradient(160deg, rgba(26, 35, 46, 0.95), rgba(12, 21, 29, 0.88));
}

body.swarm-mode .feature-card svg,
body.swarm-mode .audience-card svg {
  width: 42px;
  height: 42px;
  color: var(--accent-green);
}

body.swarm-mode .feature-card h3,
body.swarm-mode .audience-card h3 {
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

body.swarm-mode .feature-card p,
body.swarm-mode .audience-card p {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.65;
  letter-spacing: 0.04em;
}

body.swarm-mode .audience-card {
  background: linear-gradient(165deg, rgba(239, 246, 243, 0.08), rgba(40, 70, 60, 0.08));
  color: var(--text-secondary);
}

body.swarm-mode .audience-card[role='button'] {
  cursor: pointer;
}

body.swarm-mode .audience-card h3 {
  color: var(--text-primary);
}

body.swarm-mode .audience-card strong {
  color: var(--accent-green);
  font-weight: 500;
}

body.swarm-mode .audience-card .audience-label {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
}

body.swarm-mode .audience-card.tech-orchestration .audience-label {
  color: #60e0a2;
}

body.swarm-mode .audience-card.seamless-rollout .audience-label {
  color: #f472b6;
}

body.swarm-mode .feature-card:hover,
body.swarm-mode .audience-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 224, 162, 0.45);
}

body.swarm-mode .audience-card:hover {
  background: linear-gradient(155deg, rgba(96, 224, 162, 0.16), rgba(40, 70, 60, 0.12));
}

body.swarm-mode .audience-card.seamless-rollout:hover {
  background: linear-gradient(155deg, rgba(244, 114, 182, 0.42), rgba(244, 114, 182, 0.16));
  border-color: rgba(244, 114, 182, 0.45);
}

body.swarm-mode .audience-card .cta-button {
  padding: 1rem 2.5rem;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  display: inline-block;
  font-weight: 500;
  letter-spacing: 0.08em;
  border: 1px solid transparent;
  text-transform: uppercase;
  margin-top: 4.25rem;
  position: relative;
  overflow: hidden;
}

/* Vertical line - goes up the left side */
body.swarm-mode .audience-card .cta-button::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 3px;
  height: 0;
  transition: height 0.3s ease;
  border-radius: 3px 3px 0 0;
}

body.swarm-mode .audience-card .cta-button:hover::before {
  height: 100%;
}

/* Horizontal line - goes across the top */
body.swarm-mode .audience-card .cta-button::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  transition: width 0.3s ease 0.3s;
  border-radius: 0 3px 3px 0;
}

body.swarm-mode .audience-card .cta-button:hover::after {
  width: 100%;
}

body.swarm-mode .audience-card[data-audience='technical'] .cta-button {
  background: #22c55e;
  color: black;
  box-shadow: 0 18px 45px rgba(74, 222, 128, 0.35);
}

body.swarm-mode .audience-card[data-audience='technical'] .cta-button::before {
  background: linear-gradient(180deg, #16a34a, rgba(22, 163, 74, 0.3));
}

body.swarm-mode .audience-card[data-audience='technical'] .cta-button::after {
  background: linear-gradient(90deg, #16a34a, rgba(22, 163, 74, 0.3));
}

body.swarm-mode .audience-card[data-audience='technical'] .cta-button:hover {
  transform: translateY(-3px);
  background: #22c55e;
  box-shadow: 0 24px 60px rgba(74, 222, 128, 0.45);
}

body.swarm-mode .audience-card[data-audience='business'] .cta-button {
  background: #f472b6;
  box-shadow: 0 18px 45px rgba(244, 114, 182, 0.35);
  color: black;
}

body.swarm-mode .audience-card[data-audience='business'] .cta-button::before {
  background: linear-gradient(180deg, #f472b6, rgba(244, 114, 182, 0.3));
}

body.swarm-mode .audience-card[data-audience='business'] .cta-button::after {
  background: linear-gradient(90deg, #f472b6, rgba(244, 114, 182, 0.3));
}

body.swarm-mode .audience-card[data-audience='business'] .cta-button:hover {
  transform: translateY(-3px);
  background: #ec4899;
  box-shadow: 0 24px 60px rgba(244, 114, 182, 0.45);
}

body.swarm-mode .audience-card .cta-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 3px;
}

body.swarm-mode .footer-tagline {
  translate: none;
  rotate: none;
  scale: none;
  transform: translate(0px);
  opacity: 1;
  margin: 3rem auto;
  font-size: 2rem;
  color: white;
  text-align: center;
}

@media (max-width: 960px) {
  body.swarm-mode .card-grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body.swarm-mode .hero {
    padding-top: 3.5rem;
  }

  body.swarm-mode h1 {
    letter-spacing: 0.3em;
  }

  body.swarm-mode .card-grid.three,
  body.swarm-mode .card-grid.two {
    grid-template-columns: 1fr;
  }

  body.swarm-mode .hero-logo {
    letter-spacing: 0.3em;
    margin-bottom: 2.5rem;
  }

  body.swarm-mode .hero-graphic {
    width: clamp(220px, 70vw, 320px);
    height: clamp(220px, 70vw, 320px);
  }

  body.swarm-mode .hero-content {
    margin: 3rem auto;
    padding: 0 1.5rem;
  }
}

@media (max-width: 900px) {
  .swarm-loading {
    letter-spacing: 0.12em;
    font-size: 0.85rem;
  }
}

/* SwarmChatToggle Component Styles */
.swarmChatToggle {
  display: none;
  /* Hidden by default */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 100000;
  /* No background, padding, or borders */
}

/* Only show when in swarm mode */
body.swarm-mode .swarmChatToggle {
  display: flex;
}

.solutionText {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
  font-weight: normal;
  text-align: center;
  width: 180px;
  /* fixed width to prevent layout shifts */
  color: #fff;
  font-family: 'Roboto', sans-serif;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
  z-index: 2;
  pointer-events: none;
}

/* Light mode magenta text */
html[data-mode="light"] .solutionText {
  color: #C400C4 !important;
  text-shadow: 0 0 10px rgba(196, 0, 196, 0.3) !important;
}

.icon {
  width: 120px;
  height: 120px;
  animation: continuousRotation 40s linear infinite;
  position: relative;
  cursor: pointer;
}

.icon svg,
.icon img {
  width: 100%;
  height: 100%;
}

/* Service menu - ONLY shows when hovering over .icon */
.serviceMenuItems {
  position: absolute;
  bottom: 100px;
  /* Fixed above the icon */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(96, 224, 162, 0.3);
  border-radius: 8px;
  padding: 0.75rem;
  backdrop-filter: blur(15px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.2s ease;
  min-width: 200px;
}

.icon:hover + .serviceMenuItems,
.serviceMenuItems:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Service Menu Styles */
.swarmServiceMenu {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(96, 224, 162, 0.3);
  border-radius: 8px;
  padding: 1rem;
  z-index: 1001;
  display: none;
  backdrop-filter: blur(15px);
  min-width: 250px;
}

.swarmServiceMenu.show {
  display: block;
}

.serviceMenuItem {
  padding: 0.75rem 1rem;
  color: #fff;
  font-family: 'Roboto', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.2s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.icon svg,
.icon img {
  width: 100%;
  height: 100%;
}

/* Service menu - hidden by default, shows on hover */
.serviceMenuItems {
  position: absolute;
  bottom: 100px;
  /* Fixed above the icon */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(96, 224, 162, 0.3);
  border-radius: 8px;
  padding: 0.75rem;
  backdrop-filter: blur(15px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.2s ease;
  min-width: 200px;
}

.swarmChatToggle:hover .serviceMenuItems {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.serviceMenuItem {
  display: block;
  padding: 0.5rem 0.75rem;
  margin: 0.25rem 0;
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  font-family: 'Roboto', sans-serif;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.serviceMenuItem:hover {
  background: rgba(96, 224, 162, 0.2);
  color: #fff;
}

.serviceMenuItem.active {
  background: rgba(96, 224, 162, 0.3);
  color: #fff;
  font-weight: 500;
}

@keyframes continuousRotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Mobile Service Menu - Hidden by default */
.mobile-service-menu {
  display: none;
}

/* Mobile Kaleidoscope Adjustments */
@media (max-width: 1100px) {
  /* Hide the dot container on mobile */
  .dot-container {
    display: none !important;
  }

  /* Show and animate the kaleidoscope SVG as background */
  .kaleidoscope-svg {
    display: block !important;
    position: absolute;
    width: 80vw;
    height: 80vw;
    max-width: 500px;
    max-height: 500px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.3;
    z-index: 1;
    animation: slowSpin 30s linear infinite;
  }

  /* Spinning animation */
  @keyframes slowSpin {
    from {
      transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
      transform: translate(-50%, -50%) rotate(360deg);
    }
  }

  /* Show and center mobile service menu */
  .mobile-service-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 90%;
    max-width: 400px;
  }

  /* Style mobile service items */
  .mobile-service-item {
    padding: 1rem 1.5rem;
    background: rgba(9, 16, 24, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
  }

  /* Individual dot colors */
  .mobile-service-item[data-index="0"] { color: #FF3B1F; } /* Crisis Recovery */
  .mobile-service-item[data-index="1"] { color: #FF6B35; } /* Rapid Deployment */
  .mobile-service-item[data-index="2"] { color: #FFD93D; } /* Tactical AI Multiplier */
  .mobile-service-item[data-index="3"] { color: #6BCF7F; } /* Platform Stabilization */
  .mobile-service-item[data-index="4"] { color: #4ECDC4; } /* System Rebuild & Rescue */
  .mobile-service-item[data-index="5"] { color: #2E86DE; } /* Time-Critical Launch Support */
  .mobile-service-item[data-index="6"] { color: #8E44AD; } /* Technical Augmentation at Scale */
  .mobile-service-item[data-index="7"] { color: #E056FD; } /* Modernization of Legacy Systems */

  .mobile-service-item:hover,
  .mobile-service-item:focus {
    background: rgba(9, 16, 24, 0.95);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }

  .mobile-service-item:active {
    transform: translateY(0);
  }

  /* Hide service details on mobile kaleidoscope */
  .kaleidoscope-section .service-details {
    display: none;
  }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .swarmChatToggle {
    bottom: 1rem;
    left: 1rem;
  }

  .swarmChatToggle {
    bottom: 1rem;
    left: 1rem;
  }

  .solutionText {
    font-size: 0.625rem;
    width: 150px;
    /* smaller fixed width for mobile */
    /* position: absolute is maintained from parent rule */
  }

  .icon {
    width: 60px;
    height: 60px;
    /* magenta filter is maintained from parent rule */
  }

  .serviceMenuItems {
    bottom: 80px;
    min-width: 180px;
  }

  .serviceMenuItem {
    font-size: 0.65rem;
    padding: 0.4rem 0.6rem;
  }
}
