/* React Bits-inspired motion layer, adapted for the Maes static site. */

.effect-defs {
  position: fixed;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

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

/* GSAP owns the opening sequence; content remains visible if it never loads. */
.js .hero-entrance {
  opacity: 1;
  transform: none;
  animation: none;
}

.split-word,
.split-char {
  display: inline-block;
}

.gradient-text {
  color: transparent !important;
  background-image: linear-gradient(95deg, #f4c83d 0%, #fff3a8 30%, #f4c83d 57%, #ffffff 72%, #f4c83d 100%);
  background-position: 0% 50%;
  background-size: 240% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-count-up] {
  font-variant-numeric: tabular-nums;
}

.hero__rotator {
  display: flex;
  min-height: 2rem;
  margin: -0.6rem 0 1.7rem;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: #aebed0;
  font-family: var(--font-mono);
  font-size: 0.69rem;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
}

.hero__rotator strong {
  display: inline-block;
  min-width: 10.5rem;
  padding: 0.32rem 0.55rem;
  overflow: hidden;
  color: var(--signal);
  border: 1px solid rgba(244, 200, 61, 0.3);
  border-radius: var(--radius-sm);
  background: rgba(244, 200, 61, 0.06);
  transform-origin: 50% 100%;
}

.hero__cursor-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0.68;
  pointer-events: none;
}

.gradual-blur {
  position: absolute;
  right: 0;
  bottom: -2rem;
  left: 0;
  z-index: 7;
  height: 7rem;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent, #000 82%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 82%);
}

.gradual-blur span {
  position: absolute;
  inset: 0;
}

.gradual-blur span:nth-child(1) {
  backdrop-filter: blur(1px);
  clip-path: inset(0 0 72% 0);
}

.gradual-blur span:nth-child(2) {
  backdrop-filter: blur(2px);
  clip-path: inset(25% 0 52% 0);
}

.gradual-blur span:nth-child(3) {
  backdrop-filter: blur(4px);
  clip-path: inset(46% 0 33% 0);
}

.gradual-blur span:nth-child(4) {
  backdrop-filter: blur(8px);
  clip-path: inset(64% 0 15% 0);
}

.gradual-blur span:nth-child(5) {
  backdrop-filter: blur(12px);
  clip-path: inset(80% 0 0 0);
}

/* Gooey navigation */
.gooey-nav {
  position: relative;
  isolation: isolate;
}

.gooey-nav a {
  z-index: 2;
  padding: 0.55rem 0.58rem 0.72rem;
}

.gooey-nav a[aria-current="page"]::after {
  display: none;
}

.gooey-nav__indicator {
  position: absolute;
  top: auto;
  bottom: 0.34rem;
  left: 0;
  z-index: 1;
  width: 3rem;
  height: 0.22rem;
  border-radius: 1px;
  opacity: 1;
  background: var(--signal);
  box-shadow: 0 0 0 1px rgba(244, 200, 61, 0.12), 0 0.25rem 0.9rem rgba(244, 200, 61, 0.28);
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  transform-origin: center;
}

.gooey-nav__indicator::before,
.gooey-nav__indicator::after {
  display: none;
}

.gooey-nav__indicator::before {
  left: -0.18rem;
}

.gooey-nav__indicator::after {
  right: -0.18rem;
}

.gooey-nav a[data-gooey-active] {
  color: var(--white);
}

/* Proximity controls */
.magnet-shell {
  position: relative;
  display: inline-flex;
  width: fit-content;
}

.star-border {
  padding: 1px;
  overflow: hidden;
  border-radius: calc(var(--radius-sm) + 1px);
  background: rgba(244, 200, 61, 0.25);
  isolation: isolate;
}

.star-border__beam {
  position: absolute;
  inset: -170%;
  z-index: 0;
  opacity: 0.8;
  background: conic-gradient(
    from 0deg,
    transparent 0 38%,
    rgba(255, 255, 255, 0.95) 43%,
    var(--signal) 47%,
    transparent 53% 88%,
    rgba(255, 255, 255, 0.75) 92%,
    transparent 97%
  );
  pointer-events: none;
  will-change: transform;
}

.star-border .button {
  z-index: 1;
}

/* Laser flow canvases */
.laser-flow {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0.5;
  mix-blend-mode: screen;
  pointer-events: none;
}

.laser-flow--flagship {
  opacity: 0.42;
  mask-image: linear-gradient(90deg, transparent 15%, #000 52%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 15%, #000 52%, #000 100%);
}

.laser-flow--cta {
  opacity: 0.3;
  mask-image: linear-gradient(90deg, transparent, #000 62%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 62%);
}

.flagship__content,
.final-cta__inner {
  z-index: 3;
}

/* Magic ring backgrounds */
.magic-rings {
  position: absolute;
  z-index: 1;
  width: min(42rem, 58vw);
  aspect-ratio: 1;
  pointer-events: none;
}

.magic-rings span {
  position: absolute;
  inset: 24%;
  border: 1px solid rgba(244, 200, 61, 0.24);
  border-radius: 50%;
  opacity: 0;
  box-shadow:
    0 0 1.2rem rgba(244, 200, 61, 0.08),
    inset 0 0 1.2rem rgba(18, 102, 195, 0.08);
  transform: scale(0.7);
  will-change: transform, opacity;
}

.magic-rings--compliance {
  top: 50%;
  right: -10rem;
  transform: translateY(-50%) rotate(-12deg);
}

.magic-rings--cta {
  top: 50%;
  right: -8rem;
  transform: translateY(-50%) rotate(16deg);
}

.scroll-velocity {
  position: relative;
  z-index: 3;
  width: 100%;
  padding-block: 0.7rem;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(2, 12, 29, 0.22);
}

.scroll-velocity__track {
  display: flex;
  width: max-content;
  color: rgba(222, 235, 249, 0.7);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  will-change: transform;
}

.scroll-velocity__track span {
  display: block;
}

/* Product carousel, glare, and progress */
.product-card {
  isolation: isolate;
}

.product-card__media {
  isolation: isolate;
}

.glare-layer {
  position: absolute;
  inset: -45%;
  z-index: 3;
  opacity: 0;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(255, 255, 255, 0.12) 43%,
    rgba(255, 233, 165, 0.42) 49%,
    rgba(255, 255, 255, 0.12) 55%,
    transparent 63%
  );
  mix-blend-mode: screen;
  pointer-events: none;
  transform: translate3d(-75%, 0, 0);
}

.carousel-progress {
  position: relative;
  width: min(20rem, 58vw);
  height: 2px;
  margin-top: 1rem;
  overflow: hidden;
  background: rgba(11, 78, 162, 0.14);
  transform-origin: left;
}

.carousel-progress span {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--cobalt), var(--signal));
  transform: scaleX(0);
  transform-origin: left;
}

