/* Hero WebGL + operator CONFIG — Deploy Engine v3.0 */
.hero-stage {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 560px;
  overflow: hidden;
  background: var(--brand-bg);
  color: #fff;
}

.hero-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(11, 46, 43, 0.72) 0%, rgba(11, 46, 43, 0.28) 42%, transparent 62%),
    linear-gradient(180deg, rgba(11, 46, 43, 0.35) 0%, transparent 28%, transparent 70%, rgba(11, 46, 43, 0.45) 100%);
}

#canvas-container {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-fallback {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--brand-bg);
}

.hero-fallback.is-visible {
  display: flex;
}

.hero-fallback__orb {
  width: min(70vw, 360px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(228, 184, 74, 0.45), transparent 45%),
    radial-gradient(circle at 60% 60%, rgba(255, 255, 255, 0.08), transparent 50%),
    radial-gradient(circle, #134843 0%, #0b2e2b 70%);
  border: 1px solid rgba(228, 184, 74, 0.25);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

#tracker-blob {
  position: absolute;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(228, 184, 74, 0.16) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
  transition: opacity 0.3s ease;
  opacity: 0.85;
}

#tracker-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.svg-line {
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.svg-line.active {
  stroke: rgba(228, 184, 74, 0.65);
  stroke-dasharray: 4 2;
  animation: dash 20s linear infinite;
}

@keyframes dash {
  to { stroke-dashoffset: -100; }
}

#trackers-container {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.point-marker {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 10;
}

.point-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2px rgba(11, 46, 43, 0.85);
}

.point-label {
  position: absolute;
  top: 8px;
  left: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: rgba(11, 46, 43, 0.88);
  padding: 2px 5px;
  border-radius: 2px;
  border: 1px solid rgba(228, 184, 74, 0.35);
  white-space: nowrap;
  backdrop-filter: blur(6px);
}

.point-corner {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(228, 184, 74, 0.55);
  opacity: 0.7;
  transform: translate(-50%, -50%);
}

.pc-tl { border-width: 1px 0 0 1px; top: -3px; left: -3px; }
.pc-br { border-width: 0 1px 1px 0; bottom: -3px; right: -3px; }

.hero-main {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.hero-brand-stamp {
  position: absolute;
  top: calc(var(--nav-h) + 0.75rem);
  left: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent);
  animation: fade-in 0.7s var(--ease) forwards;
  opacity: 0;
  animation-delay: 0.08s;
}

@media (min-width: 768px) {
  .hero-brand-stamp { left: 2.5rem; }
}

.hero-title {
  position: absolute;
  left: 1.5rem;
  top: 36%;
  max-width: min(92vw, 34rem);
  z-index: 30;
  animation: fade-in 0.75s var(--ease) forwards;
  opacity: 0;
  animation-delay: 0.16s;
}

@media (min-width: 768px) {
  .hero-title { left: 2.5rem; top: 38%; }
}

.hero-title h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 9vw, 5.25rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.92;
  color: #fff;
  margin: 0;
}

.hero-sub {
  margin-top: 1rem;
  max-width: 34ch;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
  line-height: 1.5;
  font-family: var(--font-sans);
}

.hero-cta-row {
  position: absolute;
  left: 1.5rem;
  bottom: calc(var(--bottom-nav-h) + 1.25rem);
  display: flex;
  flex-wrap: nowrap;
  gap: 0.55rem;
  pointer-events: auto;
  z-index: 40;
  animation: fade-in 0.75s var(--ease) forwards;
  opacity: 0;
  animation-delay: 0.28s;
}

@media (min-width: 900px) {
  .hero-cta-row {
    left: 2.5rem;
    bottom: 2rem;
  }
}

@keyframes fade-in {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Operator CONFIG panel — glass teal (matches hero, not white card) */
.config-panel {
  position: absolute;
  bottom: calc(var(--bottom-nav-h) + 0.75rem);
  right: 1rem;
  width: min(calc(100vw - 2rem), 268px);
  pointer-events: auto;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
  color: rgba(232, 242, 239, 0.92);
  background:
    linear-gradient(165deg, rgba(19, 72, 67, 0.72) 0%, rgba(11, 46, 43, 0.88) 55%, rgba(7, 28, 26, 0.92) 100%);
  border: 1px solid rgba(228, 184, 74, 0.28);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 32px rgba(228, 184, 74, 0.08);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  animation: fade-in 0.75s var(--ease) forwards;
  opacity: 0;
  animation-delay: 0.36s;
  z-index: 40;
  max-height: min(48dvh, 400px);
}

@media (min-width: 900px) {
  .config-panel {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 260px;
    max-height: 58vh;
  }
}

.config-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid rgba(228, 184, 74, 0.18);
  cursor: pointer;
  user-select: none;
  background: rgba(0, 0, 0, 0.22);
  border-radius: var(--radius) var(--radius) 0 0;
}

