/* Homepage luminous circuit hero — 2026 tech aesthetic */
.hero-circuit {
  --hc-navy: #061428;
  --hc-navy-2: #0b1f4d;
  --hc-line: #5eb3ff;
  --hc-line-soft: rgba(94, 179, 255, 0.45);
  --hc-gold: #ffe27a;
  --hc-text: #f4f8ff;
  --hc-muted: rgba(232, 243, 255, 0.78);
  position: relative;
  isolation: isolate;
  /* Sticky only during zoom; at max zoom the pin releases and scrolls away with the page */
  height: 130vh;
  width: 100%;
  margin-bottom: 0;
  background:
    radial-gradient(1000px 640px at 78% 48%, rgba(31, 90, 188, 0.38), transparent 58%),
    radial-gradient(700px 420px at 22% 30%, rgba(255, 226, 122, 0.07), transparent 55%),
    linear-gradient(165deg, var(--hc-navy) 0%, var(--hc-navy-2) 48%, #071530 100%);
  color: var(--hc-text);
}

.hero-circuit__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  width: 100%;
  z-index: 1;
}

.hero-circuit__stage {
  position: relative;
  height: 100%;
  width: 100%;
}

.hero-circuit__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  transform-origin: 58% 50%;
  will-change: transform;
  backface-visibility: hidden;
}

.hero-circuit__dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(126, 200, 255, 0.18) 0.8px, transparent 0.8px);
  background-size: 18px 18px;
  opacity: 0.4;
  mask-image: radial-gradient(ellipse 58% 58% at 58% 50%, #000 16%, transparent 74%);
  -webkit-mask-image: radial-gradient(ellipse 58% 58% at 58% 50%, #000 16%, transparent 74%);
}

.hero-circuit__glow {
  position: absolute;
  width: 52%;
  height: 68%;
  right: -4%;
  top: 10%;
  background: radial-gradient(circle at 55% 48%, rgba(94, 179, 255, 0.22), transparent 62%);
  filter: blur(10px);
  animation: hc-ambient 8s ease-in-out infinite alternate;
}

.hero-circuit__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  /* meet = full board visible; no chip labels cropped by slice */
  overflow: visible;
}

.hc-board {
  transform-origin: 80% 50%;
}

.hc-traces--fine {
  opacity: 0.55;
}

.hc-traces--mid {
  opacity: 0.9;
}

.hc-traces .hc-path {
  stroke-dasharray: 4 6;
  animation: hc-dash 42s linear infinite;
}

.hc-traces--fine .hc-path {
  stroke-dasharray: 3 5;
  animation-duration: 55s;
}

.hc-traces .hc-path:nth-child(odd) {
  animation-direction: reverse;
  animation-duration: 48s;
}

.hc-traces--fine .hc-path:nth-child(3n) {
  animation-duration: 62s;
}

.hc-pulse {
  stroke-dasharray: 12 88;
  stroke-dashoffset: 100;
  animation: hc-pulse-run 4.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.hc-pulse--b { animation-delay: 0.7s; animation-duration: 4.8s; }
.hc-pulse--c { animation-delay: 1.4s; animation-duration: 5.1s; }
.hc-pulse--d { animation-delay: 0.35s; animation-duration: 3.9s; }
.hc-pulse--e { animation-delay: 2s; animation-duration: 5.4s; }
.hc-pulse--f { animation-delay: 1.1s; animation-duration: 4.5s; }

.hc-vias circle {
  animation: hc-node-breathe 5s ease-in-out infinite;
}

.hc-vias circle:nth-child(3n) { animation-delay: 0.5s; }
.hc-vias circle:nth-child(3n+1) { animation-delay: 1.1s; }
.hc-vias circle:nth-child(4n) { animation-delay: 1.8s; }

.hc-via-cores {
  opacity: 0.85;
  pointer-events: none;
}

.hc-chip {
  opacity: 0;
  animation: hc-chip-in 0.9s ease forwards;
  animation-delay: 0.4s;
}
.hc-chip + .hc-chip { animation-delay: 0.55s; }
.hc-chip + .hc-chip + .hc-chip { animation-delay: 0.7s; }
.hc-chip + .hc-chip + .hc-chip + .hc-chip { animation-delay: 0.85s; }
.hc-chip + .hc-chip + .hc-chip + .hc-chip + .hc-chip { animation-delay: 1s; }

.hc-pulse-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: hc-dot-pulse 3.6s ease-in-out infinite;
}

