:root {
  --navy: #0d1b2e;
  --ink: #102033;
  --paper: #f3efe8;
  --lime: #80f349;
  --cyan: #22d3ee;
  --magenta: #ff3d9a;
  --violet: #8b5cff;
  --teal: #15c2b0;
  --orange: #ff7a3d;
  --mist: #f4f8f0;
  --glass: rgba(12, 20, 32, 0.42);
  --line: rgba(244, 248, 240, 0.28);
  --muted: rgba(244, 248, 240, 0.72);
  --dark-ink: #122033;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 92px; }
body {
  font-family: Geist, system-ui, sans-serif;
  background: #071018;
  color: var(--mist);
  overflow-x: hidden;
  cursor: none;
}
body.is-touch { cursor: auto; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; }
button { font: inherit; }

#gl, #fallback {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
#fallback { object-fit: cover; display: none; }
html.no-webgl #fallback { display: block; }
html.no-webgl #gl { display: none; }

.page { position: relative; z-index: 1; }

/* Magnetic cursor */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 80;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--lime);
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid rgba(244, 248, 240, 0.7);
  transition: width 0.25s, height 0.25s, border-color 0.25s;
}
.cursor-ring.on {
  width: 64px; height: 64px;
  border-color: var(--lime);
}
body.is-touch .cursor-dot,
body.is-touch .cursor-ring { display: none; }

header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  pointer-events: none;
  background: rgba(7, 16, 24, 0.66);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
header a, header nav { pointer-events: auto; }
.logo {
  display: flex;
  align-items: center;
  height: 40px;
}
.logo img { height: 40px; width: auto; display: block; }
.footer-logo { display: block; margin: 0 0 10px; width: max-content; }
.footer-logo img { height: 36px; width: auto; display: block; }
footer > div:first-child { display: flex; flex-direction: column; align-items: flex-start; }
nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
nav a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
  padding: 8px 10px;
  opacity: 0.82;
}
nav a:hover, nav a.is-on { opacity: 1; color: var(--lime); }

.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 120px 48px 88px;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7,16,24,0.46) 0%, rgba(7,16,24,0.16) 38%, transparent 62%);
  pointer-events: none;
}
.hero h1, .hero .rule, .hero .sub, .hero .scroll-cue { position: relative; }
.hero h1 {
  margin: 0;
  font-weight: 100;
  font-size: clamp(52px, 9.4vw, 132px);
  line-height: 0.86;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  text-shadow: 0 2px 20px rgba(0,0,0,0.55), 0 10px 48px rgba(0,0,0,0.45);
  max-width: 16ch;
}
.hero h1 em {
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.05em;
}
.hero .rule {
  width: 88px;
  height: 1px;
  background: var(--mist);
  opacity: 0.55;
  margin: 28px 0 18px;
}
.hero .sub {
  margin: 0;
  max-width: 28ch;
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 400;
  line-height: 1.45;
  color: var(--mist);
  text-shadow: 0 2px 16px rgba(0,0,0,0.75);
}
.scroll-cue {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-shadow: 0 2px 12px rgba(0,0,0,0.7);
}
.scroll-cue .line {
  width: 48px;
  height: 1px;
  background: var(--mist);
  opacity: 0.5;
}
.scroll-cue .pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px var(--lime);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.55; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue .pulse { animation: none; }
  html { scroll-behavior: auto; }
}

.orbs {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.orb {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--mist);
  background: rgba(244, 248, 240, 0.16);
  border: 1px solid rgba(244, 248, 240, 0.28);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 8px 24px rgba(0,0,0,0.25);
  transition: transform 0.25s, background 0.25s, border-color 0.25s;
}
.orb:hover {
  transform: scale(1.06);
  background: rgba(128, 243, 73, 0.16);
  border-color: var(--lime);
  color: var(--lime);
}
.orb svg { width: 24px; height: 24px; }