.config-panel.is-collapsed .config-panel__head {
  border-bottom: none;
  border-radius: var(--radius);
}

.config-panel__head-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.config-panel__head-left svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.config-panel__title {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.config-synced {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.config-synced .dot {
  width: 6px;
  height: 6px;
  background: #3dca8e;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(61, 202, 142, 0.65);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.config-synced span {
  font-size: 9px;
  font-weight: 500;
  color: rgba(232, 242, 239, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.config-panel__body {
  padding: 0.85rem;
  display: grid;
  gap: 0.85rem;
  overflow-y: auto;
}

.config-panel.is-collapsed .config-panel__body {
  display: none;
}

.config-row {
  display: grid;
  gap: 0.35rem;
}

.config-row__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.config-row label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(232, 242, 239, 0.58);
}

.config-row .val {
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-weight: 500;
  min-width: 2.2ch;
  text-align: right;
  transition: color 0.15s, background 0.15s;
}

.config-row .val.is-tick {
  color: #0b2e2b;
  background: var(--accent);
  border-radius: 2px;
  padding: 0 3px;
}

.config-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.config-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(228, 184, 74, 0.35), transparent);
}

.config-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.config-section-label svg {
  width: 12px;
  height: 12px;
  color: var(--accent);
}

.color-picker-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(228, 184, 74, 0.22);
}

.color-wrapper {
  position: relative;
  overflow: hidden;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(228, 184, 74, 0.45);
}

input[type="color"] {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  padding: 0;
  border: none;
  cursor: pointer;
}

.config-panel input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: transparent;
  height: 18px;
}

.config-panel input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 12px;
  width: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 10px rgba(228, 184, 74, 0.45);
  cursor: pointer;
  margin-top: -5.5px;
}

.config-panel input[type="range"]::-webkit-slider-thumb:hover {
  border-color: #fff;
  background: #f0d078;
}

.config-panel input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 1px;
  cursor: pointer;
  background: rgba(232, 242, 239, 0.28);
  border-radius: 1px;
}

.config-panel input[type="range"]:focus {
  outline: none;
}

.config-panel input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(228, 184, 74, 0.35);
}

.config-panel input[type="range"]::-moz-range-thumb {
  height: 12px;
  width: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 10px rgba(228, 184, 74, 0.45);
  cursor: pointer;
}

.config-panel input[type="range"]::-moz-range-track {
  width: 100%;
  height: 1px;
  cursor: pointer;
  background: rgba(232, 242, 239, 0.28);
  border-radius: 1px;
}

@media (max-width: 899px) {
  .hero-title {
    top: 28%;
    max-width: calc(100vw - 2rem);
  }
  .hero-title h1 {
    font-size: clamp(2.35rem, 11vw, 3.25rem);
  }
  .hero-sub {
    font-size: 0.92rem;
    max-width: 28ch;
  }

  /* CTAs side-by-side, full width under CONFIG */
  .hero-cta-row {
    left: 1rem;
    right: 1rem;
    bottom: calc(var(--bottom-nav-h) + 0.75rem);
    max-width: none;
    width: auto;
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .hero-cta-row .btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 40px;
    height: 40px;
    padding: 0 0.65rem;
    font-size: 0.78rem;
    border-radius: 8px;
  }

  /* CONFIG sits above CTAs so it never covers them */
  .config-panel {
    bottom: calc(var(--bottom-nav-h) + 3.65rem);
    right: 1rem;
    left: auto;
    width: auto;
    min-width: 9.5rem;
    max-width: calc(100vw - 2rem);
  }

  .config-panel.is-collapsed {
    width: auto;
  }

  .config-panel__head {
    padding: 0.55rem 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .svg-line.active { animation: none; }
  .config-synced .dot { animation: none; }
}
