/* Home only: layout and motion (other pages do not load this file) */
.home-hero-copy .btn-primary {
  background: #0ea5e9;
  color: #fff !important;
}

.home-stage {
  position: relative;
  overflow: hidden;
}

.home-stage::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(ellipse 80% 50% at 20% 40%, rgba(14, 165, 233, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(99, 102, 241, 0.1), transparent 50%);
  animation: homeAura 18s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes homeAura {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.85;
  }
  100% {
    transform: translate(-2%, 1%) rotate(2deg);
    opacity: 1;
  }
}

.home-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0;
  min-height: min(78vh, 640px);
}

@media (max-width: 1100px) {
  .home-hero-grid {
    grid-template-columns: 1fr;
  }
}

.home-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.5rem 6vw 4rem max(24px, calc((100% - 1280px) / 2 + 24px));
  background: linear-gradient(165deg, rgba(12, 18, 34, 0.97) 0%, rgba(15, 23, 42, 0.92) 100%);
  color: #e2e8f0;
}

.home-hero-copy h1 {
  font-size: clamp(2rem, 3.6vw, 2.85rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  max-width: 16ch;
}

.home-hero-copy .lead {
  font-size: 1.1rem;
  line-height: 1.65;
  color: rgba(226, 232, 240, 0.92);
  max-width: 38rem;
  margin-bottom: 2rem;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.home-hero-note {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: rgba(226, 232, 240, 0.85);
  max-width: 38rem;
}

.home-hero-note a:hover {
  color: #7dd3fc;
}

.home-hero-visual {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  isolation: isolate;
}

.home-hero-visual .orbit {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  animation: homeKen 22s ease-in-out infinite alternate;
}

/* Motion stack over hero image; rotated via data-hero-mode */
.hero-fx-stack {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-fx {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.35s ease;
}

.home-stage[data-hero-mode="mesh"] .hero-fx--mesh,
.home-stage[data-hero-mode="scan"] .hero-fx--scan,
.home-stage[data-hero-mode="rings"] .hero-fx--rings {
  opacity: 1;
}

.home-stage:not([data-hero-mode="mesh"]) .hero-fx--mesh *,
.home-stage:not([data-hero-mode="scan"]) .hero-fx--scan *,
.home-stage:not([data-hero-mode="rings"]) .hero-fx--rings * {
  animation-play-state: paused;
}

.hero-fx--mesh {
  display: block;
}

.hero-fx__grid {
  position: absolute;
  inset: -2%;
  background-image: linear-gradient(rgba(125, 211, 252, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.09) 1px, transparent 1px);
  background-size: 44px 44px;
  animation: heroGridDrift 26s linear infinite;
  mask-image: radial-gradient(ellipse 78% 72% at 52% 46%, #000 0%, transparent 70%);
}

@keyframes heroGridDrift {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 44px 22px, 22px 44px;
  }
}

.hero-fx__nodes {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 18% 28%, rgba(14, 165, 233, 0.45) 0 2px, transparent 3px),
    radial-gradient(circle at 72% 22%, rgba(99, 102, 241, 0.5) 0 2px, transparent 3px),
    radial-gradient(circle at 48% 58%, rgba(56, 189, 248, 0.35) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 88% 62%, rgba(165, 180, 252, 0.4) 0 2px, transparent 3px),
    radial-gradient(circle at 32% 78%, rgba(14, 165, 233, 0.3) 0 1.5px, transparent 2.5px);
  animation: heroNodesShimmer 6.5s ease-in-out infinite;
  mask-image: radial-gradient(ellipse 85% 80% at 50% 48%, #000 0%, transparent 75%);
}

@keyframes heroNodesShimmer {
  0%,
  100% {
    opacity: 0.55;
    transform: translate(0, 0);
  }
  50% {
    opacity: 1;
    transform: translate(-1.2%, 0.8%);
  }
}

.hero-fx--scan .hero-fx__beam {
  position: absolute;
  top: -8%;
  bottom: -8%;
  width: 32%;
  left: -35%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(56, 189, 248, 0.14) 42%,
    rgba(255, 255, 255, 0.1) 52%,
    rgba(99, 102, 241, 0.12) 62%,
    transparent 100%
  );
  transform: skewX(-11deg);
  filter: blur(0.5px);
  animation: heroScanSweep 5.2s ease-in-out infinite;
}

.hero-fx--scan .hero-fx__beam--2 {
  width: 22%;
  animation-duration: 6.4s;
  animation-delay: 2.6s;
  opacity: 0.85;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(129, 140, 248, 0.12) 45%,
    rgba(14, 165, 233, 0.1) 55%,
    transparent 100%
  );
}

@keyframes heroScanSweep {
  0% {
    transform: skewX(-11deg) translateX(0);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  88% {
    opacity: 1;
  }
  100% {
    transform: skewX(-11deg) translateX(380%);
    opacity: 0;
  }
}

.hero-fx--rings .hero-fx__ring {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(42vw, 320px);
  aspect-ratio: 1;
  border: 1px solid rgba(125, 211, 252, 0.42);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.38);
  animation: heroRingExpand 5.5s ease-out infinite;
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.15) inset;
}

.hero-fx--rings .hero-fx__ring--2 {
  animation-delay: 1.1s;
  border-color: rgba(165, 180, 252, 0.35);
}