/* Immersive stops over the 3D world */
.band {
  position: relative;
  padding: 80px 48px;
}
.band.narrow { padding-top: 40px; padding-bottom: 40px; }
.kicker {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lime);
  margin: 0 0 12px;
}
.lead {
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.03em;
  max-width: 22ch;
  margin: 0 0 36px;
}

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
  max-width: 1120px;
}
.glass {
  background: rgba(8, 14, 22, 0.55);
  border: 1px solid rgba(244, 248, 240, 0.16);
  border-radius: 24px;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.1);
  overflow: hidden;
}
.glass-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid rgba(244, 248, 240, 0.08);
}
.glass p.note {
  margin: 0;
  padding: 16px 20px 20px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.chat {
  padding: 16px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 340px;
}
.bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(8px);
}
.bubble.in { opacity: 1; transform: none; transition: opacity 0.4s, transform 0.4s; }
.bubble.them {
  align-self: flex-start;
  background: rgba(244, 248, 240, 0.1);
  border-bottom-left-radius: 4px;
}
.bubble.us {
  align-self: flex-end;
  background: #1a8b46;
  border-bottom-right-radius: 4px;
}
.bubble time {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.65;
}

.wave-wrap {
  padding: 28px 24px 8px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 180px;
}
.wave-wrap span {
  flex: 1;
  background: linear-gradient(180deg, var(--cyan), var(--lime));
  border-radius: 99px;
  transform-origin: bottom;
  height: 20%;
}
.wave-meta {
  display: flex;
  justify-content: space-between;
  padding: 8px 24px 20px;
  font-size: 13px;
  color: var(--muted);
}
.wave-meta .live { color: var(--lime); }

