:root {
  --mq-dark:   #04050d;
  --mq-navy:   #0d1b3e;
  --mq-blue:   #1a3a6b;
  --mq-mid:    #2557a7;
  --mq-sky:    #4a9fd4;
  --mq-orange: #f5a623;
  --mq-text:   #e8eef8;
  --mq-muted:  rgba(232,238,248,0.6);
}

html {
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
}

body {
  background-color: #04050d;
  color: #e8eef8;
  font-family: 'Inter', sans-serif;
  scroll-behavior: smooth;
}

section {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: 100vh;
}

/* ── Red 4G — panel lateral ── */
#net-panel {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%) translateX(110%);
  width: 270px;
  background: rgba(6, 8, 24, 0.97);
  border: 1px solid rgba(140, 180, 255, 0.2);
  border-right: none;
  border-radius: 14px 0 0 14px;
  padding: 20px 18px;
  transition: transform .4s cubic-bezier(.22, 1, .36, 1);
  z-index: 200;
  color: #c8d8ff;
}
#net-panel.open { transform: translateY(-50%) translateX(0); }
#panel-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: #556;
  font-size: 18px;
  cursor: pointer;
}
#panel-close:hover { color: #aac; }
#panel-icon  { font-size: 30px; margin-bottom: 6px; }
#panel-title { font-size: 16px; font-weight: 700; margin-bottom: 2px; }
#panel-sub   { font-size: 11px; color: #556; margin-bottom: 8px; }
#panel-cat   {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  margin-bottom: 10px;
  font-weight: 600;
  letter-spacing: .5px;
}
#panel-desc  { font-size: 12px; line-height: 1.65; color: #99b; }
#panel-links { margin-top: 12px; }
#panel-links-title { font-size: 10px; color: #445; margin-bottom: 6px; letter-spacing: .5px; text-transform: uppercase; }
.plink     { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #88a; margin-bottom: 4px; }
.plink-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* ── Red 4G — leyenda ── */
#net-legend {
  display: flex;
  gap: 20px;
  padding: 10px 20px;
  flex-wrap: wrap;
  background: rgba(4, 5, 13, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  align-items: center;
}
.leg  { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.ldot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* ── Red 4G — tooltip hover ── */
#net-tip {
  position: fixed;
  pointer-events: none;
  background: rgba(6, 8, 24, 0.92);
  border: 1px solid rgba(140, 180, 255, 0.25);
  color: #c8d8ff;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 7px;
  white-space: nowrap;
  display: none;
  z-index: 300;
}

/* ── Node modal ── */
#node-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(4, 5, 13, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modal-fade-in 0.2s ease;
}

#node-modal {
  position: relative;
  background: rgba(13, 27, 62, 0.95);
  border: 0.5px solid rgba(74, 159, 212, 0.3);
  border-radius: 16px;
  width: min(420px, 90vw);
  overflow: hidden;
  animation: modal-scale-in 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

#node-modal-topbar {
  height: 3px;
  width: 100%;
}

#node-modal-body {
  padding: 32px 32px 36px;
}

#node-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(232, 238, 248, 0.35);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
#node-modal-close:hover {
  color: rgba(232, 238, 248, 0.9);
  background: rgba(255, 255, 255, 0.06);
}

#node-modal-label {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

#node-modal-sub {
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(232, 238, 248, 0.45);
  margin-bottom: 24px;
}

#node-modal-desc {
  font-size: 14px;
  color: rgba(232, 238, 248, 0.55);
  line-height: 1.7;
  min-height: 40px;
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes modal-scale-in {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

/* Badge pulse dot */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.3); }
}

/* Scroll hint bounce */
@keyframes bounce-hint {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(4px); }
}

/* Mobile responsive */
@media (max-width: 768px) {
  #nav-links        { display: none !important; }
  #hamburger        { display: block !important; }
  .about-grid       { grid-template-columns: 1fr !important; gap: 48px !important; }
  .products-grid    { grid-template-columns: 1fr !important; }
  .presence-grid    { grid-template-columns: 1fr !important; }
  .contact-grid     { grid-template-columns: 1fr !important; padding: 32px !important; }
  .form-row         { grid-template-columns: 1fr !important; }
  #net-canvas-wrap  { overflow-x: auto; }
  #net-canvas       { min-width: 900px; }
}
