:root {
  --bg: #0B1220;
  --bg-elevated: #111A2E;
  --bg-panel: #162238;
  --bg-light: #F7F8FA;
  --border: #232A35;
  --border-hover: #384556;
  --primary: #2FA84F;
  --primary-hover: #279043;
  --primary-ink: #06130B;
  --amber: #E8A33D;
  --text: #F2F4F7;
  --text-dark: #14181F;
  --muted: #8B93A1;
  --radius-btn: 8px;
  --radius-card: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

[x-cloak] { display: none !important; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.nc-container {
  width: min(1120px, 100%);
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 5.5vw, 4.5rem);
  box-sizing: border-box;
}

.nc-grid-bg {
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ——— Buttons ——— */
.nc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-btn);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 160ms var(--ease-out), background 160ms ease, border-color 160ms ease, box-shadow 200ms ease;
}
.nc-btn:active { transform: scale(0.98); }
.nc-btn-primary {
  background: var(--primary);
  color: var(--primary-ink);
  box-shadow: 0 8px 28px rgba(47,168,79,0.35);
}
.nc-btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.28) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.6s var(--ease-out);
}
.nc-btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px) scale(1.02);
  color: #fff;
  box-shadow: 0 12px 32px rgba(47,168,79,0.45);
}
.nc-btn-primary:hover::before { transform: translateX(120%); }
.nc-btn-secondary {
  background: rgba(255,255,255,0.03);
  border-color: var(--border);
  color: var(--text);
}
.nc-btn-secondary:hover {
  border-color: var(--primary);
  background: rgba(47,168,79,0.08);
  transform: translateY(-2px);
}

/* ——— Cards ——— */
.nc-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  transition: border-color 180ms ease, transform 220ms var(--ease-out), box-shadow 220ms ease;
}
.nc-card:hover {
  border-color: rgba(47,168,79,0.45);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}
.nc-card-light {
  background: #fff;
  border: 1px solid #E4E7EC;
  border-radius: 16px;
  padding: 1.6rem;
  box-shadow: 0 4px 16px rgba(11,18,32,0.06);
  transition: transform 220ms var(--ease-out), box-shadow 220ms ease, border-color 180ms ease;
}
.nc-card-light:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(11,18,32,0.12);
  border-color: rgba(47,168,79,0.35);
}

.nc-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 26px;
  padding: 0 11px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nc-pill-green {
  background: rgba(47,168,79,0.12);
  color: var(--primary);
  border: 1px solid rgba(47,168,79,0.3);
}
.nc-pill-amber {
  background: rgba(232,163,61,0.12);
  color: var(--amber);
  border: 1px solid rgba(232,163,61,0.3);
}
.nc-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: var(--primary);
  box-shadow: 0 0 0 0 rgba(47,168,79,0.55);
  animation: pulse-dot 1.8s infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(47,168,79,0.55); }
  70% { box-shadow: 0 0 0 10px rgba(47,168,79,0); }
  100% { box-shadow: 0 0 0 0 rgba(47,168,79,0); }
}

.nc-input {
  width: 100%;
  background: #0B1220;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 0.85rem 1rem;
  color: var(--text);
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.nc-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47,168,79,0.18);
  transform: translateY(-1px);
}
.nc-input::placeholder { color: var(--muted); }

/* ——— Reveal animations ——— */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.fade-left.is-visible { opacity: 1; transform: translateX(0); }
.fade-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.fade-right.is-visible { opacity: 1; transform: translateX(0); }
.scale-in {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}
.scale-in.is-visible { opacity: 1; transform: scale(1); }