.services {
  max-width: 1180px;
}
.svc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.svc {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.svc .pic {
  position: relative;
  height: 280px;
  overflow: hidden;
}
.svc .pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.svc .body { padding: 22px 22px 24px; }
.svc h3 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.svc p {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
}
.price {
  font-size: 14px;
  font-weight: 500;
  color: var(--lime);
  letter-spacing: 0.01em;
}
.price small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* Light sections */
.light {
  background: var(--paper);
  color: var(--dark-ink);
  padding: 96px 48px;
  position: relative;
  z-index: 2;
}
.light .kicker { color: #1a6b2a; }
.light .lead { color: var(--dark-ink); }
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1180px;
}
.step {
  background: #fff;
  border-radius: 20px;
  padding: 28px 26px;
  min-height: 220px;
  box-shadow: 0 1px 0 rgba(16,32,51,0.06);
}
.step .n {
  font-weight: 100;
  font-size: 42px;
  letter-spacing: -0.04em;
  color: #8b5cff;
  margin-bottom: 12px;
}
.step:nth-child(2) .n { color: #15c2b0; }
.step:nth-child(3) .n { color: #ff7a3d; }
.step h3 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.03em;
}
.step p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: #3a4a5c;
}

.industries { padding-top: 24px; }
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1180px;
}
.chip {
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
}
.chip.c1 { background: #0d1b2e; }
.chip.c2 { background: #15c2b0; color: #08221e; }
.chip.c3 { background: #8b5cff; }
.chip.c4 { background: #ff7a3d; color: #2a1208; }
.chip.c5 { background: #ff3d9a; }
.chip.c6 { background: #102033; color: var(--lime); }

.cta {
  position: relative;
  z-index: 2;
  padding: 120px 48px 100px;
  background:
    radial-gradient(80% 80% at 80% 20%, rgba(139, 92, 255, 0.28), transparent 55%),
    radial-gradient(70% 80% at 10% 80%, rgba(128, 243, 73, 0.18), transparent 50%),
    linear-gradient(180deg, #16304a 0%, #0d1b2e 100%);
  color: var(--mist);
}
.cta h2 {
  margin: 0 0 12px;
  font-weight: 100;
  font-size: clamp(42px, 7vw, 92px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  max-width: 16ch;
}
.cta h2 em { font-weight: 800; font-style: italic; }
.cta p {
  margin: 0 0 28px;
  font-size: 18px;
  color: var(--muted);
  max-width: 36ch;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
}
.btn-lime { background: var(--lime); color: #102033; }
.btn-ghost {
  background: transparent;
  color: var(--mist);
  border-color: rgba(244,248,240,0.35);
}
.btn:hover { transform: translateY(-1px); }

footer {
  position: relative;
  z-index: 2;
  background: #071018;
  color: var(--muted);
  padding: 36px 48px 48px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  line-height: 1.5;
}
footer strong { color: var(--mist); font-weight: 600; }
footer a:hover { color: var(--lime); }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  section[id] { scroll-margin-top: 132px; }
  header { padding: 14px 16px; }
  header { flex-wrap: wrap; gap: 4px 12px; }
  nav { width: 100%; justify-content: flex-start; gap: 0; flex-wrap: nowrap; }
  nav a { font-size: 10px; padding: 6px 4px; letter-spacing: 0.06em; white-space: nowrap; }
  .logo { height: 34px; }
  .logo img { height: 34px; }
  .hero { padding: 108px 20px 96px; }
  .hero h1 { font-size: clamp(44px, 14vw, 72px); }
  .scroll-cue { margin-top: 28px; }
  .orbs { right: 16px; bottom: 16px; }
  .orb { width: 56px; height: 56px; }
  .band, .light, .cta, footer { padding-left: 20px; padding-right: 20px; }
  .demo-grid, .svc-grid, .steps { grid-template-columns: 1fr; }
  .svc .pic { height: 220px; }
  .cta { padding-top: 88px; padding-bottom: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Packages */
.packages { z-index: 2; }
.pkg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1180px;
}
.pkg {
  background: #fff;
  border-radius: 22px;
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(16,32,51,0.06);
  box-shadow: 0 8px 24px rgba(16,32,51,0.05);
  min-height: 100%;
}
.pkg.feat {
  background: var(--navy);
  color: var(--mist);
  border-color: transparent;
}
.pkg .pk-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.pkg .pk-num {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6a7583;
}
.pkg.feat .pk-num { color: rgba(244,248,240,0.6); }
.pkg .badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--lime);
  color: var(--ink);
  padding: 4px 8px;
  border-radius: 999px;
}
.pkg h3 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.04em;
  line-height: 1;
}
.pkg .who {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.35;
  color: #3a4a5c;
  min-height: 2.7em;
}
.pkg.feat .who { color: var(--muted); }
.pkg .amt {
  font-weight: 100;
  font-size: 40px;
  letter-spacing: -0.05em;
  line-height: 1;
}
.pkg .amt small {
  font-size: 20px;
  font-weight: 100;
}
.pkg .mo {
  margin: 4px 0 12px;
  font-size: 15px;
  font-weight: 500;
}
.pkg.feat .mo { color: var(--lime); }
.pkg ul {
  list-style: none;
  margin: 0;
  padding: 12px 0 0;
  border-top: 1px solid rgba(16,32,51,0.08);
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}
.pkg.feat ul { border-top-color: rgba(244,248,240,0.12); }
.pkg li {
  font-size: 14px;
  letter-spacing: -0.02em;
  padding-left: 16px;
  position: relative;
  line-height: 1.3;
}
.pkg li::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--c, var(--violet));
}
.pkg.feat li::before { background: var(--lime); }
.pkg .save {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--lime);
}
.pkg.feat .save { background: var(--lime); color: var(--ink); }

/* Arma tu plan */
.planner {
  position: relative;
  z-index: 2;
  padding: 88px 48px 100px;
  background:
    radial-gradient(70% 70% at 90% 0%, rgba(139, 92, 255, 0.22), transparent 55%),
    radial-gradient(60% 60% at 0% 100%, rgba(34, 211, 238, 0.12), transparent 50%),
    rgba(7, 16, 24, 0.72);
  color: var(--mist);
}
.planner .lead { max-width: 24ch; }
.plan-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 22px;
  max-width: 1180px;
  align-items: start;
}
.plan-groups { display: flex; flex-direction: column; gap: 22px; }
.plan-group h3 {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lime);
  font-weight: 600;
}
.pick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.pick {
  appearance: none;
  background: var(--glass);
  border: 1px solid rgba(244, 248, 240, 0.14);
  border-radius: 18px;
  color: var(--mist);
  text-align: left;
  padding: 14px 14px 12px;
  cursor: pointer;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 96px;
}
.pick:hover { border-color: rgba(128, 243, 73, 0.45); }
.pick.is-on {
  background: rgba(128, 243, 73, 0.1);
  border-color: var(--lime);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 0 0 1px rgba(128,243,73,0.25);
}
.pick .pick-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.pick .pick-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
}
.pick .pick-price {
  margin-top: auto;
  font-size: 13px;
  font-weight: 500;
  color: var(--lime);
}
.pick .qty {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.pick.is-on .qty { display: flex; }
.pick .qty button {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(244,248,240,0.3);
  background: rgba(244,248,240,0.08);
  color: var(--mist);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}
.pick .qty button:hover { border-color: var(--lime); color: var(--lime); }
.pick .qty span { font-size: 14px; font-weight: 600; min-width: 1.2em; text-align: center; }

.plan-sum {
  position: sticky;
  top: 92px;
  background: rgba(8, 14, 22, 0.62);
  border: 1px solid rgba(244, 248, 240, 0.16);
  border-radius: 24px;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.1);
  padding: 22px 22px 20px;
}
.plan-sum h3 {
  margin: 0 0 16px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.plan-tot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}