/* Magic Bento */
.magic-bento {
  position: relative;
  isolation: isolate;
}

.magic-bento article {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.magic-bento article > *:not(.bento-spotlight) {
  position: relative;
  z-index: 2;
}

.bento-spotlight {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 15rem;
  height: 15rem;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle, rgba(244, 200, 61, 0.2), rgba(18, 102, 195, 0.08) 42%, transparent 70%);
  pointer-events: none;
  transform: translate3d(-50%, -50%, 0);
}

/* Reflective resource cards */
[data-reflective-card] {
  position: relative;
  transform-style: preserve-3d;
  transform-origin: center;
}

.reflective-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0;
  border-radius: inherit;
  background:
    linear-gradient(115deg, transparent 22%, rgba(255, 255, 255, 0.4) 45%, transparent 62%),
    radial-gradient(circle at 50% 50%, rgba(244, 200, 61, 0.18), transparent 50%);
  mix-blend-mode: screen;
  pointer-events: none;
  transform: translate3d(-55%, -40%, 1px);
}

.border-glow {
  isolation: isolate;
}

.border-glow__spot {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  width: 10rem;
  height: 10rem;
  border: 1px solid rgba(244, 200, 61, 0.78);
  border-radius: 50%;
  opacity: 0;
  box-shadow:
    0 0 1.25rem rgba(244, 200, 61, 0.28),
    inset 0 0 1.25rem rgba(18, 102, 195, 0.14);
  pointer-events: none;
  transform: translate3d(-50%, -50%, 0);
}

/* Glass social icons */
.social-links {
  gap: 0.8rem;
  padding-bottom: 1.5rem;
  overflow: visible;
}

.social-links .glass-icon {
  position: relative;
  width: 2.45rem;
  height: 2.45rem;
  overflow: visible;
  border: 0;
  border-radius: 0;
  perspective: 18rem;
  transform-style: preserve-3d;
  -webkit-tap-highlight-color: transparent;
}

.glass-icon__back,
.glass-icon__front,
.glass-icon__label {
  transition:
    opacity 200ms ease,
    transform 220ms var(--ease-out);
}

.glass-icon__back,
.glass-icon__front {
  position: absolute;
  inset: 0;
  border-radius: 0.65rem;
}