.hc-pulse-dot--2 { animation-delay: 0.8s; }
.hc-pulse-dot--3 { animation-delay: 1.5s; }
.hc-pulse-dot--4 { animation-delay: 0.4s; }

.hero-circuit.is-traced .hc-traces .hc-path {
  stroke-dasharray: none;
  animation: none;
}

.hero-circuit.is-traced .hc-traces--fine {
  opacity: 0.7;
  stroke: rgba(126, 200, 255, 0.55);
}

.hero-circuit.is-traced .hc-traces--mid {
  opacity: 1;
  filter: url(/_c/themes/iotnetweb/assets/css#hc-glow);
}

.hero-circuit__content {
  position: relative;
  z-index: 2;
  /* Left-aligned copy that can run wider toward the circuit, without overlapping it */
  margin-left: clamp(1.25rem, 5vw, 4.5rem);
  /* Leave room for the circuit on the mid-right without covering chip labels */
  margin-right: clamp(40%, 44vw, 52%);
  max-width: none;
  width: auto;
  padding: clamp(7rem, 12vh, 9rem) 0 5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  min-height: 100%;
  will-change: opacity, transform;
}

.hero-circuit__brand {
  margin: 0 0 1.1rem;
  font-family: Rubik, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hc-gold);
  opacity: 0;
  transform: translateY(12px);
  animation: hc-rise 0.8s ease 0.15s forwards;
  max-width: 100%;
  flex-shrink: 0;
  /* Stay pinned — never shifts when slide height changes */
  position: relative;
  z-index: 3;
}

.hero-circuit__slides {
  position: relative;
  width: 100%;
  /* Height locked via JS to tallest slide so brand/dots don't jump */
  min-height: 16rem;
}

.hero-circuit__slide {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transform: none;
  transition: opacity 0.55s ease, visibility 0.55s ease;
  pointer-events: none;
  z-index: 0;
}

.hero-circuit__slide.is-active {
  position: absolute;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}

.hero-circuit__slide.is-fading-out {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 1;
}

.hero-circuit__slide[hidden] {
  display: block !important;
}

.hero-circuit__title {
  margin: 0 0 1.15rem;
  font-family: Nunito, sans-serif;
  font-weight: 800;
  font-size: clamp(2.15rem, 4.8vw, 3.65rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  max-width: 100%;
}

.hero-circuit__sub {
  margin: 0 0 1.75rem;
  max-width: 100%;
  font-family: Rubik, sans-serif;
  font-size: clamp(1rem, 1.35vw, 1.125rem);
  line-height: 1.65;
  font-weight: 400;
  color: var(--hc-muted);
}

.hero-circuit__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  align-items: center;
}

.hero-circuit .theme-btn {
  margin: 0;
}

/* Stronger contrast on luminous navy — pale yellow + mid brown was hard to read */
.hero-circuit .fill-btn2 {
  background-color: #f0c43c;
  border-color: #f0c43c;
  color: #1f1408;
  font-weight: 700;
  text-shadow: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.25);
}

.hero-circuit .fill-btn2:hover,
.hero-circuit .fill-btn2:focus {
  background-color: #ffd45a;
  border-color: #ffd45a;
  color: #1a1006;
}

.hero-circuit .bordered-btn2 {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
  background: transparent;
}

.hero-circuit .bordered-btn2:hover,
.hero-circuit .bordered-btn2:focus {
  border-color: var(--hc-gold);
  color: var(--hc-gold);
}

.hero-circuit__dots-nav {
  display: flex;
  gap: 0.55rem;
  margin-top: 1.75rem;
  opacity: 0;
  animation: hc-rise 0.8s ease 0.55s forwards;
}

.hero-circuit__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.hero-circuit__dot.is-active {
  background: var(--hc-gold);
  transform: scale(1.2);
  box-shadow: 0 0 12px rgba(255, 226, 122, 0.65);
}

.hero-circuit__scroll {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 1.35rem;
  transform: translateX(-50%);
  margin: 0;
  font-family: Rubik, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: rgba(232, 243, 255, 0.45);
  white-space: nowrap;
  animation: hc-scroll-hint 2.4s ease-in-out infinite;
  will-change: opacity;
}

@keyframes hc-dash {
  to { stroke-dashoffset: -180; }
}

@keyframes hc-pulse-run {
  0% { stroke-dashoffset: 100; opacity: 0.2; }
  12% { opacity: 1; }
  70% { opacity: 1; }
  100% { stroke-dashoffset: -100; opacity: 0.15; }
}