.plan-tot .lbl { font-size: 14px; color: var(--muted); }
.plan-tot .val {
  font-weight: 100;
  font-size: 36px;
  letter-spacing: -0.04em;
  line-height: 1;
}
.plan-tot.mo .val { font-size: 28px; color: var(--lime); }
.plan-nudge {
  display: none;
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(128, 243, 73, 0.14);
  border: 1px solid rgba(128, 243, 73, 0.35);
  color: var(--lime);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}
.plan-nudge.is-on { display: block; }
.plan-sum .btn { width: 100%; justify-content: center; margin-top: 16px; }
.plan-sum .btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}
.plan-clear {
  display: block;
  margin: 12px auto 0;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 4px;
}
.plan-clear:hover { color: var(--mist); }
.plan-empty {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .pkg-grid { grid-template-columns: 1fr 1fr; }
  .plan-wrap { grid-template-columns: 1fr; }
  .plan-sum { position: static; }
}
@media (max-width: 860px) {
  .pkg-grid { grid-template-columns: 1fr; }
  .pick-grid { grid-template-columns: 1fr 1fr; }
  .planner { padding-left: 20px; padding-right: 20px; padding-bottom: 88px; }
  .pkg .who { min-height: 0; }
  .plan-sticky {
    position: sticky;
    bottom: 0;
    z-index: 35;
    margin: 18px -20px -20px;
    padding: 14px 20px 18px;
    padding-right: 88px;
    background: rgba(8, 14, 22, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid rgba(244,248,240,0.12);
  }
  .plan-sum {
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    border-radius: 0;
  }
  .plan-tot .val { font-size: 28px; }
  .plan-tot.mo .val { font-size: 22px; }
  .plan-sum h3 { display: none; }
}
@media (max-width: 520px) {
  .pick-grid { grid-template-columns: 1fr; }
}

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

/* Rumbo AI chat */
.rumbo-chat-panel,
.rumbo-chat-panel textarea,
.rumbo-chat-panel input,
.rumbo-chat-panel button,
.orb.chat-orb { cursor: auto; }
body.is-touch .orb.chat-orb { cursor: pointer; }

.orb.chat-orb {
  background: rgba(128, 243, 73, 0.18);
  border-color: rgba(128, 243, 73, 0.45);
  color: var(--lime);
}
.orb.chat-orb:hover {
  background: rgba(128, 243, 73, 0.28);
  border-color: var(--lime);
}
.orb.chat-orb .chat-x { display: none; }
body.chat-open .orb.chat-orb .chat-ico { display: none; }
body.chat-open .orb.chat-orb .chat-x { display: block; }

.rumbo-chat-panel {
  position: fixed;
  right: 108px;
  bottom: 28px;
  z-index: 45;
  width: min(400px, calc(100vw - 148px));
  height: min(560px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: rgba(8, 14, 22, 0.78);
  border: 1px solid rgba(244, 248, 240, 0.16);
  border-radius: 24px;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.1);
  overflow: hidden;
  color: var(--mist);
}
.rumbo-chat-panel[hidden] { display: none; }
.rc-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--lime), var(--cyan), var(--violet));
  flex-shrink: 0;
}
.rc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 10px 14px;
  border-bottom: 1px solid rgba(244,248,240,0.1);
}
.rc-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(128,243,73,0.16);
  color: var(--lime);
  flex-shrink: 0;
}
.rc-avatar svg { width: 20px; height: 20px; }
.rc-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.rc-sub {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.rc-x {
  margin-left: auto;
  width: 36px; height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--mist);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.rc-x:hover { color: var(--lime); }
.rc-x svg { width: 16px; height: 16px; }

.rc-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rc-msg {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.4;
}
.rc-msg p { margin: 0; }
.rc-msg a { color: var(--lime); text-decoration: underline; }
.rc-msg-bot {
  align-self: flex-start;
  background: rgba(244,248,240,0.08);
  border-bottom-left-radius: 4px;
}
.rc-msg-user {
  align-self: flex-end;
  background: rgba(128,243,73,0.18);
  color: #f4f8f0;
  border-bottom-right-radius: 4px;
}
.rc-typing {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 12px 14px;
}
.rc-typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--lime);
  animation: rc-dot 1.1s ease-in-out infinite;
}
.rc-typing span:nth-child(2) { animation-delay: 0.15s; background: var(--cyan); }
.rc-typing span:nth-child(3) { animation-delay: 0.3s; background: var(--violet); }
@keyframes rc-dot {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

.rc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 8px;
}
.rc-chip {
  border: 1px solid rgba(244,248,240,0.18);
  background: rgba(244,248,240,0.06);
  color: var(--mist);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.rc-chip:hover { border-color: var(--lime); color: var(--lime); }

.rc-offline {
  margin: 0 14px 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(128,243,73,0.1);
  border: 1px solid rgba(128,243,73,0.28);
  font-size: 14px;
  line-height: 1.4;
}
.rc-offline p { margin: 0 0 10px; }
.rc-wa-btn,
.rc-foot-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  background: var(--lime);
  color: var(--ink);
  text-decoration: none;
}
.rc-wa-row { padding: 0 14px 4px; }
.rc-foot-wa {
  margin: 0 14px 8px;
  background: transparent;
  color: var(--mist);
  border: 1px solid rgba(244,248,240,0.22);
}
.rc-foot-wa:hover { border-color: var(--lime); color: var(--lime); }