.hero-fx--rings .hero-fx__ring--3 {
  animation-delay: 2.2s;
  border-color: rgba(56, 189, 248, 0.28);
}

@keyframes heroRingExpand {
  0% {
    transform: translate(-50%, -50%) scale(0.32);
    opacity: 0.85;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.45);
    opacity: 0;
  }
}

@keyframes homeKen {
  0% {
    transform: scale(1.05) translate(0, 0);
  }
  100% {
    transform: scale(1.14) translate(-2%, -1.5%);
  }
}

.home-hero-visual .veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(200deg, rgba(12, 18, 34, 0.15) 0%, rgba(12, 18, 34, 0.55) 100%);
  pointer-events: none;
}

.home-hero-visual .float-card {
  position: absolute;
  bottom: 12%;
  left: 8%;
  right: 8%;
  z-index: 3;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  color: #f8fafc;
  font-size: 0.875rem;
  line-height: 1.5;
  animation: homeFloat 6s ease-in-out infinite;
}

@keyframes homeFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.home-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(148, 163, 184, 0.25);
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

@media (max-width: 1100px) {
  .home-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

.home-metrics article {
  background: #0f172a;
  padding: 1.35rem 1.5rem;
  color: #94a3b8;
  font-size: 0.8rem;
}

.home-metrics strong {
  display: block;
  font-size: 1.35rem;
  color: #7dd3fc;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.home-bento {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 24px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
}

.home-bento .tile {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #fff;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.home-bento .tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.1);
}

.home-bento .tile--lg {
  grid-column: span 7;
  min-height: 280px;
}

.home-bento .tile--sm {
  grid-column: span 5;
  min-height: 280px;
}

.home-bento .tile--wide {
  grid-column: span 12;
}

.home-bento .tile-img {
  height: 160px;
  background-size: cover;
  background-position: center;
}

.home-bento .tile-body {
  padding: 1.35rem 1.5rem 1.5rem;
}

.home-bento h3 {
  font-size: 1.15rem;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.home-bento p {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.65;
}

.home-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.home-reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

.home-strip {
  background: linear-gradient(110deg, #0ea5e9 0%, #38bdf8 35%, #6366f1 70%, #818cf8 100%);
  background-size: 220% 100%;
  animation: homeStripFlow 14s ease-in-out infinite;
  color: #fff;
  text-align: center;
  padding: 2.25rem 24px;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: 600;
  letter-spacing: 0.02em;
}

@keyframes homeStripFlow {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-stage::before,
  .home-hero-visual .orbit,
  .home-hero-visual .float-card,
  .home-strip {
    animation: none !important;
  }

  .home-strip {
    background-size: 100% 100%;
  }

  .hero-fx--mesh *,
  .hero-fx--scan *,
  .hero-fx--rings * {
    animation: none !important;
  }

  .hero-fx--scan,
  .hero-fx--rings {
    opacity: 0 !important;
  }

  .hero-fx--mesh {
    opacity: 0.55 !important;
  }

  .hero-fx__grid {
    background-position: 12px 8px, 8px 12px;
  }
}

.home-cards-6 {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 4rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1100px) {
  .home-cards-6 {
    grid-template-columns: 1fr;
  }
}

.home-cards-6 a {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: inherit;
  transition: box-shadow 0.3s, transform 0.3s;
}

.home-cards-6 a:hover {
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  transform: translateY(-3px);
}

.home-cards-6 .thumb {
  height: 140px;
  background-size: cover;
  background-position: center;
}

.home-cards-6 .meta {
  padding: 1.1rem 1.25rem 1.35rem;
}

.home-cards-6 h4 {
  font-size: 1rem;
  color: #0f172a;
  margin-bottom: 0.4rem;
}

.home .btn-nx-outline {
  display: inline-block;
  padding: 0.65rem 1.35rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-weight: 600;
  color: #334155;
}
.home .btn-nx-outline:hover {
  border-color: #0ea5e9;
  color: #0284c7;
}

/* Home: service overview pillars */
.home-svc-overview .section-head h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  color: #0f172a;
  margin-bottom: 0.65rem;
}

.home-svc-overview .section-head p {
  color: #64748b;
  font-size: 1rem;
  line-height: 1.65;
  max-width: 52rem;
}

.home-svc-pillars {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1100px) {
  .home-svc-pillars {
    grid-template-columns: 1fr;
  }
}

.home-svc-pillar {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.45rem 1.35rem 1.35rem;
  background: #f8fafc;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.home-svc-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0284c7;
  margin-bottom: 0.5rem;
}

.home-svc-pillar h3 {
  font-size: 1.08rem;
  color: #0f172a;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.home-svc-desc {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 0.25rem;
}

.home-svc-links {
  list-style: none;
  margin-top: 1rem;
  padding: 0;
}

.home-svc-links li {
  margin-bottom: 0.4rem;
}

.home-svc-links a {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0ea5e9;
}

.home-svc-links a:hover {
  color: #0369a1;
}

.home-svc-row2 {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 0.25rem;
}

.home-svc-more {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.35rem 1.5rem;
  background: #fff;
}

.home-svc-more-title {
  font-size: 1rem;
  color: #0f172a;
  margin-bottom: 0.4rem;
}

.home-svc-more > p {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 0.85rem;
  line-height: 1.55;
}

.home-svc-inline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.home-svc-inline a {
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
}

.home-svc-inline a:hover {
  color: #0284c7;
}
