/* Header & Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 16px 0;
  transition: background 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 32px -12px rgba(33, 16, 63, 0.14);
  border-bottom: 1px solid rgba(112, 65, 219, 0.12);
  padding: 12px 0;
}

.header-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-logo img {
  height: 42px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  font-weight: 500;
}

.nav-links a {
  white-space: nowrap;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--violet-main);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--violet-main), var(--violet-electric));
  box-shadow: 0 12px 28px -10px rgba(112, 65, 219, 0.55);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px -8px rgba(112, 65, 219, 0.65);
}

.btn-secondary {
  color: var(--purple-deep);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(112, 65, 219, 0.22);
}

.btn-secondary:hover {
  border-color: var(--violet-main);
}

.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(112, 65, 219, 0.2);
  color: var(--purple-deep);
  font-size: 20px;
}

.mobile-drawer {
  display: none;
  margin: 12px 16px 0;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(112, 65, 219, 0.16);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 24px 48px -16px rgba(33, 16, 63, 0.22);
}

.mobile-drawer.open {
  display: block;
}

.mobile-drawer a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 500;
}

.mobile-drawer a:hover {
  background: var(--bg-light);
  color: var(--violet-main);
}

/* Hero & 3D Cubes Stage */
.hero-section {
  padding: 132px 0 64px;
  background: linear-gradient(180deg, #f8f6ff 0%, #efe8ff 52%, #f8f6ff 100%);
  position: relative;
  overflow: hidden;
}

.hero-copy {
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.15rem, 4.3vw, 3.65rem);
  font-weight: 700;
  line-height: 1.08;
  text-wrap: balance;
}

.hero-desc {
  margin: 20px auto 0;
  max-width: 680px;
  font-size: 16.5px;
  color: rgba(33, 16, 63, 0.8);
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.hero-indicators {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(33, 16, 63, 0.74);
}

.cubes-stage-card {
  margin-top: 40px;
  border-radius: 28px;
  border: 1px solid rgba(112, 65, 219, 0.15);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(243, 238, 255, 0.85) 55%, rgba(255, 255, 255, 0.94) 100%);
  box-shadow: 0 30px 80px -28px rgba(33, 16, 63, 0.18);
  overflow: hidden;
}

.stage-toolbar {
  padding: 16px 24px 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: rgba(33, 16, 63, 0.72);
}

.stage-viewport {
  position: relative;
  width: 100%;
  height: 500px;
}

.canvas-mount {
  width: 100%;
  height: 100%;
}

.cube-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20;
  pointer-events: none;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--purple-deep);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(33, 16, 63, 0.25);
  opacity: 0;
  transition: opacity 0.12s ease;
}

.cube-tooltip.visible {
  opacity: 1;
}

.cube-info-panel {
  position: absolute;
  top: 50%;
  right: 28px;
  transform: translateY(-50%);
  width: 45%;
  z-index: 25;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(112, 65, 219, 0.2);
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 24px 64px -16px rgba(33, 16, 63, 0.24);
  display: none;
}

.cube-info-panel.open {
  display: block;
}