.rc-form {
  display: flex;
  gap: 8px;
  padding: 8px 12px 12px;
  border-top: 1px solid rgba(244,248,240,0.1);
  align-items: flex-end;
}
.rc-form[hidden],
.rc-offline[hidden],
.rc-chips[hidden],
.rc-foot-wa[hidden] { display: none; }
.rc-form textarea {
  flex: 1;
  resize: none;
  min-height: 42px;
  max-height: 96px;
  border-radius: 16px;
  border: 1px solid rgba(244,248,240,0.16);
  background: rgba(244,248,240,0.06);
  color: var(--mist);
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  line-height: 1.35;
}
.rc-form textarea:focus { outline: none; border-color: var(--lime); }
.rc-send {
  width: 42px; height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.rc-send:disabled { opacity: 0.45; }
.rc-send svg { width: 18px; height: 18px; }

@media (max-width: 860px) {
  .rumbo-chat-panel {
    left: 16px;
    right: 16px;
    width: auto;
    bottom: 220px;
    height: min(62vh, calc(100vh - 240px));
  }
  body.chat-kb .orbs { visibility: hidden; }
  body.chat-kb .rumbo-chat-panel {
    left: 12px;
    right: 12px;
    height: min(70vh, calc(100vh - 24px));
  }
}
@media (prefers-reduced-motion: reduce) {
  .rc-typing span { animation: none; }
}