.nc-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(11,18,32,0.82);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, background 200ms ease, box-shadow 200ms ease;
}
.nc-nav.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  background: rgba(11,18,32,0.94);
}
.nc-nav a.nav-link {
  position: relative;
  transition: color 160ms ease;
}
.nc-nav a.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 200ms var(--ease-out);
}
.nc-nav a.nav-link:hover { color: #fff; }
.nc-nav a.nav-link:hover::after { width: 100%; }

.nc-logo-text { font-weight: 800; letter-spacing: -0.03em; }
.nc-logo-text span { color: var(--primary); }
.nc-logo-mark {
  transition: transform 250ms var(--ease-out), box-shadow 250ms ease;
}
a:hover .nc-logo-mark {
  transform: rotate(-6deg) scale(1.06);
  box-shadow: 0 0 0 3px rgba(47,168,79,0.25);
}

/* ——— Hero atmosphere ——— */
.nc-hero {
  position: relative;
  overflow: hidden;
  min-height: min(92vh, 860px);
  display: flex;
  align-items: center;
  padding-block: clamp(3.5rem, 8vh, 6rem);
}
.nc-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.nc-hero-copy h1 {
  letter-spacing: -0.018em;
  line-height: 1.16;
  max-width: 13.5em;
  text-wrap: balance;
}
.nc-hero-copy p {
  max-width: 38rem;
  letter-spacing: 0.005em;
}
.nc-float-chip {
  position: absolute;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 9999px;
  background: rgba(17,26,46,0.9);
  border: 1px solid rgba(47,168,79,0.28);
  color: #F2F4F7;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  animation: chip-float 6s ease-in-out infinite;
}
.nc-float-chip:nth-child(2) { animation-delay: -2s; }
.nc-float-chip:nth-child(3) { animation-delay: -4s; }
@keyframes chip-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.nc-circuit {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background:
    radial-gradient(circle at 72% 28%, rgba(47,168,79,0.28), transparent 42%),
    radial-gradient(circle at 18% 78%, rgba(232,163,61,0.12), transparent 40%),
    linear-gradient(rgba(47,168,79,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47,168,79,0.07) 1px, transparent 1px);
  background-size: auto, auto, 40px 40px, 40px 40px;
  animation: grid-drift 28s linear infinite;
}
@keyframes grid-drift {
  from { background-position: 0 0, 0 0, 0 0, 0 0; }
  to { background-position: 0 0, 0 0, 40px 40px, 40px 40px; }
}
.nc-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(50px);
  pointer-events: none;
  opacity: 0.45;
  animation: orb-float 9s ease-in-out infinite;
}
.nc-orb-a {
  width: 280px; height: 280px;
  background: rgba(47,168,79,0.35);
  top: 8%; right: 8%;
}
.nc-orb-b {
  width: 220px; height: 220px;
  background: rgba(232,163,61,0.2);
  bottom: 10%; left: 5%;
  animation-delay: -3s;
}
@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(18px, -22px) scale(1.08); }
}

.nc-console {
  background: linear-gradient(160deg, #111A2E 0%, #0d1628 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem 1.45rem 1.35rem;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  position: relative;
  overflow: hidden;
}
.nc-console::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 42px;
  background: linear-gradient(180deg, transparent, rgba(47,168,79,0.12), transparent);
  animation: scan 4.8s linear infinite;
  pointer-events: none;
}
@keyframes scan {
  from { top: -48px; }
  to { top: 110%; }
}
.nc-console::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(47,168,79,0.55), transparent 40%, rgba(232,163,61,0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.nc-console-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background 160ms ease, border-color 160ms ease;
}
.nc-console-row:hover {
  background: rgba(255,255,255,0.03);
  border-color: var(--border);
}
.nc-metric-live {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: var(--amber);
  letter-spacing: -0.02em;
}