@keyframes hc-dot-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.85); }
  45%, 55% { opacity: 1; transform: scale(1.15); }
}

@keyframes hc-node-breathe {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes hc-chip-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes hc-rise {
  to { opacity: 1; transform: none; }
}

@keyframes hc-ambient {
  from { opacity: 0.7; transform: translate3d(0, 0, 0) scale(1); }
  to { opacity: 1; transform: translate3d(2%, 2%, 0) scale(1.04); }
}

@keyframes hc-scroll-hint {
  0%, 100% { opacity: 0.35; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.75; transform: translateX(-50%) translateY(4px); }
}

@media (max-width: 991px) {
  .hero-circuit {
    height: 125vh;
  }
  .hero-circuit__bg {
    transform-origin: 50% 40%;
  }
  .hero-circuit__svg {
    opacity: 0.55;
  }
  .hero-circuit__content {
    margin-left: auto;
    margin-right: auto;
    max-width: min(560px, 92vw);
    text-align: center;
    align-items: center;
    justify-content: center;
    padding: 6.5rem 1.25rem 5rem;
  }
  .hero-circuit__sub { margin-left: auto; margin-right: auto; }
  .hero-circuit__ctas { justify-content: center; }
  .hero-circuit__dots-nav { justify-content: center; }
  .hero-circuit__dots {
    mask-image: radial-gradient(ellipse 70% 50% at 50% 35%, #000 10%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 35%, #000 10%, transparent 70%);
  }
}

@media (max-width: 575px) {
  .hero-circuit {
    height: 122vh;
  }
  .hero-circuit__svg { opacity: 0.42; }
  .hero-circuit__title { font-size: clamp(1.85rem, 8vw, 2.35rem); }
  .hc-chip text { font-size: 12px; }
}


.hero-circuit__veil {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 30% 65%, rgba(6, 20, 40, 0.15), transparent 40%),
    linear-gradient(180deg, rgba(6, 20, 40, 0) 0%, rgba(6, 20, 40, 0.55) 42%, #061428 78%, #0b1f4d 100%);
  will-change: opacity;
}

/* Services section — normal flow (scroll hijack handled in JS, no sticky runway) */
#service {
  margin-top: -6vh;
  position: relative;
  z-index: 2;
  background: #061428;
}

#service .service-wrap--dark {
  background:
    radial-gradient(900px 520px at 70% 30%, rgba(31, 90, 188, 0.22), transparent 60%),
    linear-gradient(165deg, #061428 0%, #0b1f4d 48%, #071530 100%);
  color: #e8f3ff;
  padding-top: 3rem;
  padding-bottom: 2.5rem;
  margin-top: 0;
  filter: none !important;
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
}

#service .service-wrap--dark .service-caro {
  margin-top: 0 !important;
}

#service .service-wrap--dark .bg-waves {
  opacity: 0.2;
  filter: brightness(0.55) saturate(0.8);
}

#service .service-wrap--dark .service-box-wrap {
  margin-top: 36px;
  margin-bottom: 12px;
}

#service .service-wrap--dark .service-info > i {
  color: rgba(255, 226, 122, 0.85);
}

#service .service-wrap--dark .service-info > h3,
#service .service-wrap--dark .service-info > h3 a {
  color: #fff;
}

#service .service-wrap--dark .service-info > p {
  color: rgba(232, 243, 255, 0.78);
}

#service .service-wrap--dark .service-info > a,
#service .service-wrap--dark .service-btn {
  color: #ffe27a;
}

#service .service-wrap--dark .service-box-wrap:before {
  background-color: rgba(94, 179, 255, 0.35);
}

#service .service-wrap--dark .service-box > span i img.service-svg-icon {
  filter: brightness(1.15) drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
}

#service .service-wrap--dark .service-info > h3 + p:before {
  background-color: #ffe27a;
}

@media (max-width: 575px) {
  #service .service-wrap--dark .service-info {
    padding-left: 24px;
    padding-right: 24px;
    text-align: center;
  }
}

@media (min-width: 992px) {
  /* Collapse CMS <br> into a normal space (display:none glued words: "Deservesa") */
  .hero-circuit__title br,
  .hero-circuit__sub br {
    display: inline-block;
    width: 0.35em;
    height: 0;
    overflow: hidden;
    vertical-align: baseline;
    content: "";
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-circuit {
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
  }
  .hero-circuit__pin {
    position: relative;
  }
  .hero-circuit__veil {
    display: none;
  }
  .hero-circuit *,
  .hero-circuit *::before,
  .hero-circuit *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
