/* 3D niche landing pages */

.niche-hero {
  position: relative;
  min-height: min(92vh, 920px);
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 2rem;
  align-items: center;
  padding: 6.5rem 0 4rem;
  overflow: hidden;
}

.niche-hero-canvas-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#niche-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.niche-hero-glow {
  position: absolute;
  width: 55vw;
  height: 55vw;
  max-width: 640px;
  max-height: 640px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  right: -10%;
  top: 10%;
  z-index: 0;
  pointer-events: none;
}

.niche-hero .container {
  position: relative;
  z-index: 2;
  display: contents;
}

.niche-hero-content {
  position: relative;
  z-index: 2;
  padding-left: max(4vw, 1.25rem);
  max-width: 620px;
}

.niche-hero-content .eyebrow {
  margin-bottom: 1.25rem;
}

.niche-hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.15rem);
  line-height: 1.08;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.niche-hero-content h1 span {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.niche-hero-sub {
  color: var(--text-dim);
  font-size: 1.08rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 52ch;
}

.niche-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.niche-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.niche-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
}

.niche-badge.gold {
  color: var(--navy);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border-color: transparent;
}

/* 3D device mock */
.niche-device-stage {
  position: relative;
  z-index: 2;
  padding-right: max(4vw, 1.25rem);
  perspective: 1200px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 420px;
}

.niche-device {
  width: min(100%, 440px);
  transform: rotateY(-14deg) rotateX(6deg);
  transform-style: preserve-3d;
  transition: transform 0.4s ease;
  filter: drop-shadow(0 40px 80px rgba(0, 0, 0, 0.55));
}

.niche-device:hover {
  transform: rotateY(-8deg) rotateX(3deg) translateY(-6px);
}

.niche-device-shell {
  background: linear-gradient(145deg, #1a2740 0%, #0d1524 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(0, 0, 0, 0.4);
}

.niche-device-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.65rem 1rem;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.niche-device-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.niche-device-dot:nth-child(1) { background: #fb7185; }
.niche-device-dot:nth-child(2) { background: #fbbf24; }
.niche-device-dot:nth-child(3) { background: #34d399; }

.niche-device-url {
  margin-left: auto;
  font-size: 0.68rem;
  color: var(--text-dim);
  font-family: ui-monospace, monospace;
}

.niche-device-screen {
  padding: 1.5rem 1.35rem 1.75rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04) 0%, transparent 60%);
  min-height: 260px;
}

.niche-device-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--navy);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  margin-bottom: 0.85rem;
}

.niche-device-headline {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.65rem;
  color: var(--text);
}

.niche-device-sub {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.niche-device-cta {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  margin-bottom: 1.25rem;
}

.niche-device-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.niche-device-metric {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.75rem;
  text-align: center;
}

.niche-device-metric strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--gold-light);
}

.niche-device-metric span {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.niche-device-float {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: rgba(15, 28, 46, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-soft);
  animation: niche-float 5s ease-in-out infinite;
}

.niche-device-float.a { top: 8%; right: 6%; animation-delay: 0s; }
.niche-device-float.b { bottom: 18%; left: 2%; animation-delay: 1.2s; }

@keyframes niche-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}

.niche-proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.niche-proof-item {
  text-align: center;
}

.niche-proof-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold-light);
}

.niche-proof-item span {
  font-size: 0.78rem;
  color: var(--text-dim);
}

@media (max-width: 960px) {
  .niche-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 5.5rem;
    gap: 2.5rem;
  }

  .niche-hero-content {
    padding: 0 max(4vw, 1.25rem);
    max-width: none;
    text-align: center;
  }

  .niche-hero-sub { margin-inline: auto; }
  .niche-hero-actions,
  .niche-hero-badges { justify-content: center; }

  .niche-device-stage {
    padding: 0 max(4vw, 1.25rem) 2rem;
    min-height: 360px;
  }

  .niche-device {
    transform: rotateY(0) rotateX(4deg);
  }

  .niche-hero-glow {
    right: 50%;
    transform: translateX(50%);
    top: 30%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .niche-device,
  .niche-device-float { animation: none; transition: none; }
}