.glass-icon__back {
  background: linear-gradient(135deg, rgba(18, 102, 195, 0.85), rgba(244, 200, 61, 0.58));
  box-shadow: 0.35rem -0.35rem 0.8rem rgba(0, 0, 0, 0.2);
  transform: rotate(12deg);
  transform-origin: 100% 100%;
}

.glass-icon__front {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(0.65rem);
  -webkit-backdrop-filter: blur(0.65rem);
  transform-origin: 80% 50%;
}

.glass-icon svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: #f1f5fa;
}

.glass-icon__label {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 50%;
  opacity: 0;
  color: #c6d2df;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  white-space: nowrap;
  transform: translate3d(-50%, -0.25rem, 0);
}

@media (hover: hover) and (pointer: fine) {
  .gooey-nav a:hover,
  .gooey-nav a:focus-visible {
    color: var(--white);
  }

  .article-grid > a[data-reflective-card]:hover {
    transform: none;
  }

  .glass-icon:hover .glass-icon__back,
  .glass-icon:focus-visible .glass-icon__back {
    transform: rotate(23deg) translate3d(-0.3rem, -0.3rem, 0.3rem);
  }

  .glass-icon:hover .glass-icon__front,
  .glass-icon:focus-visible .glass-icon__front {
    transform: translate3d(0, 0, 1.15rem);
  }

  .glass-icon:hover .glass-icon__label,
  .glass-icon:focus-visible .glass-icon__label {
    opacity: 1;
    transform: translate3d(-50%, 0, 0);
  }
}

@media (max-width: 959px) {
  .gooey-nav__indicator,
  .hero__cursor-grid {
    display: none;
  }

  .magic-rings {
    width: 32rem;
    opacity: 0.7;
  }

  .laser-flow--flagship {
    mask-image: linear-gradient(90deg, transparent 35%, #000 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000 100%);
  }
}

@media (max-width: 700px) {
  .hero__rotator {
    margin-top: -0.35rem;
    margin-bottom: 1.35rem;
    font-size: 0.61rem;
  }

  .hero__rotator strong {
    min-width: 9.25rem;
  }

  .gradual-blur {
    height: 4.5rem;
  }

  .laser-flow {
    opacity: 0.22;
  }

  .magic-rings {
    right: -14rem;
    width: 28rem;
    opacity: 0.5;
  }

  .scroll-velocity__track {
    font-size: 0.57rem;
  }

  .carousel-progress {
    width: 100%;
  }

  .social-links {
    gap: 1rem;
  }

  .social-links .glass-icon {
    width: 2.75rem;
    height: 2.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__cursor-grid,
  .laser-flow,
  .gradual-blur {
    display: none;
  }

  .gradient-text {
    background-position: 0 50% !important;
  }

  .split-word,
  .split-char,
  [data-scroll-float],
  [data-reflective-card],
  .magnet-shell,
  .scroll-velocity__track,
  .star-border__beam {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }

  .magic-rings span {
    opacity: 0.2 !important;
    transform: scale(1) !important;
  }

  .glare-layer,
  .reflective-layer,
  .bento-spotlight,
  .border-glow__spot {
    display: none;
  }

  .glass-icon__back,
  .glass-icon__front,
  .glass-icon__label {
    transition: none;
  }
}

/* ============================================================================
   Scroll-to-top control. Present on every page, revealed once the hero has
   scrolled past. Opaque navy fill with a signal-yellow ring so it reads on both
   the dark hero/CTA sections and the light interior sections — it never relies
   on what happens to be behind it.
   ========================================================================= */

.scroll-top {
  position: fixed;
  right: clamp(1rem, 2.5vw, 2rem);
  bottom: clamp(1rem, 2.5vw, 2rem);
  z-index: 60;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1px solid rgba(244, 200, 61, 0.55);
  border-radius: 50%;
  background: #0a2242;
  box-shadow: 0 0.6rem 1.6rem rgba(3, 13, 32, 0.42);
  color: #ffffff;
  cursor: pointer;
  opacity: 0;
  transform: translateY(0.75rem) scale(0.92);
  transition: opacity 0.24s ease, transform 0.24s ease, background-color 0.2s ease, border-color 0.2s ease;
  visibility: hidden;
  pointer-events: none;
}

.scroll-top svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scroll-top.is-visible {
  opacity: 1;
  transform: none;
  visibility: visible;
  pointer-events: auto;
}

.scroll-top:hover,
.scroll-top:focus-visible {
  border-color: var(--signal, #f4c83d);
  background: var(--signal, #f4c83d);
  color: #0a2242;
}

.scroll-top:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-top {
    transform: none;
    transition: opacity 0.01ms linear, visibility 0.01ms linear;
  }
}