.cube-info-panel ul {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.cube-info-panel li::before {
  content: '✓';
  color: var(--violet-main);
  font-weight: 700;
  margin-right: 8px;
}

.cube-tabs {
  padding: 14px 20px 18px;
  border-top: 1px solid rgba(112, 65, 219, 0.1);
  background: rgba(255, 255, 255, 0.72);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.cube-tab-btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(112, 65, 219, 0.16);
  background: var(--bg-light);
  color: rgba(33, 16, 63, 0.85);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.cube-tab-btn.active {
  background: var(--violet-main);
  border-color: var(--violet-main);
  color: var(--white);
}

/* Grids & Cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 44px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 44px;
}

.card-light {
  border-radius: 20px;
  background: var(--bg-light);
  border: 1px solid rgba(112, 65, 219, 0.12);
  padding: 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-white {
  border-radius: 20px;
  background: var(--white);
  border: 1px solid rgba(112, 65, 219, 0.14);
  padding: 28px;
}

.card-dark {
  border-radius: 20px;
  background: rgba(33, 16, 63, 0.75);
  border: 1px solid rgba(216, 200, 255, 0.16);
  padding: 26px;
}

.card-light:hover,
.card-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px -24px rgba(112, 65, 219, 0.24);
}

/* Chat Demo */
.chat-shell {
  border-radius: 24px;
  border: 1px solid rgba(112, 65, 219, 0.18);
  background: var(--bg-light);
  overflow: hidden;
  box-shadow: 0 28px 64px -24px rgba(33, 16, 63, 0.22);
}

.chat-header {
  background: linear-gradient(90deg, #21103f, #4a2299);
  color: var(--white);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-messages {
  height: 360px;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(180deg, #f8f6ff 0%, #ffffff 100%);
}

.msg-row {
  display: flex;
}

.msg-row.client {
  justify-content: flex-end;
}

.msg-bubble {
  max-width: 78%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.msg-bubble.assistant {
  background: var(--white);
  border: 1px solid rgba(112, 65, 219, 0.15);
  color: var(--purple-deep);
}

.msg-bubble.client {
  background: linear-gradient(135deg, var(--violet-main), var(--violet-electric));
  color: var(--white);
}

.chat-form {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  background: var(--white);
  border-top: 1px solid rgba(112, 65, 219, 0.12);
}

.chat-form input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(112, 65, 219, 0.2);
  background: var(--bg-light);
  font-family: inherit;
  font-size: 14px;
}

/* Dashboard */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.bar-chart {
  height: 170px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding-top: 16px;
}

.bar-col {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.bar-track {
  width: 100%;
  max-width: 40px;
  flex: 1;
  background: rgba(19, 12, 37, 0.6);
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.bar-fill {
  width: 100%;
  background: linear-gradient(180deg, var(--violet-electric), var(--violet-main));
  border-radius: 8px 8px 0 0;
  transition: height 0.35s ease;
}

/* FAQ Accordion */
.faq-list {
  margin-top: 40px;
  display: grid;
  gap: 12px;
}

.faq-item {
  border-radius: 18px;
  background: var(--white);
  border: 1px solid rgba(112, 65, 219, 0.14);
  overflow: hidden;
}

.faq-btn {
  width: 100%;
  padding: 20px 24px;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  color: var(--purple-deep);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-answer {
  display: none;
  padding: 0 24px 20px;
  font-size: 15px;
  color: rgba(33, 16, 63, 0.78);
}

.faq-item.open .faq-answer {
  display: block;
}

/* Footer */
.site-footer {
  background: #0d071b;
  color: rgba(216, 200, 255, 0.85);
  padding: 56px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-logo-wrap {
  display: inline-flex;
  background: var(--white);
  padding: 8px 14px;
  border-radius: 12px;
}

.footer-logo-wrap img {
  height: 36px;
  width: auto;
}

/* Menú desplegable (igual a chilewebdesign.cl) */
.nav-item{position:relative}
.nav-trigger{background:none;border:0;font:inherit;color:inherit;cursor:pointer;padding:4px 0;white-space:nowrap}
.nav-trigger .chev{display:inline-block;transition:transform .2s}
.nav-item.open .chev,.nav-item:hover .chev{transform:rotate(90deg)}
.submenu{display:none;position:absolute;top:100%;left:0;min-width:240px;padding:8px;background:#fff;border-radius:8px;box-shadow:0 18px 40px -12px rgba(33,16,63,.25);z-index:60}
.nav-item:hover .submenu,.nav-item.open .submenu{display:block}
.nav-links .submenu a{display:block;padding:12px 14px;white-space:normal;font-weight:600}
.nav-social{font-weight:700}
.m-sub summary{padding:10px 12px;font-weight:500;cursor:pointer}
.m-sub a{padding-left:28px}