.nc-marquee {
  overflow: hidden;
  border-block: 1px solid var(--border);
  background: rgba(17,26,46,0.7);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.nc-marquee-track {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  animation: marquee 28s linear infinite;
  padding: 0.95rem 0;
}
.nc-marquee:hover .nc-marquee-track { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.nc-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.nc-marquee-item strong { color: var(--text); }

/* Service icon bounce */
.nc-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #E8F8EE, #d7f0e0);
  color: var(--primary);
  transition: transform 280ms var(--ease-out), background 200ms ease;
}
.nc-card-light:hover .nc-icon-box {
  transform: translateY(-4px) rotate(-6deg) scale(1.08);
  background: linear-gradient(145deg, #2FA84F, #279043);
  color: #fff;
}

.nc-step {
  position: relative;
  padding: 1.35rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #E4E7EC;
  height: 100%;
  transition: transform 220ms var(--ease-out), box-shadow 220ms ease;
}
.nc-step:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(11,18,32,0.1);
}
.nc-step-num {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  background: rgba(47,168,79,0.12);
  color: var(--primary);
  margin-bottom: 0.85rem;
  transition: transform 250ms var(--ease-out), background 200ms ease, color 200ms ease;
}
.nc-step:hover .nc-step-num {
  background: var(--primary);
  color: #fff;
  transform: scale(1.08);
}

.nc-case-metric {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--amber);
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--amber), #ffd089);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Floating WhatsApp */
.nc-float-wa {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  width: 60px;
  height: 60px;
  border-radius: 9999px;
  background: var(--primary);
  color: var(--primary-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(47,168,79,0.45);
  text-decoration: none;
  animation: wa-bob 3s ease-in-out infinite;
}
.nc-float-wa::before,
.nc-float-wa::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  border: 2px solid rgba(47,168,79,0.55);
  animation: wa-ring 2.2s ease-out infinite;
}
.nc-float-wa::after { animation-delay: 0.7s; }
.nc-float-wa:hover {
  background: var(--primary-hover);
  color: #fff;
  transform: scale(1.08);
  animation: none;
}
@keyframes wa-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@keyframes wa-ring {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.55); opacity: 0; }
}

.nc-wa-tip {
  position: fixed;
  right: 5.2rem;
  bottom: 1.55rem;
  z-index: 60;
  background: #fff;
  color: var(--text-dark);
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  max-width: 200px;
  opacity: 0;
  transform: translateX(10px);
  pointer-events: none;
  transition: opacity 300ms ease, transform 300ms var(--ease-out);
}
.nc-wa-tip.is-on {
  opacity: 1;
  transform: translateX(0);
}
.nc-wa-tip::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: #fff;
}

/* Mobile sticky CTA */
.nc-mobile-cta {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: rgba(11,18,32,0.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
}
@media (max-width: 767px) {
  .nc-mobile-cta { display: block; }
  .nc-float-wa { bottom: 5.2rem; }
  .nc-wa-tip { bottom: 5.75rem; display: none; }
  body { padding-bottom: 76px; }
}

.nc-urgency {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-radius: 9999px;
  background: rgba(232,163,61,0.1);
  border: 1px solid rgba(232,163,61,0.28);
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 600;
}

.nc-section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.nc-highlight {
  background: linear-gradient(90deg, rgba(47,168,79,0.25), rgba(47,168,79,0.05));
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0 0.15em;
  border-radius: 4px;
}

/* Admin (unchanged structure) */
.admin-shell { min-height: 100vh; display: flex; background: var(--bg); }
.admin-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.925rem;
}
.admin-nav-link:hover { background: rgba(255,255,255,0.03); color: var(--text); }
.admin-nav-link.active {
  background: rgba(47,168,79,0.12);
  color: var(--primary);
  border: 1px solid rgba(47,168,79,0.25);
}
.admin-main { flex: 1; min-width: 0; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }
.status-nuevo { color: #69de7d; }
.status-contactado { color: #c0c6da; }
.status-en_negociacion { color: var(--amber); }
.status-ganado { color: var(--primary); }
.status-perdido { color: #ffb4ab; }

@media (max-width: 900px) {
  .admin-sidebar { display: none; }
  .admin-sidebar.open {
    display: flex;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 80;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .fade-up, .fade-left, .fade-right, .scale-in {
    opacity: 1;
    transform: none;
  }
}
